feat(test-servers): mcp_app_demo preset + _meta on tool/resource defs#1587
Conversation
|
@claude review |
|
Claude finished @cliffhall's task in 1m 46s —— View job Review:
|
Address code-review DRY note on PR #1587: MCP_APP_DEMO_URI was defined in both the fixture and the integration test. Export it from the fixture and import it in the test so the two stay in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
|
Thanks for the review! Addressing each point: 1. Resource 2. Widget protocol method names — Noted as a manual-diligence item for the waves that wire this fixture into the real host; the method names ( 3. DRY on |
|
@claude review |
|
Claude finished @cliffhall's task in 1m 0s —— View job Re-review:
|
…n path Address round-2 code-review note on PR #1587: the _meta passthrough was wired only into the regular registerTool path, so an App-flavored task tool would not surface tool-level _meta. Add _meta to TaskToolDefinition and a matching conditional spread on both registerToolTask overload configs so the two registration paths behave symmetrically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
|
Addressed the round-2 observation in 39f9baa: Task-tool path |
|
@claude review |
|
Claude finished @cliffhall's task in 1m 1s —— View job Re-review:
|
Address round-3 code-review note on PR #1587: resource `_meta` is applied only by the default read handler; a customHandler from onRegisterResource replaces the contents wholesale and would drop it. Document this on ResourceDefinition._meta so a future App UI resource with a custom read handler knows to re-add _meta itself. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
|
Addressed the round-3 observation in 8059a3d: Custom resource handler |
|
@claude review |
|
Claude finished @cliffhall's task in 46s —— View job Re-review:
|
|
📋 Smoke test & AGENTS.md audit for this PR: #1557 (comment) (posted on the linked issue #1557). |
…ase change; tree unchanged)
Closes #1557
Wave 1 of the PR #1510 decomposition (tracking #1579). Adds a bundled
mcp_app_demoMCP App widget totest-servers/so Apps-host conformance and CLI--app-infotests have a fixture to drive the full host surface without an external ext-apps server.Changes (scoped to
test-servers/)composable-test-server.ts— optional_meta?: Record<string, unknown>onToolDefinitionandResourceDefinition, passed through to the SDK'sregisterToolconfig (tool-level_meta) and onto the returned resource content item (resource-level_meta).test-server-fixtures.ts—createMcpAppDemoTool()(carries_meta.ui.resourceUri+visibility),createMcpAppDemoResource()(carries_meta.ui.csp/permissions/prefersBorder), and the inlineMCP_APP_DEMO_HTMLwidget (no external scripts; exercisesui/initialize,size-changed,ui/message, log notification, host-context render). Both are wired intogetDefaultServerConfig().preset-registry.ts—mcp_app_demotool preset andmcp_app_demo_widgetresource preset.Notes
rgba(0,0,0,0.06)in its inline<style>. This is a deliberate exception to the AGENTS.md color-token rule: it's a self-contained static fixture served into the sandbox iframe, not a Mantine component, so the--inspector-*tokens are not in scope. Documented with a comment at the source.Testing
clients/web/src/test/integration/mcp/mcp-app-demo.test.tsasserts the_metaplumbing end-to-end (tool-level_meta.ui.resourceUriontools/list, resource-level_meta.uionresources/read, and the tool handler echo).cd clients/web && npm run validate— pass (2438 unit tests).cd clients/web && npm run test:integration— pass (802 tests, 39 files).cd clients/cli && npm run validate— pass (110 tests); confirms the two new default tools/resources don't regress the stdio CLI suite.🤖 Generated with Claude Code
https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX