@ggui-ai/protocol 0.14.0 → 0.16.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.
- package/dist/envelopes/render-refusal.d.ts +49 -0
- package/dist/envelopes/render-refusal.d.ts.map +1 -0
- package/dist/envelopes/render-refusal.js +12 -0
- package/dist/errors/domain-error.d.ts +70 -0
- package/dist/errors/domain-error.d.ts.map +1 -0
- package/dist/errors/domain-error.js +118 -0
- package/dist/gadgets/resolve-app-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.d.ts +2 -2
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +69 -63
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/integrations/mcp-apps.d.ts +35 -9
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +13 -13
- package/dist/integrations/overlay-hash.d.ts +19 -0
- package/dist/integrations/overlay-hash.d.ts.map +1 -0
- package/dist/integrations/overlay-hash.js +29 -0
- package/dist/integrations/theme-binding.d.ts +14 -12
- package/dist/integrations/theme-binding.d.ts.map +1 -1
- package/dist/integrations/theme-binding.js +10 -6
- package/dist/registry/blueprint-key.d.ts.map +1 -1
- package/dist/registry/blueprint-key.js +4 -3
- package/dist/schemas/app-theme.d.ts +46 -10
- package/dist/schemas/app-theme.d.ts.map +1 -1
- package/dist/schemas/app-theme.js +108 -40
- package/dist/schemas/blueprint.d.ts +4 -3
- package/dist/schemas/blueprint.d.ts.map +1 -1
- package/dist/schemas/blueprint.js +15 -3
- package/dist/schemas/data-contract.d.ts +11 -31
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +5 -28
- package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
- package/dist/schemas/handshake-suggestion.js +8 -1
- package/dist/schemas/interface-context.d.ts +44 -0
- package/dist/schemas/interface-context.d.ts.map +1 -0
- package/dist/schemas/interface-context.js +22 -0
- package/dist/schemas/invoke.d.ts +3 -3
- package/dist/schemas/invoke.js +1 -1
- package/dist/schemas/mcp.d.ts +246 -111
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +149 -42
- package/dist/schemas/ops-blueprint.d.ts +4 -4
- package/dist/schemas/ops-blueprint.d.ts.map +1 -1
- package/dist/schemas/ops-blueprint.js +13 -8
- package/dist/schemas/public-env-key.d.ts +26 -0
- package/dist/schemas/public-env-key.d.ts.map +1 -0
- package/dist/schemas/public-env-key.js +25 -0
- package/dist/schemas/render-input-envelope.d.ts +2 -2
- package/dist/schemas/render-input-envelope.js +1 -1
- package/dist/schemas/runtime-telemetry-limits.d.ts +11 -0
- package/dist/schemas/runtime-telemetry-limits.d.ts.map +1 -0
- package/dist/schemas/runtime-telemetry-limits.js +10 -0
- package/dist/transport/websocket.d.ts +5 -5
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/blueprint-source.d.ts +27 -7
- package/dist/types/blueprint-source.d.ts.map +1 -1
- package/dist/types/blueprint-source.js +19 -3
- package/dist/types/blueprint.d.ts +2 -2
- package/dist/types/blueprint.d.ts.map +1 -1
- package/dist/types/contract-inference.d.ts +1 -1
- package/dist/types/data-contract.d.ts +3 -3
- package/dist/types/domain-error-codes.d.ts +167 -0
- package/dist/types/domain-error-codes.d.ts.map +1 -0
- package/dist/types/domain-error-codes.js +170 -0
- package/dist/types/events.d.ts +1 -1
- package/dist/types/ggui-session-event.d.ts +2 -2
- package/dist/types/handshake-suggestion.d.ts +2 -2
- package/dist/types/host-context.d.ts +3 -3
- package/dist/types/interface-context.d.ts +1 -1
- package/dist/types/invoke.d.ts +1 -1
- package/dist/types/lifecycle.d.ts +1 -1
- package/dist/types/live-channel.d.ts +3 -3
- package/dist/types/llm-route.d.ts +59 -2
- package/dist/types/llm-route.d.ts.map +1 -1
- package/dist/types/llm-route.js +62 -16
- package/dist/types/llm.d.ts +22 -2
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +29 -2
- package/dist/types/mcp.d.ts +49 -100
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +28 -9
- package/dist/types/refusal-codes.d.ts +54 -95
- package/dist/types/refusal-codes.d.ts.map +1 -1
- package/dist/types/refusal-codes.js +67 -105
- package/dist/types/render.d.ts +12 -11
- package/dist/types/render.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +1 -1
- package/dist/validation/ajv-runtime.d.ts +2 -2
- package/dist/validation/contract-validator.d.ts +14 -8
- package/dist/validation/contract-validator.d.ts.map +1 -1
- package/dist/validation/contract-validator.js +12 -4
- package/dist/validation/cross-references.d.ts +2 -2
- package/dist/validation/hygiene-rules.d.ts +1 -1
- package/dist/validation/lint-contract.d.ts +2 -2
- package/dist/validation/lint-contract.d.ts.map +1 -1
- package/dist/validation/lint-contract.js +6 -4
- package/dist/validation/name-invariants.d.ts +2 -2
- package/dist/validation/reserved-channels.d.ts +1 -1
- package/dist/validation/schema-compat-invariants.d.ts +2 -2
- package/dist/validation/schema-meta-validation.d.ts +1 -1
- package/dist/validation/schema-subset.d.ts +3 -3
- package/dist/version.d.ts +485 -12
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +484 -11
- package/dist/wire.d.ts +45 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +44 -0
- package/package.json +7 -1
- package/dist/envelope-adapters.d.ts +0 -25
- package/dist/envelope-adapters.d.ts.map +0 -1
- package/dist/envelope-adapters.js +0 -14
package/dist/version.js
CHANGED
|
@@ -6,6 +6,412 @@
|
|
|
6
6
|
* schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
|
|
7
7
|
*
|
|
8
8
|
* --------------------------------------------------------------------
|
|
9
|
+
* Theming revision — the overlay is the projection, the host owns runtime
|
|
10
|
+
* mode (2026-09-10, ggui#987 — **BREAKING on the draft wave**, named by the
|
|
11
|
+
* conformance kit: `protocol-conformance/src/theme-binding-conformance`
|
|
12
|
+
* promoted today's pins in the prior commit, and this change fails them —
|
|
13
|
+
* VERSION-POLICY §1.1; shipped under §1.4's `draft-` clause, §3.5's window
|
|
14
|
+
* waived pre-v1.0). Founder rulings D1–D7 (2026-09-09/10), joint spec
|
|
15
|
+
* `docs/superpowers/specs/2026-09-09-theming-revision-protocol-half.md`.
|
|
16
|
+
* `appThemeSchema` v2: `overlays: { light, dark }` REQUIRED (the derived
|
|
17
|
+
* projection for both modes — one producer, `@ggui-ai/design`'s
|
|
18
|
+
* `deriveThemeVariables`), `overlayHash` REQUIRED (`canonicalOverlayHash`,
|
|
19
|
+
* recomputed at every write door), `mode` optional and a DEFAULT only,
|
|
20
|
+
* `name` a label; `base` DELETED with the registration tier (D2 = B). The
|
|
21
|
+
* client projection of `themeMode` flips — `hostAnnounced ?? stamped ??
|
|
22
|
+
* sessionSidecar` (D4 = A: M1 + M2, "follow the widget") — the server stamp
|
|
23
|
+
* is unchanged; `themeId` loses its `sidecarName` leg. `AppThemeRefusalBody`
|
|
24
|
+
* is the one write-door refusal shape. `parseMcpAppAiGguiRenderMeta` gains
|
|
25
|
+
* `onInvalidTheme` so the read door is never silent. The render shell paints
|
|
26
|
+
* `--ggui-color-ground` (the surface-layering roles of §2.1).
|
|
27
|
+
* --------------------------------------------------------------------
|
|
28
|
+
* Model registry: `openai/gpt-6-astra` (2026-09-09, additive, ggui#977 —
|
|
29
|
+
* MINOR; Exp 008's founder-ruled second arm, ggui#972). One new `ModelId`
|
|
30
|
+
* union member and one `MODELS.openai` allowlist entry; premium, active,
|
|
31
|
+
* not in the lineup; costs 10 / 50 / 12.5 / 1.0 per 1M (input / output /
|
|
32
|
+
* cache write / cache read), `maxTokens` 922000, tools — every field a
|
|
33
|
+
* receipt on the issue; `retireNotBefore` unset (none published).
|
|
34
|
+
* --------------------------------------------------------------------
|
|
35
|
+
* Refusal registry v11 — the retail plan model retired (2026-09-08,
|
|
36
|
+
* wire-code, pre-launch, ggui#960 — MINOR on the 0.16.0 draft wave; the
|
|
37
|
+
* protocol half of the pricing publication ggui#949, WITH cloud's arm
|
|
38
|
+
* deletion). Founder's ruling: one product, prepaid pay-as-you-go at flat
|
|
39
|
+
* rates, trial and tiers retired, the welcome credit as the free entry.
|
|
40
|
+
* Eleven codes lose their emitting arms and retire in the same slice —
|
|
41
|
+
* render-gate `trial_exhausted`, `trial_expired`, `app_canceled`
|
|
42
|
+
* (`RENDER_GATE_REFUSAL_CODES` 14 → 11); owner-api `subscription_exists`,
|
|
43
|
+
* `no_subscription`, `subscription_unchanged`, `portal_unavailable`,
|
|
44
|
+
* `card_update_unavailable`, `managed_app_no_portal`,
|
|
45
|
+
* `managed_app_no_card_update`, `managed_app_no_checkout` (9 → 1: the
|
|
46
|
+
* prepaid wallet's one Stripe surface is the top-up, user-scoped). Four
|
|
47
|
+
* rows re-described in the new model's words: `billing_path_missing`,
|
|
48
|
+
* `model_not_allowed` (per-account grant), `checkout_unavailable`
|
|
49
|
+
* (top-ups), `insufficient_credit` (pool or BYOK). New typed exports
|
|
50
|
+
* `OWNER_API_REFUSAL_CODES` + `OwnerApiRefusalCode`. Not breaking under
|
|
51
|
+
* §2: pre-launch draft wave, every retired code had lost its emitter in
|
|
52
|
+
* the same publication; the kit's non-render-surface case re-aims to the
|
|
53
|
+
* surviving owner-api code. `managed_default_cap_exceeded` stays (ggui#965).
|
|
54
|
+
* --------------------------------------------------------------------
|
|
55
|
+
* Blueprint provenance de-modeled (2026-09-06, wire-tightening, pre-launch,
|
|
56
|
+
* ggui#924 — MINOR; half of ggui#923, one WITH publication across six
|
|
57
|
+
* lanes). `LlmBlueprintSource.generator` is the identity `ui-gen-<tier>`
|
|
58
|
+
* (one tier token — `ui-gen-default` / `ui-gen-advanced` / an operator
|
|
59
|
+
* tier; `GENERATOR_ID_PATTERN`, `isGeneratorId`) and `model` is the run's route
|
|
60
|
+
* in the registry's spelling (`ModelRef` = `<prefix>/<model>`, composed only
|
|
61
|
+
* by `modelRefOfRoute`, recovered by `parseModelRef`; registry `ModelId`s
|
|
62
|
+
* are the subset — a self-hoster's bedrock/OpenRouter route is a ref the
|
|
63
|
+
* registry does not list; `MODEL_IDS`, `isModelId` narrow to the subset).
|
|
64
|
+
* Before: both were `string`, and the identity embedded the model
|
|
65
|
+
* (`ui-gen-default-haiku-4-5`) — a model retirement (Haiku 4.5,
|
|
66
|
+
* 2026-10-15) would rename the identity against every stored record.
|
|
67
|
+
* `parseBlueprintSource` and `llmBlueprintSourceSchema` refuse a modeled
|
|
68
|
+
* identity and a bare model name; the handshake draft's `generator` hint
|
|
69
|
+
* and the operator tools' `generator` inputs take the same grammar. No
|
|
70
|
+
* alias, no dual-read (pre-launch): a row written before the rename reads
|
|
71
|
+
* as no provenance; stores reseed. Not breaking under VERSION-POLICY §2
|
|
72
|
+
* (no kit fixture asserts a modeled id or a bare model); MINOR under §1.2
|
|
73
|
+
* as a schema tightening on the 0.16.0 draft wave. Post-launch this would
|
|
74
|
+
* be a MAJOR with a migration doc and a dual-read shim — the reason it
|
|
75
|
+
* ships now.
|
|
76
|
+
* --------------------------------------------------------------------
|
|
77
|
+
* Five phantom numeric codes retired-reserved + the emitter census
|
|
78
|
+
* (2026-09-06, wire-code, pre-launch, ggui#910 — PATCH). `CAPABILITY_DENIED`
|
|
79
|
+
* (-32005), `GENERATION_QUOTA_EXCEEDED` (-32010), `APP_LIMIT_EXCEEDED`
|
|
80
|
+
* (-32011), `CONCURRENT_SESSION_LIMIT` (-32012) and the numeric
|
|
81
|
+
* `CONTRACT_VIOLATION` (-32020 — the census found it once the gate
|
|
82
|
+
* existed; the live `CONTRACT_VIOLATION` is a string on the channel and
|
|
83
|
+
* the Plane-3 render error, and tools/call has Plane-2
|
|
84
|
+
* `contract_violation`) were declared,
|
|
85
|
+
* SPEC-fenced and mirrored into four tables, and emitted by nothing
|
|
86
|
+
* first-party — a census by constant and by number over oss/packages,
|
|
87
|
+
* cloud and backend. The constants leave; the numbers stay reserved
|
|
88
|
+
* (SPEC §7.9); an unauthorised key is a bare 403 carrying -32007; quota,
|
|
89
|
+
* app-limit and concurrency states are refusals or implementation-range
|
|
90
|
+
* codes. Cheap only before launch: after the `draft-` rule flips each
|
|
91
|
+
* removal would be a MAJOR with a migration doc. The mirrors gate now
|
|
92
|
+
* also asserts the inverse — every declared non-standard code has a
|
|
93
|
+
* first-party emitter (one `git grep` per code; seeded self-test) — so a
|
|
94
|
+
* phantom cannot be declared again silently. Pinned by
|
|
95
|
+
* `types/__tests__/retired-error-codes.test.ts` (eight retired numbers).
|
|
96
|
+
* Not breaking under VERSION-POLICY §2; PATCH under §1.3.
|
|
97
|
+
* --------------------------------------------------------------------
|
|
98
|
+
*
|
|
99
|
+
* --------------------------------------------------------------------
|
|
100
|
+
* `-32013 RATE_LIMIT_EXCEEDED` retired-reserved (2026-09-06, wire-code,
|
|
101
|
+
* pre-launch, ggui#890 — PATCH). After ggui#886 (the per-app cap denies as
|
|
102
|
+
* the registry's `app_rate_limited` refusal) and the `RateLimitedError`
|
|
103
|
+
* deletion, no first-party implementation emits the number: the reference
|
|
104
|
+
* server refuses in-band, the hosted transport's only 429 is a per-IP
|
|
105
|
+
* backstop with no JSON-RPC body. The constant leaves
|
|
106
|
+
* `PLATFORM_ERROR_CODES` and SPEC §7.9's platform fence; the number stays
|
|
107
|
+
* reserved (the `-32001` / `-32004` convention) so no future canonical code
|
|
108
|
+
* reuses it. Not breaking under VERSION-POLICY §2 — no kit fixture asserts
|
|
109
|
+
* it; PATCH under §1.3. Pinned by `types/__tests__/retired-error-codes.test.ts`
|
|
110
|
+
* (no constant declares a retired number; no tracked source emits one) and
|
|
111
|
+
* by the mirrors gate, which reds the docs tables' rows until they leave
|
|
112
|
+
* in the same publication.
|
|
113
|
+
*
|
|
114
|
+
* --------------------------------------------------------------------
|
|
115
|
+
* The registries export their literal-typed rows (2026-09-06, types-only,
|
|
116
|
+
* pre-launch, ggui#889 — PATCH). `PRE_GENERATION_REFUSAL_CODES` and
|
|
117
|
+
* `DOMAIN_ERROR_REGISTRY` are the normalized views (`Record<Code, Row>`),
|
|
118
|
+
* which erase the per-key literal the `const` definers preserve — so a
|
|
119
|
+
* producer that must satisfy a wire enum from a row had to parse it
|
|
120
|
+
* through the enum (ggui#886). `PRE_GENERATION_REFUSAL_ROWS` and
|
|
121
|
+
* `DOMAIN_ERROR_ROWS` are the SAME objects with the literal types kept:
|
|
122
|
+
* each row's `code` is typed as its own key. No wire change;
|
|
123
|
+
* the kit's registry-completeness catalog reads the normalized view as
|
|
124
|
+
* before. Not breaking under VERSION-POLICY §2; PATCH under §1.3.
|
|
125
|
+
*
|
|
126
|
+
* --------------------------------------------------------------------
|
|
127
|
+
* Plane-2 slugs lead the wire text (2026-09-06, wire-text, pre-launch,
|
|
128
|
+
* ggui#880 — MINOR). SPEC
|
|
129
|
+
* §7.9 promised "the `code` field on each class is the wire literal"
|
|
130
|
+
* while the MCP SDK ships every thrown handler error to the agent as
|
|
131
|
+
* `{content: [{type: 'text', text: error.message}], isError: true}` and
|
|
132
|
+
* nothing else — executed against the built server: `session_not_found`
|
|
133
|
+
* and `handshake_not_found` reached neither a field nor the text, and
|
|
134
|
+
* descriptions, presets and the SPEC taught agents to branch on them.
|
|
135
|
+
*
|
|
136
|
+
* de1. **`DomainError` base** (`errors/domain-error.ts`) — the ONLY
|
|
137
|
+
* composer of a Plane-2 error's `message`: `${code}: ${detail}`.
|
|
138
|
+
* Refuses an empty detail and a detail that begins with any
|
|
139
|
+
* registered domain OR refusal code + `': '`
|
|
140
|
+
* (`DomainErrorDetailCollisionError`, a `TypeError` the emitter's
|
|
141
|
+
* own suite sees — never the wire); a tool-name prefix is prose.
|
|
142
|
+
* `isDomainError` detects by `Symbol.for('ai.ggui.domainError')`
|
|
143
|
+
* marker + shape, never `instanceof`; `parseDomainErrorText` is
|
|
144
|
+
* the reader side.
|
|
145
|
+
* de2. **`DOMAIN_ERROR_CODES` registry** (`types/domain-error-codes.ts`)
|
|
146
|
+
* — the CLOSED Plane-2 set, fifteen rows from the executed census,
|
|
147
|
+
* each with the data-plane `tools` that emit it, a `recovery` class
|
|
148
|
+
* (`retry-same-id` | `re-mint` | `later`), an `emitter` and a
|
|
149
|
+
* self-hoster `description`. Pinned disjoint from
|
|
150
|
+
* `PRE_GENERATION_REFUSAL_CODES` (one code, one plane). SPEC §7.9's
|
|
151
|
+
* Plane-2 table is its mirror (pinned from the registry's own suite):
|
|
152
|
+
* the four phantom classes the table listed (`ContractRequiredError`,
|
|
153
|
+
* `ContractHashMismatchError`, `UnknownActionToolError`,
|
|
154
|
+
* `EventNotAllowedError`) are gone; `cross_reference_unresolved` /
|
|
155
|
+
* `contract_schema_invalid` are not wire codes (no caller throws
|
|
156
|
+
* them — the lint gate throws `contract_validation_failed`).
|
|
157
|
+
* de3. **The two protocol-owned emitters extend the base** —
|
|
158
|
+
* `ContractViolationError` (`contract_violation`; `toErrorData()`
|
|
159
|
+
* keeps its `{error, tool, violations, hint, propsSchemaHash?}`
|
|
160
|
+
* shape) and `ContractValidationError` (`contract_validation_failed`,
|
|
161
|
+
* phase + issues kept). Consumers detecting them by `instanceof`
|
|
162
|
+
* are unchanged; their message now leads with the slug.
|
|
163
|
+
* de4. **The wire plane is the MCP spec's** — a Plane-2 failure is a
|
|
164
|
+
* tool RESULT with `isError: true`, never a JSON-RPC error frame;
|
|
165
|
+
* no `structuredContent` (the SDK client validates it against the
|
|
166
|
+
* tool's `outputSchema` whenever present, so a typed envelope would
|
|
167
|
+
* demote every success field to optional — refused). SPEC §7.9.1:
|
|
168
|
+
* `SESSION_NOT_FOUND` (-32002) is the live-channel / runtime Plane-1
|
|
169
|
+
* code; on `tools/call` the same state is `session_not_found`.
|
|
170
|
+
* de5. **The conformance kit's first `tools/call` driver** — catalog
|
|
171
|
+
* `domain-error`: six no-setup scenarios (unknown `handshakeId` on
|
|
172
|
+
* `ggui_render`; unknown `sessionId` on `ggui_consume` /
|
|
173
|
+
* `ggui_get_session` / `ggui_update` / `ggui_amend` / `ggui_emit`)
|
|
174
|
+
* graded on the raw result via `runConformance({ toolCallDriver })`
|
|
175
|
+
* / `--tool-call-driver <module>`. Before this wave every first-party
|
|
176
|
+
* server failed all six on `slug-leads`.
|
|
177
|
+
*
|
|
178
|
+
* Conformance-kit verdict: not breaking under VERSION-POLICY §2 — no
|
|
179
|
+
* prior fixture asserts Plane-2 text; the leading slug is additive to
|
|
180
|
+
* prose and the new catalog is an addition. MINOR under §1.2 (new
|
|
181
|
+
* exported base, registry and kit catalog); rides the 0.16.0 wave. The
|
|
182
|
+
* adoption of the base by the handler / core / mcp-server classes lands
|
|
183
|
+
* WITH this entry (oss's half of ggui#880); until both are on a server,
|
|
184
|
+
* that server fails the catalog — which is the point.
|
|
185
|
+
*
|
|
186
|
+
* --------------------------------------------------------------------
|
|
187
|
+
* The pending-event row is a schema (2026-09-06, store-boundary, pre-launch,
|
|
188
|
+
* ggui#839 — the #817 C2 follower; cite `3f3d86b86`). The consume pipe's
|
|
189
|
+
* stored row — what `submit_action` / the WS ingress append and
|
|
190
|
+
* `PendingEventConsumer.consumeAndClear` drains — was a hand-written
|
|
191
|
+
* interface the adapters typed as `Record<string, unknown>` and the consume
|
|
192
|
+
* handler coerced with defaults; nothing validated it. A store-boundary
|
|
193
|
+
* contract (producers ↔ adapters ↔ the consume handler), never wire:
|
|
194
|
+
* `ggui_consume` returns the entries, never the wrapper.
|
|
195
|
+
*
|
|
196
|
+
* pe1. **`pendingEventSchema` + `PendingEvent` derived** —
|
|
197
|
+
* `{ id: string.min(1), envelope: consumeEventEntrySchema, createdAt:
|
|
198
|
+
* string }`; `createdAt` stays a string (the relay copies a client
|
|
199
|
+
* `firedAt` the ingress accepts as a diagnostic).
|
|
200
|
+
* pe2. **`sequence` deleted** — zero writers (both producers append
|
|
201
|
+
* `{id, envelope, createdAt}`; sqlite's `seq` never joined the row;
|
|
202
|
+
* the pod stores the literal), zero readers (the only read was the
|
|
203
|
+
* handler's own default-to-0), named in neither SPEC nor the kit.
|
|
204
|
+
* pe3. **`id` required and non-empty** — the drain_ack key and the
|
|
205
|
+
* idempotency key per `(sessionId, id)`; the id-less append branches
|
|
206
|
+
* (core docstring, in-memory, sqlite, the pod's `ddb.ts`) deleted in
|
|
207
|
+
* the same publication.
|
|
208
|
+
* pe4. **No string envelope arm** — every writer passes the object; a
|
|
209
|
+
* store that serializes the whole row. `parsePendingEnvelope`
|
|
210
|
+
* collapsed into the row parse (`envelope-adapters.ts` deleted).
|
|
211
|
+
* pe5. **`PendingEventMalformedError` + the per-adapter failure mode** —
|
|
212
|
+
* `consumeAndClear` MUST NOT return a row that fails the schema and
|
|
213
|
+
* MUST NOT drop a well-formed row because a sibling failed: a
|
|
214
|
+
* transactional drain (sqlite) refuses whole and rolls back; a
|
|
215
|
+
* destructive drain (DynamoDB) quarantines per row with a
|
|
216
|
+
* `pending_event_malformed` structured log; in-memory holds the typed
|
|
217
|
+
* struct it validated on append. `append` refuses a malformed row
|
|
218
|
+
* before storing it. The consume handler maps the error to a
|
|
219
|
+
* `HandlerFailure` carrying `{ events: [], status }`, never a JSON-RPC
|
|
220
|
+
* error, and the parse runs before any `drain_ack` fires.
|
|
221
|
+
*
|
|
222
|
+
* Conformance-kit verdict: not breaking under VERSION-POLICY §2 — the kit
|
|
223
|
+
* never names the wrapper (`git grep PendingEvent -- oss/packages/protocol-conformance`
|
|
224
|
+
* = 0); its only `sequence` is the `action-ack-sequence` fixture's WS ack
|
|
225
|
+
* `payload.sequence`, the ledger's `appendEvent` seq, never the pipe row's
|
|
226
|
+
* deleted field. The observable
|
|
227
|
+
* violation is `@ggui-ai/mcp-server-core`'s published contract-tests suite
|
|
228
|
+
* (a seeded malformed row is refused or quarantined per form). PATCH-class
|
|
229
|
+
* under §1.3 for `@ggui-ai/protocol`; rides the 0.16.0 wave.
|
|
230
|
+
*
|
|
231
|
+
* --------------------------------------------------------------------
|
|
232
|
+
* The endpoint-level refusal carries the app as DATA (2026-09-05, wire
|
|
233
|
+
* field, pre-launch, ggui#870 — the ggui#782 ↔ guuey#708 re-sitting's
|
|
234
|
+
* D6, guuey#836's blocker). `transportRefusalSchema` — what rides
|
|
235
|
+
* `error.data.refusal` on a per-app endpoint's typed 403 (ggui#825/#836)
|
|
236
|
+
* — was strict `{ code, message, fix, retry }` with the app named only
|
|
237
|
+
* in `message`; a tenant's repair loop cannot parse prose safely.
|
|
238
|
+
*
|
|
239
|
+
* ai1. **`data.refusal.appId: string` — REQUIRED** — the app id the
|
|
240
|
+
* refused endpoint serves, equal to the endpoint path's `{appId}`.
|
|
241
|
+
* The ggui id the bound caller already holds, never the tenant's
|
|
242
|
+
* own `ownerRef`; the tenant maps it to its own id from the
|
|
243
|
+
* `gguiAppId` it stored at create. Required, not optional: a field
|
|
244
|
+
* a repair loop cannot rely on is a hope, not a contract.
|
|
245
|
+
*
|
|
246
|
+
* ai2. **Who receives the typed face** (the fact from the pod's code,
|
|
247
|
+
* ggui#812 identity-first): a correctly bound federated identity
|
|
248
|
+
* only — an anonymous request is refused by the auth adapter as
|
|
249
|
+
* 401 before this arm and learns nothing about the app; a native
|
|
250
|
+
* key mismatch gets the bare default-deny 403. SPEC §7.1's
|
|
251
|
+
* endpoint paragraph says so now; the anonymous typed face is
|
|
252
|
+
* deliberately not a contract (it would trade disclosure).
|
|
253
|
+
*
|
|
254
|
+
* Conformance-kit verdict: BREAKING by the letter of VERSION-POLICY §2 —
|
|
255
|
+
* the kit's `transport-refusal` cases now carry `appId` and the strict
|
|
256
|
+
* schema refuses a projection without it, so an emitter built against
|
|
257
|
+
* 0.15.0 fails the 0.16.0 kit — and, the wire being `z.strictObject`, a
|
|
258
|
+
* 0.15.0 STRICT reader of the body is failed by a 0.16.0 emitter too
|
|
259
|
+
* (zero such readers exist today; guuey's is step 3, not started). Shipped under §1.4's `draft-` clause in
|
|
260
|
+
* the 0.16.0 wave; the pod's emitter (cloud, ggui#870's other half)
|
|
261
|
+
* lands WITH this change, after the tombstone fix for ggui#785/G26.
|
|
262
|
+
*
|
|
263
|
+
* Package version — classification MADE here: MAJOR-class change carried
|
|
264
|
+
* by a MINOR wave under `draft-` (§1.4) for `@ggui-ai/protocol` and
|
|
265
|
+
* `@ggui-ai/protocol-conformance`. PROTOCOL_VERSION unchanged — no WS
|
|
266
|
+
* envelope moved.
|
|
267
|
+
*
|
|
268
|
+
* --------------------------------------------------------------------
|
|
269
|
+
* Two refusal codes lose the word "tier" (2026-09-05, rename, pre-launch,
|
|
270
|
+
* ggui#802 — #786 review finding F6). A code name ships to npm and, for a
|
|
271
|
+
* render-gate code, reaches every self-hoster's LLM as JSON-Schema enum
|
|
272
|
+
* metadata on `tools/list`; "tier" names a plan ladder a self-hoster does
|
|
273
|
+
* not have (docs/principles/oss-purity.md, the type-literal class). Ruled
|
|
274
|
+
* by a three-lens judge panel under the registry's naming rules:
|
|
275
|
+
*
|
|
276
|
+
* rt1. **`model_not_in_tier` → `model_not_allowed`** (render-gate,
|
|
277
|
+
* after-fix, fixBy caller) — the state the row's own description,
|
|
278
|
+
* the kit case's `fix` and SPEC §7.9 already name ("not among those
|
|
279
|
+
* the app is allowed to use"); subject-first like the rest of the
|
|
280
|
+
* registry; true on a deployment with one allow-list per app and no
|
|
281
|
+
* prices. Not `model_not_available`: `*_unavailable` is this
|
|
282
|
+
* registry's `later` / operator class, the wrong retry class for the
|
|
283
|
+
* one code an agent may act on itself.
|
|
284
|
+
*
|
|
285
|
+
* rt2. **`already_on_tier` → `subscription_unchanged`** (owner-api,
|
|
286
|
+
* after-fix, fixBy owner) — the owner-api noun the registry already
|
|
287
|
+
* uses (`subscription_exists`, `no_subscription`); the state is
|
|
288
|
+
* "requested == held", no ladder word.
|
|
289
|
+
*
|
|
290
|
+
* rt3. `tier_unrecognized` is NOT a registry code (deleted from the
|
|
291
|
+
* wire at registry v9): a backend allowance state read by the
|
|
292
|
+
* console, whose column is literally `tier`. Unchanged.
|
|
293
|
+
*
|
|
294
|
+
* Conformance-kit verdict: BREAKING by the letter of VERSION-POLICY §2 —
|
|
295
|
+
* the kit's `refuse-after-fix-caller` case pinned the old name, so an
|
|
296
|
+
* emitter built against 0.15.0 fails the 0.16.0 kit's `renderRefusalSchema`
|
|
297
|
+
* enum. Shipped under §1.4's `draft-` clause (semver describes intent
|
|
298
|
+
* pre-v1) in the 0.16.0 wave, with the changelog's Unreleased section
|
|
299
|
+
* naming the move; every mirror moves in one change (the kit case, SPEC,
|
|
300
|
+
* the docs, the console's copy, the backend's owner-api refusals, the pod's
|
|
301
|
+
* emitter, cs macros). The registry's purity pin now allows NO code name to
|
|
302
|
+
* carry plan-tier vocabulary — the grandfather list is gone.
|
|
303
|
+
*
|
|
304
|
+
* Package version — classification MADE here: MAJOR-class change carried
|
|
305
|
+
* by a MINOR wave under `draft-` (§1.4) for `@ggui-ai/protocol` and
|
|
306
|
+
* `@ggui-ai/protocol-conformance`, pre-1.0 and pre-launch.
|
|
307
|
+
* PROTOCOL_VERSION unchanged — no WS envelope moved.
|
|
308
|
+
*
|
|
309
|
+
* --------------------------------------------------------------------
|
|
310
|
+
* `UNAUTHORIZED` moves from `-32001` to `-32007` (2026-09-05, renumber,
|
|
311
|
+
* pre-launch, ggui#853; found by ggui-main in the prod skew-gate log).
|
|
312
|
+
* `-32001` is the MCP SDK client's own `ErrorCode.RequestTimeout`
|
|
313
|
+
* (`@modelcontextprotocol/sdk` types.js, beside `ConnectionClosed`
|
|
314
|
+
* -32000) — minted LOCALLY, never sent by a server — so a client reading
|
|
315
|
+
* the number could not tell a server's UNAUTHORIZED from its own
|
|
316
|
+
* timeout: the class ggui#836 closed for -32000, on a number ggui had
|
|
317
|
+
* chosen long before #836 (0.14.0 and earlier).
|
|
318
|
+
*
|
|
319
|
+
* uc1. **`MCP_ERROR_CODES.UNAUTHORIZED = -32007`** — the next free
|
|
320
|
+
* canonical slot per this table's own note; `-32001` joins
|
|
321
|
+
* `-32004` as retired-reserved. Every mirror moves in this one
|
|
322
|
+
* change (SPEC §7.9 + its table, the gated doc mirrors, the
|
|
323
|
+
* endpoint routes' tests, the kit's transport-refusal wording, the
|
|
324
|
+
* pod's auth arm, the live journeys). HTTP status and message are
|
|
325
|
+
* unchanged: 401/403 + the same text.
|
|
326
|
+
*
|
|
327
|
+
* uc2. **The guard #836 lacked** — `types/error-codes-vs-sdk.test.ts`
|
|
328
|
+
* pins every ggui-chosen code (`MCP_ERROR_CODES` minus the five
|
|
329
|
+
* JSON-RPC standard codes, plus `PLATFORM_ERROR_CODES`) disjoint
|
|
330
|
+
* from every code the SDK's `ErrorCode` enum owns, and ggui's
|
|
331
|
+
* copies of the standard five equal to the SDK's. It was RED on
|
|
332
|
+
* -32001 before uc1 and is what reds the next collision.
|
|
333
|
+
*
|
|
334
|
+
* Conformance-kit verdict: no fixture on 0.15.0 pinned `-32001` (the
|
|
335
|
+
* transport-refusal catalog grades `-32003 + data.refusal` and `null`;
|
|
336
|
+
* its prose named -32001 and now names -32007) — a renumbered
|
|
337
|
+
* canonical code with no kit regression; guuey's clients branch on
|
|
338
|
+
* -32002/-32006 only (ggui#836 record). Bytes on the wire: one number.
|
|
339
|
+
*
|
|
340
|
+
* Package version — classification MADE here: MINOR for
|
|
341
|
+
* `@ggui-ai/protocol` and `@ggui-ai/mcp-server` (a canonical code
|
|
342
|
+
* renumbered, `draft-` intent per VERSION-POLICY §1.4), pre-1.0 and
|
|
343
|
+
* pre-launch. PROTOCOL_VERSION unchanged — no WS envelope moved.
|
|
344
|
+
*
|
|
345
|
+
* --------------------------------------------------------------------
|
|
346
|
+
* SPEC §7.1's refused arm is ONE primitive (2026-09-05, additive,
|
|
347
|
+
* pre-launch, ggui#803 leg 9). The tool result a render gate answers a
|
|
348
|
+
* pre-generation refusal with was built by hand in
|
|
349
|
+
* `@ggui-ai/mcp-server-handlers` (`buildRenderRefusalText` + an inline
|
|
350
|
+
* `{ outcome: 'refused', refusal }`), the conformance kit carried its
|
|
351
|
+
* own reference, and the reference server could not project it at all
|
|
352
|
+
* — so the reference server was not a reference for the refused
|
|
353
|
+
* envelope, and a third hand-built copy there would only have re-graded
|
|
354
|
+
* the kit's reference.
|
|
355
|
+
*
|
|
356
|
+
* rr1. **`projectRenderRefusal(refusal): RenderRefusalResult`** (new
|
|
357
|
+
* export, `envelopes/render-refusal.ts`) — `isError: true`,
|
|
358
|
+
* `content[0].text` = `<code>: <message> <fix>`, `structuredContent`
|
|
359
|
+
* = `{ outcome: 'refused', refusal }` typed as **`RefusedRenderOutput`**
|
|
360
|
+
* (`z.infer<typeof refusedOutputSchema>`, new export), no `_meta`.
|
|
361
|
+
* Pure and synchronous. The four facts have one source.
|
|
362
|
+
*
|
|
363
|
+
* rr2. **Consumers**: `mcp-server-handlers`' `ggui_render` builds the
|
|
364
|
+
* refused result here (its local builder, inline object and
|
|
365
|
+
* `RenderRefusedOutput` alias are deleted — no shim); the
|
|
366
|
+
* reference server supplies the kit's `refusalProjector` from the
|
|
367
|
+
* same primitive at the kit's stringly boundary (a code off
|
|
368
|
+
* `RENDER_GATE_REFUSAL_CODES` → `null`; anything else parsed by
|
|
369
|
+
* `renderRefusalSchema`), so its six `refusal-envelope/*` rows are
|
|
370
|
+
* GRADED, not skipped. The kit's own hand-built reference stays as
|
|
371
|
+
* the second source that catches the primitive drifting.
|
|
372
|
+
*
|
|
373
|
+
* Conformance-kit verdict: no new kit entry — the six `refusal-envelope`
|
|
374
|
+
* cases already grade exactly these four facts; what changed is that
|
|
375
|
+
* two implementations now answer them through one function, and the
|
|
376
|
+
* reference server's exact-set assertion moved the rows from SKIPPED to
|
|
377
|
+
* PASSING. Bytes on the wire: unchanged.
|
|
378
|
+
*
|
|
379
|
+
* Package version — classification MADE here: MINOR for
|
|
380
|
+
* `@ggui-ai/protocol` (two new exports, additive) and for
|
|
381
|
+
* `@ggui-ai/mcp-server-handlers` (same result, one source), pre-1.0 and
|
|
382
|
+
* pre-launch. PROTOCOL_VERSION unchanged — no WS envelope moved.
|
|
383
|
+
*
|
|
384
|
+
* --------------------------------------------------------------------
|
|
385
|
+
* Authorization refusals carry JSON-RPC `data` (2026-09-05, additive,
|
|
386
|
+
* pre-launch, ggui#825). `@ggui-ai/mcp-server`'s per-app `authorize`
|
|
387
|
+
* hook refuses by throwing, and the route answered every throw with a
|
|
388
|
+
* bare `403 {code: -32000, message: "Forbidden"}` — correct in effect,
|
|
389
|
+
* illegible to a client that needs to tell "this app is no longer served" from
|
|
390
|
+
* "your credential is wrong".
|
|
391
|
+
*
|
|
392
|
+
* ar1. **`ErrorMapperResult.data?: JsonValue`** — a deployment's
|
|
393
|
+
* `errorMapper` may attach JSON-RPC 2.0 error `data` (any JSON
|
|
394
|
+
* value) to a mapped result; serialized verbatim on `error.data`,
|
|
395
|
+
* omitted when absent. Applies to every mapped error, not only
|
|
396
|
+
* authorization refusals.
|
|
397
|
+
*
|
|
398
|
+
* ar2. **The per-app authorization refusal consults the mapper**,
|
|
399
|
+
* bounded to 401 / 403: a mapper answering any other status, or
|
|
400
|
+
* throwing, is ignored and logged (`per_app_authorize_mapper_out_
|
|
401
|
+
* of_bounds` / `error_mapper_failed` on the route logger) and the
|
|
402
|
+
* default-deny 403 stands byte-identical to a deployment with no
|
|
403
|
+
* mapper. The allow path never consults the mapper.
|
|
404
|
+
*
|
|
405
|
+
* Conformance-kit verdict: no kit entry required — an optional field on
|
|
406
|
+
* an operator-side hook result, no MCP tool name/shape touched; the
|
|
407
|
+
* shape of any `data.refusal` a deployment chooses to attach is that
|
|
408
|
+
* deployment's declaration, not this package's.
|
|
409
|
+
*
|
|
410
|
+
* Package version — classification MADE here: MINOR for
|
|
411
|
+
* `@ggui-ai/mcp-server` (new optional field on `ErrorMapperResult` +
|
|
412
|
+
* the authorization refusal path consults `errorMapper`), pre-1.0 and
|
|
413
|
+
* pre-launch. PROTOCOL_VERSION unchanged — no WS envelope moved.
|
|
414
|
+
* --------------------------------------------------------------------
|
|
9
415
|
* Authored source rides blueprint reuse (2026-08-14, additive,
|
|
10
416
|
* pre-launch). Cache-reuse renders (a repeated prompt semantic-matches
|
|
11
417
|
* a cached blueprint) previously committed without authored
|
|
@@ -3076,6 +3482,19 @@
|
|
|
3076
3482
|
* 2026-08-19 out-of-vocabulary enum incident as a permanent
|
|
3077
3483
|
* sample).
|
|
3078
3484
|
*
|
|
3485
|
+
* draft-2026-09-10 — THEMING REVISION (ggui#987 protocol half, ggui#989
|
|
3486
|
+
* OSS half, ggui#985 cloud half; BREAKING on the draft wave under
|
|
3487
|
+
* VERSION-POLICY §1.1, shipped under §1.4's `draft-` clause — the
|
|
3488
|
+
* substantive entry is the "Theming revision" block at the top of
|
|
3489
|
+
* this changelog). The wire: `appThemeSchema` v2 (`overlays` +
|
|
3490
|
+
* `overlayHash` required, `base` deleted), the client mode
|
|
3491
|
+
* projection `hostAnnounced ?? stamped ?? sessionSidecar`, `themeId`
|
|
3492
|
+
* without its sidecar-name leg, `AppThemeRefusalBody` at every write
|
|
3493
|
+
* door, `parseMcpAppAiGguiRenderMeta`'s `onInvalidTheme`, the render
|
|
3494
|
+
* shell on `--ggui-color-ground`. The 0.16.0 lockstep wave carries
|
|
3495
|
+
* it; the samples, the e2e fixtures and the docs' draft strings move
|
|
3496
|
+
* in this same commit.
|
|
3497
|
+
*
|
|
3079
3498
|
* draft-2026-09-04 — PRE-GENERATION REFUSAL ENVELOPE (ggui#786;
|
|
3080
3499
|
* BREAKING IN INTENT, pre-launch so no shim and no `@deprecated`
|
|
3081
3500
|
* — see `docs/protocol/migrations/2026-09-04-pre-generation-refusal-envelope.md`):
|
|
@@ -3121,15 +3540,6 @@
|
|
|
3121
3540
|
* reference and against the shipping projector in
|
|
3122
3541
|
* `@ggui-ai/mcp-server-handlers`) and `registry-completeness`
|
|
3123
3542
|
* (the registry's structural pins, bound to the LIVE registry).
|
|
3124
|
-
*
|
|
3125
|
-
* FOLLOWER — moves in the SAME commit as this constant, pinned by a
|
|
3126
|
-
* gate that fails loud when it lags: the `protocol` field of every
|
|
3127
|
-
* shipped `samples/gguis/<name>/ggui.json` (the `@ggui-ai/project-config`
|
|
3128
|
-
* samples test). That pin is a HOUSE rule — shipped samples declare the
|
|
3129
|
-
* CURRENT stamp, because a new project starts from them. The CONTRACT
|
|
3130
|
-
* for any `ggui.json#protocol` is membership in
|
|
3131
|
-
* `CLIENT_SUPPORTED_VERSIONS`, enforced by the loader (`UPGRADE_REQUIRED`
|
|
3132
|
-
* on a non-member); the two coincide only while the set is a singleton.
|
|
3133
3543
|
* r7. **Tool output shapes are protocol-owned (ggui#817 part C):**
|
|
3134
3544
|
* seven schemas — search / featured / validate / consume's
|
|
3135
3545
|
* host-context projection / list_sessions' summary / runtime_pull's
|
|
@@ -3146,8 +3556,47 @@
|
|
|
3146
3556
|
* grammar and nothing else, so `{}` still reaches the gate per r5); the
|
|
3147
3557
|
* full envelope (`renderInputEnvelopeSchema`) parses after the gate.
|
|
3148
3558
|
* Bare model ids are out.
|
|
3559
|
+
* r9. **Endpoint-level refusal (ggui#825):** registry surface
|
|
3560
|
+
* `mcp-endpoint` (v11) and the transport envelope — a per-app MCP
|
|
3561
|
+
* endpoint that refuses a request for a registry state answers HTTP
|
|
3562
|
+
* 403 with `{ code: -32000, message: 'Forbidden', data: { refusal } }`
|
|
3563
|
+
* (`transportRefusalErrorSchema`; `refusal` = the projection without
|
|
3564
|
+
* the render-only fields, `MCP_ENDPOINT_REFUSAL_CODES` derived — today
|
|
3565
|
+
* `app_deprovisioned`). Untyped authorization failures keep the bare
|
|
3566
|
+
* 403 by contract. Additive.
|
|
3567
|
+
* r10. **Consume / list_sessions / emit own their wire shapes (ggui#817
|
|
3568
|
+
* part C2):** `consumeEventEntrySchema` (the drained row, closed),
|
|
3569
|
+
* `gguiSessionStatusSchema` (`active` | `expired`), `gguiConsumeOutputSchema`,
|
|
3570
|
+
* `gguiListSessionsOutputSchema`, `gguiEmitOutputSchema`; the types
|
|
3571
|
+
* derive (`ConsumeEventEntry`, `GguiConsumeOutput`, `GguiEmitOutput`,
|
|
3572
|
+
* `GguiListSessionsOutput`, `GguiSessionStatus`). `tools/list` now
|
|
3573
|
+
* advertises the entry vocabulary and the status enum for
|
|
3574
|
+
* `ggui_consume`; `parsePendingEnvelope` parsed a drained row instead
|
|
3575
|
+
* of casting it, so a malformed pipe entry refused at the seam
|
|
3576
|
+
* (follower: collapsed into `pendingEventSchema`'s row parse, pe4
|
|
3577
|
+
* above). The wire bytes of a well-formed row are unchanged. Additive.
|
|
3578
|
+
* r11. **Endpoint refusal codes (ggui#836):** the per-app endpoint speaks
|
|
3579
|
+
* §7.9 Plane-1 rows — the typed deprovisioned arm is `-32003`
|
|
3580
|
+
* (`APP_NOT_FOUND`, `App not found`) with `data.refusal`; untyped
|
|
3581
|
+
* authorization failures are `-32001` (`UNAUTHORIZED`) with no
|
|
3582
|
+
* `data`; HTTP 403 on both. `-32000` (the SDK client's
|
|
3583
|
+
* `ConnectionClosed`) is never a code a first-party server chooses.
|
|
3584
|
+
* Supersedes r9's literals; pre-launch, no compatibility arm.
|
|
3585
|
+
* r12. **`GENERATION_OVERLOADED: -32014`** joins `PLATFORM_ERROR_CODES` —
|
|
3586
|
+
* the generation queue is saturated (HTTP 503 + `Retry-After`; the
|
|
3587
|
+
* server is the limit, unlike `-32013`). Additive; the four complete
|
|
3588
|
+
* mirrors carry it under `check-error-code-mirrors`.
|
|
3589
|
+
*
|
|
3590
|
+
* FOLLOWER — moves in the SAME commit as this constant, pinned by a
|
|
3591
|
+
* gate that fails loud when it lags: the `protocol` field of every
|
|
3592
|
+
* shipped `samples/gguis/<name>/ggui.json` (the `@ggui-ai/project-config`
|
|
3593
|
+
* samples test). That pin is a HOUSE rule — shipped samples declare the
|
|
3594
|
+
* CURRENT stamp, because a new project starts from them. The CONTRACT
|
|
3595
|
+
* for any `ggui.json#protocol` is membership in
|
|
3596
|
+
* `CLIENT_SUPPORTED_VERSIONS`, enforced by the loader (`UPGRADE_REQUIRED`
|
|
3597
|
+
* on a non-member); the two coincide only while the set is a singleton.
|
|
3149
3598
|
*/
|
|
3150
|
-
export const PROTOCOL_VERSION = "draft-2026-09-
|
|
3599
|
+
export const PROTOCOL_VERSION = "draft-2026-09-10";
|
|
3151
3600
|
/**
|
|
3152
3601
|
* The shipped `@ggui-ai/*` WAVE version — bare semver, identical to
|
|
3153
3602
|
* `package.json#version` on every published package (the lockstep
|
|
@@ -3163,8 +3612,32 @@ export const PROTOCOL_VERSION = "draft-2026-09-04";
|
|
|
3163
3612
|
* `package.json#version` (the same parity pattern as
|
|
3164
3613
|
* `STDLIB_GADGETS_VERSION` and `agent-server`'s `CLIENT_INFO`), and the
|
|
3165
3614
|
* `/release:cut` straggler list names it so the bump is mechanical.
|
|
3615
|
+
*
|
|
3616
|
+
* Wave classifications (protocol seat; the kit is the arbiter,
|
|
3617
|
+
* docs/protocol/VERSION-POLICY.md §1–2):
|
|
3618
|
+
*
|
|
3619
|
+
* - **0.15.0 — MINOR** (ruled 2026-09-05). Every `@ggui-ai/protocol`
|
|
3620
|
+
* landing since the 0.14.0 cut (`f3cf6c906`) is additive under
|
|
3621
|
+
* §1.2: the `@ggui-ai/protocol/wire` browser entry (ggui#819), the
|
|
3622
|
+
* `GENERATION_OVERLOADED: -32014` canonical code and SPEC §7.9's
|
|
3623
|
+
* Plane 0 (ggui#840), `ErrorMapperResult.data` (ggui#825), the
|
|
3624
|
+
* endpoint-level refusal — `403 {code: -32003, data.refusal}` for
|
|
3625
|
+
* `app_deprovisioned` (ggui#836), the `ggui_consume` /
|
|
3626
|
+
* `ggui_list_sessions` / `ggui_emit` output schemas (ggui#817 C2),
|
|
3627
|
+
* and the `.readonly()` removal from the gadget wire schema
|
|
3628
|
+
* (ggui#824). The one non-additive-looking line — the untyped
|
|
3629
|
+
* authorization refusal moving from `-32000` to `-32001
|
|
3630
|
+
* UNAUTHORIZED` (ggui#836) — is not a fixture regression: no
|
|
3631
|
+
* fixture on 0.14.0 pinned `-32000` (it was the SDK's default
|
|
3632
|
+
* courtesy code, never a first-party choice; ggui#840's Plane-0
|
|
3633
|
+
* ruling), and the transport-refusal catalog now states `-32001`.
|
|
3634
|
+
* §1.4 (`draft-`: semver describes intent) applies on top. A
|
|
3635
|
+
* 0.14.1 is legitimate ONLY as a founder-ruled hotfix branch off
|
|
3636
|
+
* `f3cf6c906` carrying ggui#846 alone (a declaration-emit fix —
|
|
3637
|
+
* PATCH under §1.3); it cannot be cut from main, whose delta since
|
|
3638
|
+
* 0.14.0 is minor-class.
|
|
3166
3639
|
*/
|
|
3167
|
-
export const GGUI_WAVE_VERSION = "0.
|
|
3640
|
+
export const GGUI_WAVE_VERSION = "0.16.0";
|
|
3168
3641
|
/**
|
|
3169
3642
|
* Schema version stamped onto wire envelopes that opt into the
|
|
3170
3643
|
* `schemaVersion` forward-compat field (see {@link ActionEnvelope},
|
package/dist/wire.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@ggui-ai/protocol/wire` — the browser entry (ggui#819).
|
|
3
|
+
*
|
|
4
|
+
* What a renderer running inside an iframe validates and types against:
|
|
5
|
+
* the contract's shapes and their inference, the live-channel frames, the
|
|
6
|
+
* action envelope, the host-context projection, the reserved-channel
|
|
7
|
+
* guard, the interface-context snapshot, the invoke event, the permission
|
|
8
|
+
* grammar and the two limits the runtime shares with the server. Nothing
|
|
9
|
+
* a SERVER registers or validates — no tool input/output schema, no ops
|
|
10
|
+
* tool, no LLM route table, no contract zod schema — is reachable from
|
|
11
|
+
* here at runtime: a bundler cannot drop a module whose top level builds
|
|
12
|
+
* zod schemas, so the iframe pays for every module its entry reaches
|
|
13
|
+
* (`wire.test.ts` walks the graph and pins that). The root barrel keeps
|
|
14
|
+
* every name; this entry is the same names, fewer modules.
|
|
15
|
+
*/
|
|
16
|
+
export * from './types/contract-inference.js';
|
|
17
|
+
export * from './types/data-contract.js';
|
|
18
|
+
export * from './types/live-channel.js';
|
|
19
|
+
export * from './types/render.js';
|
|
20
|
+
export * from './types/invoke.js';
|
|
21
|
+
export * from './types/events.js';
|
|
22
|
+
export * from './types/ggui-session-event.js';
|
|
23
|
+
export * from './types/host-context.js';
|
|
24
|
+
export * from './types/interface-context.js';
|
|
25
|
+
export * from './validation/contract-validator.js';
|
|
26
|
+
export * from './validation/reserved-channels.js';
|
|
27
|
+
export * from './validation/hygiene-rules.js';
|
|
28
|
+
export * from './errors/unknown-permission-name.js';
|
|
29
|
+
export * from './envelopes/builders.js';
|
|
30
|
+
export * from './schemas/invoke.js';
|
|
31
|
+
export * from './schemas/interface-context.js';
|
|
32
|
+
export * from './schemas/runtime-telemetry-limits.js';
|
|
33
|
+
export * from './schemas/public-env-key.js';
|
|
34
|
+
export * from './version.js';
|
|
35
|
+
export * from './schemas/data-contract.js';
|
|
36
|
+
export * from './types/gadget.js';
|
|
37
|
+
export * from './gadgets/stdlib-gadgets.js';
|
|
38
|
+
export * from './gadgets/resolve-contract-gadgets.js';
|
|
39
|
+
export * from './iframe-bridge.js';
|
|
40
|
+
export type { ValidateFunction } from './validation/ajv-runtime.js';
|
|
41
|
+
export type { AppTheme } from './schemas/app-theme.js';
|
|
42
|
+
export type { AppDisplayConfig } from './types/app-config.js';
|
|
43
|
+
export type { EndUserIdentity } from './types/auth.js';
|
|
44
|
+
export type { GguiRuntimePullInput, GguiConsumeOutput, ConsumeEventEntry, GguiEmitOutput, GguiSessionStatus, } from './types/mcp.js';
|
|
45
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAI1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AAGnD,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
package/dist/wire.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@ggui-ai/protocol/wire` — the browser entry (ggui#819).
|
|
3
|
+
*
|
|
4
|
+
* What a renderer running inside an iframe validates and types against:
|
|
5
|
+
* the contract's shapes and their inference, the live-channel frames, the
|
|
6
|
+
* action envelope, the host-context projection, the reserved-channel
|
|
7
|
+
* guard, the interface-context snapshot, the invoke event, the permission
|
|
8
|
+
* grammar and the two limits the runtime shares with the server. Nothing
|
|
9
|
+
* a SERVER registers or validates — no tool input/output schema, no ops
|
|
10
|
+
* tool, no LLM route table, no contract zod schema — is reachable from
|
|
11
|
+
* here at runtime: a bundler cannot drop a module whose top level builds
|
|
12
|
+
* zod schemas, so the iframe pays for every module its entry reaches
|
|
13
|
+
* (`wire.test.ts` walks the graph and pins that). The root barrel keeps
|
|
14
|
+
* every name; this entry is the same names, fewer modules.
|
|
15
|
+
*/
|
|
16
|
+
export * from './types/contract-inference.js';
|
|
17
|
+
export * from './types/data-contract.js';
|
|
18
|
+
export * from './types/live-channel.js';
|
|
19
|
+
export * from './types/render.js';
|
|
20
|
+
export * from './types/invoke.js';
|
|
21
|
+
export * from './types/events.js';
|
|
22
|
+
export * from './types/ggui-session-event.js';
|
|
23
|
+
export * from './types/host-context.js';
|
|
24
|
+
export * from './types/interface-context.js';
|
|
25
|
+
export * from './validation/contract-validator.js';
|
|
26
|
+
export * from './validation/reserved-channels.js';
|
|
27
|
+
export * from './validation/hygiene-rules.js';
|
|
28
|
+
export * from './errors/unknown-permission-name.js';
|
|
29
|
+
export * from './envelopes/builders.js';
|
|
30
|
+
export * from './schemas/invoke.js';
|
|
31
|
+
export * from './schemas/interface-context.js';
|
|
32
|
+
export * from './schemas/runtime-telemetry-limits.js';
|
|
33
|
+
export * from './schemas/public-env-key.js';
|
|
34
|
+
export * from './version.js';
|
|
35
|
+
// The gadget family: the stdlib hooks bundled into the iframe validate a
|
|
36
|
+
// descriptor draft at runtime (`createGguiGadget`), so the contract-schema
|
|
37
|
+
// module comes along — it is what the browser validates there.
|
|
38
|
+
export * from './schemas/data-contract.js';
|
|
39
|
+
export * from './types/gadget.js';
|
|
40
|
+
export * from './gadgets/stdlib-gadgets.js';
|
|
41
|
+
export * from './gadgets/resolve-contract-gadgets.js';
|
|
42
|
+
// The iframe bridge vocabulary (`BRIDGE_EVENTS`) — what the RN WebView bridge
|
|
43
|
+
// and the web runtime agree on; browser data, not a tool schema.
|
|
44
|
+
export * from './iframe-bridge.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"./dist/schemas/sync-check.js",
|
|
6
6
|
"./dist/validation/ajv-runtime.js"
|
|
@@ -78,6 +78,12 @@
|
|
|
78
78
|
"require": "./dist/integrations/theme-binding.js",
|
|
79
79
|
"default": "./dist/integrations/theme-binding.js"
|
|
80
80
|
},
|
|
81
|
+
"./wire": {
|
|
82
|
+
"types": "./dist/wire.d.ts",
|
|
83
|
+
"import": "./dist/wire.js",
|
|
84
|
+
"require": "./dist/wire.js",
|
|
85
|
+
"default": "./dist/wire.js"
|
|
86
|
+
},
|
|
81
87
|
"./version": {
|
|
82
88
|
"types": "./dist/version.d.ts",
|
|
83
89
|
"import": "./dist/version.js",
|