@cargo-ai/cli 1.0.127 → 1.0.128
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/prompt.d.ts.map +1 -1
- package/build/commands/ai/prompt.js +2 -2
- package/build/commands/auth/index.js +1 -1
- package/build/commands/connection/connector.d.ts.map +1 -1
- package/build/commands/connection/connector.js +1 -1
- package/build/commands/hosting/envVar.d.ts.map +1 -1
- package/build/commands/hosting/envVar.js +15 -6
- package/build/commands/orchestration/span.js +2 -2
- package/build/commands/orchestration/trace.js +2 -2
- package/build/commands/segmentation/change.js +1 -1
- package/build/commands/workspaceManagement/user.d.ts.map +1 -1
- package/build/commands/workspaceManagement/user.js +8 -5
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAqFN"}
|
|
@@ -2,7 +2,7 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerPromptCommands(parent, getApi) {
|
|
3
3
|
const prompt = parent
|
|
4
4
|
.command("prompt")
|
|
5
|
-
.description("Optimize and
|
|
5
|
+
.description("Optimize and render AI prompts");
|
|
6
6
|
prompt
|
|
7
7
|
.command("optimize")
|
|
8
8
|
.description("Optimize a prompt for better AI performance")
|
|
@@ -17,7 +17,7 @@ Example:
|
|
|
17
17
|
});
|
|
18
18
|
prompt
|
|
19
19
|
.command("evaluate")
|
|
20
|
-
.description("
|
|
20
|
+
.description("Render a prompt's template expressions against the variables its actions, resources and capabilities provide — the prompt the agent will actually see. It does not score the prompt")
|
|
21
21
|
.requiredOption("--prompt <text>", "Prompt text to evaluate (string, required)")
|
|
22
22
|
.option("--actions <json>", "Available actions context (JSON array of action objects, default: [])")
|
|
23
23
|
.option("--resources <json>", "Available resources context (JSON array of resource objects, default: [])")
|
|
@@ -20,7 +20,7 @@ export function registerAuthCommands(program, getApi) {
|
|
|
20
20
|
.option("--oauth [true|false]", "Sign in via browser using the OAuth 2.0 Device Authorization Flow", parseBooleanOption)
|
|
21
21
|
.option("--agentid [true|false]", "Sign in as an agent through the AgentID connection; prints an Auth0 URL and waits for it to redirect back to this machine", parseBooleanOption)
|
|
22
22
|
.option("--token <token>", "Existing Cargo API token")
|
|
23
|
-
.option("--workspace-name <name>", "Workspace to use
|
|
23
|
+
.option("--workspace-name <name>", "Workspace to use (skips the workspace prompt): one of that name if it exists; otherwise the Personal workspace a first sign-in creates is renamed to it (when under 10 minutes old and you are its only member); otherwise it is created")
|
|
24
24
|
.option("--workspace-uuid <uuid>", "Workspace UUID to sign in for (skips the workspace prompt)")
|
|
25
25
|
.option("--base-url <url>", `Cargo API base URL (string, default: ${DEFAULT_BASE_URL})`)
|
|
26
26
|
.addHelpText("after", `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/connector.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAcxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/connector.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAcxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgUN"}
|
|
@@ -69,7 +69,7 @@ export function registerConnectorCommands(parent, getApi) {
|
|
|
69
69
|
.command("get-dynamic-schema")
|
|
70
70
|
.description("Get dynamic schema for a connector action")
|
|
71
71
|
.requiredOption("--connector-uuid <uuid>", "Connector UUID (string, required)")
|
|
72
|
-
.requiredOption("--slug <slug>", "
|
|
72
|
+
.requiredOption("--slug <slug>", "Dynamic-schema slug as the integration declares it (e.g. hubspot's getConsentOptions) — not the action slug (string, required)")
|
|
73
73
|
.requiredOption("--params <json>", "Schema parameters (JSON object, required)")
|
|
74
74
|
.action(async (opts) => {
|
|
75
75
|
const api = getApi();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envVar.d.ts","sourceRoot":"","sources":["../../../src/commands/hosting/envVar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AASxC,KAAK,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAehC;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,EACjB,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1C,IAAI,
|
|
1
|
+
{"version":3,"file":"envVar.d.ts","sourceRoot":"","sources":["../../../src/commands/hosting/envVar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AASxC,KAAK,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAehC;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,EACjB,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1C,IAAI,CAkJN"}
|
|
@@ -37,18 +37,27 @@ ${note}`);
|
|
|
37
37
|
: { workerUuid: subjectUuid }));
|
|
38
38
|
outputJson(result);
|
|
39
39
|
});
|
|
40
|
-
env
|
|
40
|
+
const set = env
|
|
41
41
|
.command("set")
|
|
42
42
|
.description(`Create an environment variable on a ${subject}, or update it if the key already exists. Takes effect on the next deployment`)
|
|
43
43
|
.requiredOption(`${flag} <uuid>`, `${capitalize(subject)} UUID`)
|
|
44
44
|
.requiredOption("--key <key>", "Environment variable name")
|
|
45
|
-
.option("--value <value>", "Value. Pass '-' to read it from stdin, or omit it to read the local environment variable of the same name — both keep a secret out of shell history")
|
|
46
|
-
|
|
45
|
+
.option("--value <value>", "Value. Pass '-' to read it from stdin, or omit it to read the local environment variable of the same name — both keep a secret out of shell history");
|
|
46
|
+
// An app's values are compiled into its public bundle, so the API refuses a
|
|
47
|
+
// secret one (secretNotSupportedForApp); only a worker gets the flag.
|
|
48
|
+
if (subject === "worker") {
|
|
49
|
+
set.option("--secret [true|false]", "Encrypt the value at rest and never return it. On an existing key, omit to keep its current setting", parseBooleanOption);
|
|
50
|
+
}
|
|
51
|
+
const examples = subject === "worker"
|
|
52
|
+
? ` $ cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key LOG_LEVEL --value debug
|
|
53
|
+
$ printf %s "$TOKEN" | cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key CARGO_API_TOKEN --value - --secret
|
|
54
|
+
$ CARGO_API_TOKEN=... cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key CARGO_API_TOKEN --secret`
|
|
55
|
+
: ` $ cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key VITE_API_URL --value https://api.example.com
|
|
56
|
+
$ cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key VITE_WORKER_URL --value https://my-worker.example.com`;
|
|
57
|
+
set
|
|
47
58
|
.addHelpText("after", `
|
|
48
59
|
Examples:
|
|
49
|
-
|
|
50
|
-
$ printf %s "$TOKEN" | cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key CARGO_API_TOKEN --value - --secret
|
|
51
|
-
$ CARGO_API_TOKEN=... cargo-ai hosting ${subject} ${name} set ${flag} <uuid> --key CARGO_API_TOKEN --secret
|
|
60
|
+
${examples}
|
|
52
61
|
|
|
53
62
|
${note}`)
|
|
54
63
|
.action(async (opts) => {
|
|
@@ -24,7 +24,7 @@ export function registerSpanCommands(parent, getApi) {
|
|
|
24
24
|
.option("--node-release-uuid <uuid>", "Release UUID on the node")
|
|
25
25
|
.option("--execution-statuses <pending,success,error>", "Filter by execution statuses")
|
|
26
26
|
.option("--parent-run-uuid <uuid>", "Parent run UUID")
|
|
27
|
-
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date)")
|
|
27
|
+
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date, required)")
|
|
28
28
|
.option("--execution-started-before <date>", "Execution started on or before (ISO date)")
|
|
29
29
|
.option("--search <text>", "Case-insensitive partial match on record title, record ID, execution title, or error message")
|
|
30
30
|
.option("--limit <n>", "Limit", "30")
|
|
@@ -89,7 +89,7 @@ export function registerSpanCommands(parent, getApi) {
|
|
|
89
89
|
.option("--node-release-uuid <uuid>", "Release UUID on the node")
|
|
90
90
|
.option("--execution-statuses <pending,success,error>", "Filter by execution statuses")
|
|
91
91
|
.option("--parent-run-uuid <uuid>", "Parent run UUID")
|
|
92
|
-
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date)")
|
|
92
|
+
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date, required)")
|
|
93
93
|
.option("--execution-started-before <date>", "Execution started on or before (ISO date)")
|
|
94
94
|
.action(async (opts) => {
|
|
95
95
|
const api = getApi();
|
|
@@ -8,7 +8,7 @@ export function registerTraceCommands(parent, getApi) {
|
|
|
8
8
|
.description("List traces (aggregated over their spans)")
|
|
9
9
|
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
10
10
|
.option("--statuses <pending,error,degraded,success>", "Trace statuses")
|
|
11
|
-
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date)")
|
|
11
|
+
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date, required)")
|
|
12
12
|
.option("--started-before <date>", "Trace's first span started on or before (ISO date)")
|
|
13
13
|
.option("--limit <n>", "Limit", "30")
|
|
14
14
|
.option("--offset <n>", "Offset", "0")
|
|
@@ -31,7 +31,7 @@ export function registerTraceCommands(parent, getApi) {
|
|
|
31
31
|
.description("Count traces matching the filter")
|
|
32
32
|
.option("--workflow-uuid <uuid>", "Workflow UUID (omit to include all workflows in the workspace)")
|
|
33
33
|
.option("--statuses <pending,error,degraded,success>", "Trace statuses")
|
|
34
|
-
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date)")
|
|
34
|
+
.requiredOption("--started-after <date>", "Trace's first span started after (ISO date, required)")
|
|
35
35
|
.option("--started-before <date>", "Trace's first span started on or before (ISO date)")
|
|
36
36
|
.action(async (opts) => {
|
|
37
37
|
const api = getApi();
|
|
@@ -6,7 +6,7 @@ export function registerChangeCommands(parent, getApi) {
|
|
|
6
6
|
.command("list")
|
|
7
7
|
.description("List changes")
|
|
8
8
|
.option("--segment-uuid <uuid>", "Segment UUID")
|
|
9
|
-
.option("--not-empty [true|false]", "Only
|
|
9
|
+
.option("--not-empty [true|false]", "Only changes where a record was added, updated or removed", parseBooleanOption)
|
|
10
10
|
.option("--has-records <added|updated|removed|unchanged>", "Has records of kind")
|
|
11
11
|
.option("--limit <n>", "Limit")
|
|
12
12
|
.option("--offset <n>", "Offset")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/commands/workspaceManagement/user.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":"user.d.ts","sourceRoot":"","sources":["../../../src/commands/workspaceManagement/user.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,CAiN7E"}
|
|
@@ -76,18 +76,21 @@ Example:
|
|
|
76
76
|
.command("upsert-permission")
|
|
77
77
|
.description("Create or update a user permission")
|
|
78
78
|
.option("--user-uuids <uuids>", "Target user UUIDs (comma-separated strings). At least one of --user-uuids or --emails is required")
|
|
79
|
-
.option("--emails <emails>", "Target user emails (comma-separated strings). At least one of --user-uuids or --emails is required")
|
|
80
|
-
.requiredOption("--action <action>", "Permission action (string, required)")
|
|
79
|
+
.option("--emails <emails>", "Target user emails (comma-separated strings). Invites any address that is not a member yet. At least one of --user-uuids or --emails is required")
|
|
80
|
+
.requiredOption("--action <action>", "Permission action, e.g. orchestration:workflow:read (string, required)")
|
|
81
81
|
.requiredOption("--resource-uuid <uuid>", "Resource UUID to grant/deny access to (string, required)")
|
|
82
|
-
.requiredOption("--effect <allow|deny>", "Permission effect")
|
|
82
|
+
.requiredOption("--effect <allow|deny>", "Permission effect. deny applies to existing members only, so it takes --user-uuids")
|
|
83
83
|
.addHelpText("after", `
|
|
84
84
|
Examples:
|
|
85
|
-
$ cargo-ai workspaceManagement user upsert-permission --emails alice@example.com --action read --resource-uuid 550e8400-... --effect allow
|
|
86
|
-
$ cargo-ai workspaceManagement user upsert-permission --user-uuids uuid1,uuid2 --action write --resource-uuid 550e8400-... --effect deny`)
|
|
85
|
+
$ cargo-ai workspaceManagement user upsert-permission --emails alice@example.com --action orchestration:workflow:read --resource-uuid 550e8400-... --effect allow
|
|
86
|
+
$ cargo-ai workspaceManagement user upsert-permission --user-uuids uuid1,uuid2 --action orchestration:workflow:write --resource-uuid 550e8400-... --effect deny`)
|
|
87
87
|
.action(async (opts) => {
|
|
88
88
|
if (opts.userUuids === undefined && opts.emails === undefined) {
|
|
89
89
|
throw new Error("--user-uuids or --emails is required");
|
|
90
90
|
}
|
|
91
|
+
if (opts.effect === "deny" && opts.emails !== undefined) {
|
|
92
|
+
throw new Error("--effect deny applies to existing members only: pass --user-uuids, not --emails");
|
|
93
|
+
}
|
|
91
94
|
const api = getApi();
|
|
92
95
|
const result = await handleApiCall(() => api.workspaceManagement.user.upsertPermission({
|
|
93
96
|
userUuids: opts.userUuids !== undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.128",
|
|
4
4
|
"mcpName": "io.github.getcargohq/cargo",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@ai-sdk/harness-claude-code": "1.0.148",
|
|
77
77
|
"@cargo-ai/api": "^1.0.101",
|
|
78
78
|
"@cargo-ai/app-sdk": "^1.0.11",
|
|
79
|
-
"@cargo-ai/cdk": "^1.0.
|
|
79
|
+
"@cargo-ai/cdk": "^1.0.121",
|
|
80
80
|
"@cargo-ai/types": "^1.0.103",
|
|
81
81
|
"@cargo-ai/utils": "^1.0.35",
|
|
82
82
|
"@cargo-ai/worker-sdk": "^1.0.21",
|