@ggui-ai/protocol 0.22.0 → 0.24.0

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.
Files changed (44) hide show
  1. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  2. package/dist/gadgets/stdlib-gadgets.js +1 -1
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -0
  6. package/dist/integrations/mcp-apps.d.ts +21 -0
  7. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  8. package/dist/integrations/mcp-apps.js +7 -1
  9. package/dist/schemas/app-theme.d.ts +89 -0
  10. package/dist/schemas/app-theme.d.ts.map +1 -1
  11. package/dist/schemas/app-theme.js +62 -0
  12. package/dist/schemas/contract-violation.d.ts +15 -0
  13. package/dist/schemas/contract-violation.d.ts.map +1 -0
  14. package/dist/schemas/contract-violation.js +21 -0
  15. package/dist/schemas/data-contract.d.ts +7 -0
  16. package/dist/schemas/data-contract.d.ts.map +1 -1
  17. package/dist/schemas/data-contract.js +7 -0
  18. package/dist/schemas/handshake-suggestion.d.ts +6 -0
  19. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  20. package/dist/schemas/handshake-suggestion.js +12 -0
  21. package/dist/schemas/interface-context.d.ts +9 -4
  22. package/dist/schemas/interface-context.d.ts.map +1 -1
  23. package/dist/schemas/interface-context.js +9 -4
  24. package/dist/schemas/mcp.d.ts +14 -5
  25. package/dist/schemas/mcp.d.ts.map +1 -1
  26. package/dist/schemas/mcp.js +37 -7
  27. package/dist/types/data-contract.d.ts +6 -5
  28. package/dist/types/data-contract.d.ts.map +1 -1
  29. package/dist/types/events.d.ts +4 -2
  30. package/dist/types/events.d.ts.map +1 -1
  31. package/dist/types/handshake-suggestion.d.ts +17 -0
  32. package/dist/types/handshake-suggestion.d.ts.map +1 -1
  33. package/dist/types/host-capabilities.d.ts +40 -0
  34. package/dist/types/host-capabilities.d.ts.map +1 -0
  35. package/dist/types/host-capabilities.js +50 -0
  36. package/dist/types/llm.d.ts +4 -4
  37. package/dist/types/llm.d.ts.map +1 -1
  38. package/dist/types/llm.js +11 -6
  39. package/dist/types/render.d.ts +21 -0
  40. package/dist/types/render.d.ts.map +1 -1
  41. package/dist/version.d.ts +101 -1
  42. package/dist/version.d.ts.map +1 -1
  43. package/dist/version.js +101 -1
  44. package/package.json +1 -1
