@ggui-ai/protocol 0.2.0-alpha.3 → 0.3.0-rc.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 (199) hide show
  1. package/README.md +16 -16
  2. package/dist/envelope-adapters.d.ts +6 -5
  3. package/dist/envelope-adapters.d.ts.map +1 -1
  4. package/dist/envelope-adapters.js +3 -3
  5. package/dist/envelopes/builders.d.ts +6 -32
  6. package/dist/envelopes/builders.d.ts.map +1 -1
  7. package/dist/envelopes/builders.js +3 -25
  8. package/dist/errors/version-mismatch.d.ts +1 -1
  9. package/dist/errors/version-mismatch.js +1 -1
  10. package/dist/gadgets/resolve-app-gadgets.d.ts +10 -0
  11. package/dist/gadgets/resolve-app-gadgets.d.ts.map +1 -0
  12. package/dist/gadgets/resolve-app-gadgets.js +19 -0
  13. package/dist/gadgets/resolve-contract-gadgets.d.ts +6 -6
  14. package/dist/gadgets/resolve-contract-gadgets.js +5 -5
  15. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  16. package/dist/gadgets/stdlib-gadgets.d.ts.map +1 -1
  17. package/dist/gadgets/stdlib-gadgets.js +43 -22
  18. package/dist/iframe-bridge.d.ts +4 -43
  19. package/dist/iframe-bridge.d.ts.map +1 -1
  20. package/dist/iframe-bridge.js +4 -141
  21. package/dist/index.d.ts +60 -62
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +66 -61
  24. package/dist/integrations/mcp-apps.d.ts +83 -38
  25. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  26. package/dist/integrations/mcp-apps.js +98 -52
  27. package/dist/recommended-prompts.d.ts +1 -1
  28. package/dist/recommended-prompts.js +1 -1
  29. package/dist/registry/blueprint-key.d.ts +3 -0
  30. package/dist/registry/blueprint-key.d.ts.map +1 -1
  31. package/dist/registry/blueprint-key.js +9 -0
  32. package/dist/registry/blueprint-stamp.d.ts +12 -0
  33. package/dist/registry/blueprint-stamp.d.ts.map +1 -0
  34. package/dist/registry/blueprint-stamp.js +12 -0
  35. package/dist/registry/canonicalize-contract.d.ts +31 -2
  36. package/dist/registry/canonicalize-contract.d.ts.map +1 -1
  37. package/dist/registry/canonicalize-contract.js +125 -13
  38. package/dist/registry/portable-blueprint.d.ts +64 -0
  39. package/dist/registry/portable-blueprint.d.ts.map +1 -0
  40. package/dist/registry/portable-blueprint.js +103 -0
  41. package/dist/registry/summarize-contract.d.ts +7 -2
  42. package/dist/registry/summarize-contract.d.ts.map +1 -1
  43. package/dist/registry/summarize-contract.js +12 -3
  44. package/dist/registry/variant-key.d.ts +17 -0
  45. package/dist/registry/variant-key.d.ts.map +1 -0
  46. package/dist/registry/variant-key.js +22 -0
  47. package/dist/schema-learning/derive-contract.d.ts +2 -2
  48. package/dist/schema-learning/derive-contract.js +2 -2
  49. package/dist/schema-learning/merge.d.ts.map +1 -1
  50. package/dist/schema-learning/merge.js +3 -2
  51. package/dist/schemas/app-theme.d.ts +38 -0
  52. package/dist/schemas/app-theme.d.ts.map +1 -0
  53. package/dist/schemas/app-theme.js +43 -0
  54. package/dist/schemas/blueprint.d.ts +30 -11
  55. package/dist/schemas/blueprint.d.ts.map +1 -1
  56. package/dist/schemas/blueprint.js +62 -26
  57. package/dist/schemas/data-contract.d.ts +28 -30
  58. package/dist/schemas/data-contract.d.ts.map +1 -1
  59. package/dist/schemas/data-contract.js +26 -26
  60. package/dist/schemas/handshake-suggestion.d.ts +2 -4
  61. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  62. package/dist/schemas/handshake-suggestion.js +5 -14
  63. package/dist/schemas/mcp.d.ts +240 -58
  64. package/dist/schemas/mcp.d.ts.map +1 -1
  65. package/dist/schemas/mcp.js +285 -93
  66. package/dist/schemas/ops-blueprint.d.ts +12 -12
  67. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  68. package/dist/schemas/ops-blueprint.js +14 -24
  69. package/dist/screen-blueprints/define.d.ts +2 -2
  70. package/dist/screen-blueprints/match.d.ts +12 -7
  71. package/dist/screen-blueprints/match.d.ts.map +1 -1
  72. package/dist/screen-blueprints/match.js +7 -5
  73. package/dist/screen-blueprints/types.d.ts +14 -18
  74. package/dist/screen-blueprints/types.d.ts.map +1 -1
  75. package/dist/transport/websocket.d.ts +5 -26
  76. package/dist/transport/websocket.d.ts.map +1 -1
  77. package/dist/types/app-config.d.ts +0 -1
  78. package/dist/types/app-config.d.ts.map +1 -1
  79. package/dist/types/auth.d.ts +1 -46
  80. package/dist/types/auth.d.ts.map +1 -1
  81. package/dist/types/blueprint-source.d.ts +123 -0
  82. package/dist/types/blueprint-source.d.ts.map +1 -0
  83. package/dist/types/blueprint-source.js +126 -0
  84. package/dist/types/blueprint.d.ts +25 -18
  85. package/dist/types/blueprint.d.ts.map +1 -1
  86. package/dist/types/contract-inference.d.ts +2 -43
  87. package/dist/types/contract-inference.d.ts.map +1 -1
  88. package/dist/types/data-contract.d.ts +59 -344
  89. package/dist/types/data-contract.d.ts.map +1 -1
  90. package/dist/types/data-contract.js +5 -12
  91. package/dist/types/events.d.ts +31 -69
  92. package/dist/types/events.d.ts.map +1 -1
  93. package/dist/types/{render-event.d.ts → ggui-session-event.d.ts} +15 -15
  94. package/dist/types/ggui-session-event.d.ts.map +1 -0
  95. package/dist/types/{render-event.js → ggui-session-event.js} +5 -5
  96. package/dist/types/handshake-suggestion.d.ts +60 -40
  97. package/dist/types/handshake-suggestion.d.ts.map +1 -1
  98. package/dist/types/host-context.d.ts +8 -8
  99. package/dist/types/host-context.d.ts.map +1 -1
  100. package/dist/types/host-context.js +5 -5
  101. package/dist/types/invoke.d.ts +1 -13
  102. package/dist/types/invoke.d.ts.map +1 -1
  103. package/dist/types/{canvas-lifecycle.d.ts → lifecycle.d.ts} +35 -37
  104. package/dist/types/lifecycle.d.ts.map +1 -0
  105. package/dist/types/{canvas-lifecycle.js → lifecycle.js} +12 -14
  106. package/dist/types/live-channel.d.ts +48 -104
  107. package/dist/types/live-channel.d.ts.map +1 -1
  108. package/dist/types/llm.d.ts +13 -24
  109. package/dist/types/llm.d.ts.map +1 -1
  110. package/dist/types/llm.js +23 -53
  111. package/dist/types/mcp.d.ts +55 -176
  112. package/dist/types/mcp.d.ts.map +1 -1
  113. package/dist/types/mcp.js +2 -2
  114. package/dist/types/oauth-user-id.d.ts +12 -0
  115. package/dist/types/oauth-user-id.d.ts.map +1 -0
  116. package/dist/types/oauth-user-id.js +10 -0
  117. package/dist/types/portable-blueprint.d.ts +53 -0
  118. package/dist/types/portable-blueprint.d.ts.map +1 -0
  119. package/dist/types/portable-blueprint.js +8 -0
  120. package/dist/types/{session.d.ts → render.d.ts} +51 -53
  121. package/dist/types/render.d.ts.map +1 -0
  122. package/dist/types/thread.d.ts.map +1 -1
  123. package/dist/types/thread.js +3 -3
  124. package/dist/types/ui-generator.d.ts +5 -46
  125. package/dist/types/ui-generator.d.ts.map +1 -1
  126. package/dist/types/ui-generator.js +1 -53
  127. package/dist/validation/ajv-runtime.d.ts +3 -3
  128. package/dist/validation/ajv-runtime.d.ts.map +1 -1
  129. package/dist/validation/ajv-runtime.js +6 -5
  130. package/dist/validation/contract-validator.d.ts +23 -22
  131. package/dist/validation/contract-validator.d.ts.map +1 -1
  132. package/dist/validation/contract-validator.js +28 -26
  133. package/dist/validation/cross-references.d.ts +3 -3
  134. package/dist/validation/cross-references.js +3 -3
  135. package/dist/validation/hygiene-rules.d.ts +13 -10
  136. package/dist/validation/hygiene-rules.d.ts.map +1 -1
  137. package/dist/validation/hygiene-rules.js +20 -14
  138. package/dist/validation/is-record.d.ts +17 -0
  139. package/dist/validation/is-record.d.ts.map +1 -0
  140. package/dist/validation/is-record.js +18 -0
  141. package/dist/validation/lint-contract.d.ts +9 -8
  142. package/dist/validation/lint-contract.d.ts.map +1 -1
  143. package/dist/validation/lint-contract.js +89 -26
  144. package/dist/validation/name-invariants.d.ts +4 -4
  145. package/dist/validation/name-invariants.js +4 -4
  146. package/dist/validation/reserved-channels.d.ts +43 -46
  147. package/dist/validation/reserved-channels.d.ts.map +1 -1
  148. package/dist/validation/reserved-channels.js +14 -177
  149. package/dist/validation/resolve-stream-channel.d.ts +3 -9
  150. package/dist/validation/resolve-stream-channel.d.ts.map +1 -1
  151. package/dist/validation/resolve-stream-channel.js +3 -4
  152. package/dist/validation/sanitize-error.d.ts +10 -9
  153. package/dist/validation/sanitize-error.d.ts.map +1 -1
  154. package/dist/validation/sanitize-error.js +19 -18
  155. package/dist/validation/schema-compat-invariants.d.ts +1 -1
  156. package/dist/validation/schema-compat-invariants.js +3 -3
  157. package/dist/validation/schema-meta-validation.d.ts +21 -8
  158. package/dist/validation/schema-meta-validation.d.ts.map +1 -1
  159. package/dist/validation/schema-meta-validation.js +28 -14
  160. package/dist/validation/schema-subset.d.ts +9 -8
  161. package/dist/validation/schema-subset.d.ts.map +1 -1
  162. package/dist/validation/ui-security.d.ts +0 -17
  163. package/dist/validation/ui-security.d.ts.map +1 -1
  164. package/dist/validation/ui-security.js +17 -22
  165. package/dist/validation/zod-to-json-schema.d.ts +1 -1
  166. package/dist/validation/zod-to-json-schema.d.ts.map +1 -1
  167. package/dist/validation/zod-to-json-schema.js +4 -3
  168. package/dist/version.d.ts +783 -9
  169. package/dist/version.d.ts.map +1 -1
  170. package/dist/version.js +782 -8
  171. package/package.json +2 -2
  172. package/dist/bridge/invoke-agent.d.ts +0 -65
  173. package/dist/bridge/invoke-agent.d.ts.map +0 -1
  174. package/dist/bridge/invoke-agent.js +0 -113
  175. package/dist/stream/stream-parser.d.ts +0 -62
  176. package/dist/stream/stream-parser.d.ts.map +0 -1
  177. package/dist/stream/stream-parser.js +0 -199
  178. package/dist/types/canvas-lifecycle.d.ts.map +0 -1
  179. package/dist/types/credential.d.ts +0 -41
  180. package/dist/types/credential.d.ts.map +0 -1
  181. package/dist/types/credential.js +0 -32
  182. package/dist/types/data-bindings.d.ts +0 -322
  183. package/dist/types/data-bindings.d.ts.map +0 -1
  184. package/dist/types/data-bindings.js +0 -29
  185. package/dist/types/feedback.d.ts +0 -22
  186. package/dist/types/feedback.d.ts.map +0 -1
  187. package/dist/types/feedback.js +0 -7
  188. package/dist/types/mcp-proxy.d.ts +0 -67
  189. package/dist/types/mcp-proxy.d.ts.map +0 -1
  190. package/dist/types/mcp-proxy.js +0 -46
  191. package/dist/types/openrouter-models.d.ts +0 -23
  192. package/dist/types/openrouter-models.d.ts.map +0 -1
  193. package/dist/types/openrouter-models.js +0 -4843
  194. package/dist/types/region.d.ts +0 -26
  195. package/dist/types/region.d.ts.map +0 -1
  196. package/dist/types/region.js +0 -36
  197. package/dist/types/render-event.d.ts.map +0 -1
  198. package/dist/types/session.d.ts.map +0 -1
  199. /package/dist/types/{session.js → render.js} +0 -0
