@tambo-ai/react 0.66.1 → 0.66.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/use-current-message.d.ts +2 -0
- package/dist/hooks/use-current-message.d.ts.map +1 -1
- package/dist/hooks/use-current-message.js +1 -0
- package/dist/hooks/use-current-message.js.map +1 -1
- package/dist/hooks/use-current-message.test.js +5 -0
- package/dist/hooks/use-current-message.test.js.map +1 -1
- package/dist/model/component-metadata.d.ts +2 -2
- package/dist/model/component-metadata.d.ts.map +1 -1
- package/dist/model/component-metadata.js.map +1 -1
- package/dist/providers/tambo-interactable-provider-partial-updates.test.js +87 -87
- package/dist/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
- package/dist/providers/tambo-interactable-provider.d.ts.map +1 -1
- package/dist/providers/tambo-interactable-provider.js +46 -40
- package/dist/providers/tambo-interactable-provider.js.map +1 -1
- package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js +8 -8
- package/dist/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
- package/dist/providers/tambo-interactables-additional-context.test.js +10 -10
- package/dist/providers/tambo-interactables-additional-context.test.js.map +1 -1
- package/dist/providers/tambo-registry-provider.test.js +28 -18
- package/dist/providers/tambo-registry-provider.test.js.map +1 -1
- package/dist/providers/tambo-registry-schema-compat.test.js +57 -28
- package/dist/providers/tambo-registry-schema-compat.test.js.map +1 -1
- package/dist/providers/tambo-thread-provider.test.js +21 -19
- package/dist/providers/tambo-thread-provider.test.js.map +1 -1
- package/dist/schema/alias.d.ts +3 -0
- package/dist/schema/alias.d.ts.map +1 -0
- package/dist/schema/alias.js +6 -0
- package/dist/schema/alias.js.map +1 -0
- package/dist/schema/json-schema.js +29 -29
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +20 -9
- package/dist/schema/schema.js.map +1 -1
- package/dist/schema/schema.test.js +291 -3
- package/dist/schema/schema.test.js.map +1 -1
- package/dist/schema/standard-schema.js +8 -8
- package/dist/schema/standard-schema.js.map +1 -1
- package/dist/schema/validate.test.js +31 -31
- package/dist/schema/validate.test.js.map +1 -1
- package/dist/schema/zod.d.ts +1 -1
- package/dist/schema/zod.d.ts.map +1 -1
- package/dist/schema/zod.js +25 -24
- package/dist/schema/zod.js.map +1 -1
- package/dist/util/registry-validators.d.ts.map +1 -1
- package/dist/util/registry-validators.js +40 -0
- package/dist/util/registry-validators.js.map +1 -1
- package/dist/util/registry-validators.test.js +69 -0
- package/dist/util/registry-validators.test.js.map +1 -1
- package/dist/util/registry.d.ts +1 -5
- package/dist/util/registry.d.ts.map +1 -1
- package/dist/util/registry.js +1 -5
- package/dist/util/registry.js.map +1 -1
- package/dist/util/registry.test.js +80 -67
- package/dist/util/registry.test.js.map +1 -1
- package/esm/hooks/use-current-message.d.ts +2 -0
- package/esm/hooks/use-current-message.d.ts.map +1 -1
- package/esm/hooks/use-current-message.js +1 -0
- package/esm/hooks/use-current-message.js.map +1 -1
- package/esm/hooks/use-current-message.test.js +5 -0
- package/esm/hooks/use-current-message.test.js.map +1 -1
- package/esm/model/component-metadata.d.ts +2 -2
- package/esm/model/component-metadata.d.ts.map +1 -1
- package/esm/model/component-metadata.js.map +1 -1
- package/esm/providers/tambo-interactable-provider-partial-updates.test.js +1 -1
- package/esm/providers/tambo-interactable-provider-partial-updates.test.js.map +1 -1
- package/esm/providers/tambo-interactable-provider.d.ts.map +1 -1
- package/esm/providers/tambo-interactable-provider.js +17 -11
- package/esm/providers/tambo-interactable-provider.js.map +1 -1
- package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js +1 -1
- package/esm/providers/tambo-interactables-additional-context-edge-cases.test.js.map +1 -1
- package/esm/providers/tambo-interactables-additional-context.test.js +1 -1
- package/esm/providers/tambo-interactables-additional-context.test.js.map +1 -1
- package/esm/providers/tambo-registry-provider.test.js +16 -6
- package/esm/providers/tambo-registry-provider.test.js.map +1 -1
- package/esm/providers/tambo-registry-schema-compat.test.js +57 -28
- package/esm/providers/tambo-registry-schema-compat.test.js.map +1 -1
- package/esm/providers/tambo-thread-provider.test.js +8 -6
- package/esm/providers/tambo-thread-provider.test.js.map +1 -1
- package/esm/schema/alias.d.ts +3 -0
- package/esm/schema/alias.d.ts.map +1 -0
- package/esm/schema/alias.js +13 -0
- package/esm/schema/alias.js.map +1 -0
- package/esm/schema/json-schema.js +1 -1
- package/esm/schema/json-schema.js.map +1 -1
- package/esm/schema/schema.d.ts.map +1 -1
- package/esm/schema/schema.js +20 -9
- package/esm/schema/schema.js.map +1 -1
- package/esm/schema/schema.test.js +258 -3
- package/esm/schema/schema.test.js.map +1 -1
- package/esm/schema/standard-schema.js +1 -1
- package/esm/schema/standard-schema.js.map +1 -1
- package/esm/schema/validate.test.js +1 -1
- package/esm/schema/validate.test.js.map +1 -1
- package/esm/schema/zod.d.ts +1 -1
- package/esm/schema/zod.d.ts.map +1 -1
- package/esm/schema/zod.js +25 -24
- package/esm/schema/zod.js.map +1 -1
- package/esm/util/registry-validators.d.ts.map +1 -1
- package/esm/util/registry-validators.js +40 -0
- package/esm/util/registry-validators.js.map +1 -1
- package/esm/util/registry-validators.test.js +69 -0
- package/esm/util/registry-validators.test.js.map +1 -1
- package/esm/util/registry.d.ts +1 -5
- package/esm/util/registry.d.ts.map +1 -1
- package/esm/util/registry.js +1 -5
- package/esm/util/registry.js.map +1 -1
- package/esm/util/registry.test.js +80 -67
- package/esm/util/registry.test.js.map +1 -1
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tambo-registry-schema-compat.test.js","sourceRoot":"","sources":["../../src/providers/tambo-registry-schema-compat.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,kDAAyD;AAEzD,kDAA0B;AAC1B,2CAA6B;AAC7B,2CAA6B;AAE7B,+CAA8C;AAC9C,uEAGmC;AAEnC,wC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AAC,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACjD,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;YACpE,MAAM,MAAM,GAAgB;gBAC1B,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;aAC1C,CAAC;YACF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for schema compatibility with registerTool and registerComponent.\n *\n * These tests verify that the registry functions work correctly with:\n * - Zod 3 schemas (current primary)\n * - Zod 4 schemas (Standard Schema native)\n * - Raw JSON Schema objects\n */\nimport { act, renderHook } from \"@testing-library/react\";\nimport type { JSONSchema7 } from \"json-schema\";\nimport React from \"react\";\nimport * as z3 from \"zod/v3\";\nimport * as z4 from \"zod/v4\";\nimport { TamboComponent } from \"../model/component-metadata\";\nimport { defineTool } from \"../util/registry\";\nimport {\n TamboRegistryProvider,\n useTamboRegistry,\n} from \"./tambo-registry-provider\";\n\n// Test component for registration tests\nconst TestComponent: React.FC<{ message: string }> = ({ message }) => (\n <div>{message}</div>\n);\n\ndescribe(\"Schema Compatibility\", () => {\n const wrapper = ({ children }: { children: React.ReactNode }) => (\n <TamboRegistryProvider>{children}</TamboRegistryProvider>\n );\n\n beforeEach(() => {\n jest.clearAllMocks();\n });\n\n describe(\"registerComponent with different schema types\", () => {\n describe(\"Zod 3 schemas\", () => {\n it(\"should register component with Zod 3 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3ObjectComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 object schema\",\n propsSchema: z3.object({\n message: z3.string().describe(\"The message to display\"),\n count: z3.number().optional().describe(\"Optional count\"),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3ObjectComponent\",\n );\n const registered = result.current.componentList.Zod3ObjectComponent;\n expect(registered.name).toBe(\"Zod3ObjectComponent\");\n expect(registered.props).toBeDefined();\n expect(registered.props).toHaveProperty(\"type\", \"object\");\n });\n\n it(\"should register component with Zod 3 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3NestedComponent\",\n component: TestComponent,\n description: \"Component with nested Zod 3 schema\",\n propsSchema: z3.object({\n user: z3.object({\n name: z3.string(),\n email: z3.string().email(),\n }),\n settings: z3.object({\n theme: z3.enum([\"light\", \"dark\"]),\n notifications: z3.boolean(),\n }),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3NestedComponent\",\n );\n });\n\n it(\"should register component with Zod 3 array schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3ArrayComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 array schema\",\n propsSchema: z3.object({\n items: z3.array(z3.string()).describe(\"List of items\"),\n tags: z3.array(\n z3.object({\n id: z3.number(),\n label: z3.string(),\n }),\n ),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3ArrayComponent\",\n );\n });\n\n it(\"should register component with Zod 3 union schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3UnionComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 union schema\",\n propsSchema: z3.object({\n value: z3.union([z3.string(), z3.number()]),\n status: z3.enum([\"pending\", \"active\", \"completed\"]),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3UnionComponent\",\n );\n });\n });\n\n describe(\"Zod 4 schemas\", () => {\n it(\"should register component with Zod 4 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4ObjectComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 object schema\",\n propsSchema: z4.object({\n message: z4.string().describe(\"The message to display\"),\n count: z4.number().optional().describe(\"Optional count\"),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4ObjectComponent\",\n );\n const registered = result.current.componentList.Zod4ObjectComponent;\n expect(registered.name).toBe(\"Zod4ObjectComponent\");\n expect(registered.props).toBeDefined();\n expect(registered.props).toHaveProperty(\"type\", \"object\");\n });\n\n it(\"should register component with Zod 4 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4NestedComponent\",\n component: TestComponent,\n description: \"Component with nested Zod 4 schema\",\n propsSchema: z4.object({\n user: z4.object({\n name: z4.string(),\n email: z4.email(),\n }),\n settings: z4.object({\n theme: z4.enum([\"light\", \"dark\"]),\n notifications: z4.boolean(),\n }),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4NestedComponent\",\n );\n });\n\n it(\"should register component with Zod 4 array schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4ArrayComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 array schema\",\n propsSchema: z4.object({\n items: z4.array(z4.string()).describe(\"List of items\"),\n tags: z4.array(\n z4.object({\n id: z4.number(),\n label: z4.string(),\n }),\n ),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4ArrayComponent\",\n );\n });\n\n it(\"should register component with Zod 4 union schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4UnionComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 union schema\",\n propsSchema: z4.object({\n value: z4.union([z4.string(), z4.number()]),\n status: z4.enum([\"pending\", \"active\", \"completed\"]),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4UnionComponent\",\n );\n });\n });\n\n describe(\"JSON Schema objects\", () => {\n it(\"should register component with raw JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n properties: {\n message: { type: \"string\", description: \"The message to display\" },\n count: { type: \"number\", description: \"Optional count\" },\n },\n required: [\"message\"],\n };\n\n const component: TamboComponent = {\n name: \"JsonSchemaComponent\",\n component: TestComponent,\n description: \"Component with raw JSON Schema\",\n propsSchema: jsonSchema,\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"JsonSchemaComponent\",\n );\n const registered = result.current.componentList.JsonSchemaComponent;\n expect(registered.props).toEqual(jsonSchema);\n });\n\n it(\"should register component with complex JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n properties: {\n user: {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n email: { type: \"string\", format: \"email\" },\n },\n required: [\"name\", \"email\"],\n },\n items: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: { type: \"number\" },\n label: { type: \"string\" },\n },\n },\n },\n },\n required: [\"user\"],\n };\n\n const component: TamboComponent = {\n name: \"ComplexJsonSchemaComponent\",\n component: TestComponent,\n description: \"Component with complex JSON Schema\",\n propsSchema: jsonSchema,\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"ComplexJsonSchemaComponent\",\n );\n });\n });\n });\n\n describe(\"registerTool with different schema types\", () => {\n describe(\"Zod 3 function schemas\", () => {\n it(\"should register tool with Zod 3 function schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-function-tool\",\n description: \"Tool with Zod 3 function schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(z3.string().describe(\"input parameter\"))\n .returns(z3.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-function-tool\",\n );\n });\n\n it(\"should register tool with Zod 3 function schema with multiple args\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-multi-arg-tool\",\n description: \"Tool with multiple arguments\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(\n z3.string().describe(\"first argument\"),\n z3.number().describe(\"second argument\"),\n z3.boolean().optional().describe(\"optional third argument\"),\n )\n .returns(z3.object({ success: z3.boolean() })),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-multi-arg-tool\",\n );\n });\n\n it(\"should register tool with Zod 3 function schema with object arg\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-object-arg-tool\",\n description: \"Tool with object argument\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(\n z3\n .object({\n query: z3.string().describe(\"search query\"),\n limit: z3.number().optional().describe(\"max results\"),\n filters: z3.array(z3.string()).optional(),\n })\n .describe(\"search options\"),\n )\n .returns(z3.array(z3.string())),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-object-arg-tool\",\n );\n });\n });\n\n describe(\"Zod 4 object schemas for tools\", () => {\n // Note: Zod 4 uses a different function schema API than Zod 3\n // Zod 4: z.function({ input: z.tuple([...]), output: ... })\n // For tools, we recommend using object schemas instead of function schemas\n // since they work consistently across both versions\n\n it(\"should register tool with Zod 4 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-object-tool\",\n description: \"Tool with Zod 4 object schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.tuple([z4.string().describe(\"input parameter\")]),\n outputSchema: z4.string(),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"zod4-object-tool\");\n });\n\n it(\"should register tool with Zod 4 object schema with multiple fields\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-multi-field-tool\",\n description: \"Tool with multiple Zod 4 fields\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.tuple([\n z4.object({\n first: z4.string().describe(\"first argument\"),\n second: z4.number().describe(\"second argument\"),\n third: z4\n .boolean()\n .optional()\n .describe(\"optional third argument\"),\n }),\n ]),\n outputSchema: z4.array(z4.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod4-multi-field-tool\",\n );\n });\n\n it(\"should register tool with Zod 4 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-nested-object-tool\",\n description: \"Tool with Zod 4 nested object\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.tuple([\n z4\n .object({\n query: z4.string().describe(\"search query\"),\n limit: z4.number().optional().describe(\"max results\"),\n filters: z4.array(z4.string()).optional(),\n })\n .describe(\"search options\"),\n ]),\n outputSchema: z4.array(z4.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod4-nested-object-tool\",\n );\n });\n });\n\n describe(\"JSON Schema for tools\", () => {\n it(\"should register tool with JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n description: \"Tool parameters\",\n properties: {\n query: { type: \"string\", description: \"The search query\" },\n limit: { type: \"number\", description: \"Max results to return\" },\n },\n required: [\"query\"],\n };\n\n const tool = defineTool({\n name: \"json-schema-tool\",\n description: \"Tool with raw JSON Schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: jsonSchema,\n outputSchema: {},\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"json-schema-tool\");\n });\n\n it(\"should register tool with complex JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n description: \"Complex search parameters\",\n properties: {\n search: {\n type: \"object\",\n properties: {\n query: { type: \"string\" },\n filters: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n field: { type: \"string\" },\n value: { type: \"string\" },\n },\n },\n },\n },\n required: [\"query\"],\n },\n pagination: {\n type: \"object\",\n properties: {\n page: { type: \"number\" },\n pageSize: { type: \"number\" },\n },\n },\n },\n required: [\"search\"],\n };\n\n const tool = defineTool({\n name: \"complex-json-schema-tool\",\n description: \"Tool with complex JSON Schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: jsonSchema,\n outputSchema: {},\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"complex-json-schema-tool\",\n );\n });\n });\n });\n\n describe(\"Schema validation errors\", () => {\n it(\"should reject Zod 3 z.record() in component propsSchema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"InvalidZod3RecordComponent\",\n component: TestComponent,\n description: \"Component with invalid z.record() schema\",\n propsSchema: z3.record(z3.string()),\n };\n\n expect(() => {\n act(() => {\n result.current.registerComponent(component);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 4 z.record() in component propsSchema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"InvalidZod4RecordComponent\",\n component: TestComponent,\n description: \"Component with invalid Zod 4 z.record() schema\",\n // Zod 4 record requires key type and value type\n propsSchema: z4.record(z4.string(), z4.string()),\n };\n\n expect(() => {\n act(() => {\n result.current.registerComponent(component);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 3 z.record() in tool schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-zod3-record-tool\",\n description: \"Tool with invalid z.record() schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z3.tuple([z3.record(z3.string())]),\n outputSchema: z3.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 4 z.record() in tool schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-zod4-record-tool\",\n description: \"Tool with invalid Zod 4 z.record() schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.array(z4.record(z4.string(), z4.string())),\n outputSchema: z4.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n });\n\n describe(\"Cross-version compatibility\", () => {\n it(\"should register components with mixed Zod 3 and Zod 4 schemas\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n // Register Zod 3 component\n const zod3Component: TamboComponent = {\n name: \"MixedZod3Component\",\n component: TestComponent,\n description: \"Zod 3 component\",\n propsSchema: z3.object({ value: z3.string() }),\n };\n\n // Register Zod 4 component\n const zod4Component: TamboComponent = {\n name: \"MixedZod4Component\",\n component: TestComponent,\n description: \"Zod 4 component\",\n propsSchema: z4.object({ value: z4.string() }),\n };\n\n act(() => {\n result.current.registerComponent(zod3Component);\n result.current.registerComponent(zod4Component);\n });\n\n expect(result.current.componentList).toHaveProperty(\"MixedZod3Component\");\n expect(result.current.componentList).toHaveProperty(\"MixedZod4Component\");\n });\n\n it(\"should register tools with mixed Zod 3, Zod 4, and JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n // Zod 3 tool (using function schema)\n const zod3Tool = defineTool({\n name: \"mixed-zod3-tool\",\n description: \"Zod 3 tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3.function().args(z3.string()).returns(z3.string()),\n });\n\n // Zod 4 tool (using Standard Schema)\n const zod4Tool = defineTool({\n name: \"mixed-zod4-tool\",\n description: \"Zod 4 tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.tuple([z4.string()]),\n outputSchema: z4.string(),\n });\n\n // JSON Schema tool\n const jsonSchemaTool = defineTool({\n name: \"mixed-json-schema-tool\",\n description: \"JSON Schema tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: {\n type: \"object\",\n properties: {\n input: { type: \"string\" },\n },\n },\n outputSchema: { type: \"string\" },\n });\n\n act(() => {\n result.current.registerTools([zod3Tool, zod4Tool, jsonSchemaTool]);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"mixed-zod3-tool\");\n expect(result.current.toolRegistry).toHaveProperty(\"mixed-zod4-tool\");\n expect(result.current.toolRegistry).toHaveProperty(\n \"mixed-json-schema-tool\",\n );\n });\n });\n\n describe(\"Standard Schema interface verification\", () => {\n it(\"should verify Zod 3 schema has ~standard property\", () => {\n const schema = z3.object({ value: z3.string() });\n expect(\"~standard\" in schema).toBe(true);\n });\n\n it(\"should verify Zod 4 schema has ~standard property\", () => {\n const schema = z4.object({ value: z4.string() });\n expect(\"~standard\" in schema).toBe(true);\n });\n\n it(\"should verify JSON Schema does not have ~standard property\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: { value: { type: \"string\" } },\n };\n expect(\"~standard\" in schema).toBe(false);\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"tambo-registry-schema-compat.test.js","sourceRoot":"","sources":["../../src/providers/tambo-registry-schema-compat.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,kDAAyD;AAEzD,kDAA0B;AAC1B,2CAA6B;AAC7B,2CAA6B;AAE7B,+CAA8C;AAC9C,uEAGmC;AAEnC,wCAAwC;AACxC,MAAM,aAAa,GAAkC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACpE,2CAAM,OAAO,CAAO,CACrB,CAAC;AAEF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAiC,EAAE,EAAE,CAAC,CAC/D,8BAAC,+CAAqB,QAAE,QAAQ,CAAyB,CAC1D,CAAC;IAEF,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,+CAA+C,EAAE,GAAG,EAAE;QAC7D,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;YAC7B,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;gBAC5D,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAU,EAAC,GAAG,EAAE,CAAC,IAAA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,IAAI,EAAE,QAAQ,EAAE,EAAE;aAC1C,CAAC;YACF,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for schema compatibility with registerTool and registerComponent.\n *\n * These tests verify that the registry functions work correctly with:\n * - Zod 3 schemas (current primary)\n * - Zod 4 schemas (Standard Schema native)\n * - Raw JSON Schema objects\n */\nimport { act, renderHook } from \"@testing-library/react\";\nimport type { JSONSchema7 } from \"json-schema\";\nimport React from \"react\";\nimport * as z3 from \"zod/v3\";\nimport * as z4 from \"zod/v4\";\nimport { TamboComponent } from \"../model/component-metadata\";\nimport { defineTool } from \"../util/registry\";\nimport {\n TamboRegistryProvider,\n useTamboRegistry,\n} from \"./tambo-registry-provider\";\n\n// Test component for registration tests\nconst TestComponent: React.FC<{ message: string }> = ({ message }) => (\n <div>{message}</div>\n);\n\ndescribe(\"Schema Compatibility\", () => {\n const wrapper = ({ children }: { children: React.ReactNode }) => (\n <TamboRegistryProvider>{children}</TamboRegistryProvider>\n );\n\n beforeEach(() => {\n jest.clearAllMocks();\n });\n\n describe(\"registerComponent with different schema types\", () => {\n describe(\"Zod 3 schemas\", () => {\n it(\"should register component with Zod 3 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3ObjectComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 object schema\",\n propsSchema: z3.object({\n message: z3.string().describe(\"The message to display\"),\n count: z3.number().optional().describe(\"Optional count\"),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3ObjectComponent\",\n );\n const registered = result.current.componentList.Zod3ObjectComponent;\n expect(registered.name).toBe(\"Zod3ObjectComponent\");\n expect(registered.props).toBeDefined();\n expect(registered.props).toHaveProperty(\"type\", \"object\");\n });\n\n it(\"should register component with Zod 3 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3NestedComponent\",\n component: TestComponent,\n description: \"Component with nested Zod 3 schema\",\n propsSchema: z3.object({\n user: z3.object({\n name: z3.string(),\n email: z3.string().email(),\n }),\n settings: z3.object({\n theme: z3.enum([\"light\", \"dark\"]),\n notifications: z3.boolean(),\n }),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3NestedComponent\",\n );\n });\n\n it(\"should register component with Zod 3 array schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3ArrayComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 array schema\",\n propsSchema: z3.object({\n items: z3.array(z3.string()).describe(\"List of items\"),\n tags: z3.array(\n z3.object({\n id: z3.number(),\n label: z3.string(),\n }),\n ),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3ArrayComponent\",\n );\n });\n\n it(\"should register component with Zod 3 union schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod3UnionComponent\",\n component: TestComponent,\n description: \"Component with Zod 3 union schema\",\n propsSchema: z3.object({\n value: z3.union([z3.string(), z3.number()]),\n status: z3.enum([\"pending\", \"active\", \"completed\"]),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod3UnionComponent\",\n );\n });\n });\n\n describe(\"Zod 4 schemas\", () => {\n it(\"should register component with Zod 4 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4ObjectComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 object schema\",\n propsSchema: z4.object({\n message: z4.string().describe(\"The message to display\"),\n count: z4.number().optional().describe(\"Optional count\"),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4ObjectComponent\",\n );\n const registered = result.current.componentList.Zod4ObjectComponent;\n expect(registered.name).toBe(\"Zod4ObjectComponent\");\n expect(registered.props).toBeDefined();\n expect(registered.props).toHaveProperty(\"type\", \"object\");\n });\n\n it(\"should register component with Zod 4 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4NestedComponent\",\n component: TestComponent,\n description: \"Component with nested Zod 4 schema\",\n propsSchema: z4.object({\n user: z4.object({\n name: z4.string(),\n email: z4.email(),\n }),\n settings: z4.object({\n theme: z4.enum([\"light\", \"dark\"]),\n notifications: z4.boolean(),\n }),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4NestedComponent\",\n );\n });\n\n it(\"should register component with Zod 4 array schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4ArrayComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 array schema\",\n propsSchema: z4.object({\n items: z4.array(z4.string()).describe(\"List of items\"),\n tags: z4.array(\n z4.object({\n id: z4.number(),\n label: z4.string(),\n }),\n ),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4ArrayComponent\",\n );\n });\n\n it(\"should register component with Zod 4 union schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"Zod4UnionComponent\",\n component: TestComponent,\n description: \"Component with Zod 4 union schema\",\n propsSchema: z4.object({\n value: z4.union([z4.string(), z4.number()]),\n status: z4.enum([\"pending\", \"active\", \"completed\"]),\n }),\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"Zod4UnionComponent\",\n );\n });\n });\n\n describe(\"JSON Schema objects\", () => {\n it(\"should register component with raw JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n properties: {\n message: { type: \"string\", description: \"The message to display\" },\n count: { type: \"number\", description: \"Optional count\" },\n },\n required: [\"message\"],\n };\n\n const component: TamboComponent = {\n name: \"JsonSchemaComponent\",\n component: TestComponent,\n description: \"Component with raw JSON Schema\",\n propsSchema: jsonSchema,\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"JsonSchemaComponent\",\n );\n const registered = result.current.componentList.JsonSchemaComponent;\n expect(registered.props).toEqual(jsonSchema);\n });\n\n it(\"should register component with complex JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n properties: {\n user: {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n email: { type: \"string\", format: \"email\" },\n },\n required: [\"name\", \"email\"],\n },\n items: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: { type: \"number\" },\n label: { type: \"string\" },\n },\n },\n },\n },\n required: [\"user\"],\n };\n\n const component: TamboComponent = {\n name: \"ComplexJsonSchemaComponent\",\n component: TestComponent,\n description: \"Component with complex JSON Schema\",\n propsSchema: jsonSchema,\n };\n\n act(() => {\n result.current.registerComponent(component);\n });\n\n expect(result.current.componentList).toHaveProperty(\n \"ComplexJsonSchemaComponent\",\n );\n });\n });\n });\n\n describe(\"registerTool with different schema types\", () => {\n describe(\"Zod 3 function schemas\", () => {\n it(\"should register tool with Zod 3 function schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-function-tool\",\n description: \"Tool with Zod 3 function schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(z3.string().describe(\"input parameter\"))\n .returns(z3.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-function-tool\",\n );\n });\n\n it(\"should register tool with Zod 3 function schema with multiple args\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-multi-arg-tool\",\n description: \"Tool with multiple arguments\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(\n z3.string().describe(\"first argument\"),\n z3.number().describe(\"second argument\"),\n z3.boolean().optional().describe(\"optional third argument\"),\n )\n .returns(z3.object({ success: z3.boolean() })),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-multi-arg-tool\",\n );\n });\n\n it(\"should register tool with Zod 3 function schema with object arg\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod3-object-arg-tool\",\n description: \"Tool with object argument\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3\n .function()\n .args(\n z3\n .object({\n query: z3.string().describe(\"search query\"),\n limit: z3.number().optional().describe(\"max results\"),\n filters: z3.array(z3.string()).optional(),\n })\n .describe(\"search options\"),\n )\n .returns(z3.array(z3.string())),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod3-object-arg-tool\",\n );\n });\n });\n\n describe(\"Zod 4 object schemas for tools\", () => {\n // Note: inputSchema must always be an object schema\n // The tool function receives a single object argument with all parameters\n\n it(\"should register tool with Zod 4 object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-object-tool\",\n description: \"Tool with Zod 4 object schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.object({\n input: z4.string().describe(\"input parameter\"),\n }),\n outputSchema: z4.string(),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"zod4-object-tool\");\n });\n\n it(\"should register tool with Zod 4 object schema with multiple fields\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-multi-field-tool\",\n description: \"Tool with multiple Zod 4 fields\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.object({\n first: z4.string().describe(\"first argument\"),\n second: z4.number().describe(\"second argument\"),\n third: z4.boolean().optional().describe(\"optional third argument\"),\n }),\n outputSchema: z4.array(z4.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod4-multi-field-tool\",\n );\n });\n\n it(\"should register tool with Zod 4 nested object schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"zod4-nested-object-tool\",\n description: \"Tool with Zod 4 nested object\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4\n .object({\n query: z4.string().describe(\"search query\"),\n limit: z4.number().optional().describe(\"max results\"),\n filters: z4.array(z4.string()).optional(),\n })\n .describe(\"search options\"),\n outputSchema: z4.array(z4.string()),\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"zod4-nested-object-tool\",\n );\n });\n });\n\n describe(\"JSON Schema for tools\", () => {\n it(\"should register tool with JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n description: \"Tool parameters\",\n properties: {\n query: { type: \"string\", description: \"The search query\" },\n limit: { type: \"number\", description: \"Max results to return\" },\n },\n required: [\"query\"],\n };\n\n const tool = defineTool({\n name: \"json-schema-tool\",\n description: \"Tool with raw JSON Schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: jsonSchema,\n outputSchema: {},\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"json-schema-tool\");\n });\n\n it(\"should register tool with complex JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n description: \"Complex search parameters\",\n properties: {\n search: {\n type: \"object\",\n properties: {\n query: { type: \"string\" },\n filters: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n field: { type: \"string\" },\n value: { type: \"string\" },\n },\n },\n },\n },\n required: [\"query\"],\n },\n pagination: {\n type: \"object\",\n properties: {\n page: { type: \"number\" },\n pageSize: { type: \"number\" },\n },\n },\n },\n required: [\"search\"],\n };\n\n const tool = defineTool({\n name: \"complex-json-schema-tool\",\n description: \"Tool with complex JSON Schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: jsonSchema,\n outputSchema: {},\n });\n\n act(() => {\n result.current.registerTool(tool);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\n \"complex-json-schema-tool\",\n );\n });\n });\n });\n\n describe(\"Schema validation errors\", () => {\n it(\"should reject Zod 3 z.record() in component propsSchema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"InvalidZod3RecordComponent\",\n component: TestComponent,\n description: \"Component with invalid z.record() schema\",\n propsSchema: z3.record(z3.string()),\n };\n\n expect(() => {\n act(() => {\n result.current.registerComponent(component);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 4 z.record() in component propsSchema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const component: TamboComponent = {\n name: \"InvalidZod4RecordComponent\",\n component: TestComponent,\n description: \"Component with invalid Zod 4 z.record() schema\",\n // Zod 4 record requires key type and value type\n propsSchema: z4.record(z4.string(), z4.string()),\n };\n\n expect(() => {\n act(() => {\n result.current.registerComponent(component);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 3 z.record() in tool schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-zod3-record-tool\",\n description: \"Tool with invalid z.record() schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z3.object({\n metadata: z3.record(z3.string()),\n }),\n outputSchema: z3.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject Zod 4 z.record() in tool schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-zod4-record-tool\",\n description: \"Tool with invalid Zod 4 z.record() schema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.object({\n metadata: z4.record(z4.string(), z4.string()),\n }),\n outputSchema: z4.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(\n /Record types \\(objects with dynamic keys\\) are not supported/,\n );\n });\n\n it(\"should reject non-object inputSchema (tuple)\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-tuple-tool\",\n description: \"Tool with tuple inputSchema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.tuple([z4.string()]),\n outputSchema: z4.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(/must be an object schema/);\n });\n\n it(\"should reject non-object inputSchema (string)\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n const tool = defineTool({\n name: \"invalid-string-tool\",\n description: \"Tool with string inputSchema\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.string(),\n outputSchema: z4.string(),\n });\n\n expect(() => {\n act(() => {\n result.current.registerTool(tool);\n });\n }).toThrow(/must be an object schema/);\n });\n });\n\n describe(\"Cross-version compatibility\", () => {\n it(\"should register components with mixed Zod 3 and Zod 4 schemas\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n // Register Zod 3 component\n const zod3Component: TamboComponent = {\n name: \"MixedZod3Component\",\n component: TestComponent,\n description: \"Zod 3 component\",\n propsSchema: z3.object({ value: z3.string() }),\n };\n\n // Register Zod 4 component\n const zod4Component: TamboComponent = {\n name: \"MixedZod4Component\",\n component: TestComponent,\n description: \"Zod 4 component\",\n propsSchema: z4.object({ value: z4.string() }),\n };\n\n act(() => {\n result.current.registerComponent(zod3Component);\n result.current.registerComponent(zod4Component);\n });\n\n expect(result.current.componentList).toHaveProperty(\"MixedZod3Component\");\n expect(result.current.componentList).toHaveProperty(\"MixedZod4Component\");\n });\n\n it(\"should register tools with mixed Zod 3, Zod 4, and JSON Schema\", () => {\n const { result } = renderHook(() => useTamboRegistry(), { wrapper });\n\n // Zod 3 tool (using function schema)\n const zod3Tool = defineTool({\n name: \"mixed-zod3-tool\",\n description: \"Zod 3 tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n toolSchema: z3.function().args(z3.string()).returns(z3.string()),\n });\n\n // Zod 4 tool (using Standard Schema with object inputSchema)\n const zod4Tool = defineTool({\n name: \"mixed-zod4-tool\",\n description: \"Zod 4 tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: z4.object({\n input: z4.string(),\n }),\n outputSchema: z4.string(),\n });\n\n // JSON Schema tool\n const jsonSchemaTool = defineTool({\n name: \"mixed-json-schema-tool\",\n description: \"JSON Schema tool\",\n tool: jest.fn().mockResolvedValue(\"result\"),\n inputSchema: {\n type: \"object\",\n properties: {\n input: { type: \"string\" },\n },\n },\n outputSchema: { type: \"string\" },\n });\n\n act(() => {\n result.current.registerTools([zod3Tool, zod4Tool, jsonSchemaTool]);\n });\n\n expect(result.current.toolRegistry).toHaveProperty(\"mixed-zod3-tool\");\n expect(result.current.toolRegistry).toHaveProperty(\"mixed-zod4-tool\");\n expect(result.current.toolRegistry).toHaveProperty(\n \"mixed-json-schema-tool\",\n );\n });\n });\n\n describe(\"Standard Schema interface verification\", () => {\n it(\"should verify Zod 3 schema has ~standard property\", () => {\n const schema = z3.object({ value: z3.string() });\n expect(\"~standard\" in schema).toBe(true);\n });\n\n it(\"should verify Zod 4 schema has ~standard property\", () => {\n const schema = z4.object({ value: z4.string() });\n expect(\"~standard\" in schema).toBe(true);\n });\n\n it(\"should verify JSON Schema does not have ~standard property\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: { value: { type: \"string\" } },\n };\n expect(\"~standard\" in schema).toBe(false);\n });\n });\n});\n"]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const typescript_sdk_1 = require("@tambo-ai/typescript-sdk");
|
|
7
7
|
const react_1 = require("@testing-library/react");
|
|
8
8
|
const react_2 = __importDefault(require("react"));
|
|
9
|
-
const
|
|
9
|
+
const v4_1 = require("zod/v4");
|
|
10
10
|
const generate_component_response_1 = require("../model/generate-component-response");
|
|
11
11
|
const tools_1 = require("../testing/tools");
|
|
12
12
|
const tambo_client_provider_1 = require("./tambo-client-provider");
|
|
@@ -99,16 +99,18 @@ describe("TamboThreadProvider", () => {
|
|
|
99
99
|
name: "TestOnly",
|
|
100
100
|
component: () => react_2.default.createElement("div", null, "TestOnly"),
|
|
101
101
|
description: "TestOnly",
|
|
102
|
-
propsSchema:
|
|
103
|
-
test:
|
|
102
|
+
propsSchema: v4_1.z.object({
|
|
103
|
+
test: v4_1.z.string(),
|
|
104
104
|
}),
|
|
105
105
|
associatedTools: [
|
|
106
106
|
{
|
|
107
107
|
name: "test-tool",
|
|
108
108
|
tool: jest.fn().mockResolvedValue("test-tool"),
|
|
109
109
|
description: "test-tool",
|
|
110
|
-
inputSchema:
|
|
111
|
-
|
|
110
|
+
inputSchema: v4_1.z.object({
|
|
111
|
+
param: v4_1.z.string().describe("test-param-description"),
|
|
112
|
+
}),
|
|
113
|
+
outputSchema: v4_1.z.string(),
|
|
112
114
|
},
|
|
113
115
|
],
|
|
114
116
|
},
|
|
@@ -963,14 +965,14 @@ describe("TamboThreadProvider", () => {
|
|
|
963
965
|
name: "TestComponent",
|
|
964
966
|
component: () => react_2.default.createElement("div", null, "Test"),
|
|
965
967
|
description: "Test",
|
|
966
|
-
propsSchema:
|
|
968
|
+
propsSchema: v4_1.z.object({ test: v4_1.z.string() }),
|
|
967
969
|
associatedTools: [
|
|
968
970
|
{
|
|
969
971
|
name: "custom-tool",
|
|
970
972
|
tool: jest.fn().mockResolvedValue({ data: "tool result" }),
|
|
971
973
|
description: "Tool with custom transform",
|
|
972
|
-
inputSchema:
|
|
973
|
-
outputSchema:
|
|
974
|
+
inputSchema: v4_1.z.object({ input: v4_1.z.string() }),
|
|
975
|
+
outputSchema: v4_1.z.object({ data: v4_1.z.string() }),
|
|
974
976
|
transformToContent: mockTransformToContent,
|
|
975
977
|
},
|
|
976
978
|
],
|
|
@@ -1064,14 +1066,14 @@ describe("TamboThreadProvider", () => {
|
|
|
1064
1066
|
name: "TestComponent",
|
|
1065
1067
|
component: () => react_2.default.createElement("div", null, "Test"),
|
|
1066
1068
|
description: "Test",
|
|
1067
|
-
propsSchema:
|
|
1069
|
+
propsSchema: v4_1.z.object({ test: v4_1.z.string() }),
|
|
1068
1070
|
associatedTools: [
|
|
1069
1071
|
{
|
|
1070
1072
|
name: "async-tool",
|
|
1071
1073
|
tool: jest.fn().mockResolvedValue({ data: "async tool result" }),
|
|
1072
1074
|
description: "Tool with async transform",
|
|
1073
|
-
inputSchema:
|
|
1074
|
-
outputSchema:
|
|
1075
|
+
inputSchema: v4_1.z.object({ input: v4_1.z.string() }),
|
|
1076
|
+
outputSchema: v4_1.z.object({ data: v4_1.z.string() }),
|
|
1075
1077
|
transformToContent: mockTransformToContent,
|
|
1076
1078
|
},
|
|
1077
1079
|
],
|
|
@@ -1168,7 +1170,7 @@ describe("TamboThreadProvider", () => {
|
|
|
1168
1170
|
name: "TestComponent",
|
|
1169
1171
|
component: () => react_2.default.createElement("div", null, "Test"),
|
|
1170
1172
|
description: "Test",
|
|
1171
|
-
propsSchema:
|
|
1173
|
+
propsSchema: v4_1.z.object({ test: v4_1.z.string() }),
|
|
1172
1174
|
associatedTools: [
|
|
1173
1175
|
{
|
|
1174
1176
|
name: "no-transform-tool",
|
|
@@ -1176,10 +1178,10 @@ describe("TamboThreadProvider", () => {
|
|
|
1176
1178
|
.fn()
|
|
1177
1179
|
.mockResolvedValue({ complex: "data", nested: { value: 42 } }),
|
|
1178
1180
|
description: "Tool without custom transform",
|
|
1179
|
-
inputSchema:
|
|
1180
|
-
outputSchema:
|
|
1181
|
-
complex:
|
|
1182
|
-
nested:
|
|
1181
|
+
inputSchema: v4_1.z.object({ input: v4_1.z.string() }),
|
|
1182
|
+
outputSchema: v4_1.z.object({
|
|
1183
|
+
complex: v4_1.z.string(),
|
|
1184
|
+
nested: v4_1.z.object({ value: v4_1.z.number() }),
|
|
1183
1185
|
}),
|
|
1184
1186
|
// No transformToContent provided
|
|
1185
1187
|
},
|
|
@@ -1269,7 +1271,7 @@ describe("TamboThreadProvider", () => {
|
|
|
1269
1271
|
name: "TestComponent",
|
|
1270
1272
|
component: () => react_2.default.createElement("div", null, "Test"),
|
|
1271
1273
|
description: "Test",
|
|
1272
|
-
propsSchema:
|
|
1274
|
+
propsSchema: v4_1.z.object({ test: v4_1.z.string() }),
|
|
1273
1275
|
associatedTools: [
|
|
1274
1276
|
{
|
|
1275
1277
|
name: "error-tool",
|
|
@@ -1277,8 +1279,8 @@ describe("TamboThreadProvider", () => {
|
|
|
1277
1279
|
.fn()
|
|
1278
1280
|
.mockRejectedValue(new Error("Tool execution failed")),
|
|
1279
1281
|
description: "Tool that errors",
|
|
1280
|
-
inputSchema:
|
|
1281
|
-
outputSchema:
|
|
1282
|
+
inputSchema: v4_1.z.object({ input: v4_1.z.string() }),
|
|
1283
|
+
outputSchema: v4_1.z.string(),
|
|
1282
1284
|
transformToContent: mockTransformToContent,
|
|
1283
1285
|
},
|
|
1284
1286
|
],
|