@vm0/cli 9.240.1 → 9.240.3

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 (92) hide show
  1. package/{agent-CC6SKDTE.js → agent-UU6BOD2Y.js} +5 -5
  2. package/{banking-KWWMVUGE.js → banking-TZDM6FPW.js} +3 -3
  3. package/{chat-EB6RKC6E.js → chat-VK7ROWG4.js} +4 -4
  4. package/{chunk-GV7CTPQI.js → chunk-23L3UUHO.js} +2 -2
  5. package/{chunk-GV7CTPQI.js.map → chunk-23L3UUHO.js.map} +1 -1
  6. package/{chunk-6F7XCWTU.js → chunk-3B4I4CZP.js} +2 -2
  7. package/{chunk-6F7XCWTU.js.map → chunk-3B4I4CZP.js.map} +1 -1
  8. package/{chunk-6ALDWWYS.js → chunk-FPEMD2NK.js} +2 -2
  9. package/{chunk-N6YH4JM3.js → chunk-IE6CD57U.js} +249 -170
  10. package/{chunk-N6YH4JM3.js.map → chunk-IE6CD57U.js.map} +1 -1
  11. package/{chunk-JWMJI6LS.js → chunk-IS7CXTNO.js} +4 -4
  12. package/{chunk-T5QRISGA.js → chunk-MKADDVH4.js} +19 -12
  13. package/chunk-MKADDVH4.js.map +1 -0
  14. package/{chunk-TYAWHQIR.js → chunk-MZ5MFXZ2.js} +2 -2
  15. package/{chunk-P4YM6FO3.js → chunk-TFOOMGCO.js} +3 -3
  16. package/{chunk-BESFDD3J.js → chunk-XQJWG3AG.js} +4 -4
  17. package/{chunk-GCIVQ5K7.js → chunk-YZCOVBMW.js} +9 -6
  18. package/chunk-YZCOVBMW.js.map +1 -0
  19. package/{computer-use-426SRXJY.js → computer-use-KTH27AG6.js} +3 -3
  20. package/{connector-6YIJ22VY.js → connector-5FB755QM.js} +4 -4
  21. package/{credit-MFMIQSDG.js → credit-TYXZRPFJ.js} +4 -4
  22. package/{developer-support-4O3ZV5VX.js → developer-support-YABCSEMY.js} +3 -3
  23. package/{doctor-YAHO7PJO.js → doctor-NV2P53SL.js} +5 -5
  24. package/{generate-CRNYFBIA.js → generate-ZEZEBATN.js} +5 -5
  25. package/{github-IZZ5W7R6.js → github-QQD7WEMP.js} +3 -3
  26. package/{goal-VIHAN4UG.js → goal-PB4CUVZA.js} +3 -3
  27. package/{host-AU4NSTEP.js → host-S3MAPKUG.js} +3 -3
  28. package/index.js +13 -13
  29. package/{logs-5MBUXZNI.js → logs-MLHFYXLR.js} +6 -6
  30. package/{maps-A4LBRA2Y.js → maps-IZRQS3JF.js} +3 -3
  31. package/{memory-4PLVIY7G.js → memory-J2WMMWSW.js} +3 -3
  32. package/{model-W34GOPB2.js → model-AWWXJUSK.js} +4 -4
  33. package/{model-provider-JMMU4LX3.js → model-provider-2IGQIWVG.js} +4 -4
  34. package/{org-FTGVJKXD.js → org-UYMEOGMZ.js} +3 -3
  35. package/package.json +1 -1
  36. package/{phone-PWHTCFSV.js → phone-26UXR2H2.js} +3 -3
  37. package/{preference-FMWABHOM.js → preference-DBYEHWGL.js} +3 -3
  38. package/{relationship-JK3EQGKR.js → relationship-PXMVIY2D.js} +3 -3
  39. package/{resource-VYIAC4ZQ.js → resource-FNKXDYGT.js} +4 -4
  40. package/{scrape-6EWMP2VJ.js → scrape-UYHZKOR7.js} +3 -3
  41. package/{search-333ILFPD.js → search-ABLZROBC.js} +6 -6
  42. package/{secret-XZFCBXQ4.js → secret-O5WPHVWS.js} +3 -3
  43. package/{slack-Y55PSFEQ.js → slack-HKNKQ4RF.js} +3 -3
  44. package/{teams-MU7O2ZUN.js → teams-4QW3KZWP.js} +3 -3
  45. package/{telegram-JVCLCOBW.js → telegram-K3XIZ7A2.js} +3 -3
  46. package/{variable-M32OKII3.js → variable-LY3F7PLD.js} +3 -3
  47. package/{video-EYLIFRKL.js → video-UY3U3BVR.js} +2 -2
  48. package/{web-MWIJ225B.js → web-K36WUVBQ.js} +3 -3
  49. package/{whoami-C7WISJD6.js → whoami-SECUPAZ5.js} +5 -5
  50. package/{workflow-NSKFK6TX.js → workflow-Q2XBT6JV.js} +292 -263
  51. package/workflow-Q2XBT6JV.js.map +1 -0
  52. package/zero.js +35 -35
  53. package/chunk-GCIVQ5K7.js.map +0 -1
  54. package/chunk-T5QRISGA.js.map +0 -1
  55. package/workflow-NSKFK6TX.js.map +0 -1
  56. /package/{agent-CC6SKDTE.js.map → agent-UU6BOD2Y.js.map} +0 -0
  57. /package/{banking-KWWMVUGE.js.map → banking-TZDM6FPW.js.map} +0 -0
  58. /package/{chat-EB6RKC6E.js.map → chat-VK7ROWG4.js.map} +0 -0
  59. /package/{chunk-6ALDWWYS.js.map → chunk-FPEMD2NK.js.map} +0 -0
  60. /package/{chunk-JWMJI6LS.js.map → chunk-IS7CXTNO.js.map} +0 -0
  61. /package/{chunk-TYAWHQIR.js.map → chunk-MZ5MFXZ2.js.map} +0 -0
  62. /package/{chunk-P4YM6FO3.js.map → chunk-TFOOMGCO.js.map} +0 -0
  63. /package/{chunk-BESFDD3J.js.map → chunk-XQJWG3AG.js.map} +0 -0
  64. /package/{computer-use-426SRXJY.js.map → computer-use-KTH27AG6.js.map} +0 -0
  65. /package/{connector-6YIJ22VY.js.map → connector-5FB755QM.js.map} +0 -0
  66. /package/{credit-MFMIQSDG.js.map → credit-TYXZRPFJ.js.map} +0 -0
  67. /package/{developer-support-4O3ZV5VX.js.map → developer-support-YABCSEMY.js.map} +0 -0
  68. /package/{doctor-YAHO7PJO.js.map → doctor-NV2P53SL.js.map} +0 -0
  69. /package/{generate-CRNYFBIA.js.map → generate-ZEZEBATN.js.map} +0 -0
  70. /package/{github-IZZ5W7R6.js.map → github-QQD7WEMP.js.map} +0 -0
  71. /package/{goal-VIHAN4UG.js.map → goal-PB4CUVZA.js.map} +0 -0
  72. /package/{host-AU4NSTEP.js.map → host-S3MAPKUG.js.map} +0 -0
  73. /package/{logs-5MBUXZNI.js.map → logs-MLHFYXLR.js.map} +0 -0
  74. /package/{maps-A4LBRA2Y.js.map → maps-IZRQS3JF.js.map} +0 -0
  75. /package/{memory-4PLVIY7G.js.map → memory-J2WMMWSW.js.map} +0 -0
  76. /package/{model-W34GOPB2.js.map → model-AWWXJUSK.js.map} +0 -0
  77. /package/{model-provider-JMMU4LX3.js.map → model-provider-2IGQIWVG.js.map} +0 -0
  78. /package/{org-FTGVJKXD.js.map → org-UYMEOGMZ.js.map} +0 -0
  79. /package/{phone-PWHTCFSV.js.map → phone-26UXR2H2.js.map} +0 -0
  80. /package/{preference-FMWABHOM.js.map → preference-DBYEHWGL.js.map} +0 -0
  81. /package/{relationship-JK3EQGKR.js.map → relationship-PXMVIY2D.js.map} +0 -0
  82. /package/{resource-VYIAC4ZQ.js.map → resource-FNKXDYGT.js.map} +0 -0
  83. /package/{scrape-6EWMP2VJ.js.map → scrape-UYHZKOR7.js.map} +0 -0
  84. /package/{search-333ILFPD.js.map → search-ABLZROBC.js.map} +0 -0
  85. /package/{secret-XZFCBXQ4.js.map → secret-O5WPHVWS.js.map} +0 -0
  86. /package/{slack-Y55PSFEQ.js.map → slack-HKNKQ4RF.js.map} +0 -0
  87. /package/{teams-MU7O2ZUN.js.map → teams-4QW3KZWP.js.map} +0 -0
  88. /package/{telegram-JVCLCOBW.js.map → telegram-K3XIZ7A2.js.map} +0 -0
  89. /package/{variable-M32OKII3.js.map → variable-LY3F7PLD.js.map} +0 -0
  90. /package/{video-EYLIFRKL.js.map → video-UY3U3BVR.js.map} +0 -0
  91. /package/{web-MWIJ225B.js.map → web-K36WUVBQ.js.map} +0 -0
  92. /package/{whoami-C7WISJD6.js.map → whoami-SECUPAZ5.js.map} +0 -0
