@burdenoff/fe-libs 2026.924.3 → 2026.924.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"adminModeSendGate.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/adminModeSendGate.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,IAAI,IAAI,eAAe,CAAC;IACxB,iFAAiF;IACjF,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC;;;OAGG;IACH,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACnD;;;;;;;;;;;;;OAaG;IACH,OAAO,IAAI,IAAI,CAAC;IAChB,gFAAgF;IAChF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAOD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,GACvB,mBAAmB,CAwDrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mCAAmC,CACvD,MAAM,EAAE;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAC/D,IAAI,EAAE,mBAAmB,EACzB,S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C5C,OAAO,CAAC,iBAAiB,CAAC,CAoC5B"}
@@ -1,8 +1,9 @@
1
- import { adminOnlyModeSendRefusal as e, resolveAssistantModeCapabilities as t, unofferedModeSendRefusal as n } from "./modeCapabilities.js";
1
+ import { UNAVAILABLE_MODE_REFUSAL as e, adminOnlyModeSendRefusal as t, resolveAssistantModeCapabilities as n, unofferedModeSendRefusal as r } from "./modeCapabilities.js";
2
+ import { AssistantSendRefusal as i } from "./turnOutcome.js";
2
3
  //#region src/shared/assistant/adminModeSendGate.ts
