@cargo-ai/cli 1.0.110 → 1.0.113
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/connection/connector.js +3 -3
- package/build/commands/orchestration/action.js +4 -4
- package/build/commands/orchestration/node.js +1 -1
- package/build/commands/orchestration/play.js +1 -1
- package/build/commands/orchestration/run.d.ts.map +1 -1
- package/build/commands/orchestration/run.js +1 -3
- package/build/commands/segmentation/segment.js +5 -5
- package/package.json +2 -2
|
@@ -87,7 +87,7 @@ export function registerConnectorCommands(parent, getApi) {
|
|
|
87
87
|
.option("--slug <slug>", "Connector slug identifier (string, required with --config)")
|
|
88
88
|
.requiredOption("--integration-slug <slug>", "Integration slug to connect to (string, required)")
|
|
89
89
|
.option("--config <json>", "Connector configuration (JSON object, shape depends on integration). Skips the browser.")
|
|
90
|
-
.option("--rate-limit <json>", 'Rate limit configuration (JSON object). Shape: {"
|
|
90
|
+
.option("--rate-limit <json>", 'Rate limit configuration (JSON object). Shape: {"unit": "second" | "minute" | "hour" | "day", "max": number, "strategy": "spread" | "burst"} ("burst" cannot use "second")')
|
|
91
91
|
.option("--cache-ttl-milliseconds <n>", "Cache TTL in milliseconds (integer)")
|
|
92
92
|
.addHelpText("after", `
|
|
93
93
|
Examples:
|
|
@@ -98,7 +98,7 @@ Examples:
|
|
|
98
98
|
$ cargo-ai connection connector create --name "HubSpot" --slug hubspot-main --integration-slug hubspot \\
|
|
99
99
|
--config '{"method":"privateApp","accessToken":"pat-..."}'
|
|
100
100
|
$ cargo-ai connection connector create --name "HubSpot" --slug hubspot-main --integration-slug hubspot \\
|
|
101
|
-
--config '{...}' --rate-limit '{"
|
|
101
|
+
--config '{...}' --rate-limit '{"unit":"minute","max":100,"strategy":"spread"}' --cache-ttl-milliseconds 300000`)
|
|
102
102
|
.action(async (opts) => {
|
|
103
103
|
const api = getApi();
|
|
104
104
|
// `--config` keeps the original, fully scriptable behaviour.
|
|
@@ -149,7 +149,7 @@ Examples:
|
|
|
149
149
|
.requiredOption("--uuid <uuid>", "Connector UUID")
|
|
150
150
|
.option("--name <name>", "Connector name")
|
|
151
151
|
.option("--config <json>", "Configuration (JSON object)")
|
|
152
|
-
.option("--rate-limit <json>", 'Rate limit (JSON, e.g. {"
|
|
152
|
+
.option("--rate-limit <json>", 'Rate limit (JSON, e.g. {"unit":"minute","max":100,"strategy":"spread"})')
|
|
153
153
|
.option("--cache-ttl-milliseconds <n>", "Cache TTL in milliseconds")
|
|
154
154
|
.action(async (opts) => {
|
|
155
155
|
const api = getApi();
|
|
@@ -88,7 +88,7 @@ Examples:
|
|
|
88
88
|
.addHelpText("after", `
|
|
89
89
|
Examples:
|
|
90
90
|
$ cargo-ai orchestration action execute --action '{"kind":"tool","toolUuid":"550e8400-..."}' --data '{"email":"user@example.com"}'
|
|
91
|
-
$ cargo-ai orchestration action execute --action '{"kind":"connector","integrationSlug":"slack","actionSlug":"
|
|
91
|
+
$ cargo-ai orchestration action execute --action '{"kind":"connector","integrationSlug":"slack","actionSlug":"postMessage","connectorUuid":"..."}' --data '{"channelId":"C0123456789","format":"markdown","body":"hello"}' --wait-until-finished`)
|
|
92
92
|
.action(async (opts) => {
|
|
93
93
|
const actionPayload = parseJson(opts.action, "--action");
|
|
94
94
|
const data = parseJson(opts.data, "--data");
|
|
@@ -120,8 +120,8 @@ Examples:
|
|
|
120
120
|
.addHelpText("after", `
|
|
121
121
|
Examples:
|
|
122
122
|
$ cargo-ai orchestration action execute-batch --action '{"kind":"tool","toolUuid":"550e8400-..."}' --records '[{"email":"a@b.com"},{"email":"c@d.com"}]'
|
|
123
|
-
$ cargo-ai orchestration action execute-batch --action '{"kind":"connector","integrationSlug":"slack","actionSlug":"
|
|
124
|
-
$ cargo-ai orchestration action execute-batch --action '{"kind":"connector","integrationSlug":"
|
|
123
|
+
$ cargo-ai orchestration action execute-batch --action '{"kind":"connector","integrationSlug":"slack","actionSlug":"postMessage","connectorUuid":"..."}' --records '[{"channelId":"C0123456789","format":"markdown","body":"hello"}]' --wait-until-finished
|
|
124
|
+
$ cargo-ai orchestration action execute-batch --action '{"kind":"connector","integrationSlug":"findyMail","actionSlug":"findEmail"}' --records '[{"name":"Ada Lovelace","domain":"example.com"},{"linkedinUrl":"https://www.linkedin.com/in/ada"}]' --limit 1 --wait-until-finished`)
|
|
125
125
|
.action(async (opts) => {
|
|
126
126
|
const actionPayload = parseJson(opts.action, "--action");
|
|
127
127
|
let records = parseJson(opts.records, "--records");
|
|
@@ -163,7 +163,7 @@ Google Sheet. Pass those in --data, exactly as you would to 'action execute'.
|
|
|
163
163
|
|
|
164
164
|
Examples:
|
|
165
165
|
$ cargo-ai orchestration action get-output-schema --action '{"kind":"tool","toolUuid":"550e8400-..."}'
|
|
166
|
-
$ cargo-ai orchestration action get-output-schema --action '{"kind":"connector","integrationSlug":"clearbit","actionSlug":"
|
|
166
|
+
$ cargo-ai orchestration action get-output-schema --action '{"kind":"connector","integrationSlug":"clearbit","actionSlug":"enrichCompany"}'
|
|
167
167
|
$ cargo-ai orchestration action get-output-schema --action '{"kind":"connector","integrationSlug":"hubspot","actionSlug":"findRecords"}' --data '{"objectType":"contacts"}'`)
|
|
168
168
|
.action(async (opts) => {
|
|
169
169
|
const actionPayload = parseJson(opts.action, "--action");
|
|
@@ -38,7 +38,7 @@ so you can see a node's inputs before spending credits on it. Returns
|
|
|
38
38
|
{"computedConfig":{...}} — pass that inner object to 'node execute'.
|
|
39
39
|
|
|
40
40
|
Examples:
|
|
41
|
-
$ cargo-ai orchestration node compute --node '{"uuid":"...","slug":"enrich","kind":"connector","integrationSlug":"clearbit","actionSlug":"
|
|
41
|
+
$ cargo-ai orchestration node compute --node '{"uuid":"...","slug":"enrich","kind":"connector","integrationSlug":"clearbit","actionSlug":"enrichCompany","connectorUuid":"...","config":{"domain":{"kind":"templateExpression","expression":"{{nodes.start.domain}}","instructTo":"none","fromRecipe":false}}}' --context '{"nodes":{"start":{"domain":"acme.com"}}}'`)
|
|
42
42
|
.action(async (opts) => {
|
|
43
43
|
const api = getApi();
|
|
44
44
|
const result = await handleApiCall(() => api.orchestration.node.compute({
|
|
@@ -88,7 +88,7 @@ Examples:
|
|
|
88
88
|
.option("--run-creation-rule <always|once|noConcurrency>", "Run creation rule")
|
|
89
89
|
.option("--folder-uuid <uuid>", "Folder UUID")
|
|
90
90
|
.option("--filter <json>", "Filter definition (JSON object, same format as segmentation segment update)")
|
|
91
|
-
.option("--sort <json>", 'Sort definition (JSON
|
|
91
|
+
.option("--sort <json>", 'Sort definition (JSON array). Shape: [{"columnSlug": string, "kind": "asc" | "desc"}]')
|
|
92
92
|
.option("--limit <n>", "Maximum number of records (integer)")
|
|
93
93
|
.option("--tracking-column-slugs <slugs>", "Column slugs to track changes on (comma-separated strings)")
|
|
94
94
|
.option("--schedule <json>", "Schedule definition (JSON object matching the play update API payload)")
|
|
@@ -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;AAgBxC,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;AAgBxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA6pB5E"}
|
|
@@ -255,7 +255,6 @@ Examples:
|
|
|
255
255
|
.option("--is-group-parent [true|false]", "Only return group parents (defaults to true when passed bare)", parseBooleanOption)
|
|
256
256
|
.option("--record-id <id>", "Filter by record ID (string)")
|
|
257
257
|
.option("--record-title <title>", "Filter by record title (string)")
|
|
258
|
-
.option("--record-title-or-id <value>", "Filter by record title or ID (string)")
|
|
259
258
|
.option("--is-finished [true|false]", "Only return finished runs (defaults to true when passed bare)", parseBooleanOption)
|
|
260
259
|
.option("--executions-filter <json>", "Filter by node executions (JSON object, same format as 'run list')")
|
|
261
260
|
.option("--created-after <date>", "Filter runs created after this date (ISO 8601 string)")
|
|
@@ -266,7 +265,7 @@ Examples:
|
|
|
266
265
|
Examples:
|
|
267
266
|
$ cargo-ai orchestration run download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output
|
|
268
267
|
$ cargo-ai orchestration run download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --format json
|
|
269
|
-
$ cargo-ai orchestration run download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --statuses
|
|
268
|
+
$ cargo-ai orchestration run download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --statuses success --is-finished
|
|
270
269
|
$ cargo-ai orchestration run download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --limit 1000 --offset 2000`)
|
|
271
270
|
.action(async (opts) => {
|
|
272
271
|
const api = getApi();
|
|
@@ -285,7 +284,6 @@ Examples:
|
|
|
285
284
|
isGroupParent: opts.isGroupParent,
|
|
286
285
|
recordId: opts.recordId,
|
|
287
286
|
recordTitle: opts.recordTitle,
|
|
288
|
-
recordTitleOrId: opts.recordTitleOrId,
|
|
289
287
|
isFinished: opts.isFinished,
|
|
290
288
|
executionsFilter: opts.executionsFilter !== undefined
|
|
291
289
|
? parseJson(opts.executionsFilter, "--executions-filter")
|
|
@@ -26,7 +26,7 @@ export function registerSegmentCommands(parent, getApi) {
|
|
|
26
26
|
.requiredOption("--name <name>", "Segment name (string, required)")
|
|
27
27
|
.requiredOption("--model-uuid <uuid>", "Model UUID (string, required)")
|
|
28
28
|
.requiredOption("--filter <json>", "Filter definition (JSON object, required)")
|
|
29
|
-
.option("--sort <json>", 'Sort definition (JSON
|
|
29
|
+
.option("--sort <json>", 'Sort definition (JSON array). Shape: [{"columnSlug": string, "kind": "asc" | "desc"}]')
|
|
30
30
|
.option("--limit <n>", "Max records in segment (integer)")
|
|
31
31
|
.option("--tracking-column-slugs <slugs>", "Column slugs to track changes on (comma-separated strings)")
|
|
32
32
|
.option("--column-slugs <slugs>", "Column slugs displayed for the segment (comma-separated strings)")
|
|
@@ -35,7 +35,7 @@ Examples:
|
|
|
35
35
|
$ cargo-ai segmentation segment create --name "Active Users" --model-uuid 550e8400-... \\
|
|
36
36
|
--filter '{"conjonction":"and","groups":[{"conjonction":"and","conditions":[]}]}'
|
|
37
37
|
$ cargo-ai segmentation segment create --name "Recent" --model-uuid 550e8400-... \\
|
|
38
|
-
--filter '{"conjonction":"and","groups":[]}' --sort '{"
|
|
38
|
+
--filter '{"conjonction":"and","groups":[]}' --sort '[{"columnSlug":"created_at","kind":"desc"}]' --limit 100
|
|
39
39
|
|
|
40
40
|
Filter object shape:
|
|
41
41
|
{ "conjonction": "and" | "or", "groups": [{ "conjonction": "and" | "or", "conditions": [...] }] }`)
|
|
@@ -63,7 +63,7 @@ Filter object shape:
|
|
|
63
63
|
.description("Download segment data")
|
|
64
64
|
.requiredOption("--model-uuid <uuid>", "Model UUID")
|
|
65
65
|
.requiredOption("--filter <json>", 'Filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[]}]})')
|
|
66
|
-
.option("--sort <json>", 'Sort (JSON, e.g. {"
|
|
66
|
+
.option("--sort <json>", 'Sort (JSON array, e.g. [{"columnSlug":"created_at","kind":"desc"}])')
|
|
67
67
|
.option("--limit <n>", "Limit")
|
|
68
68
|
.action(async (opts) => {
|
|
69
69
|
const api = getApi();
|
|
@@ -82,7 +82,7 @@ Filter object shape:
|
|
|
82
82
|
.description("Fetch segment records with optional enrichment")
|
|
83
83
|
.requiredOption("--model-uuid <uuid>", "Model UUID (string, required)")
|
|
84
84
|
.requiredOption("--filter <json>", "Filter definition (JSON object, required, same format as 'segment create')")
|
|
85
|
-
.option("--sort <json>", 'Sort definition (JSON
|
|
85
|
+
.option("--sort <json>", 'Sort definition (JSON array). Shape: [{"columnSlug": string, "kind": "asc" | "desc"}]')
|
|
86
86
|
.option("--limit <n>", "Max records in segment (integer)")
|
|
87
87
|
.option("--fetching-limit <n>", "Max records to fetch per page (integer)")
|
|
88
88
|
.option("--fetching-offset <n>", "Number of records to skip (integer)")
|
|
@@ -122,7 +122,7 @@ Filter object shape:
|
|
|
122
122
|
.requiredOption("--uuid <uuid>", "Segment UUID (string, required)")
|
|
123
123
|
.option("--name <name>", "Segment name (string)")
|
|
124
124
|
.option("--filter <json>", "Filter definition (JSON object, same format as 'segment create')")
|
|
125
|
-
.option("--sort <json>", 'Sort definition (JSON
|
|
125
|
+
.option("--sort <json>", 'Sort definition (JSON array). Shape: [{"columnSlug": string, "kind": "asc" | "desc"}]')
|
|
126
126
|
.option("--limit <n>", "Max records in segment (integer)")
|
|
127
127
|
.option("--tracking-column-slugs <slugs>", "Column slugs to track changes on (comma-separated strings)")
|
|
128
128
|
.option("--column-slugs <slugs>", "Column slugs displayed for the segment (comma-separated strings)")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://getcargo.ai",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@ai-sdk/harness": "^1.0.144",
|
|
75
75
|
"@ai-sdk/harness-claude-code": "^1.0.148",
|
|
76
|
-
"@cargo-ai/api": "^1.0.
|
|
76
|
+
"@cargo-ai/api": "^1.0.94",
|
|
77
77
|
"@cargo-ai/app-sdk": "^1.0.11",
|
|
78
78
|
"@cargo-ai/cdk": "^1.0.111",
|
|
79
79
|
"@cargo-ai/types": "^1.0.96",
|