@cargo-ai/cli 1.0.115 → 1.0.117

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/README.md CHANGED
@@ -69,7 +69,7 @@ cargo-ai login --token <your-api-token>
69
69
 
70
70
  `--email`, `--oauth` and `--agentid` all create the account if it does not exist yet, so there is no separate sign-up command.
71
71
 
72
- `--email`, `--oauth` and `--agentid` save the signed-in session — a short-lived access token plus the refresh token that renews it — to `~/.config/cargo-ai/credentials.json` (file mode `0600`). The CLI renews it in the background as it expires, so you stay signed in and no API token is created per machine. `--token` saves the API token you supplied instead. The same file backs `cargo-cdk`, so one login serves both.
72
+ `--email`, `--oauth` and `--agentid` save the signed-in session — a short-lived access token plus the refresh token that renews it — to `~/.config/cargo-ai/credentials.json` (file mode `0600`). The CLI renews it in the background as it expires, so you stay signed in and no API token is created per machine. `--token` saves the API token you supplied instead. The same file backs `cargo-ai project`, so one login serves both.
73
73
 
74
74
  `cargo-ai logout` revokes the session at the identity provider, so signing out is final. A token you supplied yourself with `--token` is only forgotten locally, since it may be in use elsewhere; pass `--keep-token` to force that behaviour for a session too. If a credentials file cannot be deleted — a read-only config directory, or one owned by another user — `logout` fails and names the file rather than reporting a sign-out the next command would contradict.
75
75
 
