@ggui-ai/protocol 0.8.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 (75) 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/epoch-uri.d.ts +42 -0
  8. package/dist/integrations/epoch-uri.d.ts.map +1 -0
  9. package/dist/integrations/epoch-uri.js +48 -0
  10. package/dist/integrations/mcp-apps.d.ts +139 -6
  11. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  12. package/dist/integrations/mcp-apps.js +117 -2
  13. package/dist/registry/props-schema-hash.d.ts +3 -0
  14. package/dist/registry/props-schema-hash.d.ts.map +1 -0
  15. package/dist/registry/props-schema-hash.js +23 -0
  16. package/dist/schemas/blueprint.d.ts +2 -0
  17. package/dist/schemas/blueprint.d.ts.map +1 -1
  18. package/dist/schemas/blueprint.js +9 -0
  19. package/dist/schemas/data-contract.d.ts +61 -7
  20. package/dist/schemas/data-contract.d.ts.map +1 -1
  21. package/dist/schemas/data-contract.js +73 -14
  22. package/dist/schemas/handshake-suggestion.d.ts +3 -6
  23. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  24. package/dist/schemas/handshake-suggestion.js +11 -9
  25. package/dist/schemas/invoke.d.ts +1 -1
  26. package/dist/schemas/invoke.js +1 -1
  27. package/dist/schemas/mcp.d.ts +238 -6
  28. package/dist/schemas/mcp.d.ts.map +1 -1
  29. package/dist/schemas/mcp.js +286 -14
  30. package/dist/schemas/ops-blueprint.d.ts +19 -10
  31. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  32. package/dist/schemas/ops-blueprint.js +39 -10
  33. package/dist/types/blueprint.d.ts +12 -0
  34. package/dist/types/blueprint.d.ts.map +1 -1
  35. package/dist/types/contract-inference.d.ts +5 -1
  36. package/dist/types/contract-inference.d.ts.map +1 -1
  37. package/dist/types/data-contract.d.ts +14 -4
  38. package/dist/types/data-contract.d.ts.map +1 -1
  39. package/dist/types/ggui-session-event.d.ts +42 -1
  40. package/dist/types/ggui-session-event.d.ts.map +1 -1
  41. package/dist/types/ggui-session-event.js +16 -1
  42. package/dist/types/live-channel.d.ts +8 -0
  43. package/dist/types/live-channel.d.ts.map +1 -1
  44. package/dist/types/llm-route.d.ts +3 -3
  45. package/dist/types/llm-route.d.ts.map +1 -1
  46. package/dist/types/llm-route.js +27 -8
  47. package/dist/types/llm.d.ts +1 -1
  48. package/dist/types/llm.d.ts.map +1 -1
  49. package/dist/types/llm.js +22 -5
  50. package/dist/types/mcp.d.ts +53 -3
  51. package/dist/types/mcp.d.ts.map +1 -1
  52. package/dist/types/render.d.ts +45 -0
  53. package/dist/types/render.d.ts.map +1 -1
  54. package/dist/types/render.js +26 -1
  55. package/dist/types/ui-generator.d.ts +20 -3
  56. package/dist/types/ui-generator.d.ts.map +1 -1
  57. package/dist/validation/ajv-runtime.d.ts +26 -6
  58. package/dist/validation/ajv-runtime.d.ts.map +1 -1
  59. package/dist/validation/ajv-runtime.js +87 -9
  60. package/dist/validation/contract-validator.d.ts +106 -35
  61. package/dist/validation/contract-validator.d.ts.map +1 -1
  62. package/dist/validation/contract-validator.js +152 -42
  63. package/dist/validation/enforced-props-schema.d.ts +56 -0
  64. package/dist/validation/enforced-props-schema.d.ts.map +1 -0
  65. package/dist/validation/enforced-props-schema.js +232 -0
  66. package/dist/validation/resolve-stream-channel.d.ts +2 -2
  67. package/dist/validation/resolve-stream-channel.js +2 -2
  68. package/dist/validation/schema-subset.d.ts.map +1 -1
  69. package/dist/validation/schema-subset.js +27 -10
  70. package/dist/validation/ui-security.d.ts +2 -2
  71. package/dist/validation/ui-security.js +2 -2
  72. package/dist/version.d.ts +319 -2
  73. package/dist/version.d.ts.map +1 -1
  74. package/dist/version.js +318 -1
  75. package/package.json +7 -1
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
@@ -236,6 +361,173 @@
236
361
  * posture), so the additive field breaks nothing. PROTOCOL_VERSION