package/dist/version.d.ts CHANGED
@@ -6,6 +6,743 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * Consolidated cleanliness release (2026-06-12, BREAKING, pre-launch).
10
+ * Four strands from the 2026-06-12 cleanliness + orphan audits, every
11
+ * finding adversarially re-verified before action: the dv* entries
12
+ * purge dead wire vocabulary and SSoT-wire the MCP tool input schemas;
13
+ * the ug* and dg* entries clean the `@ggui-ai/ui-gen` + `@ggui-ai/design`
14
+ * published artifacts (dead generation island, prompt-builder
15
+ * consolidation, packaging — no wire change); the tw* entries
16
+ * single-source twin/mirror surfaces across the react / react-native /
17
+ * server packages (no wire change).
18
+ *
19
+ * dv1. **MCP tool input schemas are SSoT-wired.** `schemas/mcp.ts`'s
20
+ * "the server handler imports these" docstring is now TRUE: the
21
+ * handlers in `@ggui-ai/mcp-server-handlers` (+ the hosted pod's
22
+ * `ggui_discover` / `ggui_request_credential`) import the new
23
+ * `*InputShape` raw shapes (consume / emit / get-session /
24
+ * list-featured / search / render-blueprint / discover /
25
+ * request-credential / render) instead of hand-authoring mirrors.
26
+ * The schemas reconciled TOWARD the shipped handler behavior (the
27
+ * live wire): `sessionId` gains `.min(1)`, consume `timeout` is
28
+ * `.int()`, search `limit` is int 1..100, render-blueprint loses
29
+ * the never-read `props` field, list-featured + discover are
30
+ * EMPTY shapes (the filter vocabulary died in the pre-launch
31
+ * scrub), and the aspirational `.strict()` posture drops to match
32
+ * the `z.object(shape)` strip-unknown-keys behavior every live
33
+ * handler actually enforces. `renderInputSchema` — the one drift
34
+ * case decided the other way, toward the truthful contract —
35
+ * gains the live `themeId` + `infra.model` fields the published
36
+ * schema was missing (it would have REJECTED valid live wire
37
+ * calls), and the handler adopts the schema's richer handshakeId
38
+ * validation messages. Hand types `GguiConsumeInput` /
39
+ * `GguiGetSessionInput` / `GguiSearchBlueprintsInput` /
40
+ * `GguiRenderBlueprintInput` / `GguiRequestCredentialInput` are
41
+ * now `z.infer` of those schemas ("kept in sync by convention"
42
+ * dies); `ggui_handshake` / `ggui_update` keep their documented
43
+ * deliberate handler-side divergences (loose-on-purpose draft
44
+ * contract; optional sessionId for in-process dispatch).
45
+ *
46
+ * dv2. **`EventType` collapses to its one real member
47
+ * `'data:submit'`** (actions-vs-context: actions drive turns;
48
+ * there is no third category). The 8 producer-less members
49
+ * (`data:change`, `lifecycle:focus`/`blur`,
50
+ * `interaction:click`/`hover`/`scroll`, `error:validation`/
51
+ * `connection`) are deleted along with their dead client lanes:
52
+ * the RN WebViewRenderer's legacy bridge emissions and both SDKs'
53
+ * never-firing `GguiRenderProps.onInteraction` callback. Server
54
+ * runtime behavior is unchanged — non-submit wire envelopes were
55
+ * already ledger-only and never reached `ggui_consume`.
56
+ *
57
+ * dv3. **`'url'` / `'close'` / `'internal:progress'` leave the WS
58
+ * message union** — pre-flatten vocabulary that survived the
59
+ * rc4/rc7 frame purges. `'url'` + `UrlPayload`: zero emitters
60
+ * since the post-R5 `/r/` short-code drop. `'close'` +
61
+ * `ClosePayload`: SPEC §12.2 already records the close frame
62
+ * deleted in draft-2026-05-27 ("no terminal close ceremony");
63
+ * the server's consumer-with-no-emitter socket-router arm goes
64
+ * with it — clients just close the socket. `'internal:progress'`
65
+ * + `InternalProgressPayload` + `ProgressStep`: zero producers,
66
+ * zero handler arms; rc7's "ProgressStep survives" retention was
67
+ * circular (its only consumer was InternalProgressPayload).
68
+ *
69
+ * dv4. **Emitterless union members deleted**: `GenerationStrategy`
70
+ * loses `'creative'`; `ScreenMechanic` loses `'drag'` / `'swipe'`
71
+ * (no authored blueprint ever used them; the generator infers
72
+ * gesture mechanics from the prompt).
73
+ *
74
+ * dv5. **Client pre-ack error classification matches the real
75
+ * wire**: the iframe-runtime's `classifyPreAckError` /
76
+ * `fromAuthFailure` / `ProtocolError`'s `auth` arm drop the
77
+ * never-emitted `AUTH_REJECTED` / `TOKEN_EXPIRED` codes (`git
78
+ * log -S` proves no first-party server ever minted them) in
79
+ * favor of the codes servers actually send pre-ack:
80
+ * `BOOTSTRAP_EXPIRED` / `BOOTSTRAP_INVALID` /
81
+ * `BOOTSTRAP_SESSION_MISMATCH` / `BOOTSTRAP_APP_MISMATCH` /
82
+ * `UNAUTHENTICATED` (+ the kept `SESSION_NOT_FOUND`). A real
83
+ * ws-token expiry now classifies as `auth` instead of falling
84
+ * into the generic `protocol` bucket. The conformance kit's
85
+ * authored ProtocolError mirror follows. `AUTH_REJECTED` remains
86
+ * ONLY on the §5.5.2 postMessage `BootstrapFailureReason` plane,
87
+ * where SPEC documents it.
88
+ *
89
+ * dv6. **Dead published exports pruned** (zero consumers + zero
90
+ * docs — published-API ladder rung 3): the Streamable-Invoke
91
+ * narrowing aliases (`TextDelta`, `InputJsonDelta`,
92
+ * `ContentBlockDeltaPayload`, `MessageStartEvent`,
93
+ * `ContentBlockStartEvent`, `ContentBlockDeltaEvent`,
94
+ * `ContentBlockStopEvent`, `MessageDeltaEvent`,
95
+ * `MessageStopEvent`, `PingEvent`, `ErrorEvent`, `InvokeRequest`
96
+ * — the zod schemas in `schemas/invoke.ts` stay); the
97
+ * model-catalog helpers (`PROVIDER_INFO`, `isValidModelId`,
98
+ * `getModelsForProvider`, `getModelsForTier`, `selectModelByTier`
99
+ * — `MODEL_REGISTRY` / `ModelId` / `DEFAULT_MODEL` stay);
100
+ * `DESIGN_SYSTEM_VERSION` + the StyleFingerprint cluster
101
+ * (`StyleFingerprintInput`, `computeStyleFingerprint`);
102
+ * `DeclareToolCatalogInput` (the schema + Output type stay);
103
+ * inference utilities `GadgetNames` / `InferContextNames` /
104
+ * `InferContextValue` / `PropsOf`; and the featured-blueprints
105
+ * wire-liars `GguiListFeaturedBlueprintsInput` / `...Output` +
106
+ * `GguiDiscoverInput` / `GguiDiscoverOutput` (the live handlers'
107
+ * shapes are the wire; the dead handler `category` filter branch
108
+ * parsed from an empty schema dies too). Sibling-package prunes
109
+ * in the same slice: `@ggui-ai/react` loses the explicit
110
+ * back-compat alias `extractBootstrapMeta` (+ the unreachable
111
+ * `SelfRepairBoundary` default export); `@ggui-ai/mcp-server`
112
+ * loses dead auth fragments (`formatClearUserSessionCookieHeader`
113
+ * with its false /logout docstrings, `OAuthAuthResult`);
114
+ * `@ggui-ai/iframe-runtime` drops the dead `./runtime.js`
115
+ * exports-map subpath.
116
+ *
117
+ * dv7. **protocol src adopts its own `isRecord`** at ~20 guarded
118
+ * `as Record<string, unknown>` cast sites (no wire change; one
119
+ * deliberate tightening: `isGguiSubmitActionInput` now rejects
120
+ * ARRAY payloads for unknown extension kinds — payload-object
121
+ * presence is the documented invariant).
122
+ *
123
+ * dv8. **The Component Bridge is now inbound-only** (SPEC §8
124
+ * rewritten). The legacy user-data half — postMessage type
125
+ * `'ggui-user-data'` (`BRIDGE_EVENTS.USER_DATA_POST`),
126
+ * CustomEvent `'ggui:user-data'` (`BRIDGE_EVENTS.USER_DATA`),
127
+ * lifecycle types `'ggui-resize'` / `'ggui-render-success'` /
128
+ * `'ggui-render-error'` (`RESIZE` / `RENDER_SUCCESS` /
129
+ * `RENDER_ERROR`), and the `SRCDOC_USER_DATA_BRIDGE` capture
130
+ * snippet — is deleted end-to-end: zero injectors, zero
131
+ * dispatchers, zero receivers existed (the consuming
132
+ * IframeComponentRenderer died in the component-renderer
133
+ * retirement; both SDKs' `GguiRender` listeners could never
134
+ * fire). Outbound user interaction has ONE path: component
135
+ * action hooks (`useAction`) → `data:submit` `ActionEnvelope`
136
+ * over the live channel → consume buffer (§5, §7.3, §8.4).
137
+ * `BRIDGE_EVENTS.AGENT_DATA_POST` / `AGENT_DATA` +
138
+ * `SRCDOC_AGENT_DATA_BRIDGE` (the live agent→component half)
139
+ * are unchanged.
140
+ *
141
+ * dv9. **`ProgressUpdate` deleted** — the producer-internal
142
+ * generation-progress type had exactly one consumer chain: the
143
+ * never-implemented `UiGenerator.stream?()` /
144
+ * `UiGenerateEvent` seam in `@ggui-ai/mcp-server-core`, which
145
+ * dies in the same slice (the one consumer-position handler
146
+ * documented that it deliberately ignores it; provisional
147
+ * preview on `_ggui:preview` is the shipped
148
+ * progress-visibility channel). Client-visible progress
149
+ * vocabulary is unchanged.
150
+ *
151
+ * dv10. **`'ggui:request-repair'` client event deleted** with its
152
+ * whole dead seam: no listener has existed since the BaseShell
153
+ * deletion (2026-04-23) — `GguiSessionRenderer`'s dispatch, the
154
+ * never-supplied `onRequestRepair` option threading in
155
+ * `@ggui-ai/react` (`ReactComponentRendererProps`) and
156
+ * `@ggui-ai/iframe-runtime` (`RenderItemOptions` /
157
+ * `ReactRootMountOptions`), and the false "render-item wires
158
+ * this to the envelope it dispatches" docstring all go. The
159
+ * `SelfRepairBoundary` tier (separate, honestly-`@experimental`
160
+ * surface) is untouched.
161
+ *
162
+ * dv11. **Inbound MCP-Apps hosting plumbing removed; the wire
163
+ * variant stays.** The producer-less server island —
164
+ * `CreateGguiServerOptions.connectors` (its forwarded value was
165
+ * silently swallowed by a conditional spread into a handler
166
+ * that never read it), the unmountable `/mcp-apps/resource` +
167
+ * `/mcp-apps/tools-call` proxy module, `ConnectorRegistry` /
168
+ * `InMemoryConnectorRegistry`, the never-set
169
+ * `mcpAppsServerBaseUrl` renderer option, and the
170
+ * hardcoded-false `isMcpAppsGguiSession` provisional-preview
171
+ * gate input — is deleted (rebuild-from-git when a real
172
+ * embedding customer materializes; the producing
173
+ * `shortcuts.mcpApps` input died in the handshake-first
174
+ * collapse). `McpAppsGguiSession` / `McpAppsSource` and every
175
+ * union-forced client/handler guard branch REMAIN published
176
+ * wire surface per SPEC §6 + the MCP-Apps composition strategy.
177
+ *
178
+ * dv12. **`ggui.json#theme` (ThemeDocument) drops the optional
179
+ * `canvas` group**, and `DtcgTheme` / `ParsedTheme` drop
180
+ * `canvas` / `canvasConfig` + the `--ggui-canvas-*` CSS
181
+ * variables (design-package + open file-format vocabulary, not
182
+ * MCP wire). The consuming GenerativeCanvas shells left with
183
+ * the guuey split; no renderer, prompt, or app shell read the
184
+ * tokens since. Operator theme files carrying a `canvas` block
185
+ * now fail strict parse — delete the block.
186
+ *
187
+ * dv13. **`checkSecurity` + `SecurityCheckResult` deleted;
188
+ * `FULLSTACK_IMPORT_PREFIXES` un-exported** (published npm
189
+ * surface, no wire change — DEAD-PROTO-04 follow-up). The
190
+ * convenience checker had zero consumers repo-wide: every live
191
+ * validation path runs `validateComponentDetailed` in
192
+ * `@ggui-ai/ui-gen`, which imports `DANGEROUS_PATTERNS` directly
193
+ * and emits richer per-violation diagnostics. The prefix list
194
+ * stays as the internal input of the still-published
195
+ * `classifyUi`. `DANGEROUS_PATTERNS` / `DangerousPattern` /
196
+ * `UiClass` / `classifyUi` are unchanged.
197
+ *
198
+ * ug1. **`@ggui-ai/ui-gen` superseded coding-agent generation
199
+ * island deleted** (no wire change — published npm surface +
200
+ * dist bytes). The pre-harness virtual-git orchestration
201
+ * (`coding-agent/{index,agent,planner,file-agent,boilerplate,
202
+ * prompts,trace,context}.ts`, `runCodingAgent` / `runPlanner` /
203
+ * `runFileAgent`), the legacy `apply_diff` unified-diff tool
204
+ * case + `diff-processor.ts` (reachable only from the island),
205
+ * the island-only `fullToolSchemas` / `initialToolSchemas` /
206
+ * `executeToolBatch` registries, the text-only
207
+ * `runEnforcedCodingLoop` / `buildFeedback` loop, and the
208
+ * legacy prompt constants (`LEAN_PROMPT`, `CODER_PROMPT`,
209
+ * `ENFORCED_CODER_PROMPT`, `SELF_CHECK_RULES`,
210
+ * `buildEnforcedCoderPrompt`, `injectDesignSpec`,
211
+ * `injectFeedback`, `CONTEXT_TOOL_NAMES`, `BUILD_TOOL_NAMES`)
212
+ * are gone — all superseded by `harness/coding/run-coding-turn`
213
+ * + `boilerplate/system-prompt`. The two stale tsup entries
214
+ * that kept shipping unroutable `dist/coding-agent/*` bytes
215
+ * after the rc13 subpath prune die with it. KEPT (live via
216
+ * `harness/coding/*`): `workspace.ts`, `tools.ts`, `types.ts`
217
+ * (pruned to its consumed members), `self-check.ts`,
218
+ * `tag-balance.ts`.
219
+ *
220
+ * ug2. **`@ggui-ai/ui-gen/harness/prompts` re-exports the
221
+ * canonical prompt-context builders** from `contract-context.ts`
222
+ * (the module the live `createUiGenerator` path uses) instead of
223
+ * carrying a hand-maintained twin that had silently drifted (no
224
+ * variance block, no stream `source.tool` annotation, hooks-only
225
+ * gadget teaching). One module now owns the LLM-visible strings,
226
+ * and the duplicate mutable `RenderingContext` in
227
+ * `harness/result-types` collapses to a re-export of the
228
+ * canonical readonly type. The LIVE generation path's emitted
229
+ * prompt is byte-identical (snapshot-proven); the multi-sdk
230
+ * benchmark's deep-import path now exercises production prompt
231
+ * content instead of the drifted fork.
232
+ *
233
+ * ug3. **`runTier0Checks` / `runTier0` (`@ggui-ai/ui-gen/check`)
234
+ * drop the never-read `compiledCode` positional parameter.**
235
+ * Compile failure has been signaled by `buildErrors` alone since
236
+ * the S6 tier-0 migration; the documented-but-ignored parameter
237
+ * was an unflagged contract gap on a published signature.
238
+ *
239
+ * ug4. **`provider-adapter-mock` leaves the published artifact**
240
+ * — relocated to `provider-adapter-mock.test-util.ts` (excluded
241
+ * from the tarball), its stale tsup entry deleted. rc13 already
242
+ * killed the `./provider-adapter-mock` subpath; the dist bytes
243
+ * had been shipping with no exports route to reach them.
244
+ *
245
+ * ug5. **`@ggui-ai/ui-gen` stops bundling provider SDKs**
246
+ * (packaging only): `@google/adk`, `@openai/agents`,
247
+ * `puppeteer-core` move devDependencies → optional
248
+ * peerDependencies + tsup externals. They are lazy
249
+ * `await import(...)`s in the Google/OpenAI adapters + visual
250
+ * evaluator, but as devDeps tsup inlined their full transitive
251
+ * trees into every entry chunk. Tarball: 84.7MB → 16.1MB
252
+ * unpacked (17.7MB → 4.0MB packed). Consumers using those
253
+ * adapters install the SDK themselves.
254
+ *
255
+ * ug6. **`./advanced` subpath actually builds** (packaging only):
256
+ * `src/advanced/index.ts` was never a tsup entry — the documented
257
+ * `@ggui-ai/ui-gen/advanced` exports-map target only resolved
258
+ * because a stale pre-tsup `dist/advanced/` orphan kept shipping,
259
+ * and the clean-build hygiene in this release exposed the dangling
260
+ * subpath. The entry is now registered (the DTS graph growth needs
261
+ * an 8GB heap cap on the build script).
262
+ *
263
+ * dg1. **`@ggui-ai/design` stops shipping Storybook stories**
264
+ * (packaging only): `files[]` negations + `tsconfig.build.json`
265
+ * excludes drop the 37 `src/*.stories.tsx` + their compiled dist
266
+ * output (209 pack entries, incl. the orphaned
267
+ * `dist/blueprints` / `dist/templates` story remnants of deleted
268
+ * src dirs); pack list 891 → 601 files.
269
+ *
270
+ * tw1. **`ai.ggui/render` slice deps single-sourced** (published
271
+ * npm surface, no wire change). `@ggui-ai/mcp-server-handlers`
272
+ * exports `RenderSliceMetaDeps` + `assembleRenderSliceBase`;
273
+ * `GguiRenderHandlerDeps` and `GguiUpdateHandlerDeps` now
274
+ * `extend` the shared interface instead of hand-mirroring
275
+ * `mintWsToken` / `runtimeUrl` / `themeId` / `themeMode` /
276
+ * `themeProvider`, and both handlers assemble the envelope base
277
+ * (runtimeUrl fallback, `token`→`wsToken` remap, layered theme
278
+ * resolution) through the one helper. DELETED with it: update's
279
+ * vestigial `streamWebSocketLocalTools` dep (declared + plumbed
280
+ * through `@ggui-ai/mcp-server`'s `UpdateDeps`, never read — the
281
+ * post-update slice is a deliberate props-only subset that never
282
+ * emitted the field; it remains mount-time bootstrap data owned
283
+ * by `ggui_render`).
284
+ *
285
+ * tw2. **`@ggui-ai/design` `ClickableProps.onClick` /
286
+ * `PressableProps.onPress` widen to
287
+ * `MouseEvent | KeyboardEvent`** (published type surface; runtime
288
+ * unchanged). Enter/Space keyboard activation always delivered a
289
+ * `KeyboardEvent` through a handler typed `MouseEvent` via a
290
+ * double cast — the union makes the published type honest and
291
+ * deletes both casts. Handlers annotating the event parameter as
292
+ * bare `MouseEvent` must widen (or drop) the annotation.
293
+ *
294
+ * tw3. **react ↔ react-native twin-parity gate extended** (test
295
+ * infrastructure; both SDK suites). The websocket/provider
296
+ * family (`WebSocketManager`, `EventBuffer`, `useWebSocket`,
297
+ * `GguiProvider` + the two websocket test files) joins a new
298
+ * `DOCUMENTED_DELTA_TWINS` structural gate (both copies exist,
299
+ * RN file-top "Platform delta" header required, exported
300
+ * surfaces equal modulo annotated platform-only exports), and
301
+ * the reserved-validators A2UI adapter trio
302
+ * (react / react-native / mcp-server) is pinned by a new
303
+ * comment-stripped `CODE_IDENTICAL_MIRRORS` gate. One behavioral
304
+ * convergence: the RN `useWebSocket.sendAction` now re-stamps
305
+ * `schemaVersion` via `makeActionEnvelope` exactly like the web
306
+ * hook (RN's docstring already claimed symmetry); RN gains the
307
+ * formerly web-only `useWebSocket` test suite.
308
+ *
309
+ * --------------------------------------------------------------------
310
+ * Blueprint provenance (`BlueprintSource` union + `PortableBlueprint`
311
+ * v2) + retired-surface cleanup (2026-06-11, BREAKING, pre-launch).
312
+ * One release, four strands: the bp* entries introduce provenance on
313
+ * the wire; the rc* entries delete vocabulary that had no emitter;
314
+ * the ab* entries close the action→consume loop on the WS transport
315
+ * and collapse the duplicated client wire-config pipeline; the hc*
316
+ * entries clean the helper-package published surfaces (dead exports,
317
+ * packaging, conformance execution, component re-homing — no wire
318
+ * change) plus the one additive ops-tool schema change (hc4) and one
319
+ * published-symbol rename (hc5); the cc1 entry restores the SPEC §7.3
320
+ * `ggui_consume` timeout bound on the wire; the pa1 entry de-vendors
321
+ * the CLI publish-auth surface (no wire change).
322
+ *
323
+ * bp1. **`BlueprintSource` discriminated union introduced**
324
+ * (`kind: 'llm' | 'user' | 'curated'`), replacing the flat
325
+ * provenance strings that previously lived on three separate
326
+ * seams (catalog entries, screen blueprints, the runtime cache
327
+ * registry). The `llm` arm REQUIRES `generator` + `model`; the
328
+ * legacy `heuristic` arm is deleted (zero mint sites repo-wide).
329
+ * `parseBlueprintSource` / `isBlueprintSource` validate at trust
330
+ * boundaries — legacy flat strings are rejected, never coerced.
331
+ *
332
+ * bp2. **`PortableBlueprint` v2**
333
+ * (`PORTABLE_BLUEPRINT_SCHEMA_VERSION = 2`): `source` and
334
+ * `generatorProtocolVersion` are REQUIRED (the latter's
335
+ * optional-for-back-compat shim dies). `fromPortableBlueprint`
336
+ * is the validating importer: v1 artifacts and era-mismatched
337
+ * records are REJECTED — a rejected seed entry is just a
338
+ * cold-gen; the fix is to re-export the pool, never to coerce.
339
+ * `toolIdentityCatalogHash` stays optional (an offline pool
340
+ * export has no runtime handshake catalog to hash).
341
+ *
342
+ * bp3. **Provenance is stamped at every mint site** and persisted
343
+ * on stored blueprint rows. Rows whose `source` does not parse
344
+ * are dropped at the load boundary, never coerced — blueprints
345
+ * are a cache (invalidation = regeneration, never data loss).
346
+ *
347
+ * bp4. **MVB `Blueprint.generator` → `Blueprint.source`** — the
348
+ * multi-variant blueprint record (and `blueprintSchema`) joins
349
+ * the single provenance vocabulary; the bare engine slug dies.
350
+ * `createdBy` is KEPT — a different axis (who initiated the
351
+ * mint): an `ggui_ops_generate_blueprint` row is
352
+ * `createdBy: 'operator'` AND `source.kind: 'llm'`. Ripples:
353
+ * `BlueprintMeta.generator: string` (required) →
354
+ * `BlueprintMeta.source?: BlueprintSource`, present iff
355
+ * `origin === 'cache'` (the matched row's stored provenance);
356
+ * absent on `agent`/`synth` — gen pending, nothing truthful to
357
+ * report (the old field stamped a static deployment slug even
358
+ * on cache hits, itself a fabrication). The
359
+ * `HandshakeDecisionAdapter.generatorSlug` seam retires with
360
+ * it. `ggui_ops_generate_blueprint` output `generator` →
361
+ * `source` (llm arm, from the engine's own metadata stamp).
362
+ * `ggui_ops_register_blueprint` input `generator` DELETED and
363
+ * output `generator` → `source` (always `{kind: 'user'}`) —
364
+ * the handler no longer fabricates a registry-default slug for
365
+ * hand-authored bytes. `ggui_ops_list_blueprints` keeps the
366
+ * `generator` filter, redefined to match `llm`-sourced rows
367
+ * only. New Zod mirrors exported: `blueprintSourceSchema` +
368
+ * per-arm `llm`/`user`/`curated` schemas.
369
+ *
370
+ * rc1. **`SubscribePayload.appId` required → optional (widening).**
371
+ * Absent appId no longer flows through raw: the server resolves
372
+ * the caller's identity-default app before any store work —
373
+ * token-bound appId, else the deployment's identity mapping
374
+ * (`defaultAppIdFromIdentity`, same rule as the MCP route), else
375
+ * the deployment default. A PRESENT appId must still match the
376
+ * GguiSession's bound app or subscribe fails `APP_MISMATCH`.
377
+ * Closes the absent-appId bifurcation (silent provisioning of a
378
+ * GguiSession row with `appId: undefined` on in-memory stores).
379
+ *
380
+ * rc2. **`CanvasLifecyclePayload` → `GguiLifecyclePayload`** (and
381
+ * `validateCanvasLifecyclePayload` → `validateGguiLifecyclePayload`).
382
+ * Internal type rename only — the `_ggui:lifecycle` reserved
383
+ * channel and its event vocabulary are unchanged on the wire.
384
+ * Canvas MODE is discarded (MCP Apps display modes are the
385
+ * model); the lifecycle channel is generation-progress, not
386
+ * canvas.
387
+ *
388
+ * rc3. **`unknown_generator` leaves `GadgetGateErrorCode`.** The
389
+ * throwing gate had no production call site (render's strict
390
+ * override path carries no generator field); the live surface is
391
+ * the forgiving `GENERATOR_UNKNOWN` handshake draft finding.
392
+ * Render-time generator selection is deferred to v2.
393
+ *
394
+ * rc4. **`'feedback'` leaves the WS message union** (both
395
+ * `WebSocketMessageType` and the `WebSocketMessage` variant,
396
+ * which carried a bare `JsonObject` payload). The frame was
397
+ * vocabulary with no emitter in either direction: no client ever
398
+ * constructed it, and the only server touch rejected it
399
+ * `NOT_IMPLEMENTED`. The iframe-runtime's inbound no-op stub
400
+ * handler (a shim for servers that never existed) is deleted
401
+ * with it. Conformance-kit-invisible (the kit never covered the
402
+ * frame). If love/dislike feedback ships later it re-enters with
403
+ * a real producer + consumer and a typed payload.
404
+ *
405
+ * rc5. **`SubscribePayload.bootstrap` dead duplicate deleted.** The
406
+ * R4 rename (r4.1 below) moved the live-channel auth credential
407
+ * to `wsToken`, but the retired slot survived on the published
408
+ * wire type as a "generic transport-bootstrap" judgment call with
409
+ * ZERO emitters or readers in either direction. The field, its
410
+ * boundary-test pin, and every docstring still teaching it as
411
+ * live are deleted; `wsToken` is the only subscribe credential.
412
+ *
413
+ * rc6. **The `_ggui:contract-error` surface is deleted entirely.**
414
+ * The channel was normative vocabulary with ZERO emitters
415
+ * anywhere (SPEC carried an explicit "no first-party emitter"
416
+ * gap since draft-2026-06-10); pre-launch, vocabulary nothing
417
+ * produces is dead surface. Gone: `CONTRACT_ERROR_CHANNEL`, the
418
+ * `ContractErrorPayload` type, the `ContractErrorCode` union,
419
+ * `makeContractErrorPayload`, `validateContractErrorPayload` +
420
+ * its `BUILTIN_RESERVED_VALIDATORS` entry, the iframe-runtime's
421
+ * `fromContractErrorPayload` parser + the `ProtocolError`
422
+ * `'contract'` variant, the conformance kit's authored
423
+ * `ContractErrorCode` mirror, and SPEC §4.4's payload section +
424
+ * §5.5.3's reserved-MAY dual-emission path. The reserved
425
+ * `_ggui:` NAMESPACE policy survives unchanged (agents and
426
+ * renderers MUST NOT author `_ggui:*` deliveries — SPEC §4.4 is
427
+ * now that authority section); `_ggui:lifecycle` remains the
428
+ * protocol-owned built-in-validated reserved channel. Codes the
429
+ * union once named keep living on their REAL surfaces: WS error
430
+ * frames (`SESSION_NOT_FOUND`, `AUTH_REJECTED`,
431
+ * `CONTRACT_VIOLATION`), tool `structuredContent` rejections
432
+ * (`INVALID_ACTION_KIND`, `PIPE_NOT_FOUND`, `CONTEXT_TOO_LARGE`),
433
+ * and push-time schema-compat rejection (`SCHEMA_MISMATCH_ERROR`).
434
+ * `sanitizeCausedBy` survives — its consumer is the
435
+ * `channel_error` frame's `details` diagnostic, not this payload.
436
+ *
437
+ * rc7. **`'stream'` / `'progress'` / `'agent-msg'` leave the WS
438
+ * message union** (both `WebSocketMessageType` and the
439
+ * `WebSocketMessage` variants). Frame census of every
440
+ * first-party server send site: only `data` / `ack` / `render` /
441
+ * `props_update` / `pong` / `error` / `drain_ack` / `channel_*`
442
+ * are ever emitted — the three frames were pure vocabulary, and
443
+ * client-visible generation progress already flows as
444
+ * `{type:'data'}` envelopes on the reserved `_ggui:lifecycle`
445
+ * channel (SPEC §4.5). Deleted with the members: the
446
+ * `StreamPayload` / `ProgressPayload` / `AgentMsgPayload` /
447
+ * `AgentMsgType` payload types (`ProgressStep` survived this
448
+ * purge as `InternalProgressPayload`'s vocabulary — circular;
449
+ * dv3 above deletes both), the
450
+ * `BRIDGE_EVENTS.AGENT_STREAM` / `AGENT_MSG` / `AGENT_LOGS`
451
+ * CustomEvent names + every dispatch site, the SDKs'
452
+ * `GguiRenderProps.onStream` / `onProgress` dead callbacks (and
453
+ * the client-fabricated synthetic matchType "progress" event),
454
+ * and the RN SDK's listener-with-no-emitter hook
455
+ * `useGenerationProgress`. SPEC §2.8 (NDA) + §8.2 now teach the
456
+ * lifecycle channel as the one progress mechanism. The
457
+ * conformance kit's stream-update matcher behavior is unchanged
458
+ * (it only ever accepted `{type:'data'}`); its docs/tests now
459
+ * pin the text-chunk frame as retired rather than "a different
460
+ * wire type".
461
+ *
462
+ * rc8. **Client-side data-binding vocabulary leaves the protocol**
463
+ * (`types/data-bindings.ts`: `ClientToolName`, `ClientToolConfig`,
464
+ * `DataBindings`, `TypedToolConfig` + the per-tool config types).
465
+ * No wire envelope ever carried these; the only consumers were
466
+ * the two SDKs' orphaned client-side tools subsystems
467
+ * (registry / hooks / resolver / built-ins, the `/query` TanStack
468
+ * integration, and the `/testing` mock-tools helpers), deleted in
469
+ * the same slice (`@ggui-ai/react` + `@ggui-ai/react-native` lose
470
+ * the `tools`, `/query`, and `/testing` surfaces and the dead
471
+ * `queryClient` / `sessionId` provider plumbing). A future
472
+ * native-controller story reintroduces a resolver WITH a real
473
+ * producer, per the protocol-and-contract bar.
474
+ *
475
+ * rc9. **MCP Apps thin shell emits the canonical
476
+ * `MALFORMED_BOOTSTRAP` reason.** The `ui://ggui/render` shell's
477
+ * `ggui:bootstrap-failed` postMessage carried the out-of-
478
+ * vocabulary `BOOTSTRAP_MALFORMED` (transposed words) — outside
479
+ * the SPEC §5.5.2 `BootstrapFailureReason` union, so spec-
480
+ * conformant hosts switch-casing on `reason` misclassified the
481
+ * known failure as unknown. The emit and its docstring now use
482
+ * the canonical member. (The CSP script hash is derived from the
483
+ * shell body at module load, so it tracks automatically.)
484
+ *
485
+ * rc10. **`EVENT_NOT_ALLOWED` WS error code deleted** along with the
486
+ * no-op `assertEventAllowed` stub and the never-thrown
487
+ * `EventNotAllowedError` class in `@ggui-ai/mcp-server`. The
488
+ * pre-Phase-B `subscription.events` allowlist lost its wire
489
+ * shape in the session-stack collapse; the surviving ceremony
490
+ * was a defined failure mode with no reachable emitter. Inbound
491
+ * actions are gated by `assertActionContract` alone; docstrings
492
+ * across protocol / handlers / SDKs now say so. Per-render event
493
+ * policy, if wanted, re-enters as a designed slice with a real
494
+ * wire shape.
495
+ *
496
+ * rc11. **`BOOTSTRAP_EXPIRED` guidance message names the live
497
+ * refresh tool.** The live channel's expired-credential error
498
+ * message (and five server docstrings + the cloud e2e G14 spec)
499
+ * still instructed callers to invoke the retired
500
+ * `ggui_runtime_refresh_bootstrap` name (renamed in r4.1). All
501
+ * now name `ggui_runtime_refresh_ws_token`; a grep-based
502
+ * regression test in `@ggui-ai/mcp-server` locks the retired
503
+ * name out of the package source.
504
+ *
505
+ * rc12. **`UI_GEN_VERSION` deleted from `@ggui-ai/ui-gen`.** The
506
+ * published constant claimed to be "kept in sync with
507
+ * `package.json`" while shipping a stale value, and had zero
508
+ * consumers repo-wide — a published-API lie with no reader. No
509
+ * replacement; consumers that need the package version read it
510
+ * from the package manifest.
511
+ *
512
+ * rc13. **`@ggui-ai/ui-gen` export map pruned 55 → 37 subpaths.**
513
+ * Fifteen never-imported subpath entries deleted
514
+ * (`./evaluation/mcp-server`, `./evaluation/prompts`,
515
+ * `./adapters/provider-router`, `./adapters/{claude,openai,
516
+ * google}/raw`, `./coding-agent`, `./coding-agent/boilerplate`,
517
+ * `./tools`, `./provider-adapter-mock`, `./compile`,
518
+ * `./validation/ui-compiler`, `./design-system-docs`,
519
+ * `./tools/get-wire`, `./tools/render-check`) plus the three
520
+ * redundant `/index` duplicate aliases (`./harness/index`,
521
+ * `./adapters/index`, `./evaluation/axis-checks/index` — the six
522
+ * monorepo import sites retargeted to the bare forms). The
523
+ * underlying modules stay (internal relative imports); only the
524
+ * dead published surface dies. `./blueprint-hint`, `./strategy`,
525
+ * `./user-request` were initially KEPT pending the
526
+ * predefined-match pipeline existence decision; that decision
527
+ * landed within this same release (wave-2 approved forks): the
528
+ * predefined-match pipeline was deleted and all three subpaths
529
+ * were removed with it.
530
+ *
531
+ * ab1. **WS `data:submit` action ingress now feeds the consume
532
+ * pipe.** The live channel's `handleInboundAction` dual-writes
533
+ * every accepted `data:submit` envelope: the retained
534
+ * `user.submitted` ledger event (ack `payload.sequence` source —
535
+ * unchanged) AND a canonical consume entry
536
+ * (`{intent, actionData, uiContext, actionId, firedAt}`, the
537
+ * SAME shape `ggui_runtime_submit_action`'s dispatch branch
538
+ * appends) on the sessionId-keyed pending-events pipe — so
539
+ * `ggui_consume` drains WS-originated gestures identically to
540
+ * tools/call-relayed ones. `uiContext` is `{}` on this transport
541
+ * (WS clients mirror no contextSpec snapshot); `actionId` is a
542
+ * server-minted 8-hex correlation id; `firedAt` is server clock.
543
+ * New optional `GguiSessionChannelOptions.pendingEventConsumer`
544
+ * seam (`@ggui-ai/mcp-server`); `createGguiServer` threads its
545
+ * shared pipe instance whenever it composed the default handler
546
+ * set. Pipe-append failure degrades to ledger-only with a
547
+ * `render_channel_consume_append_failed` warn — ack semantics
548
+ * unchanged. This makes the long-documented SDK promise ("the
549
+ * agent receives actions via `ggui_consume`") TRUE on the WS
550
+ * transport; the `tool` hint is clarified as LEDGER-only
551
+ * vocabulary (operator surfaces) — consume entries carry no tool
552
+ * slot on either transport (SPEC §nextStep routing + walkthrough
553
+ * updated to the canonical drained shape).
554
+ *
555
+ * ab2. **Client wire-config pipeline unified in `@ggui-ai/wire`.**
556
+ * New exports `buildWireConfig` (the ONE envelope-build →
557
+ * validate → emit dispatch pipeline + bus-backed subscribe) and
558
+ * `StreamBus` (+ `RESERVED_CHANNEL_REPLAY_MAX`), hoisted from
559
+ * `@ggui-ai/iframe-runtime`. `buildRootWireConfig` becomes an
560
+ * iframe-side adapter injecting its CSP-precompiled validator,
561
+ * ProtocolError dual-emission, and the tools/call-vs-WS
562
+ * transport seam; `@ggui-ai/react`'s `<GguiRender>` builds its
563
+ * `WireConfig` through the same shared pipeline (transport = WS
564
+ * `action` frame, violations → `onError`, `clientSeq` shared
565
+ * with `api.action`). `<GguiRender>` inbound `data` frames now
566
+ * land on a per-render `StreamBus` with the bounded reserved-
567
+ * channel replay ring — `_ggui:preview` frames arriving between
568
+ * the subscribe ack and the provisional renderer's mount replay
569
+ * to the late subscriber instead of dropping (behavior now
570
+ * identical across both first-party renderers, per MCP Apps
571
+ * Compliance). `useChannelStream` subscribes via the new
572
+ * internal `StreamBusContext` instead of `window` CustomEvents;
573
+ * the `BRIDGE_EVENTS.AGENT_DATA` window dispatch survives as a
574
+ * one-way host-shell broadcast. React-Native twins unchanged —
575
+ * porting the shared builder + bus to RN is the pending RN
576
+ * WireProvider slice.
577
+ *
578
+ * hc1. **`@ggui-ai/mcp-server-handlers` dead public surface deleted
579
+ * (no wire change).** `UpdateUnsupportedError` (error class with
580
+ * zero throw sites; its `update_unsupported` code appeared in no
581
+ * spec or transport mapping); the empty `./contract-tests`
582
+ * subpath (an `export {}` module promising a
583
+ * `runRenderHandlerContract` battery that never landed) + the
584
+ * vestigial `peerDependenciesMeta.vitest`; the retired
585
+ * intent-keyed cache tail (`generationCacheKey`,
586
+ * `DEFAULT_CACHE_SIMILARITY_THRESHOLD`,
587
+ * `GenerationCacheDeps.similarityThreshold` — zero readers). The
588
+ * live-LLM dev probe no longer compiles into the published dist
589
+ * (tsconfig.build exclude).
590
+ *
591
+ * hc2. **`@ggui-ai/mcp-server-core` contract-tests become executed
592
+ * truth.** `gguiSessionStoreContract` +
593
+ * `runGguiSessionStoreConformance` now RUN against both shipped
594
+ * stores (in-memory + sqlite, temp-file db) from the stores' own
595
+ * test files; `vitest` is declared as an optional peer dependency
596
+ * (the `./contract-tests` subpath imports it explicitly — the
597
+ * prior Jest-globals claim was false). Sqlite row reads narrow
598
+ * through validating guards instead of `as Row` casts (operator-
599
+ * mutable file = trust boundary); phantom impl names
600
+ * (PostgresGguiSessionStore, S3VectorsStore, FileVectorStore)
601
+ * leave the seam docstrings; ws-token prose names the real
602
+ * `wsToken` slice field and the G14 multi-use-within-TTL posture.
603
+ *
604
+ * hc3. **`startSandboxProxyServer` re-homed to
605
+ * `@ggui-ai/agent-server`** (from `@ggui-ai/dev-stack`; module +
606
+ * test suite moved verbatim, exported from the agent-server
607
+ * barrel). agent-server drops its dev-stack dependency, so a
608
+ * published agent install no longer eagerly pulls the dev-stack
609
+ * toolchain (esbuild, chokidar). `@ggui-ai/dev-stack` also drops
610
+ * its zero-consumer discovery re-export block — the canonical
611
+ * home stays `@ggui-ai/project-config/node`. No compat
612
+ * re-exports (pre-launch).
613
+ *
614
+ * hc4. **`ggui_ops_create_app` output schema gains optional
615
+ * `connectUrl`** (per-app MCP connect URL; emitted only by
616
+ * deployments exposing per-app ingress — the default OSS
617
+ * composition has no ingress knowledge and never sets it). The
618
+ * cloud pod's variant converges onto the full OSS output shape
619
+ * (`{appId, displayName, systemPrompt?, createdAt, updatedAt,
620
+ * connectUrl?}`), and the pod tool-registry parity gate now pins
621
+ * OUTPUT-schema identity (alongside input) for every shared wire
622
+ * name, so host output drift is structurally caught. Additive —
623
+ * existing callers unaffected.
624
+ *
625
+ * hc5. **`@ggui-ai/negotiator` `validateContractStructure` →
626
+ * `validateContractRedundancy`** (TS-symbol rename, no wire
627
+ * change). The name collided with `@ggui-ai/protocol`'s normative
628
+ * structural validator of the same name while carrying different
629
+ * semantics (advisory warn-only redundant-action heuristic vs
630
+ * `ContractViolation` list). Protocol remains the sole owner of
631
+ * the `validateContractStructure` name; the negotiator export now
632
+ * says what it detects. No compat alias (pre-launch).
633
+ *
634
+ * cc1. **`ggui_consume.timeout` bound restored to SPEC §7.3
635
+ * `[0, 25]`.** The shipped handler had drifted to a schema max of
636
+ * 600s with a silent server-side truncation to a 120s default cap
637
+ * (and a `maxTimeoutSeconds` deployment override). All three die:
638
+ * the input schema now enforces integer `[0, 25]`, out-of-range
639
+ * values reject `INVALID_PARAMS` (-32602) at the tool-argument
640
+ * validation layer instead of being silently truncated, and the
641
+ * override knob is deleted (zero consumers; the bound is
642
+ * normative). SPEC §7.3's output section is simultaneously
643
+ * rewritten to the REAL drained-row shape — `ConsumeEventEntry`
644
+ * `{type:'action', sessionId, intent, actionData, uiContext,
645
+ * actionId, firedAt}` (+ the optional `client.hostContext` echo)
646
+ * — replacing the stale `{events: ActionEnvelope[]}` claim; the
647
+ * dedup guidance moves from `(sessionId, clientSeq)` (an ingress
648
+ * key) to `(sessionId, actionId)`. Agents that long-polled with
649
+ * `timeout > 25` MUST re-call `ggui_consume` in a loop instead.
650
+ *
651
+ * pa1. **CLI publish-auth de-vendored (no wire change).** The
652
+ * `ggui {gadget,blueprint} publish` / `ggui keys register`
653
+ * default auth path no longer talks to an identity provider from
654
+ * the CLI: the direct-IdP `USER_PASSWORD_AUTH` + refresh flows,
655
+ * the `@aws-sdk/client-cognito-identity-provider` dependency (the
656
+ * only AWS SDK in any published `@ggui-ai/*` package), the
657
+ * `GGUI_REGISTRY_COGNITO_POOL_ID` /
658
+ * `GGUI_REGISTRY_COGNITO_APP_CLIENT_ID` env surface, and the
659
+ * per-registry `~/.ggui/auth/<host>/token.json` cache are all
660
+ * deleted. The default credential is the stored `ggui login`
661
+ * session (`~/.ggui/auth.json`), refreshed via
662
+ * `POST /v1/auth/refresh`; `--auth=bearer` is unchanged. Auth
663
+ * errors are rewritten vendor-neutrally, and an HTTP 401 from
664
+ * the registry surfaces as `auth_failed` with a credential-
665
+ * kind-specific diagnosis. (The hosted-registry server side
666
+ * landed 2026-06-11: the write routes' gateway authorizer
667
+ * validates `cli_at_*` session bearers, so the default auth
668
+ * path works end-to-end against `registry.ggui.ai`.)
669
+ *
670
+ * --------------------------------------------------------------------
671
+ * Synchronous wired-action dispatch retired — agent-routed consume
672
+ * loop is the single action model (2026-06-10, BREAKING, pre-launch):
673
+ *
674
+ * wa1. **`StreamChannelEntry.tool` (refresh hint) deleted.** The
675
+ * per-channel "refresh this channel from tool X after an action"
676
+ * declaration is gone from the type and from
677
+ * `streamChannelEntrySchema`. The entry schema is `.strict()`,
678
+ * so a contract carrying a stray `tool` key now fails
679
+ * `CTR_SHAPE_UNRECOGNIZED_KEYS` at lint time. The channel data
680
+ * feed `StreamChannelEntry.source` (`{tool, args?}`) is a
681
+ * DIFFERENT axis and survives unchanged.
682
+ * `ResolvedStreamChannel` drops the matching passthrough.
683
+ *
684
+ * wa2. **`ContractErrorCode` narrows.** `TOOL_NOT_FOUND`,
685
+ * `TOOL_THREW`, and `TOOL_TIMEOUT` leave the named union — their
686
+ * only emitters were the synchronous dispatch routers. The union
687
+ * stays extensibly-closed (`(string & {})` branch);
688
+ * `SCHEMA_VIOLATION` survives as the generic
689
+ * value-violates-contract-declared-schema code.
690
+ *
691
+ * wa3. **`ContractErrorPayload` narrows to
692
+ * `{toolName, error, timestamp, schemaVersion?}`.**
693
+ * `actionName` and `sourceAction` (the
694
+ * `'wired-action' | 'refresh-stream'` dispatch provenance) are
695
+ * deleted along with their `validateContractErrorPayload` arms
696
+ * and the `makeContractErrorPayload` builder inputs. The
697
+ * `_ggui:contract-error` reserved channel, the payload validator,
698
+ * and `BUILTIN_RESERVED_VALIDATORS` all remain defined vocabulary.
699
+ *
700
+ * wa4. **`actionNextSteps` deleted from the `ai.ggui/render`
701
+ * slice.** The per-action nextStep map (SPEC name
702
+ * `wiredActionTools`) existed to gate the client-side direct
703
+ * `tools/call` arm, which is retired; the agent hint now derives
704
+ * server-side from the render's `actionSpec[name].nextStep` when
705
+ * the consume event is built. `RefreshInput` /
706
+ * `EMPTY_REFRESH_INPUT` (router-only refresh-tool input types)
707
+ * are deleted with the dispatch path.
708
+ *
709
+ * --------------------------------------------------------------------
710
+ * `AgentToolEntry` restructured — `{serverInfo?, toolInfo, usage, example}`
711
+ * (2026-06-02, BREAKING, pre-launch):
712
+ *
713
+ * z1. **`AgentToolEntry` fields regrouped.** The flat per-tool entry
714
+ * (`{description?, usage?, inputSchema?, outputSchema?, example?}`)
715
+ * is restructured to separate MCP-native descriptor from ggui
716
+ * authoring metadata:
717
+ * - NEW `serverInfo?: {name, version?}` — owning MCP server
718
+ * identity from the `initialize` handshake. OPTIONAL: populated
719
+ * by the agent-server catalog-builder / a host that exposes it;
720
+ * absent for hand-authored contracts. `(server, toolName)` is
721
+ * the canonical cross-framework identity; `serverInfo.version`
722
+ * is metadata, NOT identity.
723
+ * - NEW `toolInfo: {inputSchema, description?, outputSchema?}` —
724
+ * the MCP `tools/list` descriptor echoed verbatim (minus
725
+ * `name`, which is the catalog key). `inputSchema` is now
726
+ * REQUIRED (every MCP tool has one); the former top-level
727
+ * `description` / `inputSchema` / `outputSchema` MOVED here.
728
+ * - `usage` + `example` stay on the entry (the ggui authoring
729
+ * layer, not MCP).
730
+ * Entries remain keyed by bare `toolName` in
731
+ * `agentCapabilities.tools` (unchanged). The canonical contract
732
+ * hash strips ONLY `serverInfo.version` (metadata, not identity);
733
+ * `serverInfo.name` IS identity — it disambiguates two servers that
734
+ * expose a byte-identical bare tool name (e.g. Todoist vs Google-Tasks
735
+ * `todo_add`) — and remains in the hash, alongside
736
+ * `toolInfo.inputSchema` / `toolInfo.outputSchema`. (Refined
737
+ * 2026-06-03: name promoted to identity; `serverInfo.version`
738
+ * relaxed to optional.)
739
+ * Pre-launch no-backcompat: every contract author / catalog-builder
740
+ * that emitted the flat shape MUST migrate to the nested
741
+ * `toolInfo`. `agentToolEntrySchema` is `.strict()` on both the
742
+ * outer entry and the inner `toolInfo` / `serverInfo` / `example`
743
+ * objects.
744
+ *
745
+ * --------------------------------------------------------------------
9
746
  * R4 — auth-credential `bootstrap` renamed to `wsToken`; aggregate
10
747
  * polling endpoint deleted; console session-meta route renamed
11
748
  * (BREAKING, pre-launch):
@@ -16,7 +753,7 @@
16
753
  * on the wire was the credential, so the term lost its meaning.
17
754
  * Renamed everywhere internally to `wsToken` (sharper, symmetric
18
755
  * with `wsUrl`):
19
- * - {@link SubscribePayload.bootstrap} → `SubscribePayload.wsToken`
756
+ * - `SubscribePayload.bootstrap` → `SubscribePayload.wsToken`
20
757
  * - `?bootstrap=<token>` WS upgrade query → `?wsToken=<token>`
21
758
  * - `McpAppAiGguiSessionMeta.token` slice field → `wsToken`
22
759
  * - `ChannelClientBootstrap.token` → `wsToken`
@@ -392,8 +1129,9 @@
392
1129
  * `assertContractSchemasValid(contract)` walks the six inner
393
1130
  * JSON Schema fields (`propsSpec.properties[*].schema`,
394
1131
  * `actionSpec[*].schema`, `streamSpec[*].schema`,
395
- * `contextSpec[*].schema`, `agentCapabilities.tools[*].inputSchema`,
396
- * `agentCapabilities.tools[*].outputSchema`) and runs
1132
+ * `contextSpec[*].schema`,
1133
+ * `agentCapabilities.tools[*].toolInfo.inputSchema`,
1134
+ * `agentCapabilities.tools[*].toolInfo.outputSchema`) and runs
397
1135
  * `compileForValidation()` on each. Ajv strict mode throws at
398
1136
  * compile-time on malformed schemas (unknown keywords, properties
399
1137
  * values that aren't schemas, array schemas with non-schema
@@ -434,6 +1172,8 @@
434
1172
  * - `handshakeOutputSchema`: dropped `reason`, `target`,
435
1173
  * `alternatives`, `contractHash`, `serverCapabilities`.
436
1174
  * `serverCapabilities` flows via `_meta.ggui.bootstrap` instead.
1175
+ * (`reason` was later reinstated as an optional ≤280-char wire
1176
+ * field — see the o-block below.)
437
1177
  * - `pushOutputSchema`: dropped `sessionId`, `shortCode`,
438
1178
  * `codeReady`, `handshakeId`, `decision`, `contract`,
439
1179
  * `interaction`, `contractHash`, `cache.*`, `codeUrl`,
@@ -1019,9 +1759,10 @@
1019
1759
  * 00000000. Protocol-level schema-compat invariant in
1020
1760
  * `@ggui-ai/protocol/validation/schema-compat-invariants`:
1021
1761
  * `CTR_SCHEMA_INCOMPAT` validates `actionSpec[*].schema` is a
1022
- * subset of the referenced `agentCapabilities.tools[*].inputSchema`,
1762
+ * subset of the referenced
1763
+ * `agentCapabilities.tools[*].toolInfo.inputSchema`,
1023
1764
  * and `streamSpec[*].schema` is a superset of the referenced
1024
- * `agentCapabilities.tools[*].outputSchema`. Compares against the
1765
+ * `agentCapabilities.tools[*].toolInfo.outputSchema`. Compares against the
1025
1766
  * contract's OWN agentCapabilities catalog (no runtime tool registry,
1026
1767
  * no zod conversion) — author-visible bug class. Distinct from
1027
1768
  * and complementary to the server-level F4 check
@@ -1546,7 +2287,13 @@
1546
2287
  * `GGUI_SESSION_UI_META` → `GGUI_RENDER_UI_META`. Error codes
1547
2288
  * renamed too: `SESSION_NOT_FOUND` → `RENDER_NOT_FOUND`;
1548
2289
  * `STACK_ITEM_NOT_FOUND` → `RENDER_NOT_FOUND`;
1549
- * `CONCURRENT_SESSION_LIMIT` → `CONCURRENT_RENDER_LIMIT`.
2290
+ * `CONCURRENT_SESSION_LIMIT` → `CONCURRENT_RENDER_LIMIT`. The
2291
+ * live-channel wire-error codes were renamed in the same arc:
2292
+ * `SESSION_MISMATCH` → `RENDER_MISMATCH`;
2293
+ * `BOOTSTRAP_SESSION_MISMATCH` → `BOOTSTRAP_RENDER_MISMATCH`;
2294
+ * `DEVTOOL_COOKIE_SESSION_MISMATCH` →
2295
+ * `DEVTOOL_COOKIE_RENDER_MISMATCH`;
2296
+ * `SESSION_CREATE_FAILED` → `RENDER_CREATE_FAILED`.
1550
2297
  *
1551
2298
  * b6. **Retired wire-side payloads deleted (no shims).** `PushPayload`,
1552
2299
  * `PopPayload`, `GetStackPayload`, `SessionPayload`,
@@ -1592,12 +2339,39 @@
1592
2339
  * strings on write; legacy numeric rows are coerced on read.
1593
2340
  * Cross-deployment uniformity: the same field type ships from
1594
2341
  * polling HTTP endpoint, WS replay frame, and store-side `observe()`.
2342
+ *
2343
+ * b9. **GguiSession reintroduced as the render-OBJECT noun
2344
+ * (2026-06-05).** The flatten arc named the rendered object
2345
+ * `Render`; this restores `GguiSession` as that noun while `render`
2346
+ * stays the VERB. Source-breaking TS-symbol renames for
2347
+ * `@ggui-ai/*` importers: `Render`→`GguiSession` (+ `ComponentRender`,
2348
+ * `SystemRender`, `McpAppsRender`, `RenderBase`, `RenderStatus`),
2349
+ * `RenderEvent`→`GguiSessionEvent`, `RenderStore`→`GguiSessionStore`
2350
+ * (+ every impl), `RenderStreamBuffer`, `RenderNotFoundError`,
2351
+ * `RenderChannelServer`, `RenderApi`/`RenderInfo`/`RenderRef`,
2352
+ * `RenderRenderer`→`GguiSessionRenderer`. WIRE-breaking renames: the
2353
+ * canonical id `renderId`→`sessionId` (every payload/param/envelope/
2354
+ * URL/_meta field); tools `ggui_list_renders`→`ggui_list_sessions`
2355
+ * and `ggui_get_render`→`ggui_get_session`; error codes
2356
+ * `RENDER_NOT_FOUND`/`RENDER_MISMATCH`/`RENDER_CREATE_FAILED`/
2357
+ * `CONCURRENT_RENDER_LIMIT`→`SESSION_*` (numeric values unchanged);
2358
+ * REST routes `/api/renders`, `/admin/renders`, `/console/renders`
2359
+ * → `/…/sessions`; DOM `data-ggui-render-*`→`data-ggui-session-*`;
2360
+ * ack `renderToken`→`sessionToken`. The VERB `render` is KEPT
2361
+ * verbatim: the `ggui_render` (+ `ggui_render_blueprint`) tool,
2362
+ * `renderInputSchema`/`renderOutputSchema` + `GguiRenderInput`/
2363
+ * `GguiRenderOutput`, the `*Renderer` actor components, the
2364
+ * `ai.ggui/render` _meta slice key, the `ui://ggui/render` resource
2365
+ * URI (only its `{sessionId}` path segment follows the id rename),
2366
+ * and the WS frame discriminators `'render'` / `'render_event'`.
2367
+ * OSS-first; the cloud pod follows at its next image build. See
2368
+ * `docs/protocol/migrations/2026-06-05-gguisession-reintroduction.md`.
1595
2369
  */
1596
- export declare const PROTOCOL_VERSION = "draft-2026-05-28";
2370
+ export declare const PROTOCOL_VERSION = "draft-2026-06-12";
1597
2371
  /**
1598
2372
  * Schema version stamped onto wire envelopes that opt into the
1599
2373
  * `schemaVersion` forward-compat field (see {@link ActionEnvelope},
1600
- * {@link StreamEnvelope}, {@link ContractErrorPayload}).
2374
+ * {@link StreamEnvelope}).
1601
2375
  *
1602
2376
  * Pre-launch semantics (current): producers SHOULD stamp; consumers
1603
2377
  * SHOULD NOT reject on mismatch — the field is advisory and lets old
@@ -1614,7 +2388,7 @@ export declare const PROTOCOL_VERSION = "draft-2026-05-28";
1614
2388
  * consumers can reference schema-versioning specifically without
1615
2389
  * coupling to the broader cache-invalidation constant.
1616
2390
  */
1617
- export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-05-28";
2391
+ export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-06-12";
1618
2392
  /**
1619
2393
  * Canonical live-channel error code emitted when a peer's declared
1620
2394
  * {@link SubscribePayload.supportedVersions} /