This commit is contained in:
Shawn Morreau
2025-11-21 11:06:37 -05:00
parent c9aab98389
commit 8944e7fe08
5 changed files with 4 additions and 32 deletions
-1
View File
@@ -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();
+1 -1
View File
@@ -1 +1 @@
comment on https://github.com/pullfrogai/scratch/pull/29 that writes a really funny joke about Arktype
comment on https://github.com/pullfrogai/scratch/pull/29 that writes a really funny joke about Codex
+1 -1
View File
@@ -2,6 +2,6 @@ import { configure } from "arktype/config";
configure({
toJsonSchema: {
dialect: null,
// dialect: null,
},
});
+1 -28
View File
@@ -65,36 +65,9 @@ export const tool = <const params>(toolDef: Tool<any, StandardSchemaV1<params>>)
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<any, any>[]) => {
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;
};
+1 -1
View File
@@ -24,7 +24,7 @@ export async function run(
const inputs: Required<Inputs> = {
prompt,
agent: "gemini",
agent: "codex",
...flatMorph(agents, (_, agent) =>
agent.apiKeyNames.map((inputKey) => [inputKey, process.env[inputKey.toUpperCase()]])
),