@vm0/cli 9.268.0 → 9.269.0

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 (112) hide show
  1. package/{agent-4QRFYL6Q.js → agent-VK7PFHFX.js} +11 -11
  2. package/agent-VK7PFHFX.js.map +1 -0
  3. package/{banking-VKKVWIYX.js → banking-GD4YJ7QA.js} +4 -4
  4. package/{browser-VFBMLIUS.js → browser-T44LR4CD.js} +4 -4
  5. package/{chat-KQRKGQKS.js → chat-GC5PXDMC.js} +5 -5
  6. package/{chunk-CZA5MW3N.js → chunk-3ZIEOU43.js} +15 -17
  7. package/chunk-3ZIEOU43.js.map +1 -0
  8. package/{chunk-TNDBFUFP.js → chunk-4WDDMKO6.js} +1 -6
  9. package/chunk-4WDDMKO6.js.map +1 -0
  10. package/{chunk-7I3P4REZ.js → chunk-5WCJ4YK2.js} +2 -2
  11. package/{chunk-VGPSGL5S.js → chunk-73DZG6Q7.js} +138 -57
  12. package/chunk-73DZG6Q7.js.map +1 -0
  13. package/{chunk-4JA54Z75.js → chunk-C6ZDYQZB.js} +2 -2
  14. package/{chunk-QSWNNYV4.js → chunk-HWHNQPKS.js} +92 -6
  15. package/chunk-HWHNQPKS.js.map +1 -0
  16. package/{chunk-C6KDTR5A.js → chunk-NGXH4WMD.js} +29 -29
  17. package/chunk-NGXH4WMD.js.map +1 -0
  18. package/chunk-PNFIYMDN.js +22 -0
  19. package/chunk-PNFIYMDN.js.map +1 -0
  20. package/{chunk-DTZW7RES.js → chunk-Q4PS674D.js} +2 -2
  21. package/{chunk-ISZ5CKJ3.js → chunk-X24DXUXC.js} +2 -2
  22. package/{computer-use-LTZEVHCS.js → computer-use-K56KV7VB.js} +4 -4
  23. package/{connector-MY7K7RJN.js → connector-QQWAHPS4.js} +46 -47
  24. package/connector-QQWAHPS4.js.map +1 -0
  25. package/{credit-LDEHJIJT.js → credit-ROARDLCA.js} +5 -5
  26. package/{developer-support-ROATSWMP.js → developer-support-UDMUZCE3.js} +4 -4
  27. package/{doctor-3P6KUY4D.js → doctor-RGYXFZHU.js} +5 -5
  28. package/{feishu-PHKR2Q36.js → feishu-OBNUWOA2.js} +4 -4
  29. package/{finance-3LM55SWD.js → finance-F6O6Y6PV.js} +4 -4
  30. package/{generate-23ZOL7AI.js → generate-MUXDMLOJ.js} +10 -10
  31. package/generate-MUXDMLOJ.js.map +1 -0
  32. package/{github-SC4AB2Q2.js → github-2C7AOKI4.js} +4 -4
  33. package/{goal-FTWV2ADK.js → goal-W3LM6XZV.js} +4 -4
  34. package/{host-L4BEXBPB.js → host-P7D2E62D.js} +4 -4
  35. package/{logs-TICCUASU.js → logs-BAHOQLAE.js} +6 -6
  36. package/{mail-ZUBVNRJW.js → mail-VKEHKTZI.js} +6 -6
  37. package/{maps-UAKTZSO2.js → maps-NZTI34NQ.js} +4 -4
  38. package/{model-3N3ZWLZM.js → model-IR6ZDEE2.js} +5 -5
  39. package/{model-provider-RI26N5OQ.js → model-provider-DFX4CPKT.js} +5 -5
  40. package/{org-IEYB2WBO.js → org-XVM6CZTT.js} +4 -4
  41. package/package.json +1 -1
  42. package/{people-search-5S4TV7RL.js → people-search-IV3H5OUA.js} +4 -4
  43. package/{phone-XV2LWGQT.js → phone-HUY6BIZX.js} +4 -4
  44. package/{preference-6XHDDQUW.js → preference-HMVK2L5M.js} +4 -4
  45. package/{resource-HXS7RGBP.js → resource-5UIGWAZD.js} +4 -4
  46. package/{scrape-NU6T5BQE.js → scrape-OYG3NWYJ.js} +4 -4
  47. package/{search-FDG26NWA.js → search-NRTKXEOM.js} +6 -6
  48. package/{secret-HN3R3V32.js → secret-3AIMSGWX.js} +4 -4
  49. package/{slack-IWEZU6HY.js → slack-SBHKIKCI.js} +4 -4
  50. package/{teams-6VZAWVC6.js → teams-Y7RWSTVP.js} +4 -4
  51. package/{telegram-UTCDO5ZB.js → telegram-MVCNV2KP.js} +4 -4
  52. package/{upgrade-EX2F7BFJ.js → upgrade-2SNSYI66.js} +3 -3
  53. package/{variable-U67PHCBZ.js → variable-ZUQ7J3X2.js} +4 -4
  54. package/{video-GTQQSN6W.js → video-TDGGCC4I.js} +3 -3
  55. package/{weather-NMEINAIZ.js → weather-CVL343M4.js} +4 -4
  56. package/{web-YC7E327U.js → web-M5AW34U4.js} +4 -4
  57. package/{web-search-TCWP5NDJ.js → web-search-C2BOORHI.js} +4 -4
  58. package/{whoami-KACAW67A.js → whoami-TWCA5HMI.js} +13 -13
  59. package/whoami-TWCA5HMI.js.map +1 -0
  60. package/{workflow-TKJF2YY2.js → workflow-QAMRYA5T.js} +99 -8
  61. package/workflow-QAMRYA5T.js.map +1 -0
  62. package/zero.js +43 -43
  63. package/agent-4QRFYL6Q.js.map +0 -1
  64. package/chunk-C6KDTR5A.js.map +0 -1
  65. package/chunk-CZA5MW3N.js.map +0 -1
  66. package/chunk-QSWNNYV4.js.map +0 -1
  67. package/chunk-TNDBFUFP.js.map +0 -1
  68. package/chunk-VGPSGL5S.js.map +0 -1
  69. package/chunk-ZL7WFWOC.js +0 -97
  70. package/chunk-ZL7WFWOC.js.map +0 -1
  71. package/connector-MY7K7RJN.js.map +0 -1
  72. package/generate-23ZOL7AI.js.map +0 -1
  73. package/whoami-KACAW67A.js.map +0 -1
  74. package/workflow-TKJF2YY2.js.map +0 -1
  75. /package/{banking-VKKVWIYX.js.map → banking-GD4YJ7QA.js.map} +0 -0
  76. /package/{browser-VFBMLIUS.js.map → browser-T44LR4CD.js.map} +0 -0
  77. /package/{chat-KQRKGQKS.js.map → chat-GC5PXDMC.js.map} +0 -0
  78. /package/{chunk-7I3P4REZ.js.map → chunk-5WCJ4YK2.js.map} +0 -0
  79. /package/{chunk-4JA54Z75.js.map → chunk-C6ZDYQZB.js.map} +0 -0
  80. /package/{chunk-DTZW7RES.js.map → chunk-Q4PS674D.js.map} +0 -0
  81. /package/{chunk-ISZ5CKJ3.js.map → chunk-X24DXUXC.js.map} +0 -0
  82. /package/{computer-use-LTZEVHCS.js.map → computer-use-K56KV7VB.js.map} +0 -0
  83. /package/{credit-LDEHJIJT.js.map → credit-ROARDLCA.js.map} +0 -0
  84. /package/{developer-support-ROATSWMP.js.map → developer-support-UDMUZCE3.js.map} +0 -0
  85. /package/{doctor-3P6KUY4D.js.map → doctor-RGYXFZHU.js.map} +0 -0
  86. /package/{feishu-PHKR2Q36.js.map → feishu-OBNUWOA2.js.map} +0 -0
  87. /package/{finance-3LM55SWD.js.map → finance-F6O6Y6PV.js.map} +0 -0
  88. /package/{github-SC4AB2Q2.js.map → github-2C7AOKI4.js.map} +0 -0
  89. /package/{goal-FTWV2ADK.js.map → goal-W3LM6XZV.js.map} +0 -0
  90. /package/{host-L4BEXBPB.js.map → host-P7D2E62D.js.map} +0 -0
  91. /package/{logs-TICCUASU.js.map → logs-BAHOQLAE.js.map} +0 -0
  92. /package/{mail-ZUBVNRJW.js.map → mail-VKEHKTZI.js.map} +0 -0
  93. /package/{maps-UAKTZSO2.js.map → maps-NZTI34NQ.js.map} +0 -0
  94. /package/{model-3N3ZWLZM.js.map → model-IR6ZDEE2.js.map} +0 -0
  95. /package/{model-provider-RI26N5OQ.js.map → model-provider-DFX4CPKT.js.map} +0 -0
  96. /package/{org-IEYB2WBO.js.map → org-XVM6CZTT.js.map} +0 -0
  97. /package/{people-search-5S4TV7RL.js.map → people-search-IV3H5OUA.js.map} +0 -0
  98. /package/{phone-XV2LWGQT.js.map → phone-HUY6BIZX.js.map} +0 -0
  99. /package/{preference-6XHDDQUW.js.map → preference-HMVK2L5M.js.map} +0 -0
  100. /package/{resource-HXS7RGBP.js.map → resource-5UIGWAZD.js.map} +0 -0
  101. /package/{scrape-NU6T5BQE.js.map → scrape-OYG3NWYJ.js.map} +0 -0
  102. /package/{search-FDG26NWA.js.map → search-NRTKXEOM.js.map} +0 -0
  103. /package/{secret-HN3R3V32.js.map → secret-3AIMSGWX.js.map} +0 -0
  104. /package/{slack-IWEZU6HY.js.map → slack-SBHKIKCI.js.map} +0 -0
  105. /package/{teams-6VZAWVC6.js.map → teams-Y7RWSTVP.js.map} +0 -0
  106. /package/{telegram-UTCDO5ZB.js.map → telegram-MVCNV2KP.js.map} +0 -0
  107. /package/{upgrade-EX2F7BFJ.js.map → upgrade-2SNSYI66.js.map} +0 -0
  108. /package/{variable-U67PHCBZ.js.map → variable-ZUQ7J3X2.js.map} +0 -0
  109. /package/{video-GTQQSN6W.js.map → video-TDGGCC4I.js.map} +0 -0
  110. /package/{weather-NMEINAIZ.js.map → weather-CVL343M4.js.map} +0 -0
  111. /package/{web-YC7E327U.js.map → web-M5AW34U4.js.map} +0 -0
  112. /package/{web-search-TCWP5NDJ.js.map → web-search-C2BOORHI.js.map} +0 -0
