@burdenoff/fe-libs 2026.904.19 → 2026.904.21

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.
@@ -0,0 +1,21 @@
1
+ import { QuotaKind } from './quota';
2
+ /**
3
+ * Fired after a successful AI-token charge so a live credits meter could refetch
4
+ * its balance.
5
+ *
6
+ * ★ Namespaced by product, like the quota event. Nothing listens for it in any
7
+ * product today — verified across the repo — because no product mounts a meter.
8
+ * The dispatch is kept as the cheap half of that feature, not as a live path.
9
+ */
10
+ export declare function aiCreditsUpdatedEventName(product: string): string;
11
+ export declare function notifyAiCreditsUpdated(product: string): void;
12
+ /**
13
+ * Opens a quota dialog for an assistant quota wall.
14
+ *
15
+ * The assistant's prompt and sandbox calls go through a raw fetch rather than an
16
+ * Apollo mutation, so they cannot rely on the Apollo error link that normally
17
+ * dispatches this — they call here directly. `kind` is `ai-credits` for the
18
+ * per-token gate and `sandbox` for the sandbox-environment limit.
19
+ */
20
+ export declare function dispatchAssistantQuotaExhausted(product: string, kind: QuotaKind): void;
21
+ //# sourceMappingURL=aiCredits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiCredits.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/aiCredits.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG5D;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,GACd,IAAI,CASN"}
@@ -0,0 +1,15 @@
1
+ import { quotaExhaustedEventName as e } from "./quota.js";
2
+ //#region src/shared/assistant/aiCredits.ts
3
+ function t(e) {
4
+ return `${e}:ai-credits-updated`;
5
+ }
6
+ function n(e) {
7
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(t(e)));
8
+ }
9
+ function r(t, n) {
10
+ if (typeof window > "u") return;
11
+ let r = { kind: n };
12
+ window.dispatchEvent(new CustomEvent(e(t), { detail: r }));
13
+ }
14
+ //#endregion
15
+ export { t as aiCreditsUpdatedEventName, r as dispatchAssistantQuotaExhausted, n as notifyAiCreditsUpdated };
@@ -1,4 +1,5 @@
1
- import { isQuotaExhaustedError as e } from "./gatewayClient.js";
1
+ import { isQuotaExhaustedError as e } from "./quota.js";
2
+ import "./gatewayClient.js";
2
3
  import { checkAssistantAiCredits as t, getAssistantMessages as n, getAssistantStreamAccess as r, reportAssistantAiTokenUsage as i, sendAssistantPromptAsync as a, stopReapedAssistantSandbox as o } from "./api.js";
3
4
  import { AssistantRuntimeManager as s } from "./runtime.js";
4
5
  import { buildProgress as c, isReapedSandboxConnectionError as l, isRecoverable as u, mergeMessagesById as d, sanitize as f } from "./progress.js";
@@ -1,5 +1,19 @@
1
1
  import { AssistantSandboxAuthContext } from './types';
2
- export declare function isQuotaExhaustedError(error: unknown): boolean;
2
+ /**
3
+ * ★★ Delegates to `./quota`, which is the canonical classifier.
4
+ *
5
+ * This function used to return true for ANY 429. That conflated two refusals
6
+ * the gateway sends with the same status: `QUOTA_EXHAUSTED` — the workspace has
7
+ * the quota and used it up, so upgrading fixes it — and `QUOTA_NOT_PROVISIONED`,
8
+ * where the workspace has no assignment row at all and nothing the user does
9
+ * helps. BOFF-6302 exists because those two were shown to people with the same
10
+ * words, sending them to buy something that would not have helped.
11
+ *
12
+ * Behaviour is otherwise unchanged: a bare 429 with no code still classifies as
13
+ * exhausted (the raw-fetch transport surfaces those), and an explicit code still
14
+ * wins over the status.
15
+ */
16
+ export { isQuotaExhaustedError } from './quota';
3
17
  export declare function buildSandboxContextInput(workspaceId: string, authContext?: AssistantSandboxAuthContext): Record<string, unknown>;
