@ggui-ai/protocol 0.9.0 → 0.10.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 (59) hide show
  1. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  2. package/dist/gadgets/stdlib-gadgets.d.ts.map +1 -1
  3. package/dist/gadgets/stdlib-gadgets.js +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +7 -0
  7. package/dist/integrations/mcp-apps.d.ts +50 -1
  8. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  9. package/dist/integrations/mcp-apps.js +67 -1
  10. package/dist/registry/props-schema-hash.d.ts +3 -0
  11. package/dist/registry/props-schema-hash.d.ts.map +1 -0
  12. package/dist/registry/props-schema-hash.js +23 -0
  13. package/dist/schemas/blueprint.d.ts +2 -0
  14. package/dist/schemas/blueprint.d.ts.map +1 -1
  15. package/dist/schemas/blueprint.js +9 -0
  16. package/dist/schemas/data-contract.d.ts +61 -7
  17. package/dist/schemas/data-contract.d.ts.map +1 -1
  18. package/dist/schemas/data-contract.js +73 -14
  19. package/dist/schemas/handshake-suggestion.d.ts +3 -6
  20. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  21. package/dist/schemas/handshake-suggestion.js +11 -9
  22. package/dist/schemas/mcp.d.ts +20 -0
  23. package/dist/schemas/mcp.d.ts.map +1 -1
  24. package/dist/schemas/mcp.js +15 -1
  25. package/dist/schemas/ops-blueprint.d.ts +19 -10
  26. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  27. package/dist/schemas/ops-blueprint.js +39 -10
  28. package/dist/types/blueprint.d.ts +12 -0
  29. package/dist/types/blueprint.d.ts.map +1 -1
  30. package/dist/types/contract-inference.d.ts +5 -1
  31. package/dist/types/contract-inference.d.ts.map +1 -1
  32. package/dist/types/data-contract.d.ts +12 -2
  33. package/dist/types/data-contract.d.ts.map +1 -1
  34. package/dist/types/llm-route.d.ts +1 -1
  35. package/dist/types/llm-route.d.ts.map +1 -1
  36. package/dist/types/llm-route.js +1 -0
  37. package/dist/types/llm.d.ts +1 -1
  38. package/dist/types/llm.d.ts.map +1 -1
  39. package/dist/types/llm.js +22 -5
  40. package/dist/types/mcp.d.ts +26 -3
  41. package/dist/types/mcp.d.ts.map +1 -1
  42. package/dist/types/render.d.ts +33 -0
  43. package/dist/types/render.d.ts.map +1 -1
  44. package/dist/types/render.js +26 -1
  45. package/dist/validation/ajv-runtime.d.ts +26 -6
  46. package/dist/validation/ajv-runtime.d.ts.map +1 -1
  47. package/dist/validation/ajv-runtime.js +87 -9
  48. package/dist/validation/contract-validator.d.ts +104 -33
  49. package/dist/validation/contract-validator.d.ts.map +1 -1
  50. package/dist/validation/contract-validator.js +152 -42
  51. package/dist/validation/enforced-props-schema.d.ts +56 -0
  52. package/dist/validation/enforced-props-schema.d.ts.map +1 -0
  53. package/dist/validation/enforced-props-schema.js +232 -0
  54. package/dist/validation/schema-subset.d.ts.map +1 -1
  55. package/dist/validation/schema-subset.js +27 -10
  56. package/dist/version.d.ts +169 -2
  57. package/dist/version.d.ts.map +1 -1
  58. package/dist/version.js +168 -1
  59. package/package.json +7 -1
