openpencil/packages/design-jsx/tests
Danila Poyarkov 1dfd501d83
feat: name the call and list every problem in validation errors (#911)
* feat: name the call and list every problem in validation errors

Tool arguments were checked with v.parse, whose error names only the first problem and neither the tool nor the argument, so a model that sent a wrong create_shape call read 'Expected string but received 42'. Tool arguments in Core, which AI chat, MCP, the CLI, and WebMCP all reach, the automation bridge's file commands, design JSX component properties, and gradient stops now throw a heading that names the call followed by v.summarize, which lists each issue with its path. parseToolArgs is exported for the app's own parses of tool arguments.

* test(design-jsx): pass a deliberately wrong property value through the types

The test checks what a script sees for a non-string instance property, which the Instance types reject at compile time.

* docs: say that MCP clients get the MCP SDK's validation report

The MCP SDK validates tool arguments against the registered schema before OpenPencil's handler runs, so an MCP client already received every problem with its path and does not see parseToolArgs' message.
2026-10-05 14:06:26 +00:00
..
attributes.test.ts feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
builders.test.ts refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
export.test.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
fields.test.ts feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
grid.test.ts fix: lay out fill text and repeat() grid tracks (#866) 2026-10-05 14:06:07 +00:00
jsx-runtime.test.tsx refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
layer-order.test.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
paints.test.ts feat: name the call and list every problem in validation errors (#911) 2026-10-05 14:06:26 +00:00
props-overrides.test.ts feat(code): link the Code tab to canvas layers and sync both ways (#805) 2026-10-04 10:08:40 +00:00
reconcile.test.ts feat(code): link the Code tab to canvas layers and sync both ways (#805) 2026-10-04 10:08:40 +00:00
schema.test.ts refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
streaming.test.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
transform.test.ts feat(code): link the Code tab to canvas layers and sync both ways (#805) 2026-10-04 10:08:40 +00:00