@guuey/chat 0.4.0 → 0.6.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 (69) hide show
  1. package/dist/hitl.d.ts +58 -0
  2. package/dist/hitl.d.ts.map +1 -0
  3. package/dist/hitl.js +81 -0
  4. package/dist/index.d.ts +3 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -1
  7. package/dist/native/components.d.ts +110 -0
  8. package/dist/native/components.d.ts.map +1 -0
  9. package/dist/native/components.js +341 -0
  10. package/dist/native/markdown.d.ts +31 -0
  11. package/dist/native/markdown.d.ts.map +1 -0
  12. package/dist/native/markdown.js +69 -0
  13. package/dist/native/theme-native.d.ts +27 -0
  14. package/dist/native/theme-native.d.ts.map +1 -0
  15. package/dist/native/theme-native.js +28 -0
  16. package/dist/native/transcript.d.ts +48 -0
  17. package/dist/native/transcript.d.ts.map +1 -0
  18. package/dist/native/transcript.js +86 -0
  19. package/dist/native.d.ts +26 -0
  20. package/dist/native.d.ts.map +1 -0
  21. package/dist/native.js +27 -0
  22. package/dist/plan.d.ts +15 -0
  23. package/dist/plan.d.ts.map +1 -1
  24. package/dist/plan.js +211 -13
  25. package/dist/policy.d.ts +4 -0
  26. package/dist/policy.d.ts.map +1 -1
  27. package/dist/policy.js +2 -0
  28. package/dist/react/components.d.ts +42 -5
  29. package/dist/react/components.d.ts.map +1 -1
  30. package/dist/react/components.js +51 -1
  31. package/dist/react/guuey-chat.d.ts +62 -4
  32. package/dist/react/guuey-chat.d.ts.map +1 -1
  33. package/dist/react/guuey-chat.js +73 -8
  34. package/dist/react/transcript.d.ts +1 -1
  35. package/dist/react/transcript.d.ts.map +1 -1
  36. package/dist/react/transcript.js +2 -2
  37. package/dist/react/use-transcript.d.ts +21 -2
  38. package/dist/react/use-transcript.d.ts.map +1 -1
  39. package/dist/react/use-transcript.js +57 -3
  40. package/dist/react.d.ts +2 -2
  41. package/dist/react.d.ts.map +1 -1
  42. package/dist/react.js +1 -1
  43. package/dist/strings.d.ts +13 -0
  44. package/dist/strings.d.ts.map +1 -1
  45. package/dist/strings.js +8 -0
  46. package/dist/types.d.ts +146 -7
  47. package/dist/types.d.ts.map +1 -1
  48. package/package.json +18 -7
  49. package/src/corpus/README.md +13 -1
  50. package/src/corpus/__snapshots__/corpus.test.ts.snap +304 -0
  51. package/src/corpus/drive.ts +3 -3
  52. package/src/corpus/fixtures.ts +220 -1
  53. package/src/hitl.ts +103 -0
  54. package/src/index.ts +15 -0
  55. package/src/native/components.tsx +812 -0
  56. package/src/native/markdown.tsx +205 -0
  57. package/src/native/theme-native.ts +48 -0
  58. package/src/native/transcript.tsx +189 -0
  59. package/src/native.tsx +63 -0
  60. package/src/plan.ts +233 -20
  61. package/src/policy.ts +4 -0
  62. package/src/react/components.tsx +171 -8
  63. package/src/react/guuey-chat.tsx +143 -9
  64. package/src/react/transcript.tsx +4 -3
  65. package/src/react/use-transcript.ts +83 -5
  66. package/src/react.tsx +3 -1
  67. package/src/strings.ts +25 -0
  68. package/src/types.ts +152 -6
  69. package/styles.css +21 -0