@@ -245,7 +245,7 @@ Other release verbs (`list`, `get <uuid>`, `get-deployed`, `get-draft`, `update-
245
245
 
246
246
  ## Agent Skills
247
247
 
248
- [Cargo Skills](https://github.com/getcargohq/cargo-skills) teaches AI coding agents (Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, Hermes Agent, etc.) how to use this CLI — seventeen skills covering lead sourcing, enrichment, email verification, lead scoring, CRM sync, buying-signal monitoring, orchestration, storage, and workspace-as-code.
248
+ [Cargo Skills](https://github.com/getcargohq/cargo-skills) teaches AI coding agents (Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, Hermes Agent, etc.) how to use this CLI — seventeen skills covering lead sourcing, enrichment, email verification, lead scoring, CRM sync, buying-signal monitoring, orchestration, storage, and projects (GTM as Code).
249
249
 
250
250
  **Let your agent install everything.** Paste this into Claude Code, Codex, or Cursor and it handles the CLI, sign-in, and skills for its own platform:
251
251
 
@@ -1,4 +1,4 @@
1
- import { cdkProjectRoot } from "@cargo-ai/cdk/cli";
1
+ import { findProjectDir } from "@cargo-ai/cdk/cli";
2
2
  import { buildReleaseInstructionAppendix } from "./release.js";
3
3
  const LOCAL_WORKING_COPY_INSTRUCTIONS = `You are working in the user's local working copy, not a sandbox. Prefer plan over deploy.
4
4
 
@@ -7,13 +7,13 @@ The user confirms each Bash, Write, Edit and NotebookEdit call, and can only ans
7
7
  When you need a multiple-choice answer, call AskUserQuestion. This session presents the options in the terminal and returns the user's answers as the tool result. Do not wait for a Claude Code question picker.
8
8
 
9
9
  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.`;
10
- const CDK_RAILS_INSTRUCTIONS = `This directory is a Cargo CDK project.
11
- - 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\`.
12
- - Validate your changes before declaring them done: run \`npx tsc --noEmit\` and \`npx cargo-cdk plan\` (plan only reads — it changes nothing).
13
- - Never run \`cargo-cdk deploy\`, \`destroy\`, \`import\`, or \`rollback\` unless the user explicitly asked.`;
10
+ const CDK_RAILS_INSTRUCTIONS = `This directory is a Cargo project.
11
+ - Never edit cargo.state.json, cargo.state.lock, or .cargo-ai/ by hand — they are generated. Repoint this project's deploy state with \`cargo-ai project state bind\`.
12
+ - Validate your changes before declaring them done: run \`npx tsc --noEmit\` and \`cargo-ai project plan\` (plan only reads — it changes nothing).
13
+ - Never run \`cargo-ai project deploy\`, \`destroy\`, \`import\`, or \`rollback\` unless the user explicitly asked.`;
14
14
  const LOCAL_CDK_RAILS_SKILL = {
15
- name: "cdk-rails",
16
- description: "Rails for working on a Cargo CDK project on this machine.",
15
+ name: "project-rails",
16
+ description: "Rails for working on a Cargo project on this machine.",
17
17
  content: CDK_RAILS_INSTRUCTIONS,
18
18
  };
19
19
  /**
@@ -21,7 +21,7 @@ const LOCAL_CDK_RAILS_SKILL = {
21
21
  * Exported for tests.
22
22
  */
23
23
  export function localHarnessInstructions(dir, release) {
24
- const rails = cdkProjectRoot(dir) !== undefined
24
+ const rails = findProjectDir(dir) !== undefined
25
25
  ? `${LOCAL_WORKING_COPY_INSTRUCTIONS}\n\n${CDK_RAILS_INSTRUCTIONS}`
26
26
  : LOCAL_WORKING_COPY_INSTRUCTIONS;
27
27
  if (release === undefined) {
@@ -36,7 +36,7 @@ export function localHarnessInstructions(dir, release) {
36
36
  }
37
37
  /** Exported for tests. */
38
38
  export function localHarnessSkills(dir) {
39
- if (cdkProjectRoot(dir) !== undefined) {
39
+ if (findProjectDir(dir) !== undefined) {
40
40
  return [LOCAL_CDK_RAILS_SKILL];
41
41
  }
42
42
  return [];
@@ -59,7 +59,7 @@ Examples:
59
59
  --first-name Cargo --last-name Outreach --folder-uuid 660e8400-...
60
60
 
61
61
  The mailbox starts pending until the provider issues credentials. Prefer
62
- defineMailbox in a CDK repo for the inbox itself; this command is the
62
+ defineMailbox in a project for the inbox itself; this command is the
63
63
  imperative counterpart.`)
64
64
  .action(async (opts) => {
65
65
  const api = getApi();
@@ -77,7 +77,7 @@ function opening(project) {
77
77
  return [
78
78
  "Work with the user on the Cargo workspace declared in this repo.",
79
79
  "",
80
- "This is a Cargo CDK project: the workspace — connectors, models, plays,",
80
+ "This is a Cargo project: the workspace — connectors, models, plays,",
81
81
  "tools and agents — is defined in files under `infra/` and applied with",
82
82
  "`npm run deploy`. Read what is declared before changing anything; the",
83
83
  "repo, not the workspace, is the source of truth.",
@@ -94,7 +94,7 @@ function firstMove(project) {
94
94
  if (project.kind === "none") {
95
95
  return [
96
96
  "3. Ask what they are trying to do before building anything. If they are",
97
- " not sure, `npx @cargo-ai/cdk cookbook list` is the menu of worked",
97
+ " not sure, `cargo-ai project cookbook list` is the menu of worked",
98
98
  " pipelines, and `cargo-ai orchestration action list <query>` is the",
99
99
  " catalog of individual actions.",
100
100
  ];
@@ -15,7 +15,7 @@
15
15
  // or a docs snippet, and every step leaves a valid machine behind: cancel after
16
16
  // signing in and you are signed in.
17
17
  import { spawnSync } from "node:child_process";
18
- import { askText, availableCodingAgents, cdkProjectRoot, COMPANY_CONTEXT_PATH, hasCompanyContext, installedCookbooks, isInteractive, launchBriefed, requireAnswer, selectOne, skillsInstalledFor, } from "@cargo-ai/cdk/cli";
18
+ import { askText, availableCodingAgents, COMPANY_CONTEXT_PATH, findProjectDir, hasCompanyContext, installedCookbooks, isInteractive, launchBriefed, requireAnswer, selectOne, skillsInstalledFor, } from "@cargo-ai/cdk/cli";
19
19
  import { AGENT_SKILLS_NEXT_STEP } from "../../agentSkills.js";
20
20
  import { isSignedIn } from "../../setupIssues.js";
21
21
  import { parseBooleanOption } from "../../utils/booleanOption.js";
@@ -35,7 +35,7 @@ const EMAIL = "email";
35
35
  * Exported for tests; `go` is the only production caller.
36
36
  */
37
37
  export function resolveProjectContext(cwd) {
38
- const root = cdkProjectRoot(cwd);
38
+ const root = findProjectDir(cwd);
39
39
  if (root === undefined) {
40
40
  return { kind: "none" };
41
41
  }
package/build/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
- import { availableCodingAgents, BRAND, canRunPalette, cdkProjectRoot, creditsLeftOf, declareSources, fetchSubscription, fetchWorkspaceName, formatWorkspaceSuffix, isInteractive, isUnpaidPlan, printSetupIssues, registerCommands as registerCdkCommands, runPalette, SessionExpiredError, } from "@cargo-ai/cdk/cli";
3
+ import { availableCodingAgents, BRAND, canRunPalette, creditsLeftOf, declareSources, fetchSubscription, fetchWorkspaceName, findProjectDir, formatWorkspaceSuffix, isInteractive, isUnpaidPlan, 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";
@@ -51,7 +51,7 @@ program
51
51
  .addHelpText("after", `
52
52
  Agent skills:
53
53
  Teach your coding agent this CLI — skills covering sourcing, enrichment,
54
- orchestration, storage, connectors, workspace-as-code (CDK), diagnostics and alerts.
54
+ orchestration, storage, connectors, projects (GTM as Code), diagnostics and alerts.
55
55
  Any agent (skills.sh): npx skills add getcargohq/cargo-skills
56
56
  Claude Code: /plugin marketplace add getcargohq/cargo-skills
57
57
  Codex: codex plugin marketplace add getcargohq/cargo-skills
@@ -290,11 +290,11 @@ async function openPalette(startPath) {
290
290
  // Read once: a layout describing two different directories could offer to
291
291
  // deploy one and name the other.
292
292
  const cwd = process.cwd();
293
- const root = cdkProjectRoot(cwd);
293
+ const root = findProjectDir(cwd);
294
294
  return buildPaletteLayout({
295
295
  signedIn: isSignedIn(),
296
296
  agents,
297
- cdkProjectRoot: root,
297
+ projectDir: root,
298
298
  cwd,
299
299
  unpaidPlan,
300
300
  });
@@ -2,8 +2,8 @@ import { type CodingAgent, type PaletteLayout, type PinnedRow } from "@cargo-ai/
2
2
  export type PaletteLayoutInput = {
3
3
  signedIn: boolean;
4
4
  agents: readonly CodingAgent[];
5
- /** The CDK repo root the palette is standing in, or undefined when none. */
6
- cdkProjectRoot: string | undefined;
5
+ /** The project (`cargo.json`) folder the palette is in, or undefined when none. */
6
+ projectDir: string | undefined;
7
7
  /**
8
8
  * Where the palette is standing. The project rows are resolved by walking
9
9
  * *up* from here, so this is what says whether they point at the directory
@@ -1 +1 @@
1
- {"version":3,"file":"paletteLayout.d.ts","sourceRoot":"","sources":["../src/paletteLayout.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AA+E3B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,4EAA4E;IAC5E,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAS3E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,EAAE,CA+DjE"}
1
+ {"version":3,"file":"paletteLayout.d.ts","sourceRoot":"","sources":["../src/paletteLayout.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AA+E3B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAS3E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,EAAE,CA+DjE"}
@@ -113,8 +113,8 @@ export function pinnedRows(input) {
113
113
  // for a workspace you have not built yet, and this one is open on screen.
114
114
  // Outside, there is no project to add to or deploy, so offer the tour and the
115
115
  // scaffold instead.
116
- const projectRows = input.cdkProjectRoot !== undefined
117
- ? cdkRows(input.cdkProjectRoot, input.cwd)
116
+ const projectRows = input.projectDir !== undefined
117
+ ? cdkRows(input.projectDir, input.cwd)
118
118
  : [
119
119
  {
120
120
  value: DEMO,
@@ -163,9 +163,8 @@ function cdkRows(root, cwd) {
163
163
  value: ADD,
164
164
  label: "Add",
165
165
  hint: "a connector or a cookbook into this project",
166
- // `--dir` because `project add` refuses a directory with no package.json,
167
- // and the palette is as often open in `infra/` — where the scaffold's
168
- // README sends people — as at the root.
166
+ // `--dir` pins the project the palette found, so the command adds to
167
+ // the one on screen whichever folder of it the palette is open in.
169
168
  argv: ["project", "add", "--dir", root],
170
169
  },
171
170
  {
@@ -17,21 +17,18 @@ export declare function importModuleDefault(file: string, subject: string): Prom
17
17
  /**
18
18
  * The CDK project directory a `--file` module belongs to — the directory `cdk
19
19
  * plan` and `cdk deploy` run in, which is what a harness agent's inferred
20
- * `rootDirectory` is measured from. Walk up to the repo, then back down to the
21
- * project (`infra/` in a scaffolded repo); a file in no recognisable project
22
- * answers its own directory.
23
- *
24
- * Deliberately NOT the nearest cargo.state.json. That file's position is
25
- * incidental — a repo deployed before `cdk deploy` ran from the project has one
26
- * at the repo root — so measuring from it would report no `rootDirectory` and
27
- * clone the repo root, while the deployed agent clones `infra/`.
20
+ * `rootDirectory` is measured from: the resources of the nearest `cargo.json`
21
+ * above the file, else above the cwd (a scratch file run from inside a
22
+ * project). With neither, the command stops, as `cdk plan` does: building from
23
+ * the file's own folder instead would load part of the project and bind the
24
+ * agent to a folder the deployed one does not clone, with nothing said.
28
25
  */
29
26
  export declare function cdkProjectDirFor(file: string): string;
30
27
  /**
31
28
  * Deep-resolve every `@cargo-ai/cdk` handle token in `value` to its real uuid
32
- * using the nearest cargo.state.json (searched from `file`'s directory upward,
33
- * then the cwd). `subject` names the thing under test in error messages (e.g. a
34
- * workflow or agent slug). A value with no tokens (literal-uuid refs, or a pure
29
+ * using the deploy state of the project `file` belongs to (`cdkProjectDirFor`).
30
+ * `subject` names the thing under test in error messages (e.g. a workflow or
31
+ * agent slug). A value with no tokens (literal-uuid refs, or a pure
35
32
  * body) is returned unchanged — no state needed. Fails with an actionable error
36
33
  * when state is missing or a referenced resource isn't deployed yet.
37
34
  */
@@ -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,CA2CT"}
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;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBrD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAkCT"}
@@ -5,10 +5,10 @@
5
5
  // `@cargo-ai/cdk` handle tokens the module references to their real uuids from
6
6
  // this project's deploy state — without deploying the module itself.
7
7
  import { existsSync } from "node:fs";
8
- import { dirname, isAbsolute, join, resolve } from "node:path";
8
+ import { dirname, isAbsolute, resolve } from "node:path";
9
9
  import { pathToFileURL } from "node:url";
10
10
  import { dependenciesOf, readStateOffline, resolveTokens } from "@cargo-ai/cdk";
11
- import { cdkProjectDir, cdkProjectRoot } from "@cargo-ai/cdk/cli";
11
+ import { cdkResourceDir, missingProjectFile } 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:
14
14
  // the ESM namespace's `default` is then the CJS `module.exports`
@@ -53,41 +53,30 @@ export async function importModuleDefault(file, subject) {
53
53
  /**
54
54
  * The CDK project directory a `--file` module belongs to — the directory `cdk
55
55
  * plan` and `cdk deploy` run in, which is what a harness agent's inferred
56
- * `rootDirectory` is measured from. Walk up to the repo, then back down to the
57
- * project (`infra/` in a scaffolded repo); a file in no recognisable project
58
- * answers its own directory.
59
- *
60
- * Deliberately NOT the nearest cargo.state.json. That file's position is
61
- * incidental — a repo deployed before `cdk deploy` ran from the project has one
62
- * at the repo root — so measuring from it would report no `rootDirectory` and
63
- * clone the repo root, while the deployed agent clones `infra/`.
56
+ * `rootDirectory` is measured from: the resources of the nearest `cargo.json`
57
+ * above the file, else above the cwd (a scratch file run from inside a
58
+ * project). With neither, the command stops, as `cdk plan` does: building from
59
+ * the file's own folder instead would load part of the project and bind the
60
+ * agent to a folder the deployed one does not clone, with nothing said.
64
61
  */
65
62
  export function cdkProjectDirFor(file) {
66
63
  const absPath = isAbsolute(file) ? file : resolve(process.cwd(), file);
67
- const fileDir = dirname(absPath);
68
- const repoRoot = cdkProjectRoot(fileDir);
69
- if (repoRoot === undefined)
70
- return fileDir;
71
- const project = cdkProjectDir(repoRoot);
72
- return project === undefined ? repoRoot : project;
73
- }
74
- // Walk up from `startDir` looking for a directory that holds cargo.state.json.
75
- function findStateRoot(startDir) {
76
- let dir = startDir;
77
- for (;;) {
78
- if (existsSync(join(dir, "cargo.state.json")))
79
- return dir;
80
- const parent = dirname(dir);
81
- if (parent === dir)
82
- return undefined;
83
- dir = parent;
64
+ const fileProject = cdkResourceDir(dirname(absPath));
65
+ const project = fileProject !== undefined ? fileProject : cdkResourceDir(process.cwd());
66
+ if (project === undefined) {
67
+ const missing = missingProjectFile(dirname(absPath));
68
+ failWith(missing.message, {
69
+ code: ExitCodes.InvalidUsage,
70
+ extra: { run: missing.run },
71
+ });
84
72
  }
73
+ return project;
85
74
  }
86
75
  /**
87
76
  * Deep-resolve every `@cargo-ai/cdk` handle token in `value` to its real uuid
88
- * using the nearest cargo.state.json (searched from `file`'s directory upward,
89
- * then the cwd). `subject` names the thing under test in error messages (e.g. a
90
- * workflow or agent slug). A value with no tokens (literal-uuid refs, or a pure
77
+ * using the deploy state of the project `file` belongs to (`cdkProjectDirFor`).
78
+ * `subject` names the thing under test in error messages (e.g. a workflow or
79
+ * agent slug). A value with no tokens (literal-uuid refs, or a pure
91
80
  * body) is returned unchanged — no state needed. Fails with an actionable error
92
81
  * when state is missing or a referenced resource isn't deployed yet.
93
82
  */
@@ -95,20 +84,15 @@ export function resolveTokensFromState(value, file, subject) {
95
84
  const deps = dependenciesOf(value);
96
85
  if (deps.size === 0)
97
86
  return value;
98
- const absPath = isAbsolute(file) ? file : resolve(process.cwd(), file);
99
- const stateRoot = findStateRoot(dirname(absPath)) ?? findStateRoot(process.cwd());
100
- if (stateRoot === undefined) {
101
- failWith(`${subject} references ${String(deps.size)} deployed resource(s) ` +
102
- `(${[...deps].join(", ")}), but no cargo.state.json was found near ` +
103
- `${absPath} or the current directory. Deploy the resources first with ` +
104
- "`cargo-ai project deploy`, or reference them by literal uuid " +
105
- "(toolRef / agentRef / connectorRef).", { code: ExitCodes.NotFound });
106
- }
87
+ // The project's own state file, beside its cargo.json, rather than the
88
+ // nearest cargo.state.json: in a repository of several projects that could
89
+ // be another project's.
90
+ const project = cdkProjectDirFor(file);
107
91
  // A project whose state lives in the workspace has a pointer here, not a
108
92
  // resource map, so the cache the last plan or deploy left behind is what
109
93
  // answers this offline. Resolving a handle is a read of what is already
110
94
  // deployed — worth a stale answer, not worth a round trip on every run.
111
- const state = readStateOffline(stateRoot);
95
+ const state = readStateOffline(project);
112
96
  const outputs = new Map();
113
97
  if (state !== undefined) {
114
98
  for (const [id, entry] of Object.entries(state.resources)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "mcpName": "io.github.getcargohq/cargo",
5
5
  "private": false,
6
6
  "license": "UNLICENSED",
@@ -74,12 +74,12 @@
74
74
  "dependencies": {
75
75
  "@ai-sdk/harness": "^1.0.144",
76
76
  "@ai-sdk/harness-claude-code": "^1.0.148",
77
- "@cargo-ai/api": "^1.0.95",
77
+ "@cargo-ai/api": "^1.0.96",
78
78
  "@cargo-ai/app-sdk": "^1.0.11",
79
- "@cargo-ai/cdk": "^1.0.111",
79
+ "@cargo-ai/cdk": "^1.0.113",
80
80
  "@cargo-ai/types": "^1.0.96",
81
81
  "@cargo-ai/utils": "^1.0.32",
82
- "@cargo-ai/worker-sdk": "^1.0.20",
82
+ "@cargo-ai/worker-sdk": "^1.0.21",
83
83
  "@modelcontextprotocol/sdk": "^1.31.0",
84
84
  "ai": "^7.0.133",
85
85
  "ai-sdk-sandbox-local": "^0.1.2",