@vm0/cli 9.277.0 → 9.277.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/{agent-XXUF45NW.js → agent-X7ZNZPOX.js} +5 -5
  2. package/{banking-D5MZDB3Q.js → banking-KGL4A62H.js} +4 -4
  3. package/{browser-2RL5R75L.js → browser-MWEZPQ7O.js} +4 -4
  4. package/{chat-VNU2U22N.js → chat-OT3H62CI.js} +5 -5
  5. package/{chunk-SWYBE4DF.js → chunk-4GLJF77C.js} +16 -4
  6. package/chunk-4GLJF77C.js.map +1 -0
  7. package/{chunk-7KUFYG6Z.js → chunk-7572GO27.js} +4 -4
  8. package/{chunk-GGHE453K.js → chunk-AIHN2SKV.js} +2 -2
  9. package/{chunk-SFTOB3J4.js → chunk-H6BEDAS4.js} +56 -5
  10. package/{chunk-SFTOB3J4.js.map → chunk-H6BEDAS4.js.map} +1 -1
  11. package/{chunk-W3ML4DBM.js → chunk-IL2KMIJJ.js} +10 -5
  12. package/{chunk-W3ML4DBM.js.map → chunk-IL2KMIJJ.js.map} +1 -1
  13. package/{chunk-TJ4W4HU4.js → chunk-NEXYY3VO.js} +2 -2
  14. package/{chunk-7NTVSSO6.js → chunk-SGSECC77.js} +2 -2
  15. package/{chunk-BDOANREY.js → chunk-WHCP2H2S.js} +6 -7
  16. package/chunk-WHCP2H2S.js.map +1 -0
  17. package/{chunk-RQCVJTYT.js → chunk-XO3YWKZB.js} +2 -2
  18. package/{computer-use-OBY6F7MG.js → computer-use-4QXDRG4V.js} +4 -4
  19. package/{connector-7EU4AGKE.js → connector-SXSAS4PE.js} +6 -6
  20. package/{credit-OFW66JTC.js → credit-CKHMOX6F.js} +5 -5
  21. package/{developer-support-BXOAPDP7.js → developer-support-QBGR6BJO.js} +4 -4
  22. package/{doctor-YOA6QLSW.js → doctor-EA7ECFIO.js} +5 -5
  23. package/{feishu-PENCRP3I.js → feishu-4N7IWJJV.js} +4 -4
  24. package/{finance-JRQBO4PM.js → finance-KQS5IPPY.js} +4 -4
  25. package/{generate-IZMDDSOO.js → generate-ALYUA6F7.js} +6 -6
  26. package/{github-V2AIZ6V4.js → github-MXA236XO.js} +4 -4
  27. package/{goal-Y45PFXMF.js → goal-RK2DOCPU.js} +4 -4
  28. package/{host-M4NUXM62.js → host-4NZXR7RE.js} +4 -4
  29. package/{logs-WD5IEUA5.js → logs-E4T5GFFU.js} +6 -6
  30. package/{mail-OVEMNODA.js → mail-AS3PMC7N.js} +6 -6
  31. package/{maps-CTFMTOAJ.js → maps-GFGMODQZ.js} +4 -4
  32. package/{model-2T3O6GG3.js → model-AJIZ5IVT.js} +5 -5
  33. package/{model-provider-2TFKEOVI.js → model-provider-RBY4EVBH.js} +5 -5
  34. package/{org-VSS4S3I4.js → org-OUHCBZOO.js} +4 -4
  35. package/package.json +1 -1
  36. package/{people-search-VV3GDZDJ.js → people-search-PZQZLLSA.js} +4 -4
  37. package/{phone-PHC6VFIA.js → phone-X756PGVQ.js} +4 -4
  38. package/{recognize-KWIG2HNA.js → recognize-P7QG3HXA.js} +4 -4
  39. package/{resource-6GERE5UR.js → resource-5LCV4HM6.js} +4 -4
  40. package/{scrape-UAWGI7FN.js → scrape-6ZQMKQNG.js} +4 -4
  41. package/{search-XDNOEE6X.js → search-ZJJINEQB.js} +6 -6
  42. package/{slack-UDPD5UVA.js → slack-Z6WENJ2P.js} +4 -4
  43. package/{teams-3NJV5VLD.js → teams-ZAMCSLKG.js} +4 -4
  44. package/{telegram-6LWQGQHT.js → telegram-XJMUTZLB.js} +4 -4
  45. package/{upgrade-T2PZFM3H.js → upgrade-3DANFB33.js} +3 -3
  46. package/{video-WJZ6PDFP.js → video-QC32QN57.js} +3 -3
  47. package/{weather-EG7DNGFZ.js → weather-CWWT2KDJ.js} +4 -4
  48. package/{web-PFRNVBF2.js → web-5K2IPPWW.js} +4 -4
  49. package/{web-search-733PZEHP.js → web-search-DBJMZGK4.js} +4 -4
  50. package/{whoami-GWLDXMNP.js → whoami-HPT36I55.js} +5 -5
  51. package/{workflow-DKPLW4MQ.js → workflow-27BFGSGL.js} +5 -5
  52. package/zero.js +41 -41
  53. package/chunk-BDOANREY.js.map +0 -1
  54. package/chunk-SWYBE4DF.js.map +0 -1
  55. /package/{agent-XXUF45NW.js.map → agent-X7ZNZPOX.js.map} +0 -0
  56. /package/{banking-D5MZDB3Q.js.map → banking-KGL4A62H.js.map} +0 -0
  57. /package/{browser-2RL5R75L.js.map → browser-MWEZPQ7O.js.map} +0 -0
  58. /package/{chat-VNU2U22N.js.map → chat-OT3H62CI.js.map} +0 -0
  59. /package/{chunk-7KUFYG6Z.js.map → chunk-7572GO27.js.map} +0 -0
  60. /package/{chunk-GGHE453K.js.map → chunk-AIHN2SKV.js.map} +0 -0
  61. /package/{chunk-TJ4W4HU4.js.map → chunk-NEXYY3VO.js.map} +0 -0
  62. /package/{chunk-7NTVSSO6.js.map → chunk-SGSECC77.js.map} +0 -0
  63. /package/{chunk-RQCVJTYT.js.map → chunk-XO3YWKZB.js.map} +0 -0
  64. /package/{computer-use-OBY6F7MG.js.map → computer-use-4QXDRG4V.js.map} +0 -0
  65. /package/{connector-7EU4AGKE.js.map → connector-SXSAS4PE.js.map} +0 -0
  66. /package/{credit-OFW66JTC.js.map → credit-CKHMOX6F.js.map} +0 -0
  67. /package/{developer-support-BXOAPDP7.js.map → developer-support-QBGR6BJO.js.map} +0 -0
  68. /package/{doctor-YOA6QLSW.js.map → doctor-EA7ECFIO.js.map} +0 -0
  69. /package/{feishu-PENCRP3I.js.map → feishu-4N7IWJJV.js.map} +0 -0
  70. /package/{finance-JRQBO4PM.js.map → finance-KQS5IPPY.js.map} +0 -0
  71. /package/{generate-IZMDDSOO.js.map → generate-ALYUA6F7.js.map} +0 -0
  72. /package/{github-V2AIZ6V4.js.map → github-MXA236XO.js.map} +0 -0
  73. /package/{goal-Y45PFXMF.js.map → goal-RK2DOCPU.js.map} +0 -0
  74. /package/{host-M4NUXM62.js.map → host-4NZXR7RE.js.map} +0 -0
  75. /package/{logs-WD5IEUA5.js.map → logs-E4T5GFFU.js.map} +0 -0
  76. /package/{mail-OVEMNODA.js.map → mail-AS3PMC7N.js.map} +0 -0
  77. /package/{maps-CTFMTOAJ.js.map → maps-GFGMODQZ.js.map} +0 -0
  78. /package/{model-2T3O6GG3.js.map → model-AJIZ5IVT.js.map} +0 -0
  79. /package/{model-provider-2TFKEOVI.js.map → model-provider-RBY4EVBH.js.map} +0 -0
  80. /package/{org-VSS4S3I4.js.map → org-OUHCBZOO.js.map} +0 -0
  81. /package/{people-search-VV3GDZDJ.js.map → people-search-PZQZLLSA.js.map} +0 -0
  82. /package/{phone-PHC6VFIA.js.map → phone-X756PGVQ.js.map} +0 -0
  83. /package/{recognize-KWIG2HNA.js.map → recognize-P7QG3HXA.js.map} +0 -0
  84. /package/{resource-6GERE5UR.js.map → resource-5LCV4HM6.js.map} +0 -0
  85. /package/{scrape-UAWGI7FN.js.map → scrape-6ZQMKQNG.js.map} +0 -0
  86. /package/{search-XDNOEE6X.js.map → search-ZJJINEQB.js.map} +0 -0
  87. /package/{slack-UDPD5UVA.js.map → slack-Z6WENJ2P.js.map} +0 -0
  88. /package/{teams-3NJV5VLD.js.map → teams-ZAMCSLKG.js.map} +0 -0
  89. /package/{telegram-6LWQGQHT.js.map → telegram-XJMUTZLB.js.map} +0 -0
  90. /package/{upgrade-T2PZFM3H.js.map → upgrade-3DANFB33.js.map} +0 -0
  91. /package/{video-WJZ6PDFP.js.map → video-QC32QN57.js.map} +0 -0
  92. /package/{weather-EG7DNGFZ.js.map → weather-CWWT2KDJ.js.map} +0 -0
  93. /package/{web-PFRNVBF2.js.map → web-5K2IPPWW.js.map} +0 -0
  94. /package/{web-search-733PZEHP.js.map → web-search-DBJMZGK4.js.map} +0 -0
  95. /package/{whoami-GWLDXMNP.js.map → whoami-HPT36I55.js.map} +0 -0
  96. /package/{workflow-DKPLW4MQ.js.map → workflow-27BFGSGL.js.map} +0 -0