@@ -8,23 +8,23 @@ import {
8
8
  import {
9
9
  copyWorkflow,
10
10
  createWorkflow,
11
- createWorkflowTrigger,
11
+ createWorkflowAutomation,
12
12
  deleteWorkflow,
13
- deleteWorkflowTrigger,
14
- disableWorkflowTrigger,
15
- enableWorkflowTrigger,
13
+ deleteWorkflowAutomation,
14
+ disableWorkflowAutomation,
15
+ enableWorkflowAutomation,
16
16
  getWorkflow,
17
- getWorkflowTrigger,
18
- listWorkflowTriggers,
17
+ getWorkflowAutomation,
18
+ listWorkflowAutomations,
19
19
  listWorkflows,
20
20
  updateWorkflow,
21
- updateWorkflowTrigger
22
- } from "./chunk-N6YH4JM3.js";
21
+ updateWorkflowAutomation
22
+ } from "./chunk-IE6CD57U.js";
23
23
  import "./chunk-LTDQISD7.js";
24
24
  import {
25
25
  source_default,
26
26
  withErrorHandler
27
- } from "./chunk-GV7CTPQI.js";
27
+ } from "./chunk-23L3UUHO.js";
28
28
  import "./chunk-LRHXR7JT.js";
29
29
  import {
30
30
  Command
@@ -442,7 +442,7 @@ Examples:
442
442
  )
443
443
  );
444
444
 
445
- // src/commands/zero/workflow/trigger/index.ts
445
+ // src/commands/zero/workflow/automation/index.ts
446
446
  init_esm_shims();
447
447
 
448
448
  // src/commands/zero/shared/duration.ts
@@ -480,7 +480,7 @@ function formatDurationSeconds(seconds) {
480
480
  return `${seconds}s`;
481
481
  }
482
482
 
483
- // src/commands/zero/workflow/trigger/display.ts
483
+ // src/commands/zero/workflow/automation/display.ts
484
484
  init_esm_shims();
485
485
 
486
486
  // src/lib/domain/relative-time.ts
@@ -506,7 +506,7 @@ function formatRelativeTime(dateStr) {
506
506
  }
507
507
  }
508
508
 
