@mutagent/cli 0.2.45 → 0.2.47

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.
Files changed (2) hide show
  1. package/dist/bin/cli.js +25 -25
  2. package/package.json +2 -2
package/dist/bin/cli.js CHANGED
@@ -29207,21 +29207,21 @@ async function attachToSandbox(options) {
29207
29207
  }
29208
29208
  }
29209
29209
  function reportOutcome(id, result, sink, onDisconnect) {
29210
- const box = result.sandbox?.sandboxId ?? id;
29210
+ const sandboxId = result.sandbox?.sandboxId ?? id;
29211
29211
  if (result.end === "unfollowable") {
29212
- sink.notice(`Stream for sandbox ${box} ended after the replay — the backend could not follow it from here.`);
29213
- sink.notice(`Try again with: ${reattachHint(box, result.lastSeq)}`);
29212
+ sink.notice(`Stream for sandbox ${sandboxId} ended after the replay — the backend could not follow it from here.`);
29213
+ sink.notice(`Try again with: ${reattachHint(sandboxId, result.lastSeq)}`);
29214
29214
  return;
29215
29215
  }
29216
29216
  if (result.end === "detached") {
29217
29217
  if (onDisconnect === "released") {
29218
- sink.notice(box === "" ? "Stopped. The turn was cancelled and the sandbox released — nothing is left running." : `Stopped. The turn was cancelled and sandbox ${box} released — nothing is left running.`);
29218
+ sink.notice(sandboxId === "" ? "Stopped. The turn was cancelled and the sandbox released — nothing is left running." : `Stopped. The turn was cancelled and sandbox ${sandboxId} released — nothing is left running.`);
29219
29219
  sink.notice("Run the turn again to retry, or add --keep next time to hold the sandbox open.");
29220
29220
  return;
29221
29221
  }
29222
- sink.notice(`Detached. Sandbox ${box} is still running — nothing was destroyed.`);
29223
- sink.notice(`Re-attach with: ${reattachHint(box, result.lastSeq)}`);
29224
- sink.notice(`Destroy it with: mutagent sandbox delete ${box} --force`);
29222
+ sink.notice(`Detached. Sandbox ${sandboxId} is still running — nothing was destroyed.`);
29223
+ sink.notice(`Re-attach with: ${reattachHint(sandboxId, result.lastSeq)}`);
29224
+ sink.notice(`Destroy it with: mutagent sandbox delete ${sandboxId} --force`);
29225
29225
  return;
29226
29226
  }
29227
29227
  if (result.gaps > 0) {
@@ -29235,12 +29235,12 @@ function reportOutcome(id, result, sink, onDisconnect) {
29235
29235
  }
29236
29236
  if (result.exitCode === null) {
29237
29237
  const why = result.result?.error;
29238
- sink.notice(why === undefined ? `Sandbox ${box} exited (no exit code reported).` : `The turn did not complete: ${why}`);
29238
+ sink.notice(why === undefined ? `Sandbox ${sandboxId} exited (no exit code reported).` : `The turn did not complete: ${why}`);
29239
29239
  return;
29240
29240
  }
29241
- sink.notice(result.session === undefined ? `Sandbox ${box} exited with code ${String(result.exitCode)}.` : `Session ${result.session.sessionId} exited with code ${String(result.exitCode)}.`);
29241
+ sink.notice(result.session === undefined ? `Sandbox ${sandboxId} exited with code ${String(result.exitCode)}.` : `Session ${result.session.sessionId} exited with code ${String(result.exitCode)}.`);
29242
29242
  if (result.session !== undefined && onDisconnect === "survives") {
29243
- sink.notice(`Sandbox ${box} is still up — destroy it with: mutagent sandbox delete ${box} --force`);
29243
+ sink.notice(`Sandbox ${sandboxId} is still up — destroy it with: mutagent sandbox delete ${sandboxId} --force`);
29244
29244
  }
29245
29245
  if (result.exitCode !== 0) {
29246
29246
  process.exitCode = result.exitCode;
@@ -30126,7 +30126,7 @@ async function preflightDefinition(definition, provider) {
30126
30126
  }
30127
30127
 
30128
30128
  // src/commands/helix/doctor.ts
30129
- var IN_BOX_HELIX_BINARY = "/usr/local/bin/helix";
30129
+ var IN_SANDBOX_HELIX_BINARY = "/usr/local/bin/helix";
30130
30130
  function isRefreshRuntime(arg) {
30131
30131
  return arg === "--refresh-runtime" || arg.startsWith("--refresh-runtime=");
30132
30132
  }
@@ -30166,13 +30166,13 @@ AI Agent Directive:
30166
30166
  if (stray.length > 0)
30167
30167
  throw strayArgumentsRefusal("doctor", stray);
30168
30168
  const argv = [
30169
- IN_BOX_HELIX_BINARY,
30169
+ IN_SANDBOX_HELIX_BINARY,
30170
30170
  "doctor",
30171
30171
  ...options.strict === true ? ["--strict"] : [],
30172
30172
  ...options.welcome === true ? ["--welcome"] : []
30173
30173
  ];
30174
- const result = await runInBox(argv, options);
30175
- reportBoxRun(result, output, isJson, { command: argv });
30174
+ const result = await runInSandbox(argv, options);
30175
+ reportSandboxRun(result, output, isJson, { command: argv });
30176
30176
  } catch (error) {
30177
30177
  handleError(error, isJson);
30178
30178
  }
@@ -30200,9 +30200,9 @@ AI Agent Directive:
30200
30200
  throw refreshRuntimeRefusal();
30201
30201
  if (stray.length > 0)
30202
30202
  throw strayArgumentsRefusal("smoke", stray);
30203
- const argv = [IN_BOX_HELIX_BINARY, "smoke"];
30204
- const result = await runInBox(argv, options);
30205
- reportBoxRun(result, output, isJson, { command: argv });
30203
+ const argv = [IN_SANDBOX_HELIX_BINARY, "smoke"];
30204
+ const result = await runInSandbox(argv, options);
30205
+ reportSandboxRun(result, output, isJson, { command: argv });
30206
30206
  } catch (error) {
30207
30207
  handleError(error, isJson);
30208
30208
  }
@@ -30262,7 +30262,7 @@ async function pinnedHelixVersion() {
30262
30262
  const match = /helix\s+(\d+\.\d+\.\d+[^\s,)]*)/i.exec(preset?.description ?? "");
30263
30263
  return match?.[1];
30264
30264
  }
