@cargo-ai/cli 1.0.70 → 1.0.71

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":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AACA,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,CA+rB5E"}
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,CAuqB5E"}
@@ -1,4 +1,3 @@
1
- import { declarePrompt } from "@cargo-ai/cdk/cli";
2
1
  import { parseBooleanOption } from "../../utils/booleanOption.js";
3
2
  import { loadCompiledWorkflow, resolveCompiledWorkflowFromState, } from "../../utils/loadCompiledWorkflow.js";
4
3
  import { ExitCodes, failWith, handleApiCall, info, outputJson, parseJson, pollRunUntilFinished, } from "../runHandler.js";
@@ -6,7 +5,7 @@ export function registerRunCommands(parent, getApi) {
6
5
  const run = parent
7
6
  .command("run")
8
7
  .description("Manage workflow runs (list, get, create, cancel, count, download)");
9
- const listRuns = run
8
+ run
10
9
  .command("list")
11
10
  .description("List runs")
12
11
  .option("--workflow-uuid <uuid>", "Workflow UUID (string). Omit to list the runs of every play and tool, which the API allows only alongside --created-after inside a 30-day window")
@@ -143,7 +142,7 @@ Examples:
143
142
  await handleApiCall(() => api.orchestration.run.cancel(payload));
144
143
  outputJson({ ok: true });
145
144
  });
146
- const countRuns = run
145
+ run
147
146
  .command("count")
148
147
  .description("Count runs matching the given filters")
149
148
  .option("--workflow-uuid <uuid>", "Workflow UUID (string). Omit to count the runs of every play and tool, which the API allows only alongside --created-after inside a 30-day window")
@@ -190,29 +189,6 @@ Examples:
190
189
  }));
191
190
  outputJson(result);
192
191
  });
193
- // Both of these take the option or go without it, and going without it is
194
- // only legal alongside --created-after. Commander cannot express that, so the
195
- // palette would offer a command that fails on the server's own message. The
196
- // choice is declared here instead, beside the option it chooses between.
197
- for (const command of [listRuns, countRuns]) {
198
- declarePrompt(command, {
199
- message: "which runs?",
200
- choices: [
201
- {
202
- label: "One workflow",
203
- hint: "a single play or tool",
204
- flag: "--workflow-uuid",
205
- value: { name: "workflow-uuid", hint: "550e8400-e29b-41d4-a716-…" },
206
- },
207
- {
208
- label: "Every play and tool",
209
- hint: "needs a start date; the API allows at most a 30-day window",
210
- flag: "--created-after",
211
- value: { name: "created-after", hint: "2026-08-01T00:00:00Z" },
212
- },
213
- ],
214
- });
215
- }
216
192
  run
217
193
  .command("download")
218
194
  .description("Download run results as JSON")
package/build/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
- import { BRAND, canRunPalette, fetchCreditsLeft, fetchWorkspaceName, formatWorkspaceSuffix, printSetupIssues, registerCommands as registerCdkCommands, runPalette, SessionExpiredError, } from "@cargo-ai/cdk/cli";
3
+ import { BRAND, canRunPalette, declareSources, fetchCreditsLeft, fetchWorkspaceName, formatWorkspaceSuffix, printSetupIssues, registerCommands as registerCdkCommands, runPalette, SessionExpiredError, } from "@cargo-ai/cdk/cli";
4
4
  import { Command } from "commander";
5
5
  import { AGENT_SKILLS_HINT } from "./agentSkills.js";
6
6
  import { createApi } from "./api.js";
@@ -112,6 +112,57 @@ const getApi = () => {
112
112
  }
113
113
  return createApi({ baseUrl, getAccessToken, workspaceUuid });
114
114
  };
115
+ // Where the palette finds answers for an option that wants an id. Keyed by the
116
+ // flag, because `--model-uuid` asks the same question in all 28 places it
117
+ // appears; these six entries cover the 84 uuid options this CLI declares.
118
+ //
119
+ // Nobody knows a uuid. Every one of these replaces a field you would otherwise
120
+ // have to leave the palette to fill.
121
+ declareSources({
122
+ // A workflow row carries a uuid, two timestamps and a toolUuid — nothing to
123
+ // choose between. The plays and tools that own those workflows carry a name
124
+ // and the workflowUuid, so they are what the menu is built from.
125
+ "--workflow-uuid": [
126
+ {
127
+ argv: ["orchestration", "play", "list"],
128
+ value: "workflowUuid",
129
+ label: "name",
130
+ kind: "play",
131
+ },
132
+ {
133
+ argv: ["orchestration", "tool", "list"],
134
+ value: "workflowUuid",
135
+ label: "name",
136
+ kind: "tool",
137
+ },
138
+ ],
139
+ "--model-uuid": [
140
+ {
141
+ argv: ["storage", "model", "list"],
142
+ value: "uuid",
143
+ label: "name",
144
+ hint: "slug",
145
+ },
146
+ ],
147
+ "--agent-uuid": [
148
+ { argv: ["ai", "agent", "list"], value: "uuid", label: "name" },
149
+ ],
150
+ "--connector-uuid": [
151
+ {
152
+ argv: ["connection", "connector", "list"],
153
+ value: "uuid",
154
+ label: "name",
155
+ hint: "integrationSlug",
156
+ },
157
+ ],
158
+ // Datasets have no name of their own; the slug is what identifies them.
159
+ "--dataset-uuid": [
160
+ { argv: ["storage", "dataset", "list"], value: "uuid", label: "slug" },
161
+ ],
162
+ "--segment-uuid": [
163
+ { argv: ["segmentation", "segment", "list"], value: "uuid", label: "name" },
164
+ ],
165
+ });
115
166
  registerAuthCommands(program, getApi);
116
167
  registerVersionCommand(program, version);
117
168
  registerDoctorCommand(program, version);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://getcargo.ai",
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@cargo-ai/api": "^1.0.69",
68
68
  "@cargo-ai/app-sdk": "^1.0.9",
69
- "@cargo-ai/cdk": "^1.0.56",
69
+ "@cargo-ai/cdk": "^1.0.57",
70
70
  "@cargo-ai/types": "^1.0.66",
71
71
  "@cargo-ai/worker-sdk": "^1.0.17",
72
72
  "@modelcontextprotocol/sdk": "1.29.0",