@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
@@ -90,6 +90,20 @@ export const getSessionInputShape = {
90
90
  .describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
91
91
  };
92
92
  export const getSessionInputSchema = z.object(getSessionInputShape);
93
+ /**
94
+ * `ggui_get_render_source` input — read the generated source of the
95
+ * calling app's own render. Same shape as {@link getSessionInputShape}
96
+ * (both take only a sessionId); kept as its own named export rather
97
+ * than reused directly so each tool's wire contract is independently
98
+ * pinned, per this file's one-shape-per-tool convention.
99
+ */
100
+ export const getRenderSourceInputShape = {
101
+ sessionId: z
102
+ .string()
103
+ .min(1)
104
+ .describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
105
+ };
106
+ export const getRenderSourceInputSchema = z.object(getRenderSourceInputShape);
93
107
  /**
94
108
  * `ggui_list_featured_blueprints` input — intentionally EMPTY. The
95
109
  * pre-launch No-Backcompat scrub deleted the level/category/tags/limit
@@ -181,7 +195,7 @@ export const handshakeInputSchema = z.object({
181
195
  * and rides through to the suggestion's `blueprintMeta`.
182
196
  */
183
197
  blueprintDraft: blueprintDraftSchema
184
- .describe('Agent\'s draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).'),
198
+ .describe('Agent\'s draft — a JSON OBJECT, never a JSON-encoded string (pass {contract: {...}}, not "{\\"contract\\":...}"; a string fails input validation with -32602). Fields: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).'),
185
199
  /**
186
200
  * Skip blueprint-search on step-2 and route straight to validation
187
201
  * + (if validation passes) agent-mode suggestion against the draft.
@@ -391,7 +405,7 @@ export const renderCacheMarkerSchema = z.object({
391
405
  /**
392
406
  * Canonical failure codes for the in-result `ggui_render` failure
393
407
  * envelope (SPEC §7.9 Plane 3). Closed enum — a failed render's
394
- * `error.code` is always one of these four; finer-grained diagnostics
408
+ * `error.code` is always one of these five; finer-grained diagnostics
395
409
  * ride on `error.message`.
396
410
  *
397
411
  * - `PRODUCTION_FAILED` — generation ran but did not produce a
@@ -403,12 +417,21 @@ export const renderCacheMarkerSchema = z.object({
403
417
  * configuration has no key for the resolved route.
404
418
  * - `NO_CREDENTIALS` — no generation credentials are configured on
405
419
  * the server at all.
420
+ * - `GENERATION_QUEUE_OVERLOADED` — the deployment's generation
421
+ * admission gate rejected this request before any generation
422
+ * attempt started (concurrent-request queue full, or wait for a
423
+ * free slot exceeded the configured timeout). Distinct from
424
+ * `PRODUCTION_FAILED` by design: generation never ran, so callers
425
+ * MUST NOT bill or count it as a failed attempt. See
426
+ * {@link GenerationError} in `types/ui-generator.ts` for the full
427
+ * contract.
406
428
  */
407
429
  export const renderErrorCodeSchema = z.enum([
408
430
  'PRODUCTION_FAILED',
409
431
  'VALIDATION_ERROR',
410
432
  'NO_PLATFORM_KEY',
411
433
  'NO_CREDENTIALS',
434
+ 'GENERATION_QUEUE_OVERLOADED',
412
435
  ]);
413
436
  /**
414
437
  * In-result failure marker for `ggui_render`. Present on the wire
@@ -417,7 +440,7 @@ export const renderErrorCodeSchema = z.enum([
417
440
  * canonical failure classification.
418
441
  */