3
- var r = 1e4;
4
- function i(e) {
5
- let t = e, n = [], i = (e) => {
4
+ var a = 1e4;
5
+ function o(e) {
6
+ let t = e, n = [], r = (e) => {
6
7
  let t = n;
7
8
  n = [];
8
9
  for (let n of t) n.timer !== null && clearTimeout(n.timer), n.settle(e);
@@ -10,9 +11,9 @@ function i(e) {
10
11
  return {
11
12
  read: () => t,
12
13
  update(e) {
13
- t = e, e.loading || i(e);
14
+ t = e, e.loading || r(e);
14
15
  },
15
- wait(e = r) {
16
+ wait(e = a) {
16
17
  return t.loading ? new Promise((r) => {
17
18
  let i = {
18
19
  settle: r,
@@ -24,29 +25,31 @@ function i(e) {
24
25
  }) : Promise.resolve(t);
25
26
  },
26
27
  abandon() {
27
- i(t);
28
+ r(t);
28
29
  },
29
30
  get pendingCount() {
30
31
  return n.length;
31
32
  }
32
33
  };
33
34
  }
34
- async function a(t, n, i = r) {
35
- return t?.requiresAdmin ? e(t, await n.wait(i)) : null;
35
+ async function s(e, n, r = a) {
36
+ return e?.requiresAdmin ? t(e, await n.wait(r)) : null;
36
37
  }
37
- async function o(e, t, i, a = r) {
38
- return n(e, t()) === null ? null : (await i.wait(a), n(e, t()));
38
+ async function c(e, t, n, i = a) {
39
+ return r(e, t()) === null ? null : (await n.wait(i), r(e, t()));
39
40
  }
40
- async function s(i, a, s, c = r) {
41
- let l = Date.now() + c, u = await o(i, a, s, c);
42
- if (u) throw Error(u);
43
- a()?.requiresAdmin && await s.wait(Math.max(0, l - Date.now()));
44
- let d = a(), f = t(i, d), p = n(i, d) ?? (f.provisionable ? null : "This assistant mode is not available here. Switch to another mode and send again.") ?? e(d, s.read());
45
- if (p) throw Error(p);
41
+ async function l(o, s, l, u = a) {
42
+ let d = Date.now() + u, f = await c(o, s, l, u);
43
+ if (f) throw new i("mode-unavailable", f);
44
+ s()?.requiresAdmin && await l.wait(Math.max(0, d - Date.now()));
45
+ let p = s(), m = n(o, p), h = r(o, p) ?? (m.provisionable ? null : e);
46
+ if (h) throw new i("mode-unavailable", h);
47
+ let g = l.read(), _ = t(p, g);
48
+ if (_) throw new i(g.loading ? "mode-access-pending" : "mode-admin-only", _);
46
49
  return {
47
- config: d,
48
- capabilities: f
50
+ config: p,
51
+ capabilities: m
49
52
  };
50
53
  }
51
54
  //#endregion
52
- export { r as ADMIN_MODE_ACCESS_WAIT_MS, a as adminOnlyModeSendRefusalAfterAccess, i as createAdminModeAccessGate, s as resolveAssistantSendModeAfterAccess, o as unofferedModeSendRefusalAfterAccess };
55
+ export { a as ADMIN_MODE_ACCESS_WAIT_MS, s as adminOnlyModeSendRefusalAfterAccess, o as createAdminModeAccessGate, l as resolveAssistantSendModeAfterAccess, c as unofferedModeSendRefusalAfterAccess };
@@ -1 +1 @@
1
- {"version":3,"file":"i18nManifest.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/i18nManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAS1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0GG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Id as n } from "./modeIds.js";
4
- import { INCOMPLETE_TURN_NOTICES as r } from "./streamBudget.js";
5
- import { STAGE_COPY as i, THINKING_PHRASES as a } from "./stageCopy.js";
6
- import { VOICE_MUTED_LABEL as o, VOICE_THINKING_LABEL as s } from "./voice/voiceStatus.js";
7
- import { ATTACHMENT_SOURCES as c } from "./attachmentSources.js";
4
+ import { TURN_OUTCOME_COPY as r } from "./turnOutcomeCopy.js";
5
+ import { INCOMPLETE_TURN_NOTICES as i } from "./streamBudget.js";
6
+ import { STAGE_COPY as a, THINKING_PHRASES as o } from "./stageCopy.js";
7
+ import { VOICE_MUTED_LABEL as s, VOICE_THINKING_LABEL as c } from "./voice/voiceStatus.js";
8
+ import { ATTACHMENT_SOURCES as l } from "./attachmentSources.js";
8
9
  //#region src/shared/assistant/i18nManifest.ts
9
- var l = {
10
+ var u = {
10
11
  "apiCalls.consentBody": "In Take action mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.",
11
12
  "apiCalls.consentBody2": "It will describe what it is about to do and ask you to confirm before making a change. Only continue if you want the assistant to take actions for you.",
12
13
  "apiCalls.consentCancel": "Stay in Ask",
@@ -191,25 +192,26 @@ var l = {
191
192
  "writeConsent.confirm": "Enable {{mode}}",
192
193
  "writeConsent.title": "Switch to {{mode}} mode?",
193
194
  "writeConsent.unconfirmed": "It does not stop to ask before each change — it makes changes as soon as it decides to. Only continue if you want the assistant to change your data without asking first."
194
- }, u = (e) => Object.fromEntries(e.map((e) => [e.key, e.fallback])), d = Object.freeze({
195
- ...u(Object.values(i)),
196
- ...u(a),
197
- ...u([s, o]),
198
- ...u(r),
199
- ...Object.fromEntries(c.map((e) => [e.labelKey, e.labelFallback]))
200
- }), f = Object.freeze({
201
- ...l,
202
- ...d
195
+ }, d = (e) => Object.fromEntries(e.map((e) => [e.key, e.fallback])), f = Object.freeze({
196
+ ...d(Object.values(a)),
197
+ ...d(o),
198
+ ...d([c, s]),
199
+ ...d(i),
200
+ ...d(Object.values(r)),
201
+ ...Object.fromEntries(l.map((e) => [e.labelKey, e.labelFallback]))
202
+ }), p = Object.freeze({
203
+ ...u,
204
+ ...f
203
205
  });
204
- function p(e) {
206
+ function m(e) {
205
207
  let r = e.map((e) => e.id).filter((e) => !n(e));
206
208
  if (r.length > 0) throw Error(`assistantModeI18nCopy: malformed mode id ${r.map((e) => JSON.stringify(e)).join(", ")}. Declare product modes with declareAssistantMode().`);
207
209
  return Object.fromEntries(e.map((e) => [`mode.${e.id}`, e.label || t(e)]));
208
210
  }
209
- function m(t) {
211
+ function h(t) {
210
212
  let n = {
211
- ...f,
212
- ...p(t.modes)
213
+ ...p,
214
+ ...m(t.modes)
213
215
  }, r = Object.entries(t.overrides ?? {}), i = r.filter(([e]) => !Object.hasOwn(n, e)).map(([e]) => e);
214
216
  if (i.length > 0) throw Error(`assistantI18nSeedCopy: no shared assistant key ${i.join(", ")} to override. Check the spelling, or that the key is a mode this product offers; a key fe-libs no longer requests belongs with the product's own keys.`);
215
217
  let a = r.filter(([, e]) => e.trim() === "").map(([e]) => e);
@@ -221,4 +223,4 @@ function m(t) {
221
223
  return Object.fromEntries(Object.entries(o).map(([n, r]) => [e(t.namespace, n), r]));
222
224
  }
223
225
  //#endregion
224
- export { d as ASSISTANT_I18N_COMPUTED_COPY, l as ASSISTANT_I18N_LITERAL_COPY, f as ASSISTANT_I18N_MANIFEST, m as assistantI18nSeedCopy, p as assistantModeI18nCopy };
226
+ export { f as ASSISTANT_I18N_COMPUTED_COPY, u as ASSISTANT_I18N_LITERAL_COPY, p as ASSISTANT_I18N_MANIFEST, h as assistantI18nSeedCopy, m as assistantModeI18nCopy };
@@ -152,6 +152,8 @@ export * from './transportErrors';
152
152
  export * from './quota';
153
153
  export * from './permissionError';
154
154
  export * from './autoRouting';
155
+ export * from './turnOutcome';
156
+ export * from './turnOutcomeCopy';
155
157
  export * from './aiCredits';
156
158
  export * from './useWorkspaceWriteAccess';
157
159
  export * from './documentExtract';
@@ -1 +1 @@
1
- {"version":3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xC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
@@ -134,7 +134,7 @@ export declare function adminOnlyModeSendRefusal(config: {
134
134
  * mounted with no product modes at all; refusing it would leave such a panel
135
135
  * with no mode that can send.
136
136
  */
137
- export declare const UNAVAILABLE_MODE_REFUSAL = "This assistant mode is not available here. Switch to another mode and send again.";
137
+ export declare const UNAVAILABLE_MODE_REFUSAL: string;
138
138
  export declare function unofferedModeSendRefusal(mode: AssistantMode, config: {
139
139
  readonly id: AssistantMode;
140
140
  } | null | undefined): string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"modeCapabilities.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/modeCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACxC;;;;;;;;;OASG;IACH,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED,2EAA2E;AAC3E,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,mBAAmB,EACjB,IAAI,GACJ,mBAAmB,GACnB,gBAAgB,GAChB,uBAAuB,GACvB,sBAAsB,CACzB,CAAC;AAKF;;;;;;;GAOG;AACH,e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,EAC/D,MAAM,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,GACxE,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MACK,CAAC;AAE7C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE;IAAE,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACxD,MAAM,GAAG,IAAI,CAIf;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,aAAa,CAAA;CAAE,EACrE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EACtC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GACrC,CAAC,GAAG,SAAS,CAGf"}
@@ -1,54 +1,55 @@
1
1
  import { isBuiltInAssistantMode as e } from "./modeCopy.js";
2
2
  import { isProductAssistantModeId as t } from "./modeIds.js";
3
+ import { TURN_OUTCOME_COPY as n } from "./turnOutcomeCopy.js";
3
4
  //#region src/shared/assistant/modeCapabilities.ts
4
- var n = 18e4, r = 6e5, i = 36e5, a = Object.freeze({
5
+ var r = 18e4, i = 6e5, a = 36e5, o = Object.freeze({
5
6
  producesArtifacts: !1,
6
- streamBudgetMs: n,
7
+ streamBudgetMs: r,
7
8
  continuesInBackground: !1,
8
9
  accumulatesNarration: !1,
9
10
  provisionable: !0
10
- }), o = Object.freeze({
11
- general: a,
12
- assistant: a,
13
- "api-calls": a,
11
+ }), s = Object.freeze({
12
+ general: o,
13
+ assistant: o,
14
+ "api-calls": o,
14
15
  "vibe-plugins": Object.freeze({
15
16
  producesArtifacts: !0,
16
- streamBudgetMs: r,
17
+ streamBudgetMs: i,
17
18
  continuesInBackground: !0,
18
19
  accumulatesNarration: !1,
19
20
  provisionable: !0
20
21
  })
21
- }), s = Object.freeze({
22
+ }), c = Object.freeze({
22
23
  producesArtifacts: !1,
23
- streamBudgetMs: n,
24
+ streamBudgetMs: r,
24
25
  continuesInBackground: !1,
25
26
  accumulatesNarration: !1,
26
27
  provisionable: !1
27
- }), c = (e) => typeof e == "boolean" ? e : void 0, l = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 && e <= 36e5 ? e : void 0;
28
- function u(n, r) {
29
- let i = r && r.id === n ? r : void 0, u;
30
- if (e(n)) u = o[n];
31
- else if (i && t(n)) u = a;
32
- else return s;
33
- if (!i) return u;
34
- let d = c(i.producesArtifacts);
28
+ }), l = (e) => typeof e == "boolean" ? e : void 0, u = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 && e <= 36e5 ? e : void 0;
29
+ function d(n, r) {
30
+ let i = r && r.id === n ? r : void 0, a;
31
+ if (e(n)) a = s[n];
32
+ else if (i && t(n)) a = o;
33
+ else return c;
34
+ if (!i) return a;
35
+ let d = l(i.producesArtifacts);
35
36
  return {
36
- producesArtifacts: d ?? u.producesArtifacts,
37
- streamBudgetMs: l(i.streamBudgetMs) ?? u.streamBudgetMs,
38
- continuesInBackground: c(i.continuesInBackground) ?? d ?? u.continuesInBackground,
39
- accumulatesNarration: c(i.accumulatesNarration) ?? u.accumulatesNarration,
37
+ producesArtifacts: d ?? a.producesArtifacts,
38
+ streamBudgetMs: u(i.streamBudgetMs) ?? a.streamBudgetMs,
39
+ continuesInBackground: l(i.continuesInBackground) ?? d ?? a.continuesInBackground,
40
+ accumulatesNarration: l(i.accumulatesNarration) ?? a.accumulatesNarration,
40
41
  provisionable: !0
41
42
  };
42
43
  }
43
- function d(e, t) {
44
- return e?.requiresAdmin ? t.loading ? "Still checking whether you can use this assistant mode. Wait a moment, then send again." : t.canUseAdminModes ? null : "This assistant mode is only available to organization admins. Switch to another mode and send again." : null;
45
- }
46
- var f = "This assistant mode is not available here. Switch to another mode and send again.";
47
- function p(e, t) {
48
- return t?.id === e || e === "assistant" ? null : f;
44
+ function f(e, t) {
45
+ return e?.requiresAdmin ? t.loading ? n.modeAccessPending.fallback : t.canUseAdminModes ? null : n.modeAdminOnly.fallback : null;
49
46
  }
47
+ var p = n.modeUnavailable.fallback;
50
48
  function m(e, t) {
49
+ return t?.id === e || e === "assistant" ? null : p;
50
+ }
51
+ function h(e, t) {
51
52
  if (t) return e?.find((e) => e.id === t);
52
53
  }
53
54
  //#endregion
54
- export { o as BUILT_IN_MODE_CAPABILITIES, i as MAX_ASSISTANT_STREAM_BUDGET_MS, f as UNAVAILABLE_MODE_REFUSAL, s as UNDECLARED_MODE_CAPABILITIES, d as adminOnlyModeSendRefusal, m as findAssistantModeConfig, u as resolveAssistantModeCapabilities, p as unofferedModeSendRefusal };
55
+ export { s as BUILT_IN_MODE_CAPABILITIES, a as MAX_ASSISTANT_STREAM_BUDGET_MS, p as UNAVAILABLE_MODE_REFUSAL, c as UNDECLARED_MODE_CAPABILITIES, f as adminOnlyModeSendRefusal, h as findAssistantModeConfig, d as resolveAssistantModeCapabilities, m as unofferedModeSendRefusal };
@@ -1 +1 @@
1
- {"version":3,"file":"permissionError.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/permissionError.ts"],"names":[],"mappings":"AAmCA,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AASD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,uBAAuB,GAAG,IAAI,CAwBhC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAIR"}
1
+ {"version":3,"file":"permissionError.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/permissionError.ts"],"names":[],"mappings":"AAoCA,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AASD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,uBAAuB,GAAG,IAAI,CAwBhC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAIR"}
@@ -1,25 +1,26 @@
1
1
  import { extensionObjectsIn as e } from "./quota.js";
2
+ import { TURN_OUTCOME_COPY as t } from "./turnOutcomeCopy.js";
2
3
  //#region src/shared/assistant/permissionError.ts
3
- var t = new Set([
4
+ var n = new Set([
4
5
  "UNAUTHENTICATED_ACTOR",
5
6
  "WORKSPACE_SESSION_UNRESOLVED",
6
7
  "WORKSPACE_CONTEXT_MISSING"
7
8
  ]);
8
- function n(n) {
9
+ function r(t) {
9
10
  let r = !1, i = null;
10
- for (let t of e(n)) {
11
- let e = t.code;
11
+ for (let n of e(t)) {
12
+ let e = n.code;
12
13
  (e === "FORBIDDEN" || e === "PERMISSION_DENIED") && (r = !0);
13
- let n = t.authFailure;
14
- typeof n == "string" && n.length > 0 && !i && (i = n);
14
+ let t = n.authFailure;
15
+ typeof t == "string" && t.length > 0 && !i && (i = t);
15
16
  }
16
17
  return !r && !i ? null : {
17
- refusal: i && t.has(i) ? "session" : "denied",
18
+ refusal: i && n.has(i) ? "session" : "denied",
18
19
  authFailure: i
19
20
  };
20
21
  }
21
- function r(e) {
22
- return e.refusal === "session" ? "Your session could not be verified for this workspace. Reopen the page, then send again." : "You do not have permission to do that in this workspace. Ask someone who administers it for access.";
22
+ function i(e) {
23
+ return e.refusal === "session" ? t.sessionUnverified.fallback : t.permissionDenied.fallback;
23
24
  }
24
25
  //#endregion
25
- export { n as describePermissionError, r as permissionRefusalMessage };
26
+ export { r as describePermissionError, i as permissionRefusalMessage };
@@ -0,0 +1,58 @@
1
+ import { AssistantTr } from './i18n';
2
+ import { TurnOutcomeCopyId } from './turnOutcomeCopy';
3
+ /** Why a send was refused before it reached the backend. */
4
+ export type SendRefusalReason = "confirm-write-mode" | "voice-in-write-mode" | "mode-unavailable" | "mode-admin-only" | "mode-access-pending";
5
+ /**
6
+ * A send refused on the client, before it reached the backend: something must
7
+ * be confirmed, chosen or waited for first. Thrown instead of a bare `Error` so
8
+ * the outcome is decided by what it IS, never by matching its words.
9
+ */
10
+ export declare class AssistantSendRefusal extends Error {
11
+ readonly reason: SendRefusalReason;
12
+ constructor(reason: SendRefusalReason, message: string);
13
+ }
14
+ export type TurnOutcomeKind = "usage" | "permission" | "confirmation" | "temporary";
15
+ export interface TurnOutcome {
16
+ kind: TurnOutcomeKind;
17
+ /** The copy that says it. */
18
+ copy: TurnOutcomeCopyId;
19
+ /** Only for a usage wall that more allowance would fix: open the upgrade dialog. */
20
+ offersUpgrade: boolean;
21
+ /** Which quota was hit, when the server named one. */
22
+ quotaName: string | null;
23
+ /** The server's trace id, for support — shown as a reference, never as the message. */
24
+ traceId: string | null;
25
+ }
26
+ /**
27
+ * The outcome of a failed turn.
28
+ *
29
+ * ★★ Order matters: a client refusal first (it never reached a server); then
30
+ * the usage wall, BEFORE permission — a sandbox quota refusal can also carry a
31
+ * denial-shaped code, and permission checked first would swallow it and the
32
+ * upgrade dialog would never open; then permission; and only what is left is
33
+ * temporary. "Temporary" is the honest default for the rest: a network drop, a
34
+ * timeout, a 5xx, a sandbox that did not come up — retrying can succeed, and
35
+ * nothing about the person's plan or access is implied.
36
+ */
37
+ export declare function classifyTurnFailure(error: unknown): TurnOutcome;
38
+ /**
39
+ * What the outcome says: `text` for the conversation, `headline` alone for
40
+ * compact surfaces (a preview's end state), and whether it is `translated`.
41
+ *
42
+ * ★★ ONE LANGUAGE PER MESSAGE. The headline and the reference line are
43
+ * separate keys, and a product can seed one before the other. A message half
44
+ * translated would be stamped with ONE language and read aloud in that voice,
45
+ * English words included — so unless every part is translated, every part is
46
+ * English, stamped `en`.
47
+ *
48
+ * ★ The panel's own copy follows the INTERFACE language (`tr` resolves in the
49
+ * active locale), not the reply language a person may have set apart from it:
50
+ * a Tamil reply under an English interface gets an English outcome, correctly
51
+ * stamped `en`. The translator has no way to ask for another language.
52
+ */
53
+ export declare function turnOutcomeCopy(outcome: TurnOutcome, tr: AssistantTr): {
54
+ text: string;
55
+ headline: string;
56
+ translated: boolean;
57
+ };
58
+ //# sourceMappingURL=turnOutcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turnOutcome.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnOutcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,4DAA4D;AAC5D,MAAM,MAAM,iBAAiB,GACzB,oBAAoB,GACpB,qBAAqB,GACrB,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,CAAC;AAE1B;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;gBAEvB,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;CAKvD;AAED,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,YAAY,GACZ,cAAc,GACd,WAAW,CAAC;AAEhB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,6BAA6B;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,oFAAoF;IACpF,aAAa,EAAE,OAAO,CAAC;IACvB,sDAAsD;IACtD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uFAAuF;IACvF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAsBD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAsC/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,WAAW,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAuBzD"}
@@ -0,0 +1,79 @@
1
+ import { describeQuotaError as e, extensionObjectsIn as t } from "./quota.js";
2
+ import { TURN_OUTCOME_COPY as n } from "./turnOutcomeCopy.js";
3
+ import { describePermissionError as r } from "./permissionError.js";
4
+ //#region src/shared/assistant/turnOutcome.ts
5
+ var i = class extends Error {
6
+ reason;
7
+ constructor(e, t) {
8
+ super(t), this.name = "AssistantSendRefusal", this.reason = e;
9
+ }
10
+ }, a = {
11
+ "confirm-write-mode": {
12
+ kind: "confirmation",
13
+ copy: "confirmWriteMode"
14
+ },
15
+ "voice-in-write-mode": {
16
+ kind: "confirmation",
17
+ copy: "voiceInWriteMode"
18
+ },
19
+ "mode-unavailable": {
20
+ kind: "confirmation",
21
+ copy: "modeUnavailable"
22
+ },
23
+ "mode-admin-only": {
24
+ kind: "permission",
25
+ copy: "modeAdminOnly"
26
+ },
27
+ "mode-access-pending": {
28
+ kind: "temporary",
29
+ copy: "modeAccessPending"
30
+ }
31
+ };
32
+ function o(e, n) {
33
+ for (let r of t(e)) {
34
+ let e = r[n];
35
+ if (typeof e == "string" && e.length > 0) return e;
36
+ }
37
+ return null;
38
+ }
39
+ function s(t) {
40
+ let n = o(t, "traceId");
41
+ if (t instanceof i) return {
42
+ ...a[t.reason],
43
+ offersUpgrade: !1,
44
+ quotaName: null,
45
+ traceId: null
46
+ };
47
+ let s = e(t);
48
+ if (s) return {
49
+ kind: "usage",
50
+ copy: s.refusal === "exhausted" ? "usageExhausted" : "usageNotProvisioned",
51
+ offersUpgrade: s.refusal === "exhausted",
52
+ quotaName: s.quotaName,
53
+ traceId: s.traceId ?? n
54
+ };
55
+ let c = r(t);
56
+ return c ? {
57
+ kind: "permission",
58
+ copy: c.refusal === "session" ? "sessionUnverified" : "permissionDenied",
59
+ offersUpgrade: !1,
60
+ quotaName: null,
61
+ traceId: n
62
+ } : {
63
+ kind: "temporary",
64
+ copy: "temporary",
65
+ offersUpgrade: !1,
66
+ quotaName: null,
67
+ traceId: n
68
+ };
69
+ }
70
+ function c(e, t) {
71
+ let r = n[e.copy], i = t(r.key, r.fallback), a = n.reference, o = e.traceId ? a.fallback.replace("{{id}}", e.traceId) : null, s = e.traceId ? t(a.key, a.fallback, { id: e.traceId }) : null, c = i !== r.fallback && (s === null || s !== o), l = c ? i : r.fallback, u = c ? s : o, d = [e.quotaName, u].filter((e) => !!e);
72
+ return {
73
+ text: d.length ? `${l}\n\n${d.join(" · ")}` : l,
74
+ headline: l,
75
+ translated: c
76
+ };
77
+ }
78
+ //#endregion
79
+ export { i as AssistantSendRefusal, s as classifyTurnFailure, c as turnOutcomeCopy };
@@ -0,0 +1,62 @@
1
+ /**
2
+ * What the assistant says when a turn ends without an answer — one table, so
3
+ * every refusal the panel can show has one key and one English (BOFF-7800).
4
+ *
5
+ * ★ A LEAF MODULE, imported by the refusal functions themselves
6
+ * (`writeModeSendRefusal`, `adminOnlyModeSendRefusal`, `unofferedModeSendRefusal`,
7
+ * `permissionRefusalMessage`) so their English cannot drift from the copy the
8
+ * panel translates. Nothing here may import from the assistant package.
9
+ *
10
+ * The checklist: "Four distinct outcomes, never collapsed into 'upgrade your
11
+ * plan': usage exhausted · permission denied · confirmation pending · temporary
12
+ * failure". `turnOutcome.ts` decides which one a failure is; this is what each
13
+ * one says. Only `usageExhausted` may ever mention upgrading.
14
+ */
15
+ export declare const TURN_OUTCOME_COPY: {
16
+ readonly usageExhausted: {
17
+ readonly key: "outcome.usageExhausted";
18
+ readonly fallback: "You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant.";
19
+ };
20
+ readonly usageNotProvisioned: {
21
+ readonly key: "outcome.usageNotProvisioned";
22
+ readonly fallback: "This workspace has no sandbox allowance provisioned, so the AI assistant cannot start. Upgrading will not help — ask an administrator to provision it.";
23
+ };
24
+ readonly permissionDenied: {
25
+ readonly key: "outcome.permissionDenied";
26
+ readonly fallback: "You do not have permission to do that in this workspace. Ask someone who administers it for access.";
27
+ };
28
+ readonly sessionUnverified: {
29
+ readonly key: "outcome.sessionUnverified";
30
+ readonly fallback: "Your session could not be verified for this workspace. Reopen the page, then send again.";
31
+ };
32
+ readonly modeAdminOnly: {
33
+ readonly key: "outcome.modeAdminOnly";
34
+ readonly fallback: "This assistant mode is only available to organization admins. Switch to another mode and send again.";
35
+ };
36
+ readonly confirmWriteMode: {
37
+ readonly key: "outcome.confirmWriteMode";
38
+ readonly fallback: "Confirm this assistant mode before sending: choose it again in the mode selector.";
39
+ };
40
+ readonly voiceInWriteMode: {
41
+ readonly key: "outcome.voiceInWriteMode";
42
+ readonly fallback: "Voice can't be used in a mode that can change your data. Type your request instead.";
43
+ };
44
+ readonly modeUnavailable: {
45
+ readonly key: "outcome.modeUnavailable";
46
+ readonly fallback: "This assistant mode is not available here. Switch to another mode and send again.";
47
+ };
48
+ readonly modeAccessPending: {
49
+ readonly key: "outcome.modeAccessPending";
50
+ readonly fallback: "Still checking whether you can use this assistant mode. Wait a moment, then send again.";
51
+ };
52
+ readonly temporary: {
53
+ readonly key: "outcome.temporary";
54
+ readonly fallback: "The assistant couldn't finish this just now. It's a temporary problem on our side — not your plan or your access. Try again in a moment.";
55
+ };
56
+ readonly reference: {
57
+ readonly key: "outcome.reference";
58
+ readonly fallback: "Reference: {{id}}";
59
+ };
60
+ };
61
+ export type TurnOutcomeCopyId = keyof typeof TURN_OUTCOME_COPY;
62
+ //# sourceMappingURL=turnOutcomeCopy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turnOutcomeCopy.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnOutcomeCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DwC,CAAC;AAEvE,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,iBAAiB,CAAC"}
@@ -0,0 +1,49 @@
1
+ //#region src/shared/assistant/turnOutcomeCopy.ts
2
+ var e = {
3
+ usageExhausted: {
4
+ key: "outcome.usageExhausted",
5
+ fallback: "You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant."
6
+ },
7
+ usageNotProvisioned: {
8
+ key: "outcome.usageNotProvisioned",
9
+ fallback: "This workspace has no sandbox allowance provisioned, so the AI assistant cannot start. Upgrading will not help — ask an administrator to provision it."
10
+ },
11
+ permissionDenied: {
12
+ key: "outcome.permissionDenied",
13
+ fallback: "You do not have permission to do that in this workspace. Ask someone who administers it for access."
14
+ },
15
+ sessionUnverified: {
16
+ key: "outcome.sessionUnverified",
17
+ fallback: "Your session could not be verified for this workspace. Reopen the page, then send again."
18
+ },
19
+ modeAdminOnly: {
20
+ key: "outcome.modeAdminOnly",
21
+ fallback: "This assistant mode is only available to organization admins. Switch to another mode and send again."
22
+ },
23
+ confirmWriteMode: {
24
+ key: "outcome.confirmWriteMode",
25
+ fallback: "Confirm this assistant mode before sending: choose it again in the mode selector."
26
+ },
27
+ voiceInWriteMode: {
28
+ key: "outcome.voiceInWriteMode",
29
+ fallback: "Voice can't be used in a mode that can change your data. Type your request instead."
30
+ },
31
+ modeUnavailable: {
32
+ key: "outcome.modeUnavailable",
33
+ fallback: "This assistant mode is not available here. Switch to another mode and send again."
34
+ },
35
+ modeAccessPending: {
36
+ key: "outcome.modeAccessPending",
37
+ fallback: "Still checking whether you can use this assistant mode. Wait a moment, then send again."
38
+ },
39
+ temporary: {
40
+ key: "outcome.temporary",
41
+ fallback: "The assistant couldn't finish this just now. It's a temporary problem on our side — not your plan or your access. Try again in a moment."
42
+ },
43
+ reference: {
44
+ key: "outcome.reference",
45
+ fallback: "Reference: {{id}}"
46
+ }
47
+ };
48
+ //#endregion
49
+ export { e as TURN_OUTCOME_COPY };
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAwGf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAyDvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAuiFxD,CAAC"}
1
+ {"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAwGf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAyDvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAsgFxD,CAAC"}