@vm0/cli 9.257.4 → 9.257.7
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/{agent-4V4CLDIN.js → agent-YXQUOU7C.js} +7 -7
- package/{banking-2UJC4I74.js → banking-C5NWLVVA.js} +5 -5
- package/{browser-TIR5MOGK.js → browser-7LGGXVJO.js} +5 -5
- package/{chat-WP7EUSSR.js → chat-O5EHB2TF.js} +6 -6
- package/{chunk-MYNPETEA.js → chunk-AQUPIAA7.js} +2 -32
- package/chunk-AQUPIAA7.js.map +1 -0
- package/{chunk-E7S7AGTF.js → chunk-CASIGPF2.js} +2 -2
- package/{chunk-F2XMGDTR.js → chunk-D6C3TNP6.js} +2 -2
- package/{chunk-LDJ7LILZ.js → chunk-GRLWX4AR.js} +2 -2
- package/{chunk-PTICSRB6.js → chunk-JAUFSFAE.js} +3 -3
- package/{chunk-LBYLY3GJ.js → chunk-NA5JAW7H.js} +2 -2
- package/{chunk-BCJJLURK.js → chunk-NMHZWVEF.js} +2 -2
- package/{chunk-RKFBUZKY.js → chunk-OHOH5WKU.js} +13 -189
- package/chunk-OHOH5WKU.js.map +1 -0
- package/{chunk-DZ6X7EWF.js → chunk-Q2N3ZCOV.js} +177 -236
- package/chunk-Q2N3ZCOV.js.map +1 -0
- package/{chunk-SC4JKBAE.js → chunk-TYISYAAL.js} +4 -4
- package/{chunk-XM3D6EBO.js → chunk-UUB2VR64.js} +2 -2
- package/{computer-use-VALSOBK6.js → computer-use-2W3BSM75.js} +5 -5
- package/{connector-OMZN7OVG.js → connector-EIVVZOPZ.js} +8 -8
- package/{credit-FFMCA6R3.js → credit-ULOLIWR4.js} +7 -7
- package/{developer-support-RJSAXMDD.js → developer-support-UIVRQ4S7.js} +5 -5
- package/{doctor-WZDNYOCH.js → doctor-K2R7NGVK.js} +7 -7
- package/{feishu-7Q6ZFJME.js → feishu-V4NQFBEK.js} +5 -5
- package/{finance-Y73HXGBZ.js → finance-BKHFXBSH.js} +5 -5
- package/{generate-V4PH636L.js → generate-QZSVDZRL.js} +7 -7
- package/{github-A54L525U.js → github-ZBZKPRFU.js} +5 -5
- package/{goal-KEIAMTSK.js → goal-BYFWFG6O.js} +5 -5
- package/{host-PMFY3I2F.js → host-4UIERLVF.js} +5 -5
- package/{logs-JRBGJBWO.js → logs-SRVVVA54.js} +6 -6
- package/{mail-6YJE3PGU.js → mail-FEJW7CF3.js} +7 -7
- package/{maps-MGZM24QH.js → maps-2FLGK7EK.js} +5 -5
- package/{model-ZOJQIIJ2.js → model-IVBJMVQU.js} +6 -6
- package/{model-provider-UOOD5E2B.js → model-provider-DG3NIAYX.js} +6 -6
- package/{org-ISHLXSMK.js → org-AKFC7UBB.js} +5 -5
- package/package.json +1 -1
- package/{people-search-DBAI34Z6.js → people-search-D2GF4CZ6.js} +5 -5
- package/{phone-6GAFXHJQ.js → phone-O265VKNY.js} +5 -5
- package/{preference-LMID6XS3.js → preference-ICXPILMK.js} +5 -5
- package/{resource-4L2L7XQT.js → resource-GE2U65Y7.js} +5 -5
- package/{scrape-MZMGRMEF.js → scrape-4I7HMW4X.js} +5 -5
- package/{search-WQYJCMIN.js → search-QLSKPNOY.js} +6 -6
- package/{secret-EVD2VFZR.js → secret-KMWSRHEX.js} +5 -5
- package/{slack-MYAD5L6N.js → slack-IR7TNQAH.js} +5 -5
- package/{teams-CPF466NB.js → teams-PV7HHDPJ.js} +5 -5
- package/{telegram-SAR65NYS.js → telegram-FTBVR77D.js} +5 -5
- package/{upgrade-S5GOC5Z2.js → upgrade-SAO2KSP5.js} +4 -4
- package/{variable-APVWOPFN.js → variable-HQILIQB6.js} +5 -5
- package/{video-LD3RAIPZ.js → video-ILMG52MD.js} +4 -4
- package/{weather-XWQETXYA.js → weather-V52OUZ37.js} +5 -5
- package/{web-FIQJVOGX.js → web-54MODELQ.js} +5 -5
- package/{web-search-FGBODU3W.js → web-search-LNSN334H.js} +5 -5
- package/{whoami-CUX6DXPR.js → whoami-MPTY26OA.js} +7 -7
- package/{workflow-3ABZGFOO.js → workflow-HK7J4D4K.js} +5 -5
- package/zero.js +43 -43
- package/chunk-DZ6X7EWF.js.map +0 -1
- package/chunk-MYNPETEA.js.map +0 -1
- package/chunk-RKFBUZKY.js.map +0 -1
- /package/{agent-4V4CLDIN.js.map → agent-YXQUOU7C.js.map} +0 -0
- /package/{banking-2UJC4I74.js.map → banking-C5NWLVVA.js.map} +0 -0
- /package/{browser-TIR5MOGK.js.map → browser-7LGGXVJO.js.map} +0 -0
- /package/{chat-WP7EUSSR.js.map → chat-O5EHB2TF.js.map} +0 -0
- /package/{chunk-E7S7AGTF.js.map → chunk-CASIGPF2.js.map} +0 -0
- /package/{chunk-F2XMGDTR.js.map → chunk-D6C3TNP6.js.map} +0 -0
- /package/{chunk-LDJ7LILZ.js.map → chunk-GRLWX4AR.js.map} +0 -0
- /package/{chunk-PTICSRB6.js.map → chunk-JAUFSFAE.js.map} +0 -0
- /package/{chunk-LBYLY3GJ.js.map → chunk-NA5JAW7H.js.map} +0 -0
- /package/{chunk-BCJJLURK.js.map → chunk-NMHZWVEF.js.map} +0 -0
- /package/{chunk-SC4JKBAE.js.map → chunk-TYISYAAL.js.map} +0 -0
- /package/{chunk-XM3D6EBO.js.map → chunk-UUB2VR64.js.map} +0 -0
- /package/{computer-use-VALSOBK6.js.map → computer-use-2W3BSM75.js.map} +0 -0
- /package/{connector-OMZN7OVG.js.map → connector-EIVVZOPZ.js.map} +0 -0
- /package/{credit-FFMCA6R3.js.map → credit-ULOLIWR4.js.map} +0 -0
- /package/{developer-support-RJSAXMDD.js.map → developer-support-UIVRQ4S7.js.map} +0 -0
- /package/{doctor-WZDNYOCH.js.map → doctor-K2R7NGVK.js.map} +0 -0
- /package/{feishu-7Q6ZFJME.js.map → feishu-V4NQFBEK.js.map} +0 -0
- /package/{finance-Y73HXGBZ.js.map → finance-BKHFXBSH.js.map} +0 -0
- /package/{generate-V4PH636L.js.map → generate-QZSVDZRL.js.map} +0 -0
- /package/{github-A54L525U.js.map → github-ZBZKPRFU.js.map} +0 -0
- /package/{goal-KEIAMTSK.js.map → goal-BYFWFG6O.js.map} +0 -0
- /package/{host-PMFY3I2F.js.map → host-4UIERLVF.js.map} +0 -0
- /package/{logs-JRBGJBWO.js.map → logs-SRVVVA54.js.map} +0 -0
- /package/{mail-6YJE3PGU.js.map → mail-FEJW7CF3.js.map} +0 -0
- /package/{maps-MGZM24QH.js.map → maps-2FLGK7EK.js.map} +0 -0
- /package/{model-ZOJQIIJ2.js.map → model-IVBJMVQU.js.map} +0 -0
- /package/{model-provider-UOOD5E2B.js.map → model-provider-DG3NIAYX.js.map} +0 -0
- /package/{org-ISHLXSMK.js.map → org-AKFC7UBB.js.map} +0 -0
- /package/{people-search-DBAI34Z6.js.map → people-search-D2GF4CZ6.js.map} +0 -0
- /package/{phone-6GAFXHJQ.js.map → phone-O265VKNY.js.map} +0 -0
- /package/{preference-LMID6XS3.js.map → preference-ICXPILMK.js.map} +0 -0
- /package/{resource-4L2L7XQT.js.map → resource-GE2U65Y7.js.map} +0 -0
- /package/{scrape-MZMGRMEF.js.map → scrape-4I7HMW4X.js.map} +0 -0
- /package/{search-WQYJCMIN.js.map → search-QLSKPNOY.js.map} +0 -0
- /package/{secret-EVD2VFZR.js.map → secret-KMWSRHEX.js.map} +0 -0
- /package/{slack-MYAD5L6N.js.map → slack-IR7TNQAH.js.map} +0 -0
- /package/{teams-CPF466NB.js.map → teams-PV7HHDPJ.js.map} +0 -0
- /package/{telegram-SAR65NYS.js.map → telegram-FTBVR77D.js.map} +0 -0
- /package/{upgrade-S5GOC5Z2.js.map → upgrade-SAO2KSP5.js.map} +0 -0
- /package/{variable-APVWOPFN.js.map → variable-HQILIQB6.js.map} +0 -0
- /package/{video-LD3RAIPZ.js.map → video-ILMG52MD.js.map} +0 -0
- /package/{weather-XWQETXYA.js.map → weather-V52OUZ37.js.map} +0 -0
- /package/{web-FIQJVOGX.js.map → web-54MODELQ.js.map} +0 -0
- /package/{web-search-FGBODU3W.js.map → web-search-LNSN334H.js.map} +0 -0
- /package/{whoami-CUX6DXPR.js.map → whoami-MPTY26OA.js.map} +0 -0
- /package/{workflow-3ABZGFOO.js.map → workflow-HK7J4D4K.js.map} +0 -0
|
@@ -4,14 +4,14 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
loadConnectorPermissionInfos,
|
|
6
6
|
policyIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TYISYAAL.js";
|
|
8
8
|
import {
|
|
9
9
|
isInteractive,
|
|
10
10
|
promptConfirm
|
|
11
11
|
} from "./chunk-X2545RBX.js";
|
|
12
12
|
import {
|
|
13
13
|
permissionGrantsToFirewallPolicies
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GRLWX4AR.js";
|
|
15
15
|
import {
|
|
16
16
|
createZeroAgent,
|
|
17
17
|
deleteZeroAgent,
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
listZeroUserPermissionGrants,
|
|
24
24
|
updateZeroAgent,
|
|
25
25
|
updateZeroAgentInstructions
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-OHOH5WKU.js";
|
|
27
|
+
import "./chunk-D6C3TNP6.js";
|
|
28
28
|
import "./chunk-SB7EZ2ZO.js";
|
|
29
29
|
import {
|
|
30
30
|
source_default,
|
|
31
31
|
withErrorHandler
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-JAUFSFAE.js";
|
|
33
|
+
import "./chunk-AQUPIAA7.js";
|
|
34
34
|
import {
|
|
35
35
|
Command
|
|
36
36
|
} from "./chunk-LD4ZVU4O.js";
|
|
@@ -594,4 +594,4 @@ Notes:
|
|
|
594
594
|
export {
|
|
595
595
|
zeroAgentCommand
|
|
596
596
|
};
|
|
597
|
-
//# sourceMappingURL=agent-
|
|
597
|
+
//# sourceMappingURL=agent-YXQUOU7C.js.map
|
|
@@ -3,14 +3,14 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
callZeroBanking
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OHOH5WKU.js";
|
|
7
|
+
import "./chunk-D6C3TNP6.js";
|
|
8
8
|
import "./chunk-SB7EZ2ZO.js";
|
|
9
9
|
import {
|
|
10
10
|
source_default,
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-JAUFSFAE.js";
|
|
13
|
+
import "./chunk-AQUPIAA7.js";
|
|
14
14
|
import {
|
|
15
15
|
Command,
|
|
16
16
|
InvalidArgumentError
|
|
@@ -114,4 +114,4 @@ Notes:
|
|
|
114
114
|
export {
|
|
115
115
|
zeroBankingCommand
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=banking-
|
|
117
|
+
//# sourceMappingURL=banking-C5NWLVVA.js.map
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
leaseZeroBrowser,
|
|
11
11
|
useZeroBrowser,
|
|
12
12
|
zeroBrowserCreateRequestSchema
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-OHOH5WKU.js";
|
|
14
|
+
import "./chunk-D6C3TNP6.js";
|
|
15
15
|
import "./chunk-SB7EZ2ZO.js";
|
|
16
16
|
import {
|
|
17
17
|
source_default,
|
|
18
18
|
withErrorHandler
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-JAUFSFAE.js";
|
|
20
|
+
import "./chunk-AQUPIAA7.js";
|
|
21
21
|
import {
|
|
22
22
|
Command,
|
|
23
23
|
InvalidArgumentError,
|
|
@@ -209,4 +209,4 @@ Notes:
|
|
|
209
209
|
export {
|
|
210
210
|
zeroBrowserCommand
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=browser-
|
|
212
|
+
//# sourceMappingURL=browser-7LGGXVJO.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-B6ELBBRJ.js";
|
|
9
9
|
import {
|
|
10
10
|
formatModelProviderRoute
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NA5JAW7H.js";
|
|
12
12
|
import {
|
|
13
13
|
chatThreadEventSchema,
|
|
14
14
|
chatThreadSnapshotProjectionSchema,
|
|
@@ -18,17 +18,17 @@ import {
|
|
|
18
18
|
listZeroModelPolicies,
|
|
19
19
|
renameZeroChatThread,
|
|
20
20
|
updateZeroChatThreadModelSelection
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-OHOH5WKU.js";
|
|
22
|
+
import "./chunk-D6C3TNP6.js";
|
|
23
23
|
import "./chunk-SB7EZ2ZO.js";
|
|
24
24
|
import {
|
|
25
25
|
getApiUrl,
|
|
26
26
|
source_default,
|
|
27
27
|
withErrorHandler
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JAUFSFAE.js";
|
|
29
29
|
import {
|
|
30
30
|
decodeZeroTokenPayload
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-AQUPIAA7.js";
|
|
32
32
|
import {
|
|
33
33
|
Command
|
|
34
34
|
} from "./chunk-LD4ZVU4O.js";
|
|
@@ -619,4 +619,4 @@ Examples:
|
|
|
619
619
|
export {
|
|
620
620
|
zeroChatCommand
|
|
621
621
|
};
|
|
622
|
-
//# sourceMappingURL=chat-
|
|
622
|
+
//# sourceMappingURL=chat-O5EHB2TF.js.map
|
|
@@ -39,7 +39,7 @@ var FEATURE_SWITCHES = {
|
|
|
39
39
|
["externalConnectorCatalog" /* ExternalConnectorCatalog */]: {
|
|
40
40
|
maintainer: "liangyou@vm0.ai",
|
|
41
41
|
description: "Use the accepted external catalog as the global source for official connectors",
|
|
42
|
-
enabled:
|
|
42
|
+
enabled: true,
|
|
43
43
|
userOverridable: false
|
|
44
44
|
},
|
|
45
45
|
["ahrefsConnector" /* AhrefsConnector */]: {
|
|
@@ -218,24 +218,6 @@ var FEATURE_SWITCHES = {
|
|
|
218
218
|
description: "Reveal activity debug surfaces, activity log navigation, appended system prompts, and Debug preferences",
|
|
219
219
|
enabled: false
|
|
220
220
|
},
|
|
221
|
-
["canonicalSlackIngress" /* CanonicalSlackIngress */]: {
|
|
222
|
-
maintainer: "lancy@vm0.ai",
|
|
223
|
-
description: "Route newly admitted per-user Slack threads through canonical chat ingress.",
|
|
224
|
-
enabled: false,
|
|
225
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
226
|
-
},
|
|
227
|
-
["canonicalSlackWebVisibility" /* CanonicalSlackWebVisibility */]: {
|
|
228
|
-
maintainer: "lancy@vm0.ai",
|
|
229
|
-
description: "Show canonical Slack chat threads in Web chat surfaces for enrolled users.",
|
|
230
|
-
enabled: false,
|
|
231
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
232
|
-
},
|
|
233
|
-
["canonicalSlackAssets" /* CanonicalSlackAssets */]: {
|
|
234
|
-
maintainer: "lancy@vm0.ai",
|
|
235
|
-
description: "Canonicalize direct Slack inputs and run-scoped Slack file publications.",
|
|
236
|
-
enabled: false,
|
|
237
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
238
|
-
},
|
|
239
221
|
["zeroWeather" /* ZeroWeather */]: {
|
|
240
222
|
maintainer: "ethan@vm0.ai",
|
|
241
223
|
description: "Enable the managed Google-backed Zero Weather and Air Quality APIs and weather:read ZERO_TOKEN capability.",
|
|
@@ -350,12 +332,6 @@ var FEATURE_SWITCHES = {
|
|
|
350
332
|
description: "Enable the Zapier connector. When disabled, Zapier is hidden from the connectors list and cannot be connected.",
|
|
351
333
|
enabled: false
|
|
352
334
|
},
|
|
353
|
-
["htmlArtifactCommentEditing" /* HtmlArtifactCommentEditing */]: {
|
|
354
|
-
maintainer: "bingjie@vm0.ai",
|
|
355
|
-
description: "Enable the HTML artifact comment-editing workflow for collecting DOM comments and preparing instrumented working-copy edits.",
|
|
356
|
-
enabled: false,
|
|
357
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
358
|
-
},
|
|
359
335
|
["computerUseDesktopPlugins" /* ComputerUseDesktopPlugins */]: {
|
|
360
336
|
maintainer: "lancy@vm0.ai",
|
|
361
337
|
description: "Enable Zero Desktop Computer Use plugins for local resources, starting with the bundled filesystem plugin gateway.",
|
|
@@ -412,12 +388,6 @@ var FEATURE_SWITCHES = {
|
|
|
412
388
|
enabled: false,
|
|
413
389
|
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
414
390
|
},
|
|
415
|
-
["presentationExport" /* PresentationExport */]: {
|
|
416
|
-
maintainer: "bingjie@vm0.ai",
|
|
417
|
-
description: "Enable downloading presentation artifacts as PPTX files and uploading them as native, editable Google Slides decks.",
|
|
418
|
-
enabled: false,
|
|
419
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
420
|
-
},
|
|
421
391
|
["artifacts" /* Artifacts */]: {
|
|
422
392
|
maintainer: "bingjie@vm0.ai",
|
|
423
393
|
description: "Show the Artifacts manage page for generated artifacts in the current organization.",
|
|
@@ -530,4 +500,4 @@ export {
|
|
|
530
500
|
isFeatureEnabled,
|
|
531
501
|
decodeZeroTokenPayload
|
|
532
502
|
};
|
|
533
|
-
//# sourceMappingURL=chunk-
|
|
503
|
+
//# sourceMappingURL=chunk-AQUPIAA7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/connectors/src/feature-switch-key.ts","../../../packages/core/src/feature-switch.ts","../../../packages/core/src/feature-switch-key.ts","../../../packages/core/src/identity-hash.ts","../src/lib/api/zero-token.ts"],"sourcesContent":["/**\n * Feature switch keys\n *\n * Defines all available feature switch identifiers.\n */\nexport enum FeatureSwitchKey {\n Dummy = \"dummy\",\n ExternalConnectorCatalog = \"externalConnectorCatalog\",\n AhrefsConnector = \"ahrefsConnector\",\n BillConnector = \"billConnector\",\n BentomlConnector = \"bentomlConnector\",\n BoxConnector = \"boxConnector\",\n CanvaConnector = \"canvaConnector\",\n CalComConnector = \"calComConnector\",\n CopperConnector = \"copperConnector\",\n DatadogConnector = \"datadogConnector\",\n DeelConnector = \"deelConnector\",\n DocuSignConnector = \"docusignConnector\",\n DropboxConnector = \"dropboxConnector\",\n FigmaConnector = \"figmaConnector\",\n ExpensifyConnector = \"expensifyConnector\",\n GoogleContactsConnector = \"googleContactsConnector\",\n GoogleFormsConnector = \"googleFormsConnector\",\n MercuryConnector = \"mercuryConnector\",\n NeonConnector = \"neonConnector\",\n NetSuiteConnector = \"netSuiteConnector\",\n GarminConnectConnector = \"garminConnectConnector\",\n QuickBooksConnector = \"quickbooksConnector\",\n RedditConnector = \"redditConnector\",\n SupabaseConnector = \"supabaseConnector\",\n WebflowConnector = \"webflowConnector\",\n CloseConnector = \"closeConnector\",\n MetaAdsConnector = \"metaAdsConnector\",\n TikTokAdsConnector = \"tiktokAdsConnector\",\n AwsConnector = \"awsConnector\",\n PosthogConnector = \"posthogConnector\",\n PayPalConnector = \"payPalConnector\",\n RampConnector = \"rampConnector\",\n MailchimpConnector = \"mailchimpConnector\",\n ResendConnector = \"resendConnector\",\n PexelsConnector = \"pexelsConnector\",\n SpotifyConnector = \"spotifyConnector\",\n ZeroDebug = \"zeroDebug\",\n ZeroWeather = \"zeroWeather\",\n ZeroFinance = \"zeroFinance\",\n ZeroPeopleSearch = \"zeroPeopleSearch\",\n ZeroBrowser = \"zeroBrowser\",\n Banking = \"banking\",\n Lab = \"lab\",\n NotionWorkflowAutomations = \"notionWorkflowAutomations\",\n GithubWebhookAutomations = \"githubWebhookAutomations\",\n GithubWorkflowRunAutomations = \"githubWorkflowRunAutomations\",\n MorningBrief = \"morningBrief\",\n ManualMorningBrief = \"manualMorningBrief\",\n TestOauthConnector = \"testOauthConnector\",\n FreshdeskConnector = \"freshdeskConnector\",\n StabilityAiConnector = \"stabilityAiConnector\",\n ZoomConnector = \"zoomConnector\",\n WorkdayConnector = \"workdayConnector\",\n CodexFastMode = \"codexFastMode\",\n RealAgentInPreview = \"realAgentInPreview\",\n ComposerUploadPopover = \"composerUploadPopover\",\n StructuredPrompt = \"structuredPrompt\",\n\n ZapierConnector = \"zapierConnector\",\n ComputerUseDesktopPlugins = \"computerUseDesktopPlugins\",\n AgentUnreadIndicators = \"agentUnreadIndicators\",\n ChatThreadUnifiedSearch = \"chatThreadUnifiedSearch\",\n ComposerChatThreadSuggestions = \"composerChatThreadSuggestions\",\n SidebarSubscriptionUsage = \"sidebarSubscriptionUsage\",\n TeamsIntegration = \"teamsIntegration\",\n FeishuIntegration = \"feishuIntegration\",\n Artifacts = \"artifacts\",\n HostedArtifactVersions = \"hostedArtifactVersions\",\n VideoArtifactPosters = \"videoArtifactPosters\",\n WebsiteTemplateV2 = \"websiteTemplateV2\",\n PlanUpgradeGuidance = \"planUpgradeGuidance\",\n OrgPlanEntitlementReads = \"orgPlanEntitlementReads\",\n WorkflowConnectorReadiness = \"workflowConnectorReadiness\",\n ZeroMail = \"zeroMail\",\n ComposerConnectorPermissions = \"composerConnectorPermissions\",\n ThreeColumnNav = \"threeColumnNav\",\n ChatHistoryBackfillProgress = \"chatHistoryBackfillProgress\",\n}\n","/**\n * Feature switch system\n *\n * Provides centralized feature flag management with user-identity based overrides.\n * User IDs are stored as FNV-1a hashes to avoid exposing plain-text identifiers in source code.\n *\n * NOT AN AUTHORIZATION BOUNDARY. User-overridable switches can be self-enabled\n * through `POST /api/zero/feature-switches`, and `userOverridable: false` only\n * excludes a switch from that API. For money-granting, credential, or\n * privilege-escalation endpoints, gate with a hard identity check (e.g.\n * `isStaffOrg()` from `./staff-org`) instead of this system.\n */\n\nimport { FeatureSwitchKey } from \"./feature-switch-key\";\nimport { STAFF_ORG_ID_HASHES, fnv1a } from \"./identity-hash\";\n\nexport interface FeatureSwitch {\n readonly maintainer: string;\n readonly description?: string;\n readonly enabled: boolean;\n readonly enabledUserHashes?: readonly string[];\n readonly enabledEmailHashes?: readonly string[];\n readonly enabledOrgIdHashes?: readonly string[];\n readonly userOverridable?: boolean;\n}\n\nexport interface FeatureSwitchMetadata {\n readonly maintainer: string;\n readonly description?: string;\n readonly userOverridable: boolean;\n}\n\nexport interface FeatureSwitchContext {\n readonly userId?: string;\n readonly email?: string;\n readonly orgId?: string;\n readonly overrides?: Partial<Record<FeatureSwitchKey, boolean>>;\n}\n\n/**\n * Registry of all feature switches\n */\nconst FEATURE_SWITCHES: Record<FeatureSwitchKey, FeatureSwitch> = {\n [FeatureSwitchKey.Dummy]: {\n maintainer: \"ethan@vm0.ai\",\n description: \"Test-only feature switch for flag system validation\",\n enabled: true,\n },\n [FeatureSwitchKey.ExternalConnectorCatalog]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Use the accepted external catalog as the global source for official connectors\",\n enabled: true,\n userOverridable: false,\n },\n [FeatureSwitchKey.AhrefsConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Ahrefs SEO connector\",\n enabled: false,\n },\n [FeatureSwitchKey.BillConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the BILL Spend & Expense connector\",\n enabled: false,\n },\n [FeatureSwitchKey.BentomlConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the BentoML model serving connector\",\n enabled: false,\n },\n [FeatureSwitchKey.BoxConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Box file storage connector\",\n enabled: false,\n },\n [FeatureSwitchKey.CanvaConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Canva design connector\",\n enabled: false,\n },\n [FeatureSwitchKey.CalComConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Cal.com scheduling connector\",\n enabled: false,\n },\n [FeatureSwitchKey.CopperConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Copper CRM connector\",\n enabled: false,\n },\n [FeatureSwitchKey.DatadogConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Datadog observability connector\",\n enabled: false,\n },\n [FeatureSwitchKey.DeelConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Deel HR connector\",\n enabled: false,\n },\n [FeatureSwitchKey.DocuSignConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the DocuSign e-signature connector\",\n enabled: false,\n },\n [FeatureSwitchKey.DropboxConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Dropbox file storage connector\",\n enabled: false,\n },\n [FeatureSwitchKey.FigmaConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Figma design connector\",\n enabled: false,\n },\n [FeatureSwitchKey.ExpensifyConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Expensify accounting connector\",\n enabled: false,\n },\n [FeatureSwitchKey.GoogleContactsConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Google Contacts connector\",\n enabled: false,\n },\n [FeatureSwitchKey.GoogleFormsConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Google Forms connector\",\n enabled: false,\n },\n [FeatureSwitchKey.MercuryConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Mercury banking connector\",\n enabled: false,\n },\n [FeatureSwitchKey.NeonConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Neon serverless Postgres connector\",\n enabled: false,\n },\n [FeatureSwitchKey.NetSuiteConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Oracle NetSuite ERP connector\",\n enabled: false,\n },\n [FeatureSwitchKey.GarminConnectConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Garmin Connect wellness connector\",\n enabled: false,\n },\n [FeatureSwitchKey.QuickBooksConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the QuickBooks accounting connector\",\n enabled: false,\n },\n [FeatureSwitchKey.RedditConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Reddit connector integration\",\n enabled: false,\n },\n [FeatureSwitchKey.SupabaseConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Supabase database connector integration\",\n enabled: false,\n },\n [FeatureSwitchKey.CloseConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Close CRM connector\",\n enabled: false,\n },\n [FeatureSwitchKey.WebflowConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Webflow site management connector\",\n enabled: false,\n },\n [FeatureSwitchKey.MetaAdsConnector]: {\n maintainer: \"ethan@vm0.ai\",\n description: \"Enable the Meta Ads Manager connector\",\n enabled: false,\n },\n [FeatureSwitchKey.TikTokAdsConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the TikTok Ads Manager connector\",\n enabled: false,\n },\n [FeatureSwitchKey.AwsConnector]: {\n maintainer: \"liangyou@vm0.ai\",\n description: \"Enable the temporary AWS remote login connector\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.PosthogConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the PostHog analytics connector\",\n enabled: false,\n },\n [FeatureSwitchKey.PayPalConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the PayPal payments connector\",\n enabled: false,\n },\n [FeatureSwitchKey.RampConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Ramp spend management connector\",\n enabled: false,\n },\n [FeatureSwitchKey.MailchimpConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Mailchimp email marketing connector\",\n enabled: false,\n },\n [FeatureSwitchKey.ResendConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Resend email service connector\",\n enabled: false,\n },\n [FeatureSwitchKey.PexelsConnector]: {\n maintainer: \"bingjie@vm0.ai\",\n description: \"Enable the Pexels stock photo and video connector\",\n enabled: false,\n },\n [FeatureSwitchKey.SpotifyConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Spotify connector integration\",\n enabled: false,\n },\n [FeatureSwitchKey.ZeroDebug]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Reveal activity debug surfaces, activity log navigation, appended system prompts, and Debug preferences\",\n enabled: false,\n },\n [FeatureSwitchKey.ZeroWeather]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable the managed Google-backed Zero Weather and Air Quality APIs and weather:read ZERO_TOKEN capability.\",\n enabled: true,\n },\n [FeatureSwitchKey.ZeroFinance]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable the managed APIDojo-backed Zero Finance API and finance:read ZERO_TOKEN capability.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ZeroPeopleSearch]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Enable managed Perplexity People Search and the people-search:read ZERO_TOKEN capability.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.Banking]: {\n maintainer: \"linghan@vm0.ai\",\n description:\n \"Enable the managed Zero Banking gateway and banking:read ZERO_TOKEN capability for Finicity-backed accounts, balances, and transactions.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.Lab]: {\n maintainer: \"ethan@vm0.ai\",\n description: \"Show the Lab page for toggling experimental features\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.MorningBrief]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable the daily 7:00 local-time Morning Brief email built from GitHub, Gmail, and Google Calendar.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: true,\n },\n [FeatureSwitchKey.ManualMorningBrief]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show a Send now button in Settings that triggers a Morning Brief immediately for testing.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: true,\n },\n [FeatureSwitchKey.NotionWorkflowAutomations]: {\n maintainer: \"lancy@vm0.ai\",\n description:\n \"Enable Notion event workflow automations, starting with child pages created under a configured parent page.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.GithubWorkflowRunAutomations]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable GitHub Actions workflow run completed event automations.\",\n enabled: true,\n },\n [FeatureSwitchKey.GithubWebhookAutomations]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show creation entry points for GitHub workflow job, pull request review, deployment status, and issue comment automations.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: false,\n },\n [FeatureSwitchKey.TestOauthConnector]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Enable the test-oauth connector, a synthetic OAuth 2.0 provider used only for automated tests. Off in prod.\",\n enabled: false,\n },\n [FeatureSwitchKey.FreshdeskConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Freshdesk helpdesk connector\",\n enabled: false,\n },\n [FeatureSwitchKey.StabilityAiConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Stability AI image generation connector\",\n enabled: false,\n },\n [FeatureSwitchKey.ZoomConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Enable the Zoom connector (OAuth 2.0) for meetings, past participants, and cloud recordings access\",\n enabled: false,\n },\n [FeatureSwitchKey.WorkdayConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Workday HCM and finance connector\",\n enabled: false,\n },\n\n [FeatureSwitchKey.CodexFastMode]: {\n maintainer: \"lancy@vm0.ai\",\n description:\n \"Enable Codex fast mode for ChatGPT subscription GPT 5.5 and GPT 5.6 web chat runs.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.RealAgentInPreview]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Send preview chat runs through real agent CLIs instead of preview mock runners.\",\n enabled: false,\n },\n [FeatureSwitchKey.ComposerUploadPopover]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Use the Upload popover in the chat composer instead of the legacy paperclip attachment button.\",\n enabled: false,\n userOverridable: false,\n },\n [FeatureSwitchKey.StructuredPrompt]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Enable structured user prompt rendering, sends, and drafts while preserving the legacy content fallback.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ZapierConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Enable the Zapier connector. When disabled, Zapier is hidden from the connectors list and cannot be connected.\",\n enabled: false,\n },\n [FeatureSwitchKey.ComputerUseDesktopPlugins]: {\n maintainer: \"lancy@vm0.ai\",\n description:\n \"Enable Zero Desktop Computer Use plugins for local resources, starting with the bundled filesystem plugin gateway.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.AgentUnreadIndicators]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show chat unread indicators in sidebar pinned agent lists and the conversation picker.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ChatThreadUnifiedSearch]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show chat thread title results from the local event-driven thread cache in the command-shift-a conversation picker.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ComposerChatThreadSuggestions]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Suggest titled chat threads from the current agent when typing @ in the chat composer.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ChatHistoryBackfillProgress]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Progress bar under the chat thread header showing history backfill progress while older messages load.\",\n // Not rolled out to anyone yet; enable per-user via the Lab page.\n enabled: false,\n },\n [FeatureSwitchKey.ThreeColumnNav]: {\n maintainer: \"ming@vm0.ai\",\n description:\n \"Slack-style three-column navigation: a labeled icon rail, a pinned-agents and chat-threads list column, and the conversation pane.\",\n enabled: false,\n // Ming only for the first pass; widen to staff once it settles.\n enabledEmailHashes: [\"54757055\"], // fnv1a(\"ming@vm0.ai\")\n },\n [FeatureSwitchKey.SidebarSubscriptionUsage]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show Codex and Claude Code personal subscription usage in the Zero sidebar footer.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.TeamsIntegration]: {\n maintainer: \"linghan@vm0.ai\",\n description:\n \"Show standalone Microsoft Teams integration settings, connect flows, and Works page entry points.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.FeishuIntegration]: {\n maintainer: \"linghan@vm0.ai\",\n description:\n \"Show the Feishu direct-message integration and Works page entry point.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.Artifacts]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Show the Artifacts manage page for generated artifacts in the current organization.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.HostedArtifactVersions]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Create immutable hosted artifact versions behind stable site aliases.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.VideoArtifactPosters]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Generate poster images asynchronously when video artifacts are recorded.\",\n enabled: false,\n enabledUserHashes: [\"032a75d8\"],\n },\n [FeatureSwitchKey.WebsiteTemplateV2]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Generate websites from refreshed self-contained template packages. When off, website generation uses the existing package versions.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.PlanUpgradeGuidance]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Show plan-upgrade guidance in Zero CLI help and render billing plan links as rich chat cards.\",\n enabled: true,\n userOverridable: false,\n },\n [FeatureSwitchKey.OrgPlanEntitlementReads]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Read runtime plan capability limits from org_plan_entitlements instead of deriving them from org_metadata.tier.\",\n enabled: true,\n userOverridable: false,\n },\n [FeatureSwitchKey.WorkflowConnectorReadiness]: {\n maintainer: \"lancy@vm0.ai\",\n description:\n \"Show the manual connector readiness check on workflow settings pages.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: false,\n },\n [FeatureSwitchKey.ZeroMail]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable persistent Gmail and Outlook draft cards created through the Zero Mail CLI.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ZeroBrowser]: {\n maintainer: \"liangyou@vm0.ai\",\n description: \"Show the Zero Browser command in the Zero CLI.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ComposerConnectorPermissions]: {\n maintainer: \"ming@vm0.ai\",\n description:\n \"Show the configure-permissions entry in the chat composer connector popover, opening the agent×connector firewall dialog inline.\",\n enabled: false,\n userOverridable: true,\n },\n};\n\ninterface ResolvedHashes {\n readonly userHash?: string;\n readonly emailHash?: string;\n readonly orgIdHash?: string;\n}\n\nfunction evaluateSwitch(fs: FeatureSwitch, hashes: ResolvedHashes): boolean {\n if (fs.enabled) return true;\n if (hashes.userHash && fs.enabledUserHashes?.includes(hashes.userHash))\n return true;\n if (hashes.emailHash && fs.enabledEmailHashes?.includes(hashes.emailHash))\n return true;\n if (hashes.orgIdHash && fs.enabledOrgIdHashes?.includes(hashes.orgIdHash))\n return true;\n return false;\n}\n\n/**\n * Evaluate all feature switches at once for the given context.\n *\n * Computes identity hashes once and checks all switches synchronously.\n */\nexport function getAllFeatureStates(\n ctx?: FeatureSwitchContext,\n): Record<FeatureSwitchKey, boolean> {\n const switches = Object.values(FEATURE_SWITCHES);\n const hashes: ResolvedHashes = {\n userHash:\n ctx?.userId &&\n switches.some((s) => {\n return s.enabledUserHashes?.length;\n })\n ? fnv1a(ctx.userId)\n : undefined,\n emailHash:\n ctx?.email &&\n switches.some((s) => {\n return s.enabledEmailHashes?.length;\n })\n ? fnv1a(ctx.email.toLowerCase())\n : undefined,\n orgIdHash:\n ctx?.orgId &&\n switches.some((s) => {\n return s.enabledOrgIdHashes?.length;\n })\n ? fnv1a(ctx.orgId)\n : undefined,\n };\n\n const result = {} as Record<FeatureSwitchKey, boolean>;\n for (const key of Object.values(FeatureSwitchKey)) {\n result[key] = evaluateSwitch(FEATURE_SWITCHES[key], hashes);\n }\n\n if (ctx?.overrides) {\n for (const [key, value] of Object.entries(ctx.overrides)) {\n if (key in FEATURE_SWITCHES && value !== undefined) {\n result[key as FeatureSwitchKey] = value;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Return the description for every feature switch.\n */\nexport function getFeatureSwitchDescriptions(): Record<\n FeatureSwitchKey,\n string | undefined\n> {\n const result = {} as Record<FeatureSwitchKey, string | undefined>;\n for (const key of Object.values(FeatureSwitchKey)) {\n result[key] = FEATURE_SWITCHES[key].description;\n }\n return result;\n}\n\n/**\n * Return display metadata for every feature switch.\n */\nexport function getFeatureSwitchMetadata(): Record<\n FeatureSwitchKey,\n FeatureSwitchMetadata\n> {\n const result = {} as Record<FeatureSwitchKey, FeatureSwitchMetadata>;\n for (const key of Object.values(FeatureSwitchKey)) {\n const featureSwitch = FEATURE_SWITCHES[key];\n result[key] = {\n maintainer: featureSwitch.maintainer,\n description: featureSwitch.description,\n userOverridable: featureSwitch.userOverridable !== false,\n };\n }\n return result;\n}\n\nexport function isUserOverridableFeatureSwitch(\n key: string,\n): key is FeatureSwitchKey {\n if (!(key in FEATURE_SWITCHES)) {\n return false;\n }\n return FEATURE_SWITCHES[key as FeatureSwitchKey].userOverridable !== false;\n}\n\nexport function getUserOverridableFeatureSwitchKeys(): readonly FeatureSwitchKey[] {\n return Object.values(FeatureSwitchKey).filter(isUserOverridableFeatureSwitch);\n}\n\nexport function filterUserOverridableFeatureSwitchOverrides(\n switches: Record<string, boolean>,\n): Record<string, boolean> {\n const filtered: Record<string, boolean> = {};\n for (const [key, value] of Object.entries(switches)) {\n if (isUserOverridableFeatureSwitch(key)) {\n filtered[key] = value;\n }\n }\n return filtered;\n}\n\n/**\n * Check if a feature is enabled for the given context.\n *\n * `ctx` is required so callers must pass identity (userId/orgId/email) or an\n * explicit `{}`. A switch gated by `enabledUserHashes` / `enabledOrgIdHashes`\n * silently returns `false` when ctx omits identity, which has caused bugs.\n * Client-side callers should usually read the platform `featureSwitch$` signal\n * instead — it also merges DB overrides on top of identity context.\n */\nexport function isFeatureEnabled(\n key: FeatureSwitchKey,\n ctx: FeatureSwitchContext,\n): boolean {\n const override = ctx.overrides?.[key];\n if (override !== undefined) {\n return override;\n }\n\n const featureSwitch = FEATURE_SWITCHES[key];\n if (featureSwitch.enabled) {\n return true;\n }\n if (ctx.userId && featureSwitch.enabledUserHashes?.length) {\n if (featureSwitch.enabledUserHashes.includes(fnv1a(ctx.userId)))\n return true;\n }\n if (ctx.email && featureSwitch.enabledEmailHashes?.length) {\n if (\n featureSwitch.enabledEmailHashes.includes(fnv1a(ctx.email.toLowerCase()))\n )\n return true;\n }\n if (ctx.orgId && featureSwitch.enabledOrgIdHashes?.length) {\n if (featureSwitch.enabledOrgIdHashes.includes(fnv1a(ctx.orgId)))\n return true;\n }\n return false;\n}\n","export { FeatureSwitchKey } from \"@vm0/connectors/feature-switch-key\";\n","/**\n * Identity hashing — FNV-1a 32-bit hash used to reference users / orgs / emails\n * without embedding plain-text identifiers in source code.\n *\n * Shared between the feature-switch registry (UI rollout targeting) and\n * `staff-org.ts` (authorization primitive). The hash is deterministic and\n * synchronous; no crypto API needed.\n */\n\nexport function fnv1a(input: string): string {\n let h = 2166136261 >>> 0;\n for (let i = 0; i < input.length; i++) {\n h ^= input.charCodeAt(i);\n h = Math.imul(h, 16777619) >>> 0;\n }\n return h.toString(16).padStart(8, \"0\");\n}\n\n/**\n * Hashes of internal staff org IDs.\n *\n * This list is the source of truth for `isStaffOrg()` — adding an entry here\n * grants that org access to every endpoint that uses `isStaffOrg` as an\n * authorization check. Treat changes with the same care as role grants.\n */\nexport const STAFF_ORG_ID_HASHES: readonly string[] = [\n \"afce210e\", // org_3ANttyrbWYJk6JKRSTRLEsbsDLe\n];\n","import type { FeatureSwitchKey } from \"@vm0/connectors/feature-switch-key\";\n\nexport interface ZeroTokenPayload {\n userId: string;\n runId: string;\n orgId: string;\n scope: string;\n capabilities: string[];\n featureSwitchOverrides?: Partial<Record<FeatureSwitchKey, boolean>>;\n iat: number;\n exp: number;\n}\n\n/**\n * Decode a ZERO_TOKEN JWT payload.\n * Only decodes — does NOT verify signature (server does that).\n * If no token is provided, reads from process.env.ZERO_TOKEN.\n * Returns undefined if token is missing, malformed, or not a zero-scoped token.\n */\nexport function decodeZeroTokenPayload(\n token?: string,\n): ZeroTokenPayload | undefined {\n const raw = token ?? process.env.ZERO_TOKEN;\n if (!raw) return undefined;\n\n const prefix = \"vm0_sandbox_\";\n if (!raw.startsWith(prefix)) return undefined;\n const jwt = raw.slice(prefix.length);\n\n const parts = jwt.split(\".\");\n if (parts.length !== 3) return undefined;\n\n try {\n const payload = JSON.parse(\n Buffer.from(parts[1]!, \"base64url\").toString(),\n ) as ZeroTokenPayload;\n if (payload.scope === \"zero\" && Array.isArray(payload.capabilities)) {\n return payload;\n }\n } catch {\n // Malformed token — fall through\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;AAAA;;;ACAA;;;ACAA;;;ACAA;AASO,SAAS,MAAM,OAAuB;AAC3C,MAAI,IAAI,eAAe;AACvB,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,SAAK,MAAM,WAAW,CAAC;AACvB,QAAI,KAAK,KAAK,GAAG,QAAQ,MAAM;AAAA,EACjC;AACA,SAAO,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG;AACvC;AASO,IAAM,sBAAyC;AAAA,EACpD;AAAA;AACF;;;AFeA,IAAM,mBAA4D;AAAA,EAChE,oBAAuB,GAAG;AAAA,IACxB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,0DAA0C,GAAG;AAAA,IAC3C,YAAY;AAAA,IACZ,aACE;AAAA,IACF,SAAS;AAAA,IACT,iBAAiB;AAAA,EACnB;AAAA,EACA,wCAAiC,GAAG;AAAA,IAClC,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,oCAA+B,GAAG;AAAA,IAChC,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,0CAAkC,GAAG;AAAA,IACnC,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,kCAA8B,GAAG;AAAA,IAC/B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,sCAAgC,GAAG;AAAA,IACjC,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,wCAAiC,GAAG;AAAA,IAClC,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AAAA,EACA,wCAAiC,GAAG;AAAA,IAClC,YAAY;AAAA,IACZ,aAAa;AAAA,IAC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,CAAC,IAAK,QAAO;AAEjB,QAAM,SAAS;AACf,MAAI,CAAC,IAAI,WAAW,MAAM,EAAG,QAAO;AACpC,QAAM,MAAM,IAAI,MAAM,OAAO,MAAM;AAEnC,QAAM,QAAQ,IAAI,MAAM,GAAG;AAC3B,MAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,MAAI;AACF,UAAM,UAAU,KAAK;AAAA,MACnB,OAAO,KAAK,MAAM,CAAC,GAAI,WAAW,EAAE,SAAS;AAAA,IAC/C;AACA,QAAI,QAAQ,UAAU,UAAU,MAAM,QAAQ,QAAQ,YAAY,GAAG;AACnE,aAAO;AAAA,IACT;AAAA,EACF,QAAQ;AAAA,EAER;AACA,SAAO;AACT;","names":[]}
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
decodeZeroTokenPayload
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AQUPIAA7.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-3VVCUQPB.js";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
currentPlanAllowsVideo,
|
|
30
30
|
currentTokenCanReadBilling
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-CASIGPF2.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getActiveToken,
|
|
7
7
|
getBaseUrl,
|
|
8
8
|
headersWithCliClientHeaders
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JAUFSFAE.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esm_shims
|
|
12
12
|
} from "./chunk-3VVCUQPB.js";
|
|
@@ -648,4 +648,4 @@ export {
|
|
|
648
648
|
generateWebVideo,
|
|
649
649
|
transcribeAudio
|
|
650
650
|
};
|
|
651
|
-
//# sourceMappingURL=chunk-
|
|
651
|
+
//# sourceMappingURL=chunk-D6C3TNP6.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
UNKNOWN_PERMISSION_GRANT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OHOH5WKU.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-3VVCUQPB.js";
|
|
@@ -130,4 +130,4 @@ export {
|
|
|
130
130
|
resolveFirewallMetadataPolicies,
|
|
131
131
|
permissionGrantsToFirewallPolicies
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-GRLWX4AR.js.map
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
decodeZeroTokenPayload,
|
|
6
6
|
isFeatureEnabled
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AQUPIAA7.js";
|
|
8
8
|
import {
|
|
9
9
|
__export,
|
|
10
10
|
init_esm_shims
|
|
@@ -15386,7 +15386,7 @@ function createCliClientHeaderInjector(options) {
|
|
|
15386
15386
|
};
|
|
15387
15387
|
}
|
|
15388
15388
|
var addDefaultCliClientHeaders = createCliClientHeaderInjector({
|
|
15389
|
-
clientVersion: "9.257.
|
|
15389
|
+
clientVersion: "9.257.7"
|
|
15390
15390
|
});
|
|
15391
15391
|
function addCliClientHeaders(headers) {
|
|
15392
15392
|
addDefaultCliClientHeaders(headers);
|
|
@@ -16784,4 +16784,4 @@ export {
|
|
|
16784
16784
|
apiErrorSchema,
|
|
16785
16785
|
withErrorHandler
|
|
16786
16786
|
};
|
|
16787
|
-
//# sourceMappingURL=chunk-
|
|
16787
|
+
//# sourceMappingURL=chunk-JAUFSFAE.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
MODEL_PROVIDER_TYPES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JAUFSFAE.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-3VVCUQPB.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
formatModelProviderRoute,
|
|
41
41
|
formatModelPolicyStatus
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-NA5JAW7H.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getApiUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JAUFSFAE.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-3VVCUQPB.js";
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
toPlatformUrl,
|
|
43
43
|
getPlatformOrigin
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-NMHZWVEF.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
updateOrgModelPoliciesRequestSchema,
|
|
22
22
|
upsertModelProviderRequestSchema,
|
|
23
23
|
upsertModelProviderResponseSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JAUFSFAE.js";
|
|
25
25
|
import {
|
|
26
26
|
__commonJS,
|
|
27
27
|
__esm,
|
|
@@ -1794,51 +1794,6 @@ var hostedSiteUploadSchema = external_exports.object({
|
|
|
1794
1794
|
path: external_exports.string(),
|
|
1795
1795
|
uploadUrl: external_exports.string().url()
|
|
1796
1796
|
});
|
|
1797
|
-
var hostedSiteRedeployPresentationHtmlRequestSchema = external_exports.object({
|
|
1798
|
-
url: external_exports.string().url(),
|
|
1799
|
-
html: external_exports.string().min(1)
|
|
1800
|
-
});
|
|
1801
|
-
var hostedSiteRedeployHtmlRequestSchema = external_exports.object({
|
|
1802
|
-
url: external_exports.string().url(),
|
|
1803
|
-
html: external_exports.string().min(1)
|
|
1804
|
-
});
|
|
1805
|
-
var presentationSpeakerNotesPatchSchema = external_exports.object({
|
|
1806
|
-
kind: external_exports.literal("presentation-speaker-notes-patch"),
|
|
1807
|
-
version: external_exports.literal(1),
|
|
1808
|
-
slides: external_exports.array(
|
|
1809
|
-
external_exports.object({
|
|
1810
|
-
slideId: external_exports.string().min(1),
|
|
1811
|
-
speakerNotes: external_exports.string().min(1)
|
|
1812
|
-
})
|
|
1813
|
-
).max(500)
|
|
1814
|
-
});
|
|
1815
|
-
var htmlDomEditCommentSchema = external_exports.object({
|
|
1816
|
-
id: external_exports.string().min(1),
|
|
1817
|
-
targetNodeIds: external_exports.array(external_exports.string().min(1)).min(1).max(20),
|
|
1818
|
-
comment: external_exports.string().min(1)
|
|
1819
|
-
});
|
|
1820
|
-
var createHtmlEditDraftBaseRequestSchema = external_exports.object({
|
|
1821
|
-
comments: external_exports.array(htmlDomEditCommentSchema).min(1).max(100)
|
|
1822
|
-
});
|
|
1823
|
-
var createHtmlEditDraftRequestSchema = external_exports.union([
|
|
1824
|
-
createHtmlEditDraftBaseRequestSchema.extend({
|
|
1825
|
-
html: external_exports.string().min(1).max(5e5),
|
|
1826
|
-
htmlSnapshotUrl: external_exports.never().optional()
|
|
1827
|
-
}),
|
|
1828
|
-
createHtmlEditDraftBaseRequestSchema.extend({
|
|
1829
|
-
html: external_exports.never().optional(),
|
|
1830
|
-
htmlSnapshotUrl: external_exports.string().url()
|
|
1831
|
-
})
|
|
1832
|
-
]);
|
|
1833
|
-
var htmlEditDraftResponseSchema = external_exports.object({
|
|
1834
|
-
kind: external_exports.literal("html-edit-draft"),
|
|
1835
|
-
version: external_exports.literal(1),
|
|
1836
|
-
html: external_exports.string().min(1)
|
|
1837
|
-
});
|
|
1838
|
-
var generatePresentationSpeakerNotesRequestSchema = external_exports.object({
|
|
1839
|
-
html: external_exports.string().min(1).max(5e5),
|
|
1840
|
-
mode: external_exports.literal("fill-empty")
|
|
1841
|
-
});
|
|
1842
1797
|
var hostedSitePrepareResponseSchema = external_exports.object({
|
|
1843
1798
|
siteId: external_exports.string().uuid(),
|
|
1844
1799
|
deploymentId: external_exports.string().uuid(),
|
|
@@ -1965,71 +1920,6 @@ var zeroHostContract = c9.router({
|
|
|
1965
1920
|
500: apiErrorSchema
|
|
1966
1921
|
},
|
|
1967
1922
|
summary: "List deployment versions for an owned hosted site"
|
|
1968
|
-
},
|
|
1969
|
-
redeployPresentationHtml: {
|
|
1970
|
-
method: "POST",
|
|
1971
|
-
path: "/api/zero/host/presentation-html/redeploy",
|
|
1972
|
-
headers: authHeadersSchema,
|
|
1973
|
-
body: hostedSiteRedeployPresentationHtmlRequestSchema,
|
|
1974
|
-
responses: {
|
|
1975
|
-
200: hostedSiteCompleteResponseSchema,
|
|
1976
|
-
400: apiErrorSchema,
|
|
1977
|
-
401: apiErrorSchema,
|
|
1978
|
-
402: apiErrorSchema,
|
|
1979
|
-
403: apiErrorSchema,
|
|
1980
|
-
404: apiErrorSchema,
|
|
1981
|
-
409: apiErrorSchema,
|
|
1982
|
-
500: apiErrorSchema
|
|
1983
|
-
},
|
|
1984
|
-
summary: "Redeploy an existing presentation HTML hosted site"
|
|
1985
|
-
},
|
|
1986
|
-
redeployHtml: {
|
|
1987
|
-
method: "POST",
|
|
1988
|
-
path: "/api/zero/host/html/redeploy",
|
|
1989
|
-
headers: authHeadersSchema,
|
|
1990
|
-
body: hostedSiteRedeployHtmlRequestSchema,
|
|
1991
|
-
responses: {
|
|
1992
|
-
200: hostedSiteCompleteResponseSchema,
|
|
1993
|
-
400: apiErrorSchema,
|
|
1994
|
-
401: apiErrorSchema,
|
|
1995
|
-
402: apiErrorSchema,
|
|
1996
|
-
403: apiErrorSchema,
|
|
1997
|
-
404: apiErrorSchema,
|
|
1998
|
-
409: apiErrorSchema,
|
|
1999
|
-
500: apiErrorSchema
|
|
2000
|
-
},
|
|
2001
|
-
summary: "Redeploy an existing HTML hosted site"
|
|
2002
|
-
},
|
|
2003
|
-
generatePresentationSpeakerNotes: {
|
|
2004
|
-
method: "POST",
|
|
2005
|
-
path: "/api/zero/host/presentation-html/speaker-notes",
|
|
2006
|
-
headers: authHeadersSchema,
|
|
2007
|
-
body: generatePresentationSpeakerNotesRequestSchema,
|
|
2008
|
-
responses: {
|
|
2009
|
-
200: presentationSpeakerNotesPatchSchema,
|
|
2010
|
-
400: apiErrorSchema,
|
|
2011
|
-
401: apiErrorSchema,
|
|
2012
|
-
402: apiErrorSchema,
|
|
2013
|
-
403: apiErrorSchema,
|
|
2014
|
-
500: apiErrorSchema
|
|
2015
|
-
},
|
|
2016
|
-
summary: "Generate speaker notes for an existing presentation HTML"
|
|
2017
|
-
},
|
|
2018
|
-
createHtmlEditDraft: {
|
|
2019
|
-
method: "POST",
|
|
2020
|
-
path: "/api/zero/host/html-edit-draft",
|
|
2021
|
-
headers: authHeadersSchema,
|
|
2022
|
-
body: createHtmlEditDraftRequestSchema,
|
|
2023
|
-
responses: {
|
|
2024
|
-
200: htmlEditDraftResponseSchema,
|
|
2025
|
-
400: apiErrorSchema,
|
|
2026
|
-
401: apiErrorSchema,
|
|
2027
|
-
402: apiErrorSchema,
|
|
2028
|
-
403: apiErrorSchema,
|
|
2029
|
-
503: apiErrorSchema,
|
|
2030
|
-
500: apiErrorSchema
|
|
2031
|
-
},
|
|
2032
|
-
summary: "Create an edited HTML draft from DOM comments"
|
|
2033
1923
|
}
|
|
2034
1924
|
});
|
|
2035
1925
|
|
|
@@ -3437,18 +3327,6 @@ var imageArtifactEditSnapshotSchema = external_exports.object({
|
|
|
3437
3327
|
snapshot: imageArtifactEditSnapshotStateSchema,
|
|
3438
3328
|
updatedAt: external_exports.string()
|
|
3439
3329
|
});
|
|
3440
|
-
var htmlArtifactEditSnapshotQuerySchema = external_exports.object({
|
|
3441
|
-
url: external_exports.string().url()
|
|
3442
|
-
});
|
|
3443
|
-
var htmlArtifactEditSnapshotUpsertSchema = external_exports.object({
|
|
3444
|
-
url: external_exports.string().url(),
|
|
3445
|
-
html: external_exports.string().min(1)
|
|
3446
|
-
});
|
|
3447
|
-
var htmlArtifactEditSnapshotSchema = external_exports.object({
|
|
3448
|
-
artifactUrl: external_exports.string().url(),
|
|
3449
|
-
snapshotUrl: external_exports.string().url(),
|
|
3450
|
-
updatedAt: external_exports.string()
|
|
3451
|
-
});
|
|
3452
3330
|
var persistedAttachmentSchema = external_exports.object({
|
|
3453
3331
|
id: external_exports.string(),
|
|
3454
3332
|
url: external_exports.string(),
|
|
@@ -4265,50 +4143,6 @@ var chatThreadArtifactsContract = c13.router({
|
|
|
4265
4143
|
},
|
|
4266
4144
|
summary: "List uploaded files associated with every run in a chat thread"
|
|
4267
4145
|
},
|
|
4268
|
-
getHtmlEditSnapshot: {
|
|
4269
|
-
method: "GET",
|
|
4270
|
-
path: "/api/zero/chat-threads/:threadId/html-artifact-edit-snapshot",
|
|
4271
|
-
headers: authHeadersSchema,
|
|
4272
|
-
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4273
|
-
query: htmlArtifactEditSnapshotQuerySchema,
|
|
4274
|
-
responses: {
|
|
4275
|
-
200: external_exports.object({ snapshot: htmlArtifactEditSnapshotSchema.nullable() }),
|
|
4276
|
-
400: apiErrorSchema,
|
|
4277
|
-
401: apiErrorSchema,
|
|
4278
|
-
404: apiErrorSchema
|
|
4279
|
-
},
|
|
4280
|
-
summary: "Get a resumable HTML artifact edit snapshot for a chat thread"
|
|
4281
|
-
},
|
|
4282
|
-
upsertHtmlEditSnapshot: {
|
|
4283
|
-
method: "PUT",
|
|
4284
|
-
path: "/api/zero/chat-threads/:threadId/html-artifact-edit-snapshot",
|
|
4285
|
-
headers: authHeadersSchema,
|
|
4286
|
-
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4287
|
-
body: htmlArtifactEditSnapshotUpsertSchema,
|
|
4288
|
-
responses: {
|
|
4289
|
-
200: htmlArtifactEditSnapshotSchema,
|
|
4290
|
-
400: apiErrorSchema,
|
|
4291
|
-
401: apiErrorSchema,
|
|
4292
|
-
402: apiErrorSchema,
|
|
4293
|
-
404: apiErrorSchema,
|
|
4294
|
-
500: apiErrorSchema
|
|
4295
|
-
},
|
|
4296
|
-
summary: "Upsert a resumable HTML artifact edit snapshot for a chat thread"
|
|
4297
|
-
},
|
|
4298
|
-
deleteHtmlEditSnapshot: {
|
|
4299
|
-
method: "DELETE",
|
|
4300
|
-
path: "/api/zero/chat-threads/:threadId/html-artifact-edit-snapshot",
|
|
4301
|
-
headers: authHeadersSchema,
|
|
4302
|
-
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4303
|
-
query: htmlArtifactEditSnapshotQuerySchema,
|
|
4304
|
-
responses: {
|
|
4305
|
-
204: c13.noBody(),
|
|
4306
|
-
400: apiErrorSchema,
|
|
4307
|
-
401: apiErrorSchema,
|
|
4308
|
-
404: apiErrorSchema
|
|
4309
|
-
},
|
|
4310
|
-
summary: "Delete a resumable HTML artifact edit snapshot for a chat thread"
|
|
4311
|
-
},
|
|
4312
4146
|
syncGoogleDrive: {
|
|
4313
4147
|
method: "POST",
|
|
4314
4148
|
path: "/api/zero/chat-threads/:threadId/artifacts",
|
|
@@ -4331,27 +4165,6 @@ var chatThreadArtifactsContract = c13.router({
|
|
|
4331
4165
|
503: apiErrorSchema
|
|
4332
4166
|
},
|
|
4333
4167
|
summary: "Sync a chat artifact file to the user's connected Google Drive"
|
|
4334
|
-
},
|
|
4335
|
-
uploadGoogleSlides: {
|
|
4336
|
-
method: "POST",
|
|
4337
|
-
path: "/api/zero/chat-threads/:threadId/artifacts/google-slides",
|
|
4338
|
-
headers: authHeadersSchema,
|
|
4339
|
-
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4340
|
-
contentType: "multipart/form-data",
|
|
4341
|
-
body: c13.type(),
|
|
4342
|
-
responses: {
|
|
4343
|
-
200: external_exports.object({
|
|
4344
|
-
id: external_exports.string(),
|
|
4345
|
-
name: external_exports.string(),
|
|
4346
|
-
webViewLink: external_exports.string().nullable()
|
|
4347
|
-
}),
|
|
4348
|
-
400: apiErrorSchema,
|
|
4349
|
-
401: apiErrorSchema,
|
|
4350
|
-
403: apiErrorSchema,
|
|
4351
|
-
404: apiErrorSchema,
|
|
4352
|
-
503: apiErrorSchema
|
|
4353
|
-
},
|
|
4354
|
-
summary: "Upload a presentation artifact to the user's Google Drive as a native Google Slides deck"
|
|
4355
4168
|
}
|
|
4356
4169
|
});
|
|
4357
4170
|
var artifactsContract = c13.router({
|
|
@@ -7536,6 +7349,12 @@ var webhookStoragesPrepareContract = c24.router({
|
|
|
7536
7349
|
body: external_exports.object({
|
|
7537
7350
|
runId: external_exports.string().min(1, "runId is required"),
|
|
7538
7351
|
// Required for webhook auth
|
|
7352
|
+
/**
|
|
7353
|
+
* Canonical Storage identity. During the dual-send rollout, old API
|
|
7354
|
+
* versions strip this unknown field while new versions authorize it
|
|
7355
|
+
* against the run's writeback mounts.
|
|
7356
|
+
*/
|
|
7357
|
+
storageId: external_exports.string().uuid().optional(),
|
|
7539
7358
|
storageName: external_exports.string().min(1, "Storage name is required"),
|
|
7540
7359
|
storageType: storageTypeSchema,
|
|
7541
7360
|
files: external_exports.array(fileEntryWithHashSchema),
|
|
@@ -7570,6 +7389,11 @@ var webhookStoragesCommitContract = c24.router({
|
|
|
7570
7389
|
body: external_exports.object({
|
|
7571
7390
|
runId: external_exports.string().min(1, "runId is required"),
|
|
7572
7391
|
// Required for webhook auth
|
|
7392
|
+
/**
|
|
7393
|
+
* Canonical Storage identity. Remove the legacy name/type envelope after
|
|
7394
|
+
* the previous GuestAgent has drained from production.
|
|
7395
|
+
*/
|
|
7396
|
+
storageId: external_exports.string().uuid().optional(),
|
|
7573
7397
|
storageName: external_exports.string().min(1, "Storage name is required"),
|
|
7574
7398
|
storageType: storageTypeSchema,
|
|
7575
7399
|
versionId: external_exports.string().min(1, "Version ID is required"),
|
|
@@ -13125,4 +12949,4 @@ export {
|
|
|
13125
12949
|
getHostedSiteFiles,
|
|
13126
12950
|
getHostedSiteDeployments
|
|
13127
12951
|
};
|
|
13128
|
-
//# sourceMappingURL=chunk-
|
|
12952
|
+
//# sourceMappingURL=chunk-OHOH5WKU.js.map
|