From 9da1f19a8c454c884d4de3479b0a34243a5094f5 Mon Sep 17 00:00:00 2001 From: Eric Jurio <1056937+ericnjurio@users.noreply.github.com> Date: Tue, 23 Dec 2025 00:46:25 -0300 Subject: [PATCH 1/2] fix(memory): add 'type' to schemas and use passthrough for Gemini CLI compatibility --- src/memory/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/memory/index.ts b/src/memory/index.ts index 600a7edcc8..a9b22214c7 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -48,12 +48,14 @@ let MEMORY_FILE_PATH: string; // We are storing our memory using entities, relations, and observations in a graph structure export interface Entity { + type?: string; name: string; entityType: string; observations: string[]; } export interface Relation { + type?: string; from: string; to: string; relationType: string; @@ -235,18 +237,20 @@ export class KnowledgeGraphManager { let knowledgeGraphManager: KnowledgeGraphManager; -// Zod schemas for entities and relations +// Zod schemas for entities and relations - Patched for Gemini CLI compatibility const EntitySchema = z.object({ + type: z.string().optional().describe("Internal type discriminator (entity)"), name: z.string().describe("The name of the entity"), entityType: z.string().describe("The type of the entity"), observations: z.array(z.string()).describe("An array of observation contents associated with the entity") -}); +}).passthrough(); const RelationSchema = z.object({ + type: z.string().optional().describe("Internal type discriminator (relation)"), from: z.string().describe("The name of the entity where the relation starts"), to: z.string().describe("The name of the entity where the relation ends"), relationType: z.string().describe("The type of the relation") -}); +}).passthrough(); // The server instance and tools exposed to Claude const server = new McpServer({ From 9264308dd502d39511eae116568be5311f53a441 Mon Sep 17 00:00:00 2001 From: Eric Jurio <1056937+ericnjurio@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:22:22 -0300 Subject: [PATCH 2/2] Update src/memory/index.ts Co-authored-by: adam jones --- src/memory/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory/index.ts b/src/memory/index.ts index a9b22214c7..26d91ab664 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -237,7 +237,7 @@ export class KnowledgeGraphManager { let knowledgeGraphManager: KnowledgeGraphManager; -// Zod schemas for entities and relations - Patched for Gemini CLI compatibility +// Zod schemas for entities and relations const EntitySchema = z.object({ type: z.string().optional().describe("Internal type discriminator (entity)"), name: z.string().describe("The name of the entity"),