@cargo-ai/cli 1.0.8 → 1.0.9
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/ai/agent.d.ts.map +1 -1
- package/build/commands/ai/agent.js +24 -14
- package/build/commands/ai/chat.d.ts.map +1 -1
- package/build/commands/ai/chat.js +21 -11
- package/build/commands/ai/mcpClient.d.ts.map +1 -1
- package/build/commands/ai/mcpClient.js +12 -6
- package/build/commands/ai/mcpServer.d.ts.map +1 -1
- package/build/commands/ai/mcpServer.js +32 -11
- package/build/commands/ai/message.d.ts.map +1 -1
- package/build/commands/ai/message.js +34 -22
- package/build/commands/ai/prompt.d.ts.map +1 -1
- package/build/commands/ai/prompt.js +23 -9
- package/build/commands/ai/release.d.ts.map +1 -1
- package/build/commands/ai/release.js +42 -42
- package/build/commands/ai/suggestedAction.js +3 -3
- package/build/commands/auth.d.ts.map +1 -1
- package/build/commands/auth.js +14 -3
- package/build/commands/connection/connector.d.ts.map +1 -1
- package/build/commands/connection/connector.js +23 -18
- package/build/commands/connection/integration.d.ts.map +1 -1
- package/build/commands/connection/integration.js +9 -9
- package/build/commands/expression/expressionEval.d.ts.map +1 -1
- package/build/commands/expression/expressionEval.js +10 -7
- package/build/commands/orchestration/batch.d.ts.map +1 -1
- package/build/commands/orchestration/batch.js +31 -25
- package/build/commands/orchestration/index.d.ts.map +1 -1
- package/build/commands/orchestration/index.js +2 -0
- package/build/commands/orchestration/log.d.ts +4 -0
- package/build/commands/orchestration/log.d.ts.map +1 -0
- package/build/commands/orchestration/log.js +122 -0
- package/build/commands/orchestration/node.d.ts.map +1 -1
- package/build/commands/orchestration/node.js +16 -14
- package/build/commands/orchestration/play.d.ts.map +1 -1
- package/build/commands/orchestration/play.js +15 -7
- package/build/commands/orchestration/release.d.ts.map +1 -1
- package/build/commands/orchestration/release.js +6 -4
- package/build/commands/orchestration/run.d.ts.map +1 -1
- package/build/commands/orchestration/run.js +103 -82
- package/build/commands/segmentation/segment.d.ts.map +1 -1
- package/build/commands/segmentation/segment.js +33 -22
- package/build/commands/storage/model.d.ts.map +1 -1
- package/build/commands/storage/model.js +4 -0
- package/build/commands/storage/record.d.ts.map +1 -1
- package/build/commands/storage/record.js +15 -8
- package/build/commands/workspace/user.d.ts.map +1 -1
- package/build/commands/workspace/user.js +22 -13
- package/build/index.js +14 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerConnectorCommands(parent, getApi) {
|
|
3
3
|
const connector = parent
|
|
4
4
|
.command("connector")
|
|
5
|
-
.description("
|
|
5
|
+
.description("Manage connectors (list, get, create, update, remove, autocomplete)");
|
|
6
6
|
connector
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List all connectors")
|
|
@@ -40,13 +40,13 @@ export function registerConnectorCommands(parent, getApi) {
|
|
|
40
40
|
});
|
|
41
41
|
connector
|
|
42
42
|
.command("autocomplete")
|
|
43
|
-
.description("Autocomplete connector values")
|
|
44
|
-
.requiredOption("--connector-uuid <uuid>", "Connector UUID")
|
|
45
|
-
.requiredOption("--slug <slug>", "
|
|
46
|
-
.requiredOption("--params <json>", "
|
|
47
|
-
.option("--value <value>", "Search value")
|
|
48
|
-
.option("--refresh", "Refresh cached results")
|
|
49
|
-
.option("--variables <json>",
|
|
43
|
+
.description("Autocomplete connector values for a given field")
|
|
44
|
+
.requiredOption("--connector-uuid <uuid>", "Connector UUID (string, required)")
|
|
45
|
+
.requiredOption("--slug <slug>", "Field slug to autocomplete (string, required)")
|
|
46
|
+
.requiredOption("--params <json>", "Autocomplete parameters (JSON object, required)")
|
|
47
|
+
.option("--value <value>", "Search value to filter results (string)")
|
|
48
|
+
.option("--refresh", "Refresh cached results (boolean flag)")
|
|
49
|
+
.option("--variables <json>", "Additional variables (JSON object)")
|
|
50
50
|
.action(async (opts) => {
|
|
51
51
|
const api = getApi();
|
|
52
52
|
const result = await handleApiCall(() => api.connection.connector.autocomplete({
|
|
@@ -63,10 +63,10 @@ export function registerConnectorCommands(parent, getApi) {
|
|
|
63
63
|
});
|
|
64
64
|
connector
|
|
65
65
|
.command("get-dynamic-schema")
|
|
66
|
-
.description("Get dynamic schema for a connector")
|
|
67
|
-
.requiredOption("--connector-uuid <uuid>", "Connector UUID")
|
|
68
|
-
.requiredOption("--slug <slug>", "
|
|
69
|
-
.requiredOption("--params <json>", "
|
|
66
|
+
.description("Get dynamic schema for a connector action")
|
|
67
|
+
.requiredOption("--connector-uuid <uuid>", "Connector UUID (string, required)")
|
|
68
|
+
.requiredOption("--slug <slug>", "Action slug (string, required)")
|
|
69
|
+
.requiredOption("--params <json>", "Schema parameters (JSON object, required)")
|
|
70
70
|
.action(async (opts) => {
|
|
71
71
|
const api = getApi();
|
|
72
72
|
const result = await handleApiCall(() => api.connection.connector.getDynamicSchema({
|
|
@@ -79,12 +79,17 @@ export function registerConnectorCommands(parent, getApi) {
|
|
|
79
79
|
connector
|
|
80
80
|
.command("create")
|
|
81
81
|
.description("Create a connector")
|
|
82
|
-
.requiredOption("--name <name>", "Connector name")
|
|
83
|
-
.requiredOption("--slug <slug>", "Connector slug")
|
|
84
|
-
.requiredOption("--integration-slug <slug>", "Integration slug")
|
|
85
|
-
.option("--config <json>", "
|
|
86
|
-
.option("--rate-limit <json>", 'Rate limit (JSON
|
|
87
|
-
.option("--cache-ttl-milliseconds <n>", "Cache TTL in milliseconds")
|
|
82
|
+
.requiredOption("--name <name>", "Connector name (string, required)")
|
|
83
|
+
.requiredOption("--slug <slug>", "Connector slug identifier (string, required)")
|
|
84
|
+
.requiredOption("--integration-slug <slug>", "Integration slug to connect to (string, required)")
|
|
85
|
+
.option("--config <json>", "Connector configuration (JSON object, shape depends on integration)")
|
|
86
|
+
.option("--rate-limit <json>", 'Rate limit configuration (JSON object). Shape: {"maxRequests": integer, "windowMs": integer}')
|
|
87
|
+
.option("--cache-ttl-milliseconds <n>", "Cache TTL in milliseconds (integer)")
|
|
88
|
+
.addHelpText("after", `
|
|
89
|
+
Examples:
|
|
90
|
+
$ cargo-ai connection connector create --name "HubSpot" --slug hubspot-main --integration-slug hubspot
|
|
91
|
+
$ cargo-ai connection connector create --name "HubSpot" --slug hubspot-main --integration-slug hubspot \\
|
|
92
|
+
--rate-limit '{"maxRequests":100,"windowMs":60000}' --cache-ttl-milliseconds 300000`)
|
|
88
93
|
.action(async (opts) => {
|
|
89
94
|
const api = getApi();
|
|
90
95
|
const result = await handleApiCall(() => api.connection.connector.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA2FN"}
|
|
@@ -2,15 +2,15 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerIntegrationCommands(parent, getApi) {
|
|
3
3
|
const integration = parent
|
|
4
4
|
.command("integration")
|
|
5
|
-
.description("
|
|
5
|
+
.description("Browse and manage integrations");
|
|
6
6
|
integration
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List all integrations")
|
|
9
|
-
.option("--category <category>", "Filter by category")
|
|
10
|
-
.option("--slug <slug>", "Filter by slug")
|
|
11
|
-
.option("--search <search>", "Search by name
|
|
12
|
-
.option("--has-actions <bool>",
|
|
13
|
-
.option("--has-extractors <bool>",
|
|
9
|
+
.option("--category <category>", "Filter by category (string)")
|
|
10
|
+
.option("--slug <slug>", "Filter by integration slug (string)")
|
|
11
|
+
.option("--search <search>", "Search by name, case-insensitive (string)")
|
|
12
|
+
.option("--has-actions <bool>", 'Filter by presence of actions (string: "true" or "false")')
|
|
13
|
+
.option("--has-extractors <bool>", 'Filter by presence of extractors (string: "true" or "false")')
|
|
14
14
|
.action(async (opts) => {
|
|
15
15
|
const api = getApi();
|
|
16
16
|
const result = await handleApiCall(() => api.connection.integration.list({
|
|
@@ -48,9 +48,9 @@ export function registerIntegrationCommands(parent, getApi) {
|
|
|
48
48
|
});
|
|
49
49
|
integration
|
|
50
50
|
.command("complete-oauth")
|
|
51
|
-
.description("Complete OAuth for an integration")
|
|
52
|
-
.requiredOption("--slug <slug>", "Integration slug")
|
|
53
|
-
.requiredOption("--params <json>", "OAuth
|
|
51
|
+
.description("Complete OAuth flow for an integration")
|
|
52
|
+
.requiredOption("--slug <slug>", "Integration slug (string, required)")
|
|
53
|
+
.requiredOption("--params <json>", "OAuth callback parameters (JSON object, required)")
|
|
54
54
|
.action(async (opts) => {
|
|
55
55
|
const api = getApi();
|
|
56
56
|
const result = await handleApiCall(() => api.connection.integration.completeOauth({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressionEval.d.ts","sourceRoot":"","sources":["../../../src/commands/expression/expressionEval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"expressionEval.d.ts","sourceRoot":"","sources":["../../../src/commands/expression/expressionEval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAsDN"}
|
|
@@ -2,12 +2,15 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerExpressionEvalCommands(parent, getApi) {
|
|
3
3
|
const expr = parent
|
|
4
4
|
.command("eval")
|
|
5
|
-
.description("
|
|
5
|
+
.description("Evaluate and generate expressions");
|
|
6
6
|
expr
|
|
7
7
|
.command("evaluate")
|
|
8
|
-
.description("Evaluate an expression")
|
|
9
|
-
.requiredOption("--expression <json>", "Expression definition (JSON object)")
|
|
10
|
-
.requiredOption("--variables <json>",
|
|
8
|
+
.description("Evaluate an expression with given variables")
|
|
9
|
+
.requiredOption("--expression <json>", "Expression definition (JSON object, required)")
|
|
10
|
+
.requiredOption("--variables <json>", "Variable bindings for the expression (JSON object, required)")
|
|
11
|
+
.addHelpText("after", `
|
|
12
|
+
Example:
|
|
13
|
+
$ cargo-ai expression eval evaluate --expression '{"kind":"template","template":"Hello {{name}}"}' --variables '{"name":"World"}'`)
|
|
11
14
|
.action(async (opts) => {
|
|
12
15
|
const api = getApi();
|
|
13
16
|
const result = await handleApiCall(() => api.expression.expression.evaluate({
|
|
@@ -18,9 +21,9 @@ export function registerExpressionEvalCommands(parent, getApi) {
|
|
|
18
21
|
});
|
|
19
22
|
expr
|
|
20
23
|
.command("generate")
|
|
21
|
-
.description("Generate an expression")
|
|
22
|
-
.requiredOption("--prompt <text>", "
|
|
23
|
-
.requiredOption("--variables <json>",
|
|
24
|
+
.description("Generate an expression from a natural language prompt")
|
|
25
|
+
.requiredOption("--prompt <text>", "Natural language description of the expression (string, required)")
|
|
26
|
+
.requiredOption("--variables <json>", "Available variable bindings (JSON object, required)")
|
|
24
27
|
.action(async (opts) => {
|
|
25
28
|
const api = getApi();
|
|
26
29
|
const result = await handleApiCall(() => api.expression.expression.generate({
|
|
@@ -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;AAQxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
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;AAQxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAyON"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson, pollBatchUntilFinished, } from "../runHandler.js";
|
|
2
2
|
export function registerBatchCommands(parent, getApi) {
|
|
3
|
-
const batch = parent
|
|
3
|
+
const batch = parent
|
|
4
|
+
.command("batch")
|
|
5
|
+
.description("Manage batch operations (list, get, create, cancel, preview, download)");
|
|
4
6
|
batch
|
|
5
7
|
.command("list")
|
|
6
8
|
.description("List batches")
|
|
7
|
-
.option("--workflow-uuids <uuids>", "
|
|
8
|
-
.option("--release-uuid <uuid>", "
|
|
9
|
-
.option("--parent-batch-uuid <uuid>", "
|
|
10
|
-
.option("--parent-run-uuid <uuid>", "
|
|
11
|
-
.option("--parent-node-uuid <uuid>", "
|
|
12
|
-
.option("--statuses <list>", "
|
|
13
|
-
.option("--has-runs", "Only batches
|
|
14
|
-
.option("--is-skipped", "Only skipped batches")
|
|
15
|
-
.option("--is-finished", "Only finished batches")
|
|
16
|
-
.option("--included-data-kinds <list>", "
|
|
17
|
-
.option("--excluded-data-kinds <list>", "
|
|
18
|
-
.option("--limit <n>", "
|
|
19
|
-
.option("--offset <n>", "
|
|
9
|
+
.option("--workflow-uuids <uuids>", "Filter by workflow UUIDs (comma-separated strings)")
|
|
10
|
+
.option("--release-uuid <uuid>", "Filter by release UUID (string)")
|
|
11
|
+
.option("--parent-batch-uuid <uuid>", "Filter by parent batch UUID (string)")
|
|
12
|
+
.option("--parent-run-uuid <uuid>", "Filter by parent run UUID (string)")
|
|
13
|
+
.option("--parent-node-uuid <uuid>", "Filter by parent node UUID (string)")
|
|
14
|
+
.option("--statuses <list>", "Filter by statuses (comma-separated: pending,running,finished,failed,cancelled)")
|
|
15
|
+
.option("--has-runs", "Only return batches that have runs (boolean flag)")
|
|
16
|
+
.option("--is-skipped", "Only return skipped batches (boolean flag)")
|
|
17
|
+
.option("--is-finished", "Only return finished batches (boolean flag)")
|
|
18
|
+
.option("--included-data-kinds <list>", "Include only these data kinds (comma-separated strings)")
|
|
19
|
+
.option("--excluded-data-kinds <list>", "Exclude these data kinds (comma-separated strings)")
|
|
20
|
+
.option("--limit <n>", "Max results to return (integer, default: 20)", "20")
|
|
21
|
+
.option("--offset <n>", "Number of results to skip (integer, default: 0)", "0")
|
|
20
22
|
.action(async (opts) => {
|
|
21
23
|
const api = getApi();
|
|
22
24
|
const result = await handleApiCall(() => api.orchestration.batch.list({
|
|
@@ -59,12 +61,16 @@ export function registerBatchCommands(parent, getApi) {
|
|
|
59
61
|
batch
|
|
60
62
|
.command("create")
|
|
61
63
|
.description("Create a batch")
|
|
62
|
-
.option("--workflow-uuid <uuid>", "Workflow UUID")
|
|
63
|
-
.requiredOption("--data <json>", 'Batch data (JSON,
|
|
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")
|
|
66
|
-
.option("--wait-until-finished", "Poll the batch until it reaches a terminal status before returning")
|
|
67
|
-
.option("--polling-interval <ms>", "Polling interval in milliseconds
|
|
64
|
+
.option("--workflow-uuid <uuid>", "Workflow UUID (string)")
|
|
65
|
+
.requiredOption("--data <json>", 'Batch data source (JSON object, required). Supported kinds: {"kind":"segment","segmentUuid":"..."} or {"kind":"file","s3Filename":"..."}')
|
|
66
|
+
.option("--release-uuid <uuid>", "Release UUID to pin the batch to (string)")
|
|
67
|
+
.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")')
|
|
68
|
+
.option("--wait-until-finished", "Poll the batch until it reaches a terminal status before returning (boolean flag)")
|
|
69
|
+
.option("--polling-interval <ms>", "Polling interval in milliseconds, used with --wait-until-finished (integer, default: 5000)", "5000")
|
|
70
|
+
.addHelpText("after", `
|
|
71
|
+
Examples:
|
|
72
|
+
$ cargo-ai orchestration batch create --data '{"kind":"segment","segmentUuid":"550e8400-..."}'
|
|
73
|
+
$ cargo-ai orchestration batch create --workflow-uuid 550e8400-... --data '{"kind":"file","s3Filename":"input.csv"}' --wait-until-finished`)
|
|
68
74
|
.action(async (opts) => {
|
|
69
75
|
const api = getApi();
|
|
70
76
|
const result = await handleApiCall(() => api.orchestration.batch.create({
|
|
@@ -93,9 +99,9 @@ export function registerBatchCommands(parent, getApi) {
|
|
|
93
99
|
});
|
|
94
100
|
batch
|
|
95
101
|
.command("preview")
|
|
96
|
-
.description("Preview a batch")
|
|
97
|
-
.requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
|
|
98
|
-
.requiredOption("--data <json>", 'Batch data (JSON,
|
|
102
|
+
.description("Preview a batch without creating it")
|
|
103
|
+
.requiredOption("--workflow-uuid <uuid>", "Workflow UUID (string, required)")
|
|
104
|
+
.requiredOption("--data <json>", 'Batch data source (JSON object, required). Same format as "batch create --data"')
|
|
99
105
|
.action(async (opts) => {
|
|
100
106
|
const api = getApi();
|
|
101
107
|
const result = await handleApiCall(() => api.orchestration.batch.preview({
|
|
@@ -107,8 +113,8 @@ export function registerBatchCommands(parent, getApi) {
|
|
|
107
113
|
batch
|
|
108
114
|
.command("download")
|
|
109
115
|
.description("Download batch results")
|
|
110
|
-
.requiredOption("--uuid <uuid>", "Batch UUID")
|
|
111
|
-
.requiredOption("--output-node-slug <slug>", "Output node slug")
|
|
116
|
+
.requiredOption("--uuid <uuid>", "Batch UUID (string, required)")
|
|
117
|
+
.requiredOption("--output-node-slug <slug>", "Output node slug to download from (string, required)")
|
|
112
118
|
.action(async (opts) => {
|
|
113
119
|
const api = getApi();
|
|
114
120
|
const result = await handleApiCall(() => api.orchestration.batch.download({
|
|
@@ -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;
|
|
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;AAaxC,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgBN"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { registerBatchCommands } from "./batch.js";
|
|
2
2
|
import { registerDraftReleaseCommands } from "./draftRelease.js";
|
|
3
|
+
import { registerLogCommands } from "./log.js";
|
|
3
4
|
import { registerNodeCommands } from "./node.js";
|
|
4
5
|
import { registerPlayCommands } from "./play.js";
|
|
5
6
|
import { registerRecordCommands } from "./record.js";
|
|
@@ -16,6 +17,7 @@ export function registerOrchestrationCommands(parent, getApi) {
|
|
|
16
17
|
registerPlayCommands(orchestration, getApi);
|
|
17
18
|
registerRunCommands(orchestration, getApi);
|
|
18
19
|
registerBatchCommands(orchestration, getApi);
|
|
20
|
+
registerLogCommands(orchestration, getApi);
|
|
19
21
|
registerReleaseCommands(orchestration, getApi);
|
|
20
22
|
registerDraftReleaseCommands(orchestration, getApi);
|
|
21
23
|
registerToolCommands(orchestration, getApi);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/log.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,CAwO5E"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
export function registerLogCommands(parent, getApi) {
|
|
3
|
+
const log = parent.command("log").description("Execution log operations");
|
|
4
|
+
log
|
|
5
|
+
.command("list")
|
|
6
|
+
.description("List execution logs")
|
|
7
|
+
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
8
|
+
.option("--batch-uuid <uuid>", "Batch UUID")
|
|
9
|
+
.option("--run-uuid <uuid>", "Run UUID")
|
|
10
|
+
.option("--record-id <id>", "Record ID")
|
|
11
|
+
.option("--record-title <title>", "Record title (ilike)")
|
|
12
|
+
.option("--record-title-or-id <text>", "Record id or title (ilike on id or title, same as run list)")
|
|
13
|
+
.option("--execution-title <text>", "Execution title (ilike)")
|
|
14
|
+
.option("--node-uuid <uuid>", "Node UUID")
|
|
15
|
+
.option("--node-kind <kind>", "Node kind: native | connector | tool | agent")
|
|
16
|
+
.option("--node-slug <slug>", "Workflow node slug (exact match)")
|
|
17
|
+
.option("--node-integration-slug <slug>", "Connector integration slug (exact match)")
|
|
18
|
+
.option("--node-connector-uuid <uuid>", "Connector UUID")
|
|
19
|
+
.option("--node-action-slug <slug>", "Node action slug (exact match)")
|
|
20
|
+
.option("--parent-node-uuid <uuid>", "Parent node UUID on the run")
|
|
21
|
+
.option("--node-tool-uuid <uuid>", "Tool node UUID")
|
|
22
|
+
.option("--node-agent-uuid <uuid>", "Agent node UUID")
|
|
23
|
+
.option("--node-release-uuid <uuid>", "Release UUID on the node")
|
|
24
|
+
.option("--execution-statuses <list>", "Comma-separated: pending,success,error")
|
|
25
|
+
.option("--parent-run-uuid <uuid>", "Parent run UUID")
|
|
26
|
+
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date)")
|
|
27
|
+
.option("--execution-started-before <date>", "Execution started on or before (ISO date)")
|
|
28
|
+
.option("--limit <n>", "Limit", "30")
|
|
29
|
+
.option("--offset <n>", "Offset", "0")
|
|
30
|
+
.action(async (opts) => {
|
|
31
|
+
const api = getApi();
|
|
32
|
+
const result = await handleApiCall(() => api.orchestration.log.list({
|
|
33
|
+
workflowUuid: opts.workflowUuid,
|
|
34
|
+
batchUuid: opts.batchUuid,
|
|
35
|
+
runUuid: opts.runUuid,
|
|
36
|
+
recordId: opts.recordId,
|
|
37
|
+
recordTitle: opts.recordTitle,
|
|
38
|
+
recordTitleOrId: opts.recordTitleOrId,
|
|
39
|
+
executionTitle: opts.executionTitle,
|
|
40
|
+
nodeUuid: opts.nodeUuid,
|
|
41
|
+
nodeKind: opts.nodeKind !== undefined
|
|
42
|
+
? opts.nodeKind
|
|
43
|
+
: undefined,
|
|
44
|
+
nodeSlug: opts.nodeSlug,
|
|
45
|
+
nodeIntegrationSlug: opts.nodeIntegrationSlug,
|
|
46
|
+
nodeConnectorUuid: opts.nodeConnectorUuid,
|
|
47
|
+
nodeActionSlug: opts.nodeActionSlug,
|
|
48
|
+
parentNodeUuid: opts.parentNodeUuid,
|
|
49
|
+
nodeToolUuid: opts.nodeToolUuid,
|
|
50
|
+
nodeAgentUuid: opts.nodeAgentUuid,
|
|
51
|
+
nodeReleaseUuid: opts.nodeReleaseUuid,
|
|
52
|
+
executionStatuses: opts.executionStatuses !== undefined
|
|
53
|
+
? opts.executionStatuses
|
|
54
|
+
.split(",")
|
|
55
|
+
.map((s) => s.trim())
|
|
56
|
+
: undefined,
|
|
57
|
+
parentRunUuid: opts.parentRunUuid,
|
|
58
|
+
executionStartedAfter: opts.executionStartedAfter,
|
|
59
|
+
executionStartedBefore: opts.executionStartedBefore,
|
|
60
|
+
limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
|
|
61
|
+
offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
|
|
62
|
+
}));
|
|
63
|
+
outputJson(result);
|
|
64
|
+
});
|
|
65
|
+
log
|
|
66
|
+
.command("count")
|
|
67
|
+
.description("Count execution logs")
|
|
68
|
+
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
69
|
+
.option("--batch-uuid <uuid>", "Batch UUID")
|
|
70
|
+
.option("--run-uuid <uuid>", "Run UUID")
|
|
71
|
+
.option("--record-id <id>", "Record ID")
|
|
72
|
+
.option("--record-title <title>", "Record title (ilike)")
|
|
73
|
+
.option("--record-title-or-id <text>", "Record id or title (ilike on id or title, same as run list)")
|
|
74
|
+
.option("--execution-title <text>", "Execution title (ilike)")
|
|
75
|
+
.option("--node-uuid <uuid>", "Node UUID")
|
|
76
|
+
.option("--node-kind <kind>", "Node kind: native | connector | tool | agent")
|
|
77
|
+
.option("--node-slug <slug>", "Workflow node slug (exact match)")
|
|
78
|
+
.option("--node-integration-slug <slug>", "Connector integration slug (exact match)")
|
|
79
|
+
.option("--node-connector-uuid <uuid>", "Connector UUID")
|
|
80
|
+
.option("--node-action-slug <slug>", "Node action slug (exact match)")
|
|
81
|
+
.option("--parent-node-uuid <uuid>", "Parent node UUID on the run")
|
|
82
|
+
.option("--node-tool-uuid <uuid>", "Tool node UUID")
|
|
83
|
+
.option("--node-agent-uuid <uuid>", "Agent node UUID")
|
|
84
|
+
.option("--node-release-uuid <uuid>", "Release UUID on the node")
|
|
85
|
+
.option("--execution-statuses <list>", "Comma-separated: pending,success,error")
|
|
86
|
+
.option("--parent-run-uuid <uuid>", "Parent run UUID")
|
|
87
|
+
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date)")
|
|
88
|
+
.option("--execution-started-before <date>", "Execution started on or before (ISO date)")
|
|
89
|
+
.action(async (opts) => {
|
|
90
|
+
const api = getApi();
|
|
91
|
+
const result = await handleApiCall(() => api.orchestration.log.count({
|
|
92
|
+
workflowUuid: opts.workflowUuid,
|
|
93
|
+
batchUuid: opts.batchUuid,
|
|
94
|
+
runUuid: opts.runUuid,
|
|
95
|
+
recordId: opts.recordId,
|
|
96
|
+
recordTitle: opts.recordTitle,
|
|
97
|
+
recordTitleOrId: opts.recordTitleOrId,
|
|
98
|
+
executionTitle: opts.executionTitle,
|
|
99
|
+
nodeUuid: opts.nodeUuid,
|
|
100
|
+
nodeKind: opts.nodeKind !== undefined
|
|
101
|
+
? opts.nodeKind
|
|
102
|
+
: undefined,
|
|
103
|
+
nodeSlug: opts.nodeSlug,
|
|
104
|
+
nodeIntegrationSlug: opts.nodeIntegrationSlug,
|
|
105
|
+
nodeConnectorUuid: opts.nodeConnectorUuid,
|
|
106
|
+
nodeActionSlug: opts.nodeActionSlug,
|
|
107
|
+
parentNodeUuid: opts.parentNodeUuid,
|
|
108
|
+
nodeToolUuid: opts.nodeToolUuid,
|
|
109
|
+
nodeAgentUuid: opts.nodeAgentUuid,
|
|
110
|
+
nodeReleaseUuid: opts.nodeReleaseUuid,
|
|
111
|
+
executionStatuses: opts.executionStatuses !== undefined
|
|
112
|
+
? opts.executionStatuses
|
|
113
|
+
.split(",")
|
|
114
|
+
.map((s) => s.trim())
|
|
115
|
+
: undefined,
|
|
116
|
+
parentRunUuid: opts.parentRunUuid,
|
|
117
|
+
executionStartedAfter: opts.executionStartedAfter,
|
|
118
|
+
executionStartedBefore: opts.executionStartedBefore,
|
|
119
|
+
}));
|
|
120
|
+
outputJson(result);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
@@ -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,CAwG7E"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
2
|
export function registerNodeCommands(parent, getApi) {
|
|
3
|
-
const node = parent
|
|
3
|
+
const node = parent
|
|
4
|
+
.command("node")
|
|
5
|
+
.description("Compute, validate, and execute workflow nodes");
|
|
4
6
|
node
|
|
5
7
|
.command("compute")
|
|
6
|
-
.description("Compute a node")
|
|
7
|
-
.requiredOption("--node <json>", "Node definition (JSON object)")
|
|
8
|
-
.requiredOption("--context <json>", "Execution context (JSON object)")
|
|
9
|
-
.option("--group-context <json>", "Group context (JSON object)")
|
|
8
|
+
.description("Compute a node's configuration from its definition and context")
|
|
9
|
+
.requiredOption("--node <json>", "Node definition (JSON object, required)")
|
|
10
|
+
.requiredOption("--context <json>", "Execution context (JSON object, required)")
|
|
11
|
+
.option("--group-context <json>", "Group context for grouped nodes (JSON object)")
|
|
10
12
|
.action(async (opts) => {
|
|
11
13
|
const api = getApi();
|
|
12
14
|
const result = await handleApiCall(() => api.orchestration.node.compute({
|
|
@@ -20,8 +22,8 @@ export function registerNodeCommands(parent, getApi) {
|
|
|
20
22
|
});
|
|
21
23
|
node
|
|
22
24
|
.command("validate")
|
|
23
|
-
.description("Validate
|
|
24
|
-
.requiredOption("--nodes <json>", "
|
|
25
|
+
.description("Validate node definitions for correctness")
|
|
26
|
+
.requiredOption("--nodes <json>", "Node definitions to validate (JSON array, required)")
|
|
25
27
|
.action(async (opts) => {
|
|
26
28
|
const api = getApi();
|
|
27
29
|
const result = await handleApiCall(() => api.orchestration.node.validate({
|
|
@@ -31,13 +33,13 @@ export function registerNodeCommands(parent, getApi) {
|
|
|
31
33
|
});
|
|
32
34
|
node
|
|
33
35
|
.command("execute")
|
|
34
|
-
.description("Execute a node")
|
|
35
|
-
.requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
|
|
36
|
-
.requiredOption("--release-uuid <uuid>", "Release UUID")
|
|
37
|
-
.requiredOption("--node <json>", "Node definition (JSON object)")
|
|
38
|
-
.requiredOption("--computed-config <json>", "Computed
|
|
39
|
-
.requiredOption("--context <json>", "Execution context (JSON object)")
|
|
40
|
-
.option("--group-context <json>", "Group context (JSON object)")
|
|
36
|
+
.description("Execute a node within a workflow run")
|
|
37
|
+
.requiredOption("--workflow-uuid <uuid>", "Workflow UUID (string, required)")
|
|
38
|
+
.requiredOption("--release-uuid <uuid>", "Release UUID (string, required)")
|
|
39
|
+
.requiredOption("--node <json>", "Node definition (JSON object, required)")
|
|
40
|
+
.requiredOption("--computed-config <json>", "Computed configuration from 'node compute' (JSON object, required)")
|
|
41
|
+
.requiredOption("--context <json>", "Execution context (JSON object, required)")
|
|
42
|
+
.option("--group-context <json>", "Group context for grouped nodes (JSON object)")
|
|
41
43
|
.action(async (opts) => {
|
|
42
44
|
const api = getApi();
|
|
43
45
|
const result = await handleApiCall(() => api.orchestration.node.execute({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/play.ts"],"names":[],"mappings":"AACA,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":"play.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/play.ts"],"names":[],"mappings":"AACA,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,CAuG7E"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
2
|
export function registerPlayCommands(parent, getApi) {
|
|
3
|
-
const play = parent
|
|
3
|
+
const play = parent
|
|
4
|
+
.command("play")
|
|
5
|
+
.description("Manage plays (list, create, update, remove)");
|
|
4
6
|
play
|
|
5
7
|
.command("list")
|
|
6
8
|
.description("List all plays")
|
|
@@ -12,12 +14,18 @@ export function registerPlayCommands(parent, getApi) {
|
|
|
12
14
|
play
|
|
13
15
|
.command("create")
|
|
14
16
|
.description("Create a play")
|
|
15
|
-
.requiredOption("--name <name>", "Play name")
|
|
16
|
-
.requiredOption("--model-uuid <uuid>", "Model UUID")
|
|
17
|
-
.requiredOption("--change-kinds <kinds>", "Change kinds (comma-separated)")
|
|
18
|
-
.requiredOption("--run-creation-rule <rule>",
|
|
19
|
-
.option("--description <description>", "
|
|
20
|
-
.option("--folder-uuid <uuid>", "Folder UUID")
|
|
17
|
+
.requiredOption("--name <name>", "Play name (string, required)")
|
|
18
|
+
.requiredOption("--model-uuid <uuid>", "Model UUID to trigger on (string, required)")
|
|
19
|
+
.requiredOption("--change-kinds <kinds>", "Change kinds to trigger on (comma-separated strings, required)")
|
|
20
|
+
.requiredOption("--run-creation-rule <rule>", "Run creation rule. Allowed values: always, once, noConcurrency")
|
|
21
|
+
.option("--description <description>", "Play description (string)")
|
|
22
|
+
.option("--folder-uuid <uuid>", "Folder UUID (string)")
|
|
23
|
+
.addHelpText("after", `
|
|
24
|
+
Examples:
|
|
25
|
+
$ cargo-ai orchestration play create --name "My Play" --model-uuid 550e8400-... \\
|
|
26
|
+
--change-kinds created,updated --run-creation-rule always
|
|
27
|
+
$ cargo-ai orchestration play create --name "Dedup" --model-uuid 550e8400-... \\
|
|
28
|
+
--change-kinds created --run-creation-rule noConcurrency --description "Dedup new records"`)
|
|
21
29
|
.action(async (opts) => {
|
|
22
30
|
const api = getApi();
|
|
23
31
|
const changeKinds = opts.changeKinds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA6CN"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
2
|
export function registerReleaseCommands(parent, getApi) {
|
|
3
|
-
const release = parent
|
|
3
|
+
const release = parent
|
|
4
|
+
.command("release")
|
|
5
|
+
.description("Manage workflow releases (list, get)");
|
|
4
6
|
release
|
|
5
7
|
.command("list")
|
|
6
8
|
.description("List releases")
|
|
7
|
-
.option("--workflow-uuid <uuid>", "
|
|
8
|
-
.option("--limit <n>", "
|
|
9
|
-
.option("--offset <n>", "
|
|
9
|
+
.option("--workflow-uuid <uuid>", "Filter by workflow UUID (string)")
|
|
10
|
+
.option("--limit <n>", "Max results to return (integer, default: 20)", "20")
|
|
11
|
+
.option("--offset <n>", "Number of results to skip (integer, default: 0)", "0")
|
|
10
12
|
.action(async (opts) => {
|
|
11
13
|
const api = getApi();
|
|
12
14
|
const result = await handleApiCall(() => api.orchestration.release.list({
|
|
@@ -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;AAQxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
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;AAQxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAsiB5E"}
|