@vm0/cli 9.271.0 → 9.271.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/{agent-O4PIZ7NO.js → agent-JNXSPIHQ.js} +6 -6
- package/{banking-K3T7FGVL.js → banking-VNN5IQV3.js} +4 -4
- package/{browser-ZUXV2DZI.js → browser-VYD56AFV.js} +4 -4
- package/{chat-FQ65YTRM.js → chat-TCKWZAWS.js} +5 -5
- package/{chunk-X7YXT2UE.js → chunk-3BGTDXRB.js} +32 -1
- package/chunk-3BGTDXRB.js.map +1 -0
- package/{chunk-MOWAU52B.js → chunk-6GXJ5D26.js} +2 -2
- package/{chunk-JXUQQIUP.js → chunk-ADB5CIIV.js} +2 -2
- package/{chunk-D7TEG7WN.js → chunk-F7O355AV.js} +48 -13
- package/chunk-F7O355AV.js.map +1 -0
- package/{chunk-TC7IZRA2.js → chunk-L5SV5PJD.js} +2 -2
- package/{chunk-TZDXFY6G.js → chunk-LMVTFXNK.js} +9 -3
- package/chunk-LMVTFXNK.js.map +1 -0
- package/{chunk-EINTZ5MX.js → chunk-MLKSLRRM.js} +351 -304
- package/chunk-MLKSLRRM.js.map +1 -0
- package/{chunk-CCUKVMAH.js → chunk-W4PRWICH.js} +2 -2
- package/{chunk-RFTCX5UZ.js → chunk-XAHNBZIW.js} +2 -2
- package/{chunk-VSL4HRIA.js → chunk-YYLDEO2K.js} +2 -2
- package/{computer-use-LAD5XLHX.js → computer-use-RWYSRBCB.js} +4 -4
- package/{connector-AVTEZ5M4.js → connector-IBUNFDSD.js} +7 -7
- package/{credit-I45PC4IZ.js → credit-QP4DR4N6.js} +5 -5
- package/{developer-support-HG2427DE.js → developer-support-D4J372I4.js} +4 -4
- package/{doctor-NEF5PDLF.js → doctor-OI4UCI4N.js} +5 -5
- package/{feishu-C7TLUZNW.js → feishu-NTNKNZZ4.js} +4 -4
- package/{finance-QRINPXNY.js → finance-Y7J5G3WH.js} +4 -4
- package/{generate-OR4TSIMU.js → generate-H35Y57BV.js} +5 -5
- package/{github-B6FLS3YK.js → github-SFMKUAUT.js} +4 -4
- package/{goal-QXSEQGAT.js → goal-M63ORVM7.js} +4 -4
- package/{host-4TKBODTL.js → host-LYIETHZV.js} +4 -4
- package/{logs-WBT4C34D.js → logs-T4MBRNPC.js} +6 -6
- package/{mail-GVDB4DW2.js → mail-GK7E7NL7.js} +6 -6
- package/{maps-7PWULA7U.js → maps-GTMXHGNU.js} +4 -4
- package/{model-54YGVJAR.js → model-5NEANRTB.js} +5 -5
- package/{model-provider-ZPDGFYK3.js → model-provider-M4HCL55S.js} +5 -5
- package/{org-4IZEIH7U.js → org-XQ4XXDEH.js} +4 -4
- package/package.json +1 -1
- package/{people-search-3MYEUXPL.js → people-search-EP3BR2AH.js} +4 -4
- package/{phone-374WD72N.js → phone-HD2GCIQH.js} +4 -4
- package/{preference-6MJRMHWU.js → preference-F4LCOSXP.js} +4 -4
- package/{resource-LHAF45BR.js → resource-I3X5RBY5.js} +4 -4
- package/{scrape-IWNRA5Y6.js → scrape-7JVFJEGP.js} +4 -4
- package/{search-D65TMXEQ.js → search-WBDIY37Z.js} +6 -6
- package/{secret-HCD3ZCX2.js → secret-VWGHH2JZ.js} +4 -4
- package/{slack-R4LKBTX6.js → slack-XQV7GD2H.js} +4 -4
- package/{teams-3JJJ2G3A.js → teams-7LEFVVR4.js} +4 -4
- package/{telegram-2E2UM67J.js → telegram-Z3KCHL4I.js} +4 -4
- package/{upgrade-J6FYUUYV.js → upgrade-AYQ3WY3E.js} +3 -3
- package/{variable-YXJ6NH3N.js → variable-4LL2AHR2.js} +4 -4
- package/{video-GYS2CSQF.js → video-ENXXYKEL.js} +3 -3
- package/{weather-N5IWRZPG.js → weather-DRUFVRZQ.js} +4 -4
- package/{web-LPR6C2K7.js → web-D36RNI4L.js} +4 -4
- package/{web-search-BT6BDI5E.js → web-search-JSMVPPNQ.js} +4 -4
- package/{whoami-YV26HEXS.js → whoami-RVMLZFWZ.js} +6 -6
- package/{workflow-T2R3IE2A.js → workflow-JANMPFK7.js} +5 -5
- package/zero.js +43 -43
- package/chunk-D7TEG7WN.js.map +0 -1
- package/chunk-EINTZ5MX.js.map +0 -1
- package/chunk-TZDXFY6G.js.map +0 -1
- package/chunk-X7YXT2UE.js.map +0 -1
- /package/{agent-O4PIZ7NO.js.map → agent-JNXSPIHQ.js.map} +0 -0
- /package/{banking-K3T7FGVL.js.map → banking-VNN5IQV3.js.map} +0 -0
- /package/{browser-ZUXV2DZI.js.map → browser-VYD56AFV.js.map} +0 -0
- /package/{chat-FQ65YTRM.js.map → chat-TCKWZAWS.js.map} +0 -0
- /package/{chunk-MOWAU52B.js.map → chunk-6GXJ5D26.js.map} +0 -0
- /package/{chunk-JXUQQIUP.js.map → chunk-ADB5CIIV.js.map} +0 -0
- /package/{chunk-TC7IZRA2.js.map → chunk-L5SV5PJD.js.map} +0 -0
- /package/{chunk-CCUKVMAH.js.map → chunk-W4PRWICH.js.map} +0 -0
- /package/{chunk-RFTCX5UZ.js.map → chunk-XAHNBZIW.js.map} +0 -0
- /package/{chunk-VSL4HRIA.js.map → chunk-YYLDEO2K.js.map} +0 -0
- /package/{computer-use-LAD5XLHX.js.map → computer-use-RWYSRBCB.js.map} +0 -0
- /package/{connector-AVTEZ5M4.js.map → connector-IBUNFDSD.js.map} +0 -0
- /package/{credit-I45PC4IZ.js.map → credit-QP4DR4N6.js.map} +0 -0
- /package/{developer-support-HG2427DE.js.map → developer-support-D4J372I4.js.map} +0 -0
- /package/{doctor-NEF5PDLF.js.map → doctor-OI4UCI4N.js.map} +0 -0
- /package/{feishu-C7TLUZNW.js.map → feishu-NTNKNZZ4.js.map} +0 -0
- /package/{finance-QRINPXNY.js.map → finance-Y7J5G3WH.js.map} +0 -0
- /package/{generate-OR4TSIMU.js.map → generate-H35Y57BV.js.map} +0 -0
- /package/{github-B6FLS3YK.js.map → github-SFMKUAUT.js.map} +0 -0
- /package/{goal-QXSEQGAT.js.map → goal-M63ORVM7.js.map} +0 -0
- /package/{host-4TKBODTL.js.map → host-LYIETHZV.js.map} +0 -0
- /package/{logs-WBT4C34D.js.map → logs-T4MBRNPC.js.map} +0 -0
- /package/{mail-GVDB4DW2.js.map → mail-GK7E7NL7.js.map} +0 -0
- /package/{maps-7PWULA7U.js.map → maps-GTMXHGNU.js.map} +0 -0
- /package/{model-54YGVJAR.js.map → model-5NEANRTB.js.map} +0 -0
- /package/{model-provider-ZPDGFYK3.js.map → model-provider-M4HCL55S.js.map} +0 -0
- /package/{org-4IZEIH7U.js.map → org-XQ4XXDEH.js.map} +0 -0
- /package/{people-search-3MYEUXPL.js.map → people-search-EP3BR2AH.js.map} +0 -0
- /package/{phone-374WD72N.js.map → phone-HD2GCIQH.js.map} +0 -0
- /package/{preference-6MJRMHWU.js.map → preference-F4LCOSXP.js.map} +0 -0
- /package/{resource-LHAF45BR.js.map → resource-I3X5RBY5.js.map} +0 -0
- /package/{scrape-IWNRA5Y6.js.map → scrape-7JVFJEGP.js.map} +0 -0
- /package/{search-D65TMXEQ.js.map → search-WBDIY37Z.js.map} +0 -0
- /package/{secret-HCD3ZCX2.js.map → secret-VWGHH2JZ.js.map} +0 -0
- /package/{slack-R4LKBTX6.js.map → slack-XQV7GD2H.js.map} +0 -0
- /package/{teams-3JJJ2G3A.js.map → teams-7LEFVVR4.js.map} +0 -0
- /package/{telegram-2E2UM67J.js.map → telegram-Z3KCHL4I.js.map} +0 -0
- /package/{upgrade-J6FYUUYV.js.map → upgrade-AYQ3WY3E.js.map} +0 -0
- /package/{variable-YXJ6NH3N.js.map → variable-4LL2AHR2.js.map} +0 -0
- /package/{video-GYS2CSQF.js.map → video-ENXXYKEL.js.map} +0 -0
- /package/{weather-N5IWRZPG.js.map → weather-DRUFVRZQ.js.map} +0 -0
- /package/{web-LPR6C2K7.js.map → web-D36RNI4L.js.map} +0 -0
- /package/{web-search-BT6BDI5E.js.map → web-search-JSMVPPNQ.js.map} +0 -0
- /package/{whoami-YV26HEXS.js.map → whoami-RVMLZFWZ.js.map} +0 -0
- /package/{workflow-T2R3IE2A.js.map → workflow-JANMPFK7.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
policyIcon
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6GXJ5D26.js";
|
|
7
7
|
import {
|
|
8
8
|
isInteractive,
|
|
9
9
|
promptConfirm
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
connectorPermissionGrantsToFirewallPolicies,
|
|
13
13
|
loadConnectorPermissionInfos
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YYLDEO2K.js";
|
|
15
15
|
import {
|
|
16
16
|
createZeroAgent,
|
|
17
17
|
deleteZeroAgent,
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
listZeroUserPermissionGrants,
|
|
24
24
|
updateZeroAgent,
|
|
25
25
|
updateZeroAgentInstructions
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-LMVTFXNK.js";
|
|
27
|
+
import "./chunk-ADB5CIIV.js";
|
|
28
28
|
import "./chunk-MA22KQYU.js";
|
|
29
29
|
import {
|
|
30
30
|
source_default,
|
|
31
31
|
withErrorHandler
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-F7O355AV.js";
|
|
33
33
|
import "./chunk-MD3YWUKO.js";
|
|
34
34
|
import {
|
|
35
35
|
Command
|
|
@@ -599,4 +599,4 @@ Notes:
|
|
|
599
599
|
export {
|
|
600
600
|
zeroAgentCommand
|
|
601
601
|
};
|
|
602
|
-
//# sourceMappingURL=agent-
|
|
602
|
+
//# sourceMappingURL=agent-JNXSPIHQ.js.map
|
|
@@ -3,13 +3,13 @@ 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-LMVTFXNK.js";
|
|
7
|
+
import "./chunk-ADB5CIIV.js";
|
|
8
8
|
import "./chunk-MA22KQYU.js";
|
|
9
9
|
import {
|
|
10
10
|
source_default,
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-F7O355AV.js";
|
|
13
13
|
import "./chunk-MD3YWUKO.js";
|
|
14
14
|
import {
|
|
15
15
|
Command,
|
|
@@ -114,4 +114,4 @@ Notes:
|
|
|
114
114
|
export {
|
|
115
115
|
zeroBankingCommand
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=banking-
|
|
117
|
+
//# sourceMappingURL=banking-VNN5IQV3.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
leaseZeroBrowser,
|
|
9
9
|
useZeroBrowser,
|
|
10
10
|
zeroBrowserCreateRequestSchema
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LMVTFXNK.js";
|
|
12
|
+
import "./chunk-ADB5CIIV.js";
|
|
13
13
|
import "./chunk-MA22KQYU.js";
|
|
14
14
|
import {
|
|
15
15
|
source_default,
|
|
16
16
|
withErrorHandler
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-F7O355AV.js";
|
|
18
18
|
import "./chunk-MD3YWUKO.js";
|
|
19
19
|
import {
|
|
20
20
|
Command,
|
|
@@ -189,4 +189,4 @@ Notes:
|
|
|
189
189
|
export {
|
|
190
190
|
zeroBrowserCommand
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=browser-
|
|
192
|
+
//# sourceMappingURL=browser-VYD56AFV.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-LN2ATWKS.js";
|
|
12
12
|
import {
|
|
13
13
|
formatModelProviderRoute
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-L5SV5PJD.js";
|
|
15
15
|
import {
|
|
16
16
|
chatThreadEventSchema,
|
|
17
17
|
chatThreadSnapshotProjectionSchema,
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
sendZeroChatEvent,
|
|
28
28
|
updateZeroChatThreadModelSelection,
|
|
29
29
|
userMessageDocumentSchema
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-LMVTFXNK.js";
|
|
31
|
+
import "./chunk-ADB5CIIV.js";
|
|
32
32
|
import "./chunk-MA22KQYU.js";
|
|
33
33
|
import {
|
|
34
34
|
getApiUrl,
|
|
35
35
|
source_default,
|
|
36
36
|
withErrorHandler
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-F7O355AV.js";
|
|
38
38
|
import {
|
|
39
39
|
decodeZeroTokenPayload
|
|
40
40
|
} from "./chunk-MD3YWUKO.js";
|
|
@@ -1168,4 +1168,4 @@ Examples:
|
|
|
1168
1168
|
export {
|
|
1169
1169
|
zeroChatCommand
|
|
1170
1170
|
};
|
|
1171
|
-
//# sourceMappingURL=chat-
|
|
1171
|
+
//# sourceMappingURL=chat-TCKWZAWS.js.map
|
|
@@ -27,6 +27,11 @@ var STAFF_ORG_ID_HASHES = [
|
|
|
27
27
|
];
|
|
28
28
|
|
|
29
29
|
// ../../packages/core/src/feature-switch.ts
|
|
30
|
+
var CUSTOM_MODEL_GATEWAY_ORG_ID_HASHES = [
|
|
31
|
+
...STAFF_ORG_ID_HASHES,
|
|
32
|
+
"a6e60503"
|
|
33
|
+
// geo rollout workspace
|
|
34
|
+
];
|
|
30
35
|
var FEATURE_SWITCHES = {
|
|
31
36
|
["dummy" /* Dummy */]: {
|
|
32
37
|
maintainer: "ethan@vm0.ai",
|
|
@@ -231,6 +236,18 @@ var FEATURE_SWITCHES = {
|
|
|
231
236
|
enabled: false,
|
|
232
237
|
userOverridable: false
|
|
233
238
|
},
|
|
239
|
+
["koreanLocale" /* KoreanLocale */]: {
|
|
240
|
+
maintainer: "yuma@vm0.ai",
|
|
241
|
+
description: "Allow ko-KR preference writes after incompatible API readers and rollback candidates have drained.",
|
|
242
|
+
enabled: false,
|
|
243
|
+
userOverridable: false
|
|
244
|
+
},
|
|
245
|
+
["indonesianLocale" /* IndonesianLocale */]: {
|
|
246
|
+
maintainer: "yuma@vm0.ai",
|
|
247
|
+
description: "Allow id-ID preference writes after incompatible API readers and rollback candidates have drained.",
|
|
248
|
+
enabled: false,
|
|
249
|
+
userOverridable: false
|
|
250
|
+
},
|
|
234
251
|
["banking" /* Banking */]: {
|
|
235
252
|
maintainer: "linghan@vm0.ai",
|
|
236
253
|
description: "Enable the managed Zero Banking gateway and banking:read ZERO_TOKEN capability for Finicity-backed accounts, balances, and transactions.",
|
|
@@ -325,6 +342,13 @@ var FEATURE_SWITCHES = {
|
|
|
325
342
|
enabledOrgIdHashes: STAFF_ORG_ID_HASHES,
|
|
326
343
|
userOverridable: true
|
|
327
344
|
},
|
|
345
|
+
["customModelGateways" /* CustomModelGateways */]: {
|
|
346
|
+
maintainer: "ethan@vm0.ai",
|
|
347
|
+
description: "Enable admin-defined Anthropic Messages and OpenAI Responses model gateway connections.",
|
|
348
|
+
enabled: false,
|
|
349
|
+
enabledOrgIdHashes: CUSTOM_MODEL_GATEWAY_ORG_ID_HASHES,
|
|
350
|
+
userOverridable: false
|
|
351
|
+
},
|
|
328
352
|
["zapierConnector" /* ZapierConnector */]: {
|
|
329
353
|
maintainer: "yuma@vm0.ai",
|
|
330
354
|
description: "Enable the Zapier connector. When disabled, Zapier is hidden from the connectors list and cannot be connected.",
|
|
@@ -348,6 +372,13 @@ var FEATURE_SWITCHES = {
|
|
|
348
372
|
enabled: false,
|
|
349
373
|
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
350
374
|
},
|
|
375
|
+
["pwaChatKeyboardGestures" /* PwaChatKeyboardGestures */]: {
|
|
376
|
+
maintainer: "bingjie@vm0.ai",
|
|
377
|
+
description: "Keep the PWA chat composer pinned above the software keyboard and support swipe-to-dismiss gestures.",
|
|
378
|
+
enabled: false,
|
|
379
|
+
enabledOrgIdHashes: STAFF_ORG_ID_HASHES,
|
|
380
|
+
userOverridable: false
|
|
381
|
+
},
|
|
351
382
|
["chatThreadSidebarAutoOpen" /* ChatThreadSidebarAutoOpen */]: {
|
|
352
383
|
maintainer: "ethan@vm0.ai",
|
|
353
384
|
description: "Automatically open the latest sidebar-capable card from a running or successfully completed chat run when the utility sidebar is closed and split view is available.",
|
|
@@ -489,4 +520,4 @@ function isFeatureEnabled(key, ctx) {
|
|
|
489
520
|
export {
|
|
490
521
|
isFeatureEnabled
|
|
491
522
|
};
|
|
492
|
-
//# sourceMappingURL=chunk-
|
|
523
|
+
//# sourceMappingURL=chunk-3BGTDXRB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/core/src/feature-switch-key.ts","../../../packages/core/src/feature-switch.ts","../../../packages/core/src/identity-hash.ts"],"sourcesContent":["/**\n * Feature switch keys\n *\n * Defines all available feature switch identifiers.\n */\nexport enum FeatureSwitchKey {\n Dummy = \"dummy\",\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 JoggAiConnector = \"joggAiConnector\",\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 LanguagePreference = \"languagePreference\",\n BrazilianPortugueseLocale = \"brazilianPortugueseLocale\",\n JapaneseLocale = \"japaneseLocale\",\n KoreanLocale = \"koreanLocale\",\n IndonesianLocale = \"indonesianLocale\",\n ZeroBrowser = \"zeroBrowser\",\n ZeroChatMessaging = \"zeroChatMessaging\",\n ZeroMailReplyFollowUp = \"zeroMailReplyFollowUp\",\n Banking = \"banking\",\n Lab = \"lab\",\n NotionWorkflowAutomations = \"notionWorkflowAutomations\",\n GithubWebhookAutomations = \"githubWebhookAutomations\",\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 ClaudeSessionPruning = \"claudeSessionPruning\",\n RealAgentInPreview = \"realAgentInPreview\",\n ComposerUploadPopover = \"composerUploadPopover\",\n StructuredPromptInlineTemplates = \"structuredPromptInlineTemplates\",\n CustomModelGateways = \"customModelGateways\",\n\n ZapierConnector = \"zapierConnector\",\n ComputerUseDesktopPlugins = \"computerUseDesktopPlugins\",\n ChatThreadUnifiedSearch = \"chatThreadUnifiedSearch\",\n ChatErrorRecovery = \"chatErrorRecovery\",\n PwaChatKeyboardGestures = \"pwaChatKeyboardGestures\",\n ComposerSkillSubstringSearch = \"composerSkillSubstringSearch\",\n SidebarSubscriptionUsage = \"sidebarSubscriptionUsage\",\n SlackDmSessionRouting = \"slackDmSessionRouting\",\n TeamsIntegration = \"teamsIntegration\",\n FeishuIntegration = \"feishuIntegration\",\n StrapiIntegration = \"strapiIntegration\",\n ArtifactKeyV2 = \"artifactKeyV2\",\n HostedArtifactVersions = \"hostedArtifactVersions\",\n VideoArtifactPosters = \"videoArtifactPosters\",\n ImageStyleR2 = \"imageStyleR2\",\n WorkflowConnectorReadiness = \"workflowConnectorReadiness\",\n ComposerConnectorPermissions = \"composerConnectorPermissions\",\n ThreeColumnNav = \"threeColumnNav\",\n ChatThreadSidebarAutoOpen = \"chatThreadSidebarAutoOpen\",\n CustomConnectorCliCreate = \"customConnectorCliCreate\",\n CustomConnectorOAuth2 = \"customConnectorOAuth2\",\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\nconst CUSTOM_MODEL_GATEWAY_ORG_ID_HASHES = [\n ...STAFF_ORG_ID_HASHES,\n \"a6e60503\", // geo rollout workspace\n] as const;\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.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.JoggAiConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the JoggAI video generation 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.LanguagePreference]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Enable workspace language bootstrap, persistence, and the Settings preference entry.\",\n enabled: true,\n },\n [FeatureSwitchKey.BrazilianPortugueseLocale]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Allow pt-BR preference writes after incompatible API readers and rollback candidates have drained.\",\n enabled: false,\n userOverridable: false,\n },\n [FeatureSwitchKey.JapaneseLocale]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Allow ja-JP preference writes after incompatible API readers and rollback candidates have drained.\",\n enabled: false,\n userOverridable: false,\n },\n [FeatureSwitchKey.KoreanLocale]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Allow ko-KR preference writes after incompatible API readers and rollback candidates have drained.\",\n enabled: false,\n userOverridable: false,\n },\n [FeatureSwitchKey.IndonesianLocale]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Allow id-ID preference writes after incompatible API readers and rollback candidates have drained.\",\n enabled: false,\n userOverridable: false,\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.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.ClaudeSessionPruning]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Prune oversized Claude Code checkpoint histories to the latest native compact generation.\",\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.StructuredPromptInlineTemplates]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Enable multiple inline artifact templates in structured chat prompts.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: true,\n },\n [FeatureSwitchKey.CustomModelGateways]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable admin-defined Anthropic Messages and OpenAI Responses model gateway connections.\",\n enabled: false,\n enabledOrgIdHashes: CUSTOM_MODEL_GATEWAY_ORG_ID_HASHES,\n userOverridable: false,\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.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.ChatErrorRecovery]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Replace supported Codex and Claude Code limit errors with recovery actions in chat.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.PwaChatKeyboardGestures]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Keep the PWA chat composer pinned above the software keyboard and support swipe-to-dismiss gestures.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: false,\n },\n [FeatureSwitchKey.ChatThreadSidebarAutoOpen]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Automatically open the latest sidebar-capable card from a running or successfully completed chat run when the utility sidebar is closed and split view is available.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ComposerSkillSubstringSearch]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Match chat composer slash skill suggestions by any slug substring instead of only prefixes.\",\n enabled: true,\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.SlackDmSessionRouting]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Reuse agent/model-scoped sessions for top-level Slack direct messages.\",\n enabled: true,\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.StrapiIntegration]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Enable Strapi integration settings and Strapi entry-published workflow automations.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n userOverridable: false,\n },\n [FeatureSwitchKey.ArtifactKeyV2]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Store new user artifacts under flat, ten-character hashed public keys.\",\n enabled: false,\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: true,\n },\n [FeatureSwitchKey.ImageStyleR2]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Resolve archive-enabled image styles from private R2 packages. When off, image style authoring continues reading vm0-skills from GitHub.\",\n enabled: true,\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.ZeroMailReplyFollowUp]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Enable Zero Mail reply follow-up after all API deployments can read Gmail event configurations with threadId.\",\n enabled: false,\n userOverridable: false,\n },\n [FeatureSwitchKey.ZeroBrowser]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Enable thread-scoped Cloud browser access in chat and the Zero CLI.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ZeroChatMessaging]: {\n maintainer: \"ethan@vm0.ai\",\n description:\n \"Advertise zero chat create, send, and cancel in the agent system prompt without gating the CLI commands or API.\",\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 [FeatureSwitchKey.CustomConnectorCliCreate]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Allow Zero CLI agents to create and configure custom connectors directly.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.CustomConnectorOAuth2]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Allow org admins to add OAuth 2.0 authentication to custom connectors.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\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","/**\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"],"mappings":";;;;;;;;AAAA;;;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;;;ADYA,IAAM,qCAAqC;AAAA,EACzC,GAAG;AAAA,EACH;AAAA;AACF;AAKA,IAAM,mBAA4D;AAAA,EAChE,oBAAuB,GAAG;AAAA,IACxB,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,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,IACb,SAAS;AAAA,EACX;AA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AAAA,IACT,oBAAoB;AAAA,EACtB;AAAA,EACA,oDAAuC,GAAG;AAAA,IACxC,YAAY;AAAA,IACZ,aACE;AAAA,IACF,SAAS;AAAA,IACT,oBAAoB;AAAA,EACtB;AACF;AAuIO,SAAS,iBACd,KACA,KACS;AACT,QAAM,WAAW,IAAI,YAAY,GAAG;AACpC,MAAI,aAAa,QAAW;AAC1B,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,iBAAiB,GAAG;AAC1C,MAAI,cAAc,SAAS;AACzB,WAAO;AAAA,EACT;AACA,MAAI,IAAI,UAAU,cAAc,mBAAmB,QAAQ;AACzD,QAAI,cAAc,kBAAkB,SAAS,MAAM,IAAI,MAAM,CAAC;AAC5D,aAAO;AAAA,EACX;AACA,MAAI,IAAI,SAAS,cAAc,oBAAoB,QAAQ;AACzD,QACE,cAAc,mBAAmB,SAAS,MAAM,IAAI,MAAM,YAAY,CAAC,CAAC;AAExE,aAAO;AAAA,EACX;AACA,MAAI,IAAI,SAAS,cAAc,oBAAoB,QAAQ;AACzD,QAAI,cAAc,mBAAmB,SAAS,MAAM,IAAI,KAAK,CAAC;AAC5D,aAAO;AAAA,EACX;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
|
source_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F7O355AV.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-GPYQ24DR.js";
|
|
@@ -19,4 +19,4 @@ function policyIcon(policy) {
|
|
|
19
19
|
export {
|
|
20
20
|
policyIcon
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-6GXJ5D26.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getActiveToken,
|
|
7
7
|
getBaseUrl,
|
|
8
8
|
headersWithCliClientHeaders
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-F7O355AV.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esm_shims
|
|
12
12
|
} from "./chunk-GPYQ24DR.js";
|
|
@@ -656,4 +656,4 @@ export {
|
|
|
656
656
|
generateWebVideo,
|
|
657
657
|
transcribeAudio
|
|
658
658
|
};
|
|
659
|
-
//# sourceMappingURL=chunk-
|
|
659
|
+
//# sourceMappingURL=chunk-ADB5CIIV.js.map
|
|
@@ -15391,7 +15391,7 @@ function createCliClientHeaderInjector(options) {
|
|
|
15391
15391
|
}
|
|
15392
15392
|
var addDefaultCliClientHeaders = createCliClientHeaderInjector({
|
|
15393
15393
|
clientVersion: addClientCapabilityToVersion(
|
|
15394
|
-
"9.271.
|
|
15394
|
+
"9.271.1",
|
|
15395
15395
|
CLIENT_CAPABILITY_CONNECTOR_SLUG_IDENTITIES
|
|
15396
15396
|
)
|
|
15397
15397
|
});
|
|
@@ -15745,6 +15745,8 @@ var modelProviderCodexRuntimeConfigSchema = external_exports.object({
|
|
|
15745
15745
|
name: external_exports.string().min(1),
|
|
15746
15746
|
baseUrl: external_exports.url(),
|
|
15747
15747
|
envKey: external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/),
|
|
15748
|
+
httpHeaders: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
15749
|
+
requiresOpenaiAuth: external_exports.boolean().optional(),
|
|
15748
15750
|
wireApi: external_exports.literal("responses"),
|
|
15749
15751
|
supportsWebsockets: external_exports.boolean(),
|
|
15750
15752
|
modelCatalog: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
@@ -16096,8 +16098,13 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
16096
16098
|
OPENAI_BASE_URL: "https://openrouter.ai/api/v1",
|
|
16097
16099
|
OPENAI_MODEL: "$model"
|
|
16098
16100
|
},
|
|
16099
|
-
models: [
|
|
16100
|
-
|
|
16101
|
+
models: [
|
|
16102
|
+
"openai/gpt-5.6-sol",
|
|
16103
|
+
"openai/gpt-5.6-terra",
|
|
16104
|
+
"openai/gpt-5.6-luna",
|
|
16105
|
+
"openai/gpt-5.5"
|
|
16106
|
+
],
|
|
16107
|
+
defaultModel: "openai/gpt-5.6-luna"
|
|
16101
16108
|
},
|
|
16102
16109
|
// Codex-framework twin of vercel-ai-gateway. Vercel exposes both
|
|
16103
16110
|
// Anthropic Messages and OpenAI Chat Completions / Responses on the same
|
|
@@ -16115,8 +16122,13 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
16115
16122
|
OPENAI_BASE_URL: "https://ai-gateway.vercel.sh/v1",
|
|
16116
16123
|
OPENAI_MODEL: "$model"
|
|
16117
16124
|
},
|
|
16118
|
-
models: [
|
|
16119
|
-
|
|
16125
|
+
models: [
|
|
16126
|
+
"openai/gpt-5.6-sol",
|
|
16127
|
+
"openai/gpt-5.6-terra",
|
|
16128
|
+
"openai/gpt-5.6-luna",
|
|
16129
|
+
"openai/gpt-5.5"
|
|
16130
|
+
],
|
|
16131
|
+
defaultModel: "openai/gpt-5.6-luna"
|
|
16120
16132
|
},
|
|
16121
16133
|
"openai-api-key": {
|
|
16122
16134
|
framework: "codex",
|
|
@@ -16363,9 +16375,27 @@ var MODEL_FIRST_PROVIDER_COMPATIBILITY = {
|
|
|
16363
16375
|
"openrouter-api-key",
|
|
16364
16376
|
"vercel-ai-gateway"
|
|
16365
16377
|
],
|
|
16366
|
-
"gpt-5.6-sol": [
|
|
16367
|
-
|
|
16368
|
-
|
|
16378
|
+
"gpt-5.6-sol": [
|
|
16379
|
+
"vm0",
|
|
16380
|
+
"openai-api-key",
|
|
16381
|
+
"codex-oauth-token",
|
|
16382
|
+
"openrouter-codex",
|
|
16383
|
+
"vercel-ai-gateway-codex"
|
|
16384
|
+
],
|
|
16385
|
+
"gpt-5.6-terra": [
|
|
16386
|
+
"vm0",
|
|
16387
|
+
"openai-api-key",
|
|
16388
|
+
"codex-oauth-token",
|
|
16389
|
+
"openrouter-codex",
|
|
16390
|
+
"vercel-ai-gateway-codex"
|
|
16391
|
+
],
|
|
16392
|
+
"gpt-5.6-luna": [
|
|
16393
|
+
"vm0",
|
|
16394
|
+
"openai-api-key",
|
|
16395
|
+
"codex-oauth-token",
|
|
16396
|
+
"openrouter-codex",
|
|
16397
|
+
"vercel-ai-gateway-codex"
|
|
16398
|
+
],
|
|
16369
16399
|
"gpt-5.5": [
|
|
16370
16400
|
"vm0",
|
|
16371
16401
|
"openai-api-key",
|
|
@@ -16518,6 +16548,7 @@ var orgModelPolicySchema = external_exports.object({
|
|
|
16518
16548
|
defaultProviderType: modelProviderTypeSchema,
|
|
16519
16549
|
credentialScope: modelProviderCredentialScopeSchema,
|
|
16520
16550
|
modelProviderId: external_exports.uuid().nullable(),
|
|
16551
|
+
modelProviderSurfaceId: external_exports.uuid().nullable().optional(),
|
|
16521
16552
|
routeStatus: orgModelPolicyRouteStatusSchema,
|
|
16522
16553
|
routeStatusReason: external_exports.string().nullable(),
|
|
16523
16554
|
createdAt: external_exports.string(),
|
|
@@ -16528,7 +16559,8 @@ var updateOrgModelPolicySchema = external_exports.object({
|
|
|
16528
16559
|
isDefault: external_exports.boolean(),
|
|
16529
16560
|
defaultProviderType: modelProviderTypeSchema,
|
|
16530
16561
|
credentialScope: modelProviderCredentialScopeSchema,
|
|
16531
|
-
modelProviderId: external_exports.uuid().nullable()
|
|
16562
|
+
modelProviderId: external_exports.uuid().nullable(),
|
|
16563
|
+
modelProviderSurfaceId: external_exports.uuid().nullable().optional()
|
|
16532
16564
|
});
|
|
16533
16565
|
var requestedOrgModelPolicySchema = updateOrgModelPolicySchema.extend({
|
|
16534
16566
|
model: external_exports.union([supportedRunModelSchema, retiredRunModelSchema])
|
|
@@ -16555,7 +16587,8 @@ var updateOrgModelPoliciesRequestSchema = external_exports.object({
|
|
|
16555
16587
|
isDefault: policy.isDefault,
|
|
16556
16588
|
defaultProviderType: policy.defaultProviderType,
|
|
16557
16589
|
credentialScope: policy.credentialScope,
|
|
16558
|
-
modelProviderId: policy.modelProviderId
|
|
16590
|
+
modelProviderId: policy.modelProviderId,
|
|
16591
|
+
...policy.modelProviderSurfaceId === void 0 ? {} : { modelProviderSurfaceId: policy.modelProviderSurfaceId }
|
|
16559
16592
|
}
|
|
16560
16593
|
];
|
|
16561
16594
|
}
|
|
@@ -16573,11 +16606,13 @@ var updateOrgModelPoliciesRequestSchema = external_exports.object({
|
|
|
16573
16606
|
) ? {
|
|
16574
16607
|
defaultProviderType: replacementRouteSource.defaultProviderType,
|
|
16575
16608
|
credentialScope: replacementRouteSource.credentialScope,
|
|
16576
|
-
modelProviderId: replacementRouteSource.modelProviderId
|
|
16609
|
+
modelProviderId: replacementRouteSource.modelProviderId,
|
|
16610
|
+
modelProviderSurfaceId: replacementRouteSource.modelProviderSurfaceId ?? null
|
|
16577
16611
|
} : {
|
|
16578
16612
|
defaultProviderType: "vm0",
|
|
16579
16613
|
credentialScope: "org",
|
|
16580
|
-
modelProviderId: null
|
|
16614
|
+
modelProviderId: null,
|
|
16615
|
+
modelProviderSurfaceId: null
|
|
16581
16616
|
};
|
|
16582
16617
|
const replacementExists = activePolicies.some((policy) => {
|
|
16583
16618
|
return policy.model === DEFAULT_ORG_MODEL_POLICY_DEFAULT_MODEL;
|
|
@@ -16778,4 +16813,4 @@ export {
|
|
|
16778
16813
|
apiErrorSchema,
|
|
16779
16814
|
withErrorHandler
|
|
16780
16815
|
};
|
|
16781
|
-
//# sourceMappingURL=chunk-
|
|
16816
|
+
//# sourceMappingURL=chunk-F7O355AV.js.map
|