@cargo-ai/cli 1.0.44 → 1.0.45
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/build/commands/orchestration/action.d.ts.map +1 -1
- package/build/commands/orchestration/action.js +11 -1
- package/build/commands/orchestration/index.d.ts.map +1 -1
- package/build/commands/orchestration/index.js +6 -1
- package/build/commands/orchestration/node.d.ts.map +1 -1
- package/build/commands/orchestration/node.js +41 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAaxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAaxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4LN"}
|
|
@@ -2,7 +2,17 @@ import { applyRecordsLimit, ExitCodes, failWith, handleApiCall, outputJson, pars
|
|
|
2
2
|
export function registerActionCommands(parent, getApi) {
|
|
3
3
|
const action = parent
|
|
4
4
|
.command("action")
|
|
5
|
-
.description("Execute actions (single run or batch)")
|
|
5
|
+
.description("Execute actions (single run or batch)")
|
|
6
|
+
.addHelpText("after", `
|
|
7
|
+
The default way to run a tool or connector action: no workflow, release, or node
|
|
8
|
+
graph needed. Creates a run and consumes credits.
|
|
9
|
+
|
|
10
|
+
- 'config' inside --action must be empty ({}); inputs go in --data.
|
|
11
|
+
- The run is asynchronous: pass --wait-until-finished, or poll it with
|
|
12
|
+
'cargo-ai orchestration run get <uuid>'.
|
|
13
|
+
|
|
14
|
+
To debug a node inside an existing workflow instead, use
|
|
15
|
+
'cargo-ai orchestration node'.`);
|
|
6
16
|
action
|
|
7
17
|
.command("execute")
|
|
8
18
|
.description("Execute a single action")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAexC,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAexC,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA0BN"}
|
|
@@ -14,7 +14,12 @@ import { registerWorkflowCommands } from "./workflow.js";
|
|
|
14
14
|
export function registerOrchestrationCommands(parent, getApi) {
|
|
15
15
|
const orchestration = parent
|
|
16
16
|
.command("orchestration")
|
|
17
|
-
.description("Workflows, plays, runs, batches, tools, templates")
|
|
17
|
+
.description("Workflows, plays, runs, batches, tools, templates")
|
|
18
|
+
.addHelpText("after", `
|
|
19
|
+
Running vs. debugging:
|
|
20
|
+
action Run a tool or connector action — no workflow needed. The usual choice.
|
|
21
|
+
node Debug one node of an existing workflow ('node compute' is free,
|
|
22
|
+
'node execute' really runs it and consumes credits).`);
|
|
18
23
|
registerActionCommands(orchestration, getApi);
|
|
19
24
|
registerWorkflowCommands(orchestration, getApi);
|
|
20
25
|
registerPlayCommands(orchestration, getApi);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA8J7E"}
|
|
@@ -2,13 +2,33 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerNodeCommands(parent, getApi) {
|
|
3
3
|
const node = parent
|
|
4
4
|
.command("node")
|
|
5
|
-
.description("
|
|
5
|
+
.description("Debug a workflow one node at a time: compute a node's config, validate node definitions, execute a single node")
|
|
6
|
+
.addHelpText("after", `
|
|
7
|
+
Use these commands to debug one node of an existing workflow release. To just
|
|
8
|
+
run a tool or connector action, no workflow needed, use instead:
|
|
9
|
+
$ cargo-ai orchestration action execute --action '<json>' --data '<json>'
|
|
10
|
+
|
|
11
|
+
'compute' and 'validate' are free and run nothing. 'execute' is not a dry run:
|
|
12
|
+
it performs the node's real action and consumes credits.
|
|
13
|
+
|
|
14
|
+
Debugging loop:
|
|
15
|
+
$ cargo-ai orchestration span list --run-uuid <uuid> --execution-started-after <iso-date>
|
|
16
|
+
$ cargo-ai orchestration release get-deployed --workflow-uuid <uuid>
|
|
17
|
+
$ cargo-ai orchestration node compute --node '<json>' --context '<json>'
|
|
18
|
+
$ cargo-ai orchestration node execute --workflow-uuid <uuid> --release-uuid <uuid> --node '<json>' --computed-config '<json>' --context '<json>'`);
|
|
6
19
|
node
|
|
7
20
|
.command("compute")
|
|
8
21
|
.description("Compute a node's configuration from its definition and context")
|
|
9
22
|
.requiredOption("--node <json>", "Node definition (JSON object, required)")
|
|
10
23
|
.requiredOption("--context <json>", "Execution context (JSON object, required)")
|
|
11
24
|
.option("--group-context <json>", "Group context for grouped nodes (JSON object)")
|
|
25
|
+
.addHelpText("after", `
|
|
26
|
+
Free, runs nothing: resolves the node's template expressions against --context,
|
|
27
|
+
so you can see a node's inputs before spending credits on it. Returns
|
|
28
|
+
{"computedConfig":{...}} — pass that inner object to 'node execute'.
|
|
29
|
+
|
|
30
|
+
Examples:
|
|
31
|
+
$ cargo-ai orchestration node compute --node '{"uuid":"...","slug":"enrich","kind":"connector","integrationSlug":"clearbit","actionSlug":"company_enrich","connectorUuid":"...","config":{"domain":{"kind":"templateExpression","expression":"{{nodes.start.domain}}","instructTo":"none","fromRecipe":false}}}' --context '{"nodes":{"start":{"domain":"acme.com"}}}'`)
|
|
12
32
|
.action(async (opts) => {
|
|
13
33
|
const api = getApi();
|
|
14
34
|
const result = await handleApiCall(() => api.orchestration.node.compute({
|
|
@@ -24,6 +44,13 @@ export function registerNodeCommands(parent, getApi) {
|
|
|
24
44
|
.command("validate")
|
|
25
45
|
.description("Validate node definitions for correctness")
|
|
26
46
|
.requiredOption("--nodes <json>", "Node definitions to validate (JSON array, required)")
|
|
47
|
+
.addHelpText("after", `
|
|
48
|
+
Free, runs nothing: checks that a node graph is well-formed. Takes the whole
|
|
49
|
+
graph as a JSON array, not a single node. Returns {"outcome":"valid"} or
|
|
50
|
+
{"outcome":"notValid","invalidNodes":[...]}.
|
|
51
|
+
|
|
52
|
+
Examples:
|
|
53
|
+
$ cargo-ai orchestration node validate --nodes '[{"uuid":"00000000-0001-0000-0000-000000000000","slug":"start","kind":"native","actionSlug":"start","config":{},"childrenUuids":[],"fallbackOnFailure":false,"position":{"x":0,"y":0}}]'`)
|
|
27
54
|
.action(async (opts) => {
|
|
28
55
|
const api = getApi();
|
|
29
56
|
const result = await handleApiCall(() => api.orchestration.node.validate({
|
|
@@ -40,6 +67,19 @@ export function registerNodeCommands(parent, getApi) {
|
|
|
40
67
|
.requiredOption("--computed-config <json>", "Computed configuration from 'node compute' (JSON object, required)")
|
|
41
68
|
.requiredOption("--context <json>", "Execution context (JSON object, required)")
|
|
42
69
|
.option("--group-context <json>", "Group context for grouped nodes (JSON object)")
|
|
70
|
+
.addHelpText("after", `
|
|
71
|
+
Not a dry run: performs the node's real action and consumes credits. The node
|
|
72
|
+
must belong to the given release — to run an arbitrary action with no workflow,
|
|
73
|
+
use 'cargo-ai orchestration action execute' instead.
|
|
74
|
+
|
|
75
|
+
Get --workflow-uuid, --release-uuid and --node from 'release get-deployed', and
|
|
76
|
+
--computed-config from the 'computedConfig' of 'node compute'.
|
|
77
|
+
|
|
78
|
+
Returns {"status":"success","data":{...},"creditsUsedCount":N}, or
|
|
79
|
+
{"status":"pending","runUuid":"..."} — poll that with 'orchestration run get'.
|
|
80
|
+
|
|
81
|
+
Examples:
|
|
82
|
+
$ cargo-ai orchestration node execute --workflow-uuid <uuid> --release-uuid <uuid> --node '<json>' --computed-config '{"domain":"acme.com"}' --context '{"nodes":{"start":{"domain":"acme.com"}}}'`)
|
|
43
83
|
.action(async (opts) => {
|
|
44
84
|
const api = getApi();
|
|
45
85
|
const result = await handleApiCall(() => api.orchestration.node.execute({
|