419
442
  export const renderErrorSchema = z.object({
420
- code: renderErrorCodeSchema.describe('Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server\'s managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server.'),
443
+ code: renderErrorCodeSchema.describe('Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server\'s managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server. GENERATION_QUEUE_OVERLOADED: the deployment\'s admission gate rejected the request before generation started (queue full or wait timed out) — not a failed attempt; safe to retry immediately.'),
421
444
  message: z
422
445
  .string()
423
446
  .describe('Human-readable failure detail — fold into the next attempt or surface to the operator.'),
@@ -556,8 +579,13 @@ export const renderOutputSchema = z.object({
556
579
  example: z.string(),
557
580
  args: z.object({
558
581
  sessionId: z.string(),
582
+ // The per-call long-poll window in seconds. Carried on the hint
583
+ // because consume's own default is 0 (single non-blocking
584
+ // drain): an agent copying a timeout-less hint gets an instant
585
+ // empty result and stops looping.
586
+ timeout: z.number(),
559
587
  }),
560
- }).optional().describe('Recovery hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId}) for the inbound action loop. Absent for pure-display renders.'),
588
+ }).optional().describe('Required-next-call hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId, timeout}) for the inbound action loop. Absent for pure-display renders.'),
561
589
  });
562
590
  /**
563
591
  * `ggui_update` — refresh the rendered UI with new state.
@@ -595,13 +623,34 @@ export const updateInputSchema = z.discriminatedUnion('kind', [
595
623
  sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
596
624
  kind: z.literal('replace'),
597
625
  props: z.record(z.string(), z.unknown())
598
- .describe('Full replacement props map. New map IS the new state.'),
626
+ .describe('Full replacement props map. New map IS the new state, rendered as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.'),
599
627
  }).strict(),
600
628
  z.object({
601
629
  sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
602
630
  kind: z.literal('merge'),
603
631
  patch: z.record(z.string(), z.unknown())
604
- .describe('RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace.'),
632
+ .describe('RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. The merged state renders as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.'),
633
+ }).strict(),
634
+ ]);
635
+ /**
636
+ * `ggui_amend` wire input (#483) — same replace/merge mutation
637
+ * grammar as `ggui_update`, different mount identity: amend targets
638
+ * the ALREADY-MOUNTED card. No new card, no history entry, the
639
+ * history number does not advance. Git reading: `ggui_update` =
640
+ * commit; `ggui_amend` = commit --amend.
641
+ */
642
+ export const amendInputSchema = z.discriminatedUnion('kind', [
643
+ z.object({
644
+ sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
645
+ kind: z.literal('replace'),
646
+ props: z.record(z.string(), z.unknown())
647
+ .describe('Full replacement props map, applied to the currently mounted card in place.'),
648
+ }).strict(),
649
+ z.object({
650
+ sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
651
+ kind: z.literal('merge'),
652
+ patch: z.record(z.string(), z.unknown())
653
+ .describe('RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.'),
605
654
  }).strict(),
606
655
  ]);
607
656
  /**
@@ -609,23 +658,61 @@ export const updateInputSchema = z.discriminatedUnion('kind', [
609
658
  * `decision`, `contract`, `contractHash` on its internal `UpdateOutput`
610
659
  * TS shape — zod strips them before structuredContent serialization.
611
660
  *
612
- * Post-update the iframe receives the new props via the live-channel
613
- * `props_update` WS frame; the cross-host fallback path receives them
614
- * via the `ai.ggui/render.propsJson` slice field (see
615
- * `update.resultMeta`). The wire response itself is just
616
- * acknowledgement.
661
+ * Every REAL update (`updated: true`) mints a new history record and
662
+ * its result carries the `ai.ggui/render` slice as a FULL bootable
663
+ * mount package (#483 — hosts mint a per-result view for the new
664
+ * card); a no-op (`updated: false`) carries NO result `_meta`.
665
+ * Already-mounted frames are not repainted by update — they freeze as
666
+ * history when its higher-epoch `props_update` frame lands; the
667
+ * in-place repaint over the live-channel ladder (WS / SSE / polling /
668
+ * bridge-pull) is `ggui_amend`'s job.
617
669
  */
