@burdenoff/fe-libs 2026.929.1 → 2026.930.2

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 (28) hide show
  1. package/dist/shared/assistant/api.d.ts +22 -0
  2. package/dist/shared/assistant/api.d.ts.map +1 -1
  3. package/dist/shared/assistant/api.js +112 -100
  4. package/dist/shared/assistant/i18nManifest.d.ts +1 -1
  5. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  6. package/dist/shared/assistant/i18nManifest.js +1 -1
  7. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  8. package/dist/shared/assistant/ui/AssistantChatArea.js +5 -1
  9. package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +2 -0
  10. package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts.map +1 -1
  11. package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.js +104 -104
  12. package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +7 -0
  13. package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts.map +1 -1
  14. package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +91 -87
  15. package/dist/shared/assistant/ui/AssistantWriteProposalSlot.d.ts.map +1 -1
  16. package/dist/shared/assistant/ui/AssistantWriteProposalSlot.js +3 -2
  17. package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +2 -2
  18. package/dist/shared/assistant/ui/useWriteProposals.d.ts +34 -2
  19. package/dist/shared/assistant/ui/useWriteProposals.d.ts.map +1 -1
  20. package/dist/shared/assistant/ui/useWriteProposals.js +133 -115
  21. package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +26 -6
  22. package/dist/shared/assistant/ui/writeProposalPresentation.d.ts.map +1 -1
  23. package/dist/shared/assistant/ui/writeProposalPresentation.js +23 -16
  24. package/dist/shared/assistant/writeProposalDiscovery.d.ts +66 -2
  25. package/dist/shared/assistant/writeProposalDiscovery.d.ts.map +1 -1
  26. package/dist/shared/assistant/writeProposalDiscovery.js +121 -85
  27. package/dist/shared-assistant.js +155 -155
  28. package/package.json +1 -1
@@ -1,31 +1,40 @@
1
1
  import { useAuthToken as e } from "../../providers/shell/AuthTokenProvider.js";
2
2
  import "../../../shared-providers-shell.js";
3
3
  import { useAssistantStore as t } from "../store.js";
4
- import { writeProposalErrorLine as n } from "../writeProposalErrorCopy.js";
5
- import { getOrganizationId as r, getWorkspaceId as i } from "../context.js";
6
- import { writeProposalConfirmState as a } from "./writeProposalPresentation.js";
7
- import { createSandboxWriteProposalClient as o } from "../writeProposals.js";
8
- import { createWriteProposalDiscovery as s, readWriteProposalRefs as c, writeProposalsEnabledFor as l } from "../writeProposalDiscovery.js";
9
- import { WRITE_REPLY_DECLINE_WAIT_MS as u, settleWithin as d, writeReplyLiveState as f } from "../writeReplySend.js";
10
- import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
4
+ import { readSandboxWriteCapabilitiesOnce as n } from "../api.js";
5
+ import { writeProposalErrorLine as r } from "../writeProposalErrorCopy.js";
6
+ import { getOrganizationId as i, getWorkspaceId as a } from "../context.js";
7
+ import { writeProposalConfirmState as o } from "./writeProposalPresentation.js";
8
+ import { WRITE_PROPOSAL_SANDBOX_MODE as s, createSandboxWriteProposalClient as c } from "../writeProposals.js";
9
+ import { createWriteProposalDiscovery as l, readWriteProposalRefs as u, writeProposalSessionsToReopen as d, writeProposalsEnabledFor as f } from "../writeProposalDiscovery.js";
10
+ import { WRITE_REPLY_DECLINE_WAIT_MS as p, settleWithin as m, writeReplyLiveState as h } from "../writeReplySend.js";
11
+ import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
11
12
  //#region src/shared/assistant/ui/useWriteProposals.ts
