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