@cargo-ai/cli 1.0.88 → 1.0.89

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
@@ -207,7 +207,7 @@ Other release verbs (`list`, `get <uuid>`, `get-deployed`, `get-draft`, `update-
207
207
  **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:
208
208
 
209
209
  ```
210
- Install Cargo by following every step in https://api.getcargo.io/agent-install.txt
210
+ Install Cargo by following https://api.getcargo.io/INSTALL.md
211
211
  ```
212
212
 
213
213
  **Or install manually.** As a plugin (Claude Code, Codex, Cursor — bundles the skills plus approval and session hooks):
@@ -25,7 +25,7 @@ export async function* streamMessageTextDeltas(input) {
25
25
  }
26
26
  const body = {
27
27
  chatUuid: input.chatUuid,
28
- chatTrigger: { type: "app" },
28
+ chatTrigger: { type: "cli" },
29
29
  uuid: input.messageUuid,
30
30
  parts: input.parts,
31
31
  };
@@ -121,7 +121,7 @@ async function ensureChat(input) {
121
121
  }
122
122
  await handleApiCall(() => input.api.ai.chat.create({
123
123
  uuid: input.chatUuid,
124
- trigger: { type: "app" },
124
+ trigger: { type: "cli" },
125
125
  agentUuid: input.agentUuid,
126
126
  }), { spinner: false });
127
127
  }
@@ -62,7 +62,7 @@ export async function resolveWorkspace(opts) {
62
62
  }
63
63
  const promptInput = openPromptInput();
64
64
  if (promptInput === undefined) {
65
- failWith("Multiple workspaces available and no interactive terminal; pass --workspace-uuid <uuid> (or set CARGO_WORKSPACE_UUID when using install.sh) to select one.", { code: ExitCodes.InvalidUsage });
65
+ failWith("Multiple workspaces available and no interactive terminal; pass --workspace-uuid <uuid> (or set CARGO_WORKSPACE_UUID) to select one.", { code: ExitCodes.InvalidUsage });
66
66
  }
67
67
  let selectedWorkspace;
68
68
  try {
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerEnvVarCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=envVar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envVar.d.ts","sourceRoot":"","sources":["../../../src/commands/workspaceManagement/envVar.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,CAmFN"}
@@ -0,0 +1,71 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerEnvVarCommands(parent, getApi) {
3
+ const envVar = parent
4
+ .command("envVar")
5
+ .description("Workspace environment variables, injected into every worker, app and agent");
6
+ envVar
7
+ .command("list")
8
+ .description("List all workspace environment variables")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.workspaceManagement.envVar.all());
12
+ outputJson(result);
13
+ });
14
+ envVar
15
+ .command("create")
16
+ .description("Create a workspace environment variable")
17
+ .requiredOption("--key <key>", "Environment variable name")
18
+ .option("--value <value>", "Value. Omit to read it from the environment variable of the same name")
19
+ .option("--secret", "Encrypt the value at rest and never return it")
20
+ .option("--description <description>", "What this variable is for")
21
+ .action(async (opts) => {
22
+ const api = getApi();
23
+ const value = resolveValue(opts.key, opts.value);
24
+ const result = await handleApiCall(() => api.workspaceManagement.envVar.create({
25
+ key: opts.key,
26
+ value,
27
+ isSecret: opts.secret === true,
28
+ description: opts.description === undefined ? null : opts.description,
29
+ }));
30
+ outputJson(result);
31
+ });
32
+ envVar
33
+ .command("update <uuid>")
34
+ .description("Update a workspace environment variable")
35
+ .option("--value <value>", "New value. Omit to keep the stored one")
36
+ .option("--secret", "Encrypt the value at rest and never return it")
37
+ .option("--no-secret", "Store the value in plain text")
38
+ .option("--description <description>", "What this variable is for")
39
+ .action(async (uuid, opts) => {
40
+ const api = getApi();
41
+ const result = await handleApiCall(() => api.workspaceManagement.envVar.update({
42
+ uuid,
43
+ value: opts.value,
44
+ isSecret: opts.secret,
45
+ description: opts.description,
46
+ }));
47
+ outputJson(result);
48
+ });
49
+ envVar
50
+ .command("remove <uuid>")
51
+ .description("Remove a workspace environment variable")
52
+ .action(async (uuid) => {
53
+ const api = getApi();
54
+ await handleApiCall(() => api.workspaceManagement.envVar.remove(uuid));
55
+ outputJson({ ok: true });
56
+ });
57
+ }
58
+ /**
59
+ * Falling back to the local environment keeps a secret out of argv (and out of
60
+ * the shell history), which is the whole point of `envVar create --secret`.
61
+ */
62
+ const resolveValue = (key, value) => {
63
+ if (value !== undefined) {
64
+ return value;
65
+ }
66
+ const fromEnvironment = process.env[key];
67
+ if (fromEnvironment === undefined) {
68
+ throw new Error(`no value given — pass --value, or export ${key} before running this command.`);
69
+ }
70
+ return fromEnvironment;
71
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/workspaceManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAUxC,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAeN"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/workspaceManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAWxC,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgBN"}
@@ -1,3 +1,4 @@
1
+ import { registerEnvVarCommands } from "./envVar.js";
1
2
  import { registerFileCommands } from "./file.js";
2
3
  import { registerFolderCommands } from "./folder.js";
3
4
  import { registerReportCommands } from "./report.js";
@@ -9,10 +10,11 @@ import { registerWorkspacesCommands } from "./workspaces.js";
9
10
  export function registerWorkspaceManagementCommands(parent, getApi) {
10
11
  const workspaceManagement = parent
11
12
  .command("workspaceManagement")
12
- .description("Workspaces, users, tokens, roles, folders, reports, sessions");
13
+ .description("Workspaces, users, tokens, environment variables, roles, folders, reports, sessions");
13
14
  registerWorkspacesCommands(workspaceManagement, getApi);
14
15
  registerUserCommands(workspaceManagement, getApi);
15
16
  registerTokenCommands(workspaceManagement, getApi);
17
+ registerEnvVarCommands(workspaceManagement, getApi);
16
18
  registerRoleCommands(workspaceManagement, getApi);
17
19
  registerFolderCommands(workspaceManagement, getApi);
18
20
  registerFileCommands(workspaceManagement, getApi);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.88",
3
+ "version": "1.0.89",
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.76",
70
+ "@cargo-ai/api": "^1.0.77",
71
71
  "@cargo-ai/app-sdk": "^1.0.10",
72
- "@cargo-ai/cdk": "^1.0.71",
73
- "@cargo-ai/types": "^1.0.73",
72
+ "@cargo-ai/cdk": "^1.0.72",
73
+ "@cargo-ai/types": "^1.0.74",
74
74
  "@cargo-ai/utils": "^1.0.28",
75
75
  "@cargo-ai/worker-sdk": "^1.0.17",
76
76
  "@modelcontextprotocol/sdk": "1.29.0",