package/dist/version.js CHANGED
@@ -6,6 +6,106 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * The consume result declares its next-call hint (2026-09-26, additive,
10
+ * ggui#1399: MINOR, same draft stamp). `gguiConsumeOutputSchema` gains an
11
+ * optional `nextStep: { tool: 'ggui_amend', description, example, args:
12
+ * { sessionId } }` — the render → consume chain's shape, closing the loop
13
+ * from the drained gesture back to the card: present iff `events` is
14
+ * non-empty, absent on an empty drain, the decision the agent's. SPEC §7.3
15
+ * names it. DECLARED here, EMITTED one release later: the handler returns
16
+ * no hint yet, and the tool's output reaches `tools/list` closed
17
+ * (ggui#1333), so a host must cache a schema naming the member before any
18
+ * server answers with it. No `PROTOCOL_VERSION` move.
19
+ *
20
+ * --------------------------------------------------------------------
21
+ * The relay declares its contract-violation answer (2026-09-25,
22
+ * additive, ggui#1358: MINOR, same draft stamp). `contractViolationSchema`
23
+ * is the zod mirror of `ContractViolation`; `ggui_runtime_submit_action`'s
24
+ * output `code` enum gains `CONTRACT_VIOLATION` and the output gains an
25
+ * optional `violations: ContractViolation[]`. SPEC §4.7's handler contract
26
+ * and §2.4's failure modes name the relay's answer beside the live
27
+ * channel's frame. DECLARED here, ENFORCED one release later: the relay
28
+ * does not yet run the `actionSpec` gate, and the tool's output reaches
29
+ * `tools/list` closed (ggui#1333), so a host must cache a schema naming the
30
+ * code before any server answers with it. No `PROTOCOL_VERSION` move.
31
+ *
32
+ * --------------------------------------------------------------------
33
+ * The handshake suggestion names the card a judged hit proposes
34
+ * (2026-09-25, additive, ggui#1336: MINOR, same draft stamp).
35
+ * `BlueprintMeta.matchedIntent?` carries the stored intent the reuse judge
36
+ * compared with the request, capped at `MATCHED_INTENT_MAX_CHARS` (280,
37
+ * the judge's own truncation), so the agent (which holds the
38
+ * conversation) can decline a proposal it reads as the wrong card. Present
39
+ * only on a judged hit from the requesting app's own pool, never from a
40
+ * pool shared across apps. DECLARED in this change, EMITTED one release
41
+ * later: every output object reaches `tools/list` closed
42
+ * (`additionalProperties: false`, ggui#1333), so a host that cached the
43
+ * previous release's schema would refuse a member it did not name. The
44
+ * member carries a `.describe()` naming its meaning and the decline path
45
+ * (`forceCreate`), so the agent that receives it knows what it is for. The
46
+ * `intent` input's description now says it is stored and shown to later
47
+ * requests of the same app, and names the task, never the end user.
48
+ * Kit: the `n1-compat` catalog gains the `handshake-suggestion` wire and
49
+ * tag 9.1's cache-hit suggestion as a BACKWARD case. No
50
+ * `PROTOCOL_VERSION` move.
51
+ *
52
+ * --------------------------------------------------------------------
53
+ * The read-plane-only posture is normative, and graded (2026-09-24,
54
+ * additive, ggui#1304: MINOR, same draft stamp). SPEC §7.10.6 states the
55
+ * posture the reference server has run since ggui#537: a result publishes
56
+ * the render locator on `structuredContent.resourceUri` and the same
57
+ * value on `_meta.ui.resourceUri`, and carries neither the
58
+ * `ai.ggui/render` slice nor a live-channel token; the locator's read
59
+ * then mounts. A host that mounts the declaration-level shell against
60
+ * such a server MUST answer that read, and a host that advertises
61
+ * `serverResources` MUST answer `resources/read`. Kit: the new
62
+ * `read-plane-only-conformance` catalog grades the server; the
63
+ * host-helper catalog's H2 probe map gains `serverResources` →
64
+ * `resources/read`. Kit, same row: the `bootstrap-protocol` fixtures
65
+ * describe the live delivery paths (the inline global, the forwarded
66
+ * tool result's top-level `_meta`), a new `tool-result-override` setup
67
+ * directive drives the missing-slice failure, and that fixture expects
68
+ * `MISSING_META_GGUI_BOOTSTRAP`, the spelling emitters send (§5.5.2 now
69
+ * says so; `BOOTSTRAP_META_MISSING` names the same condition). No wire
70
+ * shape moves. No `PROTOCOL_VERSION` move.
71
+ *
72
+ * --------------------------------------------------------------------
73
+ * Host-declared gesture delivery (2026-09-24, additive, ggui#1309: MINOR,
74
+ * same draft stamp). New exports: `GGUI_HOST_CAPABILITIES_HEADER`
75
+ * (`ggui-host-capabilities`), `HOST_CAPABILITY_UI_MESSAGE_TURN`
76
+ * (`ui-message-turn`), `parseHostCapabilitiesHeader`. A host's own code
77
+ * declares the token on its MCP connection's header; `ggui_render` then
78
+ * omits its `nextStep: ggui_consume` hint, so the agent ends its turn at
79
+ * paint. Unknown tokens are ignored. No `PROTOCOL_VERSION` move.
80
+ *
81
+ * --------------------------------------------------------------------
82
+ * A member-level clear on a theme write (2026-09-23, additive, ggui#1308:
83
+ * MINOR, same draft stamp). New exports: `APP_THEME_CLEARABLE_MEMBERS`
84
+ * (`mode`, `name`, `frameless`, `fonts`, `imagery` — the optional members
85
+ * outside the attestation), `AppThemeClearableMember`,
86
+ * `appThemeWriteSchema` / `AppThemeWrite` (the write form, where those
87
+ * members also accept `null`), and `splitAppThemeWrite`. `appThemeSchema`
88
+ * and `AppTheme` are unchanged and null-free. The #1124 refusal text names
89
+ * the member-level clear for each clearable dropped member. The shared
90
+ * writer's half (storing the split document, naming the cleared members)
91
+ * lands WITH this (cloud). No `PROTOCOL_VERSION` move.
92
+ *
93
+ * --------------------------------------------------------------------
94
+ * The card's spent `oneShot` names on the render slice (2026-09-23,
95
+ * additive, ggui#1223: MINOR, same draft stamp).
96
+ * `McpAppAiGguiRenderMeta.spentOneShots?: readonly string[]`, projected only
97
+ * by `deriveRenderMeta` from the stored `ComponentGguiSession.spentOneShots`
98
+ * record (`SpentOneShotsRecord` = `{ epoch, actions }`) — only when the
99
+ * record's epoch is the projected card's, filtered to the names that card
100
+ * declares `oneShot`. A consumed action re-served after a reload rendered
101
+ * live again; the runtime now seeds its guard from the slice. New exports:
102
+ * `spentOneShotsSchema`, `SpentOneShotsRecord`; the parser options gain
103
+ * `onInvalidSpentOneShots` (a malformed value is dropped and named, never
104
+ * fatal). Kit: the `render-meta` forward case carries the member. The store
105
+ * write (ggui#1305) and the runtime seed land separately. No
106
+ * `PROTOCOL_VERSION` move.
107
+ *
108
+ * --------------------------------------------------------------------
9
109
  * `actionSpec` on the static render slice (2026-09-23, additive, ggui#1178:
10
110
  * MINOR, same draft stamp). `McpAppAiGguiRenderMeta.actionSpec?: ActionSpec`,
11
111
  * projected only by `deriveRenderMeta` (component renders) and WHOLE, the
@@ -3777,7 +3877,7 @@ export const PROTOCOL_VERSION = "draft-2026-09-10";
3777
3877
  * PATCH under §1.3); it cannot be cut from main, whose delta since
3778
3878
  * 0.14.0 is minor-class.
3779
3879
  */
3780
- export const GGUI_WAVE_VERSION = "0.22.0";
3880
+ export const GGUI_WAVE_VERSION = "0.24.0";
3781
3881
  /**
3782
3882
  * Schema version stamped onto wire envelopes that opt into the
3783
3883
  * `schemaVersion` forward-compat field (see {@link ActionEnvelope},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/protocol",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "sideEffects": [
5
5
  "./dist/schemas/sync-check.js",
6
6
  "./dist/validation/ajv-runtime.js"