509
- // src/commands/zero/workflow/trigger/display.ts
509
+ // src/commands/zero/workflow/automation/display.ts
510
510
  var GMAIL_TEXT_FIELDS = [
511
511
  "from",
512
512
  "subject",
@@ -514,20 +514,20 @@ var GMAIL_TEXT_FIELDS = [
514
514
  "to",
515
515
  "cc"
516
516
  ];
517
- function isWebhookTrigger(trigger) {
518
- return trigger.kind === "event" && trigger.eventType === "webhook-received";
517
+ function isWebhookAutomation(automation) {
518
+ return automation.kind === "event" && automation.eventType === "webhook-received";
519
519
  }
520
- function isNotionChildPageTrigger(trigger) {
521
- return trigger.kind === "event" && trigger.eventType === "notion-child-page-created";
520
+ function isNotionChildPageAutomation(automation) {
521
+ return automation.kind === "event" && automation.eventType === "notion-child-page-created";
522
522
  }
523
- function isNotionDatabaseItemTrigger(trigger) {
524
- return trigger.kind === "event" && trigger.eventType === "notion-database-item-created";
523
+ function isNotionDatabaseItemAutomation(automation) {
524
+ return automation.kind === "event" && automation.eventType === "notion-database-item-created";
525
525
  }
526
- function isNotionPageContentUpdatedTrigger(trigger) {
527
- return trigger.kind === "event" && trigger.eventType === "notion-page-content-updated";
526
+ function isNotionPageContentUpdatedAutomation(automation) {
527
+ return automation.kind === "event" && automation.eventType === "notion-page-content-updated";
528
528
  }
529
- function isGoogleCalendarTrigger(trigger) {
530
- return trigger.kind === "event" && (trigger.eventType === "google-calendar-event-created" || trigger.eventType === "google-calendar-event-updated" || trigger.eventType === "google-calendar-event-cancelled");
529
+ function isGoogleCalendarAutomation(automation) {
530
+ return automation.kind === "event" && (automation.eventType === "google-calendar-event-created" || automation.eventType === "google-calendar-event-updated" || automation.eventType === "google-calendar-event-cancelled");
531
531
  }
532
532
  function quote(value) {
533
533
  return `"${value}"`;
@@ -573,52 +573,52 @@ function formatGithubSubject(subject) {
573
573
  }
574
574
  return subject;
575
575
  }
576
- function formatWebhookTriggerEntry(trigger) {
577
- return `Webhook: ${trigger.webhookUrl ?? "hidden"}`;
576
+ function formatWebhookAutomationEntry(automation) {
577
+ return `Webhook: ${automation.webhookUrl ?? "hidden"}`;
578
578
  }
579
- function formatNotionParentPage(trigger) {
580
- return trigger.eventConfig.parentPage.title ?? trigger.eventConfig.parentPage.url;
579
+ function formatNotionParentPage(automation) {
580
+ return automation.eventConfig.parentPage.title ?? automation.eventConfig.parentPage.url;
581
581
  }
582
- function formatNotionDatabase(trigger) {
583
- return trigger.eventConfig.dataSource.title ?? trigger.eventConfig.dataSource.url;
582
+ function formatNotionDatabase(automation) {
583
+ return automation.eventConfig.dataSource.title ?? automation.eventConfig.dataSource.url;
584
584
  }
585
- function formatNotionContentUpdatedScope(trigger) {
586
- return trigger.eventConfig.scope.type === "page" ? trigger.eventConfig.scope.page.title ?? trigger.eventConfig.scope.page.url : trigger.eventConfig.scope.dataSource.title ?? trigger.eventConfig.scope.dataSource.url;
585
+ function formatNotionContentUpdatedScope(automation) {
586
+ return automation.eventConfig.scope.type === "page" ? automation.eventConfig.scope.page.title ?? automation.eventConfig.scope.page.url : automation.eventConfig.scope.dataSource.title ?? automation.eventConfig.scope.dataSource.url;
587
587
  }
588
- function formatNotionContentUpdatedScopeUrl(trigger) {
589
- return trigger.eventConfig.scope.type === "page" ? trigger.eventConfig.scope.page.url : trigger.eventConfig.scope.dataSource.url;
588
+ function formatNotionContentUpdatedScopeUrl(automation) {
589
+ return automation.eventConfig.scope.type === "page" ? automation.eventConfig.scope.page.url : automation.eventConfig.scope.dataSource.url;
590
590
  }
591
- function formatWorkflowTriggerEntry(trigger) {
592
- if (trigger.kind === "event" && trigger.eventType === "gmail-new-message") {
593
- return `Gmail new message: ${formatGmailMatchSummary(trigger.eventConfig)}`;
591
+ function formatWorkflowAutomationEntry(automation) {
592
+ if (automation.kind === "event" && automation.eventType === "gmail-new-message") {
593
+ return `Gmail new message: ${formatGmailMatchSummary(automation.eventConfig)}`;
594
594
  }
595
- if (trigger.kind === "event" && trigger.eventType === "gmail-label-applied") {
596
- return `Gmail label applied: ${quote(trigger.eventConfig.labelName)}`;
595
+ if (automation.kind === "event" && automation.eventType === "gmail-label-applied") {
596
+ return `Gmail label applied: ${quote(automation.eventConfig.labelName)}`;
597
597
  }
598
- if (trigger.kind === "event" && trigger.eventType === "github-label-applied") {
599
- return `GitHub label applied: ${quote(trigger.eventConfig.labelName)} (${formatGithubSubject(
600
- trigger.eventConfig.filters.subject
601
- )}, actor ${trigger.eventConfig.filters.actor.type})`;
598
+ if (automation.kind === "event" && automation.eventType === "github-label-applied") {
599
+ return `GitHub label applied: ${quote(automation.eventConfig.labelName)} (${formatGithubSubject(
600
+ automation.eventConfig.filters.subject
601
+ )}, actor ${automation.eventConfig.filters.actor.type})`;
602
602
  }
603
- if (trigger.kind === "event" && trigger.eventType === "google-calendar-event-created") {
604
- return `Google Calendar event created: ${trigger.eventConfig.calendarId}`;
603
+ if (automation.kind === "event" && automation.eventType === "google-calendar-event-created") {
604
+ return `Google Calendar event created: ${automation.eventConfig.calendarId}`;
605
605
  }
606
- if (trigger.kind === "event" && trigger.eventType === "google-calendar-event-updated") {
607
- return `Google Calendar event updated: ${trigger.eventConfig.calendarId}`;
606
+ if (automation.kind === "event" && automation.eventType === "google-calendar-event-updated") {
607
+ return `Google Calendar event updated: ${automation.eventConfig.calendarId}`;
608
608
  }
609
- if (trigger.kind === "event" && trigger.eventType === "google-calendar-event-cancelled") {
610
- return `Google Calendar event cancelled: ${trigger.eventConfig.calendarId}`;
609
+ if (automation.kind === "event" && automation.eventType === "google-calendar-event-cancelled") {
610
+ return `Google Calendar event cancelled: ${automation.eventConfig.calendarId}`;
611
611
  }
612
- if (trigger.kind === "event" && trigger.eventType === "google-meet-transcript-generated") {
612
+ if (automation.kind === "event" && automation.eventType === "google-meet-transcript-generated") {
613
613
  return "Google Meet transcript ready: meetings you organize";
614
614
  }
615
- if (isWebhookTrigger(trigger)) {
616
- return formatWebhookTriggerEntry(trigger);
615
+ if (isWebhookAutomation(automation)) {
616
+ return formatWebhookAutomationEntry(automation);
617
617
  }
618
- if (trigger.kind !== "schedule") {
619
- return workflowTriggerKindLabel(trigger);
618
+ if (automation.kind !== "schedule") {
619
+ return workflowAutomationKindLabel(automation);
620
620
  }
621
- const { schedule } = trigger;
621
+ const { schedule } = automation;
622
622
  switch (schedule.type) {
623
623
  case "cron":
624
624
  return `${schedule.cronExpression} (${schedule.timezone})`;
@@ -631,11 +631,11 @@ function formatWorkflowTriggerEntry(trigger) {
631
631
  function formatRunTime(value) {
632
632
  return value ? formatRelativeTime(value) : source_default.dim("-");
633
633
  }
634
- function workflowTriggerKindLabel(trigger) {
635
- if (trigger.kind !== "event") {
636
- return formatWorkflowTriggerEntry(trigger);
634
+ function workflowAutomationKindLabel(automation) {
635
+ if (automation.kind !== "event") {
636
+ return formatWorkflowAutomationEntry(automation);
637
637
  }
638
- switch (trigger.eventType) {
638
+ switch (automation.eventType) {
639
639
  case "gmail-new-message":
640
640
  return "Gmail new message";
641
641
  case "gmail-label-applied":
@@ -651,18 +651,18 @@ function workflowTriggerKindLabel(trigger) {
651
651
  case "google-meet-transcript-generated":
652
652
  return "Google Meet transcript ready";
653
653
  case "notion-child-page-created":
654
- return `New Notion child page: ${formatNotionParentPage(trigger)}`;
654
+ return `New Notion child page: ${formatNotionParentPage(automation)}`;
655
655
  case "notion-database-item-created":
656
- return `New Notion database item: ${formatNotionDatabase(trigger)}`;
656
+ return `New Notion database item: ${formatNotionDatabase(automation)}`;
657
657
  case "notion-page-content-updated":
658
- return `Notion page content updated: ${formatNotionContentUpdatedScope(trigger)}`;
658
+ return `Notion page content updated: ${formatNotionContentUpdatedScope(automation)}`;
659
659
  case "webhook-received":
660
660
  return "Webhook";
661
661
  }
662
662
  }
663
- function signedCurlExample(trigger) {
664
- const secret = trigger.webhookSecret ?? "<signing-secret>";
665
- const webhookUrl = trigger.webhookUrl ?? "<webhook-url>";
663
+ function signedCurlExample(automation) {
664
+ const secret = automation.webhookSecret ?? "<signing-secret>";
665
+ const webhookUrl = automation.webhookUrl ?? "<webhook-url>";
666
666
  return [
667
667
  `BODY='{"hello":"world"}'`,
668
668
  "TIMESTAMP=$(date +%s)",
@@ -674,17 +674,17 @@ function signedCurlExample(trigger) {
674
674
  ' --data "$BODY"'
675
675
  ].join("\n");
676
676
  }
677
- function printWorkflowTriggersTable(triggers) {
677
+ function printWorkflowAutomationsTable(automations) {
678
678
  const idWidth = Math.max(
679
679
  2,
680
- ...triggers.map((trigger) => {
681
- return trigger.id.length;
680
+ ...automations.map((automation) => {
681
+ return automation.id.length;
682
682
  })
683
683
  );
684
684
  const scheduleWidth = Math.max(
685
685
  7,
686
- ...triggers.map((trigger) => {
687
- return formatWorkflowTriggerEntry(trigger).length;
686
+ ...automations.map((automation) => {
687
+ return formatWorkflowAutomationEntry(automation).length;
688
688
  })
689
689
  );
690
690
  console.log(
@@ -692,108 +692,116 @@ function printWorkflowTriggersTable(triggers) {
692
692
  [
693
693
  "ID".padEnd(idWidth),
694
694
  "STATUS".padEnd(8),
695
- "TRIGGER".padEnd(scheduleWidth),
695
+ "AUTOMATION".padEnd(scheduleWidth),
696
696
  "NEXT RUN"
697
697
  ].join(" ")
698
698
  )
699
699
  );
700
- for (const trigger of triggers) {
701
- const status = trigger.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
700
+ for (const automation of automations) {
701
+ const status = automation.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
702
702
  console.log(
703
703
  [
704
- trigger.id.padEnd(idWidth),
705
- status.padEnd(8 + (trigger.enabled ? 0 : 2)),
706
- formatWorkflowTriggerEntry(trigger).padEnd(scheduleWidth),
707
- formatRunTime(trigger.nextRunAt)
704
+ automation.id.padEnd(idWidth),
705
+ status.padEnd(8 + (automation.enabled ? 0 : 2)),
706
+ formatWorkflowAutomationEntry(automation).padEnd(scheduleWidth),
707
+ formatRunTime(automation.nextRunAt)
708
708
  ].join(" ")
709
709
  );
710
710
  }
711
711
  }
712
- function printWorkflowTriggerDetails(trigger, options) {
713
- const status = trigger.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
714
- console.log(`${"Kind:".padEnd(14)}${trigger.kind}`);
715
- console.log(`${"ID:".padEnd(14)}${trigger.id}`);
712
+ function printWorkflowAutomationDetails(automation, options) {
713
+ const status = automation.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
714
+ console.log(`${"Kind:".padEnd(14)}${automation.kind}`);
715
+ console.log(`${"ID:".padEnd(14)}${automation.id}`);
716
716
  if (options?.workflowRef) {
717
717
  console.log(`${"Workflow:".padEnd(14)}${options.workflowRef}`);
718
718
  }
719
719
  console.log(`${"Status:".padEnd(14)}${status}`);
720
- console.log(`${"Trigger:".padEnd(14)}${workflowTriggerKindLabel(trigger)}`);
721
- if (trigger.kind === "event" && trigger.eventType === "gmail-new-message") {
720
+ console.log(
721
+ `${"Automation:".padEnd(14)}${workflowAutomationKindLabel(automation)}`
722
+ );
723
+ if (automation.kind === "event" && automation.eventType === "gmail-new-message") {
722
724
  console.log(
723
- `${"Match:".padEnd(14)}${formatGmailMatchSummary(trigger.eventConfig)}`
725
+ `${"Match:".padEnd(14)}${formatGmailMatchSummary(automation.eventConfig)}`
724
726
  );
725
727
  }
726
- if (trigger.kind === "event" && trigger.eventType === "gmail-label-applied") {
727
- console.log(`${"Label:".padEnd(14)}${trigger.eventConfig.labelName}`);
728
+ if (automation.kind === "event" && automation.eventType === "gmail-label-applied") {
729
+ console.log(`${"Label:".padEnd(14)}${automation.eventConfig.labelName}`);
728
730
  }
729
- if (trigger.kind === "event" && trigger.eventType === "github-label-applied") {
730
- console.log(`${"Label:".padEnd(14)}${trigger.eventConfig.labelName}`);
731
+ if (automation.kind === "event" && automation.eventType === "github-label-applied") {
732
+ console.log(`${"Label:".padEnd(14)}${automation.eventConfig.labelName}`);
731
733
  console.log(
732
734
  `${"Subject:".padEnd(14)}${formatGithubSubject(
733
- trigger.eventConfig.filters.subject
735
+ automation.eventConfig.filters.subject
734
736
  )}`
735
737
  );
736
738
  console.log(
737
- `${"Actor:".padEnd(14)}${trigger.eventConfig.filters.actor.type}`
739
+ `${"Actor:".padEnd(14)}${automation.eventConfig.filters.actor.type}`
738
740
  );
739
741
  }
740
- if (isGoogleCalendarTrigger(trigger)) {
741
- console.log(`${"Calendar:".padEnd(14)}${trigger.eventConfig.calendarId}`);
742
+ if (isGoogleCalendarAutomation(automation)) {
743
+ console.log(
744
+ `${"Calendar:".padEnd(14)}${automation.eventConfig.calendarId}`
745
+ );
742
746
  }
743
- if (isNotionChildPageTrigger(trigger)) {
747
+ if (isNotionChildPageAutomation(automation)) {
744
748
  console.log(
745
- `${"Parent page:".padEnd(14)}${formatNotionParentPage(trigger)}`
749
+ `${"Parent page:".padEnd(14)}${formatNotionParentPage(automation)}`
746
750
  );
747
751
  console.log(
748
- `${"Parent URL:".padEnd(14)}${trigger.eventConfig.parentPage.url}`
752
+ `${"Parent URL:".padEnd(14)}${automation.eventConfig.parentPage.url}`
749
753
  );
750
754
  }
751
- if (isNotionDatabaseItemTrigger(trigger)) {
752
- console.log(`${"Database:".padEnd(14)}${formatNotionDatabase(trigger)}`);
755
+ if (isNotionDatabaseItemAutomation(automation)) {
756
+ console.log(`${"Database:".padEnd(14)}${formatNotionDatabase(automation)}`);
753
757
  console.log(
754
- `${"Database URL:".padEnd(14)}${trigger.eventConfig.dataSource.url}`
758
+ `${"Database URL:".padEnd(14)}${automation.eventConfig.dataSource.url}`
755
759
  );
756
760
  }
757
- if (isNotionPageContentUpdatedTrigger(trigger)) {
758
- const scopeLabel = trigger.eventConfig.scope.type === "page" ? "Page" : "Database";
761
+ if (isNotionPageContentUpdatedAutomation(automation)) {
762
+ const scopeLabel = automation.eventConfig.scope.type === "page" ? "Page" : "Database";
759
763
  console.log(`${"Scope:".padEnd(14)}${scopeLabel}`);
760
764
  console.log(
761
- `${`${scopeLabel}:`.padEnd(14)}${formatNotionContentUpdatedScope(trigger)}`
765
+ `${`${scopeLabel}:`.padEnd(14)}${formatNotionContentUpdatedScope(automation)}`
762
766
  );
763
767
  console.log(
764
- `${`${scopeLabel} URL:`.padEnd(14)}${formatNotionContentUpdatedScopeUrl(trigger)}`
768
+ `${`${scopeLabel} URL:`.padEnd(14)}${formatNotionContentUpdatedScopeUrl(automation)}`
765
769
  );
766
770
  }
767
- if (isWebhookTrigger(trigger)) {
771
+ if (isWebhookAutomation(automation)) {
768
772
  console.log(
769
- `${"Webhook URL:".padEnd(14)}${trigger.webhookUrl ?? "hidden"}`
773
+ `${"Webhook URL:".padEnd(14)}${automation.webhookUrl ?? "hidden"}`
770
774
  );
771
775
  console.log(
772
- `${"Secret:".padEnd(14)}${source_default.dim(`ends with ${trigger.secretLastFour}`)}`
776
+ `${"Secret:".padEnd(14)}${source_default.dim(`ends with ${automation.secretLastFour}`)}`
773
777
  );
774
778
  console.log(
775
- `${"Last received:".padEnd(14)}${formatRunTime(trigger.lastReceivedAt)}`
779
+ `${"Last received:".padEnd(14)}${formatRunTime(automation.lastReceivedAt)}`
776
780
  );
777
- if (trigger.webhookSecret) {
781
+ if (automation.webhookSecret) {
778
782
  console.log(
779
- `${"Signing key:".padEnd(14)}${trigger.webhookSecret} ${source_default.dim(
783
+ `${"Signing key:".padEnd(14)}${automation.webhookSecret} ${source_default.dim(
780
784
  "(shown only once)"
781
785
  )}`
782
786
  );
783
787
  console.log("");
784
788
  console.log(source_default.bold("Signed curl example:"));
785
- console.log(signedCurlExample(trigger));
789
+ console.log(signedCurlExample(automation));
786
790
  }
787
791
  }
788
- console.log(`${"Owner:".padEnd(14)}${trigger.ownerUserId}`);
792
+ console.log(`${"Owner:".padEnd(14)}${automation.ownerUserId}`);
793
+ console.log(
794
+ `${"Chat thread:".padEnd(14)}${automation.chatThreadId ?? source_default.dim("-")}`
795
+ );
789
796
  console.log(
790
- `${"Chat thread:".padEnd(14)}${trigger.chatThreadId ?? source_default.dim("-")}`
797
+ `${"Next run:".padEnd(14)}${formatRunTime(automation.nextRunAt)}`
798
+ );
799
+ console.log(
800
+ `${"Last run:".padEnd(14)}${formatRunTime(automation.lastRunAt)}`
791
801
  );
792
- console.log(`${"Next run:".padEnd(14)}${formatRunTime(trigger.nextRunAt)}`);
793
- console.log(`${"Last run:".padEnd(14)}${formatRunTime(trigger.lastRunAt)}`);
794
802
  }
795
803
 
796
- // src/commands/zero/workflow/trigger/gmail-config.ts
804
+ // src/commands/zero/workflow/automation/gmail-config.ts
797
805
  init_esm_shims();
798
806
  import { readFileSync as readFileSync4 } from "fs";
799
807
  var TEXT_FIELD_LABELS = {
@@ -868,7 +876,7 @@ function parseTextMatcher(field, value) {
868
876
  break;
869
877
  default:
870
878
  throw new Error(
871
- `Unsupported Gmail trigger text matcher "${key}" for ${formatFieldName(field)}`
879
+ `Unsupported Gmail automation text matcher "${key}" for ${formatFieldName(field)}`
872
880
  );
873
881
  }
874
882
  }
@@ -891,7 +899,7 @@ function parseMatch(value) {
891
899
  const field = textFieldFromKey(key);
892
900
  if (field === null) {
893
901
  throw new Error(
894
- `Unsupported Gmail trigger match field "${key}". Supported fields: from, subject, body, to, cc`
902
+ `Unsupported Gmail automation match field "${key}". Supported fields: from, subject, body, to, cc`
895
903
  );
896
904
  }
897
905
  match[field] = parseTextMatcher(field, value[key]);
@@ -905,16 +913,16 @@ function readConfigMatch(path) {
905
913
  } catch (error) {
906
914
  const message = error instanceof Error ? error.message : String(error);
907
915
  throw new Error(
908
- `Failed to read Gmail trigger config "${path}": ${message}`
916
+ `Failed to read Gmail automation config "${path}": ${message}`
909
917
  );
910
918
  }
911
919
  if (!isRecord(parsed)) {
912
- throw new Error("Gmail trigger config must be a JSON object");
920
+ throw new Error("Gmail automation config must be a JSON object");
913
921
  }
914
922
  for (const key of Object.keys(parsed)) {
915
923
  if (key !== "match") {
916
924
  throw new Error(
917
- `Unsupported Gmail trigger config field "${key}". Use a top-level match object`
925
+ `Unsupported Gmail automation config field "${key}". Use a top-level match object`
918
926
  );
919
927
  }
920
928
  }
@@ -949,7 +957,7 @@ function textFlagSpecs(options) {
949
957
  }
950
958
  ];
951
959
  }
952
- function hasGmailTriggerOptions(options) {
960
+ function hasGmailAutomationOptions(options) {
953
961
  return options.config !== void 0 || textFlagSpecs(options).some((spec) => {
954
962
  return spec.contains !== void 0 || spec.doesNotContain !== void 0;
955
963
  });
@@ -996,13 +1004,13 @@ function buildGmailLabelAppliedEventConfig(options) {
996
1004
  const labelName = options.label?.trim();
997
1005
  if (!labelName) {
998
1006
  throw new Error(
999
- 'gmail-label-applied triggers require --label "Label name"'
1007
+ 'gmail-label-applied automations require --label "Label name"'
1000
1008
  );
1001
1009
  }
1002
1010
  return { provider: "gmail", event: "label_applied", labelName };
1003
1011
  }
1004
1012
 
1005
- // src/commands/zero/workflow/trigger/index.ts
1013
+ // src/commands/zero/workflow/automation/index.ts
1006
1014
  var SCHEDULE_KINDS = ["cron", "once", "loop"];
1007
1015
  var EVENT_KINDS = [
1008
1016
  "gmail-new-message",
@@ -1016,13 +1024,13 @@ var EVENT_KINDS = [
1016
1024
  "notion-page-content-updated",
1017
1025
  "webhook"
1018
1026
  ];
1019
- var TRIGGER_KINDS = [...SCHEDULE_KINDS, ...EVENT_KINDS];
1027
+ var AUTOMATION_KINDS = [...SCHEDULE_KINDS, ...EVENT_KINDS];
1020
1028
  var EXACTLY_ONE_FLAG_MESSAGE = "Provide exactly one of --expr (cron), --at (once), --every (loop), Gmail match options, --label, --subject, --actor, --calendar-id, --page-url, --parent-page-url, or --database-url";
1021
- function addGmailTriggerOptions(command) {
1029
+ function addGmailAutomationOptions(command) {
1022
1030
  return command.option(
1023
1031
  "--config <path>",
1024
- "Path to a Gmail new message trigger config JSON"
1025
- ).option("--label <name>", "Label name for label-applied triggers").option("--from-contains <text>", "Require the From header to contain text").option(
1032
+ "Path to a Gmail new message automation config JSON"
1033
+ ).option("--label <name>", "Label name for label-applied automations").option("--from-contains <text>", "Require the From header to contain text").option(
1026
1034
  "--from-not-contains <text>",
1027
1035
  "Require the From header not to contain text"
1028
1036
  ).option(
@@ -1045,7 +1053,7 @@ function addGmailTriggerOptions(command) {
1045
1053
  "Require the Cc header not to contain text"
1046
1054
  );
1047
1055
  }
1048
- function addGithubTriggerOptions(command) {
1056
+ function addGithubAutomationOptions(command) {
1049
1057
  return command.option(
1050
1058
  "--subject <subject>",
1051
1059
  "GitHub subject filter for github-label-applied: both | issues | pull-requests"
@@ -1155,7 +1163,7 @@ function buildSchedule(kind, options) {
1155
1163
  case "cron":
1156
1164
  if (!options.expr) {
1157
1165
  throw new Error(
1158
- 'cron triggers require --expr (e.g. --expr "0 9 * * *")'
1166
+ 'cron automations require --expr (e.g. --expr "0 9 * * *")'
1159
1167
  );
1160
1168
  }
1161
1169
  return {
@@ -1166,7 +1174,7 @@ function buildSchedule(kind, options) {
1166
1174
  case "once": {
1167
1175
  if (!options.at) {
1168
1176
  throw new Error(
1169
- 'once triggers require --at (e.g. --at "2026-06-10T09:00")'
1177
+ 'once automations require --at (e.g. --at "2026-06-10T09:00")'
1170
1178
  );
1171
1179
  }
1172
1180
  const timezone = timezoneOrUtc(options.timezone);
@@ -1178,7 +1186,7 @@ function buildSchedule(kind, options) {
1178
1186
  }
1179
1187
  case "loop":
1180
1188
  if (!options.every) {
1181
- throw new Error("loop triggers require --every (e.g. --every 15m)");
1189
+ throw new Error("loop automations require --every (e.g. --every 15m)");
1182
1190
  }
1183
1191
  return {
1184
1192
  type: "loop",
@@ -1186,47 +1194,49 @@ function buildSchedule(kind, options) {
1186
1194
  };
1187
1195
  default:
1188
1196
  throw new Error(
1189
- `Unknown trigger kind: "${kind}". Use one of: ${TRIGGER_KINDS.join(", ")}`
1197
+ `Unknown automation kind: "${kind}". Use one of: ${AUTOMATION_KINDS.join(", ")}`
1190
1198
  );
1191
1199
  }
1192
1200
  }
1193
1201
  function hasScheduleAddOptions(options) {
1194
1202
  return options.expr !== void 0 || options.at !== void 0 || options.every !== void 0 || options.timezone !== void 0;
1195
1203
  }
1196
- function hasGithubTriggerOptions(options) {
1204
+ function hasGithubAutomationOptions(options) {
1197
1205
  return options.subject !== void 0 || options.actor !== void 0;
1198
1206
  }
1199
- function hasCalendarTriggerOptions(options) {
1207
+ function hasCalendarAutomationOptions(options) {
1200
1208
  return options.calendarId !== void 0;
1201
1209
  }
1202
- function hasNotionTriggerOptions(options) {
1210
+ function hasNotionAutomationOptions(options) {
1203
1211
  return options.pageUrl !== void 0 || options.parentPageUrl !== void 0 || options.databaseUrl !== void 0;
1204
1212
  }
1205
1213
  function hasEventAddOptions(options) {
1206
- return hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options) || hasCalendarTriggerOptions(options) || hasNotionTriggerOptions(options);
1214
+ return hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options) || hasNotionAutomationOptions(options);
1207
1215
  }
1208
1216
  function assertNoScheduleAddOptions(options) {
1209
1217
  if (hasScheduleAddOptions(options)) {
1210
1218
  throw new Error(
1211
- "--expr, --at, --every, and --timezone only apply to schedule triggers"
1219
+ "--expr, --at, --every, and --timezone only apply to schedule automations"
1212
1220
  );
1213
1221
  }
1214
1222
  }
1215
- function assertNoGithubTriggerOptions(options, message = "GitHub trigger flags only apply to GitHub event triggers") {
1216
- if (hasGithubTriggerOptions(options)) {
1223
+ function assertNoGithubAutomationOptions(options, message = "GitHub automation flags only apply to GitHub event automations") {
1224
+ if (hasGithubAutomationOptions(options)) {
1217
1225
  throw new Error(message);
1218
1226
  }
1219
1227
  }
1220
- function assertNoCalendarTriggerOptions(options) {
1221
- if (hasCalendarTriggerOptions(options)) {
1228
+ function assertNoCalendarAutomationOptions(options) {
1229
+ if (hasCalendarAutomationOptions(options)) {
1222
1230
  throw new Error(
1223
- "Google Calendar trigger flags only apply to Google Calendar event triggers"
1231
+ "Google Calendar automation flags only apply to Google Calendar event automations"
1224
1232
  );
1225
1233
  }
1226
1234
  }
1227
- function assertNoNotionTriggerOptions(options) {
1228
- if (hasNotionTriggerOptions(options)) {
1229
- throw new Error("Notion trigger flags only apply to Notion event triggers");
1235
+ function assertNoNotionAutomationOptions(options) {
1236
+ if (hasNotionAutomationOptions(options)) {
1237
+ throw new Error(
1238
+ "Notion automation flags only apply to Notion event automations"
1239
+ );
1230
1240
  }
1231
1241
  }
1232
1242
  function scheduleUpdateFlagCount(options) {
@@ -1266,7 +1276,7 @@ function buildGithubLabelAppliedEventConfig(options, existing) {
1266
1276
  const labelName = options.label?.trim() ?? existing?.eventConfig.labelName;
1267
1277
  if (!labelName) {
1268
1278
  throw new Error(
1269
- 'github-label-applied triggers require --label "Label name"'
1279
+ 'github-label-applied automations require --label "Label name"'
1270
1280
  );
1271
1281
  }
1272
1282
  return {
@@ -1290,11 +1300,11 @@ function buildGithubLabelAppliedEventConfig(options, existing) {
1290
1300
  function buildGmailNewMessageCreateRequest(options) {
1291
1301
  assertNoScheduleAddOptions(options);
1292
1302
  if (hasGmailLabelOption(options)) {
1293
- throw new Error("--label only applies to label-applied event triggers");
1303
+ throw new Error("--label only applies to label-applied event automations");
1294
1304
  }
1295
- assertNoGithubTriggerOptions(options);
1296
- assertNoCalendarTriggerOptions(options);
1297
- assertNoNotionTriggerOptions(options);
1305
+ assertNoGithubAutomationOptions(options);
1306
+ assertNoCalendarAutomationOptions(options);
1307
+ assertNoNotionAutomationOptions(options);
1298
1308
  return {
1299
1309
  kind: "event",
1300
1310
  eventType: "gmail-new-message",
@@ -1303,14 +1313,14 @@ function buildGmailNewMessageCreateRequest(options) {
1303
1313
  }
1304
1314
  function buildGmailLabelAppliedCreateRequest(options) {
1305
1315
  assertNoScheduleAddOptions(options);
1306
- if (hasGmailTriggerOptions(options)) {
1316
+ if (hasGmailAutomationOptions(options)) {
1307
1317
  throw new Error(
1308
- "Gmail match flags and --config only apply to gmail-new-message triggers"
1318
+ "Gmail match flags and --config only apply to gmail-new-message automations"
1309
1319
  );
1310
1320
  }
1311
- assertNoGithubTriggerOptions(options);
1312
- assertNoCalendarTriggerOptions(options);
1313
- assertNoNotionTriggerOptions(options);
1321
+ assertNoGithubAutomationOptions(options);
1322
+ assertNoCalendarAutomationOptions(options);
1323
+ assertNoNotionAutomationOptions(options);
1314
1324
  return {
1315
1325
  kind: "event",
1316
1326
  eventType: "gmail-label-applied",
@@ -1319,13 +1329,13 @@ function buildGmailLabelAppliedCreateRequest(options) {
1319
1329
  }
1320
1330
  function buildGithubLabelAppliedCreateRequest(options) {
1321
1331
  assertNoScheduleAddOptions(options);
1322
- if (hasGmailTriggerOptions(options)) {
1332
+ if (hasGmailAutomationOptions(options)) {
1323
1333
  throw new Error(
1324
- "Gmail match flags and --config only apply to Gmail event triggers"
1334
+ "Gmail match flags and --config only apply to Gmail event automations"
1325
1335
  );
1326
1336
  }
1327
- assertNoCalendarTriggerOptions(options);
1328
- assertNoNotionTriggerOptions(options);
1337
+ assertNoCalendarAutomationOptions(options);
1338
+ assertNoNotionAutomationOptions(options);
1329
1339
  return {
1330
1340
  kind: "event",
1331
1341
  eventType: "github-label-applied",
@@ -1334,9 +1344,9 @@ function buildGithubLabelAppliedCreateRequest(options) {
1334
1344
  }
1335
1345
  function buildGoogleCalendarEventCreateRequest(eventType, options) {
1336
1346
  assertNoScheduleAddOptions(options);
1337
- if (hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options) || hasNotionTriggerOptions(options)) {
1347
+ if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasNotionAutomationOptions(options)) {
1338
1348
  throw new Error(
1339
- "Gmail, GitHub, and Notion trigger flags only apply to their event triggers"
1349
+ "Gmail, GitHub, and Notion automation flags only apply to their event automations"
1340
1350
  );
1341
1351
  }
1342
1352
  const calendarId = options.calendarId?.trim() || "primary";
@@ -1374,20 +1384,20 @@ function buildGoogleCalendarEventCreateRequest(eventType, options) {
1374
1384
  }
1375
1385
  function buildNotionChildPageCreatedCreateRequest(options) {
1376
1386
  assertNoScheduleAddOptions(options);
1377
- if (hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options) || hasCalendarTriggerOptions(options)) {
1387
+ if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
1378
1388
  throw new Error(
1379
- "Gmail, GitHub, and Google Calendar trigger flags only apply to their event triggers"
1389
+ "Gmail, GitHub, and Google Calendar automation flags only apply to their event automations"
1380
1390
  );
1381
1391
  }
1382
1392
  const parentPageUrl = options.parentPageUrl?.trim();
1383
1393
  if (options.pageUrl !== void 0 || options.databaseUrl !== void 0) {
1384
1394
  throw new Error(
1385
- "--page-url and --database-url do not apply to notion-child-page-created triggers"
1395
+ "--page-url and --database-url do not apply to notion-child-page-created automations"
1386
1396
  );
1387
1397
  }
1388
1398
  if (!parentPageUrl) {
1389
1399
  throw new Error(
1390
- 'notion-child-page-created triggers require --parent-page-url "https://www.notion.so/..."'
1400
+ 'notion-child-page-created automations require --parent-page-url "https://www.notion.so/..."'
1391
1401
  );
1392
1402
  }
1393
1403
  return {
@@ -1402,20 +1412,20 @@ function buildNotionChildPageCreatedCreateRequest(options) {
1402
1412
  }
1403
1413
  function buildNotionDatabaseItemCreatedCreateRequest(options) {
1404
1414
  assertNoScheduleAddOptions(options);
1405
- if (hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options) || hasCalendarTriggerOptions(options)) {
1415
+ if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
1406
1416
  throw new Error(
1407
- "Gmail, GitHub, and Google Calendar trigger flags only apply to their event triggers"
1417
+ "Gmail, GitHub, and Google Calendar automation flags only apply to their event automations"
1408
1418
  );
1409
1419
  }
1410
1420
  if (options.pageUrl !== void 0 || options.parentPageUrl !== void 0) {
1411
1421
  throw new Error(
1412
- "--page-url and --parent-page-url do not apply to notion-database-item-created triggers"
1422
+ "--page-url and --parent-page-url do not apply to notion-database-item-created automations"
1413
1423
  );
1414
1424
  }
1415
1425
  const databaseUrl = options.databaseUrl?.trim();
1416
1426
  if (!databaseUrl) {
1417
1427
  throw new Error(
1418
- 'notion-database-item-created triggers require --database-url "https://www.notion.so/..."'
1428
+ 'notion-database-item-created automations require --database-url "https://www.notion.so/..."'
1419
1429
  );
1420
1430
  }
1421
1431
  return {
@@ -1430,21 +1440,21 @@ function buildNotionDatabaseItemCreatedCreateRequest(options) {
1430
1440
  }
1431
1441
  function buildNotionPageContentUpdatedCreateRequest(options) {
1432
1442
  assertNoScheduleAddOptions(options);
1433
- if (hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options) || hasCalendarTriggerOptions(options)) {
1443
+ if (hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options) || hasCalendarAutomationOptions(options)) {
1434
1444
  throw new Error(
1435
- "Gmail, GitHub, and Google Calendar trigger flags only apply to their event triggers"
1445
+ "Gmail, GitHub, and Google Calendar automation flags only apply to their event automations"
1436
1446
  );
1437
1447
  }
1438
1448
  if (options.parentPageUrl !== void 0) {
1439
1449
  throw new Error(
1440
- "--parent-page-url only applies to notion-child-page-created triggers"
1450
+ "--parent-page-url only applies to notion-child-page-created automations"
1441
1451
  );
1442
1452
  }
1443
1453
  const pageUrl = options.pageUrl?.trim();
1444
1454
  const databaseUrl = options.databaseUrl?.trim();
1445
1455
  if ((pageUrl !== void 0 && pageUrl.length > 0) === (databaseUrl !== void 0 && databaseUrl.length > 0)) {
1446
1456
  throw new Error(
1447
- 'notion-page-content-updated triggers require exactly one of --page-url "https://www.notion.so/..." or --database-url "https://www.notion.so/..."'
1457
+ 'notion-page-content-updated automations require exactly one of --page-url "https://www.notion.so/..." or --database-url "https://www.notion.so/..."'
1448
1458
  );
1449
1459
  }
1450
1460
  return {
@@ -1464,7 +1474,7 @@ function buildNotionPageContentUpdatedCreateRequest(options) {
1464
1474
  function buildWebhookCreateRequest(options) {
1465
1475
  assertNoScheduleAddOptions(options);
1466
1476
  if (hasEventAddOptions(options)) {
1467
- throw new Error("Event trigger flags only apply to event triggers");
1477
+ throw new Error("Event automation flags only apply to event automations");
1468
1478
  }
1469
1479
  return {
1470
1480
  kind: "event",
@@ -1478,7 +1488,7 @@ function buildWebhookCreateRequest(options) {
1478
1488
  }
1479
1489
  function buildScheduleCreateRequest(kind, options) {
1480
1490
  if (hasEventAddOptions(options)) {
1481
- throw new Error("Event trigger flags only apply to event triggers");
1491
+ throw new Error("Event automation flags only apply to event automations");
1482
1492
  }
1483
1493
  return { schedule: buildSchedule(kind, options) };
1484
1494
  }
@@ -1509,19 +1519,21 @@ function buildCreateRequest(kind, options) {
1509
1519
  }
1510
1520
  }
1511
1521
  function buildEventUpdate(options, existing) {
1512
- const hasGmailOptions = hasGmailTriggerOptions(options);
1522
+ const hasGmailOptions = hasGmailAutomationOptions(options);
1513
1523
  const hasLabelOption = hasGmailLabelOption(options);
1514
- const hasGithubOptions = hasGithubTriggerOptions(options);
1524
+ const hasGithubOptions = hasGithubAutomationOptions(options);
1515
1525
  if (existing.eventType === "google-calendar-event-created" || existing.eventType === "google-calendar-event-updated" || existing.eventType === "google-calendar-event-cancelled") {
1516
- throw new Error("Google Calendar event triggers cannot be updated");
1526
+ throw new Error("Google Calendar event automations cannot be updated");
1517
1527
  }
1518
1528
  if (existing.eventType === "github-label-applied") {
1519
1529
  if (hasGmailOptions) {
1520
- throw new Error("Gmail match flags only apply to Gmail event triggers");
1530
+ throw new Error(
1531
+ "Gmail match flags only apply to Gmail event automations"
1532
+ );
1521
1533
  }
1522
1534
  if (!hasLabelOption && !hasGithubOptions) {
1523
1535
  throw new Error(
1524
- "Provide --label, --subject, or --actor for github-label-applied triggers"
1536
+ "Provide --label, --subject, or --actor for github-label-applied automations"
1525
1537
  );
1526
1538
  }
1527
1539
  return {
@@ -1529,24 +1541,30 @@ function buildEventUpdate(options, existing) {
1529
1541
  };
1530
1542
  }
1531
1543
  if (hasGithubOptions) {
1532
- throw new Error("GitHub trigger flags only apply to GitHub event triggers");
1544
+ throw new Error(
1545
+ "GitHub automation flags only apply to GitHub event automations"
1546
+ );
1533
1547
  }
1534
1548
  if (existing.eventType === "gmail-label-applied") {
1535
1549
  if (!hasLabelOption || hasGmailOptions) {
1536
- throw new Error("Use --label for gmail-label-applied triggers");
1550
+ throw new Error("Use --label for gmail-label-applied automations");
1537
1551
  }
1538
1552
  return { eventConfig: buildGmailLabelAppliedEventConfig(options) };
1539
1553
  }
1540
1554
  if (!hasGmailOptions || hasLabelOption) {
1541
- throw new Error("Use Gmail match options for gmail-new-message triggers");
1555
+ throw new Error(
1556
+ "Use Gmail match options for gmail-new-message automations"
1557
+ );
1542
1558
  }
1543
1559
  return { eventConfig: buildGmailNewMessageEventConfig(options) };
1544
1560
  }
1545
1561
  function buildScheduleUpdate(options) {
1546
- const hasGmailOptions = hasGmailTriggerOptions(options);
1562
+ const hasGmailOptions = hasGmailAutomationOptions(options);
1547
1563
  const hasLabelOption = hasGmailLabelOption(options);
1548
1564
  if (hasGmailOptions || hasLabelOption) {
1549
- throw new Error("Gmail trigger flags only apply to Gmail event triggers");
1565
+ throw new Error(
1566
+ "Gmail automation flags only apply to Gmail event automations"
1567
+ );
1550
1568
  }
1551
1569
  const flagCount = scheduleUpdateFlagCount(options);
1552
1570
  if (flagCount !== 1) {
@@ -1564,27 +1582,29 @@ function buildScheduleUpdate(options) {
1564
1582
  return { schedule: buildSchedule("loop", options) };
1565
1583
  }
1566
1584
  function buildUpdate(options, existing) {
1567
- const hasEventOptions = hasGmailTriggerOptions(options) || hasGmailLabelOption(options) || hasGithubTriggerOptions(options);
1585
+ const hasEventOptions = hasGmailAutomationOptions(options) || hasGmailLabelOption(options) || hasGithubAutomationOptions(options);
1568
1586
  if (hasScheduleUpdateOptions(options) && hasEventOptions) {
1569
- throw new Error("Use either schedule flags or event trigger options");
1587
+ throw new Error("Use either schedule flags or event automation options");
1570
1588
  }
1571
- if (hasGmailTriggerOptions(options) && hasGmailLabelOption(options)) {
1589
+ if (hasGmailAutomationOptions(options) && hasGmailLabelOption(options)) {
1572
1590
  throw new Error("Use either Gmail match options or --label");
1573
1591
  }
1574
1592
  if (existing.kind === "event") {
1575
1593
  if (hasScheduleUpdateOptions(options)) {
1576
- throw new Error("Schedule flags only apply to schedule triggers");
1594
+ throw new Error("Schedule flags only apply to schedule automations");
1577
1595
  }
1578
1596
  return buildEventUpdate(options, existing);
1579
1597
  }
1580
- if (hasGithubTriggerOptions(options)) {
1581
- throw new Error("GitHub trigger flags only apply to GitHub event triggers");
1598
+ if (hasGithubAutomationOptions(options)) {
1599
+ throw new Error(
1600
+ "GitHub automation flags only apply to GitHub event automations"
1601
+ );
1582
1602
  }
1583
1603
  return buildScheduleUpdate(options);
1584
1604
  }
1585
- var addCommand = addGithubTriggerOptions(
1586
- addGmailTriggerOptions(
1587
- new Command().name("add").description("Add a trigger to a workflow").argument("<workflow>", "Workflow ID or name").argument("<kind>", `Trigger type: ${TRIGGER_KINDS.join(" | ")}`).option("--expr <expression>", 'Cron expression for kind "cron"').option("--at <iso-time>", 'Fire time for kind "once"').option(
1605
+ var addCommand = addGithubAutomationOptions(
1606
+ addGmailAutomationOptions(
1607
+ new Command().name("add").description("Add an automation to a workflow").argument("<workflow>", "Workflow ID or name").argument("<kind>", `Automation type: ${AUTOMATION_KINDS.join(" | ")}`).option("--expr <expression>", 'Cron expression for kind "cron"').option("--at <iso-time>", 'Fire time for kind "once"').option(
1588
1608
  "--every <duration>",
1589
1609
  'Interval for kind "loop" (e.g. 15m, 1h, 90s)'
1590
1610
  ).option(
@@ -1594,149 +1614,158 @@ var addCommand = addGithubTriggerOptions(
1594
1614
  )
1595
1615
  ).option(
1596
1616
  "--calendar-id <id>",
1597
- "Google Calendar ID for Google Calendar event triggers (default: primary)"
1617
+ "Google Calendar ID for Google Calendar event automations (default: primary)"
1598
1618
  ).option(
1599
1619
  "--page-url <url>",
1600
- "Notion page URL for notion-page-content-updated triggers"
1620
+ "Notion page URL for notion-page-content-updated automations"
1601
1621
  ).option(
1602
1622
  "--parent-page-url <url>",
1603
- "Parent Notion page URL for notion-child-page-created triggers"
1623
+ "Parent Notion page URL for notion-child-page-created automations"
1604
1624
  ).option(
1605
1625
  "--database-url <url>",
1606
- "Notion database URL for notion-database-item-created or notion-page-content-updated triggers"
1626
+ "Notion database URL for notion-database-item-created or notion-page-content-updated automations"
1607
1627
  ).option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
1608
1628
  "after",
1609
1629
  `
1610
1630
  Examples:
1611
- zero workflow trigger add tell-a-joke --agent <agent-id> cron --expr "0 9 * * *" -z Asia/Shanghai
1612
- zero workflow trigger add tell-a-joke --agent <agent-id> once --at "2026-06-10T09:00" -z Asia/Shanghai
1613
- zero workflow trigger add tell-a-joke --agent <agent-id> loop --every 15m
1614
- zero workflow trigger add triage --agent <agent-id> gmail-new-message --from-contains "@example.com"
1615
- zero workflow trigger add triage --agent <agent-id> gmail-new-message --config ./gmail-trigger.json
1616
- zero workflow trigger add triage --agent <agent-id> gmail-label-applied --label "Support"
1617
- zero workflow trigger add triage --agent <agent-id> github-label-applied --label "triage" --subject both --actor me
1618
- zero workflow trigger add triage --agent <agent-id> google-calendar-event-created
1619
- zero workflow trigger add triage --agent <agent-id> google-calendar-event-updated
1620
- zero workflow trigger add triage --agent <agent-id> google-calendar-event-cancelled
1621
- zero workflow trigger add research-notes --agent <agent-id> notion-child-page-created --parent-page-url "https://www.notion.so/workspace/Page-title-1234567890abcdef1234567890abcdef"
1622
- zero workflow trigger add research-notes --agent <agent-id> notion-database-item-created --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
1623
- zero workflow trigger add research-notes --agent <agent-id> notion-page-content-updated --page-url "https://www.notion.so/workspace/Page-title-1234567890abcdef1234567890abcdef"
1624
- zero workflow trigger add research-notes --agent <agent-id> notion-page-content-updated --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
1625
- zero workflow trigger add triage --agent <agent-id> webhook
1631
+ zero workflow automation add tell-a-joke --agent <agent-id> cron --expr "0 9 * * *" -z Asia/Shanghai
1632
+ zero workflow automation add tell-a-joke --agent <agent-id> once --at "2026-06-10T09:00" -z Asia/Shanghai
1633
+ zero workflow automation add tell-a-joke --agent <agent-id> loop --every 15m
1634
+ zero workflow automation add triage --agent <agent-id> gmail-new-message --from-contains "@example.com"
1635
+ zero workflow automation add triage --agent <agent-id> gmail-new-message --config ./gmail-automation.json
1636
+ zero workflow automation add triage --agent <agent-id> gmail-label-applied --label "Support"
1637
+ zero workflow automation add triage --agent <agent-id> github-label-applied --label "triage" --subject both --actor me
1638
+ zero workflow automation add triage --agent <agent-id> google-calendar-event-created
1639
+ zero workflow automation add triage --agent <agent-id> google-calendar-event-updated
1640
+ zero workflow automation add triage --agent <agent-id> google-calendar-event-cancelled
1641
+ zero workflow automation add research-notes --agent <agent-id> notion-child-page-created --parent-page-url "https://www.notion.so/workspace/Page-title-1234567890abcdef1234567890abcdef"
1642
+ zero workflow automation add research-notes --agent <agent-id> notion-database-item-created --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
1643
+ zero workflow automation add research-notes --agent <agent-id> notion-page-content-updated --page-url "https://www.notion.so/workspace/Page-title-1234567890abcdef1234567890abcdef"
1644
+ zero workflow automation add research-notes --agent <agent-id> notion-page-content-updated --database-url "https://www.notion.so/1234567890abcdef1234567890abcdef?v=abcdef1234567890abcdef1234567890"
1645
+ zero workflow automation add triage --agent <agent-id> webhook
1626
1646
 
1627
1647
  Notes:
1628
1648
  - Workflow names resolve under --agent, then ZERO_AGENT_ID
1629
- - Gmail triggers match all inbound messages when no text match rules are provided
1630
- - GitHub label triggers require the GitHub App installation in the workspace
1631
- - Webhook triggers print the signing secret only once after creation
1649
+ - Gmail automations match all inbound messages when no text match rules are provided
1650
+ - GitHub label automations require the GitHub App installation in the workspace
1651
+ - Webhook automations print the signing secret only once after creation
1632
1652
  - Use the workflow ID when a name is ambiguous`
1633
1653
  ).action(
1634
1654
  withErrorHandler(
1635
1655
  async (workflowRef, kind, options) => {
1636
1656
  if (options.timezone && kind !== "cron" && kind !== "once" && kind !== "gmail-new-message") {
1637
- throw new Error("--timezone only applies to cron and once triggers");
1657
+ throw new Error(
1658
+ "--timezone only applies to cron and once automations"
1659
+ );
1638
1660
  }
1639
1661
  const workflowId = await resolveWorkflowRef(workflowRef, options);
1640
1662
  const body = buildCreateRequest(kind, options);
1641
- const trigger = await createWorkflowTrigger(workflowId, body);
1663
+ const automation = await createWorkflowAutomation(workflowId, body);
1642
1664
  console.log(
1643
- source_default.green(`\u2713 Trigger added to workflow "${workflowRef}"`)
1665
+ source_default.green(`\u2713 Automation added to workflow "${workflowRef}"`)
1644
1666
  );
1645
- printWorkflowTriggerDetails(trigger, { workflowRef });
1667
+ printWorkflowAutomationDetails(automation, { workflowRef });
1646
1668
  }
1647
1669
  )
1648
1670
  );
1649
- var updateCommand = addGithubTriggerOptions(
1650
- addGmailTriggerOptions(
1671
+ var updateCommand = addGithubAutomationOptions(
1672
+ addGmailAutomationOptions(
1651
1673
  new Command().name("update").description(
1652
- "Replace a workflow trigger's schedule or Gmail match config"
1653
- ).argument("<trigger>", "Workflow trigger ID").option("--expr <expression>", 'New cron schedule (e.g. "0 9 * * *")').option("--at <iso-time>", 'New one-time fire (e.g. "2026-06-10T09:00")').option("--every <duration>", "New loop interval (e.g. 15m, 1h, 90s)").option("-z, --timezone <tz>", "IANA timezone for --expr / --at")
1674
+ "Replace a workflow automation's schedule or Gmail match config"
1675
+ ).argument("<automation>", "Workflow automation ID").option("--expr <expression>", 'New cron schedule (e.g. "0 9 * * *")').option("--at <iso-time>", 'New one-time fire (e.g. "2026-06-10T09:00")').option("--every <duration>", "New loop interval (e.g. 15m, 1h, 90s)").option("-z, --timezone <tz>", "IANA timezone for --expr / --at")
1654
1676
  )
1655
1677
  ).addHelpText(
1656
1678
  "after",
1657
1679
  `
1658
1680
  Examples:
1659
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --expr "0 9 * * *" -z Asia/Shanghai
1660
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --at "2026-06-10T09:00" -z UTC
1661
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --every 10m
1662
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --from-contains "@example.com"
1663
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --config ./gmail-trigger.json
1664
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --label "Support"
1665
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --actor anyone`
1681
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --expr "0 9 * * *" -z Asia/Shanghai
1682
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --at "2026-06-10T09:00" -z UTC
1683
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --every 10m
1684
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --from-contains "@example.com"
1685
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --config ./gmail-automation.json
1686
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --label "Support"
1687
+ zero workflow automation update 22222222-2222-4222-8222-222222222222 --actor anyone`
1666
1688
  ).action(
1667
1689
  withErrorHandler(async (id, options) => {
1668
- const existing = await getWorkflowTrigger(id);
1669
- const trigger = await updateWorkflowTrigger(
1690
+ const existing = await getWorkflowAutomation(id);
1691
+ const automation = await updateWorkflowAutomation(
1670
1692
  id,
1671
1693
  buildUpdate(options, existing)
1672
1694
  );
1673
- console.log(source_default.green(`\u2713 Trigger ${trigger.id} updated`));
1674
- printWorkflowTriggerDetails(trigger);
1695
+ console.log(source_default.green(`\u2713 Automation ${automation.id} updated`));
1696
+ printWorkflowAutomationDetails(automation);
1675
1697
  })
1676
1698
  );
1677
- var listCommand2 = new Command().name("list").alias("ls").description("List a workflow's triggers").argument("<workflow>", "Workflow ID or name").option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
1699
+ var listCommand2 = new Command().name("list").alias("ls").description("List a workflow's automations").argument("<workflow>", "Workflow ID or name").option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
1678
1700
  "after",
1679
1701
  `
1680
1702
  Examples:
1681
- zero workflow trigger list tell-a-joke --agent <agent-id>
1682
- zero workflow trigger list <workflow-id>`
1703
+ zero workflow automation list tell-a-joke --agent <agent-id>
1704
+ zero workflow automation list <workflow-id>`
1683
1705
  ).action(
1684
1706
  withErrorHandler(
1685
1707
  async (workflowRef, options) => {
1686
1708
  const workflowId = await resolveWorkflowRef(workflowRef, options);
1687
- const triggers = await listWorkflowTriggers(workflowId);
1688
- if (triggers.length === 0) {
1689
- console.log(source_default.dim("No triggers"));
1709
+ const automations = await listWorkflowAutomations(workflowId);
1710
+ if (automations.length === 0) {
1711
+ console.log(source_default.dim("No automations"));
1690
1712
  console.log(
1691
1713
  source_default.dim(
1692
- ` Add one with: zero workflow trigger add ${workflowRef} cron --expr "0 9 * * *"`
1714
+ ` Add one with: zero workflow automation add ${workflowRef} cron --expr "0 9 * * *"`
1693
1715
  )
1694
1716
  );
1695
1717
  return;
1696
1718
  }
1697
- printWorkflowTriggersTable(triggers);
1719
+ printWorkflowAutomationsTable(automations);
1698
1720
  }
1699
1721
  )
1700
1722
  );
1701
- var showCommand = new Command().name("show").description("Show a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
1723
+ var showCommand = new Command().name("show").description("Show a workflow automation").argument("<automation>", "Workflow automation ID").action(
1702
1724
  withErrorHandler(async (id) => {
1703
- const trigger = await getWorkflowTrigger(id);
1704
- printWorkflowTriggerDetails(trigger);
1725
+ const automation = await getWorkflowAutomation(id);
1726
+ printWorkflowAutomationDetails(automation);
1705
1727
  })
1706
1728
  );
1707
- var rmCommand = new Command().name("rm").alias("remove").description("Remove a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
1729
+ var rmCommand = new Command().name("rm").alias("remove").description("Remove a workflow automation").argument("<automation>", "Workflow automation ID").action(
1708
1730
  withErrorHandler(async (id) => {
1709
- await deleteWorkflowTrigger(id);
1710
- console.log(source_default.green(`\u2713 Trigger ${id} removed`));
1731
+ await deleteWorkflowAutomation(id);
1732
+ console.log(source_default.green(`\u2713 Automation ${id} removed`));
1711
1733
  })
1712
1734
  );
1713
- var enableCommand = new Command().name("enable").description("Enable a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
1735
+ var enableCommand = new Command().name("enable").description("Enable a workflow automation").argument("<automation>", "Workflow automation ID").action(
1714
1736
  withErrorHandler(async (id) => {
1715
- const trigger = await enableWorkflowTrigger(id);
1716
- console.log(source_default.green(`\u2713 Trigger ${trigger.id} enabled`));
1737
+ const automation = await enableWorkflowAutomation(id);
1738
+ console.log(source_default.green(`\u2713 Automation ${automation.id} enabled`));
1717
1739
  })
1718
1740
  );
1719
- var disableCommand = new Command().name("disable").description("Disable a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
1741
+ var disableCommand = new Command().name("disable").description("Disable a workflow automation").argument("<automation>", "Workflow automation ID").action(
1720
1742
  withErrorHandler(async (id) => {
1721
- const trigger = await disableWorkflowTrigger(id);
1722
- console.log(source_default.green(`\u2713 Trigger ${trigger.id} disabled`));
1743
+ const automation = await disableWorkflowAutomation(id);
1744
+ console.log(source_default.green(`\u2713 Automation ${automation.id} disabled`));
1723
1745
  })
1724
1746
  );
1725
- var triggerCommand = new Command().name("trigger").description("Manage a workflow's triggers").addCommand(addCommand).addCommand(updateCommand).addCommand(listCommand2).addCommand(showCommand).addCommand(rmCommand).addCommand(enableCommand).addCommand(disableCommand).addHelpText(
1747
+ var automationCommand = new Command().name("automation").description("Manage a workflow's automations").addCommand(addCommand).addCommand(updateCommand).addCommand(listCommand2).addCommand(showCommand).addCommand(rmCommand).addCommand(enableCommand).addCommand(disableCommand).addHelpText(
1726
1748
  "after",
1727
1749
  `
1728
1750
  Examples:
1729
- Add a trigger: zero workflow trigger add <workflow-id> cron --expr "0 9 * * *"
1730
- Add a Notion page: zero workflow trigger add <workflow-id> notion-child-page-created --parent-page-url "https://www.notion.so/..."
1731
- Add a webhook: zero workflow trigger add <workflow-id> webhook
1732
- Update a schedule: zero workflow trigger update <trigger-id> --every 10m
1733
- List triggers: zero workflow trigger list <workflow-id>
1734
- Inspect a trigger: zero workflow trigger show <trigger-id>
1735
- Pause one trigger: zero workflow trigger disable <trigger-id>`
1751
+ Add an automation: zero workflow automation add <workflow-id> cron --expr "0 9 * * *"
1752
+ Add a Notion page: zero workflow automation add <workflow-id> notion-child-page-created --parent-page-url "https://www.notion.so/..."
1753
+ Add a webhook: zero workflow automation add <workflow-id> webhook
1754
+ Update a schedule: zero workflow automation update <automation-id> --every 10m
1755
+ List automations: zero workflow automation list <workflow-id>
1756
+ Inspect an automation: zero workflow automation show <automation-id>
1757
+ Pause one automation: zero workflow automation disable <automation-id>`
1736
1758
  );
1737
1759
 
1760
+ // src/commands/zero/workflow/legacy-trigger.ts
1761
+ init_esm_shims();
1762
+ var legacyTriggerCommand = new Command("trigger").helpOption(false).allowUnknownOption().argument("[args...]").action(() => {
1763
+ console.error("renamed: use zero workflow automation");
1764
+ process.exit(1);
1765
+ });
1766
+
1738
1767
  // src/commands/zero/workflow/index.ts
1739
- var zeroWorkflowCommand = new Command("workflow").description("Manage workflows").addCommand(createCommand).addCommand(editCommand).addCommand(viewCommand).addCommand(listCommand).addCommand(deleteCommand).addCommand(copyCommand).addCommand(triggerCommand).addHelpText(
1768
+ var zeroWorkflowCommand = new Command("workflow").description("Manage workflows").addCommand(createCommand).addCommand(editCommand).addCommand(viewCommand).addCommand(listCommand).addCommand(deleteCommand).addCommand(copyCommand).addCommand(automationCommand).addCommand(legacyTriggerCommand, { hidden: true }).addHelpText(
1740
1769
  "after",
1741
1770
  `
1742
1771
  Examples:
@@ -1745,10 +1774,10 @@ Examples:
1745
1774
  View workflow content: zero workflow view <workflow> --agent <agent-id>
1746
1775
  Update workflow content: zero workflow edit <workflow> --agent <agent-id> --instruction "New steps"
1747
1776
  Copy onto another agent: zero workflow copy <workflow> --agent <source-agent-id> --to-agent <target-agent-id>
1748
- Manage triggers: zero workflow trigger --help
1777
+ Manage automations: zero workflow automation --help
1749
1778
  Delete a workflow: zero workflow delete <workflow> --agent <agent-id> -y`
1750
1779
  );
1751
1780
  export {
1752
1781
  zeroWorkflowCommand
1753
1782
  };
1754
- //# sourceMappingURL=workflow-NSKFK6TX.js.map
1783
+ //# sourceMappingURL=workflow-Q2XBT6JV.js.map