-
Notifications
You must be signed in to change notification settings - Fork 9.2k
fix(memory): add 'type' to schemas and use passthrough for Gemini CLI… #3149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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; | ||||||
|
|
@@ -223,18 +225,20 @@ export class KnowledgeGraphManager { | |||||
|
|
||||||
| let knowledgeGraphManager: KnowledgeGraphManager; | ||||||
|
|
||||||
| // Zod schemas for entities and relations | ||||||
| // Zod schemas for entities and relations - Patched for Gemini CLI compatibility | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
no need to add these kind of comments |
||||||
| 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(); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced we should have this |
||||||
|
|
||||||
| 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({ | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just change this to the const "entity" and relation to "relation"?