@burdenoff/fe-libs 2026.924.3 → 2026.925.1

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 (31) hide show
  1. package/dist/shared/assistant/adminModeSendGate.d.ts.map +1 -1
  2. package/dist/shared/assistant/adminModeSendGate.js +23 -20
  3. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  4. package/dist/shared/assistant/i18nManifest.js +21 -19
  5. package/dist/shared/assistant/index.d.ts +2 -0
  6. package/dist/shared/assistant/index.d.ts.map +1 -1
  7. package/dist/shared/assistant/modeCapabilities.d.ts +1 -1
  8. package/dist/shared/assistant/modeCapabilities.d.ts.map +1 -1
  9. package/dist/shared/assistant/modeCapabilities.js +29 -28
  10. package/dist/shared/assistant/permissionError.d.ts.map +1 -1
  11. package/dist/shared/assistant/permissionError.js +11 -10
  12. package/dist/shared/assistant/speech/hostedTtsProtocol.d.ts +7 -0
  13. package/dist/shared/assistant/speech/hostedTtsProtocol.d.ts.map +1 -1
  14. package/dist/shared/assistant/speech/hostedTtsProtocol.js +5 -2
  15. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.d.ts.map +1 -1
  16. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.js +2 -2
  17. package/dist/shared/assistant/speech/routingSpeechEngine.d.ts.map +1 -1
  18. package/dist/shared/assistant/speech/routingSpeechEngine.js +49 -31
  19. package/dist/shared/assistant/turnOutcome.d.ts +58 -0
  20. package/dist/shared/assistant/turnOutcome.d.ts.map +1 -0
  21. package/dist/shared/assistant/turnOutcome.js +79 -0
  22. package/dist/shared/assistant/turnOutcomeCopy.d.ts +62 -0
  23. package/dist/shared/assistant/turnOutcomeCopy.d.ts.map +1 -0
  24. package/dist/shared/assistant/turnOutcomeCopy.js +49 -0
  25. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  26. package/dist/shared/assistant/ui/AssistantChatArea.js +412 -423
  27. package/dist/shared/assistant/writeModeConsent.d.ts +15 -2
  28. package/dist/shared/assistant/writeModeConsent.d.ts.map +1 -1
  29. package/dist/shared/assistant/writeModeConsent.js +24 -19
  30. package/dist/shared-assistant.js +116 -114
  31. package/package.json +1 -1
@@ -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"}