@burdenoff/fe-libs 2026.1007.5 → 2026.1007.6

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 (92) hide show
  1. package/dist/shared/assistant/api.d.ts +11 -0
  2. package/dist/shared/assistant/api.d.ts.map +1 -1
  3. package/dist/shared/assistant/api.js +6 -2
  4. package/dist/shared/assistant/conversation.d.ts +14 -0
  5. package/dist/shared/assistant/conversation.d.ts.map +1 -1
  6. package/dist/shared/assistant/createSandboxAssistantTransport.d.ts +8 -1
  7. package/dist/shared/assistant/createSandboxAssistantTransport.d.ts.map +1 -1
  8. package/dist/shared/assistant/createSandboxAssistantTransport.js +70 -51
  9. package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -1
  10. package/dist/shared/assistant/history/historyMapping.js +19 -12
  11. package/dist/shared/assistant/i18nManifest.d.ts +9 -0
  12. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  13. package/dist/shared/assistant/i18nManifest.js +9 -0
  14. package/dist/shared/assistant/index.d.ts +6 -0
  15. package/dist/shared/assistant/index.d.ts.map +1 -1
  16. package/dist/shared/assistant/localUiCommandCopy.d.ts +23 -0
  17. package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -1
  18. package/dist/shared/assistant/localUiCommandCopy.js +60 -23
  19. package/dist/shared/assistant/localUiCommands.d.ts +29 -0
  20. package/dist/shared/assistant/localUiCommands.d.ts.map +1 -1
  21. package/dist/shared/assistant/localUiCommands.js +18 -7
  22. package/dist/shared/assistant/types.d.ts +19 -8
  23. package/dist/shared/assistant/types.d.ts.map +1 -1
  24. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  25. package/dist/shared/assistant/ui/AssistantChatArea.js +1479 -1140
  26. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +18 -3
  27. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts.map +1 -1
  28. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +1 -1
  29. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +5 -0
  30. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
  31. package/dist/shared/assistant/ui/AssistantMessageItem.js +89 -84
  32. package/dist/shared/assistant/ui/AssistantMessageList.d.ts +5 -0
  33. package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
  34. package/dist/shared/assistant/ui/AssistantMessageList.js +26 -25
  35. package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts +45 -0
  36. package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts.map +1 -0
  37. package/dist/shared/assistant/ui/AssistantUiOfferLink.js +56 -0
  38. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +9 -0
  39. package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
  40. package/dist/shared/assistant/ui/assistantOverlayState.js +37 -28
  41. package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts.map +1 -1
  42. package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +1 -1
  43. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +5 -0
  44. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
  45. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +12 -11
  46. package/dist/shared/assistant/ui/voice/VoiceConversationView.d.ts +6 -1
  47. package/dist/shared/assistant/ui/voice/VoiceConversationView.d.ts.map +1 -1
  48. package/dist/shared/assistant/ui/voice/VoiceConversationView.js +7 -7
  49. package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts +6 -1
  50. package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts.map +1 -1
  51. package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.js +15 -12
  52. package/dist/shared/assistant/uiActions/actOnResolve.d.ts +108 -0
  53. package/dist/shared/assistant/uiActions/actOnResolve.d.ts.map +1 -0
  54. package/dist/shared/assistant/uiActions/actOnResolve.js +51 -0
  55. package/dist/shared/assistant/uiActions/linkContext.d.ts +29 -0
  56. package/dist/shared/assistant/uiActions/linkContext.d.ts.map +1 -1
  57. package/dist/shared/assistant/uiActions/linkContext.js +37 -10
  58. package/dist/shared/assistant/uiActions/navIntent.d.ts +58 -0
  59. package/dist/shared/assistant/uiActions/navIntent.d.ts.map +1 -0
  60. package/dist/shared/assistant/uiActions/navIntent.js +79 -0
  61. package/dist/shared/assistant/uiActions/navigateAction.d.ts +6 -1
  62. package/dist/shared/assistant/uiActions/navigateAction.d.ts.map +1 -1
  63. package/dist/shared/assistant/uiActions/navigateAction.js +18 -14
  64. package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +16 -2
  65. package/dist/shared/assistant/uiActions/navigationOutcome.d.ts.map +1 -1
  66. package/dist/shared/assistant/uiActions/navigationOutcome.js +6 -2
  67. package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +39 -0
  68. package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts.map +1 -0
  69. package/dist/shared/assistant/uiActions/offerYesOnSurface.js +34 -0
  70. package/dist/shared/assistant/uiActions/uiCatalogue.d.ts +14 -0
  71. package/dist/shared/assistant/uiActions/uiCatalogue.d.ts.map +1 -1
  72. package/dist/shared/assistant/uiActions/uiCatalogue.js +23 -3
  73. package/dist/shared/assistant/uiActions/uiOffers.d.ts +249 -0
  74. package/dist/shared/assistant/uiActions/uiOffers.d.ts.map +1 -0
  75. package/dist/shared/assistant/uiActions/uiOffers.js +195 -0
  76. package/dist/shared/assistant/writeProposals.d.ts +6 -0
  77. package/dist/shared/assistant/writeProposals.d.ts.map +1 -1
  78. package/dist/shared/assistant/writeReplyBinder.d.ts +40 -0
  79. package/dist/shared/assistant/writeReplyBinder.d.ts.map +1 -1
  80. package/dist/shared/assistant/writeReplyBinder.js +100 -83
  81. package/dist/shared/assistant/writeReplySend.d.ts +14 -0
  82. package/dist/shared/assistant/writeReplySend.d.ts.map +1 -1
  83. package/dist/shared/assistant/writeReplySend.js +32 -29
  84. package/dist/shared/hooks/index.d.ts +2 -0
  85. package/dist/shared/hooks/index.d.ts.map +1 -1
  86. package/dist/shared/navigation/unsavedChanges.d.ts +83 -0
  87. package/dist/shared/navigation/unsavedChanges.d.ts.map +1 -0
  88. package/dist/shared/navigation/unsavedChanges.js +46 -0
  89. package/dist/shared-assistant.js +244 -238
  90. package/dist/shared-hooks.js +10 -9
  91. package/dist/shared.js +20 -19
  92. package/package.json +1 -1