package/zero.js CHANGED
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  isFeatureEnabled
6
- } from "./chunk-BDOANREY.js";
6
+ } from "./chunk-WHCP2H2S.js";
7
7
  import {
8
8
  decodeZeroTokenPayload
9
9
  } from "./chunk-32FE3MDA.js";
@@ -62,7 +62,7 @@ if (DSN) {
62
62
  Sentry.init({
63
63
  dsn: DSN,
64
64
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
65
- release: "9.277.0",
65
+ release: "9.277.1",
66
66
  sendDefaultPii: false,
67
67
  tracesSampleRate: 0,
68
68
  shutdownTimeout: 500,
@@ -81,7 +81,7 @@ if (DSN) {
81
81
  }
82
82
  });
83
83
  Sentry.setContext("cli", {
84
- version: "9.277.0",
84
+ version: "9.277.1",
85
85
  command: process.argv.slice(2).join(" ")
86
86
  });
87
87
  Sentry.setContext("runtime", {
@@ -209,140 +209,140 @@ var ZERO_COMMAND_DEFINITIONS = [
209
209
  name: "org",
210
210
  description: "Manage organization settings, members, and providers",
211
211
  load: async () => {
212
- return (await import("./org-VSS4S3I4.js")).zeroOrgCommand;
212
+ return (await import("./org-OUHCBZOO.js")).zeroOrgCommand;
213
213
  }
214
214
  },
215
215
  {
216
216
  name: "model",
217
217
  description: "List available models and model-switching guidance",
218
218
  load: async () => {
219
- return (await import("./model-2T3O6GG3.js")).zeroModelCommand;
219
+ return (await import("./model-AJIZ5IVT.js")).zeroModelCommand;
220
220
  }
221
221
  },
222
222
  {
223
223
  name: "model-provider",
224
224
  description: "Inspect model provider routing",
225
225
  load: async () => {
226
- return (await import("./model-provider-2TFKEOVI.js")).zeroModelProviderCommand;
226
+ return (await import("./model-provider-RBY4EVBH.js")).zeroModelProviderCommand;
227
227
  }
228
228
  },
229
229
  {
230
230
  name: "agent",
231
231
  description: "View or manage zero agents",
232
232
  load: async () => {
233
- return (await import("./agent-XXUF45NW.js")).zeroAgentCommand;
233
+ return (await import("./agent-X7ZNZPOX.js")).zeroAgentCommand;
234
234
  }
235
235
  },
236
236
  {
237
237
  name: "connector",
238
238
  description: "Check third-party service connections (GitHub, Slack, etc.)",
239
239
  load: async () => {
240
- return (await import("./connector-7EU4AGKE.js")).zeroConnectorCommand;
240
+ return (await import("./connector-SXSAS4PE.js")).zeroConnectorCommand;
241
241
  }
242
242
  },
243
243
  {
244
244
  name: "mail",
245
245
  description: "Review and send mail through Gmail or Outlook Mail",
246
246
  load: async () => {
247
- return (await import("./mail-OVEMNODA.js")).zeroMailCommand;
247
+ return (await import("./mail-AS3PMC7N.js")).zeroMailCommand;
248
248
  }
249
249
  },
250
250
  {
251
251
  name: "credit",
252
252
  description: "View or buy credits",
253
253
  load: async () => {
254
- return (await import("./credit-OFW66JTC.js")).zeroCreditCommand;
254
+ return (await import("./credit-CKHMOX6F.js")).zeroCreditCommand;
255
255
  }
256
256
  },
257
257
  {
258
258
  name: "upgrade",
259
259
  description: "Create a workspace plan upgrade link",
260
260
  load: async () => {
261
- return (await import("./upgrade-T2PZFM3H.js")).zeroUpgradeCommand;
261
+ return (await import("./upgrade-3DANFB33.js")).zeroUpgradeCommand;
262
262
  }
263
263
  },
264
264
  {
265
265
  name: "doctor",
266
266
  description: "Diagnose runtime issues (connector health, permission denials)",
267
267
  load: async () => {
268
- return (await import("./doctor-YOA6QLSW.js")).zeroDoctorCommand;
268
+ return (await import("./doctor-EA7ECFIO.js")).zeroDoctorCommand;
269
269
  }
270
270
  },
271
271
  {
272
272
  name: "github",
273
273
  description: "Upload and download GitHub files",
274
274
  load: async () => {
275
- return (await import("./github-V2AIZ6V4.js")).zeroGithubCommand;
275
+ return (await import("./github-MXA236XO.js")).zeroGithubCommand;
276
276
  }
277
277
  },
278
278
  {
279
279
  name: "slack",
280
280
  description: "Send messages, upload files, and download files from Slack as the bot",
281
281
  load: async () => {
282
- return (await import("./slack-UDPD5UVA.js")).zeroSlackCommand;
282
+ return (await import("./slack-Z6WENJ2P.js")).zeroSlackCommand;
283
283
  }
284
284
  },
285
285
  {
286
286
  name: "feishu",
287
287
  description: "Send messages to Feishu as an organization bot",
288
288
  load: async () => {
289
- return (await import("./feishu-PENCRP3I.js")).zeroFeishuCommand;
289
+ return (await import("./feishu-4N7IWJJV.js")).zeroFeishuCommand;
290
290
  }
291
291
  },
292
292
  {
293
293
  name: "teams",
294
294
  description: "Send Microsoft Teams messages, upload files, and download files",
295
295
  load: async () => {
296
- return (await import("./teams-3NJV5VLD.js")).zeroTeamsCommand;
296
+ return (await import("./teams-ZAMCSLKG.js")).zeroTeamsCommand;
297
297
  }
298
298
  },
299
299
  {
300
300
  name: "telegram",
301
301
  description: "Inspect bots, send messages, upload files, and download files from Telegram",
302
302
  load: async () => {
303
- return (await import("./telegram-6LWQGQHT.js")).zeroTelegramCommand;
303
+ return (await import("./telegram-XJMUTZLB.js")).zeroTelegramCommand;
304
304
  }
305
305
  },
306
306
  {
307
307
  name: "phone",
308
308
  description: "Send AgentPhone messages, upload files, and download media",
309
309
  load: async () => {
310
- return (await import("./phone-PHC6VFIA.js")).zeroPhoneCommand;
310
+ return (await import("./phone-X756PGVQ.js")).zeroPhoneCommand;
311
311
  }
312
312
  },
313
313
  {
314
314
  name: "logs",
315
315
  description: "View and search agent run logs",
316
316
  load: async () => {
317
- return (await import("./logs-WD5IEUA5.js")).zeroLogsCommand;
317
+ return (await import("./logs-E4T5GFFU.js")).zeroLogsCommand;
318
318
  }
319
319
  },
320
320
  {
321
321
  name: "search",
322
322
  description: "Search logs, chat, or get a recipe for external sources",
323
323
  load: async () => {
324
- return (await import("./search-XDNOEE6X.js")).zeroSearchCommand;
324
+ return (await import("./search-ZJJINEQB.js")).zeroSearchCommand;
325
325
  }
326
326
  },
327
327
  {
328
328
  name: "chat",
329
329
  description: "Manage the current web chat thread",
330
330
  load: async () => {
331
- return (await import("./chat-VNU2U22N.js")).zeroChatCommand;
331
+ return (await import("./chat-OT3H62CI.js")).zeroChatCommand;
332
332
  }
333
333
  },
334
334
  {
335
335
  name: "resource",
336
336
  description: "Pull registry resources from private R2-backed archives",
337
337
  load: async () => {
338
- return (await import("./resource-6GERE5UR.js")).zeroResourceCommand;
338
+ return (await import("./resource-5LCV4HM6.js")).zeroResourceCommand;
339
339
  }
340
340
  },
341
341
  {
342
342
  name: "whoami",
343
343
  description: "Show agent identity, run ID, and capabilities",
344
344
  load: async () => {
345
- return (await import("./whoami-GWLDXMNP.js")).zeroWhoamiCommand;
345
+ return (await import("./whoami-HPT36I55.js")).zeroWhoamiCommand;
346
346
  }
347
347
  },
348
348
  {
@@ -356,119 +356,119 @@ var ZERO_COMMAND_DEFINITIONS = [
356
356
  name: "workflow",
357
357
  description: "Manage workflows",
358
358
  load: async () => {
359
- return (await import("./workflow-DKPLW4MQ.js")).zeroWorkflowCommand;
359
+ return (await import("./workflow-27BFGSGL.js")).zeroWorkflowCommand;
360
360
  }
361
361
  },
362
362
  {
363
363
  name: "goal",
364
364
  description: "Manage the current thread goal",
365
365
  load: async () => {
366
- return (await import("./goal-Y45PFXMF.js")).zeroGoalCommand;
366
+ return (await import("./goal-RK2DOCPU.js")).zeroGoalCommand;
367
367
  }
368
368
  },
369
369
  {
370
370
  name: "developer-support",
371
371
  description: "Submit a diagnostic report to the dev team",
372
372
  load: async () => {
373
- return (await import("./developer-support-BXOAPDP7.js")).zeroDeveloperSupportCommand;
373
+ return (await import("./developer-support-QBGR6BJO.js")).zeroDeveloperSupportCommand;
374
374
  }
375
375
  },
376
376
  {
377
377
  name: "computer-use",
378
378
  description: "Desktop app computer use through Zero CLI",
379
379
  load: async () => {
380
- return (await import("./computer-use-OBY6F7MG.js")).zeroComputerUseCommand;
380
+ return (await import("./computer-use-4QXDRG4V.js")).zeroComputerUseCommand;
381
381
  }
382
382
  },
383
383
  {
384
384
  name: "browser",
385
385
  description: "Managed remote browser sessions for agent-browser",
386
386
  load: async () => {
387
- return (await import("./browser-2RL5R75L.js")).zeroBrowserCommand;
387
+ return (await import("./browser-MWEZPQ7O.js")).zeroBrowserCommand;
388
388
  }
389
389
  },
390
390
  {
391
391
  name: "generate",
392
392
  description: "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance",
393
393
  load: async () => {
394
- return (await import("./generate-IZMDDSOO.js")).generateCommand;
394
+ return (await import("./generate-ALYUA6F7.js")).generateCommand;
395
395
  }
396
396
  },
397
397
  {
398
398
  name: "web",
399
399
  description: "Upload and download files via the web chat endpoint",
400
400
  load: async () => {
401
- return (await import("./web-PFRNVBF2.js")).zeroWebCommand;
401
+ return (await import("./web-5K2IPPWW.js")).zeroWebCommand;
402
402
  }
403
403
  },
404
404
  {
405
405
  name: "video",
406
406
  description: "Video processing utilities",
407
407
  load: async () => {
408
- return (await import("./video-WJZ6PDFP.js")).zeroVideoCommand;
408
+ return (await import("./video-QC32QN57.js")).zeroVideoCommand;
409
409
  }
410
410
  },
411
411
  {
412
412
  name: "host",
413
413
  description: "Publish static sites and clone owned hosted site files",
414
414
  load: async () => {
415
- return (await import("./host-M4NUXM62.js")).zeroHostCommand;
415
+ return (await import("./host-4NZXR7RE.js")).zeroHostCommand;
416
416
  }
417
417
  },
418
418
  {
419
419
  name: "maps",
420
420
  description: "Use managed zero maps services",
421
421
  load: async () => {
422
- return (await import("./maps-CTFMTOAJ.js")).zeroMapsCommand;
422
+ return (await import("./maps-GFGMODQZ.js")).zeroMapsCommand;
423
423
  }
424
424
  },
425
425
  {
426
426
  name: "weather",
427
427
  description: "Use managed Zero weather services",
428
428
  load: async () => {
429
- return (await import("./weather-EG7DNGFZ.js")).zeroWeatherCommand;
429
+ return (await import("./weather-CWWT2KDJ.js")).zeroWeatherCommand;
430
430
  }
431
431
  },
432
432
  {
433
433
  name: "scrape",
434
434
  description: "Scrape public web pages through managed zero scrape",
435
435
  load: async () => {
436
- return (await import("./scrape-UAWGI7FN.js")).zeroScrapeCommand;
436
+ return (await import("./scrape-6ZQMKQNG.js")).zeroScrapeCommand;
437
437
  }
438
438
  },
439
439
  {
440
440
  name: "people-search",
441
441
  description: "Find professionals through managed zero people search",
442
442
  load: async () => {
443
- return (await import("./people-search-VV3GDZDJ.js")).zeroPeopleSearchCommand;
443
+ return (await import("./people-search-PZQZLLSA.js")).zeroPeopleSearchCommand;
444
444
  }
445
445
  },
446
446
  {
447
447
  name: "web-search",
448
448
  description: "Search the public web through managed zero web search",
449
449
  load: async () => {
450
- return (await import("./web-search-733PZEHP.js")).zeroWebSearchCommand;
450
+ return (await import("./web-search-DBJMZGK4.js")).zeroWebSearchCommand;
451
451
  }
452
452
  },
453
453
  {
454
454
  name: "recognize",
455
455
  description: "Recognize one image through a managed multimodal model",
456
456
  load: async () => {
457
- return (await import("./recognize-KWIG2HNA.js")).zeroRecognizeCommand;
457
+ return (await import("./recognize-P7QG3HXA.js")).zeroRecognizeCommand;
458
458
  }
459
459
  },
460
460
  {
461
461
  name: "finance",
462
462
  description: "Query financial instruments through managed zero finance",
463
463
  load: async () => {
464
- return (await import("./finance-JRQBO4PM.js")).zeroFinanceCommand;
464
+ return (await import("./finance-KQS5IPPY.js")).zeroFinanceCommand;
465
465
  }
466
466
  },
467
467
  {
468
468
  name: "banking",
469
469
  description: "Use managed zero banking services",
470
470
  load: async () => {
471
- return (await import("./banking-D5MZDB3Q.js")).zeroBankingCommand;
471
+ return (await import("./banking-KGL4A62H.js")).zeroBankingCommand;
472
472
  }
473
473
  }
474
474
  ];
@@ -672,7 +672,7 @@ function registerZeroCommands(prog, commands, featureSwitchOverrides) {
672
672
  function createZeroProgram() {
673
673
  return new Command().name("zero").description(
674
674
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
675
- ).version("9.277.0").addHelpText("after", () => {
675
+ ).version("9.277.1").addHelpText("after", () => {
676
676
  return buildZeroHelpText();
677
677
  });
678
678
  }
@@ -1 +0,0 @@
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 JoggAiBuiltIn = \"joggAiBuiltIn\",\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 ZeroBrowser = \"zeroBrowser\",\n ZeroChatMessaging = \"zeroChatMessaging\",\n ZeroMailReplyFollowUp = \"zeroMailReplyFollowUp\",\n RustZeroCli = \"rustZeroCli\",\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 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 SidebarSubscriptionUsage = \"sidebarSubscriptionUsage\",\n TeamsIntegration = \"teamsIntegration\",\n FeishuIntegration = \"feishuIntegration\",\n StrapiIntegration = \"strapiIntegration\",\n ArtifactKeyV2 = \"artifactKeyV2\",\n HostedArtifactVersions = \"hostedArtifactVersions\",\n HtmlResourceIndex = \"htmlResourceIndex\",\n WorkflowConnectorReadiness = \"workflowConnectorReadiness\",\n ComposerConnectorPermissions = \"composerConnectorPermissions\",\n ThreeColumnNav = \"threeColumnNav\",\n ChatThreadSidebarAutoOpen = \"chatThreadSidebarAutoOpen\",\n ArtifactSidebarInlineOpen = \"artifactSidebarInlineOpen\",\n CustomConnectorCliCreate = \"customConnectorCliCreate\",\n CustomConnectorOAuth2 = \"customConnectorOAuth2\",\n MermaidDiagrams = \"mermaidDiagrams\",\n CustomConnectorPermissions = \"customConnectorPermissions\",\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. Every registered switch accepts user overrides\n * through `POST /api/zero/feature-switches`. 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}\n\nexport interface FeatureSwitchMetadata {\n readonly maintainer: string;\n readonly description?: string;\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: true,\n },\n [FeatureSwitchKey.GoogleFormsConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the Google Forms connector\",\n enabled: true,\n },\n [FeatureSwitchKey.JoggAiConnector]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable the JoggAI video generation connector\",\n enabled: true,\n },\n [FeatureSwitchKey.JoggAiBuiltIn]: {\n maintainer: \"yuma@vm0.ai\",\n description: \"Enable vm0-managed JoggAI talking-avatar video generation\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\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.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 },\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 },\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 },\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 },\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 },\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 },\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 },\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.MermaidDiagrams]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Render ```mermaid code blocks in assistant markdown as diagrams, and tell the web chat agent that they are rendered.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\n },\n [FeatureSwitchKey.ArtifactSidebarInlineOpen]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Open an artifact clicked in a chat thread inside the already-open artifact sidebar instead of stacking the page-global lightbox over it.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\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.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 },\n [FeatureSwitchKey.ArtifactKeyV2]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Store new user artifacts under flat, ten-character hashed public keys.\",\n enabled: true,\n },\n [FeatureSwitchKey.HostedArtifactVersions]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Create immutable hosted artifact versions behind stable site aliases.\",\n enabled: true,\n },\n [FeatureSwitchKey.HtmlResourceIndex]: {\n maintainer: \"bingjie@vm0.ai\",\n description:\n \"Use target-specific static indexes for HTML generation resource selection.\",\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 },\n [FeatureSwitchKey.ZeroMailReplyFollowUp]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Enable Zero Mail reply follow-up for staff after all API deployments can read Gmail event configurations with threadId.\",\n enabled: false,\n enabledOrgIdHashes: STAFF_ORG_ID_HASHES,\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.RustZeroCli]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Use the runner-bundled Rust zero-cli entry point for Zero CLI commands.\",\n enabled: false,\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 },\n [FeatureSwitchKey.CustomConnectorCliCreate]: {\n maintainer: \"liangyou@vm0.ai\",\n description:\n \"Allow Zero CLI agents to create and configure custom connectors directly.\",\n enabled: true,\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: true,\n },\n [FeatureSwitchKey.CustomConnectorPermissions]: {\n maintainer: \"yuma@vm0.ai\",\n description:\n \"Allow users to manage agent permission grants for custom connectors.\",\n enabled: 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 };\n }\n return result;\n}\n\n/** Keep overrides for currently registered feature switches. */\nexport function filterFeatureSwitchOverrides(\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 (key in FEATURE_SWITCHES) {\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;;;ADSA,IAAM,qCAAqC;AAAA,EACzC,GAAG;AAAA,EACH;AAAA;AACF;AAKA,IAAM,mBAA4D;AAAA,EAChE,oBAAuB,GAAG;AAAA,IACxB,YAAY;AAAA,I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