Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"commander": "^12.0.0",
"pino": "^10.3.1",
"yaml": "^2.4.0",
"zod": "^3.23.0"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/cli-progress": "^3.11.5",
Expand Down
10 changes: 5 additions & 5 deletions src/types/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const MCPRequestSchema = z.object({
jsonrpc: z.literal('2.0'),
method: z.string().min(1),
id: z.union([z.string(), z.number()]),
params: z.record(z.unknown()).optional(),
params: z.record(z.string(), z.unknown()).optional(),
});

/**
Expand Down Expand Up @@ -82,7 +82,7 @@ export const ToolDefinitionSchema = z.object({
'Tool name must start with lowercase letter and contain only lowercase letters, numbers, underscores, and hyphens',
),
description: z.string().min(1, 'description is required'),
inputSchema: z.record(z.unknown()),
inputSchema: z.record(z.string(), z.unknown()),
});

/** Type inference */
Expand All @@ -98,7 +98,7 @@ export const AgentRequestContractSchema = z.object({
raw_input: z.string().min(1, 'raw_input is required'),
display_name: z.string().optional(),
intent_summary: z.string().optional(),
entities: z.record(z.unknown()).optional(),
entities: z.record(z.string(), z.unknown()).optional(),
turn_history: z
.array(
z.object({
Expand All @@ -107,7 +107,7 @@ export const AgentRequestContractSchema = z.object({
}),
)
.optional(),
workflow_state: z.record(z.unknown()).optional(),
workflow_state: z.record(z.string(), z.unknown()).optional(),
});

/** Type inference */
Expand All @@ -119,7 +119,7 @@ export type AgentRequestContract = z.infer<typeof AgentRequestContractSchema>;
export const AgentResponseContractSchema = z.object({
content: z.string().min(1, 'content must be a non-empty string'),
workflow_complete: z.boolean(),
workflow_state: z.record(z.unknown()).optional(),
workflow_state: z.record(z.string(), z.unknown()).optional(),
isError: z.boolean().optional(),
errorMessage: z.string().optional(),
});
Expand Down
Loading