@ggui-ai/protocol 0.12.0 → 0.14.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/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/integrations/mcp-apps.d.ts +63 -11
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +73 -3
- package/dist/schemas/app-theme.d.ts +5 -0
- package/dist/schemas/app-theme.d.ts.map +1 -1
- package/dist/schemas/app-theme.js +23 -0
- package/dist/schemas/data-contract.d.ts +3 -1
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +2 -0
- package/dist/schemas/invoke.d.ts +2 -2
- package/dist/schemas/mcp.d.ts +482 -24
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +455 -26
- package/dist/schemas/render-input-envelope.d.ts +20 -0
- package/dist/schemas/render-input-envelope.d.ts.map +1 -0
- package/dist/schemas/render-input-envelope.js +56 -0
- package/dist/types/ggui-session-event.d.ts +4 -5
- package/dist/types/ggui-session-event.d.ts.map +1 -1
- package/dist/types/ggui-session-event.js +0 -37
- package/dist/types/host-context.d.ts +17 -16
- package/dist/types/host-context.d.ts.map +1 -1
- package/dist/types/host-context.js +7 -0
- package/dist/types/llm-route.d.ts +2 -2
- package/dist/types/llm-route.d.ts.map +1 -1
- package/dist/types/llm-route.js +11 -3
- package/dist/types/llm.d.ts +397 -7
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +111 -10
- package/dist/types/mcp.d.ts +16 -53
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/readonly.d.ts +11 -0
- package/dist/types/readonly.d.ts.map +1 -0
- package/dist/types/readonly.js +1 -0
- package/dist/types/refusal-codes.d.ts +319 -0
- package/dist/types/refusal-codes.d.ts.map +1 -0
- package/dist/types/refusal-codes.js +329 -0
- package/dist/version.d.ts +79 -5
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +78 -4
- package/package.json +7 -3
package/dist/version.d.ts
CHANGED
|
@@ -1865,8 +1865,11 @@
|
|
|
1865
1865
|
* now `{stackItemId, updated}`.
|
|
1866
1866
|
* Pre-launch no-backcompat: consumers that read any of the dropped
|
|
1867
1867
|
* fields off the wire response MUST migrate. Internal telemetry
|
|
1868
|
-
* threading via TS-only `HandshakeOutput` / `PushOutput`
|
|
1869
|
-
*
|
|
1868
|
+
* threading via the TS-only `HandshakeOutput` / `PushOutput`
|
|
1869
|
+
* shapes is preserved for handler-side callers. (`ggui_update`'s
|
|
1870
|
+
* parallel TS shape is gone as of ggui#798 — the handler's return
|
|
1871
|
+
* type is `GguiUpdateOutput`, `z.infer` of `updateOutputSchema`,
|
|
1872
|
+
* so there is nothing left for it to carry beyond the wire.)
|
|
1870
1873
|
*
|
|
1871
1874
|
* u2. **`validatePropsData` is closed-shape (strict mode).** Keys
|
|
1872
1875
|
* not declared on `propsSpec.properties` are now rejected with
|
|
@@ -3072,8 +3075,79 @@
|
|
|
3072
3075
|
* (drift / hash / profile / authority obligations; pins the
|
|
3073
3076
|
* 2026-08-19 out-of-vocabulary enum incident as a permanent
|
|
3074
3077
|
* sample).
|
|
3078
|
+
*
|
|
3079
|
+
* draft-2026-09-04 — PRE-GENERATION REFUSAL ENVELOPE (ggui#786;
|
|
3080
|
+
* BREAKING IN INTENT, pre-launch so no shim and no `@deprecated`
|
|
3081
|
+
* — see `docs/protocol/migrations/2026-09-04-pre-generation-refusal-envelope.md`):
|
|
3082
|
+
*
|
|
3083
|
+
* r1. **`outcome` on every render result** (SPEC §7.1). A REQUIRED
|
|
3084
|
+
* discriminant, `'rendered' | 'failed' | 'refused'`. Under
|
|
3085
|
+
* §1.1 of VERSION-POLICY a required-field addition on an
|
|
3086
|
+
* envelope is a major-class change; §1.4 waives the migration
|
|
3087
|
+
* obligation while the version carries the `draft-` prefix, and
|
|
3088
|
+
* the dated doc above is written anyway. `ggui_update` is
|
|
3089
|
+
* UNCHANGED — it binds no pre-generation gate and consumes no
|
|
3090
|
+
* handshake, so a mutation arm is a separate slice.
|
|
3091
|
+
* r2. **Identity present-iff-committed** — `sessionId`, `action`,
|
|
3092
|
+
* `contractHash`, `blueprintId`, `variantKey` and `cache` are
|
|
3093
|
+
* OPTIONAL at the schema level and pinned present on the two
|
|
3094
|
+
* committed outcomes by a presence refinement. A refusal
|
|
3095
|
+
* commits nothing, so it carries none of them. The same
|
|
3096
|
+
* refinement pins `resourceUri` present-iff-`'rendered'` — the
|
|
3097
|
+
* mount affordance, whose iff its docstring already stated and
|
|
3098
|
+
* nothing enforced: a `failed` result carrying one advertises a
|
|
3099
|
+
* mount for a render that does not exist.
|
|
3100
|
+
* r3. **The refusal envelope** — `refusal: {code, message, fix,
|
|
3101
|
+
* retry, handshake: 'intact', balanceCentsAtCheck?}`, present
|
|
3102
|
+
* iff `outcome: 'refused'` and then the ONLY field beside
|
|
3103
|
+
* `outcome`. Enforced ON THE WIRE: a handler now declares
|
|
3104
|
+
* `outputEnvelopeSchema` (the composed schema) beside
|
|
3105
|
+
* `outputSchema` (the raw shape the SDK registers), and the
|
|
3106
|
+
* transport validates against the former — so the presence
|
|
3107
|
+
* rules a raw-shape rebuild would drop fail loudly instead.
|
|
3108
|
+
* r4. **`PRE_GENERATION_REFUSAL_CODES`** — a closed registry, one
|
|
3109
|
+
* `code` namespace across the render-gate, owner-api and
|
|
3110
|
+
* provisioning-api surfaces, with `retry` on every row and
|
|
3111
|
+
* `fixBy` on every `after-fix` row. `refusal.code` is the
|
|
3112
|
+
* render-gate subset; a code outside it fails the wire enum.
|
|
3113
|
+
* r5. **Hook contract** — `preValidationGate` RETURNS a refusal
|
|
3114
|
+
* instead of throwing; the handler owns the envelope and
|
|
3115
|
+
* projects it before the handler's OWN input parse (after the
|
|
3116
|
+
* SDK's declared-shape validation, so a wire-malformed call
|
|
3117
|
+
* never reaches a gate). A gate that throws to refuse is a
|
|
3118
|
+
* conformance failure, observable in the `tool_invoked` line.
|
|
3119
|
+
* r6. **Conformance:** two catalogs — `refusal-envelope-conformance`
|
|
3120
|
+
* (the projection obligation, graded against a kit-local
|
|
3121
|
+
* reference and against the shipping projector in
|
|
3122
|
+
* `@ggui-ai/mcp-server-handlers`) and `registry-completeness`
|
|
3123
|
+
* (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
|
+
* r7. **Tool output shapes are protocol-owned (ggui#817 part C):**
|
|
3134
|
+
* seven schemas — search / featured / validate / consume's
|
|
3135
|
+
* host-context projection / list_sessions' summary / runtime_pull's
|
|
3136
|
+
* page / get_session — registered as `.shape`, types derived and
|
|
3137
|
+
* wearing `DeepReadonly` at the seam; `ggui_get_session`'s wire is the
|
|
3138
|
+
* projection (`variant` + six base fields, `contextSnapshot` when the
|
|
3139
|
+
* row has one), never a `GguiSession` — the alias was a lie the
|
|
3140
|
+
* strip-parse hid. No `.readonly()` in a wire schema (zod 4 projects
|
|
3141
|
+
* it as `readOnly`).
|
|
3142
|
+
* r8. **`infra.model` route grammar (ggui#818):** either wire form —
|
|
3143
|
+
* canonical `provider:model` or LiteLLM `provider/model`, aliases in
|
|
3144
|
+
* both — or the handler's route guard fails at zod path `infra.model`
|
|
3145
|
+
* BEFORE the pre-generation gate (`renderInputRouteGuardSchema`, the
|
|
3146
|
+
* grammar and nothing else, so `{}` still reaches the gate per r5); the
|
|
3147
|
+
* full envelope (`renderInputEnvelopeSchema`) parses after the gate.
|
|
3148
|
+
* Bare model ids are out.
|
|
3075
3149
|
*/
|
|
3076
|
-
export declare const PROTOCOL_VERSION = "draft-2026-
|
|
3150
|
+
export declare const PROTOCOL_VERSION = "draft-2026-09-04";
|
|
3077
3151
|
/**
|
|
3078
3152
|
* The shipped `@ggui-ai/*` WAVE version — bare semver, identical to
|
|
3079
3153
|
* `package.json#version` on every published package (the lockstep
|
|
@@ -3090,7 +3164,7 @@ export declare const PROTOCOL_VERSION = "draft-2026-08-19";
|
|
|
3090
3164
|
* `STDLIB_GADGETS_VERSION` and `agent-server`'s `CLIENT_INFO`), and the
|
|
3091
3165
|
* `/release:cut` straggler list names it so the bump is mechanical.
|
|
3092
3166
|
*/
|
|
3093
|
-
export declare const GGUI_WAVE_VERSION = "0.
|
|
3167
|
+
export declare const GGUI_WAVE_VERSION = "0.14.0";
|
|
3094
3168
|
/**
|
|
3095
3169
|
* Schema version stamped onto wire envelopes that opt into the
|
|
3096
3170
|
* `schemaVersion` forward-compat field (see {@link ActionEnvelope},
|
|
@@ -3111,7 +3185,7 @@ export declare const GGUI_WAVE_VERSION = "0.12.0";
|
|
|
3111
3185
|
* consumers can reference schema-versioning specifically without
|
|
3112
3186
|
* coupling to the broader cache-invalidation constant.
|
|
3113
3187
|
*/
|
|
3114
|
-
export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-
|
|
3188
|
+
export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-09-04";
|
|
3115
3189
|
/**
|
|
3116
3190
|
* Canonical live-channel error code emitted when a peer's declared
|
|
3117
3191
|
* {@link SubscribePayload.supportedVersions} /
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4kGG;AACH,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB,qBAAmB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAErD,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -1865,8 +1865,11 @@
|
|
|
1865
1865
|
* now `{stackItemId, updated}`.
|
|
1866
1866
|
* Pre-launch no-backcompat: consumers that read any of the dropped
|
|
1867
1867
|
* fields off the wire response MUST migrate. Internal telemetry
|
|
1868
|
-
* threading via TS-only `HandshakeOutput` / `PushOutput`
|
|
1869
|
-
*
|
|
1868
|
+
* threading via the TS-only `HandshakeOutput` / `PushOutput`
|
|
1869
|
+
* shapes is preserved for handler-side callers. (`ggui_update`'s
|
|
1870
|
+
* parallel TS shape is gone as of ggui#798 — the handler's return
|
|
1871
|
+
* type is `GguiUpdateOutput`, `z.infer` of `updateOutputSchema`,
|
|
1872
|
+
* so there is nothing left for it to carry beyond the wire.)
|
|
1870
1873
|
*
|
|
1871
1874
|
* u2. **`validatePropsData` is closed-shape (strict mode).** Keys
|
|
1872
1875
|
* not declared on `propsSpec.properties` are now rejected with
|
|
@@ -3072,8 +3075,79 @@
|
|
|
3072
3075
|
* (drift / hash / profile / authority obligations; pins the
|
|
3073
3076
|
* 2026-08-19 out-of-vocabulary enum incident as a permanent
|
|
3074
3077
|
* sample).
|
|
3078
|
+
*
|
|
3079
|
+
* draft-2026-09-04 — PRE-GENERATION REFUSAL ENVELOPE (ggui#786;
|
|
3080
|
+
* BREAKING IN INTENT, pre-launch so no shim and no `@deprecated`
|
|
3081
|
+
* — see `docs/protocol/migrations/2026-09-04-pre-generation-refusal-envelope.md`):
|
|
3082
|
+
*
|
|
3083
|
+
* r1. **`outcome` on every render result** (SPEC §7.1). A REQUIRED
|
|
3084
|
+
* discriminant, `'rendered' | 'failed' | 'refused'`. Under
|
|
3085
|
+
* §1.1 of VERSION-POLICY a required-field addition on an
|
|
3086
|
+
* envelope is a major-class change; §1.4 waives the migration
|
|
3087
|
+
* obligation while the version carries the `draft-` prefix, and
|
|
3088
|
+
* the dated doc above is written anyway. `ggui_update` is
|
|
3089
|
+
* UNCHANGED — it binds no pre-generation gate and consumes no
|
|
3090
|
+
* handshake, so a mutation arm is a separate slice.
|
|
3091
|
+
* r2. **Identity present-iff-committed** — `sessionId`, `action`,
|
|
3092
|
+
* `contractHash`, `blueprintId`, `variantKey` and `cache` are
|
|
3093
|
+
* OPTIONAL at the schema level and pinned present on the two
|
|
3094
|
+
* committed outcomes by a presence refinement. A refusal
|
|
3095
|
+
* commits nothing, so it carries none of them. The same
|
|
3096
|
+
* refinement pins `resourceUri` present-iff-`'rendered'` — the
|
|
3097
|
+
* mount affordance, whose iff its docstring already stated and
|
|
3098
|
+
* nothing enforced: a `failed` result carrying one advertises a
|
|
3099
|
+
* mount for a render that does not exist.
|
|
3100
|
+
* r3. **The refusal envelope** — `refusal: {code, message, fix,
|
|
3101
|
+
* retry, handshake: 'intact', balanceCentsAtCheck?}`, present
|
|
3102
|
+
* iff `outcome: 'refused'` and then the ONLY field beside
|
|
3103
|
+
* `outcome`. Enforced ON THE WIRE: a handler now declares
|
|
3104
|
+
* `outputEnvelopeSchema` (the composed schema) beside
|
|
3105
|
+
* `outputSchema` (the raw shape the SDK registers), and the
|
|
3106
|
+
* transport validates against the former — so the presence
|
|
3107
|
+
* rules a raw-shape rebuild would drop fail loudly instead.
|
|
3108
|
+
* r4. **`PRE_GENERATION_REFUSAL_CODES`** — a closed registry, one
|
|
3109
|
+
* `code` namespace across the render-gate, owner-api and
|
|
3110
|
+
* provisioning-api surfaces, with `retry` on every row and
|
|
3111
|
+
* `fixBy` on every `after-fix` row. `refusal.code` is the
|
|
3112
|
+
* render-gate subset; a code outside it fails the wire enum.
|
|
3113
|
+
* r5. **Hook contract** — `preValidationGate` RETURNS a refusal
|
|
3114
|
+
* instead of throwing; the handler owns the envelope and
|
|
3115
|
+
* projects it before the handler's OWN input parse (after the
|
|
3116
|
+
* SDK's declared-shape validation, so a wire-malformed call
|
|
3117
|
+
* never reaches a gate). A gate that throws to refuse is a
|
|
3118
|
+
* conformance failure, observable in the `tool_invoked` line.
|
|
3119
|
+
* r6. **Conformance:** two catalogs — `refusal-envelope-conformance`
|
|
3120
|
+
* (the projection obligation, graded against a kit-local
|
|
3121
|
+
* reference and against the shipping projector in
|
|
3122
|
+
* `@ggui-ai/mcp-server-handlers`) and `registry-completeness`
|
|
3123
|
+
* (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
|
+
* r7. **Tool output shapes are protocol-owned (ggui#817 part C):**
|
|
3134
|
+
* seven schemas — search / featured / validate / consume's
|
|
3135
|
+
* host-context projection / list_sessions' summary / runtime_pull's
|
|
3136
|
+
* page / get_session — registered as `.shape`, types derived and
|
|
3137
|
+
* wearing `DeepReadonly` at the seam; `ggui_get_session`'s wire is the
|
|
3138
|
+
* projection (`variant` + six base fields, `contextSnapshot` when the
|
|
3139
|
+
* row has one), never a `GguiSession` — the alias was a lie the
|
|
3140
|
+
* strip-parse hid. No `.readonly()` in a wire schema (zod 4 projects
|
|
3141
|
+
* it as `readOnly`).
|
|
3142
|
+
* r8. **`infra.model` route grammar (ggui#818):** either wire form —
|
|
3143
|
+
* canonical `provider:model` or LiteLLM `provider/model`, aliases in
|
|
3144
|
+
* both — or the handler's route guard fails at zod path `infra.model`
|
|
3145
|
+
* BEFORE the pre-generation gate (`renderInputRouteGuardSchema`, the
|
|
3146
|
+
* grammar and nothing else, so `{}` still reaches the gate per r5); the
|
|
3147
|
+
* full envelope (`renderInputEnvelopeSchema`) parses after the gate.
|
|
3148
|
+
* Bare model ids are out.
|
|
3075
3149
|
*/
|
|
3076
|
-
export const PROTOCOL_VERSION = "draft-2026-
|
|
3150
|
+
export const PROTOCOL_VERSION = "draft-2026-09-04";
|
|
3077
3151
|
/**
|
|
3078
3152
|
* The shipped `@ggui-ai/*` WAVE version — bare semver, identical to
|
|
3079
3153
|
* `package.json#version` on every published package (the lockstep
|
|
@@ -3090,7 +3164,7 @@ export const PROTOCOL_VERSION = "draft-2026-08-19";
|
|
|
3090
3164
|
* `STDLIB_GADGETS_VERSION` and `agent-server`'s `CLIENT_INFO`), and the
|
|
3091
3165
|
* `/release:cut` straggler list names it so the bump is mechanical.
|
|
3092
3166
|
*/
|
|
3093
|
-
export const GGUI_WAVE_VERSION = "0.
|
|
3167
|
+
export const GGUI_WAVE_VERSION = "0.14.0";
|
|
3094
3168
|
/**
|
|
3095
3169
|
* Schema version stamped onto wire envelopes that opt into the
|
|
3096
3170
|
* `schemaVersion` forward-compat field (see {@link ActionEnvelope},
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"sideEffects": [
|
|
5
|
+
"./dist/schemas/sync-check.js",
|
|
6
|
+
"./dist/validation/ajv-runtime.js"
|
|
7
|
+
],
|
|
4
8
|
"description": "ggui protocol types — events, renders, WebSocket, MCP, LLM models",
|
|
5
9
|
"license": "Apache-2.0",
|
|
6
10
|
"keywords": [
|
|
@@ -112,11 +116,11 @@
|
|
|
112
116
|
"access": "public"
|
|
113
117
|
},
|
|
114
118
|
"engines": {
|
|
115
|
-
"node": ">=
|
|
119
|
+
"node": ">=22.0.0"
|
|
116
120
|
},
|
|
117
121
|
"author": "ggui contributors <hello@ggui.ai>",
|
|
118
122
|
"scripts": {
|
|
119
|
-
"build": "rm -rf dist && tsc && node ../scripts/fix-esm-imports.mjs dist",
|
|
123
|
+
"build": "rm -rf dist.staging-$$ && tsc --outDir dist.staging-$$ && node ../scripts/fix-esm-imports.mjs dist.staging-$$ && node ../scripts/atomic-swap.mjs dist.staging-$$ dist",
|
|
120
124
|
"dev": "tsc --watch",
|
|
121
125
|
"typecheck": "tsc --noEmit",
|
|
122
126
|
"sync-check": "tsx src/schemas/sync-check.ts",
|