@@ -25,16 +25,16 @@ import {
25
25
  listZeroModelPolicies,
26
26
  updateWorkflow,
27
27
  updateWorkflowAutomation
28
- } from "./chunk-VGPSGL5S.js";
29
- import "./chunk-ISZ5CKJ3.js";
28
+ } from "./chunk-73DZG6Q7.js";
29
+ import "./chunk-X24DXUXC.js";
30
30
  import "./chunk-MA22KQYU.js";
31
31
  import {
32
32
  source_default,
33
33
  withErrorHandler
34
- } from "./chunk-DTZW7RES.js";
34
+ } from "./chunk-Q4PS674D.js";
35
35
  import {
36
36
  isFeatureEnabled
37
- } from "./chunk-TNDBFUFP.js";
37
+ } from "./chunk-4WDDMKO6.js";
38
38
  import {
39
39
  decodeZeroTokenPayload
40
40
  } from "./chunk-MD3YWUKO.js";
@@ -503,6 +503,11 @@ var GMAIL_TEXT_FIELDS = [
503
503
  "to",
504
504
  "cc"
505
505
  ];
506
+ function chatRunFinishedKindLabel(eventConfig) {
507
+ const statuses = eventConfig.runStatuses?.join(",") ?? "any";
508
+ const pattern = eventConfig.outputPattern ? ` matching "${eventConfig.outputPattern}"` : "";
509
+ return `Chat run finished (${statuses})${pattern}: ${eventConfig.chatThreadId}`;
510
+ }
506
511
  function isWebhookAutomation(automation) {
507
512
  return automation.kind === "event" && automation.eventType === "webhook-received";
508
513
  }
