Skip to content

spec(t27mcp): visual_output.t27 -- when answer_channel picks UI_RESOURCE - #10563

Open
gHashTag wants to merge 1 commit into
masterfrom
spec/visual-output-ui-resource
Open

gHashTag wants to merge 1 commit into
masterfrom
spec/visual-output-ui-resource

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Follows #10504, which merged and closed its issue. Refs #10531: this PR adds the UI_RESOURCE channel to the same spec. Base is master.

What

specs/t27mcp/visual_output.t27 now says when the UI_RESOURCE channel is used and what it carries:

  • answer_channel: an MCP Apps host gets CH_UI_RESOURCE when there is a drawing, and CH_MARKDOWN_TABLE when there is not.
  • client_host(ui_extension, ui_mime): a client is an MCP Apps host only if its initialize capabilities name the io.modelcontextprotocol/ui extension and list the text/html;profile=mcp-app mime. Any other client is treated as a CLI host.
  • carries_ui_resource(host, svg): says whether a t27f tool result adds the ui:// resource. This is the only fact the server asks.
  • UI_EXTENSION, UI_MIME, UI_URI_VIEW (ui://t27f/view), UI_URI_GRAPH (ui://t27f/graph), UI_PAGE (a script-free HTML page around the SVG) and UI_EMPTY (served before the first drawing).

The server that consumes it is gHashTag/t27-mcp (stacked on t27-mcp#27).

Evidence (Railway lab, never the Mac)

  • Spec tests: 12/12 pass, 0 vacuous. Typecheck: OK, with one existing warning (answer_verdict has 9 parameters).
  • Mutants:
    • an MCP Apps host gets the resource with no drawing: fails 2
    • client_host ignores the mime: fails 2
    • the existing readability mutant (font_px >= MIN_FONT_PX): still fails 3
  • The seal .trinity/seals/t27mcp_T27mcpVisualOutput.json was regenerated with the seal command: spec sha256 2c44da44…3960, 12/12.
  • The t27-mcp server built from this spec was smoke-run on the lab:
    • With the capability, tools/call for t27f_graph and t27f_view returns [text, resource], and the resource has uri: ui://t27f/graph|view and mimeType: text/html;profile=mcp-app.
    • With no capability, or with the wrong mime, it returns [text] only.

🤖 Generated with Claude Code

An MCP Apps host (a client whose initialize capabilities name the
io.modelcontextprotocol/ui extension with the text/html;profile=mcp-app mime)
gets a t27f drawing as a ui:// resource; with no drawing it gets the markdown
table. client_host() reads the two capability facts, carries_ui_resource() says
whether a t27f result adds the resource, and UI_PAGE / UI_URI_VIEW /
UI_URI_GRAPH / UI_EMPTY are the page and addresses the server serves.

Tests: 12/12, 0 vacuous, on the Railway lab. Mutants: an MCP Apps resource
with no drawing fails 2, client_host ignoring the mime fails 2, the
readability mutant still fails 3. Seal regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag force-pushed the spec/visual-output-ui-resource branch from aa95f6a to ca6bd5c Compare October 18, 2026 17:52
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 17:52
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 18:57:31 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 46
PRs with All Checks Green 4
READY 0
FAILING 46
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 46 + 0 + 0 = 46, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant