History

return schemas

Rhys Sullivan committed 7 months ago

Commit ea110d91 parent 639f6fa1 file · +7 −2Browse files

Unified · Split

packages/core/storage-postgres/src/tool-registry.ts+7−2
@@ -8,7 +8,7 @@ import { eq, and, inArray, sql } from "drizzle-orm"; · 7 unmodified lines
88 import type { ToolId } from "@executor/sdk";
99 import type { DrizzleDb } from "./types";
1010 import { ToolNotFoundError, ToolInvocationError, ToolRegistration } from "@executor/sdk";
11−import { buildToolTypeScriptPreview } from "@executor/sdk";
11+import { buildToolTypeScriptPreview, reattachDefs } from "@executor/sdk";
1212 import type { ToolInvoker, ToolListFilter, InvokeOptions, RuntimeToolHandler } from "@executor/sdk";
1313
1414 import { tools, toolDefinitions } from "./schema";
@@ -105,7 +105,12 @@ export const makePgToolRegistry = (db: DrizzleDb, organizationId: string) => { · 90 unmodified lines
105105 outputSchema: t.outputSchema,
106106 defs,
107107 });
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+ };
109114 }),
110115
111116 definitions: () =>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t