@@ -0,0 +1,249 @@
1
+ import { LocalDestination } from '../localUiCommands';
2
+ import { AssistantMode, AssistantRawMessage } from '../types';
3
+ /**
4
+ * ★ BOFF-8060 (N3): the pages the model OFFERS, as the sandbox reports them on
5
+ * the turn poller's `/messages` reads (`uiOffers`, design §2.6 and §3).
6
+ *
7
+ * A pure module: no React, no DOM, no store, no network. The panel owns one
8
+ * `UiOfferSession` per page load (a `useRef`, never persisted), so a reloaded
9
+ * page or a reopened conversation holds no offer at all (C11).
10
+ *
11
+ * ★★ What the sandbox sends is ids only — no label, no path, no model text. The
12
+ * label and the path always come from the person's LIVE, RBAC-filtered
13
+ * registry (`resolveOffer`), re-checked when the link is drawn and again when
14
+ * it is accepted. An offer whose id is not in that registry is never shown.
15
+ *
16
+ * An offer is admitted only for a turn THIS page session sent: the panel
17
+ * records each turn at send time (`recordTurn`), binds the sandbox's own ids
18
+ * for it from the turn's messages (`observeMessages`), and an offer counts
19
+ * only when its `turnId` and `assistantMessageId` are among them. Offers for
20
+ * any other turn are never shown.
21
+ *
22
+ * Offers are navigation only. Nothing here sends, approves or writes.
23
+ */
24
+ /** The sandbox's offer view (design §2.6), strictly checked by `parseUiOffers`. */
25
+ export interface UiOfferView {
26
+ v: 1;
27
+ /** `uo_` + 32 lowercase hex. */
28
+ offerId: string;
29
+ /** A registry id (the N2 catalogue id). No label, no path. */
30
+ catalogueId: string;
31
+ /** The model asked a yes/no question about it. Never true in a write transport. */
32
+ ask: boolean;
33
+ /** The sandbox's user message id the reply answers. */
34
+ turnId: string;
35
+ /** The sandbox's assistant message id of the reply. */
36
+ assistantMessageId: string;
37
+ conversationId: string;
38
+ /** The sandbox's OWN transport (`AI_ASSISTANT_READONLY`), never the panel's guess. */
39
+ transport: UiOfferTransport;
40
+ /** Server clock, ms. */
41
+ mintedAt: number;
42
+ /** Server clock, ms; at most `mintedAt + UI_OFFER_LIFETIME_MS`. */
43
+ expiresAt: number;
44
+ state: UiOfferState;
45
+ }
46
+ export type UiOfferTransport = "read" | "write";
47
+ export type UiOfferState = "live" | "expired";
48
+ /** At most this many offers are read from one `/messages` answer (the server's own cap). */
49
+ export declare const UI_OFFER_MAX_PER_READ = 10;
50
+ /** An offer lives at most 10 minutes from its mint, on the server's clock. */
51
+ export declare const UI_OFFER_LIFETIME_MS = 600000;
52
+ /** The page session never holds more than this many offers; the oldest go first. */
53
+ export declare const UI_OFFER_SESSION_MAX = 50;
54
+ export declare const UI_OFFER_ID_PATTERN: RegExp;
55
+ /** The N2 catalogue id charset (ai-assistant `UI_CATALOGUE_ID_PATTERN`). */
56
+ export declare const UI_OFFER_CATALOGUE_ID_PATTERN: RegExp;
57
+ /** A sandbox message id (opencode `msg_…`). */
58
+ export declare const UI_OFFER_MESSAGE_ID_PATTERN: RegExp;
59
+ /**
60
+ * The panel's conversation id, as the prompt sends it (`api.ts`
61
+ * `PROMPT_CONVERSATION_ID_PATTERN`; a test holds the two equal). Copied, not
62
+ * imported, so this module stays free of the network layer.
63
+ */
64
+ export declare const UI_OFFER_CONVERSATION_ID_PATTERN: RegExp;
65
+ /**
66
+ * The `uiOffers` field of one `/messages` answer, with that answer's `now`.
67
+ *
68
+ * - Absent (an older image, or no offer): an empty list.
69
+ * - Not an array, or no usable server clock: null — nothing is admitted.
70
+ * - Each item is checked field by field and DROPPED on any failure; duplicates
71
+ * keep the first; at most `UI_OFFER_MAX_PER_READ` items are kept.
72
+ */
73
+ export declare function parseUiOffers(raw: unknown, serverNow: unknown): {
74
+ offers: UiOfferView[];
75
+ serverNow: number;
76
+ } | null;
77
+ /** What the person's sidebar shows them NOW, and whether that list is real. */
78
+ export interface UiOfferRegistry {
79
+ destinations: readonly LocalDestination[];
80
+ /** Permissions loaded without error (`useVisibleNavItems`). */
81
+ permissionsSettled: boolean;
82
+ /** A role simulation is running. */
83
+ simulating: boolean;
84
+ }
85
+ /** A resolved offer: the registry's own label and path, never the model's. */
86
+ export interface UiOfferTarget {
87
+ id: string;
88
+ label: string;
89
+ /** Where the sidebar takes the person (`navTargetPath`). */
90
+ path: string;
91
+ context?: string;
92
+ }
93
+ /**
94
+ * The page an offer names, from the LIVE registry — or null.
95
+ *
96
+ * The same gate as `buildUiCatalogue`: never from the optimistic list shown
97
+ * while permissions load, never when the fetch failed, never during a role
98
+ * simulation. Entity routes are never offer targets (catalogue ids are nav ids).
99
+ */
100
+ export declare function resolveOffer(offer: Pick<UiOfferView, "catalogueId">, registry: UiOfferRegistry): UiOfferTarget | null;
101
+ /** A turn THIS page session sent, recorded at send time. */
102
+ export interface UiOfferTurnStart {
103
+ /** The panel's own reply message id (the bubble the offer is drawn under). */
104
+ replyId: string;
105
+ conversationId: string;
106
+ sandboxId: string;
107
+ sessionId: string;
108
+ /** The mode the turn was SENT in (Auto conversations mix transports). */
109
+ mode: AssistantMode;
110
+ /** That mode's `writeCapable`, at send time. */
111
+ writeCapable: boolean;
112
+ /** The signed-in actor who sent it. */
113
+ actorId: string;
114
+ /** The turn's reply floor: only messages created after it are this turn's. */
115
+ floorMs: number;
116
+ }
117
+ /** An admitted offer, with the clock of the read that last carried it. */
118
+ export interface ClientUiOffer extends UiOfferView {
119
+ /** The server's clock the first time this page session saw it. */
120
+ firstSeenServerNow: number;
121
+ /** The server's clock at the last read that carried it… */
122
+ serverNowAtRead: number;
123
+ /** …and the client's monotonic clock at that read. */
124
+ perfAtRead: number;
125
+ /** Accepted once already: a second tap, "yes" or "take me there" does nothing. */
126
+ used: boolean;
127
+ }
128
+ /** Who is looking, where, and at what the sidebar shows — read live by the caller. */
129
+ export interface UiOfferLiveContext {
130
+ registry: UiOfferRegistry;
131
+ /** The signed-in actor now. */
132
+ actorId: string | null | undefined;
133
+ /** The conversation the reply is shown in. */
134
+ conversationId: string | null | undefined;
135
+ /** `performance.now()` (or any monotonic ms). */
136
+ perfNow: number;
137
+ }
138
+ /** A live offer, resolved. */
139
+ export interface LiveUiOffer {
140
+ offer: ClientUiOffer;
141
+ target: UiOfferTarget;
142
+ }
143
+ /** The offer's age (design §5.2): the server clock plus a monotonic delta. */
144
+ export declare function uiOfferAgeMs(offer: ClientUiOffer, perfNow: number): number;
145
+ /** Not expired by the server's word, by its own `expiresAt`, or by the 10-minute life. */
146
+ export declare function uiOfferInTime(offer: ClientUiOffer, perfNow: number): boolean;
147
+ /**
148
+ * The offers this page session has seen, keyed by offer id, and the turns it
149
+ * sent. One per panel, in a `useRef`; never persisted.
150
+ */
151
+ export declare class UiOfferSession {
152
+ private readonly turns;
153
+ private readonly offers;
154
+ /** Record a turn as it is sent. Only such turns can ever show an offer. */
155
+ recordTurn(start: UiOfferTurnStart): void;
156
+ /** The turn recorded for this reply, or undefined (a reopened conversation). */
157
+ turnFor(replyId: string): Readonly<UiOfferTurnStart> | undefined;
158
+ /**
159
+ * Bind the sandbox's own ids for this turn from a `/messages` read: user
160
+ * messages created after the floor, and the assistant messages that answer
161
+ * them (`parentID`). True when something new was learned.
162
+ */
163
+ observeMessages(replyId: string, messages: readonly AssistantRawMessage[]): boolean;
164
+ /**
165
+ * Take the offers of one `/messages` read for this turn. Only the turn's
166
+ * own conversation is kept; an offer seen before keeps its first sighting
167
+ * and whether it was used, and takes the newer state and clock. True when
168
+ * anything changed.
169
+ */
170
+ receive(replyId: string, raw: unknown, serverNow: unknown, perfNow: number): boolean;
171
+ private evict;
172
+ /** Every offer bound to this reply's turn, used or not, live or not. */
173
+ offersFor(replyId: string): ClientUiOffer[];
174
+ /**
175
+ * The offers that may be shown or accepted under this reply now (design
176
+ * §3.2 `liveOfferFor`): the turn was sent from this page session by the actor
177
+ * signed in now, into the conversation shown; the offer is live, unused, in
178
+ * time, and names a page the person's live registry holds.
179
+ */
180
+ liveOffersFor(replyId: string, context: UiOfferLiveContext): LiveUiOffer[];
181
+ /**
182
+ * Claim an offer for acceptance. Set BEFORE navigating, so a double tap or a
183
+ * double "yes" does nothing the second time. False when it was already used
184
+ * or is unknown.
185
+ */
186
+ markUsed(offerId: string): boolean;
187
+ /**
188
+ * ★ BOFF-8060 (N4): give back a claim whose navigation was REFUSED for
189
+ * unsaved changes. Nothing was routed, so the offer was not used: its "Open
190
+ * {page}" link comes back, for when the person has saved or discarded.
191
+ * False when it is unknown or was not claimed.
192
+ */
193
+ release(offerId: string): boolean;
194
+ /** One offer by id, or undefined. */
195
+ offer(offerId: string): ClientUiOffer | undefined;
196
+ /** The reply an offer is bound to in this page session, or undefined. */
197
+ replyIdOf(offerId: string): string | undefined;
198
+ /**
199
+ * Milliseconds until the next bound, unused, live offer runs out of time, or
200
+ * null when none will. The panel re-renders then, so an expired link goes.
201
+ */
202
+ nextExpiryInMs(perfNow: number): number | null;
203
+ }
204
+ /**
205
+ * Which hint goes under the link (design §4): "…or “yes”" only for an offer the
206
+ * model asked about in a read transport — the sandbox's own transport AND the
207
+ * mode the turn was sent in. Anything else gets the tap / "take me there" hint.
208
+ */
209
+ export declare function uiOfferHintKind(offer: Pick<UiOfferView, "ask" | "transport">, turn: Pick<UiOfferTurnStart, "writeCapable"> | undefined): "read" | "link";
210
+ /**
211
+ * Y5: the reply asked exactly ONE question, and it is the last sentence.
212
+ *
213
+ * Code (fenced and inline), markdown link targets, autolinks and bare URLs
214
+ * are removed first — a `?` in a URL or a snippet is not a question. `?`, `؟`,
215
+ * `?` and `¿` all count, so a reply that also asks something in another script
216
+ * is not "one question".
217
+ */
218
+ export declare function asksOneQuestionLast(text: string): boolean;
219
+ /** What the binder may do with a bare "yes" (design §6). */
220
+ export type UiOfferYesState = "acceptable" | "expired" | "none";
221
+ /** What `offerYesState` reads, all of it live at the decision point. */
222
+ export interface UiOfferYesInput extends UiOfferLiveContext {
223
+ /** The newest assistant reply on the surface the "yes" came from, with its displayed text; null when a person message came after it. */
224
+ newestReply: {
225
+ id: string;
226
+ text: string;
227
+ } | null;
228
+ /** The product's own write approval (`proposal-v1` or not). */
229
+ productWriteApproval: string | null | undefined;
230
+ /** The issuing sandbox's own `/health`, as recorded. */
231
+ capabilitiesOf: (sandboxId: string) => {
232
+ uiOffers?: boolean;
233
+ writeApprovalMode?: string;
234
+ } | null | undefined;
235
+ }
236
+ /**
237
+ * Whether a bare "yes" accepts an offer, for the 5a binder's precedence row
238
+ * (design §6, guards Y1–Y6; Y7 — a bare English affirm — is the binder's).
239
+ *
240
+ * `acceptable` only when ALL hold: the product and the issuing sandbox are
241
+ * proposal-v1 and the sandbox serves offers (Y1); the sandbox's transport is
242
+ * read AND the mode the turn was sent in cannot write (Y2); exactly one live
243
+ * offer under the newest reply on the surface (Y3); the model asked about it
244
+ * (Y4); the reply asked one question, last (Y5); in time, unused, resolvable
245
+ * (Y6). `expired` when the one offer that would otherwise qualify ran out of
246
+ * time. Everything else is `none`, and the binder keeps its 5a meaning.
247
+ */
248
+ export declare function offerYesState(session: UiOfferSession, input: UiOfferYesInput): UiOfferYesState;
249
+ //# sourceMappingURL=uiOffers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiOffers.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/uiActions/uiOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,mFAAmF;AACnF,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,CAAC,CAAC;IACL,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAA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AG,SAAS;IAa9C;;;OAGG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAe/C;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,WAAW,CAAC,EAC7C,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG,SAAS,GACvD,MAAM,GAAG,MAAM,CAIjB;AAKD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWzD;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhE,wEAAwE;AACxE,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,wIAAwI;IACxI,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,wDAAwD;IACxD,cAAc,EAAE,CACd,SAAS,EAAE,MAAM,KACd;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,eAAe,GACrB,eAAe,CAqCjB"}
@@ -0,0 +1,195 @@
1
+ //#region src/shared/assistant/uiActions/uiOffers.ts
2
+ var e = 10, t = 6e5, n = 50, r = /^uo_[0-9a-f]{32}$/, i = /^[A-Za-z0-9:_.-]{1,64}$/, a = /^[A-Za-z0-9_-]{1,128}$/, o = /^[A-Za-z0-9_-]{1,128}$/, s = new Set(["read", "write"]), c = new Set(["live", "expired"]), l = (e) => typeof e == "object" && !!e && !Array.isArray(e), u = (e, t) => typeof e == "string" && t.test(e), d = (e) => typeof e == "number" && Number.isFinite(e);
3
+ function f(e) {
4
+ if (!l(e) || e.v !== 1) return null;
5
+ let { offerId: t, catalogueId: n, ask: f, turnId: p, assistantMessageId: m, conversationId: h, transport: g, mintedAt: _, expiresAt: v, state: y } = e;
6
+ return !u(t, r) || !u(n, i) || typeof f != "boolean" || !u(p, a) || !u(m, a) || !u(h, o) || typeof g != "string" || !s.has(g) || typeof y != "string" || !c.has(y) || !d(_) || !d(v) || v < _ || v - _ > 6e5 || f && g !== "read" ? null : {
7
+ v: 1,
8
+ offerId: t,
9
+ catalogueId: n,
10
+ ask: f,
11
+ turnId: p,
12
+ assistantMessageId: m,
13
+ conversationId: h,
14
+ transport: g,
15
+ mintedAt: _,
16
+ expiresAt: v,
17
+ state: y
18
+ };
19
+ }
20
+ function p(e, t) {
21
+ if (!d(t)) return null;
22
+ if (e === void 0) return {
23
+ offers: [],
24
+ serverNow: t
25
+ };
26
+ if (!Array.isArray(e)) return null;
27
+ let n = [], r = /* @__PURE__ */ new Set();
28
+ for (let t of e) {
29
+ if (n.length >= 10) break;
30
+ let e = f(t);
31
+ !e || r.has(e.offerId) || (r.add(e.offerId), n.push(e));
32
+ }
33
+ return {
34
+ offers: n,
35
+ serverNow: t
36
+ };
37
+ }
38
+ function m(e, t) {
39
+ if (!t.permissionsSettled || t.simulating) return null;
40
+ let n = t.destinations.find((t) => t.id === e.catalogueId);
41
+ return n ? {
42
+ id: n.id,
43
+ label: n.label,
44
+ path: n.path,
45
+ ...n.context ? { context: n.context } : {}
46
+ } : null;
47
+ }
48
+ function h(e, t) {
49
+ return e.serverNowAtRead - e.mintedAt + Math.max(0, t - e.perfAtRead);
50
+ }
51
+ function g(e, t) {
52
+ if (e.state !== "live") return !1;
53
+ let n = h(e, t);
54
+ return n <= 6e5 && e.mintedAt + n < e.expiresAt;
55
+ }
56
+ function _(e, t) {
57
+ let n = e.info?.time?.created;
58
+ return typeof n == "number" && n > t;
59
+ }
60
+ var v = class {
61
+ turns = /* @__PURE__ */ new Map();
62
+ offers = /* @__PURE__ */ new Map();
63
+ recordTurn(e) {
64
+ this.turns.set(e.replyId, {
65
+ ...e,
66
+ serverTurns: /* @__PURE__ */ new Map()
67
+ });
68
+ }
69
+ turnFor(e) {
70
+ return this.turns.get(e);
71
+ }
72
+ observeMessages(e, t) {
73
+ let n = this.turns.get(e);
74
+ if (!n) return !1;
75
+ let r = !1;
76
+ for (let e of t) {
77
+ if (!_(e, n.floorMs)) continue;
78
+ let t = e.info?.id;
79
+ typeof t == "string" && e.info?.role === "user" && !n.serverTurns.has(t) && (n.serverTurns.set(t, /* @__PURE__ */ new Set()), r = !0);
80
+ }
81
+ for (let e of t) {
82
+ if (!_(e, n.floorMs)) continue;
83
+ let t = e.info?.id, i = e.info?.parentID;
84
+ if (e.info?.role !== "assistant" || typeof t != "string" || typeof i != "string") continue;
85
+ let a = n.serverTurns.get(i);
86
+ a && !a.has(t) && (a.add(t), r = !0);
87
+ }
88
+ return r;
89
+ }
90
+ receive(e, t, n, r) {
91
+ let i = this.turns.get(e);
92
+ if (!i) return !1;
93
+ let a = p(t, n);
94
+ if (!a) return !1;
95
+ let o = !1;
96
+ for (let e of a.offers) {
97
+ if (e.conversationId !== i.conversationId) continue;
98
+ let t = this.offers.get(e.offerId);
99
+ t && (t.turnId !== e.turnId || t.assistantMessageId !== e.assistantMessageId || t.catalogueId !== e.catalogueId || t.conversationId !== e.conversationId) || (this.offers.set(e.offerId, {
100
+ ...e,
101
+ state: t?.state === "expired" ? "expired" : e.state,
102
+ firstSeenServerNow: t?.firstSeenServerNow ?? a.serverNow,
103
+ serverNowAtRead: a.serverNow,
104
+ perfAtRead: r,
105
+ used: t?.used ?? !1
106
+ }), o = !0);
107
+ }
108
+ return this.evict(), o;
109
+ }
110
+ evict() {
111
+ if (this.offers.size <= 50) return;
112
+ let e = [...this.offers.values()].sort((e, t) => e.mintedAt - t.mintedAt);
113
+ for (let t of e.slice(0, this.offers.size - 50)) this.offers.delete(t.offerId);
114
+ }
115
+ offersFor(e) {
116
+ let t = this.turns.get(e);
117
+ return t ? [...this.offers.values()].filter((e) => e.conversationId === t.conversationId && t.serverTurns.get(e.turnId)?.has(e.assistantMessageId) === !0).sort((e, t) => e.mintedAt - t.mintedAt) : [];
118
+ }
119
+ liveOffersFor(e, t) {
120
+ let n = this.turns.get(e);
121
+ if (!n || !t.actorId || n.actorId !== t.actorId || !t.conversationId || n.conversationId !== t.conversationId) return [];
122
+ let r = [];
123
+ for (let n of this.offersFor(e)) {
124
+ if (n.used || !g(n, t.perfNow)) continue;
125
+ let e = m(n, t.registry);
126
+ e && r.push({
127
+ offer: n,
128
+ target: e
129
+ });
130
+ }
131
+ return r;
132
+ }
133
+ markUsed(e) {
134
+ let t = this.offers.get(e);
135
+ return !t || t.used ? !1 : (this.offers.set(e, {
136
+ ...t,
137
+ used: !0
138
+ }), !0);
139
+ }
140
+ release(e) {
141
+ let t = this.offers.get(e);
142
+ return !t || !t.used ? !1 : (this.offers.set(e, {
143
+ ...t,
144
+ used: !1
145
+ }), !0);
146
+ }
147
+ offer(e) {
148
+ return this.offers.get(e);
149
+ }
150
+ replyIdOf(e) {
151
+ let t = this.offers.get(e);
152
+ if (t) {
153
+ for (let [e, n] of this.turns) if (t.conversationId === n.conversationId && n.serverTurns.get(t.turnId)?.has(t.assistantMessageId) === !0) return e;
154
+ }
155
+ }
156
+ nextExpiryInMs(e) {
157
+ let n = null;
158
+ for (let r of this.turns.keys()) for (let i of this.offersFor(r)) {
159
+ if (i.used || !g(i, e)) continue;
160
+ let r = h(i, e), a = Math.min(t - r, i.expiresAt - (i.mintedAt + r));
161
+ n = n === null ? a : Math.min(n, a);
162
+ }
163
+ return n === null ? null : Math.max(0, n);
164
+ }
165
+ };
166
+ function y(e, t) {
167
+ return e.ask && e.transport === "read" && t?.writeCapable === !1 ? "read" : "link";
168
+ }
169
+ var b = /[?؟?¿]/g, x = /[\s*_)\]"'”’»]+$/u;
170
+ function S(e) {
171
+ let t = e.replace(/```[\s\S]*?```/g, " ").replace(/`[^`]*`/g, " ").replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/<[a-z][a-z0-9+.-]*:[^>\s]*>/gi, " ").replace(/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi, " ");
172
+ if ((t.match(b) ?? []).length !== 1) return !1;
173
+ let n = t.replace(x, "");
174
+ return /[?؟?]$/.test(n);
175
+ }
176
+ function C(e, t) {
177
+ let n = t.newestReply;
178
+ if (!n) return "none";
179
+ let r = e.turnFor(n.id);
180
+ if (!r || !t.actorId || r.actorId !== t.actorId || !t.conversationId || r.conversationId !== t.conversationId || t.productWriteApproval !== "proposal-v1") return "none";
181
+ let i = t.capabilitiesOf(r.sandboxId);
182
+ if (i?.uiOffers !== !0 || i.writeApprovalMode !== "proposal-v1" || r.writeCapable !== !1 || !S(n.text)) return "none";
183
+ let a = e.offersFor(n.id).filter((e) => !e.used), o = e.liveOffersFor(n.id, t), s = (e) => e.transport === "read" && e.ask;
184
+ if (o.length === 1) {
185
+ let e = o[0];
186
+ return e && a.length === 1 && s(e.offer) ? "acceptable" : "none";
187
+ }
188
+ if (o.length === 0 && a.length === 1) {
189
+ let e = a[0];
190
+ if (e && s(e) && !g(e, t.perfNow) && m(e, t.registry)) return "expired";
191
+ }
192
+ return "none";
193
+ }
194
+ //#endregion
195
+ export { i as UI_OFFER_CATALOGUE_ID_PATTERN, o as UI_OFFER_CONVERSATION_ID_PATTERN, r as UI_OFFER_ID_PATTERN, t as UI_OFFER_LIFETIME_MS, e as UI_OFFER_MAX_PER_READ, a as UI_OFFER_MESSAGE_ID_PATTERN, n as UI_OFFER_SESSION_MAX, v as UiOfferSession, S as asksOneQuestionLast, C as offerYesState, p as parseUiOffers, m as resolveOffer, h as uiOfferAgeMs, y as uiOfferHintKind, g as uiOfferInTime };
@@ -21,6 +21,12 @@ export interface SandboxWriteCapabilities {
21
21
  replyApproval: "off";
22
22
  writeRiskVersion?: string;
23
23
  sessionCredentials?: SandboxSessionCredentials;
24
+ /**
25
+ * ★ BOFF-8060 (N3): the image serves page offers (`/health`
26
+ * `capabilities.uiOffers === 1`). Absent on every other image: the panel
27
+ * then reads no offer from it.
28
+ */
29
+ uiOffers?: true;
24
30
  }
25
31
  export type WriteProposalStatus = "pending" | "executing" | "succeeded" | "failed" | "outcome_unknown" | "declined" | "superseded" | "expired";
26
32
  export type WriteProposalStatusReason = "user_declined" | "corrected" | "redirected" | "not_chosen" | "user_replied" | "conversation_closed" | "mode_switched" | "sandbox_replaced" | "ttl" | "evicted" | "context_changed" | "stale_execution";
@@ -1 +1 @@
1
- {"version":3,"file":"writeProposals.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/writeProposals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAM1E,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEzD,yFAAyF;AACzF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEvD,mFAAmF;AACnF,MAAM,MAAM,yBAAyB,GACjC,OAAO,GACP,WAAW,GACX,QAAQ,GACR,cAAc,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,cAAc,EAAE,mBAAmB,CAAC;IACpC,4DAA4D;IAC5D,aAAa,EAAE,KAAK,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;CAChD;AAMD,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,WAAW,GACX,WAAW,GACX,QAAQ,GACR,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jE,OAAO,CACL,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,2BAA2B,CAAC;QACrC,eAAe,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC,OAAO,CACL,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE;QACP,MAAM,EAAE,0BAA0B,CAAC;QACnC,MAAM,EAAE,0BAA0B,CAAC;QACnC,OAAO,CAAC,EAAE,4BAA4B,CAAC;QACvC,eAAe,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,UAAU,CACR,GAAG,EAAE,uBAAuB,EAC5B,OAAO,EAAE;QACP,MAAM,EAAE,0BAA0B,CAAC;QACnC,MAAM,EAAE,0BAA0B,CAAC;QACnC,eAAe,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;IACpD,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,gEAAgE;IAChE,cAAc,EAAE,MAAM,2BAA2B,CAAC;CACnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,aAA2B,CAAC;AAKtE,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,8BAA8B,GACnC,mBAAmB,CAoMrB;AA0cD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,iBAAiB,GAAG,IAAI,CAmF1B"}
1
+ {"version":3,"file":"writeProposals.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/writeProposals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAM1E,sFAAsF;AACtF,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,6BAA6B,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;IACpD,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,gEAAgE;IAChE,cAAc,EAAE,MAAM,2BAA2B,CAAC;CACnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,aAA2B,CAAC;AAKtE,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,8BAA8B,GACnC,mBAAmB,CAoMrB;AA0cD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,iBAAiB,GAAG,IAAI,CAmF1B"}
@@ -1,3 +1,4 @@
1
+ import { UiOfferYesState } from './uiActions/uiOffers';
1
2
  import { WriteExecutionState, WriteProposalDeclineReason } from './writeProposals';
2
3
  /** What a reply is, as far as a waiting change is concerned (contract §3.3). */
3
4
  export type WriteReplyClass = "affirm" | "affirm_with_change" | "decline" | "decline_redirect" | "other";
@@ -70,6 +71,16 @@ export type WriteReplyDecision =
70
71
  action: "local";
71
72
  text: WriteReplyText;
72
73
  declineAll: WriteReplyDeclineReason | null;
74
+ }
75
+ /**
76
+ * ★ BOFF-8060 (N3, design §6 row 3): a bare "yes" to the one page the model
77
+ * offered and asked about, with NOTHING waiting. The caller re-validates the
78
+ * offer and NAVIGATES through a registered handler — that is all. Nothing is
79
+ * sent, nothing is declined, no `writeReply`; it is not, and cannot become,
80
+ * a confirmation of anything.
81
+ */
82
+ | {
83
+ action: "accept_offer";
73
84
  };
74
85
  export interface WriteReplyDecisionInput {
75
86
  cls: WriteReplyClass;
@@ -91,6 +102,21 @@ export interface WriteReplyDecisionInput {
91
102
  * confirm button, so its reply must not point to one. Unknown means fenced.
92
103
  */
93
104
  execution: WriteExecutionState;
105
+ /**
106
+ * ★ BOFF-8060 (N3): what a bare "yes" could mean for a page the model offered
107
+ * (`offerYesState`, guards Y1–Y6; Y7 — a bare English affirm — is this
108
+ * table's own `cls`). Read ONLY with nothing pending and a bare affirm: a
109
+ * waiting change always wins (5a). Absent: `none`, the table as it was.
110
+ */
111
+ offer?: UiOfferYesState;
112
+ /**
113
+ * ★ BOFF-8060 (N3): the reply carries a question mark, in any script
114
+ * (`isQuestionReply`). "yes?", "ok?" and "sure?" ask back; they never accept
115
+ * an offer (blind corpus, near-affirmatives). Read ONLY by the offer rows,
116
+ * and only `false` lets them answer: absent counts as a question, so a
117
+ * caller that does not say goes the 5a way. The 5a rows are unchanged.
118
+ */
119
+ question?: boolean;
94
120
  }
95
121
  /**
96
122
  * Everything the binder says. Rendered through `tr(line.key, line.fallback,
@@ -114,6 +140,12 @@ export declare const WRITE_REPLY_COPY: Readonly<{
114
140
  fallback: "Cancelled.";
115
141
  }>;
116
142
  }>;
143
+ /**
144
+ * ★ BOFF-8060 (N3, design §6 row 4): a bare "yes" to an offered page whose
145
+ * time ran out. The key is the offer copy's own (`localUiCommandCopy.ts`, in
146
+ * the manifest's static table); a test holds the two fallbacks equal.
147
+ */
148
+ export declare const WRITE_REPLY_OFFER_EXPIRED: WriteReplyLine;
117
149
  /** The lexicons, for the tests. Frozen copies. */
118
150
  export declare const WRITE_REPLY_LEXICON: Readonly<{
119
151
  affirm: readonly ("yes" | "ok" | "confirm" | "approve" | "yeah" | "yep" | "yup" | "okay" | "sure" | "do it" | "go ahead" | "please do" | "yes please" | "sounds good" | "thats right")[];
@@ -121,6 +153,12 @@ export declare const WRITE_REPLY_LEXICON: Readonly<{
121
153
  courtesy: readonly ("please" | "thanks" | "thank you")[];
122
154
  maxAffirmTokens: 4;
123
155
  }>;
156
+ /**
157
+ * ★ BOFF-8060 (N3): whether a reply asks something back. Anywhere in it, not
158
+ * only at its end ("yes...?", "¿sí?"): a reply that carries a question is not
159
+ * a bare acceptance of an offered page.
160
+ */
161
+ export declare function isQuestionReply(text: string): boolean;
124
162
  /**
125
163
  * Classify a reply, and find what a redirecting decline asks for instead.
126
164
  *
@@ -153,6 +191,8 @@ export declare function isUserOriginatedWriteReply(origin: WriteReplyOrigin): bo
153
191
  * | Condition | Decision |
154
192
  * |-----------------------------------|-----------------------------------------------------------|
155
193
  * | origin not typed/spoken | forward, unchanged |
194
+ * | 0 pending + affirm + offer acceptable + no "?" | accept_offer: navigate only; nothing sent (N3, Y1–Y7) |
195
+ * | 0 pending + affirm + offer expired + no "?" | local_reply: offer.expired; nothing sent (N3) |
156
196
  * | 0 pending + affirm | forward with writeReply{affirm} (the server's bridge) |
157
197
  * | 0 pending + anything else | normal |
158
198
  * | ≥1 pending + affirm | local_reply: useButton (1) / whichOne (≥2); fenced: replyCannotRun |
@@ -1 +1 @@
1
- {"version":3,"file":"writeReplyBinder.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/writeReplyBinder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAM1B,gFAAgF;AAChF,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,oBAAoB,GACpB,SAAS,GACT,kBAAkB,GAClB,OAAO,CAAC;AAEZ,2EAA2E;AAC3E,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,QAAQ,GACR,MAAM,GACN,aAAa,GACb,OAAO,GACP,iBAAiB,CAAC;AAEtB,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAE5D,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,0EAA0E;AAC1E,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C,0BAA0B,EAC1B,WAAW,GAAG,eAAe,GAAG,YAAY,CAC7C,CAAC;AAEF,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAA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