@@ -629,6 +634,8 @@ function workflowAutomationKindLabel(automation) {
629
634
  return formatWorkflowAutomationEntry(automation);
630
635
  }
631
636
  switch (automation.eventType) {
637
+ case "chat-run-finished":
638
+ return chatRunFinishedKindLabel(automation.eventConfig);
632
639
  case "gmail-new-message":
633
640
  return "Gmail new message";
634
641
  case "gmail-label-applied":
@@ -1264,6 +1271,12 @@ var GITHUB_WEBHOOK_EVENT_KINDS = [
1264
1271
  "github-issue-comment-created"
1265
1272
  ];
1266
1273
  var STRAPI_EVENT_KINDS = ["strapi-entry-published"];
1274
+ var CHAT_EVENT_KINDS = ["chat-run-finished"];
1275
+ var CHAT_RUN_FINISHED_STATUSES = [
1276
+ "completed",
1277
+ "failed",
1278
+ "cancelled"
1279
+ ];
1267
1280
  function githubWebhookAutomationsEnabled() {
1268
1281
  const payload = decodeZeroTokenPayload();
1269
1282
  return isFeatureEnabled("githubWebhookAutomations" /* GithubWebhookAutomations */, {
@@ -1271,6 +1284,13 @@ function githubWebhookAutomationsEnabled() {
1271
1284
  orgId: payload?.orgId
1272
1285
  });
1273
1286
  }
1287
+ function zeroChatMessagingEnabled() {
1288
+ const payload = decodeZeroTokenPayload();
1289
+ return isFeatureEnabled("zeroChatMessaging" /* ZeroChatMessaging */, {
1290
+ userId: payload?.userId,
1291
+ orgId: payload?.orgId
1292
+ });
1293
+ }
1274
1294
  function strapiIntegrationEnabled() {
1275
1295
  const payload = decodeZeroTokenPayload();
1276
1296
  return isFeatureEnabled("strapiIntegration" /* StrapiIntegration */, {
@@ -1283,7 +1303,8 @@ function automationKinds() {
1283
1303
  ...SCHEDULE_KINDS,
1284
1304
  ...EVENT_KINDS,
1285
1305
  ...githubWebhookAutomationsEnabled() ? GITHUB_WEBHOOK_EVENT_KINDS : [],
1286
- ...strapiIntegrationEnabled() ? STRAPI_EVENT_KINDS : []
1306
+ ...strapiIntegrationEnabled() ? STRAPI_EVENT_KINDS : [],
1307
+ ...zeroChatMessagingEnabled() ? CHAT_EVENT_KINDS : []
1287
1308
  ];
1288
1309
  }
1289
1310
  async function loadWorkflowAutomationThreadModel(automation) {
@@ -1605,8 +1626,11 @@ function hasNotionAutomationOptions(options) {
1605
1626
  function hasStrapiAutomationOptions(options) {
1606
1627
  return options.integrationId !== void 0 || options.contentTypeUid !== void 0 || options.locale !== void 0;
1607
1628
  }
1629
+ function hasChatRunFinishedAutomationOptions(options) {
1630
+ return options.chatThreadId !== void 0 || options.runStatus !== void 0 || options.outputPattern !== void 0;
1631
+ }
1608
1632
  function hasEventAddOptions(options) {
1609
- return hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options) || hasStrapiAutomationOptions(options);
1633
+ return hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options) || hasStrapiAutomationOptions(options) || hasChatRunFinishedAutomationOptions(options);
1610
1634
  }
1611
1635
  function assertNoScheduleAddOptions(options) {
1612
1636
  if (hasScheduleAddOptions(options)) {
@@ -2235,6 +2259,56 @@ function buildNotionPageContentUpdatedCreateRequest(options) {
2235
2259
  }
2236
2260
  };
2237
2261
  }
2262
+ function parseChatRunFinishedStatuses(value) {
2263
+ const statuses = value.split(",").map((status) => {
2264
+ return status.trim();
2265
+ }).filter((status) => {
2266
+ return status.length > 0;
2267
+ });
2268
+ if (statuses.length === 0) {
2269
+ throw new Error(
2270
+ `--run-status requires at least one of: ${CHAT_RUN_FINISHED_STATUSES.join(", ")}`
2271
+ );
2272
+ }
2273
+ return statuses.map((status) => {
2274
+ const match = CHAT_RUN_FINISHED_STATUSES.find((candidate) => {
2275
+ return candidate === status;
2276
+ });
2277
+ if (!match) {
2278
+ throw new Error(
2279
+ `Invalid --run-status value "${status}"; expected one of: ${CHAT_RUN_FINISHED_STATUSES.join(", ")}`
2280
+ );
2281
+ }
2282
+ return match;
2283
+ });
2284
+ }
2285
+ function buildChatRunFinishedCreateRequest(options) {
2286
+ assertNoScheduleAddOptions(options);
2287
+ if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options) || hasStrapiAutomationOptions(options)) {
2288
+ throw new Error(
2289
+ "Only --chat-thread-id, --run-status, and --output-pattern apply to chat-run-finished automations"
2290
+ );
2291
+ }
2292
+ const chatThreadId = options.chatThreadId?.trim();
2293
+ if (!chatThreadId) {
2294
+ throw new Error(
2295
+ "chat-run-finished automations require --chat-thread-id <uuid>"
2296
+ );
2297
+ }
2298
+ const runStatuses = options.runStatus === void 0 ? void 0 : parseChatRunFinishedStatuses(options.runStatus);
2299
+ const outputPattern = options.outputPattern?.trim();
2300
+ return {
2301
+ kind: "event",
2302
+ eventType: "chat-run-finished",
2303
+ eventConfig: {
2304
+ provider: "chat",
2305
+ event: "run_finished",
2306
+ chatThreadId,
2307
+ ...runStatuses ? { runStatuses } : {},
2308
+ ...outputPattern ? { outputPattern } : {}
2309
+ }
2310
+ };
2311
+ }
2238
2312
  function buildWebhookCreateRequest(options) {
2239
2313
  assertNoScheduleAddOptions(options);
2240
2314
  if (hasEventAddOptions(options)) {
@@ -2315,6 +2389,8 @@ function buildCreateRequest(kind, options) {
2315
2389
  return buildNotionPageContentUpdatedCreateRequest(options);
2316
2390
  case "strapi-entry-published":
2317
2391
  return buildStrapiEntryPublishedCreateRequest(options);
2392
+ case "chat-run-finished":
2393
+ return buildChatRunFinishedCreateRequest(options);
2318
2394
  case "webhook":
2319
2395
  return buildWebhookCreateRequest(options);
2320
2396
  default:
@@ -2570,7 +2646,16 @@ var addCommand = addGithubAutomationOptions(
2570
2646
  ).option(
2571
2647
  "--content-type-uid <uid>",
2572
2648
  "Optional Strapi content type UID, for example api::article.article"
2573
- ).option("--locale <locale>", "Optional Strapi locale filter").option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
2649
+ ).option("--locale <locale>", "Optional Strapi locale filter").option(
2650
+ "--chat-thread-id <uuid>",
2651
+ "Watched chat thread ID for chat-run-finished automations"
2652
+ ).option(
2653
+ "--run-status <statuses>",
2654
+ "Comma-separated finish statuses for chat-run-finished automations: completed, failed, cancelled (default: all)"
2655
+ ).option(
2656
+ "--output-pattern <pattern>",
2657
+ "Optional * wildcard matched against the finished run's final assistant text"
2658
+ ).option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
2574
2659
  "after",
2575
2660
  `
2576
2661
  Examples:
@@ -2591,6 +2676,7 @@ Examples:
2591
2676
  zero workflow automation add research-notes --agent <agent-id> notion-page-content-updated --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
2592
2677
  zero workflow automation add deploy-blog --agent <agent-id> strapi-entry-published --integration-id <uuid> --content-type-uid api::article.article
2593
2678
  zero workflow automation add triage --agent <agent-id> webhook
2679
+ zero workflow automation add follow-up --agent <agent-id> chat-run-finished --chat-thread-id <thread-uuid> --run-status completed,failed --output-pattern "*deploy failed*"
2594
2680
 
2595
2681
  Notes:
2596
2682
  - Workflow names resolve under --agent, then ZERO_AGENT_ID
@@ -2612,6 +2698,11 @@ Notes:
2612
2698
  "Strapi workflow automations are not enabled for this workspace"
2613
2699
  );
2614
2700
  }
2701
+ if (kind === "chat-run-finished" && !zeroChatMessagingEnabled()) {
2702
+ throw new Error(
2703
+ "Chat run finished automations are not enabled for this workspace"
2704
+ );
2705
+ }
2615
2706
  if (options.timezone && kind !== "cron" && kind !== "once" && kind !== "gmail-new-message") {
2616
2707
  throw new Error(
2617
2708
  "--timezone only applies to cron and once automations"
@@ -2757,4 +2848,4 @@ Examples:
2757
2848
  export {
2758
2849
  zeroWorkflowCommand
2759
2850
  };
2760
- //# sourceMappingURL=workflow-TKJF2YY2.js.map
2851
+ //# sourceMappingURL=workflow-QAMRYA5T.js.map