618
670
  export const updateOutputSchema = z.object({
619
671
  sessionId: z.string(),
620
672
  updated: z.boolean(),
621
673
  /**
622
- * Unchanged from the initial render — the same `ui://ggui/render/{id}`
623
- * URI the mount stamped. Mirrored on the LLM-visible structuredContent
624
- * so SDKs that strip `_meta` from tool_results can still reach the
674
+ * The epoch-pinned URI of the NEW history record this update minted
675
+ * (`ui://ggui/render/{id}[/{key}]#{epoch}` — see epoch-uri.ts). On a
676
+ * no-op (`updated: false`) no record is minted and this is the bare
677
+ * live-head URI. Mirrored on the LLM-visible structuredContent so
678
+ * SDKs that strip `_meta` from tool_results can still reach the
625
679
  * mount URI. Kept in sync with the update handler's wire shape —
626
680
  * this export and the handler's inline schema must not drift.
627
681
  */
628
682
  resourceUri: z.string(),
683
+ /**
684
+ * The session's head epoch after this call: advanced by one on a
685
+ * real update (`updated: true`), unchanged on a no-op. `ggui_render`
686
+ * mints epoch 0. The session ROW is the authority
687
+ * (`GguiSessionBase.epoch`, absent ⇒ 0); the ledger's `ui.reminted`
688
+ * events are the wire signal only — the ledger is horizon-bounded
689
+ * and must never be counted as the source of truth.
690
+ */
691
+ epoch: z.number().int().min(0),
692
+ /**
693
+ * Present ONLY on a no-op (`updated: false`): the patch conformed to
694
+ * the contract but left the final props semantically identical to
695
+ * the current state, so nothing was written, nothing changes on
696
+ * screen, and NO new history record was minted. Model-visible by
697
+ * design — the common producer of a no-op is an agent echoing
698
+ * existing props back believing it changed the UI, and this field is
699
+ * its feedback channel.
700
+ */
701
+ warning: z.string().optional(),
702
+ });
703
+ /**
704
+ * `ggui_amend` wire output (#483) — acknowledgement only. `resourceUri`
705
+ * is the BARE live-head URI (amend targets the mounted card; it never
706
+ * mints a record, so there is no pinned URI to return and no epoch
707
+ * field — the history number is untouched by construction). The
708
+ * mounted card receives the new props over the live channels.
709
+ */
710
+ export const amendOutputSchema = z.object({
711
+ sessionId: z.string(),
712
+ updated: z.boolean(),
713
+ resourceUri: z.string(),
714
+ /** Same no-op feedback channel as ggui_update's `warning`. */
715
+ warning: z.string().optional(),
629
716
  });