package/dist/version.d.ts CHANGED
@@ -6,6 +6,131 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * Authored source rides blueprint reuse (2026-08-14, additive,
10
+ * pre-launch). Cache-reuse renders (a repeated prompt semantic-matches
11
+ * a cached blueprint) previously committed without authored
12
+ * `sourceCode` — structurally, not incidentally: the reuse-commit path
13
+ * never carried it, and blueprint registry rows never persisted it, so
14
+ * `ggui_get_render_source` always returned `render_source_unavailable`
15
+ * for every reuse render.
16
+ *
17
+ * sc1. **`Blueprint.sourceCodeHash?: string`** added to
18
+ * `@ggui-ai/protocol` — content hash (`CodeStore.hashOf`) of the
19
+ * AUTHORED, pre-compile source body, distinct from the existing
20
+ * `codeHash` (compiled `componentCode`). The body itself is never
21
+ * stored on the row — persistent adapters keep vector/metadata
22
+ * rows small and content-address the body through the same
23
+ * `CodeStore` seam `codeHash` already implies. Absent on legacy
24
+ * rows and on blueprints with no authored form distinct from
25
+ * their compiled output.
26
+ *
27
+ * sc2. **Registration threads it through.** `registerBlueprint`
28
+ * (`@ggui-ai/mcp-server-handlers`) gains an optional
29
+ * `sourceCode` input; when present, distinct from the compiled
30
+ * `componentCode` (fallback-collapse symmetry — a byte-identical
31
+ * pair is never worth persisting, since the read-side envelope
32
+ * guard would reject it anyway), and a `CodeStore` is bound, the
33
+ * registry computes + persists `sourceCodeHash` on the row and
34
+ * writes the body through the durability `CodeStore` (body-
35
+ * before-row ordering, same orphan-body-beats-dangling-pointer
36
+ * posture as the existing compiled-code write). New durability
37
+ * event `blueprint_source_write_failed` (additive, sibling to
38
+ * `blueprint_code_write_failed`) on a failed body write — the row
39
+ * still commits with the hash; a reuse read against a missing
40
+ * body degrades gracefully to `render_source_unavailable`, never
41
+ * an error.
42
+ *
43
+ * sc3. **Reuse commit threads it back.** The cache-hit reuse branch
44
+ * resolves the body from `CodeStore` by the stored hash and
45
+ * stamps it onto `GenerationCacheHit.sourceCode`, which
46
+ * `commitCachedGguiSession` sidecars onto the render exactly like
47
+ * the cold-gen commit path already does — reuse renders now serve
48
+ * `ggui_get_render_source` identically to cold-gen renders.
49
+ *
50
+ * Conformance-kit verdict: no kit entry required — additive optional
51
+ * fields + a new durability event, no existing wire shape changed, no
52
+ * MCP tool name/shape touched.
53
+ *
54
+ * Package version — classification MADE here: PATCH for
55
+ * `@ggui-ai/protocol` (additive optional field, no new export),
56
+ * MINOR for `@ggui-ai/mcp-server-handlers` (new optional input field +
57
+ * new event), pre-1.0 and pre-launch. PROTOCOL_VERSION unchanged.
58
+ * --------------------------------------------------------------------
59
+ * ops-blueprint appId input + app-access seam (2026-08-14, additive,
60
+ * pre-launch, ggui#501). Cross-app curation seam for the operator-
61
+ * class blueprint family — the prerequisite for the family mounting
62
+ * beyond the OSS default server.
63
+ *
64
+ * ob1. **Optional `appId` input** on all five `ggui_ops_*_blueprint`
65
+ * tools (`generate`, `register`, `list`, `update`, `delete`).
66
+ * Omitted ⇒ resolves to the caller's bound `ctx.appId` (unchanged
67
+ * default behavior). Present ⇒ the tool curates the NAMED app
68
+ * instead, subject to the authorizer below.
69
+ *
70
+ * ob2. **`authorizeAppAccess` dep seam**
71
+ * (`OpsBlueprintAppAuthorizer`, exported from
72
+ * `@ggui-ai/mcp-server-handlers`'s ops-blueprint barrel):
73
+ * consulted via `resolveEffectiveAppId` on every resolution,
74
+ * bound or unbound `appId` input alike. Seam unbound ⇒ legacy
75
+ * bound-only posture — a cross-app `appId` input (different from
76
+ * `ctx.appId`) rejects with the new `cross_app_curation_unavailable`
77
+ * named code, mirroring the `app_scoped_keys_unavailable` idiom
78
+ * from the 2026-07-29 ops slice. Seam bound and denying ⇒
79
+ * `app_curation_denied` with a `not_found` / `not_owner` reason.
80
+ * `@ggui-ai/mcp-server`'s default server binds an allow-all
81
+ * authorizer when the operator supplies none — the
82
+ * single-operator trust model: whoever runs the server operates
83
+ * every app on it.
84
+ *
85
+ * ob3. **Deployment boundary retired.** The restriction that pinned
86
+ * this family to the OSS default server only (2026-08-13 ruling,
87
+ * ggui#496) is retired: the family now mounts on any control
88
+ * plane whose deployment supplies the store/search/authorizer
89
+ * deps. Single-operator deployments bind an allow-all
90
+ * authorizer; multi-user deployments supply one that enforces
91
+ * their ownership model.
92
+ *
93
+ * Conformance-kit verdict: ops tools are not conformance-kit surface —
94
+ * NO protocol stamp roll.
95
+ *
96
+ * Package version — classification MADE here: MINOR for
97
+ * `@ggui-ai/protocol`, `@ggui-ai/mcp-server-handlers`,
98
+ * `@ggui-ai/mcp-server` (additive), pre-1.0 and pre-launch.
99
+ * PROTOCOL_VERSION unchanged.
100
+ * --------------------------------------------------------------------
101
+ * `ggui_get_render_source` data-plane tool (2026-08-14, additive,
102
+ * pre-launch, ggui#282). New bare-wire-name MCP tool, `agent`
103
+ * audience — the calling app reads the generated source of its OWN
104
+ * render as `{sessionId, blueprint: {source, contract?,
105
+ * fixtureProps?}}`. New input shape `getRenderSourceInputShape`
106
+ * (mirrors `getSessionInputShape`) and output type
107
+ * `GguiGetRenderSourceOutput` added to `@ggui-ai/protocol`; new
108
+ * factory `createGguiGetRenderSourceHandler` (modeled on
109
+ * `createGguiGetSessionHandler` — same tenancy posture via
110
+ * `ctx.appId`, no heartbeat) plus the shared
111
+ * `buildRenderSourceEnvelope` helper added to
112
+ * `@ggui-ai/mcp-server-handlers`. The pre-existing control-plane
113
+ * `ggui_ops_get_render_source` (cloud-only, connector-key tenancy —
114
+ * a different caller, unchanged contract) now imports the SAME
115
+ * shared helper so the two tools' envelope shape cannot drift apart;
116
+ * a behavior-neutral refactor pinned by an envelope-equivalence test.
117
+ * No existing wire shape changed.
118
+ *
119
+ * Conformance-kit verdict: no kit entry required. The kit's WS
120
+ * live-channel conformance surface (`@ggui-ai/protocol-conformance`)
121
+ * has zero enumeration of MCP tool names anywhere in its source —
122
+ * verified by grepping the package for `ggui_` tool-name references
123
+ * outside its fixtures/tests, which returns nothing; it grades
124
+ * `GguiSessionChannelServer` wire-frame behavior (ack/error/data,
125
+ * echoed requestId, session-state read-back), a surface this
126
+ * addition never touches.
127
+ *
128
+ * Package version — the classification is MADE here, not deferred:
129
+ * MINOR for `@ggui-ai/protocol` (new exports, additive) and
130
+ * `@ggui-ai/mcp-server-handlers` (new factory + shared helper,
131
+ * additive), pre-1.0 and pre-launch. PROTOCOL_VERSION is unchanged —
132
+ * no WS envelope moved.
133
+ * --------------------------------------------------------------------
9
134
  * MCP tool bindings & discovery (2026-08-10, additive, pre-launch,
10
135
  * ggui#259). Artifacts gain an optional MCP tool-binding list and
11
136
  * registry search gains a tool dimension, connecting the two
@@ -304,6 +429,23 @@
304
429
  * it), not a new member.
305
430
  *
306
431
  * --------------------------------------------------------------------
432
+ * Render outcome facet (2026-08-13, ggui#495; rides the next cut
433
+ * after 0.9.0 — additive MINOR): `ComponentGguiSession` gains
434
+ * `errorCode?: RenderErrorCode` — the SAME closed enum the §7.1
435
+ * failure envelope carries, persisted on the committed error render
436
+ * beside the existing `error` message (invariant: `errorCode` ⇒
437
+ * `error`; one writer, the failure commit). Deliberately NOT a new
438
+ * `GguiSessionStatus` member: outcome ⊥ lifecycle — errored rows
439
+ * still TTL-expire. New exported predicate `isErroredGguiSession` +
440
+ * accessor `erroredGguiSessionCode` are the single normative
441
+ * definition of "errored" (message-only legacy rows count); store
442
+ * `erroredOnly` filters (GguiSessionFilter, all three stores) and
443
+ * `ggui_ops_list_recent_renders`' new `erroredOnly` arg + per-row
444
+ * `errorCode` derive from them. The canonical `RenderErrorCode` type
445
+ * declaration moved from `types/mcp.ts` beside its schema in
446
+ * `schemas/mcp.ts` (types/mcp re-exports — import paths unchanged).
447
+ *
448
+ * --------------------------------------------------------------------
307
449
  * React/RN SDK-surface retirement (2026-08-13, owner ruling; rides
308
450
  * the same next cut ≥ 0.9.0): `@ggui-ai/react` + `@ggui-ai/react-
309
451
  * native` are MCP Apps HOST-HELPER libraries, not SDKs — embeds mount
@@ -2905,8 +3047,33 @@
2905
3047
  * and the WS frame discriminators `'render'` / `'render_event'`.
2906
3048
  * OSS-first; the cloud pod follows at its next image build. See
2907
3049
  * `docs/protocol/migrations/2026-06-05-gguisession-reintroduction.md`.
3050
+ *
3051
+ * draft-2026-08-19 — SCHEMA-PRECISE RENDER (additive minor; frozen
3052
+ * shape per the 2026-08-19 consumer review, design record
3053
+ * `docs/plans/2026-08-19-schema-precise-render.md`):
3054
+ *
3055
+ * c1. **Enforced props schema on the handshake output** (SPEC
3056
+ * §2.3.2 + §7.1.1). `GguiHandshakeOutput` gains `propsSchema?`
3057
+ * (the exact schema the paired render enforces, emission form,
3058
+ * RFC 8785-canonical construction), `propsSchemaHash?` (sha256
3059
+ * over the canonical bytes; on EVERY non-declined handshake) and
3060
+ * `propsSchemaProfile?` ('grammar-safe' | 'full'; unknown values
3061
+ * degrade to 'full'). The record persists the artifact and
3062
+ * `ggui_render` validates against the PERSISTED value — the
3063
+ * AUTHORITY obligation is structural under version skew.
3064
+ * c2. **`ContractViolation.keyword`** (additive) + **`propsSchemaHash`
3065
+ * on `contract_violation` error data** — the failure-class
3066
+ * segmentation and breach-classifier surfaces (SPEC §7.9).
3067
+ * c3. **`JsonSchema.type` admits draft-07 type arrays**
3068
+ * (`['string','null']` — the canonical nullability form the
3069
+ * emission rewrites OpenAPI `nullable: true` into). Acceptance
3070
+ * widening only; the schema-subset checker compares type SETS.
3071
+ * c4. **Conformance:** the `props-schema-conformance` catalog
3072
+ * (drift / hash / profile / authority obligations; pins the
3073
+ * 2026-08-19 out-of-vocabulary enum incident as a permanent
3074
+ * sample).
2908
3075
  */
2909
- export declare const PROTOCOL_VERSION = "draft-2026-06-12";
3076
+ export declare const PROTOCOL_VERSION = "draft-2026-08-19";
2910
3077
  /**
2911
3078
  * Schema version stamped onto wire envelopes that opt into the
2912
3079
  * `schemaVersion` forward-compat field (see {@link ActionEnvelope},
@@ -2927,7 +3094,7 @@ export declare const PROTOCOL_VERSION = "draft-2026-06-12";
2927
3094
  * consumers can reference schema-versioning specifically without
2928
3095
  * coupling to the broader cache-invalidation constant.
2929
3096
  */
2930
- export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-06-12";
3097
+ export declare const PROTOCOL_SCHEMA_VERSION = "draft-2026-08-19";
2931
3098
  /**
2932
3099
  * Canonical live-channel error code emitted when a peer's declared
2933
3100
  * {@link SubscribePayload.supportedVersions} /
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;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
@@ -6,6 +6,131 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * Authored source rides blueprint reuse (2026-08-14, additive,
10
+ * pre-launch). Cache-reuse renders (a repeated prompt semantic-matches
11
+ * a cached blueprint) previously committed without authored
12
+ * `sourceCode` — structurally, not incidentally: the reuse-commit path
13
+ * never carried it, and blueprint registry rows never persisted it, so
14
+ * `ggui_get_render_source` always returned `render_source_unavailable`
15
+ * for every reuse render.
16
+ *
17
+ * sc1. **`Blueprint.sourceCodeHash?: string`** added to
18
+ * `@ggui-ai/protocol` — content hash (`CodeStore.hashOf`) of the
19
+ * AUTHORED, pre-compile source body, distinct from the existing
20
+ * `codeHash` (compiled `componentCode`). The body itself is never
21
+ * stored on the row — persistent adapters keep vector/metadata
22
+ * rows small and content-address the body through the same
23
+ * `CodeStore` seam `codeHash` already implies. Absent on legacy
24
+ * rows and on blueprints with no authored form distinct from
25
+ * their compiled output.
26
+ *
27
+ * sc2. **Registration threads it through.** `registerBlueprint`
28
+ * (`@ggui-ai/mcp-server-handlers`) gains an optional
29
+ * `sourceCode` input; when present, distinct from the compiled
30
+ * `componentCode` (fallback-collapse symmetry — a byte-identical
31
+ * pair is never worth persisting, since the read-side envelope
32
+ * guard would reject it anyway), and a `CodeStore` is bound, the
33
+ * registry computes + persists `sourceCodeHash` on the row and
34
+ * writes the body through the durability `CodeStore` (body-
35
+ * before-row ordering, same orphan-body-beats-dangling-pointer
36
+ * posture as the existing compiled-code write). New durability
37
+ * event `blueprint_source_write_failed` (additive, sibling to
38
+ * `blueprint_code_write_failed`) on a failed body write — the row
39
+ * still commits with the hash; a reuse read against a missing
40
+ * body degrades gracefully to `render_source_unavailable`, never
41
+ * an error.
42
+ *
43
+ * sc3. **Reuse commit threads it back.** The cache-hit reuse branch
44
+ * resolves the body from `CodeStore` by the stored hash and
45
+ * stamps it onto `GenerationCacheHit.sourceCode`, which
46
+ * `commitCachedGguiSession` sidecars onto the render exactly like
47
+ * the cold-gen commit path already does — reuse renders now serve
48
+ * `ggui_get_render_source` identically to cold-gen renders.
49
+ *
50
+ * Conformance-kit verdict: no kit entry required — additive optional
51
+ * fields + a new durability event, no existing wire shape changed, no
52
+ * MCP tool name/shape touched.
53
+ *
54
+ * Package version — classification MADE here: PATCH for
55
+ * `@ggui-ai/protocol` (additive optional field, no new export),
56
+ * MINOR for `@ggui-ai/mcp-server-handlers` (new optional input field +
57
+ * new event), pre-1.0 and pre-launch. PROTOCOL_VERSION unchanged.
58
+ * --------------------------------------------------------------------
59
+ * ops-blueprint appId input + app-access seam (2026-08-14, additive,
60
+ * pre-launch, ggui#501). Cross-app curation seam for the operator-
61
+ * class blueprint family — the prerequisite for the family mounting
62
+ * beyond the OSS default server.
63
+ *
64
+ * ob1. **Optional `appId` input** on all five `ggui_ops_*_blueprint`
65
+ * tools (`generate`, `register`, `list`, `update`, `delete`).
66
+ * Omitted ⇒ resolves to the caller's bound `ctx.appId` (unchanged
67
+ * default behavior). Present ⇒ the tool curates the NAMED app
68
+ * instead, subject to the authorizer below.
69
+ *
70
+ * ob2. **`authorizeAppAccess` dep seam**
71
+ * (`OpsBlueprintAppAuthorizer`, exported from
72
+ * `@ggui-ai/mcp-server-handlers`'s ops-blueprint barrel):
73
+ * consulted via `resolveEffectiveAppId` on every resolution,
74
+ * bound or unbound `appId` input alike. Seam unbound ⇒ legacy
75
+ * bound-only posture — a cross-app `appId` input (different from
76
+ * `ctx.appId`) rejects with the new `cross_app_curation_unavailable`
77
+ * named code, mirroring the `app_scoped_keys_unavailable` idiom
78
+ * from the 2026-07-29 ops slice. Seam bound and denying ⇒
79
+ * `app_curation_denied` with a `not_found` / `not_owner` reason.
80
+ * `@ggui-ai/mcp-server`'s default server binds an allow-all
81
+ * authorizer when the operator supplies none — the
82
+ * single-operator trust model: whoever runs the server operates
83
+ * every app on it.
84
+ *
85
+ * ob3. **Deployment boundary retired.** The restriction that pinned
86
+ * this family to the OSS default server only (2026-08-13 ruling,
87
+ * ggui#496) is retired: the family now mounts on any control
88
+ * plane whose deployment supplies the store/search/authorizer
89
+ * deps. Single-operator deployments bind an allow-all
90
+ * authorizer; multi-user deployments supply one that enforces
91
+ * their ownership model.
92
+ *
93
+ * Conformance-kit verdict: ops tools are not conformance-kit surface —
94
+ * NO protocol stamp roll.
95
+ *
96
+ * Package version — classification MADE here: MINOR for
97
+ * `@ggui-ai/protocol`, `@ggui-ai/mcp-server-handlers`,
98
+ * `@ggui-ai/mcp-server` (additive), pre-1.0 and pre-launch.
99
+ * PROTOCOL_VERSION unchanged.
100
+ * --------------------------------------------------------------------
101
+ * `ggui_get_render_source` data-plane tool (2026-08-14, additive,
102
+ * pre-launch, ggui#282). New bare-wire-name MCP tool, `agent`
103
+ * audience — the calling app reads the generated source of its OWN
104
+ * render as `{sessionId, blueprint: {source, contract?,
105
+ * fixtureProps?}}`. New input shape `getRenderSourceInputShape`
106
+ * (mirrors `getSessionInputShape`) and output type
107
+ * `GguiGetRenderSourceOutput` added to `@ggui-ai/protocol`; new
108
+ * factory `createGguiGetRenderSourceHandler` (modeled on
109
+ * `createGguiGetSessionHandler` — same tenancy posture via
110
+ * `ctx.appId`, no heartbeat) plus the shared
111
+ * `buildRenderSourceEnvelope` helper added to
112
+ * `@ggui-ai/mcp-server-handlers`. The pre-existing control-plane
113
+ * `ggui_ops_get_render_source` (cloud-only, connector-key tenancy —
114
+ * a different caller, unchanged contract) now imports the SAME
115
+ * shared helper so the two tools' envelope shape cannot drift apart;
116
+ * a behavior-neutral refactor pinned by an envelope-equivalence test.
117
+ * No existing wire shape changed.
118
+ *
119
+ * Conformance-kit verdict: no kit entry required. The kit's WS
120
+ * live-channel conformance surface (`@ggui-ai/protocol-conformance`)
121
+ * has zero enumeration of MCP tool names anywhere in its source —
122
+ * verified by grepping the package for `ggui_` tool-name references
123
+ * outside its fixtures/tests, which returns nothing; it grades
124
+ * `GguiSessionChannelServer` wire-frame behavior (ack/error/data,
125
+ * echoed requestId, session-state read-back), a surface this
126
+ * addition never touches.
127
+ *
128
+ * Package version — the classification is MADE here, not deferred:
129
+ * MINOR for `@ggui-ai/protocol` (new exports, additive) and
130
+ * `@ggui-ai/mcp-server-handlers` (new factory + shared helper,
131
+ * additive), pre-1.0 and pre-launch. PROTOCOL_VERSION is unchanged —
132
+ * no WS envelope moved.
133
+ * --------------------------------------------------------------------
9
134
  * MCP tool bindings & discovery (2026-08-10, additive, pre-launch,
10
135
  * ggui#259). Artifacts gain an optional MCP tool-binding list and
11
136
  * registry search gains a tool dimension, connecting the two
@@ -304,6 +429,23 @@
304
429
  * it), not a new member.
305
430
  *
306
431
  * --------------------------------------------------------------------
432
+ * Render outcome facet (2026-08-13, ggui#495; rides the next cut
433
+ * after 0.9.0 — additive MINOR): `ComponentGguiSession` gains
434
+ * `errorCode?: RenderErrorCode` — the SAME closed enum the §7.1
435
+ * failure envelope carries, persisted on the committed error render
436
+ * beside the existing `error` message (invariant: `errorCode` ⇒
437
+ * `error`; one writer, the failure commit). Deliberately NOT a new
438
+ * `GguiSessionStatus` member: outcome ⊥ lifecycle — errored rows
439
+ * still TTL-expire. New exported predicate `isErroredGguiSession` +
440
+ * accessor `erroredGguiSessionCode` are the single normative
441
+ * definition of "errored" (message-only legacy rows count); store
442
+ * `erroredOnly` filters (GguiSessionFilter, all three stores) and
443
+ * `ggui_ops_list_recent_renders`' new `erroredOnly` arg + per-row
444
+ * `errorCode` derive from them. The canonical `RenderErrorCode` type
445
+ * declaration moved from `types/mcp.ts` beside its schema in
446
+ * `schemas/mcp.ts` (types/mcp re-exports — import paths unchanged).
447
+ *
448
+ * --------------------------------------------------------------------
307
449
  * React/RN SDK-surface retirement (2026-08-13, owner ruling; rides
308
450
  * the same next cut ≥ 0.9.0): `@ggui-ai/react` + `@ggui-ai/react-
309
451
  * native` are MCP Apps HOST-HELPER libraries, not SDKs — embeds mount
@@ -2905,8 +3047,33 @@
2905
3047
  * and the WS frame discriminators `'render'` / `'render_event'`.
2906
3048
  * OSS-first; the cloud pod follows at its next image build. See
2907
3049
  * `docs/protocol/migrations/2026-06-05-gguisession-reintroduction.md`.
3050
+ *
3051
+ * draft-2026-08-19 — SCHEMA-PRECISE RENDER (additive minor; frozen
3052
+ * shape per the 2026-08-19 consumer review, design record
3053
+ * `docs/plans/2026-08-19-schema-precise-render.md`):
3054
+ *
3055
+ * c1. **Enforced props schema on the handshake output** (SPEC
3056
+ * §2.3.2 + §7.1.1). `GguiHandshakeOutput` gains `propsSchema?`
3057
+ * (the exact schema the paired render enforces, emission form,
3058
+ * RFC 8785-canonical construction), `propsSchemaHash?` (sha256
3059
+ * over the canonical bytes; on EVERY non-declined handshake) and
3060
+ * `propsSchemaProfile?` ('grammar-safe' | 'full'; unknown values
3061
+ * degrade to 'full'). The record persists the artifact and
3062
+ * `ggui_render` validates against the PERSISTED value — the
3063
+ * AUTHORITY obligation is structural under version skew.
3064
+ * c2. **`ContractViolation.keyword`** (additive) + **`propsSchemaHash`
3065
+ * on `contract_violation` error data** — the failure-class
3066
+ * segmentation and breach-classifier surfaces (SPEC §7.9).
3067
+ * c3. **`JsonSchema.type` admits draft-07 type arrays**
3068
+ * (`['string','null']` — the canonical nullability form the
3069
+ * emission rewrites OpenAPI `nullable: true` into). Acceptance
3070
+ * widening only; the schema-subset checker compares type SETS.
3071
+ * c4. **Conformance:** the `props-schema-conformance` catalog
3072
+ * (drift / hash / profile / authority obligations; pins the
3073
+ * 2026-08-19 out-of-vocabulary enum incident as a permanent
3074
+ * sample).
2908
3075
  */
2909
- export const PROTOCOL_VERSION = "draft-2026-06-12";
3076
+ export const PROTOCOL_VERSION = "draft-2026-08-19";
2910
3077
  /**
2911
3078
  * Schema version stamped onto wire envelopes that opt into the
2912
3079
  * `schemaVersion` forward-compat field (see {@link ActionEnvelope},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/protocol",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "ggui protocol types — events, renders, WebSocket, MCP, LLM models",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -50,6 +50,12 @@
50
50
  "require": "./dist/registry/blueprint-key.js",
51
51
  "default": "./dist/registry/blueprint-key.js"
52
52
  },
53
+ "./props-schema-hash": {
54
+ "types": "./dist/registry/props-schema-hash.d.ts",
55
+ "import": "./dist/registry/props-schema-hash.js",
56
+ "require": "./dist/registry/props-schema-hash.js",
57
+ "default": "./dist/registry/props-schema-hash.js"
58
+ },
53
59
  "./transport/websocket": {
54
60
  "types": "./dist/transport/websocket.d.ts",
55
61
  "import": "./dist/transport/websocket.js",