237
362
  * unchanged — no wire frame changed shape.
238
363
  *
364
+ * SSE middle rung (2026-08-11): the failover-ladder stream surface — a
365
+ * MINOR for the `@ggui-ai/protocol` wave, deferred to the next cut
366
+ * (≥ 0.9.0) under the same one-wave-version rule as above. Two
367
+ * additive pieces, one motivation (hosts whose CSP blocks WebSocket
368
+ * but permits `EventSource`, giving the ladder a live middle rung
369
+ * between WS and cursor polling):
370
+ *
371
+ * sm1. **`McpAppAiGguiRenderMeta.sseUrl`** — optional server-stamped
372
+ * `/api/sessions/<sessionId>/stream?wsToken=<token>` URL beside
373
+ * `pollingUrl`. Every envelope that parsed before parses
374
+ * identically (tolerant scalar posture, no pairing invariant —
375
+ * the URL is self-authorizing via its embedded token). Absent ⇒
376
+ * no SSE rung; the ladder is WS → polling. The stream contract
377
+ * the URL points at (ChannelFrame-per-`data:`-line byte-same as
378
+ * the WS push, `id:` = ledger seq on replay frames only,
379
+ * `: hb` comment heartbeat ≤ ~25s, `retry: 3000` first write,
380
+ * `Last-Event-ID` over `?sinceSequence=`, 401/404/410 mirroring
381
+ * `/events`) is pinned on the interface docstring.
382
+ *
383
+ * sm2. **`composeSessionApiUrls` + `SessionApiUrls`** — the ONE
384
+ * pure composer every stamping surface (render/update resultMeta,
385
+ * self-contained shell, `/state` bootstrap) routes both URLs
386
+ * through — the `deriveRenderMeta` move applied to channel URLs.
387
+ * New exports only. This REPAIRS a confirmed drift: `/state` used
388
+ * to stamp an unconditional token-less `/state`-shaped
389
+ * pollingUrl that could only 401 through the events composer;
390
+ * both URLs now stamp ONLY when the live trio is minted, and
391
+ * omission is the honest no-HTTP-fallback signal.
392
+ *
393
+ * Conformance-kit verdict: same posture as if1 — no fixture pins the
394
+ * render slice's closed field set (verbatim-carry by design), so the
395
+ * additive field breaks nothing. Full SSE endpoint conformance cases
396
+ * are a FLAGGED follow-up (unit tests ride this slice; conformance
397
+ * ticket after launch — No Silent Block). PROTOCOL_VERSION unchanged —
398
+ * no WS envelope moved; the SSE `data:` line reuses the ChannelFrame
399
+ * shape byte for byte.
400
+ *
401
+ * --------------------------------------------------------------------
402
+ * Bridge-pull terminal rung (2026-08-11): `ggui_runtime_pull` — a
403
+ * MINOR for the `@ggui-ai/protocol` wave, riding the same next cut
404
+ * (≥ 0.9.0) as the SSE entry above. One motivation: hosts whose CSP
405
+ * blocks EVERY network API from the iframe (claude.ai's srcdoc
406
+ * sandbox) can still pull the event ledger over the host's
407
+ * `tools/call` postMessage bridge — the fourth and terminal rung of
408
+ * the failover ladder (WS → SSE → HTTP polling → bridge-pull).
409
+ *
410
+ * bp1. **`runtimePullInput/OutputSchema` + `GguiRuntimePullInput/
411
+ * Output`** — new tool contract, output byte-parity with the
412
+ * `/events` route (`EventsResponse` page arm |
413
+ * `REPLAY_HORIZON_PASSED` arm as a NORMAL result) so ONE client
414
+ * parse core serves both carriers. `_meta.ui.visibility: ['app']`
415
+ * restricts callers to MCP Apps views per spec §401.
416
+ *
417
+ * bp2. **`wait` + `RUNTIME_PULL_MAX_WAIT_SECONDS`** — the
418
+ * subscription-mode hold: an empty cursor page holds the call
419
+ * server-side (≤ 20s, under `ggui_consume`'s proven 25s host
420
+ * tolerance) until an event lands. Back-to-back held single-shots
421
+ * emulate push through a request/response-only bridge; clients
422
+ * demote to sparse un-held pulls after consecutive empty holds.
423
+ *
424
+ * Conformance-kit verdict: additive tool, no existing fixture touches
425
+ * it; bridge-carrier conformance cases join the SSE follow-up ticket
426
+ * (No Silent Block). PROTOCOL_VERSION unchanged — no WS envelope
427
+ * moved; the ledger event vocabulary gained active use of the
428
+ * existing `'ui.updated'` taxonomy member (`ggui_update` now appends
429
+ * it), not a new member.
430
+ *
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
+ * --------------------------------------------------------------------
449
+ * React/RN SDK-surface retirement (2026-08-13, owner ruling; rides
450
+ * the same next cut ≥ 0.9.0): `@ggui-ai/react` + `@ggui-ai/react-
451
+ * native` are MCP Apps HOST-HELPER libraries, not SDKs — embeds mount
452
+ * views via the spec path (`AppRenderer` / RN `McpAppIframe`) and get
453
+ * runtime semantics (freeze latch, crash card, epochs) from the
454
+ * mounted iframe itself. Deleted from `@ggui-ai/react`: `GguiRender`
455
+ * + its WS stack (`useWebSocket`, `WebSocketManager`, `EventBuffer`,
456
+ * reserved-validators), local `ThemeProvider`, `SelfRepairBoundary`
457
+ * family, `AgentBrowsePanel`, the dead wire-type re-exports, the
458
+ * public `useGguiContext`/`useAdapter`/`AdapterRegistry` barrel
459
+ * entries (impls stay internal), and `chat-thread/**` (both
460
+ * packages — third-party chat framework, zero consumers; guuey built
461
+ * `@guuey/threads` instead). RN's direct-render family was already
462
+ * deleted pre-ruling (#425, 7d5c6955b). Zero-consumer adversarially
463
+ * traced per export before deletion; guuey pins both packages at
464
+ * 0.6.3 (npm-immutable — installs unaffected; handoff note per the
465
+ * deletion discipline). Breaking TS-API shrink, 0.x MINOR carries it.
466
+ * SAME-DAY RENAME RULING: the packages republish at this cut as
467
+ * `@ggui-ai/mcp-apps-react` / `@ggui-ai/mcp-apps-react-native` —
468
+ * the names must say "MCP Apps bindings," not "SDK." Old names get
469
+ * `npm deprecate` + pointer at cut time (owner click, OTP; new names
470
+ * need Trusted Publishing setup — see release:cut).
471
+ *
472
+ * --------------------------------------------------------------------
473
+ * Mutation tool split + epoch history (2026-08-13, ggui#481→#483,
474
+ * SUPERSEDES the same-night renderAsNew param design, which never
475
+ * reached a cut): a MINOR for the `@ggui-ai/protocol` wave, riding
476
+ * the same next cut (≥ 0.9.0). One motivation arc: hosts mint
477
+ * per-result views from result shape, so mutation results must be
478
+ * either complete mount packages or carry nothing — and once every
479
+ * update result is a durable record, the records ARE a history.
480
+ *
481
+ * ts1. **`ggui_amend`** — new tool: in-place mutation of the
482
+ * mounted card. Same replace/merge grammar as update
483
+ * (`amendInputSchema`/`amendOutputSchema` + inferred types); NOT
484
+ * UI-bound, results carry NO `_meta` under any outcome; the
485
+ * history epoch is untouched by construction. Additive.
486
+ *
487
+ * ts2. **`ggui_update` semantics change, stated plainly:** every
488
+ * real update now mints a NEW history record — output gains
489
+ * mandatory `epoch` and its `resourceUri` is the epoch-PINNED
490
+ * URI (`…#N`); the result `_meta` is unconditionally the full
491
+ * bootable mount package (#481). `renderAsNew` is deleted from
492
+ * both arms. A consumer that treated update results as in-place
493
+ * acknowledgements sees new cards; the in-place path moved to
494
+ * ggui_amend. Pre-launch no-compat; the kit is the arbiter and
495
+ * update-family conformance cases ship IN THIS SLICE (epoch
496
+ * immutability, head aliasing, amend-mints-nothing), closing the
497
+ * previously flagged gap.
498
+ *
499
+ * ts3. **Epoch surfaces:** `GguiSessionBase.epoch` +
500
+ * `McpAppsGguiSession.epoch` (optional, absent ⇒ 0 — the row is
501
+ * the authority; the ledger is horizon-bounded); `'ui.reminted'`
502
+ * joins the ledger taxonomy with `UiRemintedEventData`;
503
+ * `UiUpdatedEventData` types the props event (now epoch-stamped);
504
+ * `composeEpochUri`/`parseEpochUri` (the ONE encoding seam —
505
+ * fragment today, flippable post-host-probe);
506
+ * `deriveEpochFromEvents` (in-horizon reconstruction only).
507
+ * SPEC §7.1.2/§7.1.2.1/§7.1.2.2 are the normative text.
508
+ *
509
+ * ts4. **Live-fan epoch obligation (2026-08-13 follow-up, same
510
+ * wave):** `PropsUpdatePayload.epoch` (`@ggui-ai/protocol`
511
+ * live-channel, optional on the wire) is the freeze-latch signal,
512
+ * and servers MUST stamp live `props_update` frames with the
513
+ * COMMIT-TIME epoch (SPEC §7.1.2.2). TS API surfaces moved with
514
+ * it: `PropsUpdateNotifier.sendPropsUpdate` gains a required
515
+ * `epoch` third param (`@ggui-ai/mcp-server-handlers`), as does
516
+ * `GguiSessionChannelServer.sendPropsUpdate`
517
+ * (`@ggui-ai/mcp-server`) — 2-arg callers break at compile time
518
+ * (pre-launch no-compat; 0.x MINOR carries it). Motivating
519
+ * incident: a second notifier impl (cloud pod) omitted the then-
520
+ * optional field and shipped epoch-less frames — the latch
521
+ * degraded to legacy-apply exactly as designed for skew, which
522
+ * is also the compat story: old runtime × new server ignores the
523
+ * extra field; new runtime × old server sees no epoch and
524
+ * applies as before. Graceful both directions.
525
+ *
526
+ * PROTOCOL_VERSION unchanged — no WS frame changed shape; the
527
+ * `ai.ggui/render` slice's field set was never closed, and the
528
+ * `ui.updated` / `props_update` payloads gained an optional field on
529
+ * open payload surfaces.
530
+ *
239
531
  * --------------------------------------------------------------------
240
532
  * Credential-broker surface retired (2026-08-08, BREAKING, pre-launch,
241
533
  * ggui#436). The `system` frame's auth vocabulary and the
@@ -2755,8 +3047,33 @@
2755
3047
  * and the WS frame discriminators `'render'` / `'render_event'`.
2756
3048
  * OSS-first; the cloud pod follows at its next image build. See
2757
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).
2758
3075
  */
2759
- export const PROTOCOL_VERSION = "draft-2026-06-12";
3076
+ export const PROTOCOL_VERSION = "draft-2026-08-19";
2760
3077
  /**
2761
3078
  * Schema version stamped onto wire envelopes that opt into the
2762
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.8.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",