@ggui-ai/protocol 0.6.2 → 0.7.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/errors/resource-read.d.ts +105 -0
- package/dist/errors/resource-read.d.ts.map +1 -0
- package/dist/errors/resource-read.js +107 -0
- package/dist/gadgets/resolve-app-gadgets.d.ts +12 -6
- package/dist/gadgets/resolve-app-gadgets.d.ts.map +1 -1
- package/dist/gadgets/resolve-app-gadgets.js +19 -8
- package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/schemas/data-contract.d.ts +26 -20
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +31 -24
- package/dist/schemas/mcp.d.ts +58 -16
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +58 -12
- package/dist/transport/websocket.d.ts +2 -5
- package/dist/transport/websocket.d.ts.map +1 -1
- package/dist/types/data-contract.d.ts.map +1 -1
- package/dist/types/live-channel.d.ts +14 -37
- package/dist/types/live-channel.d.ts.map +1 -1
- package/dist/types/mcp.d.ts +33 -25
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +19 -2
- package/dist/validation/hygiene-rules.d.ts +2 -2
- package/dist/validation/hygiene-rules.js +2 -2
- package/dist/version.d.ts +177 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +177 -0
- package/package.json +1 -1
package/dist/version.js
CHANGED
|
@@ -6,6 +6,183 @@
|
|
|
6
6
|
* schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
|
|
7
7
|
*
|
|
8
8
|
* --------------------------------------------------------------------
|
|
9
|
+
* Typed `resources/read` failures (2026-08-09, additive, pre-launch,
|
|
10
|
+
* ggui#430). A read of a render locator
|
|
11
|
+
* (`ui://ggui/render/{sessionId}/{blueprintKey}`) gains a closed failure
|
|
12
|
+
* union and a canonical JSON-RPC number, so the read has exactly two
|
|
13
|
+
* exits: a live mount, or a typed error. Before this, an unresolvable
|
|
14
|
+
* read returned a SUCCESS-shaped result carrying a loading shell that
|
|
15
|
+
* would never come alive — the same class of defect ruling B fixed for
|
|
16
|
+
* `ggui_render`, on the resource surface instead of the tool surface.
|
|
17
|
+
*
|
|
18
|
+
* rr1. **New closed enum `ResourceReadErrorCode`** = NOT_FOUND |
|
|
19
|
+
* BLUEPRINT_UNRESOLVABLE | NOT_SUPPORTED | NOT_MOUNTABLE, with
|
|
20
|
+
* `resourceReadErrorSchema {code, message, detail?}`. Deliberately
|
|
21
|
+
* NOT an extension of `renderErrorCodeSchema` (rb2): that enum
|
|
22
|
+
* classifies a `ggui_render` tool call that ran and failed and
|
|
23
|
+
* rides IN the tool result; this one classifies a resource read
|
|
24
|
+
* and rides ON a JSON-RPC error. Two surfaces, two closed enums,
|
|
25
|
+
* same UPPER_SNAKE house style.
|
|
26
|
+
*
|
|
27
|
+
* rr2. **`-32006 MOUNT_UNAVAILABLE` claimed** — the first draw from
|
|
28
|
+
* the `-32006` onwards range that rb4 reserved when it retired
|
|
29
|
+
* `-32004`. The next free canonical slot is `-32007`. It covers
|
|
30
|
+
* BLUEPRINT_UNRESOLVABLE / NOT_SUPPORTED / NOT_MOUNTABLE.
|
|
31
|
+
* Deliberately NOT `INTERNAL_ERROR`: a component that is gone, a
|
|
32
|
+
* server that keeps no durable record, and a render with no
|
|
33
|
+
* delivery channel are all deterministic outcomes of a correctly
|
|
34
|
+
* functioning server, and `-32603` would report a malfunction and
|
|
35
|
+
* invite a retry that cannot succeed. The fine-grained class rides
|
|
36
|
+
* on `error.data.code`.
|
|
37
|
+
*
|
|
38
|
+
* rr3. **NOT_FOUND maps to `-32002`**, which MCP uses for a missing
|
|
39
|
+
* resource and which this table already assigns to a missing
|
|
40
|
+
* session — for a locator keyed by `sessionId` those are one
|
|
41
|
+
* condition, not two.
|
|
42
|
+
*
|
|
43
|
+
* rr4. **NOT_FOUND carries a CONSTANT body.** The mapper substitutes
|
|
44
|
+
* a fixed message and drops `detail`, so a read refused by the
|
|
45
|
+
* authorization check and a read of a locator that never existed
|
|
46
|
+
* are byte-identical on the wire. Anything that varies between the
|
|
47
|
+
* two makes the read an existence oracle for other callers'
|
|
48
|
+
* renders. The mapper closes the message half; the ordering half
|
|
49
|
+
* is a server obligation — a branch whose outcome VARIES WITH THE
|
|
50
|
+
* LOCATOR MUST NOT run before the authorization check, because
|
|
51
|
+
* reaching one tells the caller the locator resolved for somebody.
|
|
52
|
+
* A deployment-global answer is not such a branch: NOT_SUPPORTED
|
|
53
|
+
* is identical for every locator on the server that emits it, so
|
|
54
|
+
* answering it early discloses nothing. (Scoped this way in the
|
|
55
|
+
* same slice the conformance catalog landed, which grades the
|
|
56
|
+
* indistinguishability the rule exists to produce and deliberately
|
|
57
|
+
* does not grade ordering. The unscoped form would have declared
|
|
58
|
+
* a correct substrate-less server non-conformant.)
|
|
59
|
+
*
|
|
60
|
+
* rr5. **A read that cannot mount is now an ERROR, not a
|
|
61
|
+
* success-shaped shell.** This is the observable wire change, and
|
|
62
|
+
* it is what rr1–rr4 exist to give a shape to. Every failure
|
|
63
|
+
* branch of the render-locator read used to return a result whose
|
|
64
|
+
* `contents` carried a loading shell — a page that waited forever
|
|
65
|
+
* for a render that was never coming. Those branches now throw,
|
|
66
|
+
* and the transport serializes them as the JSON-RPC errors above;
|
|
67
|
+
* the shell builder behind them is DELETED rather than left
|
|
68
|
+
* unreferenced, so no branch can produce one. Reads that CAN
|
|
69
|
+
* mount are unchanged byte for byte. A host that treated any
|
|
70
|
+
* successful read as mountable was right only by accident and is
|
|
71
|
+
* now right by construction; a host that never handled the error
|
|
72
|
+
* exit at all now has one to handle. The invariant this buys is
|
|
73
|
+
* the whole point: any successful `contents` result IS a live
|
|
74
|
+
* mount.
|
|
75
|
+
*
|
|
76
|
+
* Conformance-kit verdict: additive, minor-intent while `draft-`, so
|
|
77
|
+
* PROTOCOL_VERSION is unchanged — no WS envelope moved, and the change
|
|
78
|
+
* is confined to the MCP resource surface (same reasoning as rb's stamp
|
|
79
|
+
* adjudication).
|
|
80
|
+
*
|
|
81
|
+
* The kit arbitrates this surface now. `resource-read-conformance` in
|
|
82
|
+
* `@ggui-ai/protocol-conformance` binds the `resources/read` method:
|
|
83
|
+
* `runResourceReadConformance()` drives an adopter-supplied scenario
|
|
84
|
+
* driver through a 12-case catalog and grades the two numbers (rr1–rr3),
|
|
85
|
+
* the closed classification on `error.data.code`, NOT_FOUND's absent
|
|
86
|
+
* `detail` and constant message (rr4), the refused-equals-missing byte
|
|
87
|
+
* identity across every server shape, and rr5's invariant on a live row
|
|
88
|
+
* and a re-minted one alike. What it does NOT arbitrate is `tools/call`:
|
|
89
|
+
* no driver is bound to that method, so the `ggui_consume` and
|
|
90
|
+
* `ggui_emit` obligations stay kit-invisible and this entry closes
|
|
91
|
+
* nothing for them.
|
|
92
|
+
*
|
|
93
|
+
* Because that catalog exists and ships, the package-version decision
|
|
94
|
+
* below is stated outright rather than made conditional on a driver
|
|
95
|
+
* that has yet to arrive.
|
|
96
|
+
*
|
|
97
|
+
* Five things stay ungraded on purpose and MUST NOT be read as
|
|
98
|
+
* obligations: the ORDER in which a substrate-less server answers
|
|
99
|
+
* NOT_SUPPORTED; `detail` wording on any code; the NOT_FOUND message
|
|
100
|
+
* literal (its constancy is the obligation, not its prose); `-32603`
|
|
101
|
+
* message text; and the NUMBER a URI naming no locator receives —
|
|
102
|
+
* including negatively, since MCP itself assigns the resource-missing
|
|
103
|
+
* number to a read of a URI a server does not serve, and banning it
|
|
104
|
+
* would make every framework that leans on that assignment
|
|
105
|
+
* non-conformant. On that last one the law is classification-only:
|
|
106
|
+
* such a URI MUST NOT carry one of the four codes on `error.data.code`.
|
|
107
|
+
*
|
|
108
|
+
* Package version — the classification is MADE here, not deferred.
|
|
109
|
+
* The resource-read surface and the new canonical code are a MINOR for
|
|
110
|
+
* the `@ggui-ai/*` wave: additive under the version policy's minor rule
|
|
111
|
+
* (every fixture that passed against the current wave still passes; the
|
|
112
|
+
* delta is new surface), pre-1.0 and pre-launch. TWO packages carry
|
|
113
|
+
* minor-class changes into that wave — `@ggui-ai/protocol` (the closed
|
|
114
|
+
* enum, the canonical number, the projection) and
|
|
115
|
+
* `@ggui-ai/protocol-conformance` (the catalog that decides them).
|
|
116
|
+
*
|
|
117
|
+
* What is deferred is only the mechanical write. Every `@ggui-ai/*`
|
|
118
|
+
* package carries ONE wave version, and a wave cut moves all of them to
|
|
119
|
+
* it in a single commit — no package's number can move on its own — so
|
|
120
|
+
* the release owner takes both bumps together at the next cut. One
|
|
121
|
+
* deferral, one owner, two named packages. Nothing about what the
|
|
122
|
+
* change IS remains open.
|
|
123
|
+
*
|
|
124
|
+
* #457 (2026-08-10): the substrate stores' `durability` declaration —
|
|
125
|
+
* a MINOR surface that SHIPPED IN 0.7.0 (the wave was published from
|
|
126
|
+
* main after it landed; an earlier revision of this note deferred it
|
|
127
|
+
* to the next cut, which the publish overtook). `@ggui-ai/mcp-server-core`
|
|
128
|
+
* adds a required member to three published ports (pre-launch
|
|
129
|
+
* no-compat: every in-tree impl moved in the same slice; out-of-tree
|
|
130
|
+
* implementors add one literal) and `@ggui-ai/protocol-conformance`
|
|
131
|
+
* adds the `all-ephemeral` wiring arm + its fusion case (additive —
|
|
132
|
+
* the catalog's public-API additive-only rule holds; the SPEC §7.10.4
|
|
133
|
+
* amendment defines "durable" as declared, which was previously
|
|
134
|
+
* undefined, not different).
|
|
135
|
+
*
|
|
136
|
+
* On the kit's half, one thing is worth saying plainly rather than
|
|
137
|
+
* calling its delta "purely additive": `parseCase` rejects unknown
|
|
138
|
+
* keys, so a case file with a typo'd key throws instead of being
|
|
139
|
+
* quietly ignored. That strictness is free on a sub-module with no
|
|
140
|
+
* prior published version — nothing can be built against it yet — but
|
|
141
|
+
* extending it over the existing fixture catalog would be a MAJOR, not
|
|
142
|
+
* a minor, and must be adjudicated as one.
|
|
143
|
+
*
|
|
144
|
+
* --------------------------------------------------------------------
|
|
145
|
+
* Credential-broker surface retired (2026-08-08, BREAKING, pre-launch,
|
|
146
|
+
* ggui#436). The `system` frame's auth vocabulary and the
|
|
147
|
+
* `ggui_request_credential` tool leave the protocol entirely.
|
|
148
|
+
* Credential ceremony for an agent's own MCP tools is the AGENT HOST's
|
|
149
|
+
* responsibility — it owns the runtime, the user relationship, and the
|
|
150
|
+
* consent chrome. ggui's wire deliberately carries no auth frames.
|
|
151
|
+
*
|
|
152
|
+
* rc1. **`SystemPayload` / `SystemAction` deleted**, and `'system'`
|
|
153
|
+
* leaves `WebSocketMessageType` + the `WebSocketMessage` union.
|
|
154
|
+
* The vocabulary was `auth_required` / `credential_ready` and
|
|
155
|
+
* nothing else — with the broker gone there is no other action to
|
|
156
|
+
* carry, so the frame class dies with it rather than surviving as
|
|
157
|
+
* an empty discriminator.
|
|
158
|
+
*
|
|
159
|
+
* rc2. **`requestCredentialInputSchema` /
|
|
160
|
+
* `requestCredentialInputShape` / `GguiRequestCredentialInput` /
|
|
161
|
+
* `GguiRequestCredentialOutput` deleted.** The only handler that
|
|
162
|
+
* ever implemented the tool (the hosted pod's
|
|
163
|
+
* `tools/request-credential.ts`) was deleted the day before in
|
|
164
|
+
* the same issue: it pushed its consent overlay through an API
|
|
165
|
+
* Gateway WebSocket leg the pod never had, so the tool could not
|
|
166
|
+
* function. `ggui_request_credential` is appended to the
|
|
167
|
+
* mcp-server RETIRED_TOOL_NAMES regression lock.
|
|
168
|
+
*
|
|
169
|
+
* rc3. **Client lanes deleted, not stubbed.** `@ggui-ai/react`'s
|
|
170
|
+
* `GguiRenderProps.onSystemMessage` (+ its dispatch arm),
|
|
171
|
+
* `@ggui-ai/iframe-runtime`'s `channels/system.ts` handler and
|
|
172
|
+
* its `auth-required` `ObservabilityEvent` arm
|
|
173
|
+
* (`AuthRequiredEvent`), and both SDKs' `SystemPayload` /
|
|
174
|
+
* `SystemAction` re-exports go. The observability event was a
|
|
175
|
+
* projection of `SystemPayload` — with no payload to project it
|
|
176
|
+
* has no producer.
|
|
177
|
+
*
|
|
178
|
+
* Conformance-kit verdict: no kit fixture asserted the `system` frame
|
|
179
|
+
* and no first-party server ever emitted one (the pod's broker was the
|
|
180
|
+
* only would-be emitter and it was pre-transport dead) — same posture
|
|
181
|
+
* as the 2026-07-27 dead-vocabulary entry. PROTOCOL_VERSION unchanged;
|
|
182
|
+
* rolling it would force a lockstep UPGRADE_REQUIRED break on every
|
|
183
|
+
* pinned client to version a frame class that never flew.
|
|
184
|
+
*
|
|
185
|
+
* --------------------------------------------------------------------
|
|
9
186
|
* Ops-tool console-parity slice (2026-07-29, BREAKING on the ops
|
|
10
187
|
* surface only, pre-launch, ggui#400). Rename ledger — same treatment
|
|
11
188
|
* as the `ggui_ops_register_blueprint` → `ggui_ops_save_library_blueprint`
|