630
717
  /**
631
718
  * `ggui_runtime_declare_tool_catalog` — the host runtime declares its
@@ -664,3 +751,188 @@ export const declareToolCatalogOutputSchema = z
664
751
  appId: z.string(),
665
752
  })
666
753
  .strict();
754
+ // ── `ggui_runtime_pull` — bridge-pull rung of the live-channel ladder ──
755
+ /**
756
+ * Server-side page cap for `ggui_runtime_pull`. A `limit` above this is
757
+ * CLAMPED (not rejected) — the tool mirrors the cursor-walk posture of
758
+ * the `/events` HTTP route, where a too-eager page size is a tuning
759
+ * knob, not a caller bug. Shared so the pulling client and the serving
760
+ * handler agree on the effective page ceiling from one constant.
761
+ */
762
+ export const RUNTIME_PULL_MAX_LIMIT = 100;
763
+ /**
764
+ * Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds.
765
+ * Chosen under `ggui_consume`'s proven 25-second host tolerance for
766
+ * held tool calls — the hold must resolve before any host-side
767
+ * `tools/call` timeout fires, or the transport counts a failure the
768
+ * server intended as a quiet success.
769
+ */
770
+ export const RUNTIME_PULL_MAX_WAIT_SECONDS = 20;
771
+ /**
772
+ * One `GguiSessionEvent` ledger row on the `ggui_runtime_pull` wire —
773
+ * the zod mirror of the canonical `GguiSessionEvent` interface in
774
+ * `types/ggui-session-event.ts` (which stays the type-level source of
775
+ * truth; `mcp.test.ts` pins the two together in both directions).
776
+ */
777
+ export const gguiSessionEventSchema = z.object({
778
+ seq: z
779
+ .number()
780
+ .int()
781
+ .min(1)
782
+ .describe('Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).'),
783
+ type: z
784
+ .string()
785
+ .min(1)
786
+ .describe('Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump.'),
787
+ timestamp: z
788
+ .string()
789
+ .describe('ISO 8601 UTC timestamp the server stamped on emission.'),
790
+ data: z
791
+ .unknown()
792
+ .describe('Type-specific payload — structurally identical to the matching live-channel frame payload.'),
793
+ });
794
+ /**
795
+ * `ggui_runtime_pull` input — the terminal bridge-pull rung of the
796
+ * live-channel failover ladder (WS → SSE → HTTP polling → bridge-pull).
797
+ *
798
+ * Two named parties:
799
+ *
800
+ * - **Puller** — the `@ggui-ai/iframe-runtime` bridge rung. In a
801
+ * CSP-jailed MCP Apps host the iframe can reach no network origin
802
+ * at all, so it pulls the event ledger by issuing `tools/call`
803
+ * postMessages that the host's MCP client relays (the tool
804
+ * registers `_meta.ui.visibility: ['app']` per MCP Apps spec §401
805
+ * — hosts MUST route view-issued calls to it and MUST reject
806
+ * view-issued calls to tools without it).
807
+ * - **Server** — the MCP server hosting the render. It serves the
808
+ * SAME `GguiSessionEvent` ledger `GET
809
+ * /api/sessions/:sessionId/events` serves, through the same
810
+ * `listEventsSince` read, and MUST answer with the same shapes
811
+ * (see {@link runtimePullOutputSchema}) so one client parse core
812
+ * handles both carriers.
813
+ *
814
+ * Divergences from the HTTP route, both deliberate: `sinceSequence` is
815
+ * OPTIONAL here (the bridge rung owns its cursor and seeds from 0; the
816
+ * route requires it because a bare browser GET has no cursor owner),
817
+ * and `limit` is clamped to {@link RUNTIME_PULL_MAX_LIMIT} instead of
818
+ * rejecting above it. Tenancy violations and unknown sessionIds
819
+ * surface uniformly as the `session_not_found` error — existence of
820
+ * other tenants' renders is never leaked.
821
+ */
822
+ export const runtimePullInputShape = {
823
+ sessionId: z
824
+ .string()
825
+ .min(1)
826
+ .describe('Active render id — sourced from `_meta["ai.ggui/render"].sessionId` on the iframe boot envelope. Unknown and cross-tenant ids surface uniformly as session_not_found.'),
827
+ sinceSequence: z
828
+ .number()
829
+ .int()
830
+ .min(0)
831
+ .optional()
832
+ .describe('Replay cursor — only events with seq > sinceSequence return. Omit (= 0) on first pull; advance to the last event\'s seq (or lastSequence on an empty page) on every subsequent pull.'),
833
+ limit: z
834
+ .number()
835
+ .int()
836
+ .min(1)
837
+ .optional()
838
+ .describe(`Max events per page. Values above ${RUNTIME_PULL_MAX_LIMIT} are clamped to ${RUNTIME_PULL_MAX_LIMIT}; omit for the default ${RUNTIME_PULL_MAX_LIMIT}. When hasMore is true, immediately re-pull with the advanced cursor.`),
839
+ wait: z
840
+ .number()
841
+ .min(0)
842
+ .optional()
843
+ .describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above ${RUNTIME_PULL_MAX_WAIT_SECONDS} are clamped to ${RUNTIME_PULL_MAX_WAIT_SECONDS}). An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`),
844
+ };
845
+ export const runtimePullInputSchema = z.object(runtimePullInputShape);
846
+ /**
847
+ * Normal-page arm — EXACT `EventsResponse` parity with
848
+ * `GET /api/sessions/:sessionId/events` (same keys, same semantics):
849
+ * `events` strictly ascending by seq, `lastSequence` = the render's
850
+ * current high-water mark (NOT the page's last seq — advances the
851
+ * cursor on empty pages), `hasMore` = the page was truncated by
852
+ * `limit`.
853
+ */
854
+ export const runtimePullEventsPageSchema = z.object({
855
+ events: z.array(gguiSessionEventSchema),
856
+ lastSequence: z.number().int().min(0),
857
+ hasMore: z.boolean(),
858
+ });
859
+ /**
860
+ * Replay-horizon arm — parity with the route's 410 body, but on this
861
+ * carrier it is a NORMAL result arm, not an error: the bridge rung is
862
+ * terminal and treats it as a re-sync instruction. Returned when the
863
+ * cursor fell out of the replayable window on EITHER side
864
+ * (`sinceSequence` above the server's `lastSequence` — a cursor from a
865
+ * different deployment/reset render — or below the retention horizon).
866
+ * Client recovery: re-mount state from a fresh snapshot and reset the
867
+ * cursor to `currentSequence`.
868
+ */
869
+ export const runtimePullHorizonSchema = z.object({
870
+ reason: z.literal('REPLAY_HORIZON_PASSED'),
871
+ currentSequence: z.number().int().min(0),
872
+ });
873
+ /**
874
+ * `ggui_runtime_pull` output — the canonical strict wire contract, a
875
+ * two-arm union: {@link runtimePullEventsPageSchema} (normal page) |
876
+ * {@link runtimePullHorizonSchema} (cursor out of window). The handler
877
+ * registers a flat raw shape (MCP tool registration takes a
878
+ * `ZodRawShape`, which cannot express a top-level union) and its
879
+ * alignment test pins that shape to this union — same posture as
880
+ * `updateInputSchema`.
881
+ */
882
+ export const runtimePullOutputSchema = z.union([
883
+ runtimePullEventsPageSchema,
884
+ runtimePullHorizonSchema,
885
+ ]);
886
+ /**
887
+ * Per-batch event cap on `ggui_runtime_telemetry` — a bounded
888
+ * fire-and-forget diagnostic channel, never a data plane.
889
+ */
890
+ export const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
891
+ /**
892
+ * `ggui_runtime_telemetry` input — the iframe runtime's transport
893
+ * self-report (`_meta.ui.visibility: ['app']`, view-callable only).
894
+ *
895
+ * Contract (both parties named): the IFRAME RUNTIME batches short
896
+ * `{at, kind, detail?}` events describing its delivery-ladder journey
897
+ * (boot-path decision, per-rung status transitions and failures —
898
+ * `channel_failover_swap`, `channel_polling_budget_exhausted`, … —
899
+ * and outbound doorbell rings) and flushes them over the host's
900
+ * `tools/call` postMessage bridge; the SERVER logs one structured
901
+ * line per batch for operator forensics and stores NOTHING. Sandboxed
902
+ * hosts (claude.ai's `claudemcpcontent.com` frames) expose no
903
+ * readable console and no network — this tool is the ONLY way the
904
+ * ladder's behavior on such hosts reaches an operator. `sessionId` is
905
+ * client-claimed (log-tagged, never trusted for reads); events are
906
+ * bounded (≤ {@link RUNTIME_TELEMETRY_MAX_EVENTS} per batch, `kind` ≤
907
+ * 64 chars, `detail` ≤ 512) so a hostile view cannot use the channel
908
+ * for bulk exfiltration or log flooding.
909
+ */
910
+ export const runtimeTelemetryInputShape = {
911
+ sessionId: z
912
+ .string()
913
+ .min(1)
914
+ .describe('Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only.'),
915
+ events: z
916
+ .array(z.object({
917
+ at: z
918
+ .number()
919
+ .min(0)
920
+ .describe('Milliseconds since iframe boot (monotonic, client clock).'),
921
+ kind: z
922
+ .string()
923
+ .min(1)
924
+ .max(64)
925
+ .describe("Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'."),
926
+ detail: z
927
+ .string()
928
+ .max(512)
929
+ .optional()
930
+ .describe('Optional compact context (JSON fragment or message).'),
931
+ }))
932
+ .min(1)
933
+ .max(RUNTIME_TELEMETRY_MAX_EVENTS)
934
+ .describe('Batched ladder/doorbell events, oldest first.'),
935
+ };
936
+ export const runtimeTelemetryInputSchema = z.object(runtimeTelemetryInputShape);
937
+ /** `ggui_runtime_telemetry` output — bare acknowledgement. */
938
+ export const runtimeTelemetryOutputSchema = z.object({ ok: z.literal(true) });
@@ -35,11 +35,12 @@ import { z } from 'zod';
35
35
  * the `variance.persona` slot after normalization (lowercase + trim
36
36
  * + Levenshtein near-dup warning).
37
37
  *
38
- * `appId` is NOT on the input shape — the handler reads it off
39
- * `ctx.appId` resolved by the upstream auth adapter. Cross-tenant
40
- * authorship would be a security-boundary violation.
38
+ * `appId` is optional on the input shape and defaults to the
39
+ * caller's bound app identity; cross-app calls are subject to the
40
+ * deployment's authorization policy.
41
41
  */
42
42
  export declare const opsGenerateBlueprintInputSchema: z.ZodObject<{
43
+ appId: z.ZodOptional<z.ZodString>;
43
44
  contract: z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>;
44
45
  generator: z.ZodOptional<z.ZodString>;
45
46
  persona: z.ZodOptional<z.ZodString>;
@@ -86,6 +87,7 @@ export declare const opsGenerateBlueprintOutputSchema: z.ZodObject<{
86
87
  * instead.
87
88
  */
88
89
  export declare const opsRegisterBlueprintInputSchema: z.ZodObject<{
90
+ appId: z.ZodOptional<z.ZodString>;
89
91
  contract: z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>;
90
92
  componentCode: z.ZodString;
91
93
  persona: z.ZodOptional<z.ZodString>;
@@ -105,9 +107,11 @@ export declare const opsRegisterBlueprintOutputSchema: z.ZodObject<{
105
107
  source: z.ZodType<import("../index.js").UserBlueprintSource, unknown, z.core.$ZodTypeInternals<import("../index.js").UserBlueprintSource, unknown>>;
106
108
  }, z.core.$strict>;
107
109
  /**
108
- * `ggui_ops_list_blueprints` input. `appId` is NOT carried on the
109
- * wire — handlers scope from `ctx.appId`. The filters below are AND-
110
- * composed against the matching `(appId, *)` view of the store.
110
+ * `ggui_ops_list_blueprints` input. `appId` is optional on the wire
111
+ * and defaults to the caller's bound app identity; cross-app calls
112
+ * are subject to the deployment's authorization policy. The filters
113
+ * below are AND-composed against the matching `(appId, *)` view of
114
+ * the store.
111
115
  *
112
116
  * Behavior split:
113
117
  * - When `contractHash` is the ONLY filter (no semantic keywords
@@ -123,6 +127,7 @@ export declare const opsRegisterBlueprintOutputSchema: z.ZodObject<{
123
127
  * internally), sorted `createdAt desc`.
124
128
  */
125
129
  export declare const opsListBlueprintsInputSchema: z.ZodObject<{
130
+ appId: z.ZodOptional<z.ZodString>;
126
131
  contractHash: z.ZodOptional<z.ZodString>;
127
132
  generator: z.ZodOptional<z.ZodString>;
128
133
  persona: z.ZodOptional<z.ZodString>;
@@ -133,12 +138,15 @@ export declare const opsListBlueprintsOutputSchema: z.ZodObject<{
133
138
  }, z.core.$strict>;
134
139
  /**
135
140
  * `ggui_ops_update_blueprint` input. Only mutable fields are present
136
- * here — `contractHash`, `appId`, `codeS3Url`, `codeHash`,
137
- * `source`, `createdAt`, `createdBy` are immutable invariants
138
- * and the schema does NOT accept them. Operators who want to
139
- * "replace" a row delete + re-generate.
141
+ * here — `contractHash`, `codeS3Url`, `codeHash`, `source`,
142
+ * `createdAt`, `createdBy` are immutable invariants and the schema
143
+ * does NOT accept them. Operators who want to "replace" a row
144
+ * delete + re-generate. The `appId` input below scopes the TARGET
145
+ * app for authorization/routing purposes only — the blueprint's own
146
+ * immutable `appId` field is never mutated by this call.
140
147
  */
141
148
  export declare const opsUpdateBlueprintInputSchema: z.ZodObject<{
149
+ appId: z.ZodOptional<z.ZodString>;
142
150
  blueprintId: z.ZodString;
143
151
  isOperatorDefault: z.ZodOptional<z.ZodLiteral<true>>;
144
152
  variance: z.ZodOptional<z.ZodType<import("../index.js").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintVariance, unknown>>>;
@@ -153,6 +161,7 @@ export declare const opsUpdateBlueprintOutputSchema: z.ZodObject<{
153
161
  * matching `BlueprintStore.delete`'s no-throw contract.
154
162
  */
155
163
  export declare const opsDeleteBlueprintInputSchema: z.ZodObject<{
164
+ appId: z.ZodOptional<z.ZodString>;
156
165
  blueprintId: z.ZodString;
157
166
  }, z.core.$strict>;
158
167
  export declare const opsDeleteBlueprintOutputSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"ops-blueprint.d.ts","sourceRoot":"","sources":["../../src/schemas/ops-blueprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;kBAyCjC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;kBAqBlC,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;kBAwCjC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;kBAalC,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B;;;;;kBA6B9B,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;kBAI/B,CAAC;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;kBAe/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;kBAKhC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;kBAI/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;kBAIhC,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG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M,8BAA8B;;;kBAKhC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;kBAW/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;kBAIhC,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC"}
@@ -37,12 +37,17 @@ import { blueprintSchema, blueprintVarianceSchema, llmBlueprintSourceSchema, use
37
37
  * the `variance.persona` slot after normalization (lowercase + trim
38
38
  * + Levenshtein near-dup warning).
39
39
  *
40
- * `appId` is NOT on the input shape — the handler reads it off
41
- * `ctx.appId` resolved by the upstream auth adapter. Cross-tenant
42
- * authorship would be a security-boundary violation.
40
+ * `appId` is optional on the input shape and defaults to the
41
+ * caller's bound app identity; cross-app calls are subject to the
42
+ * deployment's authorization policy.
43
43
  */
44
44
  export const opsGenerateBlueprintInputSchema = z
45
45
  .object({
46
+ appId: z
47
+ .string()
48
+ .min(1)
49
+ .optional()
50
+ .describe('Target app for this curation call. Defaults to the caller\'s bound app identity; callers not bound to an app must provide it. The deployment\'s authorization policy decides whether the caller may curate the named app.'),
46
51
  contract: dataContractSchema,
47
52
  generator: z
48
53
  .string()
@@ -120,6 +125,11 @@ export const opsGenerateBlueprintOutputSchema = z
120
125
  */
121
126
  export const opsRegisterBlueprintInputSchema = z
122
127
  .object({
128
+ appId: z
129
+ .string()
130
+ .min(1)
131
+ .optional()
132
+ .describe('Target app for this curation call. Defaults to the caller\'s bound app identity; callers not bound to an app must provide it. The deployment\'s authorization policy decides whether the caller may curate the named app.'),
123
133
  contract: dataContractSchema,
124
134
  componentCode: z
125
135
  .string()
@@ -163,9 +173,11 @@ export const opsRegisterBlueprintOutputSchema = z
163
173
  })
164
174
  .strict();
165
175
  /**
166
- * `ggui_ops_list_blueprints` input. `appId` is NOT carried on the
167
- * wire — handlers scope from `ctx.appId`. The filters below are AND-
168
- * composed against the matching `(appId, *)` view of the store.
176
+ * `ggui_ops_list_blueprints` input. `appId` is optional on the wire
177
+ * and defaults to the caller's bound app identity; cross-app calls
178
+ * are subject to the deployment's authorization policy. The filters
179
+ * below are AND-composed against the matching `(appId, *)` view of
180
+ * the store.
169
181
  *
170
182
  * Behavior split:
171
183
  * - When `contractHash` is the ONLY filter (no semantic keywords
@@ -182,6 +194,11 @@ export const opsRegisterBlueprintOutputSchema = z
182
194
  */
183
195
  export const opsListBlueprintsInputSchema = z
184
196
  .object({
197
+ appId: z
198
+ .string()
199
+ .min(1)
200
+ .optional()
201
+ .describe('Target app for this curation call. Defaults to the caller\'s bound app identity; callers not bound to an app must provide it. The deployment\'s authorization policy decides whether the caller may curate the named app.'),
185
202
  contractHash: z
186
203
  .string()
187
204
  .min(1)
@@ -209,13 +226,20 @@ export const opsListBlueprintsOutputSchema = z
209
226
  .strict();
210
227
  /**
211
228
  * `ggui_ops_update_blueprint` input. Only mutable fields are present
212
- * here — `contractHash`, `appId`, `codeS3Url`, `codeHash`,
213
- * `source`, `createdAt`, `createdBy` are immutable invariants
214
- * and the schema does NOT accept them. Operators who want to
215
- * "replace" a row delete + re-generate.
229
+ * here — `contractHash`, `codeS3Url`, `codeHash`, `source`,
230
+ * `createdAt`, `createdBy` are immutable invariants and the schema
231
+ * does NOT accept them. Operators who want to "replace" a row
232
+ * delete + re-generate. The `appId` input below scopes the TARGET
233
+ * app for authorization/routing purposes only — the blueprint's own
234
+ * immutable `appId` field is never mutated by this call.
216
235
  */
217
236
  export const opsUpdateBlueprintInputSchema = z
218
237
  .object({
238
+ appId: z
239
+ .string()
240
+ .min(1)
241
+ .optional()
242
+ .describe('Target app for this curation call. Defaults to the caller\'s bound app identity; callers not bound to an app must provide it. The deployment\'s authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to.'),
219
243
  blueprintId: z.string().min(1),
220
244
  isOperatorDefault: z
221
245
  .literal(true)
@@ -239,6 +263,11 @@ export const opsUpdateBlueprintOutputSchema = z
239
263
  */
240
264
  export const opsDeleteBlueprintInputSchema = z
241
265
  .object({
266
+ appId: z
267
+ .string()
268
+ .min(1)
269
+ .optional()
270
+ .describe('Target app for this curation call. Defaults to the caller\'s bound app identity; callers not bound to an app must provide it. The deployment\'s authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to.'),
242
271
  blueprintId: z.string().min(1),
243
272
  })
244
273
  .strict();
@@ -142,6 +142,18 @@ export interface Blueprint {
142
142
  * {@link codeS3Url} is present (or the in-memory equivalent).
143
143
  */
144
144
  readonly codeHash?: string;
145
+ /**
146
+ * `CodeStore` content hash (`hashOf`) of the AUTHORED, pre-compile
147
+ * source body — distinct from {@link codeHash}, which hashes the
148
+ * compiled `componentCode`. Absent when the blueprint has no
149
+ * authored form distinct from its compiled output (the engine never
150
+ * produced one, or produced a byte-identical duplicate that the
151
+ * read-side envelope guard would reject as a fallback collapse
152
+ * anyway). The body itself is NOT stored on this row — persistent
153
+ * adapters keep vector/metadata rows small and content-address the
154
+ * body through the same `CodeStore` seam `codeHash` already implies.
155
+ */
156
+ readonly sourceCodeHash?: string;
145
157
  /**
146
158
  * Provenance of the component code — the single
147
159
  * {@link BlueprintSource} vocabulary. Generation paths mint the
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../src/types/blueprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,sBAAsB;IACrC;;qDAEiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;0CACsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;yCACqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;yCACqC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACvC;8CAC0C;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnD;yCACqC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAA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AE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC;;;;;;;;;OASG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,UAAU,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD"}
@@ -1,4 +1,4 @@
1
- import type { DataContract, JsonObject, JsonValue } from './data-contract';
1
+ import type { DataContract, JsonObject, JsonSchemaTypeName, JsonValue } from './data-contract';
2
2
  /**
3
3
  * Extract the JSON Schema `required` array from a schema literal as a
4
4
  * string union. Resolves to `never` when `required` is absent, empty,
@@ -61,6 +61,10 @@ export type SchemaToType<S> = S extends {
61
61
  } ? V : S extends {
62
62
  readonly enum: readonly (infer E)[];
63
63
  } ? E : S extends {
64
+ readonly type: readonly (infer M extends JsonSchemaTypeName)[];
65
+ } ? M extends JsonSchemaTypeName ? SchemaToType<Omit<S, 'type'> & {
66
+ readonly type: M;
67
+ }> : never : S extends {
64
68
  readonly type: 'string';
65
69
  } ? string : S extends {
66
70
  readonly type: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