@cargo-ai/cli 1.0.1 → 1.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgKN"}
1
+ {"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAiLN"}
@@ -59,12 +59,18 @@ export function registerBatchCommands(parent, getApi) {
59
59
  batch
60
60
  .command("create")
61
61
  .description("Create a batch")
62
- .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
62
+ .option("--workflow-uuid <uuid>", "Workflow UUID")
63
63
  .requiredOption("--data <json>", 'Batch data (JSON, e.g. {"kind":"segment","segmentUuid":"..."} or {"kind":"file","s3Filename":"..."})')
64
+ .option("--release-uuid <uuid>", "Release UUID")
65
+ .option("--nodes <json>", 'Custom nodes to override the workflow definition (JSON array). Must include a start node (slug:"start") and an end node (slug:"end"). E.g. [{"uuid":"a","slug":"start","kind":"native","actionSlug":"start","config":{},"childrenUuids":["b"],"fallbackOnFailure":false,"position":{"x":0,"y":0}},{"uuid":"b","slug":"end","kind":"native","actionSlug":"end","config":{},"childrenUuids":[],"fallbackOnFailure":false,"position":{"x":1,"y":0}}]')
64
66
  .action(async (opts) => {
65
67
  const api = getApi();
66
68
  const result = await handleApiCall(() => api.orchestration.batch.create({
67
69
  workflowUuid: opts.workflowUuid,
70
+ releaseUuid: opts.releaseUuid,
71
+ nodes: opts.nodes !== undefined
72
+ ? parseJson(opts.nodes, "--nodes")
73
+ : undefined,
68
74
  data: parseJson(opts.data, "--data"),
69
75
  }));
70
76
  outputJson(result);
@@ -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,CAiE7E"}
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,CA+E7E"}
@@ -18,6 +18,17 @@ export function registerNodeCommands(parent, getApi) {
18
18
  }));
19
19
  outputJson(result);
20
20
  });
21
+ node
22
+ .command("validate")
23
+ .description("Validate nodes")
24
+ .requiredOption("--nodes <json>", "Array of node definitions (JSON array)")
25
+ .action(async (opts) => {
26
+ const api = getApi();
27
+ const result = await handleApiCall(() => api.orchestration.node.validate({
28
+ nodes: parseJson(opts.nodes, "--nodes"),
29
+ }));
30
+ outputJson(result);
31
+ });
21
32
  node
22
33
  .command("execute")
23
34
  .description("Execute a node")
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAoT5E"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA0T5E"}
@@ -59,15 +59,19 @@ export function registerRunCommands(parent, getApi) {
59
59
  run
60
60
  .command("create")
61
61
  .description("Create a run")
62
- .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
63
- .requiredOption("--data <json>", 'Run data (JSON, e.g. {"kind":"segment","segmentUuid":"..."} or {"kind":"record","record":{}})')
62
+ .option("--workflow-uuid <uuid>", "Workflow UUID")
63
+ .requiredOption("--data <json>", "Run data (JSON, e.g. {...})")
64
64
  .option("--release-uuid <uuid>", "Release UUID")
65
+ .option("--nodes <json>", 'Custom nodes to override the workflow definition (JSON array). Must include a start node (slug:"start") and an end node (slug:"end"). E.g. [{"uuid":"a","slug":"start","kind":"native","actionSlug":"start","config":{},"childrenUuids":["b"],"fallbackOnFailure":false,"position":{"x":0,"y":0}},{"uuid":"b","slug":"end","kind":"native","actionSlug":"end","config":{},"childrenUuids":[],"fallbackOnFailure":false,"position":{"x":1,"y":0}}]')
65
66
  .action(async (opts) => {
66
67
  const data = parseJson(opts.data, "--data");
67
68
  const api = getApi();
68
69
  const result = await handleApiCall(() => api.orchestration.run.create({
69
70
  workflowUuid: opts.workflowUuid,
70
71
  releaseUuid: opts.releaseUuid,
72
+ nodes: opts.nodes !== undefined
73
+ ? parseJson(opts.nodes, "--nodes")
74
+ : undefined,
71
75
  data,
72
76
  }));
73
77
  outputJson(result);
package/build/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ #!/usr/bin/env node
1
2
  export {};
2
3
  //# sourceMappingURL=index.d.ts.map
package/build/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { Command } from "commander";
2
3
  import { createApi } from "./api.js";
3
4
  import { registerAiCommands } from "./commands/ai/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "description": "Command-line interface for the Cargo API",
6
6
  "engines": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "commander": "^12.1.0",
32
- "@cargo-ai/api": "^1.0.8"
32
+ "@cargo-ai/api": "^1.0.9"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@cargo-ai/eslint-config": "*",