@vm0/cli 9.263.0 → 9.264.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.
- package/{agent-U5H7QQ6W.js → agent-KRVTXAOE.js} +6 -6
- package/{banking-DSBRODJE.js → banking-QBRETSHD.js} +4 -4
- package/{browser-FZKCVWPF.js → browser-MQ3GQJ5U.js} +4 -4
- package/{chat-D5DXQQQN.js → chat-AVYE5DM6.js} +38 -16
- package/chat-AVYE5DM6.js.map +1 -0
- package/{chunk-JRLEVFU4.js → chunk-4FZPFRJH.js} +2 -2
- package/{chunk-JHCSTKSK.js → chunk-52KFOVUA.js} +17 -252
- package/chunk-52KFOVUA.js.map +1 -0
- package/{chunk-KZ3CS2NK.js → chunk-5NWS76CB.js} +394 -204
- package/chunk-5NWS76CB.js.map +1 -0
- package/{chunk-763OWT5S.js → chunk-FXM2FONE.js} +2 -2
- package/{chunk-SQ4KQQUA.js → chunk-GXNS5T7H.js} +2 -2
- package/{chunk-7BY6QXB2.js → chunk-HZ4TCSCL.js} +4 -4
- package/chunk-LN2ATWKS.js +96 -0
- package/chunk-LN2ATWKS.js.map +1 -0
- package/{chunk-DEZ5WUIV.js → chunk-LPA5CSUN.js} +2 -2
- package/{chunk-WFGOVUAO.js → chunk-LWBBI7NL.js} +11 -4
- package/chunk-LWBBI7NL.js.map +1 -0
- package/{chunk-WNEYNRKP.js → chunk-OYVARVJ4.js} +2 -2
- package/{chunk-TE6HUJO7.js → chunk-XX7HZFVS.js} +2 -2
- package/{computer-use-VYFUCFOW.js → computer-use-GFBPVCU6.js} +4 -4
- package/{connector-ME5QOGO3.js → connector-CVNVQ2FS.js} +7 -7
- package/{credit-LO5CLWQE.js → credit-FGJ4YRL4.js} +5 -5
- package/{developer-support-LGZS7NOO.js → developer-support-XJKZ7VM3.js} +4 -4
- package/{doctor-TQI2B6Q2.js → doctor-ZMKXNLJY.js} +5 -5
- package/{feishu-VGTLKS3I.js → feishu-IJ3JASUR.js} +4 -4
- package/{finance-XQETM32L.js → finance-JKPM2EFQ.js} +4 -4
- package/{generate-FTSU6IJH.js → generate-3ZVBU4ON.js} +5 -5
- package/{github-OLVQQBOM.js → github-LAXAOMUA.js} +4 -4
- package/{goal-2NYMFUM5.js → goal-VKVFUSJK.js} +4 -4
- package/{host-OIIYDML7.js → host-72KTJI5D.js} +4 -4
- package/{logs-H77ZUX3U.js → logs-EX4R6ZV7.js} +7 -6
- package/{logs-H77ZUX3U.js.map → logs-EX4R6ZV7.js.map} +1 -1
- package/{mail-H2MZKXWF.js → mail-RBEDA42M.js} +6 -6
- package/{maps-PI2DOJ2D.js → maps-HMQAR5G7.js} +4 -4
- package/{model-XE3HBT3S.js → model-ANIDYLR3.js} +5 -5
- package/{model-provider-ZNN7YGD4.js → model-provider-RMFP42QT.js} +5 -5
- package/{org-WNOFQ537.js → org-JED6LLWL.js} +4 -4
- package/package.json +1 -1
- package/{people-search-WDMWSRP5.js → people-search-OGILIEGA.js} +4 -4
- package/{phone-23QBOZVB.js → phone-RNXHRHQO.js} +4 -4
- package/{preference-Z45BVY3F.js → preference-BI26FJNI.js} +4 -4
- package/{resource-H6S3K7G6.js → resource-DPAXSL3G.js} +4 -4
- package/{scrape-KWNPFDEX.js → scrape-DG3FZR27.js} +4 -4
- package/{search-IFRLUNB6.js → search-XYHWGZKU.js} +7 -6
- package/{search-IFRLUNB6.js.map → search-XYHWGZKU.js.map} +1 -1
- package/{secret-GW4HHMFN.js → secret-GTKJZ32T.js} +4 -4
- package/{slack-45SQVSDV.js → slack-NCZP6TP5.js} +4 -4
- package/{teams-6IG4GDCD.js → teams-CUUCFIUH.js} +4 -4
- package/{telegram-7D3KEZ2J.js → telegram-SRGYEAHB.js} +4 -4
- package/{upgrade-ED45IEMQ.js → upgrade-EZAQOAU2.js} +3 -3
- package/{variable-B4CLRKJI.js → variable-BHUUNTGW.js} +4 -4
- package/{video-QOGXSHFS.js → video-KDOONJZI.js} +3 -3
- package/{weather-BA6KAOQ2.js → weather-FJ3R54OJ.js} +4 -4
- package/{web-JV2V4L6O.js → web-ZW2B3ERP.js} +4 -4
- package/{web-search-GIOVKSVD.js → web-search-KHYGITJK.js} +4 -4
- package/{whoami-OBDYSSH4.js → whoami-2DJHYCHI.js} +6 -6
- package/{workflow-OXEZWAI7.js → workflow-VYAAHYT7.js} +185 -13
- package/workflow-VYAAHYT7.js.map +1 -0
- package/zero.js +43 -43
- package/chat-D5DXQQQN.js.map +0 -1
- package/chunk-JHCSTKSK.js.map +0 -1
- package/chunk-KZ3CS2NK.js.map +0 -1
- package/chunk-WFGOVUAO.js.map +0 -1
- package/workflow-OXEZWAI7.js.map +0 -1
- /package/{agent-U5H7QQ6W.js.map → agent-KRVTXAOE.js.map} +0 -0
- /package/{banking-DSBRODJE.js.map → banking-QBRETSHD.js.map} +0 -0
- /package/{browser-FZKCVWPF.js.map → browser-MQ3GQJ5U.js.map} +0 -0
- /package/{chunk-JRLEVFU4.js.map → chunk-4FZPFRJH.js.map} +0 -0
- /package/{chunk-763OWT5S.js.map → chunk-FXM2FONE.js.map} +0 -0
- /package/{chunk-SQ4KQQUA.js.map → chunk-GXNS5T7H.js.map} +0 -0
- /package/{chunk-7BY6QXB2.js.map → chunk-HZ4TCSCL.js.map} +0 -0
- /package/{chunk-DEZ5WUIV.js.map → chunk-LPA5CSUN.js.map} +0 -0
- /package/{chunk-WNEYNRKP.js.map → chunk-OYVARVJ4.js.map} +0 -0
- /package/{chunk-TE6HUJO7.js.map → chunk-XX7HZFVS.js.map} +0 -0
- /package/{computer-use-VYFUCFOW.js.map → computer-use-GFBPVCU6.js.map} +0 -0
- /package/{connector-ME5QOGO3.js.map → connector-CVNVQ2FS.js.map} +0 -0
- /package/{credit-LO5CLWQE.js.map → credit-FGJ4YRL4.js.map} +0 -0
- /package/{developer-support-LGZS7NOO.js.map → developer-support-XJKZ7VM3.js.map} +0 -0
- /package/{doctor-TQI2B6Q2.js.map → doctor-ZMKXNLJY.js.map} +0 -0
- /package/{feishu-VGTLKS3I.js.map → feishu-IJ3JASUR.js.map} +0 -0
- /package/{finance-XQETM32L.js.map → finance-JKPM2EFQ.js.map} +0 -0
- /package/{generate-FTSU6IJH.js.map → generate-3ZVBU4ON.js.map} +0 -0
- /package/{github-OLVQQBOM.js.map → github-LAXAOMUA.js.map} +0 -0
- /package/{goal-2NYMFUM5.js.map → goal-VKVFUSJK.js.map} +0 -0
- /package/{host-OIIYDML7.js.map → host-72KTJI5D.js.map} +0 -0
- /package/{mail-H2MZKXWF.js.map → mail-RBEDA42M.js.map} +0 -0
- /package/{maps-PI2DOJ2D.js.map → maps-HMQAR5G7.js.map} +0 -0
- /package/{model-XE3HBT3S.js.map → model-ANIDYLR3.js.map} +0 -0
- /package/{model-provider-ZNN7YGD4.js.map → model-provider-RMFP42QT.js.map} +0 -0
- /package/{org-WNOFQ537.js.map → org-JED6LLWL.js.map} +0 -0
- /package/{people-search-WDMWSRP5.js.map → people-search-OGILIEGA.js.map} +0 -0
- /package/{phone-23QBOZVB.js.map → phone-RNXHRHQO.js.map} +0 -0
- /package/{preference-Z45BVY3F.js.map → preference-BI26FJNI.js.map} +0 -0
- /package/{resource-H6S3K7G6.js.map → resource-DPAXSL3G.js.map} +0 -0
- /package/{scrape-KWNPFDEX.js.map → scrape-DG3FZR27.js.map} +0 -0
- /package/{secret-GW4HHMFN.js.map → secret-GTKJZ32T.js.map} +0 -0
- /package/{slack-45SQVSDV.js.map → slack-NCZP6TP5.js.map} +0 -0
- /package/{teams-6IG4GDCD.js.map → teams-CUUCFIUH.js.map} +0 -0
- /package/{telegram-7D3KEZ2J.js.map → telegram-SRGYEAHB.js.map} +0 -0
- /package/{upgrade-ED45IEMQ.js.map → upgrade-EZAQOAU2.js.map} +0 -0
- /package/{variable-B4CLRKJI.js.map → variable-BHUUNTGW.js.map} +0 -0
- /package/{video-QOGXSHFS.js.map → video-KDOONJZI.js.map} +0 -0
- /package/{weather-BA6KAOQ2.js.map → weather-FJ3R54OJ.js.map} +0 -0
- /package/{web-JV2V4L6O.js.map → web-ZW2B3ERP.js.map} +0 -0
- /package/{web-search-GIOVKSVD.js.map → web-search-KHYGITJK.js.map} +0 -0
- /package/{whoami-OBDYSSH4.js.map → whoami-2DJHYCHI.js.map} +0 -0
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
callZeroWeather
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-52KFOVUA.js";
|
|
7
|
+
import "./chunk-LPA5CSUN.js";
|
|
8
8
|
import "./chunk-MA22KQYU.js";
|
|
9
9
|
import {
|
|
10
10
|
source_default,
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4FZPFRJH.js";
|
|
13
13
|
import "./chunk-MD3YWUKO.js";
|
|
14
14
|
import {
|
|
15
15
|
Command,
|
|
@@ -588,4 +588,4 @@ Notes:
|
|
|
588
588
|
export {
|
|
589
589
|
zeroWeatherCommand
|
|
590
590
|
};
|
|
591
|
-
//# sourceMappingURL=weather-
|
|
591
|
+
//# sourceMappingURL=weather-FJ3R54OJ.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from "node:module";
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-52KFOVUA.js";
|
|
5
5
|
import {
|
|
6
6
|
downloadWebFile,
|
|
7
7
|
uploadWebFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LPA5CSUN.js";
|
|
9
9
|
import "./chunk-MA22KQYU.js";
|
|
10
10
|
import {
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4FZPFRJH.js";
|
|
13
13
|
import "./chunk-MD3YWUKO.js";
|
|
14
14
|
import {
|
|
15
15
|
Command
|
|
@@ -107,4 +107,4 @@ Examples:
|
|
|
107
107
|
export {
|
|
108
108
|
zeroWebCommand
|
|
109
109
|
};
|
|
110
|
-
//# sourceMappingURL=web-
|
|
110
|
+
//# sourceMappingURL=web-ZW2B3ERP.js.map
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
zeroWebSearchDomainSchema,
|
|
10
10
|
zeroWebSearchRecencySchema,
|
|
11
11
|
zeroWebSearchRequestSchema
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-52KFOVUA.js";
|
|
13
|
+
import "./chunk-LPA5CSUN.js";
|
|
14
14
|
import "./chunk-MA22KQYU.js";
|
|
15
15
|
import {
|
|
16
16
|
source_default,
|
|
17
17
|
withErrorHandler
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4FZPFRJH.js";
|
|
19
19
|
import "./chunk-MD3YWUKO.js";
|
|
20
20
|
import {
|
|
21
21
|
Command,
|
|
@@ -148,4 +148,4 @@ Notes:
|
|
|
148
148
|
export {
|
|
149
149
|
zeroWebSearchCommand
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=web-search-
|
|
151
|
+
//# sourceMappingURL=web-search-KHYGITJK.js.map
|
|
@@ -4,16 +4,16 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
loadConnectorPermissionInfos,
|
|
6
6
|
policyIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HZ4TCSCL.js";
|
|
8
8
|
import {
|
|
9
9
|
permissionGrantsToFirewallPolicies
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XX7HZFVS.js";
|
|
11
11
|
import {
|
|
12
12
|
getZeroAgentUserConnectors,
|
|
13
13
|
listZeroConnectors,
|
|
14
14
|
listZeroUserPermissionGrants
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-52KFOVUA.js";
|
|
16
|
+
import "./chunk-LPA5CSUN.js";
|
|
17
17
|
import "./chunk-MA22KQYU.js";
|
|
18
18
|
import {
|
|
19
19
|
getActiveOrg,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getToken,
|
|
22
22
|
source_default,
|
|
23
23
|
withErrorHandler
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4FZPFRJH.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeZeroTokenPayload
|
|
27
27
|
} from "./chunk-MD3YWUKO.js";
|
|
@@ -196,4 +196,4 @@ Notes:
|
|
|
196
196
|
export {
|
|
197
197
|
zeroWhoamiCommand
|
|
198
198
|
};
|
|
199
|
-
//# sourceMappingURL=whoami-
|
|
199
|
+
//# sourceMappingURL=whoami-2DJHYCHI.js.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from "node:module";
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
getModelDisplayName
|
|
6
|
+
} from "./chunk-LN2ATWKS.js";
|
|
4
7
|
import {
|
|
5
8
|
isInteractive,
|
|
6
9
|
promptConfirm
|
|
@@ -15,20 +18,23 @@ import {
|
|
|
15
18
|
enableWorkflowAutomation,
|
|
16
19
|
getWorkflow,
|
|
17
20
|
getWorkflowAutomation,
|
|
21
|
+
getZeroChatThread,
|
|
18
22
|
listWorkflowAutomations,
|
|
19
23
|
listWorkflows,
|
|
24
|
+
listWorkspaceWorkflowAutomations,
|
|
25
|
+
listZeroModelPolicies,
|
|
20
26
|
updateWorkflow,
|
|
21
27
|
updateWorkflowAutomation
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-52KFOVUA.js";
|
|
29
|
+
import "./chunk-LPA5CSUN.js";
|
|
24
30
|
import "./chunk-MA22KQYU.js";
|
|
25
31
|
import {
|
|
26
32
|
source_default,
|
|
27
33
|
withErrorHandler
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4FZPFRJH.js";
|
|
29
35
|
import {
|
|
30
36
|
isFeatureEnabled
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LWBBI7NL.js";
|
|
32
38
|
import {
|
|
33
39
|
decodeZeroTokenPayload
|
|
34
40
|
} from "./chunk-MD3YWUKO.js";
|
|
@@ -774,7 +780,118 @@ function printGithubFilters(automation) {
|
|
|
774
780
|
}
|
|
775
781
|
}
|
|
776
782
|
}
|
|
777
|
-
function
|
|
783
|
+
function printCommand(lines) {
|
|
784
|
+
for (const line of lines) {
|
|
785
|
+
console.log(source_default.cyan(` ${line}`));
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function automationUpdateGuidance(automation) {
|
|
789
|
+
if (automation.kind !== "schedule") {
|
|
790
|
+
return {
|
|
791
|
+
label: "Edit automation",
|
|
792
|
+
command: ["zero workflow automation update --help"]
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
switch (automation.schedule.type) {
|
|
796
|
+
case "cron":
|
|
797
|
+
return {
|
|
798
|
+
label: "Change schedule",
|
|
799
|
+
command: [
|
|
800
|
+
"zero workflow automation update \\",
|
|
801
|
+
` ${automation.id} \\`,
|
|
802
|
+
' --expr "<cron-expression>" -z <timezone>'
|
|
803
|
+
]
|
|
804
|
+
};
|
|
805
|
+
case "loop":
|
|
806
|
+
return {
|
|
807
|
+
label: "Change interval",
|
|
808
|
+
command: [
|
|
809
|
+
"zero workflow automation update \\",
|
|
810
|
+
` ${automation.id} \\`,
|
|
811
|
+
" --every <duration>"
|
|
812
|
+
]
|
|
813
|
+
};
|
|
814
|
+
case "once":
|
|
815
|
+
return {
|
|
816
|
+
label: "Change run time",
|
|
817
|
+
command: [
|
|
818
|
+
"zero workflow automation update \\",
|
|
819
|
+
` ${automation.id} \\`,
|
|
820
|
+
' --at "<iso-time>" -z <timezone>'
|
|
821
|
+
]
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
function printManagementCommands(automation, options) {
|
|
826
|
+
if (!options.workflowId) {
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
const update = automationUpdateGuidance(automation);
|
|
830
|
+
const statusAction = automation.enabled ? {
|
|
831
|
+
label: "Pause automation",
|
|
832
|
+
command: "disable"
|
|
833
|
+
} : {
|
|
834
|
+
label: "Resume automation",
|
|
835
|
+
command: "enable"
|
|
836
|
+
};
|
|
837
|
+
console.log("");
|
|
838
|
+
console.log(source_default.bold("Manage with Zero CLI:"));
|
|
839
|
+
console.log(" Edit workflow:");
|
|
840
|
+
printCommand([
|
|
841
|
+
`zero workflow edit ${options.workflowId} \\`,
|
|
842
|
+
" --instruction-file <path>"
|
|
843
|
+
]);
|
|
844
|
+
console.log("");
|
|
845
|
+
console.log(` ${update.label}:`);
|
|
846
|
+
printCommand(update.command);
|
|
847
|
+
console.log("");
|
|
848
|
+
console.log(` ${statusAction.label}:`);
|
|
849
|
+
printCommand([
|
|
850
|
+
`zero workflow automation ${statusAction.command} \\`,
|
|
851
|
+
` ${automation.id}`
|
|
852
|
+
]);
|
|
853
|
+
console.log("");
|
|
854
|
+
console.log(" More automation options:");
|
|
855
|
+
printCommand(["zero workflow automation --help"]);
|
|
856
|
+
if (!automation.chatThreadId || !options.threadModel) {
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
console.log("");
|
|
860
|
+
console.log(source_default.bold("About model selection:"));
|
|
861
|
+
console.log(
|
|
862
|
+
" The selected model affects run behavior, output quality, and cost."
|
|
863
|
+
);
|
|
864
|
+
console.log(
|
|
865
|
+
" Automations do not store a separate model. All automations on this workflow"
|
|
866
|
+
);
|
|
867
|
+
console.log(
|
|
868
|
+
" share one chat thread and use that thread's model. Changing the thread model"
|
|
869
|
+
);
|
|
870
|
+
console.log(" changes the model used by all of them.");
|
|
871
|
+
console.log("");
|
|
872
|
+
console.log(source_default.bold("Model commands:"));
|
|
873
|
+
console.log(" Show:");
|
|
874
|
+
printCommand(["zero chat model \\", ` --thread ${automation.chatThreadId}`]);
|
|
875
|
+
console.log("");
|
|
876
|
+
console.log(" Change:");
|
|
877
|
+
printCommand([
|
|
878
|
+
"zero chat model \\",
|
|
879
|
+
` --thread ${automation.chatThreadId} \\`,
|
|
880
|
+
" <model-id>"
|
|
881
|
+
]);
|
|
882
|
+
console.log("");
|
|
883
|
+
console.log(" Options:");
|
|
884
|
+
printCommand(["zero model list"]);
|
|
885
|
+
}
|
|
886
|
+
function printWorkflowAutomationThreadModel(model) {
|
|
887
|
+
if (!model) {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
console.log(
|
|
891
|
+
`${"Thread model:".padEnd(14)}${model.label} ${source_default.dim(`(${model.id})`)}`
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
function printWorkflowAutomationDetails(automation, options = {}) {
|
|
778
895
|
const status = automation.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
|
|
779
896
|
console.log(`${"Kind:".padEnd(14)}${automation.kind}`);
|
|
780
897
|
console.log(`${"ID:".padEnd(14)}${automation.id}`);
|
|
@@ -859,12 +976,14 @@ function printWorkflowAutomationDetails(automation, options) {
|
|
|
859
976
|
console.log(
|
|
860
977
|
`${"Chat thread:".padEnd(14)}${automation.chatThreadId ?? source_default.dim("-")}`
|
|
861
978
|
);
|
|
979
|
+
printWorkflowAutomationThreadModel(options.threadModel);
|
|
862
980
|
console.log(
|
|
863
981
|
`${"Next run:".padEnd(14)}${formatRunTime(automation.nextRunAt)}`
|
|
864
982
|
);
|
|
865
983
|
console.log(
|
|
866
984
|
`${"Last run:".padEnd(14)}${formatRunTime(automation.lastRunAt)}`
|
|
867
985
|
);
|
|
986
|
+
printManagementCommands(automation, options);
|
|
868
987
|
}
|
|
869
988
|
|
|
870
989
|
// src/commands/zero/workflow/copy.ts
|
|
@@ -1167,6 +1286,36 @@ function automationKinds() {
|
|
|
1167
1286
|
...strapiIntegrationEnabled() ? STRAPI_EVENT_KINDS : []
|
|
1168
1287
|
];
|
|
1169
1288
|
}
|
|
1289
|
+
async function loadWorkflowAutomationThreadModel(automation) {
|
|
1290
|
+
if (!automation.chatThreadId) {
|
|
1291
|
+
return void 0;
|
|
1292
|
+
}
|
|
1293
|
+
const thread = await getZeroChatThread({
|
|
1294
|
+
threadId: automation.chatThreadId
|
|
1295
|
+
});
|
|
1296
|
+
const modelId = thread.selectedModel ?? (await listZeroModelPolicies()).workspaceDefaultModel;
|
|
1297
|
+
if (!modelId) {
|
|
1298
|
+
throw new Error(
|
|
1299
|
+
`Chat thread "${automation.chatThreadId}" has no available model`
|
|
1300
|
+
);
|
|
1301
|
+
}
|
|
1302
|
+
return {
|
|
1303
|
+
id: modelId,
|
|
1304
|
+
label: getModelDisplayName(modelId)
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
async function tryLoadWorkflowAutomationThreadModel(automation) {
|
|
1308
|
+
try {
|
|
1309
|
+
return await loadWorkflowAutomationThreadModel(automation);
|
|
1310
|
+
} catch (error) {
|
|
1311
|
+
console.warn(
|
|
1312
|
+
source_default.yellow(
|
|
1313
|
+
`\u26A0 Automation changed, but thread model details could not be loaded: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
1314
|
+
)
|
|
1315
|
+
);
|
|
1316
|
+
return void 0;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1170
1319
|
function githubWebhookEventKind(kind) {
|
|
1171
1320
|
return GITHUB_WEBHOOK_EVENT_KINDS.some((eventKind) => {
|
|
1172
1321
|
return eventKind === kind;
|
|
@@ -2465,7 +2614,12 @@ Notes:
|
|
|
2465
2614
|
console.log(
|
|
2466
2615
|
source_default.green(`\u2713 Automation added to workflow "${workflowRef}"`)
|
|
2467
2616
|
);
|
|
2468
|
-
|
|
2617
|
+
const threadModel = await tryLoadWorkflowAutomationThreadModel(automation);
|
|
2618
|
+
printWorkflowAutomationDetails(automation, {
|
|
2619
|
+
workflowRef,
|
|
2620
|
+
workflowId,
|
|
2621
|
+
threadModel
|
|
2622
|
+
});
|
|
2469
2623
|
}
|
|
2470
2624
|
)
|
|
2471
2625
|
);
|
|
@@ -2491,12 +2645,11 @@ Examples:
|
|
|
2491
2645
|
).action(
|
|
2492
2646
|
withErrorHandler(async (id, options) => {
|
|
2493
2647
|
const existing = await getWorkflowAutomation(id);
|
|
2494
|
-
const
|
|
2495
|
-
|
|
2496
|
-
buildUpdate(options, existing)
|
|
2497
|
-
);
|
|
2648
|
+
const body = buildUpdate(options, existing);
|
|
2649
|
+
const automation = await updateWorkflowAutomation(id, body);
|
|
2498
2650
|
console.log(source_default.green(`\u2713 Automation ${automation.id} updated`));
|
|
2499
|
-
|
|
2651
|
+
const threadModel = await tryLoadWorkflowAutomationThreadModel(automation);
|
|
2652
|
+
printWorkflowAutomationDetails(automation, { threadModel });
|
|
2500
2653
|
})
|
|
2501
2654
|
);
|
|
2502
2655
|
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(
|
|
@@ -2526,7 +2679,22 @@ Examples:
|
|
|
2526
2679
|
var showCommand = new Command().name("show").description("Show a workflow automation").argument("<automation>", "Workflow automation ID").action(
|
|
2527
2680
|
withErrorHandler(async (id) => {
|
|
2528
2681
|
const automation = await getWorkflowAutomation(id);
|
|
2529
|
-
|
|
2682
|
+
const entries = await listWorkspaceWorkflowAutomations();
|
|
2683
|
+
const entry = entries.find(({ automation: automation2 }) => {
|
|
2684
|
+
return automation2.id === id;
|
|
2685
|
+
});
|
|
2686
|
+
if (!entry) {
|
|
2687
|
+
printWorkflowAutomationDetails(automation);
|
|
2688
|
+
return;
|
|
2689
|
+
}
|
|
2690
|
+
const threadModel = await loadWorkflowAutomationThreadModel(
|
|
2691
|
+
entry.automation
|
|
2692
|
+
);
|
|
2693
|
+
printWorkflowAutomationDetails(entry.automation, {
|
|
2694
|
+
workflowRef: entry.workflow.name,
|
|
2695
|
+
workflowId: entry.workflow.id,
|
|
2696
|
+
threadModel
|
|
2697
|
+
});
|
|
2530
2698
|
})
|
|
2531
2699
|
);
|
|
2532
2700
|
var rmCommand = new Command().name("rm").alias("remove").description("Remove a workflow automation").argument("<automation>", "Workflow automation ID").action(
|
|
@@ -2539,12 +2707,16 @@ var enableCommand = new Command().name("enable").description("Enable a workflow
|
|
|
2539
2707
|
withErrorHandler(async (id) => {
|
|
2540
2708
|
const automation = await enableWorkflowAutomation(id);
|
|
2541
2709
|
console.log(source_default.green(`\u2713 Automation ${automation.id} enabled`));
|
|
2710
|
+
const threadModel = await tryLoadWorkflowAutomationThreadModel(automation);
|
|
2711
|
+
printWorkflowAutomationThreadModel(threadModel);
|
|
2542
2712
|
})
|
|
2543
2713
|
);
|
|
2544
2714
|
var disableCommand = new Command().name("disable").description("Disable a workflow automation").argument("<automation>", "Workflow automation ID").action(
|
|
2545
2715
|
withErrorHandler(async (id) => {
|
|
2546
2716
|
const automation = await disableWorkflowAutomation(id);
|
|
2547
2717
|
console.log(source_default.green(`\u2713 Automation ${automation.id} disabled`));
|
|
2718
|
+
const threadModel = await tryLoadWorkflowAutomationThreadModel(automation);
|
|
2719
|
+
printWorkflowAutomationThreadModel(threadModel);
|
|
2548
2720
|
})
|
|
2549
2721
|
);
|
|
2550
2722
|
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(
|
|
@@ -2576,4 +2748,4 @@ Examples:
|
|
|
2576
2748
|
export {
|
|
2577
2749
|
zeroWorkflowCommand
|
|
2578
2750
|
};
|
|
2579
|
-
//# sourceMappingURL=workflow-
|
|
2751
|
+
//# sourceMappingURL=workflow-VYAAHYT7.js.map
|