From 8944e7fe08084840dce409caa4e2d981034113c5 Mon Sep 17 00:00:00 2001 From: Shawn Morreau Date: Fri, 21 Nov 2025 11:06:37 -0500 Subject: [PATCH] . --- agents/gemini.ts | 1 - fixtures/basic.txt | 2 +- mcp/arkConfig.ts | 2 +- mcp/shared.ts | 29 +---------------------------- play.ts | 2 +- 5 files changed, 4 insertions(+), 32 deletions(-) diff --git a/agents/gemini.ts b/agents/gemini.ts index 4c872cd..ded54d9 100644 --- a/agents/gemini.ts +++ b/agents/gemini.ts @@ -35,7 +35,6 @@ export const gemini = agent({ env: { GEMINI_API_KEY: apiKey, GITHUB_INSTALLATION_TOKEN: githubInstallationToken, - GEMINI_CLI_DISABLE_SCHEMA_VALIDATION: "1", }, onStdout: (chunk) => { const trimmed = chunk.trim(); diff --git a/fixtures/basic.txt b/fixtures/basic.txt index 6d14410..b9fcc52 100644 --- a/fixtures/basic.txt +++ b/fixtures/basic.txt @@ -1 +1 @@ -comment on https://github.com/pullfrogai/scratch/pull/29 that writes a really funny joke about Arktype \ No newline at end of file +comment on https://github.com/pullfrogai/scratch/pull/29 that writes a really funny joke about Codex \ No newline at end of file diff --git a/mcp/arkConfig.ts b/mcp/arkConfig.ts index 8128d85..c9cfb15 100644 --- a/mcp/arkConfig.ts +++ b/mcp/arkConfig.ts @@ -2,6 +2,6 @@ import { configure } from "arktype/config"; configure({ toJsonSchema: { - dialect: null, + // dialect: null, }, }); diff --git a/mcp/shared.ts b/mcp/shared.ts index 79ae24d..d86490d 100644 --- a/mcp/shared.ts +++ b/mcp/shared.ts @@ -65,36 +65,9 @@ export const tool = (toolDef: Tool>) return toolDef; }; -// recursively remove $schema fields from JSON Schema objects -function removeSchemaFields(obj: any): any { - if (obj === null || typeof obj !== "object") { - return obj; - } - - if (Array.isArray(obj)) { - return obj.map(removeSchemaFields); - } - - const result: any = {}; - for (const [key, value] of Object.entries(obj)) { - // skip $schema fields - if (key === "$schema") { - continue; - } - result[key] = removeSchemaFields(value); - } - - return result; -} - export const addTools = (server: FastMCP, tools: Tool[]) => { for (const tool of tools) { - // clone tool and remove $schema from parameters schema - const cleanedTool = { - ...tool, - parameters: tool.parameters ? removeSchemaFields(tool.parameters) : undefined, - }; - server.addTool(cleanedTool); + server.addTool(tool); } return server; }; diff --git a/play.ts b/play.ts index 9ba3a57..c7b7a26 100644 --- a/play.ts +++ b/play.ts @@ -24,7 +24,7 @@ export async function run( const inputs: Required = { prompt, - agent: "gemini", + agent: "codex", ...flatMorph(agents, (_, agent) => agent.apiKeyNames.map((inputKey) => [inputKey, process.env[inputKey.toUpperCase()]]) ),