Commit 76c6073
authored
feat: interactive ticket card via MCP Apps (SEP-1865) (#52)
syncro_tickets_get results render as an interactive ticket card in MCP
Apps hosts, with resolved customer/contact names, recent comments, and an
in-card "Add comment" round-trip via syncro_tickets_add_comment that
defaults to internal-only (hidden: true) visibility resolved server-side.
- _meta (ui/resourceUri + nested ui.resourceUri) on the two renderable
tools, pointing at ui://syncro/ticket-card.html
- new resources capability: resources/list + resources/read serve the
card as text/html;profile=mcp-app from a committed build-time embed
(src/generated/ticket-card-html.ts) so stdio, Node HTTP, and Workers
runtimes all serve it identically
- _card normalization is best-effort: any failure degrades or drops the
card, never the tool result
- neutral by default (system fonts, no vendor identity, no external
fetches); brandable at serve time via window.__BRAND__ injection or
MCP_BRAND_* env vars (BRAND_INJECT marker, <-escaped, empty brand
serves the HTML byte-identical)
- DOM-construction-only rendering; vendor text never hits innerHTML
- 17 contract tests in tests/mcp-apps.test.ts
Part of the fleet rollout tracked in WYREAI-163.1 parent 04a8315 commit 76c6073
14 files changed
Lines changed: 1762 additions & 527 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments