@ggui-ai/protocol 0.7.0 → 0.9.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 (42) hide show
  1. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  2. package/dist/gadgets/stdlib-gadgets.js +1 -1
  3. package/dist/integrations/epoch-uri.d.ts +42 -0
  4. package/dist/integrations/epoch-uri.d.ts.map +1 -0
  5. package/dist/integrations/epoch-uri.js +48 -0
  6. package/dist/integrations/mcp-apps.d.ts +140 -10
  7. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  8. package/dist/integrations/mcp-apps.js +94 -6
  9. package/dist/schemas/data-contract.d.ts +4 -2
  10. package/dist/schemas/data-contract.d.ts.map +1 -1
  11. package/dist/schemas/data-contract.js +4 -2
  12. package/dist/schemas/invoke.d.ts +1 -1
  13. package/dist/schemas/invoke.js +1 -1
  14. package/dist/schemas/mcp.d.ts +222 -6
  15. package/dist/schemas/mcp.d.ts.map +1 -1
  16. package/dist/schemas/mcp.js +285 -13
  17. package/dist/types/data-contract.d.ts +8 -4
  18. package/dist/types/data-contract.d.ts.map +1 -1
  19. package/dist/types/ggui-session-event.d.ts +42 -1
  20. package/dist/types/ggui-session-event.d.ts.map +1 -1
  21. package/dist/types/ggui-session-event.js +16 -1
  22. package/dist/types/live-channel.d.ts +8 -0
  23. package/dist/types/live-channel.d.ts.map +1 -1
  24. package/dist/types/llm-route.d.ts +2 -2
  25. package/dist/types/llm-route.d.ts.map +1 -1
  26. package/dist/types/llm-route.js +26 -8
  27. package/dist/types/mcp.d.ts +51 -1
  28. package/dist/types/mcp.d.ts.map +1 -1
  29. package/dist/types/render.d.ts +12 -0
  30. package/dist/types/render.d.ts.map +1 -1
  31. package/dist/types/ui-generator.d.ts +20 -3
  32. package/dist/types/ui-generator.d.ts.map +1 -1
  33. package/dist/validation/contract-validator.d.ts +2 -2
  34. package/dist/validation/contract-validator.d.ts.map +1 -1
  35. package/dist/validation/resolve-stream-channel.d.ts +2 -2
  36. package/dist/validation/resolve-stream-channel.js +2 -2
  37. package/dist/validation/ui-security.d.ts +2 -2
  38. package/dist/validation/ui-security.js +2 -2
  39. package/dist/version.d.ts +245 -0
  40. package/dist/version.d.ts.map +1 -1
  41. package/dist/version.js +245 -0
  42. package/package.json +1 -1
@@ -104,6 +104,20 @@ export const searchBlueprintsInputShape = {
104
104
  .min(1)
105
105
  .describe("Natural-language description of the UI you're looking for"),
106
106
  limit: z.number().int().min(1).max(100).optional(),
107
+ // Charset mirrors `MCP_TOOL_BINDING_NAME_RE` in
108
+ // `@ggui-ai/artifact-manifest` (src/mcp-tool-bindings.ts). Inlined:
109
+ // protocol cannot import artifact-manifest — the dependency points
110
+ // the other way.
111
+ tool: z
112
+ .string()
113
+ .regex(/^[A-Za-z0-9_.-]{1,128}$/)
114
+ .optional()
115
+ .describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP tool name (case-sensitive). Local results are unaffected."),
116
+ server: z
117
+ .string()
118
+ .regex(/^[A-Za-z0-9_.-]{1,128}$/)
119
+ .optional()
120
+ .describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP server name (case-sensitive). Combine with `tool` to require the exact (server, tool) pair."),
107
121
  };
108
122
  export const searchBlueprintsInputSchema = z.object(searchBlueprintsInputShape);
