@cargo-ai/cli 1.0.89 → 1.0.91

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.
@@ -86,8 +86,8 @@ The user confirms each Bash, Write, Edit and NotebookEdit call, and can only ans
86
86
 
87
87
  Prefer minimal, focused diffs; match the existing code style; run the project's own checks when they exist. End each task with a short summary of what changed and how it was validated.`;
88
88
  const CDK_RAILS_INSTRUCTIONS = `This directory is a Cargo CDK project.
89
- - Never edit cargo.state.json, cargo.state.lock, or .cargo-ai/ by hand — they are generated.
90
- - Validate your changes before declaring them done: run \`npx tsc --noEmit\` and \`npx cargo-cdk plan\` (plan is offline and safe).
89
+ - Never edit cargo.state.json, cargo.state.lock, or .cargo-ai/ by hand — they are generated. Repoint this project's deploy state with \`cargo-cdk state bind\`.
90
+ - Validate your changes before declaring them done: run \`npx tsc --noEmit\` and \`npx cargo-cdk plan\` (plan only reads — it changes nothing).
91
91
  - Never run \`cargo-cdk deploy\`, \`destroy\`, \`import\`, or \`rollback\` unless the user explicitly asked.`;
92
92
  const LOCAL_CDK_RAILS_SKILL = {
93
93
  name: "cdk-rails",
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4bN"}
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA+cN"}
@@ -168,6 +168,13 @@ export function registerRecordCommands(parent, getApi) {
168
168
  .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","status":"pending"}]}]})')
169
169
  .option("--created-after <date>", "Created after date")
170
170
  .option("--created-before <date>", "Created before date")
171
+ .option("--limit <n>", "Max records to include in the export (integer)")
172
+ .option("--offset <n>", "Number of records to skip before exporting (integer)")
173
+ .addHelpText("after", `
174
+ Examples:
175
+ $ cargo-ai orchestration record download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output
176
+ $ cargo-ai orchestration record download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --format json
177
+ $ cargo-ai orchestration record download-outputs --workflow-uuid 550e8400-... --output-node-slug my-output --limit 1000 --offset 2000`)
171
178
  .action(async (opts) => {
172
179
  const api = getApi();
173
180
  const result = await handleApiCall(() => api.orchestration.record.downloadOutputs({
@@ -193,6 +200,8 @@ export function registerRecordCommands(parent, getApi) {
193
200
  : undefined,
194
201
  createdAfter: opts.createdAfter,
195
202
  createdBefore: opts.createdBefore,
203
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
204
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
196
205
  }));
197
206
  outputJson(result);
198
207
  });
@@ -171,7 +171,7 @@ export function formatStartNextSteps(facts) {
171
171
  "Next steps:",
172
172
  " cargo-ai whoami # confirm the workspace",
173
173
  " cargo-ai orchestration action list enrich # find something to run",
174
- " cargo-ai cdk init # set the workspace up as code",
174
+ " cargo-ai cdk init # define this workspace in a repo",
175
175
  " cargo-ai # the command palette",
176
176
  ];
177
177
  if (facts.skillsInstalled === false) {
@@ -1,7 +1,7 @@
1
1
  // `cargo-ai start` — and what a bare `cargo-ai` opens when nobody is signed in
2
2
  // yet.
3
3
  //
4
- // Open a coding agent, run the guided demo, scaffold a CDK project, explore in
4
+ // Open a coding agent, run the guided demo, set up a project, explore in
5
5
  // the palette, or nothing. Each is a value of `--continue`, so the whole flow
6
6
  // runs headless. `onboard` survives as an alias for anything already written
7
7
  // down.
@@ -56,7 +56,7 @@ export function registerStartCommand(program, getApi, deps) {
56
56
  .option("--oauth [true|false]", "Sign in via browser", parseBooleanOption)
57
57
  .option("--workspace-name <name>", "Workspace to use, created if it does not exist")
58
58
  .option("--workspace-uuid <uuid>", "Workspace to use")
59
- .option("--continue <where>", 'Where to continue: a coding agent ("claude", "cursor", "codex", "gemini"), "code" for a CDK project, "cli" for the palette, "demo" for the guided tour, or "none"')
59
+ .option("--continue <where>", 'Where to continue: a coding agent ("claude", "cursor", "codex", "gemini"), "code" to set up a project, "cli" for the palette, "demo" for the guided tour, or "none"')
60
60
  .option("--directory <path>", "Directory to scaffold into, for `--continue code`. Required when there is nobody to ask; supplying it also skips the project wizard, the way `cdk init <directory>` does")
61
61
  .option("--icp <description>", "Who you sell to, used to brief the guided demo")
62
62
  .option("--base-url <url>", "Cargo API base URL")
@@ -405,8 +405,8 @@ async function askDestination() {
405
405
  },
406
406
  {
407
407
  value: "code",
408
- label: "Set it up as code",
409
- hint: "scaffold a CDK project with cargo-ai cdk init",
408
+ label: "Set up a Cargo project",
409
+ hint: "a repo that defines this workspace in code",
410
410
  },
411
411
  {
412
412
  value: "demo",
package/build/index.js CHANGED
@@ -250,7 +250,7 @@ registerMailboxManagementCommands(program, getApi);
250
250
  registerMcpCommand(program, getApi);
251
251
  registerCdkCommands(program
252
252
  .command("cdk")
253
- .description("Cargo CDK — define resources in code and deploy them (plan/deploy)"), getApi);
253
+ .description("Define this workspace in a repo and deploy it (init/plan/deploy)"), getApi);
254
254
  // Bare `cargo-ai` in a terminal opens the palette instead of printing the help
255
255
  // wall: twenty command groups is a list to navigate, not one to read. Anything
256
256
  // non-interactive (a pipe, CI, an agent) keeps the help it has always had.
@@ -123,8 +123,8 @@ export function pinnedRows(input) {
123
123
  },
124
124
  {
125
125
  value: CODE,
126
- label: "Set up as code",
127
- hint: "scaffold a CDK project",
126
+ label: "Set up a Cargo project",
127
+ hint: "a repo that defines this workspace in code",
128
128
  argv: [ENTRANCE, "--continue", "code"],
129
129
  },
130
130
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"cdkState.d.ts","sourceRoot":"","sources":["../../src/utils/cdkState.ts"],"names":[],"mappings":"AAoBA,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CASxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,CAyBtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAaD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAuCT"}
1
+ {"version":3,"file":"cdkState.d.ts","sourceRoot":"","sources":["../../src/utils/cdkState.ts"],"names":[],"mappings":"AAoBA,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CASxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,CAyBtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAaD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CA2CT"}
@@ -3,11 +3,11 @@
3
3
  // test-run it against ALREADY-DEPLOYED resources. Both need the same two things:
4
4
  // peel the tsx interop layer off a module's default export, and resolve any
5
5
  // `@cargo-ai/cdk` handle tokens the module references to their real uuids from
6
- // the committed cargo.state.json — without deploying the module itself.
6
+ // this project's deploy state — without deploying the module itself.
7
7
  import { existsSync } from "node:fs";
8
8
  import { dirname, isAbsolute, join, resolve } from "node:path";
9
9
  import { pathToFileURL } from "node:url";
10
- import { dependenciesOf, readState, resolveTokens } from "@cargo-ai/cdk";
10
+ import { dependenciesOf, readStateOffline, resolveTokens } from "@cargo-ai/cdk";
11
11
  import { cdkProjectDir, cdkProjectRoot } from "@cargo-ai/cdk/cli";
12
12
  import { ExitCodes, failWith } from "../commands/runHandler.js";
13
13
  // Peel the extra interop layer tsx adds when a TS source is transpiled to CJS:
@@ -104,7 +104,11 @@ export function resolveTokensFromState(value, file, subject) {
104
104
  "`cargo-ai cdk deploy`, or reference them by literal uuid " +
105
105
  "(toolRef / agentRef / connectorRef).", { code: ExitCodes.NotFound });
106
106
  }
107
- const state = readState(stateRoot);
107
+ // A project whose state lives in the workspace has a pointer here, not a
108
+ // resource map, so the cache the last plan or deploy left behind is what
109
+ // answers this offline. Resolving a handle is a read of what is already
110
+ // deployed — worth a stale answer, not worth a round trip on every run.
111
+ const state = readStateOffline(stateRoot);
108
112
  const outputs = new Map();
109
113
  if (state !== undefined) {
110
114
  for (const [id, entry] of Object.entries(state.resources)) {
@@ -114,7 +118,7 @@ export function resolveTokensFromState(value, file, subject) {
114
118
  const missing = [...deps].filter((id) => !outputs.has(id));
115
119
  if (missing.length > 0) {
116
120
  failWith(`${String(missing.length)} resource(s) referenced by ${subject} ` +
117
- `aren't in cargo.state.json yet: ${missing.join(", ")}. A test run ` +
121
+ `aren't in this project's deploy state yet: ${missing.join(", ")}. A test run ` +
118
122
  "resolves existing (already-deployed) resources from state — it won't " +
119
123
  "create new ones. Deploy them first with `cargo-ai cdk deploy`, or " +
120
124
  "reference them by literal uuid (toolRef / agentRef / connectorRef).", { code: ExitCodes.NotFound });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://getcargo.ai",
@@ -67,10 +67,10 @@
67
67
  "dependencies": {
68
68
  "@ai-sdk/harness": "^1.0.95",
69
69
  "@ai-sdk/harness-claude-code": "^1.0.99",
70
- "@cargo-ai/api": "^1.0.77",
70
+ "@cargo-ai/api": "^1.0.78",
71
71
  "@cargo-ai/app-sdk": "^1.0.10",
72
- "@cargo-ai/cdk": "^1.0.72",
73
- "@cargo-ai/types": "^1.0.74",
72
+ "@cargo-ai/cdk": "^1.0.75",
73
+ "@cargo-ai/types": "^1.0.75",
74
74
  "@cargo-ai/utils": "^1.0.28",
75
75
  "@cargo-ai/worker-sdk": "^1.0.17",
76
76
  "@modelcontextprotocol/sdk": "1.29.0",