4
18
  export declare function executeSandboxGraphQL<TData>(params: {
5
19
  query: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gatewayClient.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/gatewayClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAe3D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO7D;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,2BAA2B,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB;AAuCD,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;CAC3C,GAAG,OAAO,CAAC,KAAK,CAAC,CAqBjB"}
1
+ {"version":3,"file":"gatewayClient.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/gatewayClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAe3D;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,2BAA2B,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB;AAuCD,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;CAC3C,GAAG,OAAO,CAAC,KAAK,CAAC,CAyBjB"}
@@ -1,5 +1,6 @@
1
1
  import { graphqlFetch as e } from "../graphql/fetch.js";
2
2
  import "../../shared-graphql.js";
3
+ import "./quota.js";
3
4
  //#region src/shared/assistant/gatewayClient.ts
4
5
  function t() {
5
6
  try {
@@ -8,19 +9,13 @@ function t() {
8
9
  return `bf-assistant-${Date.now()}-${Math.random().toString(36).slice(2)}`;
9
10
  }
10
11
  }
11
- function n(e) {
12
- let t = e;
13
- if (t?.statusCode === 429 || t?.extensions?.code === "QUOTA_EXHAUSTED") return !0;
14
- let n = t instanceof Error ? t.message.toLowerCase() : String(t).toLowerCase();
15
- return n.includes("quota") && (n.includes("exhaust") || n.includes("exceeded"));
16
- }
17
- function r(e, t) {
12
+ function n(e, t) {
18
13
  return {
19
14
  workspaceId: e,
20
15
  ...t?.organizationId ? { custom: { organizationId: t.organizationId } } : {}
21
16
  };
22
17
  }
23
- async function i(n) {
18
+ async function r(n) {
24
19
  let r = await e({
25
20
  gateway: "workspace",
26
21
  query: n.query,
@@ -40,10 +35,10 @@ async function i(n) {
40
35
  if (r.data == null) throw Error("Sandbox GraphQL returned no data");
41
36
  return r.data;
42
37
  }
43
- async function a(e) {
38
+ async function i(e) {
44
39
  let t;
45
40
  for (let n = 0; n < 3; n++) try {
46
- return await i(e);
41
+ return await r(e);
47
42
  } catch (e) {
48
43
  t = e;
49
44
  let r = e instanceof Error ? e.message.toLowerCase() : String(e).toLowerCase();
@@ -53,4 +48,4 @@ async function a(e) {
53
48
  throw t;
54
49
  }
55
50
  //#endregion
56
- export { r as buildSandboxContextInput, a as executeSandboxGraphQL, n as isQuotaExhaustedError };
51
+ export { n as buildSandboxContextInput, i as executeSandboxGraphQL };
@@ -110,4 +110,7 @@ export * from './ui/voice/AssistantVoiceSession';
110
110
  export * from './useAssistantApiAccess';
111
111
  export * from './useConversationTurns';
112
112
  export * from './transportErrors';
113
+ export * from './quota';
114
+ export * from './aiCredits';
115
+ export * from './useWorkspaceWriteAccess';
113
116
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AAKvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,gBAAgB,CAAC;AAK/B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAG3C,cAAc,QAAQ,CAAC;AAEvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AAGrC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,WAAW,CAAC;AAE1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AAKvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,gBAAgB,CAAC;AAK/B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAG3C,cAAc,QAAQ,CAAC;AAEvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AAGrC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,WAAW,CAAC;AAE1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Quota-error detection for the assistant's raw-fetch transport.
3
+ *
4
+ * The assistant talks to the wspace gateway over `fetch` (not Apollo), so it
5
+ * can't rely on the Apollo error link. `isQuotaExhaustedError` inspects the
6
+ * thrown error for the gateway's 429 / QUOTA_EXHAUSTED signal across the shapes
7
+ * `executeSandboxGraphQL` surfaces (Error.message, `.statusCode`, `.result`).
8
+ *
9
+ * Only the assistant's two quota walls are modelled: `sandbox` (the
10
+ * sandboxes-created @usage limit hit during provisioning) and `ai-credits`
11
+ * (per-token budget).
12
+ */
13
+ /**
14
+ * Whether this error is an EXHAUSTED quota specifically.
15
+ *
16
+ * ★ BOFF-6302 — this used to match any HTTP 429, and a workspace with no assignment row is refused
17
+ * `429 QUOTA_NOT_PROVISIONED`. That is not exhaustion: the farmer has not used anything up, their
18
+ * plan was never granted, and "you have reached your limit" sends them to buy an upgrade that would
19
+ * not unblock them. {@link classifyQuotaError} now owns the distinction and this delegates to it.
20
+ */
21
+ export declare function isQuotaExhaustedError(error: unknown): boolean;
22
+ /**
23
+ * The two ways the gateway refuses a metered mutation. They are NOT the same thing and must not be
24
+ * shown to a farmer with the same words (BOFF-6302).
25
+ *
26
+ * - `exhausted` — the workspace has the quota and has used it up. Deleting something, or upgrading,
27
+ * fixes it. Actionable by the user.
28
+ * - `not-provisioned` — the workspace has **no assignment row for that quota at all**, so the
29
+ * gateway fails closed. Nothing the user does fixes it: they have not hit a limit, their plan was
30
+ * never granted. Measured in prod 2026-08-13, this is why `createHealthyBowlFarm` returns
31
+ * `429 QUOTA_NOT_PROVISIONED` on several workspaces — the core create path is simply dead there.
32
+ *
33
+ * ★ Keyed on `extensions.code`, never on the HTTP status or the message text. Both refusals are
34
+ * `429`, so status alone cannot tell them apart — which is exactly how "no active subscription
35
+ * covers this" would otherwise be reported to a farmer as "you have reached your limit".
36
+ */
37
+ export type QuotaRefusal = "exhausted" | "not-provisioned";
38
+ /**
39
+ * Which refusal this is, or null when the error is not a quota wall at all.
40
+ *
41
+ * `not-provisioned` wins when both appear: it is the more specific and the more serious of the two,
42
+ * and telling someone to upgrade when their plan was never granted sends them to buy something that
43
+ * would not help.
44
+ */
45
+ export declare function classifyQuotaError(error: unknown): QuotaRefusal | null;
46
+ export type QuotaKind = "sandbox" | "ai-credits" | "generic";
47
+ /**
48
+ * Event the assistant dispatches on a quota wall, namespaced by product.
49
+ *
50
+ * ★ A function rather than a constant: the shared code owns the mechanism, the
51
+ * product owns its namespace — the same rule as translation keys. Passing the
52
+ * product keeps HealthyBowl's existing `healthybowl:quota-exhausted` byte for
53
+ * byte, and stops two products in one page colliding.
54
+ *
55
+ * ★ Nothing listens for it yet, in any product — verified across the repo. The
56
+ * chat area surfaces the wall inline instead. Kept because the dispatch is the
57
+ * cheap half of a future upgrade dialog, but do not mistake it for a live path.
58
+ */
59
+ export declare function quotaExhaustedEventName(product: string): string;
60
+ export interface QuotaExhaustedEventDetail {
61
+ kind: QuotaKind;
62
+ message?: string;
63
+ operationName?: string | null;
64
+ }
65
+ //# sourceMappingURL=quota.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmB7D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AA0C3D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAStE;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
@@ -0,0 +1,45 @@
1
+ //#region src/shared/assistant/quota.ts
2
+ function e(e, t) {
3
+ if (!e || typeof e != "object") return;
4
+ let n = e[t];
5
+ return Array.isArray(n) ? n : void 0;
6
+ }
7
+ function t(e) {
8
+ let t = i(e);
9
+ if (t) return t === "exhausted";
10
+ if (!(e instanceof Error)) return !1;
11
+ let n = e.message.toLowerCase();
12
+ return n.includes("quota") && (n.includes("exhaust") || n.includes("exceeded"));
13
+ }
14
+ var n = {
15
+ QUOTA_EXHAUSTED: "exhausted",
16
+ QUOTA_NOT_PROVISIONED: "not-provisioned"
17
+ };
18
+ function r(t) {
19
+ if (!t || typeof t != "object") return [];
20
+ let r = [
21
+ t,
22
+ t.result,
23
+ t.networkError
24
+ ], i = [];
25
+ for (let t of r) {
26
+ let n = t?.extensions;
27
+ n?.code && i.push(n.code), n?.errorCode && i.push(n.errorCode);
28
+ for (let n of e(t, "errors") ?? []) n.extensions?.code && i.push(n.extensions.code), n.extensions?.errorCode && i.push(n.extensions.errorCode);
29
+ }
30
+ let a = t.bodyText, o = t instanceof Error ? t.message : void 0;
31
+ for (let e of [a, o]) if (typeof e == "string") for (let t of Object.keys(n)) e.includes(t) && i.push(t);
32
+ return i;
33
+ }
34
+ function i(e) {
35
+ let t = r(e);
36
+ if (t.includes("QUOTA_NOT_PROVISIONED")) return "not-provisioned";
37
+ if (t.includes("QUOTA_EXHAUSTED")) return "exhausted";
38
+ let n = e?.statusCode;
39
+ return typeof n == "number" && n === 429 ? "exhausted" : null;
40
+ }
41
+ function a(e) {
42
+ return `${e}:quota-exhausted`;
43
+ }
44
+ //#endregion
45
+ export { i as classifyQuotaError, t as isQuotaExhaustedError, a as quotaExhaustedEventName };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Can this user's writes actually LAND in this workspace?
3
+ *
4
+ * ★ Separate from `useAssistantApiAccess`, and deliberately not a replacement
5
+ * for it. That hook asks `myRoles` at ORG scope, which is the right question for
6
+ * "may this person use a mode that mints an OAuth app under their identity".
7
+ * Execution, though, happens at WORKSPACE scope — so an org admin could enter
8
+ * Take-action mode, have the model plan a change, confirm it, and only then hit
9
+ * a permission error. The two questions have different answers and both are
10
+ * legitimate; this hook asks the second one.
11
+ *
12
+ * ★ Measured 2026-09-02 against prod: `checkPermissions` answers cleanly
13
+ * (HTTP 200, no errors) with `allowed: false`, `decisionPath: "default:deny"`,
14
+ * and a null role — for an org OWNER. Workspace/project scopes have no roles
15
+ * provisioned at all, so the honest answer today is "no, for everyone".
16
+ *
17
+ * ★ Which is exactly why this hook only WARNS. Using it to gate the mode would
18
+ * remove Take-action from the product entirely until an ops task lands, and
19
+ * dressing that up as a permissions fix would be worse than the confusion it
20
+ * replaces. The moment roles are provisioned this starts returning `granted`
21
+ * and the warning disappears on its own, with no code change.
22
+ *
23
+ * Fails OPEN on error or while loading: a network blip must not accuse someone
24
+ * of lacking a permission they may well have.
25
+ */
26
+ /** `unknown` while in flight or unanswerable — never treated as a refusal. */
27
+ export type WorkspaceWriteAccess = "granted" | "denied" | "unknown";
28
+ export declare function useWorkspaceWriteAccess(actorId: string | null, workspaceId: string | null, probeResources: readonly string[]): WorkspaceWriteAccess;
29
+ //# sourceMappingURL=useWorkspaceWriteAccess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWorkspaceWriteAccess.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/useWorkspaceWriteAccess.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAwBH,8EAA8E;AAC9E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpE,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,cAAc,EAAE,SAAS,MAAM,EAAE,GAChC,oBAAoB,CAkDtB"}
@@ -0,0 +1,41 @@
1
+ import { graphqlFetch as e } from "../graphql/fetch.js";
2
+ import "../../shared-graphql.js";
3
+ import { useEffect as t, useState as n } from "react";
4
+ //#region src/shared/assistant/useWorkspaceWriteAccess.ts
5
+ var r = "query AssistantWorkspaceWriteAccess($inputs: [PermissionCheckInput!]!) {\n checkPermissions(inputs: $inputs) {\n allowed\n }\n}";
6
+ function i(i, a, o) {
7
+ let [s, c] = n("unknown");
8
+ return t(() => {
9
+ if (!i || !a) {
10
+ c("unknown");
11
+ return;
12
+ }
13
+ let t = !1;
14
+ return c("unknown"), e({
15
+ gateway: "workspace",
16
+ query: r,
17
+ variables: { inputs: o.map((e) => ({
18
+ actorId: i,
19
+ actorType: "USER",
20
+ scopeId: a,
21
+ resourceType: e,
22
+ action: "create"
23
+ })) },
24
+ suppressGlobalErrorEvent: !0
25
+ }).then((e) => {
26
+ if (t) return;
27
+ let n = e.data?.checkPermissions;
28
+ if (!Array.isArray(n) || n.length === 0) {
29
+ c("unknown");
30
+ return;
31
+ }
32
+ c(n.some((e) => e.allowed) ? "granted" : "denied");
33
+ }).catch(() => {
34
+ t || c("unknown");
35
+ }), () => {
36
+ t = !0;
37
+ };
38
+ }, [i, a]), s;
39
+ }
40
+ //#endregion
41
+ export { i as useWorkspaceWriteAccess };
@@ -1,79 +1,82 @@
1
1
  import { useVoiceInput as e } from "./shared/assistant/voice/useVoiceInput.js";
2
- import { buildSandboxContextInput as t, executeSandboxGraphQL as n, isQuotaExhaustedError as r } from "./shared/assistant/gatewayClient.js";
3
- import { CHECK_AI_CREDITS as i, CREATE_SANDBOX as a, EXTEND_SANDBOX_TTL as o, GET_ACTIVE_SANDBOXES as s, GET_SANDBOX as c, PROXY_SANDBOX_REQUEST as l, REPORT_AI_TOKEN_USAGE as u, STOP_ASSISTANT_SANDBOX as d, WAIT_FOR_SANDBOX_RUNNING as f } from "./shared/assistant/operations.js";
4
- import { ASSISTANT_API_AUTH_STRATEGY as p, getImageForMode as m, getImageTagForMode as h, getResourcesForMode as g, getSandboxImageRegistry as _, resolveSandboxAssistantMode as v } from "./shared/assistant/images.js";
5
- import { getCapability as y, isUnknownFieldError as b, markSupported as x, markUnsupported as S } from "./shared/assistant/capabilities.js";
6
- import { buildAssistantSandboxEnv as C, buildPromptRequestBody as w, checkAssistantAiCredits as T, createAssistantSandbox as E, createAssistantSession as D, downloadAssistantArtifact as O, extendAssistantSandboxTTL as k, findExistingSandbox as A, getAssistantArtifacts as j, getAssistantMessages as M, getAssistantSession as N, getAssistantStreamAccess as P, modeRequiresConfirmWrites as F, reportAssistantAiTokenUsage as I, selectExistingAssistantSandbox as L, sendAssistantPromptAsync as R, sendHeartbeat as z, stopReapedAssistantSandbox as B, waitForAssistantServiceReady as V, waitForSandboxRunning as H } from "./shared/assistant/api.js";
7
- import { AssistantRuntimeManager as U } from "./shared/assistant/runtime.js";
8
- import { buildProgress as W, getAssistantMedia as G, getAssistantText as K, getRawMessageCreatedAt as q, getToolProgress as J, isReapedSandboxConnectionError as Y, isRecoverable as X, mapSessionToHistory as Z, mergeMessagesById as Q, sanitize as $ } from "./shared/assistant/progress.js";
9
- import { createSandboxAssistantTransport as ee } from "./shared/assistant/createSandboxAssistantTransport.js";
10
- import { useSandboxAssistantTransport as te } from "./shared/assistant/useSandboxAssistantTransport.js";
11
- import { chatTurns as ne, groupBySession as re, groupConsecutiveBySession as ie, isVoiceTurn as ae, voiceMarker as oe, voiceSessionIdOf as se, voiceTurnsOnly as ce } from "./shared/assistant/voice/turnVisibility.js";
12
- import { browserSpeechEngine as le } from "./shared/assistant/speech/browserSpeechEngine.js";
13
- import { HOSTED_TTS_TIER as ue, HOSTED_VOICES as de, hostedLocaleFor as fe, hostedSupportsLanguage as pe } from "./shared/assistant/speech/hostedVoiceCatalogue.js";
14
- import { HOSTED_TTS_MAX_CHARS as me, SPEAKING_RATE_MAX as he, SPEAKING_RATE_MAX_STREAMING as ge, SPEAKING_RATE_MAX_SYNC as _e, SPEAKING_RATE_MIN as ve, base64ToBytes as ye, buildRequest as be, classifyHttpFailure as xe, decodeAudioResponse as Se, shouldDisableEngine as Ce, splitForVendor as we } from "./shared/assistant/speech/hostedTtsProtocol.js";
15
- import { createHostedTtsEngine as Te } from "./shared/assistant/speech/hostedTtsSpeechEngine.js";
16
- import { createRoutingSpeechEngine as Ee } from "./shared/assistant/speech/routingSpeechEngine.js";
17
- import { configureSpeechEngine as De, createSpeechEngines as Oe, getSpeechEngine as ke, readSpeechEngineConfig as Ae, resetSpeechEngine as je } from "./shared/assistant/speech/createSpeechEngine.js";
18
- import { micIsInterrupt as Me, showsAssistantCaption as Ne, showsUserCaption as Pe, voiceStageState as Fe, waveformIsActive as Ie, waveformIsSettled as Le } from "./shared/assistant/voice/voiceStageState.js";
19
- import { ENDPOINT_GRACE_MS as Re, INITIAL_SESSION as ze, INTERRUPT_MAX_MS as Be, INTERRUPT_MIN_MS as Ve, SILENCE_SUBMIT_MS as He, isCapturing as Ue, isEcho as We, isSubmittable as Ge, orbMode as Ke, planReplyConsumption as qe, spokenSoFar as Je, voiceSessionReducer as Ye } from "./shared/assistant/voice/voiceSession.js";
20
- import { SPEECH_LANG as Xe, VOICE_LIST_TIMEOUT_MS as Ze, isSpeechBlocked as Qe, languageDisplayName as $e, normalizeLangTag as et, primaryLanguageSubtag as tt, selectVoiceForLocale as nt, speechGate as rt, speechLangForLocale as it, voiceAvailability as at, voiceQualityRank as ot, voicesForLocale as st } from "./shared/assistant/voice/speechVoices.js";
21
- import { buildContinuedFromVoiceNote as ct, buildVoiceTranscriptMarkdown as lt, voiceTranscriptFilename as ut } from "./shared/assistant/voice/voiceTranscript.js";
22
- import { DEFAULT_SPEAKABLE_LABELS as dt, MAX_SPEAKABLE_CHARS as ft, MAX_SPOKEN_TABLE_ROWS as pt, SPEECH_CHUNK_CHARS as mt, SPEECH_CHUNK_CJK_CHARS as ht, chunkForSpeech as gt, containsCjk as _t, speakableEmail as vt, splitTableRow as yt, toSpeakableText as bt } from "./shared/assistant/voice/speakableText.js";
23
- import { PREVIEW_LANGUAGES as xt, voicePreviewText as St } from "./shared/assistant/voice/voicePreview.js";
24
- import { POLL_FAST_MS as Ct, POLL_FAST_UNTIL_MS as wt, POLL_SLOW_MS as Tt, POLL_STEADY_MS as Et, POLL_STEADY_UNTIL_MS as Dt, pollDelayMs as Ot } from "./shared/assistant/voice/assistantPollSchedule.js";
25
- import { toCaptionText as kt } from "./shared/assistant/voice/captionText.js";
26
- import { ASSISTANT_LANGUAGES as At, DEFAULT_SPEECH_RATE as jt, findAssistantLanguage as Mt, resolveAssistantLanguage as Nt } from "./shared/assistant/voice/languages.js";
27
- import { replyFollowsInput as Pt, resolveLanguagePair as Ft } from "./shared/assistant/voice/languagePair.js";
28
- import { findPendingWrite as It, parseConfirmationRefusal as Lt } from "./shared/assistant/pendingWrite.js";
29
- import { AssistantProductProvider as Rt, resolveModeConfig as zt, useAssistantProduct as Bt, useAssistantProductOrNull as Vt } from "./shared/assistant/product.js";
30
- import { AssistantI18nProvider as Ht, assistantTranslationKey as Ut, useAssistantI18nNamespace as Wt, useAssistantTr as Gt } from "./shared/assistant/i18n.js";
31
- import { SPOKEN_LABEL_LANGUAGES as Kt, speechLabelsFor as qt } from "./shared/assistant/voice/speechLabels.js";
32
- import { detectScriptLocale as Jt, resolveSpeechLocale as Yt } from "./shared/assistant/voice/replyLanguage.js";
33
- import { IDLE_PLAYBACK as Xt, isSpeakingMessage as Zt, requiresCancel as Qt, speechPlaybackReducer as $t } from "./shared/assistant/voice/speechPlayback.js";
34
- import { MAX_INLINE_IMAGE_BASE64_BYTES as en, MAX_REQUEST_BODY_BYTES as tn } from "./shared/assistant/gatewayLimits.js";
35
- import { BOILERPLATE_PAGE_SHARE as nn, MAX_BOILERPLATE_LINE_CHARS as rn, MAX_EXTRACTED_CHARS as an, MAX_PDF_PAGES_SCANNED as on, MIN_PAGE_TEXT_CHARS as sn, MIN_TEXT_PAGE_SHARE as cn, columnLetterToIndex as ln, decodeXmlEntities as un, docxXmlToText as dn, fitPdfPages as fn, formatPageRanges as pn, isMostlyImagePages as mn, joinSheets as hn, pageMarker as gn, parseSharedStrings as _n, parseWorkbookSheets as vn, pdfTextItemsToPage as yn, sheetXmlToRows as bn, summarisePageText as xn, truncatePagesForInline as Sn } from "./shared/assistant/documentText.js";
36
- import { ATTACHMENT_ACCEPT as Cn, AttachmentRejectedError as wn, INLINE_IMAGE_MAX_DIM as Tn, INLINE_IMAGE_QUALITY as En, MAX_ATTACHMENTS as Dn, MAX_FILE_BYTES as On, MAX_INLINE_CHARS_PER_FILE as kn, MAX_INLINE_CHARS_TOTAL as An, MAX_INLINE_IMAGE_BASE64_CHARS as jn, MAX_INLINE_IMAGE_PARTS as Mn, MAX_INLINE_TURN_BODY_BYTES as Nn, MAX_TURN_BODY_BYTES as Pn, PROMPT_ENVELOPE_RESERVE_BYTES as Fn, TURN_BODY_HEADROOM_BYTES as In, buildAttachmentPromptBlock as Ln, buildPromptParts as Rn, buildPromptWithAttachments as zn, classifyAttachment as Bn, countInlineImageCandidates as Vn, countInlinedImageParts as Hn, detectDocumentFormat as Un, estimateTurnBodyBytes as Wn, formatBytes as Gn, getAttachmentSendBlocker as Kn, getExtension as qn, getSendableAttachments as Jn, hasAttachmentWorkInFlight as Yn, parseDataUrl as Xn, toMessageAttachment as Zn, truncateForInline as Qn, validateFile as $n } from "./shared/assistant/attachments.js";
37
- import { useAssistantStore as er } from "./shared/assistant/store.js";
38
- import { isTurnInFlight as tr } from "./shared/assistant/turnState.js";
39
- import { AssistantToolActivity as nr, parseToolActivity as rr } from "./shared/assistant/ui/AssistantToolActivity.js";
40
- import { AssistantSpeechProvider as ir, useAssistantSpeech as ar } from "./shared/assistant/ui/AssistantSpeechProvider.js";
41
- import { useVoiceSession as or } from "./shared/assistant/ui/useVoiceSession.js";
42
- import { copyToClipboard as sr } from "./shared/assistant/clipboard.js";
43
- import { getActorId as cr, getOrganizationId as lr, getWorkspaceId as ur } from "./shared/assistant/context.js";
44
- import { ATTACHMENT_SOURCES as dr, availableAttachmentSources as fr, deviceHasCamera as pr } from "./shared/assistant/attachmentSources.js";
45
- import { SANDBOX_READY_TTL_MS as mr, createReadinessTracker as hr, isRecentlyVerified as gr } from "./shared/assistant/sandboxReadiness.js";
46
- import { AssistantAutoSpeakToggle as _r } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
47
- import { AssistantMarkdownImage as vr, imageHostLabel as yr, isRemoteImageSrc as br } from "./shared/assistant/ui/AssistantMarkdownImage.js";
48
- import { AssistantMarkdownRenderer as xr, assistantUrlTransform as Sr } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
49
- import { AssistantMessageAttachments as Cr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
50
- import { AssistantPendingWriteCard as wr } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
51
- import { AssistantReplyLanguageSelector as Tr } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
52
- import { AssistantSpeakButton as Er } from "./shared/assistant/ui/AssistantSpeakButton.js";
53
- import { AssistantSpokenTurnsNotice as Dr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
54
- import { AssistantAttachmentButton as Or } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
55
- import { AssistantAttachmentChips as kr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
56
- import { AssistantLanguageSelector as Ar, FOLLOW_APP_LOCALE as jr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
57
- import { ASSISTANT_MODE_META as Mr, AssistantModeSelector as Nr, nextModeIndex as Pr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
58
- import { AssistantVoiceButton as Fr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
59
- import { AUTO_VOICE as Ir, AssistantVoiceSelector as Lr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
60
- import { AssistantVoiceOrb as Rr } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
61
- import { AssistantVoiceSessionButton as zr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
62
- import { VoiceCaption as Br } from "./shared/assistant/ui/voice/VoiceCaption.js";
63
- import { VoiceConversationView as Vr } from "./shared/assistant/ui/voice/VoiceConversationView.js";
64
- import { VoiceWaveform as Hr } from "./shared/assistant/ui/voice/VoiceWaveform.js";
65
- import { VoiceMiniController as Ur } from "./shared/assistant/ui/voice/VoiceMiniController.js";
66
- import { VoiceStage as Wr } from "./shared/assistant/ui/voice/VoiceStage.js";
67
- import { VoiceTranscriptDrawer as Gr } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
68
- import { downloadFile as Kr, exportConversation as qr } from "./shared/assistant/exportConversation.js";
69
- import { AssistantMoreMenu as Jr } from "./shared/assistant/ui/AssistantMoreMenu.js";
70
- import { AssistantHeader as Yr } from "./shared/assistant/ui/AssistantHeader.js";
71
- import { AssistantConversationList as Xr } from "./shared/assistant/ui/AssistantConversationList.js";
72
- import { AssistantEmptyState as Zr } from "./shared/assistant/ui/AssistantEmptyState.js";
73
- import { AssistantMessageItem as Qr } from "./shared/assistant/ui/AssistantMessageItem.js";
74
- import { AssistantMessageList as $r } from "./shared/assistant/ui/AssistantMessageList.js";
75
- import { AssistantVoiceSession as ei } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
76
- import { useAssistantApiAccess as ti } from "./shared/assistant/useAssistantApiAccess.js";
77
- import { useConversationTurns as ni } from "./shared/assistant/useConversationTurns.js";
78
- import { isMultimodalBodyRejection as ri, isRecoverableAssistantError as ii } from "./shared/assistant/transportErrors.js";
79
- export { p as ASSISTANT_API_AUTH_STRATEGY, At as ASSISTANT_LANGUAGES, Mr as ASSISTANT_MODE_META, Cn as ATTACHMENT_ACCEPT, dr as ATTACHMENT_SOURCES, Ir as AUTO_VOICE, Or as AssistantAttachmentButton, kr as AssistantAttachmentChips, _r as AssistantAutoSpeakToggle, Xr as AssistantConversationList, Zr as AssistantEmptyState, Yr as AssistantHeader, Ht as AssistantI18nProvider, Ar as AssistantLanguageSelector, vr as AssistantMarkdownImage, xr as AssistantMarkdownRenderer, Cr as AssistantMessageAttachments, Qr as AssistantMessageItem, $r as AssistantMessageList, Nr as AssistantModeSelector, Jr as AssistantMoreMenu, wr as AssistantPendingWriteCard, Rt as AssistantProductProvider, Tr as AssistantReplyLanguageSelector, U as AssistantRuntimeManager, Er as AssistantSpeakButton, ir as AssistantSpeechProvider, Dr as AssistantSpokenTurnsNotice, nr as AssistantToolActivity, Fr as AssistantVoiceButton, Rr as AssistantVoiceOrb, Lr as AssistantVoiceSelector, ei as AssistantVoiceSession, zr as AssistantVoiceSessionButton, wn as AttachmentRejectedError, nn as BOILERPLATE_PAGE_SHARE, i as CHECK_AI_CREDITS, a as CREATE_SANDBOX, dt as DEFAULT_SPEAKABLE_LABELS, jt as DEFAULT_SPEECH_RATE, Re as ENDPOINT_GRACE_MS, o as EXTEND_SANDBOX_TTL, jr as FOLLOW_APP_LOCALE, s as GET_ACTIVE_SANDBOXES, c as GET_SANDBOX, me as HOSTED_TTS_MAX_CHARS, ue as HOSTED_TTS_TIER, de as HOSTED_VOICES, Xt as IDLE_PLAYBACK, ze as INITIAL_SESSION, Tn as INLINE_IMAGE_MAX_DIM, En as INLINE_IMAGE_QUALITY, Be as INTERRUPT_MAX_MS, Ve as INTERRUPT_MIN_MS, Dn as MAX_ATTACHMENTS, rn as MAX_BOILERPLATE_LINE_CHARS, an as MAX_EXTRACTED_CHARS, On as MAX_FILE_BYTES, kn as MAX_INLINE_CHARS_PER_FILE, An as MAX_INLINE_CHARS_TOTAL, en as MAX_INLINE_IMAGE_BASE64_BYTES, jn as MAX_INLINE_IMAGE_BASE64_CHARS, Mn as MAX_INLINE_IMAGE_PARTS, Nn as MAX_INLINE_TURN_BODY_BYTES, on as MAX_PDF_PAGES_SCANNED, tn as MAX_REQUEST_BODY_BYTES, ft as MAX_SPEAKABLE_CHARS, pt as MAX_SPOKEN_TABLE_ROWS, Pn as MAX_TURN_BODY_BYTES, sn as MIN_PAGE_TEXT_CHARS, cn as MIN_TEXT_PAGE_SHARE, Ct as POLL_FAST_MS, wt as POLL_FAST_UNTIL_MS, Tt as POLL_SLOW_MS, Et as POLL_STEADY_MS, Dt as POLL_STEADY_UNTIL_MS, xt as PREVIEW_LANGUAGES, Fn as PROMPT_ENVELOPE_RESERVE_BYTES, l as PROXY_SANDBOX_REQUEST, u as REPORT_AI_TOKEN_USAGE, mr as SANDBOX_READY_TTL_MS, He as SILENCE_SUBMIT_MS, he as SPEAKING_RATE_MAX, ge as SPEAKING_RATE_MAX_STREAMING, _e as SPEAKING_RATE_MAX_SYNC, ve as SPEAKING_RATE_MIN, mt as SPEECH_CHUNK_CHARS, ht as SPEECH_CHUNK_CJK_CHARS, Xe as SPEECH_LANG, Kt as SPOKEN_LABEL_LANGUAGES, d as STOP_ASSISTANT_SANDBOX, In as TURN_BODY_HEADROOM_BYTES, Ze as VOICE_LIST_TIMEOUT_MS, Br as VoiceCaption, Vr as VoiceConversationView, Ur as VoiceMiniController, Wr as VoiceStage, Gr as VoiceTranscriptDrawer, Hr as VoiceWaveform, f as WAIT_FOR_SANDBOX_RUNNING, Ut as assistantTranslationKey, Sr as assistantUrlTransform, fr as availableAttachmentSources, ye as base64ToBytes, le as browserSpeechEngine, C as buildAssistantSandboxEnv, Ln as buildAttachmentPromptBlock, ct as buildContinuedFromVoiceNote, W as buildProgress, Rn as buildPromptParts, w as buildPromptRequestBody, zn as buildPromptWithAttachments, be as buildRequest, t as buildSandboxContextInput, lt as buildVoiceTranscriptMarkdown, ne as chatTurns, T as checkAssistantAiCredits, gt as chunkForSpeech, Bn as classifyAttachment, xe as classifyHttpFailure, ln as columnLetterToIndex, De as configureSpeechEngine, _t as containsCjk, sr as copyToClipboard, Vn as countInlineImageCandidates, Hn as countInlinedImageParts, E as createAssistantSandbox, D as createAssistantSession, Te as createHostedTtsEngine, hr as createReadinessTracker, Ee as createRoutingSpeechEngine, ee as createSandboxAssistantTransport, Oe as createSpeechEngines, Se as decodeAudioResponse, un as decodeXmlEntities, Un as detectDocumentFormat, Jt as detectScriptLocale, pr as deviceHasCamera, dn as docxXmlToText, O as downloadAssistantArtifact, Kr as downloadFile, Wn as estimateTurnBodyBytes, n as executeSandboxGraphQL, qr as exportConversation, k as extendAssistantSandboxTTL, Mt as findAssistantLanguage, A as findExistingSandbox, It as findPendingWrite, fn as fitPdfPages, Gn as formatBytes, pn as formatPageRanges, cr as getActorId, j as getAssistantArtifacts, G as getAssistantMedia, M as getAssistantMessages, N as getAssistantSession, P as getAssistantStreamAccess, K as getAssistantText, Kn as getAttachmentSendBlocker, y as getCapability, qn as getExtension, m as getImageForMode, h as getImageTagForMode, lr as getOrganizationId, q as getRawMessageCreatedAt, g as getResourcesForMode, _ as getSandboxImageRegistry, Jn as getSendableAttachments, ke as getSpeechEngine, J as getToolProgress, ur as getWorkspaceId, re as groupBySession, ie as groupConsecutiveBySession, Yn as hasAttachmentWorkInFlight, fe as hostedLocaleFor, pe as hostedSupportsLanguage, yr as imageHostLabel, Ue as isCapturing, We as isEcho, mn as isMostlyImagePages, ri as isMultimodalBodyRejection, r as isQuotaExhaustedError, Y as isReapedSandboxConnectionError, gr as isRecentlyVerified, X as isRecoverable, ii as isRecoverableAssistantError, br as isRemoteImageSrc, Zt as isSpeakingMessage, Qe as isSpeechBlocked, Ge as isSubmittable, tr as isTurnInFlight, b as isUnknownFieldError, ae as isVoiceTurn, hn as joinSheets, $e as languageDisplayName, Z as mapSessionToHistory, x as markSupported, S as markUnsupported, Q as mergeMessagesById, Me as micIsInterrupt, F as modeRequiresConfirmWrites, Pr as nextModeIndex, et as normalizeLangTag, Ke as orbMode, gn as pageMarker, Lt as parseConfirmationRefusal, Xn as parseDataUrl, _n as parseSharedStrings, rr as parseToolActivity, vn as parseWorkbookSheets, yn as pdfTextItemsToPage, qe as planReplyConsumption, Ot as pollDelayMs, tt as primaryLanguageSubtag, Ae as readSpeechEngineConfig, Pt as replyFollowsInput, I as reportAssistantAiTokenUsage, Qt as requiresCancel, je as resetSpeechEngine, Nt as resolveAssistantLanguage, Ft as resolveLanguagePair, zt as resolveModeConfig, v as resolveSandboxAssistantMode, Yt as resolveSpeechLocale, $ as sanitize, L as selectExistingAssistantSandbox, nt as selectVoiceForLocale, R as sendAssistantPromptAsync, z as sendHeartbeat, bn as sheetXmlToRows, Ce as shouldDisableEngine, Ne as showsAssistantCaption, Pe as showsUserCaption, vt as speakableEmail, rt as speechGate, qt as speechLabelsFor, it as speechLangForLocale, $t as speechPlaybackReducer, we as splitForVendor, yt as splitTableRow, Je as spokenSoFar, B as stopReapedAssistantSandbox, xn as summarisePageText, kt as toCaptionText, Zn as toMessageAttachment, bt as toSpeakableText, Qn as truncateForInline, Sn as truncatePagesForInline, ti as useAssistantApiAccess, Wt as useAssistantI18nNamespace, Bt as useAssistantProduct, Vt as useAssistantProductOrNull, ar as useAssistantSpeech, er as useAssistantStore, Gt as useAssistantTr, ni as useConversationTurns, te as useSandboxAssistantTransport, e as useVoiceInput, or as useVoiceSession, $n as validateFile, at as voiceAvailability, oe as voiceMarker, St as voicePreviewText, ot as voiceQualityRank, se as voiceSessionIdOf, Ye as voiceSessionReducer, Fe as voiceStageState, ut as voiceTranscriptFilename, ce as voiceTurnsOnly, st as voicesForLocale, V as waitForAssistantServiceReady, H as waitForSandboxRunning, Ie as waveformIsActive, Le as waveformIsSettled };
2
+ import { classifyQuotaError as t, isQuotaExhaustedError as n, quotaExhaustedEventName as r } from "./shared/assistant/quota.js";
3
+ import { buildSandboxContextInput as i, executeSandboxGraphQL as a } from "./shared/assistant/gatewayClient.js";
4
+ import { CHECK_AI_CREDITS as o, CREATE_SANDBOX as s, EXTEND_SANDBOX_TTL as c, GET_ACTIVE_SANDBOXES as l, GET_SANDBOX as u, PROXY_SANDBOX_REQUEST as d, REPORT_AI_TOKEN_USAGE as f, STOP_ASSISTANT_SANDBOX as p, WAIT_FOR_SANDBOX_RUNNING as m } from "./shared/assistant/operations.js";
5
+ import { ASSISTANT_API_AUTH_STRATEGY as h, getImageForMode as g, getImageTagForMode as _, getResourcesForMode as v, getSandboxImageRegistry as y, resolveSandboxAssistantMode as b } from "./shared/assistant/images.js";
6
+ import { getCapability as x, isUnknownFieldError as S, markSupported as C, markUnsupported as w } from "./shared/assistant/capabilities.js";
7
+ import { buildAssistantSandboxEnv as T, buildPromptRequestBody as E, checkAssistantAiCredits as D, createAssistantSandbox as O, createAssistantSession as k, downloadAssistantArtifact as A, extendAssistantSandboxTTL as j, findExistingSandbox as M, getAssistantArtifacts as N, getAssistantMessages as P, getAssistantSession as F, getAssistantStreamAccess as I, modeRequiresConfirmWrites as L, reportAssistantAiTokenUsage as R, selectExistingAssistantSandbox as z, sendAssistantPromptAsync as B, sendHeartbeat as V, stopReapedAssistantSandbox as H, waitForAssistantServiceReady as U, waitForSandboxRunning as W } from "./shared/assistant/api.js";
8
+ import { AssistantRuntimeManager as G } from "./shared/assistant/runtime.js";
9
+ import { buildProgress as K, getAssistantMedia as q, getAssistantText as J, getRawMessageCreatedAt as Y, getToolProgress as X, isReapedSandboxConnectionError as Z, isRecoverable as Q, mapSessionToHistory as $, mergeMessagesById as ee, sanitize as te } from "./shared/assistant/progress.js";
10
+ import { createSandboxAssistantTransport as ne } from "./shared/assistant/createSandboxAssistantTransport.js";
11
+ import { useSandboxAssistantTransport as re } from "./shared/assistant/useSandboxAssistantTransport.js";
12
+ import { chatTurns as ie, groupBySession as ae, groupConsecutiveBySession as oe, isVoiceTurn as se, voiceMarker as ce, voiceSessionIdOf as le, voiceTurnsOnly as ue } from "./shared/assistant/voice/turnVisibility.js";
13
+ import { browserSpeechEngine as de } from "./shared/assistant/speech/browserSpeechEngine.js";
14
+ import { HOSTED_TTS_TIER as fe, HOSTED_VOICES as pe, hostedLocaleFor as me, hostedSupportsLanguage as he } from "./shared/assistant/speech/hostedVoiceCatalogue.js";
15
+ import { HOSTED_TTS_MAX_CHARS as ge, SPEAKING_RATE_MAX as _e, SPEAKING_RATE_MAX_STREAMING as ve, SPEAKING_RATE_MAX_SYNC as ye, SPEAKING_RATE_MIN as be, base64ToBytes as xe, buildRequest as Se, classifyHttpFailure as Ce, decodeAudioResponse as we, shouldDisableEngine as Te, splitForVendor as Ee } from "./shared/assistant/speech/hostedTtsProtocol.js";
16
+ import { createHostedTtsEngine as De } from "./shared/assistant/speech/hostedTtsSpeechEngine.js";
17
+ import { createRoutingSpeechEngine as Oe } from "./shared/assistant/speech/routingSpeechEngine.js";
18
+ import { configureSpeechEngine as ke, createSpeechEngines as Ae, getSpeechEngine as je, readSpeechEngineConfig as Me, resetSpeechEngine as Ne } from "./shared/assistant/speech/createSpeechEngine.js";
19
+ import { micIsInterrupt as Pe, showsAssistantCaption as Fe, showsUserCaption as Ie, voiceStageState as Le, waveformIsActive as Re, waveformIsSettled as ze } from "./shared/assistant/voice/voiceStageState.js";
20
+ import { ENDPOINT_GRACE_MS as Be, INITIAL_SESSION as Ve, INTERRUPT_MAX_MS as He, INTERRUPT_MIN_MS as Ue, SILENCE_SUBMIT_MS as We, isCapturing as Ge, isEcho as Ke, isSubmittable as qe, orbMode as Je, planReplyConsumption as Ye, spokenSoFar as Xe, voiceSessionReducer as Ze } from "./shared/assistant/voice/voiceSession.js";
21
+ import { SPEECH_LANG as Qe, VOICE_LIST_TIMEOUT_MS as $e, isSpeechBlocked as et, languageDisplayName as tt, normalizeLangTag as nt, primaryLanguageSubtag as rt, selectVoiceForLocale as it, speechGate as at, speechLangForLocale as ot, voiceAvailability as st, voiceQualityRank as ct, voicesForLocale as lt } from "./shared/assistant/voice/speechVoices.js";
22
+ import { buildContinuedFromVoiceNote as ut, buildVoiceTranscriptMarkdown as dt, voiceTranscriptFilename as ft } from "./shared/assistant/voice/voiceTranscript.js";
23
+ import { DEFAULT_SPEAKABLE_LABELS as pt, MAX_SPEAKABLE_CHARS as mt, MAX_SPOKEN_TABLE_ROWS as ht, SPEECH_CHUNK_CHARS as gt, SPEECH_CHUNK_CJK_CHARS as _t, chunkForSpeech as vt, containsCjk as yt, speakableEmail as bt, splitTableRow as xt, toSpeakableText as St } from "./shared/assistant/voice/speakableText.js";
24
+ import { PREVIEW_LANGUAGES as Ct, voicePreviewText as wt } from "./shared/assistant/voice/voicePreview.js";
25
+ import { POLL_FAST_MS as Tt, POLL_FAST_UNTIL_MS as Et, POLL_SLOW_MS as Dt, POLL_STEADY_MS as Ot, POLL_STEADY_UNTIL_MS as kt, pollDelayMs as At } from "./shared/assistant/voice/assistantPollSchedule.js";
26
+ import { toCaptionText as jt } from "./shared/assistant/voice/captionText.js";
27
+ import { ASSISTANT_LANGUAGES as Mt, DEFAULT_SPEECH_RATE as Nt, findAssistantLanguage as Pt, resolveAssistantLanguage as Ft } from "./shared/assistant/voice/languages.js";
28
+ import { replyFollowsInput as It, resolveLanguagePair as Lt } from "./shared/assistant/voice/languagePair.js";
29
+ import { findPendingWrite as Rt, parseConfirmationRefusal as zt } from "./shared/assistant/pendingWrite.js";
30
+ import { AssistantProductProvider as Bt, resolveModeConfig as Vt, useAssistantProduct as Ht, useAssistantProductOrNull as Ut } from "./shared/assistant/product.js";
31
+ import { AssistantI18nProvider as Wt, assistantTranslationKey as Gt, useAssistantI18nNamespace as Kt, useAssistantTr as qt } from "./shared/assistant/i18n.js";
32
+ import { SPOKEN_LABEL_LANGUAGES as Jt, speechLabelsFor as Yt } from "./shared/assistant/voice/speechLabels.js";
33
+ import { detectScriptLocale as Xt, resolveSpeechLocale as Zt } from "./shared/assistant/voice/replyLanguage.js";
34
+ import { IDLE_PLAYBACK as Qt, isSpeakingMessage as $t, requiresCancel as en, speechPlaybackReducer as tn } from "./shared/assistant/voice/speechPlayback.js";
35
+ import { MAX_INLINE_IMAGE_BASE64_BYTES as nn, MAX_REQUEST_BODY_BYTES as rn } from "./shared/assistant/gatewayLimits.js";
36
+ import { BOILERPLATE_PAGE_SHARE as an, MAX_BOILERPLATE_LINE_CHARS as on, MAX_EXTRACTED_CHARS as sn, MAX_PDF_PAGES_SCANNED as cn, MIN_PAGE_TEXT_CHARS as ln, MIN_TEXT_PAGE_SHARE as un, columnLetterToIndex as dn, decodeXmlEntities as fn, docxXmlToText as pn, fitPdfPages as mn, formatPageRanges as hn, isMostlyImagePages as gn, joinSheets as _n, pageMarker as vn, parseSharedStrings as yn, parseWorkbookSheets as bn, pdfTextItemsToPage as xn, sheetXmlToRows as Sn, summarisePageText as Cn, truncatePagesForInline as wn } from "./shared/assistant/documentText.js";
37
+ import { ATTACHMENT_ACCEPT as Tn, AttachmentRejectedError as En, INLINE_IMAGE_MAX_DIM as Dn, INLINE_IMAGE_QUALITY as On, MAX_ATTACHMENTS as kn, MAX_FILE_BYTES as An, MAX_INLINE_CHARS_PER_FILE as jn, MAX_INLINE_CHARS_TOTAL as Mn, MAX_INLINE_IMAGE_BASE64_CHARS as Nn, MAX_INLINE_IMAGE_PARTS as Pn, MAX_INLINE_TURN_BODY_BYTES as Fn, MAX_TURN_BODY_BYTES as In, PROMPT_ENVELOPE_RESERVE_BYTES as Ln, TURN_BODY_HEADROOM_BYTES as Rn, buildAttachmentPromptBlock as zn, buildPromptParts as Bn, buildPromptWithAttachments as Vn, classifyAttachment as Hn, countInlineImageCandidates as Un, countInlinedImageParts as Wn, detectDocumentFormat as Gn, estimateTurnBodyBytes as Kn, formatBytes as qn, getAttachmentSendBlocker as Jn, getExtension as Yn, getSendableAttachments as Xn, hasAttachmentWorkInFlight as Zn, parseDataUrl as Qn, toMessageAttachment as $n, truncateForInline as er, validateFile as tr } from "./shared/assistant/attachments.js";
38
+ import { useAssistantStore as nr } from "./shared/assistant/store.js";
39
+ import { isTurnInFlight as rr } from "./shared/assistant/turnState.js";
40
+ import { AssistantToolActivity as ir, parseToolActivity as ar } from "./shared/assistant/ui/AssistantToolActivity.js";
41
+ import { AssistantSpeechProvider as or, useAssistantSpeech as sr } from "./shared/assistant/ui/AssistantSpeechProvider.js";
42
+ import { useVoiceSession as cr } from "./shared/assistant/ui/useVoiceSession.js";
43
+ import { copyToClipboard as lr } from "./shared/assistant/clipboard.js";
44
+ import { getActorId as ur, getOrganizationId as dr, getWorkspaceId as fr } from "./shared/assistant/context.js";
45
+ import { ATTACHMENT_SOURCES as pr, availableAttachmentSources as mr, deviceHasCamera as hr } from "./shared/assistant/attachmentSources.js";
46
+ import { SANDBOX_READY_TTL_MS as gr, createReadinessTracker as _r, isRecentlyVerified as vr } from "./shared/assistant/sandboxReadiness.js";
47
+ import { AssistantAutoSpeakToggle as yr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
48
+ import { AssistantMarkdownImage as br, imageHostLabel as xr, isRemoteImageSrc as Sr } from "./shared/assistant/ui/AssistantMarkdownImage.js";
49
+ import { AssistantMarkdownRenderer as Cr, assistantUrlTransform as wr } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
50
+ import { AssistantMessageAttachments as Tr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
51
+ import { AssistantPendingWriteCard as Er } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
52
+ import { AssistantReplyLanguageSelector as Dr } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
53
+ import { AssistantSpeakButton as Or } from "./shared/assistant/ui/AssistantSpeakButton.js";
54
+ import { AssistantSpokenTurnsNotice as kr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
55
+ import { AssistantAttachmentButton as Ar } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
56
+ import { AssistantAttachmentChips as jr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
57
+ import { AssistantLanguageSelector as Mr, FOLLOW_APP_LOCALE as Nr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
58
+ import { ASSISTANT_MODE_META as Pr, AssistantModeSelector as Fr, nextModeIndex as Ir } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
59
+ import { AssistantVoiceButton as Lr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
60
+ import { AUTO_VOICE as Rr, AssistantVoiceSelector as zr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
61
+ import { AssistantVoiceOrb as Br } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
62
+ import { AssistantVoiceSessionButton as Vr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
63
+ import { VoiceCaption as Hr } from "./shared/assistant/ui/voice/VoiceCaption.js";
64
+ import { VoiceConversationView as Ur } from "./shared/assistant/ui/voice/VoiceConversationView.js";
65
+ import { VoiceWaveform as Wr } from "./shared/assistant/ui/voice/VoiceWaveform.js";
66
+ import { VoiceMiniController as Gr } from "./shared/assistant/ui/voice/VoiceMiniController.js";
67
+ import { VoiceStage as Kr } from "./shared/assistant/ui/voice/VoiceStage.js";
68
+ import { VoiceTranscriptDrawer as qr } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
69
+ import { downloadFile as Jr, exportConversation as Yr } from "./shared/assistant/exportConversation.js";
70
+ import { AssistantMoreMenu as Xr } from "./shared/assistant/ui/AssistantMoreMenu.js";
71
+ import { AssistantHeader as Zr } from "./shared/assistant/ui/AssistantHeader.js";
72
+ import { AssistantConversationList as Qr } from "./shared/assistant/ui/AssistantConversationList.js";
73
+ import { AssistantEmptyState as $r } from "./shared/assistant/ui/AssistantEmptyState.js";
74
+ import { AssistantMessageItem as ei } from "./shared/assistant/ui/AssistantMessageItem.js";
75
+ import { AssistantMessageList as ti } from "./shared/assistant/ui/AssistantMessageList.js";
76
+ import { AssistantVoiceSession as ni } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
77
+ import { useAssistantApiAccess as ri } from "./shared/assistant/useAssistantApiAccess.js";
78
+ import { useConversationTurns as ii } from "./shared/assistant/useConversationTurns.js";
79
+ import { isMultimodalBodyRejection as ai, isRecoverableAssistantError as oi } from "./shared/assistant/transportErrors.js";
80
+ import { aiCreditsUpdatedEventName as si, dispatchAssistantQuotaExhausted as ci, notifyAiCreditsUpdated as li } from "./shared/assistant/aiCredits.js";
81
+ import { useWorkspaceWriteAccess as ui } from "./shared/assistant/useWorkspaceWriteAccess.js";
82
+ export { h as ASSISTANT_API_AUTH_STRATEGY, Mt as ASSISTANT_LANGUAGES, Pr as ASSISTANT_MODE_META, Tn as ATTACHMENT_ACCEPT, pr as ATTACHMENT_SOURCES, Rr as AUTO_VOICE, Ar as AssistantAttachmentButton, jr as AssistantAttachmentChips, yr as AssistantAutoSpeakToggle, Qr as AssistantConversationList, $r as AssistantEmptyState, Zr as AssistantHeader, Wt as AssistantI18nProvider, Mr as AssistantLanguageSelector, br as AssistantMarkdownImage, Cr as AssistantMarkdownRenderer, Tr as AssistantMessageAttachments, ei as AssistantMessageItem, ti as AssistantMessageList, Fr as AssistantModeSelector, Xr as AssistantMoreMenu, Er as AssistantPendingWriteCard, Bt as AssistantProductProvider, Dr as AssistantReplyLanguageSelector, G as AssistantRuntimeManager, Or as AssistantSpeakButton, or as AssistantSpeechProvider, kr as AssistantSpokenTurnsNotice, ir as AssistantToolActivity, Lr as AssistantVoiceButton, Br as AssistantVoiceOrb, zr as AssistantVoiceSelector, ni as AssistantVoiceSession, Vr as AssistantVoiceSessionButton, En as AttachmentRejectedError, an as BOILERPLATE_PAGE_SHARE, o as CHECK_AI_CREDITS, s as CREATE_SANDBOX, pt as DEFAULT_SPEAKABLE_LABELS, Nt as DEFAULT_SPEECH_RATE, Be as ENDPOINT_GRACE_MS, c as EXTEND_SANDBOX_TTL, Nr as FOLLOW_APP_LOCALE, l as GET_ACTIVE_SANDBOXES, u as GET_SANDBOX, ge as HOSTED_TTS_MAX_CHARS, fe as HOSTED_TTS_TIER, pe as HOSTED_VOICES, Qt as IDLE_PLAYBACK, Ve as INITIAL_SESSION, Dn as INLINE_IMAGE_MAX_DIM, On as INLINE_IMAGE_QUALITY, He as INTERRUPT_MAX_MS, Ue as INTERRUPT_MIN_MS, kn as MAX_ATTACHMENTS, on as MAX_BOILERPLATE_LINE_CHARS, sn as MAX_EXTRACTED_CHARS, An as MAX_FILE_BYTES, jn as MAX_INLINE_CHARS_PER_FILE, Mn as MAX_INLINE_CHARS_TOTAL, nn as MAX_INLINE_IMAGE_BASE64_BYTES, Nn as MAX_INLINE_IMAGE_BASE64_CHARS, Pn as MAX_INLINE_IMAGE_PARTS, Fn as MAX_INLINE_TURN_BODY_BYTES, cn as MAX_PDF_PAGES_SCANNED, rn as MAX_REQUEST_BODY_BYTES, mt as MAX_SPEAKABLE_CHARS, ht as MAX_SPOKEN_TABLE_ROWS, In as MAX_TURN_BODY_BYTES, ln as MIN_PAGE_TEXT_CHARS, un as MIN_TEXT_PAGE_SHARE, Tt as POLL_FAST_MS, Et as POLL_FAST_UNTIL_MS, Dt as POLL_SLOW_MS, Ot as POLL_STEADY_MS, kt as POLL_STEADY_UNTIL_MS, Ct as PREVIEW_LANGUAGES, Ln as PROMPT_ENVELOPE_RESERVE_BYTES, d as PROXY_SANDBOX_REQUEST, f as REPORT_AI_TOKEN_USAGE, gr as SANDBOX_READY_TTL_MS, We as SILENCE_SUBMIT_MS, _e as SPEAKING_RATE_MAX, ve as SPEAKING_RATE_MAX_STREAMING, ye as SPEAKING_RATE_MAX_SYNC, be as SPEAKING_RATE_MIN, gt as SPEECH_CHUNK_CHARS, _t as SPEECH_CHUNK_CJK_CHARS, Qe as SPEECH_LANG, Jt as SPOKEN_LABEL_LANGUAGES, p as STOP_ASSISTANT_SANDBOX, Rn as TURN_BODY_HEADROOM_BYTES, $e as VOICE_LIST_TIMEOUT_MS, Hr as VoiceCaption, Ur as VoiceConversationView, Gr as VoiceMiniController, Kr as VoiceStage, qr as VoiceTranscriptDrawer, Wr as VoiceWaveform, m as WAIT_FOR_SANDBOX_RUNNING, si as aiCreditsUpdatedEventName, Gt as assistantTranslationKey, wr as assistantUrlTransform, mr as availableAttachmentSources, xe as base64ToBytes, de as browserSpeechEngine, T as buildAssistantSandboxEnv, zn as buildAttachmentPromptBlock, ut as buildContinuedFromVoiceNote, K as buildProgress, Bn as buildPromptParts, E as buildPromptRequestBody, Vn as buildPromptWithAttachments, Se as buildRequest, i as buildSandboxContextInput, dt as buildVoiceTranscriptMarkdown, ie as chatTurns, D as checkAssistantAiCredits, vt as chunkForSpeech, Hn as classifyAttachment, Ce as classifyHttpFailure, t as classifyQuotaError, dn as columnLetterToIndex, ke as configureSpeechEngine, yt as containsCjk, lr as copyToClipboard, Un as countInlineImageCandidates, Wn as countInlinedImageParts, O as createAssistantSandbox, k as createAssistantSession, De as createHostedTtsEngine, _r as createReadinessTracker, Oe as createRoutingSpeechEngine, ne as createSandboxAssistantTransport, Ae as createSpeechEngines, we as decodeAudioResponse, fn as decodeXmlEntities, Gn as detectDocumentFormat, Xt as detectScriptLocale, hr as deviceHasCamera, ci as dispatchAssistantQuotaExhausted, pn as docxXmlToText, A as downloadAssistantArtifact, Jr as downloadFile, Kn as estimateTurnBodyBytes, a as executeSandboxGraphQL, Yr as exportConversation, j as extendAssistantSandboxTTL, Pt as findAssistantLanguage, M as findExistingSandbox, Rt as findPendingWrite, mn as fitPdfPages, qn as formatBytes, hn as formatPageRanges, ur as getActorId, N as getAssistantArtifacts, q as getAssistantMedia, P as getAssistantMessages, F as getAssistantSession, I as getAssistantStreamAccess, J as getAssistantText, Jn as getAttachmentSendBlocker, x as getCapability, Yn as getExtension, g as getImageForMode, _ as getImageTagForMode, dr as getOrganizationId, Y as getRawMessageCreatedAt, v as getResourcesForMode, y as getSandboxImageRegistry, Xn as getSendableAttachments, je as getSpeechEngine, X as getToolProgress, fr as getWorkspaceId, ae as groupBySession, oe as groupConsecutiveBySession, Zn as hasAttachmentWorkInFlight, me as hostedLocaleFor, he as hostedSupportsLanguage, xr as imageHostLabel, Ge as isCapturing, Ke as isEcho, gn as isMostlyImagePages, ai as isMultimodalBodyRejection, n as isQuotaExhaustedError, Z as isReapedSandboxConnectionError, vr as isRecentlyVerified, Q as isRecoverable, oi as isRecoverableAssistantError, Sr as isRemoteImageSrc, $t as isSpeakingMessage, et as isSpeechBlocked, qe as isSubmittable, rr as isTurnInFlight, S as isUnknownFieldError, se as isVoiceTurn, _n as joinSheets, tt as languageDisplayName, $ as mapSessionToHistory, C as markSupported, w as markUnsupported, ee as mergeMessagesById, Pe as micIsInterrupt, L as modeRequiresConfirmWrites, Ir as nextModeIndex, nt as normalizeLangTag, li as notifyAiCreditsUpdated, Je as orbMode, vn as pageMarker, zt as parseConfirmationRefusal, Qn as parseDataUrl, yn as parseSharedStrings, ar as parseToolActivity, bn as parseWorkbookSheets, xn as pdfTextItemsToPage, Ye as planReplyConsumption, At as pollDelayMs, rt as primaryLanguageSubtag, r as quotaExhaustedEventName, Me as readSpeechEngineConfig, It as replyFollowsInput, R as reportAssistantAiTokenUsage, en as requiresCancel, Ne as resetSpeechEngine, Ft as resolveAssistantLanguage, Lt as resolveLanguagePair, Vt as resolveModeConfig, b as resolveSandboxAssistantMode, Zt as resolveSpeechLocale, te as sanitize, z as selectExistingAssistantSandbox, it as selectVoiceForLocale, B as sendAssistantPromptAsync, V as sendHeartbeat, Sn as sheetXmlToRows, Te as shouldDisableEngine, Fe as showsAssistantCaption, Ie as showsUserCaption, bt as speakableEmail, at as speechGate, Yt as speechLabelsFor, ot as speechLangForLocale, tn as speechPlaybackReducer, Ee as splitForVendor, xt as splitTableRow, Xe as spokenSoFar, H as stopReapedAssistantSandbox, Cn as summarisePageText, jt as toCaptionText, $n as toMessageAttachment, St as toSpeakableText, er as truncateForInline, wn as truncatePagesForInline, ri as useAssistantApiAccess, Kt as useAssistantI18nNamespace, Ht as useAssistantProduct, Ut as useAssistantProductOrNull, sr as useAssistantSpeech, nr as useAssistantStore, qt as useAssistantTr, ii as useConversationTurns, re as useSandboxAssistantTransport, e as useVoiceInput, cr as useVoiceSession, ui as useWorkspaceWriteAccess, tr as validateFile, st as voiceAvailability, ce as voiceMarker, wt as voicePreviewText, ct as voiceQualityRank, le as voiceSessionIdOf, Ze as voiceSessionReducer, Le as voiceStageState, ft as voiceTranscriptFilename, ue as voiceTurnsOnly, lt as voicesForLocale, U as waitForAssistantServiceReady, W as waitForSandboxRunning, Re as waveformIsActive, ze as waveformIsSettled };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.904.19",
3
+ "version": "2026.904.21",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {