@burdenoff/fe-libs 2026.928.3 → 2026.929.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.
- package/dist/shared/assistant/adminModeSendGate.d.ts +6 -5
- package/dist/shared/assistant/adminModeSendGate.d.ts.map +1 -1
- package/dist/shared/assistant/adminModeSendGate.js +11 -11
- package/dist/shared/assistant/api.d.ts +291 -28
- package/dist/shared/assistant/api.d.ts.map +1 -1
- package/dist/shared/assistant/api.js +351 -147
- package/dist/shared/assistant/autoRouting.d.ts +11 -3
- package/dist/shared/assistant/autoRouting.d.ts.map +1 -1
- package/dist/shared/assistant/autoRouting.js +7 -7
- package/dist/shared/assistant/capabilities.d.ts +28 -0
- package/dist/shared/assistant/capabilities.d.ts.map +1 -1
- package/dist/shared/assistant/capabilities.js +19 -10
- package/dist/shared/assistant/conversation.d.ts +24 -2
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/createSandboxAssistantTransport.d.ts.map +1 -1
- package/dist/shared/assistant/createSandboxAssistantTransport.js +67 -54
- package/dist/shared/assistant/history/historyList.js +1 -1
- package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyMapping.js +5 -1
- package/dist/shared/assistant/history/historyResume.js +7 -7
- package/dist/shared/assistant/i18nManifest.d.ts +53 -0
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +75 -16
- package/dist/shared/assistant/index.d.ts +15 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/modeCapabilities.js +1 -1
- package/dist/shared/assistant/operations.d.ts +22 -0
- package/dist/shared/assistant/operations.d.ts.map +1 -1
- package/dist/shared/assistant/operations.js +2 -2
- package/dist/shared/assistant/prewarm.d.ts +7 -0
- package/dist/shared/assistant/prewarm.d.ts.map +1 -1
- package/dist/shared/assistant/prewarm.js +1 -1
- package/dist/shared/assistant/product.d.ts +80 -2
- package/dist/shared/assistant/product.d.ts.map +1 -1
- package/dist/shared/assistant/product.js +10 -6
- package/dist/shared/assistant/proposalWriteRules.d.ts +40 -0
- package/dist/shared/assistant/proposalWriteRules.d.ts.map +1 -0
- package/dist/shared/assistant/proposalWriteRules.js +14 -0
- package/dist/shared/assistant/store.d.ts +17 -0
- package/dist/shared/assistant/store.d.ts.map +1 -1
- package/dist/shared/assistant/store.js +50 -43
- package/dist/shared/assistant/turnOutcome.d.ts +34 -2
- package/dist/shared/assistant/turnOutcome.d.ts.map +1 -1
- package/dist/shared/assistant/turnOutcome.js +28 -17
- package/dist/shared/assistant/turnOutcomeCopy.d.ts +29 -7
- package/dist/shared/assistant/turnOutcomeCopy.d.ts.map +1 -1
- package/dist/shared/assistant/turnOutcomeCopy.js +18 -6
- package/dist/shared/assistant/types.d.ts +5 -1
- package/dist/shared/assistant/types.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantApiCallsConsentDialog.js +4 -4
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +989 -718
- package/dist/shared/assistant/ui/AssistantConversationList.js +6 -6
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +6 -6
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +8 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.js +77 -76
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts +13 -1
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageList.js +15 -13
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +5 -5
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +209 -209
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +62 -0
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.js +253 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +72 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +439 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.d.ts +40 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.js +35 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +8 -8
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +28 -0
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +159 -110
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +61 -0
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts.map +1 -0
- package/dist/shared/assistant/ui/useWriteProposalConfirm.js +109 -0
- package/dist/shared/assistant/ui/useWriteProposals.d.ts +102 -0
- package/dist/shared/assistant/ui/useWriteProposals.d.ts.map +1 -0
- package/dist/shared/assistant/ui/useWriteProposals.js +230 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +17 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +141 -109
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +76 -0
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts.map +1 -0
- package/dist/shared/assistant/ui/writeProposalPresentation.js +110 -0
- package/dist/shared/assistant/usageReporting.d.ts +108 -0
- package/dist/shared/assistant/usageReporting.d.ts.map +1 -0
- package/dist/shared/assistant/usageReporting.js +155 -0
- package/dist/shared/assistant/useAssistantApiAccess.d.ts +49 -14
- package/dist/shared/assistant/useAssistantApiAccess.d.ts.map +1 -1
- package/dist/shared/assistant/useAssistantApiAccess.js +43 -25
- package/dist/shared/assistant/useAssistantHeartbeat.d.ts.map +1 -1
- package/dist/shared/assistant/useAssistantHeartbeat.js +5 -5
- package/dist/shared/assistant/useWorkspaceWriteAccess.d.ts +5 -6
- package/dist/shared/assistant/useWorkspaceWriteAccess.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceSession.d.ts +46 -0
- package/dist/shared/assistant/voice/voiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceSession.js +35 -2
- package/dist/shared/assistant/writeConfirmSeam.d.ts +32 -0
- package/dist/shared/assistant/writeConfirmSeam.d.ts.map +1 -0
- package/dist/shared/assistant/writeConfirmSeam.js +23 -0
- package/dist/shared/assistant/writeModeConsent.d.ts +16 -8
- package/dist/shared/assistant/writeModeConsent.d.ts.map +1 -1
- package/dist/shared/assistant/writeModeConsent.js +2 -2
- package/dist/shared/assistant/writeProposalDiscovery.d.ts +123 -0
- package/dist/shared/assistant/writeProposalDiscovery.d.ts.map +1 -0
- package/dist/shared/assistant/writeProposalDiscovery.js +210 -0
- package/dist/shared/assistant/writeProposalErrorCopy.d.ts +135 -0
- package/dist/shared/assistant/writeProposalErrorCopy.d.ts.map +1 -0
- package/dist/shared/assistant/writeProposalErrorCopy.js +135 -0
- package/dist/shared/assistant/writeProposalVoice.d.ts +133 -0
- package/dist/shared/assistant/writeProposalVoice.d.ts.map +1 -0
- package/dist/shared/assistant/writeProposalVoice.js +66 -0
- package/dist/shared/assistant/writeProposals.d.ts +268 -0
- package/dist/shared/assistant/writeProposals.d.ts.map +1 -0
- package/dist/shared/assistant/writeProposals.js +445 -0
- package/dist/shared/assistant/writeReplyBinder.d.ts +166 -0
- package/dist/shared/assistant/writeReplyBinder.d.ts.map +1 -0
- package/dist/shared/assistant/writeReplyBinder.js +233 -0
- package/dist/shared/assistant/writeReplySend.d.ts +110 -0
- package/dist/shared/assistant/writeReplySend.d.ts.map +1 -0
- package/dist/shared/assistant/writeReplySend.js +93 -0
- package/dist/shared-assistant.js +167 -152
- package/dist/ui/modal-shell.d.ts +14 -1
- package/dist/ui/modal-shell.d.ts.map +1 -1
- package/dist/ui/modal-shell.js +8 -6
- package/package.json +1 -1
|
@@ -33,11 +33,12 @@ export declare const ADMIN_MODE_ACCESS_WAIT_MS = 10000;
|
|
|
33
33
|
* A gate is read LIVE through a ref, so it does not keep a "yes" that a later
|
|
34
34
|
* render has already replaced, the way a value captured by `useCallback` would.
|
|
35
35
|
*
|
|
36
|
-
* ★
|
|
37
|
-
*
|
|
38
|
-
* for
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* ★ Workspace switches are the HOOK's job, not this gate's. The gate only ever
|
|
37
|
+
* knows what the check last told it. `useAssistantApiAccess` reports `loading`
|
|
38
|
+
* for any render whose workspace or user its answer is not about (BOFF-7803,
|
|
39
|
+
* OD-2), so the values fed in here — and the mode list — never carry another
|
|
40
|
+
* workspace's yes. The gate still learns them in an effect, one commit after
|
|
41
|
+
* that render.
|
|
41
42
|
*/
|
|
42
43
|
export interface AdminModeAccessGate {
|
|
43
44
|
/** The latest answer, for the final synchronous validation after a wait. */
|
|
@@ -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;AAG7C,+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
|
|
1
|
+
{"version":3,"file":"adminModeSendGate.d.ts","sourceRoot":"","sources":["../../../src/shared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AAE,aAAa,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EACnE,IAAI,EAAE,mBAAmB,EACzB,SAAS,GAAE,MAAkC,GAC5C,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIxB;AAED,mFAAmF;AACnF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,mBAAmB,GAAG,SAAS,EACjD,IAAI,EAAE,mBAAmB,EACzB,SAAS,GAAE,MAAkC,GAC5C,OAAO,CAAC,iBAAiB,CAAC,CAoC5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AssistantSendRefusal as e } from "./turnOutcome.js";
|
|
2
|
+
import { UNAVAILABLE_MODE_REFUSAL as t, adminOnlyModeSendRefusal as n, resolveAssistantModeCapabilities as r, unofferedModeSendRefusal as i } from "./modeCapabilities.js";
|
|
3
3
|
//#region src/shared/assistant/adminModeSendGate.ts
|
|
4
4
|
var a = 1e4;
|
|
5
5
|
function o(e) {
|
|
@@ -32,20 +32,20 @@ function o(e) {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
async function s(e,
|
|
36
|
-
return e?.requiresAdmin ?
|
|
35
|
+
async function s(e, t, r = a) {
|
|
36
|
+
return e?.requiresAdmin ? n(e, await t.wait(r)) : null;
|
|
37
37
|
}
|
|
38
|
-
async function c(e, t, n,
|
|
39
|
-
return
|
|
38
|
+
async function c(e, t, n, r = a) {
|
|
39
|
+
return i(e, t()) === null ? null : (await n.wait(r), i(e, t()));
|
|
40
40
|
}
|
|
41
41
|
async function l(o, s, l, u = a) {
|
|
42
42
|
let d = Date.now() + u, f = await c(o, s, l, u);
|
|
43
|
-
if (f) throw new
|
|
43
|
+
if (f) throw new e("mode-unavailable", f);
|
|
44
44
|
s()?.requiresAdmin && await l.wait(Math.max(0, d - Date.now()));
|
|
45
|
-
let p = s(), m =
|
|
46
|
-
if (h) throw new
|
|
47
|
-
let g = l.read(), _ =
|
|
48
|
-
if (_) throw new
|
|
45
|
+
let p = s(), m = r(o, p), h = i(o, p) ?? (m.provisionable ? null : t);
|
|
46
|
+
if (h) throw new e("mode-unavailable", h);
|
|
47
|
+
let g = l.read(), _ = n(p, g);
|
|
48
|
+
if (_) throw new e(g.loading ? "mode-access-pending" : "mode-admin-only", _);
|
|
49
49
|
return {
|
|
50
50
|
config: p,
|
|
51
51
|
capabilities: m
|
|
@@ -1,35 +1,81 @@
|
|
|
1
1
|
import { AssistantMode, AssistantPromptPart, AssistantRawMessage, AssistantSandboxAuthContext, AssistantArtifact, AssistantSessionInfo, DownloadedAssistantArtifact, StreamAccess } from './types';
|
|
2
|
+
import { SandboxWriteCapabilities, WriteApprovalMode, WriteExecutionState } from './writeProposals';
|
|
3
|
+
import { WriteReplyKind, WriteReplyOrigin } from './writeReplyBinder';
|
|
2
4
|
/**
|
|
3
|
-
* Does a proxied request
|
|
4
|
-
* own tokens (`forwardedAuthToken` /
|
|
5
|
+
* Does a proxied request addressed to a sandbox of this mode carry the
|
|
6
|
+
* signed-in user's own tokens (`forwardedAuthToken` /
|
|
7
|
+
* `forwardedWorkspaceToken`) in the `proxySandboxRequest` input?
|
|
5
8
|
*
|
|
6
|
-
* ★★
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* ★★ The recipient is wspace-sandbox-svc, not the sandbox. The two fields are
|
|
10
|
+
* input to the svc's proxy mutation; what reaches the sandbox is the svc's
|
|
11
|
+
* decision, made from the sandbox's RECORDED mode, not from anything sent here:
|
|
12
|
+
* - relay credential mode (BOFF-8072): the svc keeps the tokens server-side,
|
|
13
|
+
* sealed and TTL-bound, and forwards NEITHER into any sandbox. The session
|
|
14
|
+
* gets only an opaque capability that the svc's session relay accepts, and
|
|
15
|
+
* the relay runs each business request as the user through the public
|
|
16
|
+
* gateway, so `@rbac` applies.
|
|
17
|
+
* - legacy credential mode: the svc delivers them to an Ask sandbox only, and
|
|
18
|
+
* already withholds them from `api-calls` (wspace-sandbox-svc
|
|
19
|
+
* `forwardsUserTokens`, SandboxProvider.ts:3051-3054).
|
|
20
|
+
*
|
|
21
|
+
* ★★ Ask (`assistant`) and Take action (`api-calls`), and nothing else. Both
|
|
22
|
+
* reach the platform gateway, and in relay mode both run their reads (and an
|
|
23
|
+
* admin's Take-action execution) as the user's OWN token held by the relay. For
|
|
24
|
+
* `api-calls` that is what lets an admin's Take action run on the admin's own
|
|
25
|
+
* human token rather than the svc's admin-bridge `app_as_user` mint.
|
|
26
|
+
*
|
|
27
|
+
* Every other mode must never send them:
|
|
13
28
|
* - `vibe-plugins`, `general` and every PRODUCT-declared mode (see
|
|
14
29
|
* `declareAssistantMode`) make no platform GraphQL calls at all. Their agent
|
|
15
|
-
* has bash, so a user token
|
|
16
|
-
* read and replay as the user (BOFF-7304). A product cannot opt a mode
|
|
17
|
-
* tokens: the test below is equality with the built-in
|
|
30
|
+
* has bash, so a user token that reached one is a token a prompt injection
|
|
31
|
+
* can read and replay as the user (BOFF-7304). A product cannot opt a mode
|
|
32
|
+
* into tokens: the test below is equality with the built-in ids, not a
|
|
33
|
+
* capability.
|
|
18
34
|
*
|
|
19
|
-
* ★ Fails closed: an unknown, empty or absent mode forwards nothing
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
35
|
+
* ★ Fails closed: an unknown, empty or absent mode forwards nothing, so the
|
|
36
|
+
* tokens never leave the browser for a sandbox that has no use for them.
|
|
37
|
+
*
|
|
38
|
+
* ★ This is proxy-request forwarding only. No create-time token env is added
|
|
39
|
+
* for `api-calls`: `buildAssistantSandboxEnv` still puts `AUTH_TOKEN` /
|
|
40
|
+
* `WORKSPACE_AUTH_TOKEN` in the env of an Ask sandbox alone (on the
|
|
41
|
+
* createSandbox path an older svc needs), and a relay-mode svc strips even that.
|
|
23
42
|
*/
|
|
24
43
|
export declare function forwardsUserTokensToSandbox(mode: AssistantMode | null | undefined): boolean;
|
|
25
|
-
|
|
44
|
+
/** What a sandbox (or wspace-sandbox-svc, in front of it) answered. */
|
|
45
|
+
export interface SandboxProxyRawResult {
|
|
46
|
+
status: number;
|
|
47
|
+
body: unknown;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* `proxyToSandbox` without the throw: the answer's status and body come back
|
|
51
|
+
* whatever the status is, so a caller can read a 4xx's `code` and `reason`
|
|
52
|
+
* (BOFF-7803 5a: the write-proposal endpoints answer refusals that way).
|
|
53
|
+
*
|
|
54
|
+
* ★ ONE attempt, never retried here (`executeAssistantGraphQLOnce`). The
|
|
55
|
+
* caller owns retry: an approve must never be re-sent behind its back, since
|
|
56
|
+
* a resend after a lost answer reads as a second press.
|
|
57
|
+
*
|
|
58
|
+
* ★ It still throws when there is no answer to return: a transport failure, a
|
|
59
|
+
* GraphQL error from the gateway or the svc, or a `proxySandboxRequest` with no
|
|
60
|
+
* status. Those carry no sandbox status, and inventing one would lie about
|
|
61
|
+
* what happened.
|
|
62
|
+
*
|
|
63
|
+
* `mode` is the mode of the SANDBOX being addressed, exactly as for every
|
|
64
|
+
* other proxied call (see `buildSandboxProxyRequest`).
|
|
65
|
+
*/
|
|
66
|
+
export declare function proxySandboxRaw(sandboxId: string, workspaceId: string, path: string, method: string, body: unknown, mode: AssistantMode | undefined, authContext: AssistantSandboxAuthContext | undefined): Promise<SandboxProxyRawResult>;
|
|
67
|
+
export declare function findExistingSandbox(workspaceId: string, product: string, mode: AssistantMode, isProd: boolean, authContext: AssistantSandboxAuthContext, excludedSandboxIds?: ReadonlySet<string>,
|
|
68
|
+
/** The product's `writeApproval` flag (`AssistantProductCapabilities`). */
|
|
69
|
+
writeApproval?: WriteApprovalMode): Promise<string | null>;
|
|
26
70
|
/**
|
|
27
71
|
* `findExistingSandbox`, and the status the server reported for the one it
|
|
28
72
|
* chose. Reuse accepts a sandbox still PROVISIONING or PENDING — joining a boot
|
|
29
73
|
* someone else started (a reload mid-cold-start, a second tab) — and a latency
|
|
30
74
|
* report must not call waiting out that boot a probe (BOFF-7801).
|
|
31
75
|
*/
|
|
32
|
-
export declare function findExistingSandboxWithStatus(workspaceId: string, product: string, mode: AssistantMode, isProd: boolean, authContext: AssistantSandboxAuthContext, excludedSandboxIds?: ReadonlySet<string
|
|
76
|
+
export declare function findExistingSandboxWithStatus(workspaceId: string, product: string, mode: AssistantMode, isProd: boolean, authContext: AssistantSandboxAuthContext, excludedSandboxIds?: ReadonlySet<string>,
|
|
77
|
+
/** The product's `writeApproval` flag (`AssistantProductCapabilities`). */
|
|
78
|
+
writeApproval?: WriteApprovalMode): Promise<{
|
|
33
79
|
id: string;
|
|
34
80
|
status: string;
|
|
35
81
|
} | null>;
|
|
@@ -44,7 +90,71 @@ export interface ExistingAssistantSandbox {
|
|
|
44
90
|
createdBy: string;
|
|
45
91
|
}
|
|
46
92
|
/** Pure reuse selector, kept separate so quarantine behavior is regression-testable. */
|
|
47
|
-
export declare function selectExistingAssistantSandbox(sandboxes: ExistingAssistantSandbox[], product: string, mode: AssistantMode, _isProd: boolean, authContext: Pick<AssistantSandboxAuthContext, "userId">, excludedSandboxIds?: ReadonlySet<string
|
|
93
|
+
export declare function selectExistingAssistantSandbox(sandboxes: ExistingAssistantSandbox[], product: string, mode: AssistantMode, _isProd: boolean, authContext: Pick<AssistantSandboxAuthContext, "userId">, excludedSandboxIds?: ReadonlySet<string>,
|
|
94
|
+
/**
|
|
95
|
+
* The write-approval flow the panel can get (BOFF-7803 5a): the flow a
|
|
96
|
+
* Take-action sandbox must run, and — at `proposal-v1` — the provisioning
|
|
97
|
+
* path an Ask sandbox must have come from (`askReuseMatchesProvisioning`).
|
|
98
|
+
* Ignored for every other mode. Last, and defaulted to `legacy`, so every
|
|
99
|
+
* positional caller is unchanged.
|
|
100
|
+
*/
|
|
101
|
+
wantedWriteApproval?: WriteApprovalMode): string | null;
|
|
102
|
+
/**
|
|
103
|
+
* May this sandbox serve an Ask panel that wants `wanted`? (BOFF-7803 5a, the
|
|
104
|
+
* Ask fence.)
|
|
105
|
+
*
|
|
106
|
+
* ★★★ At `proposal-v1` an Ask sandbox is reusable only if the dedicated path
|
|
107
|
+
* provisioned it (`assistantAuth.provisionedVia ===
|
|
108
|
+
* 'provisionAssistantSandbox'`, stamped by the service, which drops any
|
|
109
|
+
* client-supplied `assistantAuth`). An Ask sandbox from `createSandbox` was
|
|
110
|
+
* built by `buildAssistantSandboxEnv`, which puts the user's `AUTH_TOKEN` and
|
|
111
|
+
* `WORKSPACE_AUTH_TOKEN` in its env. There the model's bash can read them and
|
|
112
|
+
* send a mutation to the public gateway as the user — an Editor's or an
|
|
113
|
+
* admin's write, from Ask. The heartbeat can keep such a sandbox alive for
|
|
114
|
+
* hours, so a panel that has just turned the flag on must not adopt one: it is
|
|
115
|
+
* released (the superseded selector holds this same predicate) and a
|
|
116
|
+
* dedicated one is provisioned.
|
|
117
|
+
*
|
|
118
|
+
* Only Ask, and only at `proposal-v1`. Callers pass the flow the panel can
|
|
119
|
+
* actually GET (`requestedWriteApproval`): when the page has learned that the
|
|
120
|
+
* dedicated path does not exist, Ask itself comes from `createSandbox`, the
|
|
121
|
+
* wanted flow reads `legacy`, and reuse is exactly as before. A Take-action
|
|
122
|
+
* sandbox is decided by `writeApprovalReuseMatches`; every other mode is
|
|
123
|
+
* unaffected.
|
|
124
|
+
*
|
|
125
|
+
* Pure, and the SAME predicate sits inside the superseded selector's negation,
|
|
126
|
+
* so "superseded" stays the exact complement of "reusable".
|
|
127
|
+
*/
|
|
128
|
+
export declare function askReuseMatchesProvisioning(sandbox: {
|
|
129
|
+
metadata: Record<string, unknown> | null;
|
|
130
|
+
}, mode: AssistantMode, wanted: WriteApprovalMode): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* May a Take-action sandbox with this metadata serve a panel that wants the
|
|
133
|
+
* `wanted` write-approval flow? (BOFF-7803 5a / BOFF-7800 Phase 1.)
|
|
134
|
+
*
|
|
135
|
+
* ★★ A sandbox's flow is fixed in its environment when it is created, so a
|
|
136
|
+
* sandbox running the other flow must never be adopted: a proposal-v1
|
|
137
|
+
* sandbox driven by a legacy panel, or the reverse, is a write gate nobody is
|
|
138
|
+
* operating. The service stamps the flow it actually provisioned at the top
|
|
139
|
+
* level of `metadata` (wspace-sandbox-svc `assistantClientCompatStamps`):
|
|
140
|
+
* - `confirmWrites: true` — the legacy gate. A pre-5a sandbox carries only
|
|
141
|
+
* this, and no `writeApproval`, which reads as `legacy`;
|
|
142
|
+
* - `confirmWrites: 'proposal-v1'` + `writeApproval: 'proposal-v1'` — the
|
|
143
|
+
* proposal flow. The STRING, so a pre-5a panel, which reuses only
|
|
144
|
+
* `=== true`, never adopts one.
|
|
145
|
+
* Both must agree with `wanted`; an absent `confirmWrites` (a pre-gate
|
|
146
|
+
* sandbox) matches nothing, as before.
|
|
147
|
+
*
|
|
148
|
+
* ★★ Except a MEMBER sandbox (`assistantAuth.accessProfile === 'member'`),
|
|
149
|
+
* which is always reusable: it is the only Take-action sandbox a non-admin can
|
|
150
|
+
* be provisioned (proposal-v1, fenced, whatever was requested), so superseding
|
|
151
|
+
* it over the approval flow would only stop it and provision the same thing
|
|
152
|
+
* again against a one-environment quota.
|
|
153
|
+
*
|
|
154
|
+
* Pure, and the SAME predicate sits inside the superseded selector's negation,
|
|
155
|
+
* so "superseded" stays the exact complement of "reusable".
|
|
156
|
+
*/
|
|
157
|
+
export declare function writeApprovalReuseMatches(metadata: Record<string, unknown> | null | undefined, wanted: WriteApprovalMode): boolean;
|
|
48
158
|
/**
|
|
49
159
|
* Does this mode write through the gateway, and therefore need the
|
|
50
160
|
* confirm-before-write gate?
|
|
@@ -65,7 +175,71 @@ export declare function buildAssistantSandboxEnv(product: string, mode: Assistan
|
|
|
65
175
|
name: string;
|
|
66
176
|
value: string;
|
|
67
177
|
}>;
|
|
68
|
-
|
|
178
|
+
/** Did this sandbox come from the dedicated provisioning path, by its stamp? */
|
|
179
|
+
export declare function isDedicatedAssistantSandboxRow(sandbox: {
|
|
180
|
+
metadata: Record<string, unknown> | null;
|
|
181
|
+
}): boolean;
|
|
182
|
+
/** Does this page know `sandboxId` came from the dedicated provisioning path? */
|
|
183
|
+
export declare function isDedicatedAssistantSandbox(sandboxId: string): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Does a panel whose product flag is `writeApproval` provision `mode` through
|
|
186
|
+
* the dedicated path? (BOFF-7800 Phase 1, BOFF-7803 5a.)
|
|
187
|
+
*
|
|
188
|
+
* ★★ Only at exactly `'proposal-v1'`, only for Ask and Take action, and only
|
|
189
|
+
* while this page has not seen the gateway say the path does not exist. A
|
|
190
|
+
* product at `legacy` keeps `createSandbox` for every mode, so it changes in
|
|
191
|
+
* nothing — in particular no non-admin can open Take action, and Ask stays as
|
|
192
|
+
* it was, until the product turns the flag on.
|
|
193
|
+
*/
|
|
194
|
+
export declare function usesDedicatedAssistantProvisioning(mode: AssistantMode, writeApproval: WriteApprovalMode | null | undefined): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Is this the service's "the dedicated provisioning path is closed" refusal
|
|
197
|
+
* (503 `assistant.errors.assistantProvisioningUnavailable`)? The service raises
|
|
198
|
+
* it until it runs the session relay (BOFF-8072), whatever the caller's role.
|
|
199
|
+
* Any `SERVICE_UNAVAILABLE` counts: on this path every one of them is a
|
|
200
|
+
* "not now", and none may be retried another way.
|
|
201
|
+
*
|
|
202
|
+
* ★★ It must never lead to a retry through `createSandbox`: that path hands a
|
|
203
|
+
* session the credentials BOFF-8072 withdraws. It surfaces as the temporary
|
|
204
|
+
* outcome instead (`classifyTurnFailure`), which is what it is.
|
|
205
|
+
*/
|
|
206
|
+
export declare function isAssistantProvisioningUnavailable(error: unknown): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* The `provisionAssistantSandbox` input. Pure and exported so what leaves the
|
|
209
|
+
* browser on this path is checkable without a network.
|
|
210
|
+
*
|
|
211
|
+
* ★★ No containers, command, resources, image pull settings or storage — the
|
|
212
|
+
* service builds the sandbox — and NO token env for any mode: the only env is
|
|
213
|
+
* `AI_ASSISTANT_PRODUCT`, `HOSTNAME` and `WORKSPACE_ID`, the service's own
|
|
214
|
+
* allowlist. A session on this path never holds the user's token (BOFF-8072);
|
|
215
|
+
* the proxy forwards it to the service, which keeps it server-side.
|
|
216
|
+
*
|
|
217
|
+
* ★ `writeApproval` is sent for Take action only. Ask requests nothing about
|
|
218
|
+
* writes (the service gives it the read-only Ask plan whatever is sent), and
|
|
219
|
+
* leaving it out keeps the field at its schema default.
|
|
220
|
+
*/
|
|
221
|
+
export declare function buildProvisionAssistantSandboxInput(product: string, mode: AssistantMode, workspaceId: string, isProd: boolean, ttlSeconds: number, authContext: Pick<AssistantSandboxAuthContext, "organizationId">): Record<string, unknown>;
|
|
222
|
+
/**
|
|
223
|
+
* Create an assistant sandbox, and return its id.
|
|
224
|
+
*
|
|
225
|
+
* ★★ Two paths (BOFF-7800 Phase 1, BOFF-7803 5a), chosen by the product's
|
|
226
|
+
* `writeApproval` flag and nothing else:
|
|
227
|
+
* - `'proposal-v1'`, Ask or Take action → `provisionAssistantSandbox`, gated on
|
|
228
|
+
* `assistant:use` (every workspace role), under the same quota. The service
|
|
229
|
+
* decides the access profile — an admin's Take action can execute, a
|
|
230
|
+
* member's is fenced — so the panel cannot widen it.
|
|
231
|
+
* - The service's missing-field answer (an older supergraph) falls back to
|
|
232
|
+
* `createSandbox`, and the page stops asking.
|
|
233
|
+
* - Every other failure is final. Above all the provisioning-closed 503
|
|
234
|
+
* (`isAssistantProvisioningUnavailable`): a retry through `createSandbox`
|
|
235
|
+
* would hand a non-admin's session the old credential path.
|
|
236
|
+
* - anything else → `createSandbox`, exactly as before.
|
|
237
|
+
*/
|
|
238
|
+
export declare function createAssistantSandbox(product: string, mode: AssistantMode, workspaceId: string, isProd: boolean, ttlSeconds: number, authContext: AssistantSandboxAuthContext,
|
|
239
|
+
/** `writeApproval`: the product's flag (`AssistantProductCapabilities`). */
|
|
240
|
+
options?: {
|
|
241
|
+
writeApproval?: WriteApprovalMode;
|
|
242
|
+
}): Promise<string>;
|
|
69
243
|
/**
|
|
70
244
|
* Wait for RUNNING. Prefers the svc long-poll (waitForSandboxRunning); on an
|
|
71
245
|
* older gateway that field errors → falls back to 2s getSandbox polling. Keeps
|
|
@@ -78,7 +252,30 @@ export declare function waitForAssistantServiceReady(sandboxId: string, workspac
|
|
|
78
252
|
* retry. A caller that REUSES a sandbox learns from it that it joined a boot
|
|
79
253
|
* in progress rather than a service already serving (BOFF-7801).
|
|
80
254
|
*/
|
|
81
|
-
onNotReady?: () => void): Promise<
|
|
255
|
+
onNotReady?: () => void): Promise<Record<string, unknown>>;
|
|
256
|
+
/** `proposal-v1` for exactly that string; anything else is `legacy`. */
|
|
257
|
+
export declare function writeApprovalModeOf(value: unknown): WriteApprovalMode;
|
|
258
|
+
/**
|
|
259
|
+
* `enabled` for exactly that string. An ABSENT value is `enabled` only when
|
|
260
|
+
* the caller says absence means an image that predates 5a
|
|
261
|
+
* (`absentMeansFenced: false`); any other value, and absence otherwise, is
|
|
262
|
+
* `fenced`.
|
|
263
|
+
*/
|
|
264
|
+
export declare function writeExecutionOf(value: unknown, absentMeansFenced: boolean): WriteExecutionState;
|
|
265
|
+
/**
|
|
266
|
+
* What a sandbox's own `/health` body says about writes (BOFF-7803 5a).
|
|
267
|
+
*
|
|
268
|
+
* ★★ Every doubt resolves to the side that runs nothing:
|
|
269
|
+
* - no write capabilities at all (an image that predates 5a) → the legacy
|
|
270
|
+
* flow, unchanged: `{proposals: false, legacy, enabled}`;
|
|
271
|
+
* - a mode other than exactly `proposal-v1` → `legacy`;
|
|
272
|
+
* - a `writeExecution` other than exactly `enabled` → `fenced`, and so is a
|
|
273
|
+
* missing one on an image that does report write capabilities.
|
|
274
|
+
*
|
|
275
|
+
* `replyApproval` is always `off`: in 5a no reply approves, whatever a sandbox
|
|
276
|
+
* reports. Nothing here is a secret; `sessionCredentials` is a path name.
|
|
277
|
+
*/
|
|
278
|
+
export declare function readSandboxWriteCapabilities(health: unknown): SandboxWriteCapabilities;
|
|
82
279
|
export declare function createAssistantSession(sandboxId: string, workspaceId: string, mode: AssistantMode, authContext: AssistantSandboxAuthContext): Promise<{
|
|
83
280
|
sessionId: string;
|
|
84
281
|
}>;
|
|
@@ -114,7 +311,9 @@ export declare function selectSupersededAssistantSandboxes(sandboxes: readonly E
|
|
|
114
311
|
* the two keep identical shapes — which is what makes "superseded is the
|
|
115
312
|
* complement of reusable" checkable by reading them side by side.
|
|
116
313
|
*/
|
|
117
|
-
excludedSandboxIds?: ReadonlySet<string
|
|
314
|
+
excludedSandboxIds?: ReadonlySet<string>,
|
|
315
|
+
/** Same parameter, position and default as the reuse selector's. */
|
|
316
|
+
wantedWriteApproval?: WriteApprovalMode): string[];
|
|
118
317
|
/**
|
|
119
318
|
* Free the workspace's sandbox slot before provisioning a different mode.
|
|
120
319
|
*
|
|
@@ -143,13 +342,52 @@ excludedSandboxIds?: ReadonlySet<string>): string[];
|
|
|
143
342
|
*/
|
|
144
343
|
export declare function releaseSupersededAssistantSandboxes(workspaceId: string, product: string, mode: AssistantMode, isProd: boolean, authContext: AssistantSandboxAuthContext,
|
|
145
344
|
/** Sandboxes proven dead this session — released even if they still match. */
|
|
146
|
-
excludedSandboxIds?: ReadonlySet<string
|
|
345
|
+
excludedSandboxIds?: ReadonlySet<string>,
|
|
346
|
+
/** The product's `writeApproval` flag (`AssistantProductCapabilities`). */
|
|
347
|
+
writeApproval?: WriteApprovalMode): Promise<string[]>;
|
|
147
348
|
/**
|
|
148
349
|
* Terminalize a sandbox whose Cloudflare data plane was reaped while its DB
|
|
149
350
|
* record remained RUNNING. Invoked only for Cloudflare's exact connection-
|
|
150
|
-
* refused signature before provisioning the replacement
|
|
351
|
+
* refused signature before provisioning the replacement — and by
|
|
352
|
+
* `releaseSupersededAssistantSandboxes` for our own superseded sandboxes.
|
|
353
|
+
*
|
|
354
|
+
* ★★ A sandbox from the dedicated path (BOFF-7800 Phase 1) is stopped through
|
|
355
|
+
* the owner-scoped `stopMyAssistantSandbox`: its owner may be a Viewer, who
|
|
356
|
+
* holds no permission `stopSandbox` accepts, and without it the superseded
|
|
357
|
+
* sandbox would hold a one-environment quota until its TTL ran out. It falls
|
|
358
|
+
* back to `stopSandbox` only on the gateway's missing-field answer; any other
|
|
359
|
+
* refusal (NOT_FOUND for a row that is not the caller's) is final.
|
|
360
|
+
*
|
|
361
|
+
* `ownerScoped` routes a sandbox this page does not know as dedicated the same
|
|
362
|
+
* way: the release on the dedicated path passes it for its owner's Ask and
|
|
363
|
+
* Take-action sandboxes from `createSandbox` (`releaseSupersededAssistantSandboxes`).
|
|
364
|
+
*/
|
|
365
|
+
export declare function stopReapedAssistantSandbox(sandboxId: string, workspaceId: string, authContext: AssistantSandboxAuthContext, options?: {
|
|
366
|
+
ownerScoped?: boolean;
|
|
367
|
+
}): Promise<void>;
|
|
368
|
+
/**
|
|
369
|
+
* How the panel's write-reply binder classified a prompt (BOFF-7803 5a,
|
|
370
|
+
* design §5.8): the sandbox's `writeReply`. `proposalId` only on a
|
|
371
|
+
* `proposal_result` continuation.
|
|
372
|
+
*
|
|
373
|
+
* ★★ 5a is a safety floor, not the final security boundary. Nothing in a
|
|
374
|
+
* prompt approves a write: the sandbox supersedes every pending proposal of
|
|
375
|
+
* the session on ANY prompt (the strict sweep), and only the card's button
|
|
376
|
+
* confirms one. The tag only tells the sandbox what the reply was, so a bare
|
|
377
|
+
* "yes" with nothing waiting can be bridged (the model is told to prepare the
|
|
378
|
+
* change it described).
|
|
379
|
+
*/
|
|
380
|
+
export interface AssistantPromptWriteReply {
|
|
381
|
+
kind: WriteReplyKind;
|
|
382
|
+
origin: WriteReplyOrigin;
|
|
383
|
+
proposalId?: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The conversation ids the sandbox's prompt admission accepts
|
|
387
|
+
* (`[A-Za-z0-9_-]{1,128}`). It refuses the WHOLE prompt (400) over anything
|
|
388
|
+
* else, so a conversation id outside this is never sent.
|
|
151
389
|
*/
|
|
152
|
-
export declare
|
|
390
|
+
export declare const PROMPT_CONVERSATION_ID_PATTERN: RegExp;
|
|
153
391
|
/**
|
|
154
392
|
* Assemble the `/sessions/:id/prompt-async` request body. Pure + exported so the
|
|
155
393
|
* backward-compatibility contract is unit-testable without touching the network.
|
|
@@ -157,16 +395,23 @@ export declare function stopReapedAssistantSandbox(sandboxId: string, workspaceI
|
|
|
157
395
|
* The contract, deliberately additive:
|
|
158
396
|
* - `prompt` is ALWAYS present. A bridge that predates multimodal ignores the
|
|
159
397
|
* unknown `parts` key and answers from `prompt` — degradation, not failure.
|
|
160
|
-
* - `parts` appears ONLY when there is at least one. A text-only turn
|
|
161
|
-
* produces a byte-identical body to the
|
|
398
|
+
* - `parts` appears ONLY when there is at least one. A text-only turn with no
|
|
399
|
+
* write fields therefore produces a byte-identical body to the
|
|
400
|
+
* pre-multimodal client.
|
|
162
401
|
* - When a bridge does understand `parts`, `parts` wins and `prompt` is the
|
|
163
402
|
* text-only fallback.
|
|
403
|
+
* - BOFF-7803 5a: `conversationId` (the panel's stable conversation id) when it
|
|
404
|
+
* is one the sandbox accepts — a proposal-v1 sandbox binds the session's
|
|
405
|
+
* proposals to it; any other ignores it — and `writeReply` only when set.
|
|
406
|
+
* A sandbox that predates them ignores both unknown keys.
|
|
164
407
|
*/
|
|
165
408
|
export declare function buildPromptRequestBody(args: {
|
|
166
409
|
mode: AssistantMode;
|
|
167
410
|
prompt: string;
|
|
168
411
|
pageContext: Record<string, unknown> | undefined;
|
|
169
412
|
parts?: AssistantPromptPart[];
|
|
413
|
+
conversationId?: string | null;
|
|
414
|
+
writeReply?: AssistantPromptWriteReply | null;
|
|
170
415
|
}): Record<string, unknown>;
|
|
171
416
|
export interface AssistantPromptGatewayRequest {
|
|
172
417
|
sandboxId: string;
|
|
@@ -177,6 +422,10 @@ export interface AssistantPromptGatewayRequest {
|
|
|
177
422
|
pageContext: Record<string, unknown> | undefined;
|
|
178
423
|
authContext: AssistantSandboxAuthContext;
|
|
179
424
|
parts?: AssistantPromptPart[];
|
|
425
|
+
/** The panel's conversation (BOFF-7803 5a). */
|
|
426
|
+
conversationId?: string | null;
|
|
427
|
+
/** How the binder classified this prompt (BOFF-7803 5a). */
|
|
428
|
+
writeReply?: AssistantPromptWriteReply | null;
|
|
180
429
|
}
|
|
181
430
|
/** The actual unbatched GraphQL body, including context and forwarded-token overhead. */
|
|
182
431
|
export declare function buildPromptGatewayRequest(args: AssistantPromptGatewayRequest): {
|
|
@@ -186,9 +435,14 @@ export declare function buildPromptGatewayRequest(args: AssistantPromptGatewayRe
|
|
|
186
435
|
};
|
|
187
436
|
export declare function promptGatewayRequestBytes(args: AssistantPromptGatewayRequest): number;
|
|
188
437
|
export declare function sendAssistantPromptAsync(sandboxId: string, workspaceId: string, sessionId: string, prompt: string, mode: AssistantMode, pageContext: Record<string, unknown> | undefined, authContext: AssistantSandboxAuthContext,
|
|
189
|
-
/**
|
|
438
|
+
/**
|
|
439
|
+
* Multimodal extras, and the write-lifecycle fields (BOFF-7803 5a). Optional
|
|
440
|
+
* + trailing, so every existing call site is unaffected.
|
|
441
|
+
*/
|
|
190
442
|
options?: {
|
|
191
443
|
parts?: AssistantPromptPart[];
|
|
444
|
+
conversationId?: string | null;
|
|
445
|
+
writeReply?: AssistantPromptWriteReply | null;
|
|
192
446
|
}): Promise<{
|
|
193
447
|
messageID?: string;
|
|
194
448
|
}>;
|
|
@@ -201,6 +455,15 @@ export declare function getAssistantMessages(sandboxId: string, workspaceId: str
|
|
|
201
455
|
* (older backend / preview data plane off) → caller falls back to polling.
|
|
202
456
|
*/
|
|
203
457
|
export declare function getAssistantStreamAccess(sandboxId: string, workspaceId: string, sessionId: string, mode: AssistantMode, authContext: AssistantSandboxAuthContext): Promise<StreamAccess | null>;
|
|
458
|
+
/**
|
|
459
|
+
* Extend a sandbox's TTL — the keep-warm call.
|
|
460
|
+
*
|
|
461
|
+
* ★★ Routed like `stopReapedAssistantSandbox`: a sandbox from the dedicated
|
|
462
|
+
* path through the owner-scoped `extendMyAssistantSandboxTTL` (a Viewer cannot
|
|
463
|
+
* call `extendSandboxTTL`), falling back only on the gateway's missing-field
|
|
464
|
+
* answer. Extending grants the session nothing: it holds no credential, and
|
|
465
|
+
* execution re-checks admin rights live (BOFF-8072).
|
|
466
|
+
*/
|
|
204
467
|
export declare function extendAssistantSandboxTTL(sandboxId: string, workspaceId: string, additionalSeconds: number, authContext: AssistantSandboxAuthContext): Promise<void>;
|
|
205
468
|
export declare function sendHeartbeat(sandboxId: string, workspaceId: string, sessionId: string, mode: AssistantMode, authContext: AssistantSandboxAuthContext): Promise<void>;
|
|
206
469
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyCH,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAEV,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,aAAa,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