Unified · Split
| @@ -8,7 +8,7 @@ import { eq, and, inArray, sql } from "drizzle-orm"; · 7 unmodified lines | ||
| 8 | 8 | import type { ToolId } from "@executor/sdk"; |
| 9 | 9 | import type { DrizzleDb } from "./types"; |
| 10 | 10 | import { ToolNotFoundError, ToolInvocationError, ToolRegistration } from "@executor/sdk"; |
| 11 | −import { buildToolTypeScriptPreview } from "@executor/sdk"; | |
| 11 | +import { buildToolTypeScriptPreview, reattachDefs } from "@executor/sdk"; | |
| 12 | 12 | import type { ToolInvoker, ToolListFilter, InvokeOptions, RuntimeToolHandler } from "@executor/sdk"; |
| 13 | 13 | |
| 14 | 14 | import { tools, toolDefinitions } from "./schema"; |
| @@ -105,7 +105,12 @@ export const makePgToolRegistry = (db: DrizzleDb, organizationId: string) => { · 90 unmodified lines | ||
| 105 | 105 | outputSchema: t.outputSchema, |
| 106 | 106 | defs, |
| 107 | 107 | }); |
| 108 | − return { id: t.id, ...typeScriptPreview }; | |
| 108 | + return { | |
| 109 | + id: t.id, | |
| 110 | + ...typeScriptPreview, | |
| 111 | + inputSchema: t.inputSchema ? reattachDefs(t.inputSchema, defs) : undefined, | |
| 112 | + outputSchema: t.outputSchema ? reattachDefs(t.outputSchema, defs) : undefined, | |
| 113 | + }; | |
| 109 | 114 | }), |
| 110 | 115 | |
| 111 | 116 | definitions: () => |