package/dist/strings.js CHANGED
@@ -28,6 +28,8 @@ export const defaultChatStrings = {
28
28
  viewInlineFallback: "Showing plain content",
29
29
  viewExpired: "This view expired",
30
30
  viewSandboxUnavailable: "Interactive view unavailable",
31
+ viewPromoted: (title) => `${title} — on canvas`,
32
+ viewRefFallbackTitle: "Card",
31
33
  recoveredFromHistory: "recovered from history",
32
34
  noOutput: "no output",
33
35
  bytes: (byteCount) => byteCount >= 1024 ? `${Math.round(byteCount / 1024)} KB` : `${byteCount} B`,
@@ -37,6 +39,12 @@ export const defaultChatStrings = {
37
39
  showEarlier: (count) => `Show ${count} earlier`,
38
40
  copy: "Copy",
39
41
  copied: "Copied",
42
+ promptAccept: "Allow",
43
+ promptDecline: "Don't allow",
44
+ promptDismissed: "Dismissed",
45
+ promptAnsweredWith: (modeLabel) => `Allowed — ${modeLabel}`,
46
+ promptDeclinedRecord: "Not allowed",
47
+ noticeLabel: "Note",
40
48
  composerPlaceholder: "Message the agent…",
41
49
  composerUnavailable: "Chat is unavailable.",
42
50
  composerLabel: "Message",
package/dist/types.d.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * events. A category this UI needs but AgJSON cannot express is an upstream
12
12
  * silverprotocol change, never a guuey-side extension.
13
13
  */
14
- import type { AgReduceResult, AgSource, JsonValue } from "@silverprotocol/core";
14
+ import type { AgGrantMode, AgNoticeSource, AgPausedAsk, AgReduceResult, AgSource, JsonValue } from "@silverprotocol/core";
15
15
  import type { AgentInvokeStatus, HistoryCard } from "@guuey/agent-client";
16
16
  import type { ViewHostPhase, ViewMount, ViewMountChannel } from "@guuey/mcp-apps-host";
17
17
  /**
@@ -19,12 +19,18 @@ import type { ViewHostPhase, ViewMount, ViewMountChannel } from "@guuey/mcp-apps
19
19
  * compatible with the hook's `AgentMessage`, plus the optional
20
20
  * `clientMessageId` the R0 send-lifecycle join needs (the 3b live assembler
21
21
  * threads it through; history entries and older callers simply omit it).
22
+ *
23
+ * `role: "notice"` (spec draft.2, silverprotocol#16) is a host/adapter/
24
+ * framework-injected session annotation — a PEER of user/assistant rows,
25
+ * never assistant content. `noticeSource` is its provenance label (R16).
22
26
  */
23
27
  export interface TranscriptMessage {
24
- role: "user" | "assistant";
28
+ role: "user" | "assistant" | "notice";
25
29
  text: string;
26
30
  /** Present on live-sent user turns — the `sendStates` join key (R0). */
27
31
  clientMessageId?: string;
32
+ /** R16 provenance — meaningful only when `role === "notice"`. */
33
+ noticeSource?: AgNoticeSource;
28
34
  }
29
35
  /**
30
36
  * A pending/resolved consent or link ask (R10) — the turn-level
@@ -32,16 +38,54 @@ export interface TranscriptMessage {
32
38
  * The assembler (3b) accumulates these from `invokeTurn` events; `id` is
33
39
  * assembler-chosen and stable for the ask's lifetime.
34
40
  */
35
- export interface PromptItemInput {
41
+ export interface ProfilePromptInput {
36
42
  id: string;
37
43
  kind: "consent" | "link";
38
44
  appId: string;
39
45
  requested: "read" | "read-write";
40
46
  state: "pending" | "answered" | "declined" | "dismissed";
41
47
  }
48
+ /**
49
+ * An AgJSON HITL ask (spec draft.2, silverprotocol#16) lifted from the
50
+ * fold's PERSISTED declaration — the `AgPausedAsk` record in
51
+ * `turn.done.outcome:"paused".asks[]` (the ask event itself is live-only;
52
+ * the paused record is what a late-joining client renders from). Produced
53
+ * by `hitlPromptsFromFold`; `id === ask.askId`.
54
+ *
55
+ * States encode guuey's ratified dismissal ruling (issue #16): `cancelled`
56
+ * is still-pending-and-re-askable (the card stays answerable), `declined`
57
+ * is the durable explicit deny.
58
+ */
59
+ export interface HitlPromptInput {
60
+ id: string;
61
+ kind: "hitl";
62
+ /** The persisted declaration — message, kind, and any declared grantModes. */
63
+ ask: AgPausedAsk;
64
+ state: "pending" | "resolved" | "declined" | "cancelled";
65
+ /** Echo of the chosen declared mode; present iff `state === "resolved"`. */
66
+ grantModeId?: string;
67
+ }
68
+ /**
69
+ * R10 prompt inputs — a discriminated union (narrow on `kind`). The
70
+ * profile arm is the original guuey-wire shape unchanged; `hitl` arrived
71
+ * with spec draft.2. (Direct un-narrowed reads of profile-only fields are
72
+ * the one shape this union retired — narrow first.)
73
+ */
74
+ export type PromptItemInput = ProfilePromptInput | HitlPromptInput;
42
75
  /** Everything the plan derives from. All fields are data — no clocks, no DOM. */
43
76
  export interface TranscriptInputs {
44
- /** The Reducer's fold (silver mode); null on bypass-frame streams. */
77
+ /**
78
+ * The Reducer's fold (silver mode); null on bypass-frame streams.
79
+ *
80
+ * TURN-SCOPED (guuey#135 kit refinement): the fold owns the TRAILING
81
+ * assistant turns it covers — its settled sources replace that many
82
+ * trailing flat assistant entries, and any earlier flat entries (a
83
+ * rehydrated/persisted prefix the session's Reducer never saw) render as
84
+ * text in front. A fold spanning the whole conversation plans exactly as
85
+ * before, so pure-live sessions are unaffected; persisted-overlay hosts
86
+ * (portal's thread views) can now pass the session fold beside their
87
+ * persisted rows instead of nulling it.
88
+ */
45
89
  result: AgReduceResult | null;
46
90
  /**
47
91
  * The in-flight turn's cumulative text fold (ALWAYS present; the sole
@@ -75,6 +119,19 @@ export interface TranscriptInputs {
75
119
  sendStates?: Readonly<Record<string, "sending" | "failed">>;
76
120
  /** mountKey → live phase (R6 states). Keys match `ViewMountItem.key`. */
77
121
  viewPhases?: Readonly<Record<string, ViewHostPhase>>;
122
+ /**
123
+ * The mount key a host-owned stage/canvas surface currently shows
124
+ * (guuey#204 "promote and reference") — renderer-supplied state, like
125
+ * `sendStates`. When set, the plan emits a compact {@link ViewRefItem}
126
+ * in that mount's transcript slot instead of the full
127
+ * {@link ViewMountItem}, so an interactive surface exists exactly ONCE.
128
+ * Absent (or matching nothing / an expired mount) = today's behavior —
129
+ * every mount renders inline. Hosts derive the key with
130
+ * {@link newestViewKey} rather than hand-building it; the issue's
131
+ * phase-2 (every card a chip, click-to-swap) is this same field set per
132
+ * host click, no further plan changes.
133
+ */
134
+ promotedViewKey?: string;
78
135
  /** The last turn ended by user abort (R1 aborted-partial + "Stopped."). */
79
136
  aborted?: boolean;
80
137
  /**
@@ -184,6 +241,20 @@ export interface ViewMountItem extends BaseItem {
184
241
  */
185
242
  actionScope: string | null;
186
243
  }
244
+ /**
245
+ * R6's "promote and reference" chip (guuey#204): stands in for the ONE
246
+ * {@link ViewMountItem} a host's stage/canvas currently shows
247
+ * (`TranscriptInputs.promotedViewKey`), so the interactive surface exists
248
+ * exactly once. `key` is the replaced mount's key — overrides and phase
249
+ * reports keep their identity if the item swaps back to a full mount.
250
+ */
251
+ export interface ViewRefItem extends BaseItem {
252
+ kind: "viewRef";
253
+ /** The display title (the producing call's, or the strings fallback). */
254
+ title: string;
255
+ /** The full resolved chip text (`strings.viewPromoted(title)`). */
256
+ label: string;
257
+ }
187
258
  /** R7 — media blocks. */
188
259
  export interface MediaItem extends BaseItem {
189
260
  kind: "media";
@@ -209,8 +280,8 @@ export interface CitationsItem extends BaseItem {
209
280
  }[];
210
281
  style: "chips" | "list";
211
282
  }
212
- /** R10 — a consent/link prompt card. */
213
- export interface PromptItem extends BaseItem {
283
+ /** R10 — the guuey-wire consent/link prompt card (the original arm). */
284
+ export interface ProfilePromptItem extends BaseItem {
214
285
  kind: "prompt";
215
286
  /** The `PromptItemInput.id` this row records — the host's resolution key. */
216
287
  promptId: string;
@@ -221,6 +292,47 @@ export interface PromptItem extends BaseItem {
221
292
  /** Raw ask payload, populated only under the debug policy. */
222
293
  raw: JsonValue | null;
223
294
  }
295
+ /**
296
+ * R10 — an AgJSON HITL ask card (spec draft.2). Display keys off each
297
+ * mode's `label`/`description` ONLY — ids are echo-only identity, and
298
+ * mode SEMANTICS are asker-scoped (normative: never hard-code meaning
299
+ * onto an id string). `cancelled` renders as a dismissed record that is
300
+ * still answerable when expanded (guuey's re-askable ruling); `declined`
301
+ * and `resolved` are settled records.
302
+ */
303
+ export interface HitlPromptItem extends BaseItem {
304
+ kind: "prompt";
305
+ promptId: string;
306
+ promptKind: "hitl";
307
+ /** The persisted declaration — carried so answer construction/validation has the record. */
308
+ ask: AgPausedAsk;
309
+ /** The asker's message, when it sent one. */
310
+ message: string | null;
311
+ askKind: AgPausedAsk["kind"];
312
+ /** Declared accept variants; empty = a plain accept/decline ask. */
313
+ grantModes: readonly AgGrantMode[];
314
+ state: "pending" | "resolved" | "declined" | "cancelled";
315
+ /** Echo of the chosen mode id (identity, never displayed as meaning). */
316
+ chosenModeId: string | null;
317
+ /** Resolved display text for the chosen mode (label, else the id as literal text). */
318
+ chosenModeLabel: string | null;
319
+ /** Raw ask payload, populated only under the debug policy. */
320
+ raw: JsonValue | null;
321
+ }
322
+ /** R10 union — narrow on `promptKind`. */
323
+ export type PromptItem = ProfilePromptItem | HitlPromptItem;
324
+ /**
325
+ * R16 — a `role:"notice"` session annotation (spec draft.2): a labeled,
326
+ * NON-conversational row that must never read as agent-authored.
327
+ */
328
+ export interface NoticeItem extends BaseItem {
329
+ kind: "notice";
330
+ text: string;
331
+ /** Provenance facet; null when the producer omitted it. */
332
+ source: AgNoticeSource | null;
333
+ /** Resolved provenance display — the facet verbatim under debug, else null. */
334
+ sourceLabel: string | null;
335
+ }
224
336
  /** R11 — a coded, human-worded error notice. */
225
337
  export interface ErrorItem extends BaseItem {
226
338
  kind: "error";
@@ -257,7 +369,7 @@ export interface UnknownItem extends BaseItem {
257
369
  /** Pretty-printed payload, populated only under the debug policy. */
258
370
  raw: JsonValue | null;
259
371
  }
260
- export type DisplayItem = UserMessageItem | TextItem | ReasoningItem | ToolItem | ToolGroupItem | DataResultItem | ViewMountItem | MediaItem | CodeItem | CitationsItem | PromptItem | ErrorItem | HistoryBoundaryItem | CompactionItem | UnknownItem;
372
+ export type DisplayItem = UserMessageItem | TextItem | ReasoningItem | ToolItem | ToolGroupItem | DataResultItem | ViewMountItem | ViewRefItem | MediaItem | CodeItem | CitationsItem | PromptItem | NoticeItem | ErrorItem | HistoryBoundaryItem | CompactionItem | UnknownItem;
261
373
  /** R12/§4 — the derived status line with its resolved copy. */
262
374
  export interface StatusLineItem {
263
375
  kind: "status";
@@ -267,6 +379,33 @@ export interface StatusLineItem {
267
379
  /** Literal state + elapsed, populated only under the debug policy. */
268
380
  detail: string | null;
269
381
  }
382
+ /**
383
+ * The debug sink's event union (spec §5's `onDebugEvent`, shipped as real
384
+ * API in the #135 refinement wave) — built strictly from what the kit
385
+ * actually knows, never invented telemetry:
386
+ *
387
+ * - `view-phase`: an R6 mount's host-phase transition (incl. the R13
388
+ * `expired` verdict from a failed locator resolution);
389
+ * - `unknown-block`: an R15 sighting — a block type this kit version does
390
+ * not know rendered as a labeled row;
391
+ * - `turn-recovered`: the #192 adopted-turn marker resolved on the plan.
392
+ *
393
+ * The sink only fires under the debug policy (`debugDetail`) — `calm`
394
+ * ignores it by design (spec §5's per-preset row).
395
+ */
396
+ export type ChatDebugEvent = {
397
+ type: "view-phase";
398
+ key: ItemKey;
399
+ phase: ViewHostPhase | "expired";
400
+ } | {
401
+ type: "unknown-block";
402
+ key: ItemKey;
403
+ typeName: string;
404
+ byteSize: number;
405
+ } | {
406
+ type: "turn-recovered";
407
+ marker: string;
408
+ };
270
409
  export interface TranscriptPlan {
271
410
  /** Ordered, stable keys (spec §7's determinism contract). */
272
411
  items: DisplayItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,YAAY,CAAC;IACjC,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;CAC1D;AAED,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,sEAAsE;IACtE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iFAAiF;IACjF,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EA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U,GACV,YAAY,GACZ,SAAS,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kEAAkE;IAClE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guuey/chat",
3
- "version": "0.4.0",
4
- "description": "The default end-user transcript UI for guuey agents — the headless view-model (planTranscript), calm/debug presets, the GuueyChatTheme token schema, the ChatStrings i18n seam, and (at ./react) the component kit that renders it: per-category components, <Transcript>, the live + history input assemblers, and stick-to-bottom/windowed/accessible transcript behavior.",
3
+ "version": "0.6.0",
4
+ "description": "The default end-user transcript UI for guuey agents — the headless view-model (planTranscript), calm/debug presets, the GuueyChatTheme token schema, the ChatStrings i18n seam, and (at ./react) the component kit that renders it: per-category components, <Transcript>, the live + history input assemblers, and stick-to-bottom/windowed/accessible transcript behavior; at ./native, the React Native renderer over the same view-model.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -27,21 +27,31 @@
27
27
  "import": "./dist/react.js",
28
28
  "default": "./dist/react.js"
29
29
  },
30
+ "./native": {
31
+ "react-native": "./src/native.tsx",
32
+ "types": "./dist/native.d.ts",
33
+ "import": "./dist/native.js",
34
+ "default": "./dist/native.js"
35
+ },
30
36
  "./styles.css": "./styles.css"
31
37
  },
32
38
  "dependencies": {
33
- "@silverprotocol/core": "0.4.1",
34
- "@silverprotocol/richtext": "0.4.1",
39
+ "@silverprotocol/core": "0.5.0",
40
+ "@silverprotocol/richtext": "0.5.0",
35
41
  "zod": "^4.3.6",
36
- "@guuey/agent-client": "0.4.0",
37
- "@guuey/mcp-apps-host": "0.4.0"
42
+ "@guuey/agent-client": "0.6.0",
43
+ "@guuey/mcp-apps-host": "0.6.0"
38
44
  },
39
45
  "peerDependencies": {
40
- "react": ">=18"
46
+ "react": ">=18",
47
+ "react-native": ">=0.76"
41
48
  },
42
49
  "peerDependenciesMeta": {
43
50
  "react": {
44
51
  "optional": true
52
+ },
53
+ "react-native": {
54
+ "optional": true
45
55
  }
46
56
  },
47
57
  "devDependencies": {
@@ -52,6 +62,7 @@
52
62
  "jsdom": "^25.0.1",
53
63
  "react": "^19.0.0",
54
64
  "react-dom": "^19.0.0",
65
+ "react-native": "0.81.5",
55
66
  "typescript": "^5.0.0",
56
67
  "vitest": "^3.0.0"
57
68
  },
@@ -32,7 +32,19 @@ witness.
32
32
  - `drive.ts` — test-only assembler: events → `TranscriptInputs`, applying
33
33
  the hook's documented accumulation rules. The 3b live/history assemblers
34
34
  are its production twins.
35
- - `fixtures.ts` — the 17 named fixtures, spec §8 order.
35
+ - `fixtures.ts` — the named fixtures, spec §8 order: the original 17 plus
36
+ family 19 (`persisted-plus-live` — the turn-scoped fold composition:
37
+ a persisted prefix the session's Reducer never saw + a fold covering
38
+ the trailing turns, with the overlapping-card dedupe case), family 20
39
+ (`hitl-grant-modes` — spec draft.2: the persisted `AgPausedAsk`
40
+ declaration renders asker-labeled mode actions; answers echo and are
41
+ validated by core's `validateHitlAnswer` before anything dispatches;
42
+ dismissal = `cancelled` = re-askable per the silverprotocol#16 ruling),
43
+ and family 21 (`notice-rows` — draft.2's `role:"notice"`: both arrival
44
+ paths, labeled and never agent-voiced, provenance under debug only),
45
+ and family 22 (`promoted-view` — guuey#204 "promote and reference": the
46
+ one mount a host stage shows chips via `promotedViewKey`, every other
47
+ mount stays full, no/stale key is byte-identical to today).
36
48
  - `capture.ts` / `captures/` — family 18: production-capture replay
37
49
  through the real `invokeTurn` (provenance in the module header).
38
50
  - `corpus.test.ts` — the runner: per-fixture assertions + snapshots, plain
@@ -1588,3 +1588,307 @@ exports[`corpus > 16. user-send-failure — R0 failed with retry; the message ne
1588
1588
  "status": null,
1589
1589
  }
1590
1590
  `;
1591
+
1592
+ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns; the prefix stays flat; overlapping cards dedupe 1`] = `
1593
+ {
1594
+ "items": [
1595
+ {
1596
+ "expanded": true,
1597
+ "key": "u0",
1598
+ "kind": "user",
1599
+ "retry": false,
1600
+ "state": "sent",
1601
+ "text": "plan my trip",
1602
+ },
1603
+ {
1604
+ "expanded": true,
1605
+ "key": "a0.t0",
1606
+ "kind": "text",
1607
+ "markdown": true,
1608
+ "stopped": false,
1609
+ "streaming": false,
1610
+ "text": "Here are some options.",
1611
+ },
1612
+ {
1613
+ "expanded": true,
1614
+ "key": "u1",
1615
+ "kind": "user",
1616
+ "retry": false,
1617
+ "state": "sent",
1618
+ "text": "book the second one",
1619
+ },
1620
+ {
1621
+ "expanded": true,
1622
+ "key": "a1.t0",
1623
+ "kind": "text",
1624
+ "markdown": true,
1625
+ "stopped": false,
1626
+ "streaming": false,
1627
+ "text": "Booked the second option.",
1628
+ },
1629
+ {
1630
+ "argsPreview": null,
1631
+ "attribution": true,
1632
+ "expanded": false,
1633
+ "key": "tool.tA",
1634
+ "kind": "tool",
1635
+ "name": "ggui_render",
1636
+ "result": null,
1637
+ "state": "done",
1638
+ "title": "ggui render",
1639
+ "toolCallId": "tA",
1640
+ },
1641
+ {
1642
+ "actionScope": "ui://ggui/render/render_00000000-0000-4000-8000-300000000001/c0ffee",
1643
+ "attribution": "via ggui render",
1644
+ "channel": "ggui",
1645
+ "expanded": true,
1646
+ "key": "view.tA",
1647
+ "kind": "view",
1648
+ "label": "Loading view…",
1649
+ "mount": {
1650
+ "channel": "ggui",
1651
+ "resource": {
1652
+ "mimeType": "text/html",
1653
+ "text": "<!doctype html>
1654
+ <html lang="en" style="background:transparent"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><title>ggui render</title></head>
1655
+ <body style="margin:0;background:transparent">
1656
+ <script>globalThis.__GGUI_META__ = {"ai.ggui/render":{"sessionId":"render_00000000-0000-4000-8000-300000000001","appId":"APP00000","runtimeUrl":"https://dev.mcp.sandbox.ggui.ai/_ggui/iframe-runtime.js","wsUrl":"wss://dev.mcp.sandbox.ggui.ai/ws","wsToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","expiresAt":"2026-07-29T11:07:58.000Z","lastSequence":0,"propsJson":"{}"}};</script>
1657
+ <script type="module" crossorigin="anonymous" src="https://dev.mcp.sandbox.ggui.ai/_ggui/iframe-runtime.js"></script>
1658
+ </body></html>",
1659
+ "uri": "ui://ggui/render/render_00000000-0000-4000-8000-300000000001/c0ffee",
1660
+ },
1661
+ },
1662
+ "phase": "negotiating",
1663
+ "toolTitle": "ggui render",
1664
+ },
1665
+ {
1666
+ "expanded": true,
1667
+ "key": "u2",
1668
+ "kind": "user",
1669
+ "retry": false,
1670
+ "state": "sent",
1671
+ "text": "now move it to Thursday",
1672
+ },
1673
+ {
1674
+ "argsPreview": null,
1675
+ "attribution": false,
1676
+ "expanded": false,
1677
+ "key": "tool.tB",
1678
+ "kind": "tool",
1679
+ "name": "load_booking",
1680
+ "result": {
1681
+ "byteCount": 6,
1682
+ "expanded": true,
1683
+ "key": "tool.tB.result",
1684
+ "kind": "data-result",
1685
+ "preview": "loaded",
1686
+ "showBytes": false,
1687
+ "state": "small",
1688
+ },
1689
+ "state": "done",
1690
+ "title": "load booking",
1691
+ "toolCallId": "tB",
1692
+ },
1693
+ {
1694
+ "actionScope": "ui://ggui/render/old/1",
1695
+ "attribution": null,
1696
+ "channel": "locator",
1697
+ "expanded": true,
1698
+ "key": "card.1",
1699
+ "kind": "view",
1700
+ "label": "Loading view…",
1701
+ "mount": {
1702
+ "channel": "locator",
1703
+ "resourceUri": "ui://ggui/render/old/1",
1704
+ },
1705
+ "phase": "negotiating",
1706
+ "toolTitle": null,
1707
+ },
1708
+ ],
1709
+ "recovery": null,
1710
+ "status": {
1711
+ "copy": "Using check calendar…",
1712
+ "detail": null,
1713
+ "key": "status",
1714
+ "kind": "status",
1715
+ "state": "using-tool",
1716
+ },
1717
+ }
1718
+ `;
1719
+
1720
+ exports[`corpus > 20. hitl-grant-modes — the persisted declaration renders; answers echo; cancelled re-asks (draft.2) 1`] = `
1721
+ {
1722
+ "items": [
1723
+ {
1724
+ "expanded": true,
1725
+ "key": "u0",
1726
+ "kind": "user",
1727
+ "retry": false,
1728
+ "state": "sent",
1729
+ "text": "book my usual seat",
1730
+ },
1731
+ {
1732
+ "expanded": true,
1733
+ "key": "a0.t0",
1734
+ "kind": "text",
1735
+ "markdown": true,
1736
+ "stopped": false,
1737
+ "streaming": false,
1738
+ "text": "I can remember this preference.",
1739
+ },
1740
+ {
1741
+ "ask": {
1742
+ "askId": "ask-remember-1",
1743
+ "grantModes": [
1744
+ {
1745
+ "description": "Keep it for every future chat",
1746
+ "id": "m.durable",
1747
+ "label": "Always",
1748
+ },
1749
+ {
1750
+ "id": "m.scoped",
1751
+ "label": "Just this chat",
1752
+ },
1753
+ ],
1754
+ "kind": "approval",
1755
+ "message": "Remember your seating preference?",
1756
+ "requestState": "rs-bytes-1",
1757
+ },
1758
+ "askKind": "approval",
1759
+ "chosenModeId": null,
1760
+ "chosenModeLabel": null,
1761
+ "expanded": true,
1762
+ "grantModes": [
1763
+ {
1764
+ "description": "Keep it for every future chat",
1765
+ "id": "m.durable",
1766
+ "label": "Always",
1767
+ },
1768
+ {
1769
+ "id": "m.scoped",
1770
+ "label": "Just this chat",
1771
+ },
1772
+ ],
1773
+ "key": "p.ask-remember-1",
1774
+ "kind": "prompt",
1775
+ "message": "Remember your seating preference?",
1776
+ "promptId": "ask-remember-1",
1777
+ "promptKind": "hitl",
1778
+ "raw": null,
1779
+ "state": "pending",
1780
+ },
1781
+ ],
1782
+ "recovery": null,
1783
+ "status": null,
1784
+ }
1785
+ `;
1786
+
1787
+ exports[`corpus > 21. notice-rows — both arrival paths render labeled, never agent-voiced (draft.2) 1`] = `
1788
+ {
1789
+ "items": [
1790
+ {
1791
+ "expanded": true,
1792
+ "key": "n0",
1793
+ "kind": "notice",
1794
+ "source": "adapter",
1795
+ "sourceLabel": null,
1796
+ "text": "Session resumed on a new device",
1797
+ },
1798
+ {
1799
+ "expanded": true,
1800
+ "key": "nf0",
1801
+ "kind": "notice",
1802
+ "source": "framework",
1803
+ "sourceLabel": null,
1804
+ "text": "Model fell back to concise mode",
1805
+ },
1806
+ {
1807
+ "expanded": true,
1808
+ "key": "u0",
1809
+ "kind": "user",
1810
+ "retry": false,
1811
+ "state": "sent",
1812
+ "text": "hi",
1813
+ },
1814
+ {
1815
+ "expanded": true,
1816
+ "key": "a0.t0",
1817
+ "kind": "text",
1818
+ "markdown": true,
1819
+ "stopped": false,
1820
+ "streaming": false,
1821
+ "text": "Done.",
1822
+ },
1823
+ ],
1824
+ "recovery": null,
1825
+ "status": null,
1826
+ }
1827
+ `;
1828
+
1829
+ exports[`corpus > 22. promoted-view — the stage's mount chips (guuey#204); others stay; no/stale key = no-op 1`] = `
1830
+ {
1831
+ "items": [
1832
+ {
1833
+ "expanded": true,
1834
+ "key": "u0",
1835
+ "kind": "user",
1836
+ "retry": false,
1837
+ "state": "sent",
1838
+ "text": "show me two cards",
1839
+ },
1840
+ {
1841
+ "argsPreview": null,
1842
+ "attribution": true,
1843
+ "expanded": false,
1844
+ "key": "tool.t1",
1845
+ "kind": "tool",
1846
+ "name": "ggui_render",
1847
+ "result": null,
1848
+ "state": "done",
1849
+ "title": "ggui render",
1850
+ "toolCallId": "t1",
1851
+ },
1852
+ {
1853
+ "actionScope": null,
1854
+ "attribution": "via ggui render",
1855
+ "channel": "inline",
1856
+ "expanded": true,
1857
+ "key": "view.t1",
1858
+ "kind": "view",
1859
+ "label": "Loading view…",
1860
+ "mount": {
1861
+ "channel": "inline",
1862
+ "resource": {
1863
+ "mimeType": "text/html",
1864
+ "text": "<div>t1</div>",
1865
+ "uri": "ui://cards/t1",
1866
+ },
1867
+ },
1868
+ "phase": "negotiating",
1869
+ "toolTitle": "ggui render",
1870
+ },
1871
+ {
1872
+ "argsPreview": null,
1873
+ "attribution": true,
1874
+ "expanded": false,
1875
+ "key": "tool.t2",
1876
+ "kind": "tool",
1877
+ "name": "ggui_render",
1878
+ "result": null,
1879
+ "state": "done",
1880
+ "title": "ggui render",
1881
+ "toolCallId": "t2",
1882
+ },
1883
+ {
1884
+ "expanded": false,
1885
+ "key": "view.t2",
1886
+ "kind": "viewRef",
1887
+ "label": "ggui render — on canvas",
1888
+ "title": "ggui render",
1889
+ },
1890
+ ],
1891
+ "recovery": null,
1892
+ "status": null,
1893
+ }
1894
+ `;