12
- var _ = new Set([
13
+ var b = new Set([
13
14
  "succeeded",
14
15
  "failed",
15
16
  "outcome_unknown",
16
17
  "declined",
17
18
  "superseded",
18
19
  "expired"
19
- ]), v = (e) => `${e.sandboxId}\u0000${e.sessionId}`;
20
- function y() {
20
+ ]), x = (e) => `${e.sandboxId}\u0000${e.sessionId}`;
21
+ function S(e) {
22
+ return {
23
+ accessToken: e.getAccessToken(),
24
+ workspaceToken: e.getWorkspaceToken(),
25
+ userId: e.userId,
26
+ organizationId: i()
27
+ };
28
+ }
29
+ function C() {
21
30
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
22
31
  }
23
- function b(e) {
32
+ function w(e) {
24
33
  let t = /* @__PURE__ */ new Set();
25
- for (let n of e.messages) for (let e of c(n.metadata)) t.add(e.proposalId);
34
+ for (let n of e.messages) for (let e of u(n.metadata)) t.add(e.proposalId);
26
35
  return t;
27
36
  }
28
- function x(e, t, n) {
37
+ function T(e, t, n) {
29
38
  if (n) {
30
39
  let t = e.messages.find((e) => e.id === n);
31
40
  if (t?.role === "assistant") return t;
@@ -36,11 +45,11 @@ function x(e, t, n) {
36
45
  }
37
46
  return null;
38
47
  }
39
- function S(e) {
48
+ function E(e) {
40
49
  let t = /* @__PURE__ */ new Map();
41
50
  for (let n of e) {
42
51
  if (n.view.status !== "pending") continue;
43
- let e = `${v(n.session)}\u0000${n.session.conversationId}`, r = t.get(e) ?? {
52
+ let e = `${x(n.session)}\u0000${n.session.conversationId}`, r = t.get(e) ?? {
44
53
  session: n.session,
45
54
  proposalIds: []
46
55
  };
@@ -48,183 +57,192 @@ function S(e) {
48
57
  }
49
58
  return t;
50
59
  }
51
- function C(C) {
52
- let { getAccessToken: w, getWorkspaceToken: T, userId: E } = e(), D = h({
53
- tr: C.tr,
54
- getAccessToken: w,
55
- getWorkspaceToken: T,
56
- userId: E
60
+ function D(i) {
61
+ let { getAccessToken: D, getWorkspaceToken: O, userId: k } = e(), A = v({
62
+ tr: i.tr,
63
+ productWriteApproval: i.productWriteApproval ?? "legacy",
64
+ getAccessToken: D,
65
+ getWorkspaceToken: O,
66
+ userId: k
57
67
  });
58
- p(() => {
59
- D.current = {
60
- tr: C.tr,
61
- getAccessToken: w,
62
- getWorkspaceToken: T,
63
- userId: E
68
+ g(() => {
69
+ A.current = {
70
+ tr: i.tr,
71
+ productWriteApproval: i.productWriteApproval ?? "legacy",
72
+ getAccessToken: D,
73
+ getWorkspaceToken: O,
74
+ userId: k
64
75
  };
65
76
  });
66
- let [O, k] = g({}), A = h({}), j = h(/* @__PURE__ */ new Map()), M = h(/* @__PURE__ */ new Set()), N = h(null), P = h(/* @__PURE__ */ new Set()), [F, I] = g(() => /* @__PURE__ */ new Set());
67
- p(() => {
68
- let e = M.current, a = (e) => {
77
+ let [j, M] = y({}), N = v({}), P = v(/* @__PURE__ */ new Map()), F = v(/* @__PURE__ */ new Set()), I = v(null), L = v(/* @__PURE__ */ new Set()), R = v(/* @__PURE__ */ new Map()), z = v(/* @__PURE__ */ new Set()), [B, V] = y(() => /* @__PURE__ */ new Set());
78
+ g(() => {
79
+ let e = F.current, n = (e) => {
69
80
  if (e.length === 0) return;
70
- let t = { ...A.current };
81
+ let t = { ...N.current };
71
82
  for (let n of e) {
72
83
  let e = t[n.view.proposalId];
73
- e && _.has(e.view.status) && !_.has(n.view.status) || (t[n.view.proposalId] = n);
84
+ e && b.has(e.view.status) && !b.has(n.view.status) || (t[n.view.proposalId] = n);
74
85
  }
75
- A.current = t, k(t);
76
- }, l = (e, n, r) => {
86
+ N.current = t, M(t);
87
+ }, i = (e, n, r) => {
77
88
  let i = t.getState(), a = i.conversations.find((t) => t.id === e.conversationId);
78
89
  if (!a) return;
79
- let o = b(a), s = n.filter((e) => !o.has(e.proposalId) && (e.status === "pending" || e.status === "executing"));
90
+ let o = w(a), s = n.filter((e) => !o.has(e.proposalId) && (e.status === "pending" || e.status === "executing"));
80
91
  if (s.length === 0) return;
81
- let l = x(a, e, r);
82
- l && i.mergeMessageMetadata(a.id, l.id, { writeProposalRefs: [...c(l.metadata), ...s.map((t) => ({
92
+ let c = T(a, e, r);
93
+ c && i.mergeMessageMetadata(a.id, c.id, { writeProposalRefs: [...u(c.metadata), ...s.map((t) => ({
83
94
  proposalId: t.proposalId,
84
95
  sandboxId: e.sandboxId,
85
96
  sessionId: e.sessionId
86
97
  }))] });
87
- }, u = s({
88
- client: o({
89
- getWorkspaceId: i,
90
- getAuthContext: () => ({
91
- accessToken: D.current.getAccessToken(),
92
- workspaceToken: D.current.getWorkspaceToken(),
93
- userId: D.current.userId,
94
- organizationId: r()
95
- })
98
+ }, o = l({
99
+ client: c({
100
+ getWorkspaceId: a,
101
+ getAuthContext: () => S(A.current)
96
102
  }),
97
103
  capabilitiesOf: (e) => t.getState().sandboxWriteCapabilities[e],
98
- onList: (e, t, n) => {
99
- j.current.set(v(e), t.serverNow), a(t.proposals.map((n) => ({
100
- view: n,
104
+ actorOf: () => A.current.userId,
105
+ onList: (e, t, r) => {
106
+ let a = {
101
107
  serverNow: t.serverNow,
108
+ arrivedAt: Date.now()
109
+ };
110
+ P.current.set(x(e), a), n(t.proposals.map((t) => ({
111
+ view: t,
112
+ ...a,
102
113
  session: e
103
- }))), l(e, t.proposals, n.turnMessageId);
114
+ }))), i(e, t.proposals, r.turnMessageId);
104
115
  },
105
116
  onView: (e, t) => {
106
- a([{
117
+ let r = N.current[t.proposalId];
118
+ n([{
107
119
  view: t,
108
- serverNow: j.current.get(v(e)) ?? A.current[t.proposalId]?.serverNow ?? NaN,
120
+ ...P.current.get(x(e)) ?? {
121
+ serverNow: r?.serverNow ?? NaN,
122
+ arrivedAt: r?.arrivedAt ?? NaN
123
+ },
109
124
  session: e
110
125
  }]);
111
126
  },
112
- onError: (e, r, i) => {
113
- let a = n(r, i), { tr: o } = D.current;
127
+ onError: (e, n, i) => {
128
+ let a = r(n, i), { tr: o } = A.current;
114
129
  t.getState().addMessage(e.conversationId, {
115
- id: y(),
130
+ id: C(),
116
131
  role: "system",
117
132
  content: o(a.key, a.fallback),
118
133
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
119
134
  });
120
135
  }
121
136
  });
122
- return N.current = u, () => {
123
- u.dispose(), N.current === u && (N.current = null), e.clear();
137
+ I.current = o;
138
+ let s = R.current;
139
+ return () => {
140
+ o.dispose(), I.current === o && (I.current = null), e.clear(), s.clear();
124
141
  };
125
- }, []);
126
- let L = (e, t) => {
127
- let n = N.current;
142
+ }, []), g(() => t.subscribe((e, t) => {
143
+ if (e.sandboxWriteCapabilities === t.sandboxWriteCapabilities) return;
144
+ let n = R.current;
145
+ for (let [t, r] of [...n]) {
146
+ let i = e.sandboxWriteCapabilities[r.sandboxId];
147
+ i && (n.delete(t), f(i) && (F.current.add(x(r)), I.current?.discover(r, "open")));
148
+ }
149
+ }), []);
150
+ let H = (e, t) => {
151
+ let n = I.current;
128
152
  if (!n) return;
129
- let r = P.current, i = e.filter((e) => !r.has(e.view.proposalId));
130
- for (let { session: e, proposalIds: a } of S(i).values()) {
153
+ let r = L.current, i = e.filter((e) => !r.has(e.view.proposalId));
154
+ for (let { session: e, proposalIds: a } of E(i).values()) {
131
155
  for (let e of a) r.add(e);
132
156
  n.declineAll(e, t, "system");
133
157
  }
134
- }, R = h(L);
135
- return p(() => {
136
- R.current = L;
137
- }), p(() => t.subscribe((e, t) => {
158
+ }, U = v(H);
159
+ return g(() => {
160
+ U.current = H;
161
+ }), g(() => t.subscribe((e, t) => {
138
162
  if (e.conversations === t.conversations) return;
139
- let n = new Set(e.conversations.map((e) => e.id)), r = Object.values(A.current).filter((e) => !n.has(e.session.conversationId));
140
- r.length > 0 && R.current(r, "conversation_closed");
163
+ let n = new Set(e.conversations.map((e) => e.id)), r = Object.values(N.current).filter((e) => !n.has(e.session.conversationId));
164
+ r.length > 0 && U.current(r, "conversation_closed");
141
165
  }), []), {
142
- panel: m(() => {
143
- let e = (e) => t.getState().sandboxWriteCapabilities[e];
166
+ panel: _(() => {
167
+ let e = (e) => t.getState().sandboxWriteCapabilities[e], r = (e) => {
168
+ let t = A.current;
169
+ if (t.productWriteApproval !== "proposal-v1") return;
170
+ let r = z.current;
171
+ if (r.has(e)) return;
172
+ let i = a();
173
+ i && (r.add(e), n(e, i, s, S(t)).finally(() => r.delete(e)));
174
+ };
144
175
  return {
145
176
  afterTurn: (e, t) => {
146
- N.current?.discover(e, "turn", { turnMessageId: t });
177
+ I.current?.discover(e, "turn", { turnMessageId: t });
147
178
  },
148
- openConversation: (e) => {
149
- let n = N.current;
150
- if (!n) return;
151
- let r = t.getState().conversations.find((t) => t.id === e);
152
- if (!r) return;
153
- let i = /* @__PURE__ */ new Map();
154
- for (let t of r.messages) for (let n of c(t.metadata)) i.set(v(n), {
155
- sandboxId: n.sandboxId,
156
- sessionId: n.sessionId,
157
- conversationId: e
158
- });
159
- let a = r.backendSessionId;
160
- if (a) for (let t = r.messages.length - 1; t >= 0; --t) {
161
- let n = r.messages[t]?.metadata;
162
- if (n?.sessionId === a && n.sandboxId) {
163
- i.set(v({
164
- sandboxId: n.sandboxId,
165
- sessionId: a
166
- }), {
167
- sandboxId: n.sandboxId,
168
- sessionId: a,
169
- conversationId: e
170
- });
171
- break;
179
+ openConversation: (n) => {
180
+ let i = I.current;
181
+ if (!i) return;
182
+ let a = R.current;
183
+ for (let [e, t] of [...a]) t.conversationId !== n && a.delete(e);
184
+ let o = t.getState().conversations.find((e) => e.id === n);
185
+ if (o) for (let { session: t, issuing: n } of d(o)) {
186
+ let o = e(t.sandboxId);
187
+ if (f(o)) {
188
+ i.discover(t, "open");
189
+ continue;
172
190
  }
191
+ o || (a.set(`${x(t)}\u0000${t.conversationId}`, t), n && r(t.sandboxId));
173
192
  }
174
- for (let e of i.values()) n.discover(e, "open");
175
193
  },
176
194
  ensureKnown: (t, n) => {
177
- let r = N.current;
178
- if (!r || A.current[t.proposalId] || !l(e(t.sandboxId))) return;
179
- let i = v(t);
180
- M.current.has(i) || (M.current.add(i), r.discover({
195
+ let r = I.current;
196
+ if (!r || N.current[t.proposalId] || !f(e(t.sandboxId))) return;
197
+ let i = x(t);
198
+ F.current.has(i) || (F.current.add(i), r.discover({
181
199
  sandboxId: t.sandboxId,
182
200
  sessionId: t.sessionId,
183
201
  conversationId: n
184
202
  }, "mount"));
185
203
  },
186
204
  approve: async (e, t) => {
187
- let n = A.current[e.proposalId], r = N.current;
205
+ let n = N.current[e.proposalId], r = I.current;
188
206
  !n || !r || await r.approve(n.session, e, t);
189
207
  },
190
208
  decline: async (e, t, n) => {
191
- let r = A.current[e.proposalId], i = N.current;
209
+ let r = N.current[e.proposalId], i = I.current;
192
210
  !r || !i || await i.decline(r.session, e, t, "button", n);
193
211
  },
194
212
  presented: async (e, t) => {
195
- let n = A.current[e.proposalId], r = N.current;
213
+ let n = N.current[e.proposalId], r = I.current;
196
214
  !n || !r || await r.presented(n.session, e, t);
197
215
  },
198
- entry: (e) => A.current[e],
216
+ entry: (e) => N.current[e],
199
217
  liveFor: (t) => {
200
- let n = N.current;
201
- return f(t ? Object.values(A.current).filter((e) => e.session.conversationId === t && !n?.isRetired(e.session.sandboxId)).map((t) => ({
218
+ let n = I.current;
219
+ return h(t ? Object.values(N.current).filter((e) => e.session.conversationId === t && !n?.isRetired(e.session.sandboxId)).map((t) => ({
202
220
  status: t.view.status,
203
221
  sandboxId: t.session.sandboxId,
204
- offersConfirm: a(t.view, e(t.session.sandboxId)).offerConfirm
222
+ offersConfirm: o(t.view, e(t.session.sandboxId)).offerConfirm
205
223
  })) : []);
206
224
  },
207
225
  declineForReply: async (e, t, n) => {
208
- let r = N.current;
226
+ let r = I.current;
209
227
  if (!r) return;
210
228
  let i = n;
211
- await d([...S(Object.values(A.current).filter((t) => t.session.conversationId === e && !r.isRetired(t.session.sandboxId))).values()].map(({ session: e }) => r.declineAll(e, t, i, { report: !0 })), u);
229
+ await m([...E(Object.values(N.current).filter((t) => t.session.conversationId === e && !r.isRetired(t.session.sandboxId))).values()].map(({ session: e }) => r.declineAll(e, t, i, { report: !0 })), p);
212
230
  },
213
231
  withdraw: (e, t) => {
214
- R.current(Object.values(A.current).filter((t) => t.session.conversationId === e), t);
232
+ U.current(Object.values(N.current).filter((t) => t.session.conversationId === e), t);
215
233
  },
216
234
  retireSandbox: (e) => {
217
- let t = N.current;
218
- !t || t.isRetired(e) || (R.current(Object.values(A.current).filter((t) => t.session.sandboxId === e), "sandbox_replaced"), t.retire(e), I((t) => {
235
+ let t = I.current;
236
+ !t || t.isRetired(e) || (U.current(Object.values(N.current).filter((t) => t.session.sandboxId === e), "sandbox_replaced"), t.retire(e), V((t) => {
219
237
  let n = new Set(t);
220
238
  return n.add(e), n;
221
239
  }));
222
240
  }
223
241
  };
224
242
  }, []),
225
- entries: O,
226
- retiredSandboxes: F
243
+ entries: j,
244
+ retiredSandboxes: B
227
245
  };
228
246
  }
229
247
  //#endregion
230
- export { C as useWriteProposals };
248
+ export { D as useWriteProposals };
@@ -47,14 +47,34 @@ export declare function writeProposalVariableValues(view: WriteProposalView): Wr
47
47
  /** "Expires in 4:59", or, under reduced motion, words that move once a minute. */
48
48
  export declare function writeProposalCountdownText(remainingMs: number, reducedMotion: boolean, tr: AssistantTr): string;
49
49
  /**
50
- * How long until `expiresAt`, on the ISSUING sandbox's clock.
50
+ * How long until `expiresAt`, on the ISSUING sandbox's clock, when this
51
+ * device's clock reads `localNow`.
51
52
  *
52
- * `serverNow` is that sandbox's clock when the record was read
53
- * (`list().serverNow`); the difference from this device's clock is measured
54
- * again whenever a fresh read arrives. While `ticking`, the value moves once a
55
- * second.
53
+ * `serverNow` is that sandbox's clock at the read the record came from
54
+ * (`list().serverNow`), and `arrivedAt` is this device's clock when that read
55
+ * arrived. Together they are one sample of the sandbox's clock, so what has
56
+ * passed since is `localNow - arrivedAt` whenever the question is asked.
57
+ *
58
+ * ★★ BOFF-8163: the sample is taken when the read ARRIVES, never when a card
59
+ * mounts. A card first drawn minutes after the read (the voice tray, a
60
+ * conversation reopened before its fresh read lands, a dialog opened late)
61
+ * used to count those minutes as time still left, and kept its confirm
62
+ * enabled past the record's expiry.
63
+ *
64
+ * An unreadable sample (either value not finite) leaves this device's clock
65
+ * as the only one there is.
66
+ */
67
+ export declare function writeProposalRemainingMs(expiresAt: number, serverNow: number, arrivedAt: number, localNow: number): number;
68
+ /**
69
+ * `writeProposalRemainingMs` for a surface, kept current while `ticking`.
70
+ *
71
+ * It ticks on the countdown's own whole seconds, so it reaches 0 at the
72
+ * moment the record expires rather than up to a second later, and stops
73
+ * there: nothing changes after that until a fresh read does. Each time
74
+ * ticking starts (a dialog opening) this device's clock is read at once, so a
75
+ * surface that was idle never shows a stale figure.
56
76
  */
57
- export declare function useWriteProposalRemainingMs(expiresAt: number, serverNow: number, ticking: boolean): number;
77
+ export declare function useWriteProposalRemainingMs(expiresAt: number, serverNow: number, arrivedAt: number, ticking: boolean): number;
58
78
  /** Whether a proposal's controls, and its confirm, may be offered. */
59
79
  export interface WriteProposalConfirmState {
60
80
  /** The issuing sandbox speaks the v1 protocol and enforces it. */
@@ -1 +1 @@
1
- {"version":3,"file":"writeProposalPresentation.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/writeProposalPresentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AAEH,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,yCAAW,CAAC;AAY5C,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ/D;AAkBD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAW7E;AAqBD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,MAAM,CAUR;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,qBAAqB,EAC3B,EAAE,EAAE,WAAW,GACd,MAAM,GAAG,IAAI,CAkBf;AAED,+CAA+C;AAC/C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,EACvB,EAAE,EAAE,WAAW,GACd,MAAM,CAIR;AAED,8EAA8E;AAC9E,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,2EAA2E;AAC3E,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,OAAO,CAAC,GACrD,MAAM,CAER;AAED,iEAAiE;AACjE,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,sBAAsB,GAC5B,uBAAuB,EAAE,CAQ3B;AAED,kEAAkE;AAClE,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,iBAAiB,GACtB,uBAAuB,EAAE,CAO3B;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,EAAE,EAAE,WAAW,GACd,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,MAAM,CAmBR;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,GACxD,yBAAyB,CAY3B"}
1
+ {"version":3,"file":"writeProposalPresentation.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/writ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,EAAE,CAO3B;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,EAAE,EAAE,WAAW,GACd,MAAM,CAeR;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,MAAM,CAKR;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,MAAM,CAwBR;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,GACxD,yBAAyB,CAY3B"}
@@ -81,23 +81,30 @@ function h(e, t, n) {
81
81
  let r = Math.ceil(e / 1e3);
82
82
  return n("writeProposal.expiresIn", "Expires in {{time}}", { time: `${Math.floor(r / 60)}:${String(r % 60).padStart(2, "0")}` });
83
83
  }
84
- function g(n, r, i) {
85
- let [a, o] = t(() => ({
86
- serverNow: r,
87
- offset: Number.isFinite(r) ? r - Date.now() : 0
88
- })), s = a.offset;
89
- Object.is(a.serverNow, r) || (s = Number.isFinite(r) ? r - Date.now() : 0, o({
90
- serverNow: r,
91
- offset: s
92
- }));
93
- let [c, l] = t(() => Date.now());
84
+ function g(e, t, n, r) {
85
+ return !Number.isFinite(t) || !Number.isFinite(n) ? e - r : e - (t + (r - n));
86
+ }
87
+ function _(n, r, i, a) {
88
+ let [o, s] = t(() => Date.now());
94
89
  return e(() => {
95
- if (!i) return;
96
- let e = setInterval(() => l(Date.now()), 1e3);
97
- return () => clearInterval(e);
98
- }, [i]), n - (c + s);
90
+ if (!a) return;
91
+ let e = null, t = () => {
92
+ let a = Date.now();
93
+ s(a);
94
+ let o = g(n, r, i, a);
95
+ o <= 0 || (e = setTimeout(t, (o - 1) % 1e3 + 1));
96
+ };
97
+ return t(), () => {
98
+ e !== null && clearTimeout(e);
99
+ };
100
+ }, [
101
+ a,
102
+ n,
103
+ r,
104
+ i
105
+ ]), g(n, r, i, o);
99
106
  }
100
- function _(e, t) {
107
+ function v(e, t) {
101
108
  let n = t?.proposals === !0 && t.writeApprovalMode === "proposal-v1", r = e.execution.enabled !== !0 || t?.writeExecution !== "enabled", i = e.status === "pending" && e.approvable && n;
102
109
  return {
103
110
  available: n,
@@ -107,4 +114,4 @@ function _(e, t) {
107
114
  };
108
115
  }
109
116
  //#endregion
110
- export { n as WRITE_PROPOSAL_MASK, a as formatWriteProposalValue, l as redactWriteProposalText, g as useWriteProposalRemainingMs, p as writeProposalArgumentValues, _ as writeProposalConfirmState, h as writeProposalCountdownText, d as writeProposalGatewayText, u as writeProposalKindText, f as writeProposalRootFieldName, s as writeProposalSensitiveTexts, m as writeProposalVariableValues };
117
+ export { n as WRITE_PROPOSAL_MASK, a as formatWriteProposalValue, l as redactWriteProposalText, _ as useWriteProposalRemainingMs, p as writeProposalArgumentValues, v as writeProposalConfirmState, h as writeProposalCountdownText, d as writeProposalGatewayText, u as writeProposalKindText, g as writeProposalRemainingMs, f as writeProposalRootFieldName, s as writeProposalSensitiveTexts, m as writeProposalVariableValues };
@@ -23,10 +23,62 @@ export interface WriteProposalSession {
23
23
  sessionId: string;
24
24
  conversationId: string;
25
25
  }
26
+ /**
27
+ * Whether a listed record may be drawn for `session` (BOFF-8128).
28
+ *
29
+ * The sandbox answers a session's list with the records bound to that session
30
+ * and to the actor asking, plus the ones its helper printed there that it
31
+ * could not bind yet. This is the panel's own check on the answer: a record
32
+ * bound to ANOTHER session or ANOTHER conversation is never this one's, so it
33
+ * is not drawn here and nothing is decided on it from here. A record not bound
34
+ * yet (`null`) is kept: its view says `approvable: false`, so its card offers
35
+ * no confirm.
36
+ */
37
+ export declare function writeProposalBelongsTo(view: Pick<WriteProposalView, "sessionId" | "conversationId">, session: Pick<WriteProposalSession, "sessionId" | "conversationId">): boolean;
38
+ /** A session a reopened conversation may hold proposals in. */
39
+ export interface WriteProposalReopenTarget {
40
+ session: WriteProposalSession;
41
+ /**
42
+ * The session ran in a Take-action sandbox, the only kind that issues
43
+ * proposals (`WRITE_PROPOSAL_SANDBOX_MODE`): a reference names it, or the
44
+ * reply that ran there says so. Only such a sandbox's `/health` is read
45
+ * when this page has not read it yet (after a reload).
46
+ */
47
+ issuing: boolean;
48
+ }
49
+ /** What `writeProposalSessionsToReopen` reads of a message. */
50
+ interface ReopenMessage {
51
+ metadata?: {
52
+ readonly sandboxId?: unknown;
53
+ readonly sessionId?: unknown;
54
+ readonly mode?: unknown;
55
+ readonly writeProposalRefs?: unknown;
56
+ } | null;
57
+ }
58
+ /**
59
+ * The sessions to read when a conversation is opened, each once:
60
+ * - every session its replies' references name (this device's own record of
61
+ * the proposals the thread showed);
62
+ * - the session the conversation is in now (`backendSessionId`), in the
63
+ * sandbox its newest reply there ran in: a proposal whose turn could not be
64
+ * read at the time is found here.
65
+ *
66
+ * ★ Nothing else. A conversation read back from server history has no
67
+ * references (they never leave the device) and no current session, so it has
68
+ * nothing to read: a proposal lives in the sandbox that issued it, and only
69
+ * this device's own thread points at it.
70
+ */
71
+ export declare function writeProposalSessionsToReopen(conversation: {
72
+ id: string;
73
+ backendSessionId?: string | null;
74
+ messages: readonly ReopenMessage[];
75
+ }): WriteProposalReopenTarget[];
26
76
  /**
27
77
  * Why the panel asked:
28
78
  * - `turn`: a turn in this session just settled;
29
- * - `open`: a conversation was opened;
79
+ * - `open`: a conversation was opened, or (BOFF-8128) the `/health` of a
80
+ * sandbox it was waiting on arrived — after a reload, nothing may be asked
81
+ * before it;
30
82
  * - `mount`: a card mounted whose record this panel does not hold;
31
83
  * - `poll`: a proposal of the session is executing;
32
84
  * - `refresh`: after a press, so the card shows the record.
@@ -47,7 +99,10 @@ export interface WriteProposalDiscoveryDeps {
47
99
  client: WriteProposalClient;
48
100
  /** The ISSUING sandbox's `/health` write capabilities, read live. */
49
101
  capabilitiesOf: (sandboxId: string) => SandboxWriteCapabilities | null | undefined;
50
- /** A list arrived for `session`. */
102
+ /**
103
+ * A list arrived for `session`: only the records that belong to it
104
+ * (`writeProposalBelongsTo`).
105
+ */
51
106
  onList: (session: WriteProposalSession, list: WriteProposalList, context: WriteProposalListContext) => void;
52
107
  /** One proposal as the sandbox now reports it. */
53
108
  onView: (session: WriteProposalSession, view: WriteProposalView) => void;
@@ -60,6 +115,14 @@ export interface WriteProposalDiscoveryDeps {
60
115
  maxPollFailures?: number;
61
116
  /** A `clientRequestId` for each call. */
62
117
  requestId?: () => string;
118
+ /**
119
+ * Who is signed in now (BOFF-8128). Read when a list is asked for and again
120
+ * when it answers: an answer read for a person who is no longer the one
121
+ * signed in (someone else, or no one) is dropped, unseen. Absent, or no one
122
+ * known when it was asked: the answer is kept — the gateway identified the
123
+ * caller from the credentials the request carried.
124
+ */
125
+ actorOf?: () => string | null | undefined;
63
126
  }
64
127
  export interface WriteProposalDiscovery {
65
128
  /** Ask the issuing sandbox what the session holds. */
@@ -120,4 +183,5 @@ export declare function newWriteProposalRequestId(): string;
120
183
  /** Any thrown value, as a proposal error (a plain `Error` is `UNKNOWN`). */
121
184
  export declare function asWriteProposalError(error: unknown): WriteProposalError;
122
185
  export declare function createWriteProposalDiscovery(deps: WriteProposalDiscoveryDeps): WriteProposalDiscovery;
186
+ export {};
123
187
  //# sourceMappingURL=writeProposalDiscovery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeProposalDiscovery.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/writeProposalDiscovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,kBAAkB,EAElB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACpE,uBAAuB,EAAE,CA0B3B;AAED,qEAAqE;AACrE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GACpC,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd,mEAAmE;AACnE,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,4BAA4B,CAAC;IACrC,6DAA6D;IAC7D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAA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AAE,0BAA0B,GAC/B,sBAAsB,CAkTxB"}
1
+ {"version":3,"file":"writeProposalDiscovery.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/writeProposalDiscovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAEL,kBAAkB,EAElB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACpE,uBAAuB,EAAE,CA0B3B;AAED,qEAAqE;AACrE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,gBAAgB,CAAC,EAC7D,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,gBAAgB,CAAC,GAClE,OAAO,CAMT;AAED,+DAA+D;AAC/D,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,oBAAoB,CAAC;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,+DAA+D;AAC/D,UAAU,aAAa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