109
123
  export const renderBlueprintInputShape = {
@@ -377,7 +391,7 @@ export const renderCacheMarkerSchema = z.object({
377
391
  /**
378
392
  * Canonical failure codes for the in-result `ggui_render` failure
379
393
  * envelope (SPEC §7.9 Plane 3). Closed enum — a failed render's
380
- * `error.code` is always one of these four; finer-grained diagnostics
394
+ * `error.code` is always one of these five; finer-grained diagnostics
381
395
  * ride on `error.message`.
382
396
  *
383
397
  * - `PRODUCTION_FAILED` — generation ran but did not produce a
@@ -389,12 +403,21 @@ export const renderCacheMarkerSchema = z.object({
389
403
  * configuration has no key for the resolved route.
390
404
  * - `NO_CREDENTIALS` — no generation credentials are configured on
391
405
  * the server at all.
406
+ * - `GENERATION_QUEUE_OVERLOADED` — the deployment's generation
407
+ * admission gate rejected this request before any generation
408
+ * attempt started (concurrent-request queue full, or wait for a
409
+ * free slot exceeded the configured timeout). Distinct from
410
+ * `PRODUCTION_FAILED` by design: generation never ran, so callers
411
+ * MUST NOT bill or count it as a failed attempt. See
412
+ * {@link GenerationError} in `types/ui-generator.ts` for the full
413
+ * contract.
392
414
  */
393
415
  export const renderErrorCodeSchema = z.enum([
394
416
  'PRODUCTION_FAILED',
395
417
  'VALIDATION_ERROR',
396
418
  'NO_PLATFORM_KEY',
397
419
  'NO_CREDENTIALS',
420
+ 'GENERATION_QUEUE_OVERLOADED',
398
421
  ]);
399
422
  /**
400
423
  * In-result failure marker for `ggui_render`. Present on the wire
@@ -403,7 +426,7 @@ export const renderErrorCodeSchema = z.enum([
403
426
  * canonical failure classification.
404
427
  */
405
428
  export const renderErrorSchema = z.object({
406
- 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.'),
429
+ 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.'),
407
430
  message: z
408
431
  .string()
409
432
  .describe('Human-readable failure detail — fold into the next attempt or surface to the operator.'),
@@ -542,8 +565,13 @@ export const renderOutputSchema = z.object({
542
565
  example: z.string(),
543
566
  args: z.object({
544
567
  sessionId: z.string(),
568
+ // The per-call long-poll window in seconds. Carried on the hint
569
+ // because consume's own default is 0 (single non-blocking
570
+ // drain): an agent copying a timeout-less hint gets an instant
571
+ // empty result and stops looping.
572
+ timeout: z.number(),
545
573
  }),
546
- }).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.'),
574
+ }).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.'),
547
575
  });
548
576
  /**
549
577
  * `ggui_update` — refresh the rendered UI with new state.
@@ -581,13 +609,34 @@ export const updateInputSchema = z.discriminatedUnion('kind', [
581
609
  sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
582
610
  kind: z.literal('replace'),
583
611
  props: z.record(z.string(), z.unknown())
584
- .describe('Full replacement props map. New map IS the new state.'),
612
+ .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.'),
613
+ }).strict(),
614
+ z.object({
615
+ sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
616
+ kind: z.literal('merge'),
617
+ patch: z.record(z.string(), z.unknown())
618
+ .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.'),
619
+ }).strict(),
620
+ ]);
621
+ /**
622
+ * `ggui_amend` wire input (#483) — same replace/merge mutation
623
+ * grammar as `ggui_update`, different mount identity: amend targets
624
+ * the ALREADY-MOUNTED card. No new card, no history entry, the
625
+ * history number does not advance. Git reading: `ggui_update` =
626
+ * commit; `ggui_amend` = commit --amend.
627
+ */
628
+ export const amendInputSchema = z.discriminatedUnion('kind', [
629
+ z.object({
630
+ sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
631
+ kind: z.literal('replace'),
632
+ props: z.record(z.string(), z.unknown())
633
+ .describe('Full replacement props map, applied to the currently mounted card in place.'),
585
634
  }).strict(),
586
635
  z.object({
587
636
  sessionId: z.string().describe('GguiSession opaque id (UUID) — returned by ggui_render.'),
588
637
  kind: z.literal('merge'),
589
638
  patch: z.record(z.string(), z.unknown())
590
- .describe('RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace.'),
639
+ .describe('RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.'),
591
640
  }).strict(),
592
641
  ]);
593
642
  /**
@@ -595,23 +644,61 @@ export const updateInputSchema = z.discriminatedUnion('kind', [
595
644
  * `decision`, `contract`, `contractHash` on its internal `UpdateOutput`
596
645
  * TS shape — zod strips them before structuredContent serialization.
597
646
  *
598
- * Post-update the iframe receives the new props via the live-channel
599
- * `props_update` WS frame; the cross-host fallback path receives them
600
- * via the `ai.ggui/render.propsJson` slice field (see
601
- * `update.resultMeta`). The wire response itself is just
602
- * acknowledgement.
647
+ * Every REAL update (`updated: true`) mints a new history record and
648
+ * its result carries the `ai.ggui/render` slice as a FULL bootable
649
+ * mount package (#483 — hosts mint a per-result view for the new
650
+ * card); a no-op (`updated: false`) carries NO result `_meta`.
651
+ * Already-mounted frames are not repainted by update — they freeze as
652
+ * history when its higher-epoch `props_update` frame lands; the
653
+ * in-place repaint over the live-channel ladder (WS / SSE / polling /
654
+ * bridge-pull) is `ggui_amend`'s job.
603
655
  */
604
656
  export const updateOutputSchema = z.object({
605
657
  sessionId: z.string(),
606
658
  updated: z.boolean(),
607
659
  /**
608
- * Unchanged from the initial render — the same `ui://ggui/render/{id}`
609
- * URI the mount stamped. Mirrored on the LLM-visible structuredContent
610
- * so SDKs that strip `_meta` from tool_results can still reach the
660
+ * The epoch-pinned URI of the NEW history record this update minted
661
+ * (`ui://ggui/render/{id}[/{key}]#{epoch}` — see epoch-uri.ts). On a
662
+ * no-op (`updated: false`) no record is minted and this is the bare
663
+ * live-head URI. Mirrored on the LLM-visible structuredContent so
664
+ * SDKs that strip `_meta` from tool_results can still reach the
611
665
  * mount URI. Kept in sync with the update handler's wire shape —
612
666
  * this export and the handler's inline schema must not drift.
613
667
  */
614
668
  resourceUri: z.string(),
669
+ /**
670
+ * The session's head epoch after this call: advanced by one on a
671
+ * real update (`updated: true`), unchanged on a no-op. `ggui_render`
672
+ * mints epoch 0. The session ROW is the authority
673
+ * (`GguiSessionBase.epoch`, absent ⇒ 0); the ledger's `ui.reminted`
674
+ * events are the wire signal only — the ledger is horizon-bounded
675
+ * and must never be counted as the source of truth.
676
+ */
677
+ epoch: z.number().int().min(0),
678
+ /**
679
+ * Present ONLY on a no-op (`updated: false`): the patch conformed to
680
+ * the contract but left the final props semantically identical to
681
+ * the current state, so nothing was written, nothing changes on
682
+ * screen, and NO new history record was minted. Model-visible by
683
+ * design — the common producer of a no-op is an agent echoing
684
+ * existing props back believing it changed the UI, and this field is
685
+ * its feedback channel.
686
+ */
687
+ warning: z.string().optional(),
688
+ });
689
+ /**
690
+ * `ggui_amend` wire output (#483) — acknowledgement only. `resourceUri`
691
+ * is the BARE live-head URI (amend targets the mounted card; it never
692
+ * mints a record, so there is no pinned URI to return and no epoch
693
+ * field — the history number is untouched by construction). The
694
+ * mounted card receives the new props over the live channels.
695
+ */
696
+ export const amendOutputSchema = z.object({
697
+ sessionId: z.string(),
698
+ updated: z.boolean(),
699
+ resourceUri: z.string(),
700
+ /** Same no-op feedback channel as ggui_update's `warning`. */
701
+ warning: z.string().optional(),
615
702
  });
616
703
  /**
617
704
  * `ggui_runtime_declare_tool_catalog` — the host runtime declares its
@@ -650,3 +737,188 @@ export const declareToolCatalogOutputSchema = z
650
737
  appId: z.string(),
651
738
  })
652
739
  .strict();
740
+ // ── `ggui_runtime_pull` — bridge-pull rung of the live-channel ladder ──
741
+ /**
742
+ * Server-side page cap for `ggui_runtime_pull`. A `limit` above this is
743
+ * CLAMPED (not rejected) — the tool mirrors the cursor-walk posture of
744
+ * the `/events` HTTP route, where a too-eager page size is a tuning
745
+ * knob, not a caller bug. Shared so the pulling client and the serving
746
+ * handler agree on the effective page ceiling from one constant.
747
+ */
748
+ export const RUNTIME_PULL_MAX_LIMIT = 100;
749
+ /**
750
+ * Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds.
751
+ * Chosen under `ggui_consume`'s proven 25-second host tolerance for
752
+ * held tool calls — the hold must resolve before any host-side
753
+ * `tools/call` timeout fires, or the transport counts a failure the
754
+ * server intended as a quiet success.
755
+ */
756
+ export const RUNTIME_PULL_MAX_WAIT_SECONDS = 20;
757
+ /**
758
+ * One `GguiSessionEvent` ledger row on the `ggui_runtime_pull` wire —
759
+ * the zod mirror of the canonical `GguiSessionEvent` interface in
760
+ * `types/ggui-session-event.ts` (which stays the type-level source of
761
+ * truth; `mcp.test.ts` pins the two together in both directions).
762
+ */
763
+ export const gguiSessionEventSchema = z.object({
764
+ seq: z
765
+ .number()
766
+ .int()
767
+ .min(1)
768
+ .describe('Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).'),
769
+ type: z
770
+ .string()
771
+ .min(1)
772
+ .describe('Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump.'),
773
+ timestamp: z
774
+ .string()
775
+ .describe('ISO 8601 UTC timestamp the server stamped on emission.'),
776
+ data: z
777
+ .unknown()
778
+ .describe('Type-specific payload — structurally identical to the matching live-channel frame payload.'),
779
+ });
780
+ /**
781
+ * `ggui_runtime_pull` input — the terminal bridge-pull rung of the
782
+ * live-channel failover ladder (WS → SSE → HTTP polling → bridge-pull).
783
+ *
784
+ * Two named parties:
785
+ *
786
+ * - **Puller** — the `@ggui-ai/iframe-runtime` bridge rung. In a
787
+ * CSP-jailed MCP Apps host the iframe can reach no network origin
788
+ * at all, so it pulls the event ledger by issuing `tools/call`
789
+ * postMessages that the host's MCP client relays (the tool
790
+ * registers `_meta.ui.visibility: ['app']` per MCP Apps spec §401
791
+ * — hosts MUST route view-issued calls to it and MUST reject
792
+ * view-issued calls to tools without it).
793
+ * - **Server** — the MCP server hosting the render. It serves the
794
+ * SAME `GguiSessionEvent` ledger `GET
795
+ * /api/sessions/:sessionId/events` serves, through the same
796
+ * `listEventsSince` read, and MUST answer with the same shapes
797
+ * (see {@link runtimePullOutputSchema}) so one client parse core
798
+ * handles both carriers.
799
+ *
800
+ * Divergences from the HTTP route, both deliberate: `sinceSequence` is
801
+ * OPTIONAL here (the bridge rung owns its cursor and seeds from 0; the
802
+ * route requires it because a bare browser GET has no cursor owner),
803
+ * and `limit` is clamped to {@link RUNTIME_PULL_MAX_LIMIT} instead of
804
+ * rejecting above it. Tenancy violations and unknown sessionIds
805
+ * surface uniformly as the `session_not_found` error — existence of
806
+ * other tenants' renders is never leaked.
807
+ */
808
+ export const runtimePullInputShape = {
809
+ sessionId: z
810
+ .string()
811
+ .min(1)
812
+ .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.'),
813
+ sinceSequence: z
814
+ .number()
815
+ .int()
816
+ .min(0)
817
+ .optional()
818
+ .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.'),
819
+ limit: z
820
+ .number()
821
+ .int()
822
+ .min(1)
823
+ .optional()
824
+ .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.`),
825
+ wait: z
826
+ .number()
827
+ .min(0)
828
+ .optional()
829
+ .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.`),
830
+ };
831
+ export const runtimePullInputSchema = z.object(runtimePullInputShape);
832
+ /**
833
+ * Normal-page arm — EXACT `EventsResponse` parity with
834
+ * `GET /api/sessions/:sessionId/events` (same keys, same semantics):
835
+ * `events` strictly ascending by seq, `lastSequence` = the render's
836
+ * current high-water mark (NOT the page's last seq — advances the
837
+ * cursor on empty pages), `hasMore` = the page was truncated by
838
+ * `limit`.
839
+ */
840
+ export const runtimePullEventsPageSchema = z.object({
841
+ events: z.array(gguiSessionEventSchema),
842
+ lastSequence: z.number().int().min(0),
843
+ hasMore: z.boolean(),
844
+ });
845
+ /**
846
+ * Replay-horizon arm — parity with the route's 410 body, but on this
847
+ * carrier it is a NORMAL result arm, not an error: the bridge rung is
848
+ * terminal and treats it as a re-sync instruction. Returned when the
849
+ * cursor fell out of the replayable window on EITHER side
850
+ * (`sinceSequence` above the server's `lastSequence` — a cursor from a
851
+ * different deployment/reset render — or below the retention horizon).
852
+ * Client recovery: re-mount state from a fresh snapshot and reset the
853
+ * cursor to `currentSequence`.
854
+ */
855
+ export const runtimePullHorizonSchema = z.object({
856
+ reason: z.literal('REPLAY_HORIZON_PASSED'),
857
+ currentSequence: z.number().int().min(0),
858
+ });
859
+ /**
860
+ * `ggui_runtime_pull` output — the canonical strict wire contract, a
861
+ * two-arm union: {@link runtimePullEventsPageSchema} (normal page) |
862
+ * {@link runtimePullHorizonSchema} (cursor out of window). The handler
863
+ * registers a flat raw shape (MCP tool registration takes a
864
+ * `ZodRawShape`, which cannot express a top-level union) and its
865
+ * alignment test pins that shape to this union — same posture as
866
+ * `updateInputSchema`.
867
+ */
868
+ export const runtimePullOutputSchema = z.union([
869
+ runtimePullEventsPageSchema,
870
+ runtimePullHorizonSchema,
871
+ ]);
872
+ /**
873
+ * Per-batch event cap on `ggui_runtime_telemetry` — a bounded
874
+ * fire-and-forget diagnostic channel, never a data plane.
875
+ */
876
+ export const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
877
+ /**
878
+ * `ggui_runtime_telemetry` input — the iframe runtime's transport
879
+ * self-report (`_meta.ui.visibility: ['app']`, view-callable only).
880
+ *
881
+ * Contract (both parties named): the IFRAME RUNTIME batches short
882
+ * `{at, kind, detail?}` events describing its delivery-ladder journey
883
+ * (boot-path decision, per-rung status transitions and failures —
884
+ * `channel_failover_swap`, `channel_polling_budget_exhausted`, … —
885
+ * and outbound doorbell rings) and flushes them over the host's
886
+ * `tools/call` postMessage bridge; the SERVER logs one structured
887
+ * line per batch for operator forensics and stores NOTHING. Sandboxed
888
+ * hosts (claude.ai's `claudemcpcontent.com` frames) expose no
889
+ * readable console and no network — this tool is the ONLY way the
890
+ * ladder's behavior on such hosts reaches an operator. `sessionId` is
891
+ * client-claimed (log-tagged, never trusted for reads); events are
892
+ * bounded (≤ {@link RUNTIME_TELEMETRY_MAX_EVENTS} per batch, `kind` ≤
893
+ * 64 chars, `detail` ≤ 512) so a hostile view cannot use the channel
894
+ * for bulk exfiltration or log flooding.
895
+ */
896
+ export const runtimeTelemetryInputShape = {
897
+ sessionId: z
898
+ .string()
899
+ .min(1)
900
+ .describe('Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only.'),
901
+ events: z
902
+ .array(z.object({
903
+ at: z
904
+ .number()
905
+ .min(0)
906
+ .describe('Milliseconds since iframe boot (monotonic, client clock).'),
907
+ kind: z
908
+ .string()
909
+ .min(1)
910
+ .max(64)
911
+ .describe("Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'."),
912
+ detail: z
913
+ .string()
914
+ .max(512)
915
+ .optional()
916
+ .describe('Optional compact context (JSON fragment or message).'),
917
+ }))
918
+ .min(1)
919
+ .max(RUNTIME_TELEMETRY_MAX_EVENTS)
920
+ .describe('Batched ladder/doorbell events, oldest first.'),
921
+ };
922
+ export const runtimeTelemetryInputSchema = z.object(runtimeTelemetryInputShape);
923
+ /** `ggui_runtime_telemetry` output — bare acknowledgement. */
924
+ export const runtimeTelemetryOutputSchema = z.object({ ok: z.literal(true) });
@@ -170,8 +170,8 @@ export interface StreamChannelEntry {
170
170
  /**
171
171
  * JSON Schema for the channel payload. This is the authoritative
172
172
  * shape guard for every delivery on this channel — live-channel
173
- * enforcement points (hosted fan-out, OSS `/ws`, `@ggui-ai/react`
174
- * data receipt, `@ggui-ai/react-native` data receipt) all validate
173
+ * enforcement points (hosted fan-out, OSS `/ws`, `@ggui-ai/mcp-apps-react`
174
+ * data receipt, `@ggui-ai/mcp-apps-react-native` data receipt) all validate
175
175
  * deliveries against it.
176
176
  *
177
177
  * When the channel declares a `source.tool` feed, the protocol-level
@@ -619,8 +619,12 @@ export interface GadgetDescriptor {
619
619
  * Registry hostname (no scheme, no path) the server uses to resolve
620
620
  * `bundleUrl` + `styleUrl` at render time:
621
621
  *
622
- * `https://<bundleHost>/bundles/<scope>/<name>/<version>/bundle.js`
623
- * `https://<bundleHost>/bundles/<scope>/<name>/<version>/style.css`
622
+ * `https://<bundleHost>/bundles/public/<scope>/<name>/<version>/bundle.js`
623
+ * `https://<bundleHost>/bundles/public/<scope>/<name>/<version>/style.css`
624
+ *
625
+ * (the PUBLIC prefix of the registry's visibility-split bundle
626
+ * layout — host composition serves the anonymous render-time fetch;
627
+ * private artifacts always arrive as explicit `bundleUrl` values)
624
628
  *
625
629
  * Resolution order (operator wins over author wins over spec default):
626
630
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data-contract.d.ts","sourceRoot":"","sources":["../../src/types/data-contract.ts"],"names":[],"mappings":"AAwCA;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX,UAAU,CAAC;AAMf;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,oEAAoE;IACpE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACjF,WAAW,CAA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AMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;;OAYG;IACH;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAY,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAY,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC"}
@@ -81,7 +81,48 @@ export interface GguiSessionEvent<TData = unknown> {
81
81
  *
82
82
  * @public
83
83
  */
84
- export type GguiSessionEventType = 'ui.created' | 'ui.updated' | 'ui.committed' | 'tool.called' | 'tool.result' | 'user.submitted';
84
+ export type GguiSessionEventType = 'ui.created' | 'ui.updated' | 'ui.committed' | 'ui.reminted' | 'tool.called' | 'tool.result' | 'user.submitted';
85
+ /**
86
+ * Payload of a `'ui.reminted'` event — the epoch transition record
87
+ * (#483). Appended ONLY by `ggui_update` (never `ggui_amend`, never a
88
+ * no-op update): the session head advanced to a NEW epoch-numbered
89
+ * render record at this seq.
90
+ *
91
+ * `epoch` is the number the head advanced TO (the first update after
92
+ * render appends `{epoch: 1}`). Epochs are LEDGER-DERIVED — there is
93
+ * no counter field on the session row; the count of reminted events
94
+ * at a seq IS the epoch at that seq (see
95
+ * {@link deriveEpochFromEvents}). Frames freeze when they observe a
96
+ * reminted event whose `epoch` exceeds the epoch in their own
97
+ * resource URI (the #483 freeze latch).
98
+ */
99
+ export interface UiRemintedEventData {
100
+ readonly epoch: number;
101
+ }
102
+ /**
103
+ * Payload of a `'ui.updated'` event — the ledger's record of a props
104
+ * change (the taxonomy twin of the live-channel `props_update`
105
+ * frame). `epoch` (#483) names the history record the props belong
106
+ * to: an update stamps the epoch it MINTED, an amend stamps the
107
+ * current head — so pinned `#N` reconstruction replays exactly the
108
+ * events with `epoch ≤ N` up to the N+1 boundary, and frames never
109
+ * apply props from a newer epoch than their own.
110
+ */
111
+ export interface UiUpdatedEventData {
112
+ readonly sessionId: string;
113
+ readonly props: Record<string, unknown>;
114
+ /** Absent on pre-#483 ledgers — read as "the then-current epoch". */
115
+ readonly epoch?: number;
116
+ }
117
+ /**
118
+ * Head epoch implied by an event list: the count of `'ui.reminted'`
119
+ * events. `ggui_render` mints epoch 0 with NO event, so an empty (or
120
+ * remint-free) ledger is epoch 0 by construction. Callers slicing the
121
+ * ledger at a seq get the epoch AS OF that seq — which is exactly how
122
+ * pinned `#N` snapshots reconstruct (props replayed to the N-th
123
+ * remint boundary).
124
+ */
125
+ export declare function deriveEpochFromEvents(events: ReadonlyArray<Pick<GguiSessionEvent, 'type'>>): number;
85
126
  /**
86
127
  * Response body for `GET /api/sessions/:sessionId/events?sinceSequence=N&limit=M`.
87
128
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ggui-session-event.d.ts","sourceRoot":"","sources":["../../src/types/ggui-session-event.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK,GAAG,OAAO;IAC/C;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,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AM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,qEAAqE;IACrE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,GACpD,MAAM,CAMR;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC"}
@@ -35,4 +35,19 @@
35
35
  * an ISO 8601 UTC string for cross-layer uniformity (was epoch-ms on
36
36
  * the server side).
37
37
  */
38
- export {};
38
+ /**
39
+ * Head epoch implied by an event list: the count of `'ui.reminted'`
40
+ * events. `ggui_render` mints epoch 0 with NO event, so an empty (or
41
+ * remint-free) ledger is epoch 0 by construction. Callers slicing the
42
+ * ledger at a seq get the epoch AS OF that seq — which is exactly how
43
+ * pinned `#N` snapshots reconstruct (props replayed to the N-th
44
+ * remint boundary).
45
+ */
46
+ export function deriveEpochFromEvents(events) {
47
+ let epoch = 0;
48
+ for (const event of events) {
49
+ if (event.type === 'ui.reminted')
50
+ epoch += 1;
51
+ }
52
+ return epoch;
53
+ }
@@ -431,6 +431,14 @@ export interface PropsUpdatePayload {
431
431
  sessionId: string;
432
432
  /** New props — full replacement */
433
433
  props: JsonObject;
434
+ /**
435
+ * History epoch this update belongs to (#483, SPEC §7.1.2.2). An
436
+ * `ggui_update` stamps its new head epoch; a `ggui_amend` stamps the
437
+ * unchanged head. A mount whose OWN epoch is lower than this value
438
+ * has been superseded and freezes rather than applying (the freeze
439
+ * latch). Absent ⇒ 0 (pre-#483 producers / amend on an epoch-0 head).
440
+ */
441
+ epoch?: number;
434
442
  }
435
443
  /**
436
444
  * Payload for `drain_ack` (Server → Client). Sent by `ggui_consume` after
@@ -1 +1 @@
1
- {"version":3,"file":"live-channel.d.ts","sourceRoot":"","sources":["../../src/types/live-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB;uDACmD;IACnD,OAAO,CAAC,EAAE,WAAW,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;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"live-channel.d.ts","sourceRoot":"","sources":["../../src/types/live-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB;uDACmD;IACnD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,a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FAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,IAAI,EAAE,iBAAiB,CAAC;IACxB,6EAA6E;IAC7E,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EACA,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,GACxB,aAAa,GACb,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,KAAK,EAAE,UAAU,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -51,10 +51,10 @@
51
51
  * ready.
52
52
  */
53
53
  export declare const MODELS: {
54
- readonly anthropic: readonly ["claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5-20251001", "claude-sonnet-4-6", "claude-opus-4-7", "claude-opus-4-6"];
54
+ readonly anthropic: readonly ["claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5-20251001", "claude-opus-4-8", "claude-sonnet-4-6", "claude-opus-4-7", "claude-opus-4-6"];
55
55
  readonly openai: readonly ["gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.5-2026-04-23", "gpt-5.5-pro", "gpt-5.5-pro-2026-04-23", "gpt-5.4", "gpt-5.4-2026-03-05", "gpt-5.4-mini", "gpt-5.4-mini-2026-03-17", "gpt-5.4-nano", "gpt-5.4-nano-2026-03-17", "gpt-5.3-codex"];
56
56
  readonly google: readonly ["gemini-3.6-flash", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-flash-latest", "gemini-3.1-flash-lite", "gemini-3.1-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3-flash-preview"];
57
- readonly bedrock: readonly ["us.anthropic.claude-haiku-4-5-20251001-v1:0", "eu.anthropic.claude-haiku-4-5-20251001-v1:0", "apac.anthropic.claude-haiku-4-5-20251001-v1:0", "global.anthropic.claude-haiku-4-5-20251001-v1:0", "us.anthropic.claude-sonnet-4-6", "eu.anthropic.claude-sonnet-4-6", "apac.anthropic.claude-sonnet-4-6", "us.anthropic.claude-opus-4-7", "eu.anthropic.claude-opus-4-7", "apac.anthropic.claude-opus-4-7", "global.anthropic.claude-opus-4-7", "us.anthropic.claude-opus-4-6-v1"];
57
+ readonly bedrock: readonly ["anthropic.claude-fable-5", "anthropic.claude-opus-5", "anthropic.claude-sonnet-5", "anthropic.claude-opus-4-8", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "eu.anthropic.claude-haiku-4-5-20251001-v1:0", "apac.anthropic.claude-haiku-4-5-20251001-v1:0", "global.anthropic.claude-haiku-4-5-20251001-v1:0", "us.anthropic.claude-sonnet-4-6", "eu.anthropic.claude-sonnet-4-6", "apac.anthropic.claude-sonnet-4-6", "us.anthropic.claude-opus-4-7", "eu.anthropic.claude-opus-4-7", "apac.anthropic.claude-opus-4-7", "global.anthropic.claude-opus-4-7", "us.anthropic.claude-opus-4-6-v1"];
58
58
  readonly openrouter: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-5", "anthropic/claude-sonnet-5", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-opus-4.7", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "google/gemini-3.6-flash", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.1-flash-lite", "x-ai/grok-4.3", "meta-llama/llama-4-maverick", "meta-llama/llama-3.3-70b-instruct", "deepseek/deepseek-v4-pro", "deepseek/deepseek-r1-0528", "qwen/qwen3.7-max", "qwen/qwen3-coder", "mistralai/mistral-large-2512", "openai/gpt-oss-120b"];
59
59
  };
60
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"llm-route.d.ts","sourceRoot":"","sources":["../../src/types/llm-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,MAAM;;;;;;CAiIT,CAAC;AAMX;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,MAAM,CAAC;AAE9C;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAC1C,YAAY,GACZ,SAAS,GACT,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAC/B,YAAY,CAA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C,CAAC,EAAE,MAAM,GAAG,OAAO,CAMtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CASxE;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAQjE;AA8CD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAgB7D;AAuBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAKvD;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAE3D"}
@@ -58,12 +58,13 @@ export const MODELS = {
58
58
  // Wire-canonical IDs accepted by api.anthropic.com/v1/messages.
59
59
  // Per Anthropic's official models doc (claude.com/docs/about-claude/models/overview):
60
60
  // the Claude 5 family (2026-07: Opus 5, Sonnet 5, and the
61
- // Mythos-class Fable 5) and the 4.6/4.7 generation carry undated
61
+ // Mythos-class Fable 5) and the 4.6–4.8 generation carry undated
62
62
  // wire IDs; Haiku 4.5 still uses the dated form.
63
63
  'claude-fable-5',
64
64
  'claude-opus-5',
65
65
  'claude-sonnet-5',
66
66
  'claude-haiku-4-5-20251001',
67
+ 'claude-opus-4-8',
67
68
  'claude-sonnet-4-6',
68
69
  'claude-opus-4-7',
69
70
  'claude-opus-4-6',
@@ -107,13 +108,30 @@ export const MODELS = {
107
108
  'gemini-3-flash-preview',
108
109
  ],
109
110
  bedrock: [
110
- // AWS cross-region inference profile IDs. Each region is its own
111
- // wire-canonical entry — no `{region}` field on the route.
112
- // Per AWS docs the 4.6/4.7 generation dropped `-vN:0`; Haiku 4.5
113
- // keeps it. Coverage per region (us/eu/apac/global) varies per
114
- // model — verify on individual model card pages under
115
- // docs.aws.amazon.com/bedrock/latest/userguide/model-cards.html
116
- // before locking expanded coverage.
111
+ // TWO wire-id families, one per Bedrock endpoint — the namespaces
112
+ // are disjoint (live-probed 2026-08-13), and ui-gen's bedrock
113
+ // adapter routes each request by shape:
114
+ //
115
+ // - Region-prefixed cross-region inference-profile IDs
116
+ // (`us.` / `eu.` / `apac.` / `global.`) — served by the
117
+ // bedrock-runtime endpoint. Each region is its own
118
+ // wire-canonical entry; no `{region}` field on the route.
119
+ // Per AWS docs the 4.6/4.7 generation dropped `-vN:0`;
120
+ // Haiku 4.5 keeps it. Coverage per region varies per model —
121
+ // verify on model card pages under
122
+ // docs.aws.amazon.com/bedrock/latest/userguide/model-cards.html
123
+ // before locking expanded coverage.
124
+ // - Region-less `anthropic.*` IDs — served ONLY by the
125
+ // Messages-API Bedrock endpoint (`AnthropicBedrockMantle`).
126
+ // The Claude 5 family and Opus 4.8 exist ONLY in this family
127
+ // (per the Anthropic models doc). Requires the AWS account to
128
+ // have enabled Claude in Amazon Bedrock; otherwise every id
129
+ // 403s "not available for this account".
130
+ // Messages-API endpoint (Mantle) — Claude 5 family + Opus 4.8
131
+ 'anthropic.claude-fable-5',
132
+ 'anthropic.claude-opus-5',
133
+ 'anthropic.claude-sonnet-5',
134
+ 'anthropic.claude-opus-4-8',
117
135
  // Haiku 4.5 — has full us/eu/apac/global coverage per Anthropic docs
118
136
  'us.anthropic.claude-haiku-4-5-20251001-v1:0',
119
137
  'eu.anthropic.claude-haiku-4-5-20251001-v1:0',