30265
- async function runInBox(argv, options) {
30265
+ async function runInSandbox(argv, options) {
30266
30266
  checkSandboxId(options.sandbox);
30267
30267
  const id = options.sandbox?.trim();
30268
30268
  if (id !== undefined && id !== "") {
@@ -30276,7 +30276,7 @@ async function runInBox(argv, options) {
30276
30276
  ...options.preset === undefined ? {} : { preset: options.preset }
30277
30277
  });
30278
30278
  }
30279
- function reportBoxRun(result, output, isJson, context) {
30279
+ function reportSandboxRun(result, output, isJson, context) {
30280
30280
  if (isJson) {
30281
30281
  output.output({ success: true, ...context, result });
30282
30282
  } else {
@@ -34674,7 +34674,7 @@ var SDK_SCHEMA_ERRORS3 = new Set(["SDKValidationError", "ResponseValidationError
34674
34674
  function notSignedIn(inBox) {
34675
34675
  return inBox ? new MutagentError("AUTH_REQUIRED", "Only `mutagent reports push` works with a sandbox token; reading reports needs a platform API key.", "Run: mutagent login (or set MUTAGENT_API_KEY)") : new MutagentError("AUTH_REQUIRED", "Not signed in.", "Run: mutagent login");
34676
34676
  }
34677
- function boxEndpoint() {
34677
+ function sandboxEndpoint() {
34678
34678
  const explicit = process.env.MUTAGENT_ENDPOINT?.trim();
34679
34679
  if (explicit !== undefined && explicit !== "")
34680
34680
  return endpointOf(explicit);
@@ -34764,7 +34764,7 @@ async function connectReports(opts) {
34764
34764
  throw notSignedIn(true);
34765
34765
  registerSecret(token);
34766
34766
  secrets.add(token);
34767
- const endpoint = boxEndpoint();
34767
+ const endpoint = sandboxEndpoint();
34768
34768
  const sdk = new Mutagent5({
34769
34769
  security: { bearerAuth: token },
34770
34770
  serverURL: endpoint,
@@ -37916,7 +37916,7 @@ function helixCloudSurface(cliVersion) {
37916
37916
  };
37917
37917
  }
37918
37918
 
37919
- // src/commands/sandbox/box-argv.ts
37919
+ // src/commands/sandbox/sandbox-argv.ts
37920
37920
  function optionSpec(command) {
37921
37921
  const value = new Set;
37922
37922
  const boolean = new Set;
@@ -37927,7 +37927,7 @@ function optionSpec(command) {
37927
37927
  }
37928
37928
  return { value, boolean };
37929
37929
  }
37930
- function protectBoxArgv(rawArgs, exec) {
37930
+ function protectSandboxArgv(rawArgs, exec) {
37931
37931
  const at = commandPathIndexes(rawArgs, 2);
37932
37932
  const group = at[0];
37933
37933
  const verb = at[1];
@@ -38077,7 +38077,7 @@ ${!hasCredentials() ? `
38077
38077
  ${EXIT_CODES_LINE}
38078
38078
  `);
38079
38079
  const execCommand = program.commands.find((c) => c.name() === "sandbox")?.commands.find((c) => c.name() === "exec");
38080
- const argvForCommander = execCommand === undefined ? rawArgs : protectBoxArgv(rawArgs, optionSpec(execCommand));
38080
+ const argvForCommander = execCommand === undefined ? rawArgs : protectSandboxArgv(rawArgs, optionSpec(execCommand));
38081
38081
  const json = rawArgs.includes("--json");
38082
38082
  if (!helixHelpJson && !answerBareGroup(program, rawArgs, json)) {
38083
38083
  await program.parseAsync(argvForCommander, { from: "user" }).catch((error) => {
@@ -38100,4 +38100,4 @@ if (process.env.CLI_VERSION) {
38100
38100
  }
38101
38101
  runCli(process.argv.slice(2), cliVersion);
38102
38102
 
38103
- //# debugId=3ED0C6257235B6F564756E2164756E21
38103
+ //# debugId=7181C3F925DEA1DA64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutagent/cli",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "description": "Bun-native CLI for the MutagenT AI platform - auth, provider config, and lifecycle-tool installer for AI-native workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "^8.7.2",
48
- "@mutagent/sdk": "0.8.24",
48
+ "@mutagent/sdk": "0.8.25",
49
49
  "@sinclair/typebox": "^0.34.0",
50
50
  "chalk": "^5.3.0",
51
51
  "commander": "^12.1.0",