@mutagent/cli 0.2.117 → 0.2.119

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/dist/bin/cli.js CHANGED
@@ -305,14 +305,16 @@ function loadConfig() {
305
305
  const fileSelection = fileDescribesKey ? credentials?.defaultWorkspace : undefined;
306
306
  const selected = fileSelection ?? rcConfig?.defaultWorkspace;
307
307
  const defaultWorkspace = envWorkspace !== "" ? envWorkspace : selected;
308
- const storedKey = inCloudSandbox() ? undefined : credentials?.apiKey ?? rcConfig?.apiKey;
308
+ const inSandbox = inCloudSandbox();
309
+ const storedKey = inSandbox ? undefined : credentials?.apiKey ?? rcConfig?.apiKey;
310
+ const storedEndpoint = inSandbox ? undefined : credentials?.endpoint ?? rcConfig?.endpoint;
309
311
  const merged = {
310
312
  providers: {},
311
313
  environment: "production",
312
314
  ...rcConfig,
313
315
  ...credentials,
314
316
  apiKey: envKey ?? storedKey,
315
- endpoint: process.env.MUTAGENT_ENDPOINT ?? credentials?.endpoint ?? rcConfig?.endpoint,
317
+ endpoint: process.env.MUTAGENT_ENDPOINT ?? storedEndpoint,
316
318
  defaultWorkspace,
317
319
  workspaceOrigin: envWorkspace !== "" ? "override" : selected ? "selection" : undefined,
318
320
  workspaceName: envWorkspace === "" && fileSelection !== undefined && fileSelection === selected ? credentials?.workspaceName : undefined,
@@ -372,6 +374,8 @@ function clearCredentials() {
372
374
  function hasCredentials() {
373
375
  if (process.env.MUTAGENT_API_KEY)
374
376
  return true;
377
+ if (inCloudSandbox())
378
+ return true;
375
379
  if (!existsSync(CREDENTIALS_FILE))
376
380
  return false;
377
381
  const credentials = parseJsonSafe(readFileSync(CREDENTIALS_FILE, "utf-8"), credentialsSchema);
@@ -40479,4 +40483,4 @@ if (process.env.CLI_VERSION) {
40479
40483
  }
40480
40484
  runCli(process.argv.slice(2), cliVersion);
40481
40485
 
40482
- //# debugId=2264DB47597DFDB064756E2164756E21
40486
+ //# debugId=7B351CAFF933F24B64756E2164756E21
package/dist/index.js CHANGED
@@ -285,14 +285,16 @@ function loadConfig() {
285
285
  const fileSelection = fileDescribesKey ? credentials?.defaultWorkspace : undefined;
286
286
  const selected = fileSelection ?? rcConfig?.defaultWorkspace;
287
287
  const defaultWorkspace = envWorkspace !== "" ? envWorkspace : selected;
288
- const storedKey = inCloudSandbox() ? undefined : credentials?.apiKey ?? rcConfig?.apiKey;
288
+ const inSandbox = inCloudSandbox();
289
+ const storedKey = inSandbox ? undefined : credentials?.apiKey ?? rcConfig?.apiKey;
290
+ const storedEndpoint = inSandbox ? undefined : credentials?.endpoint ?? rcConfig?.endpoint;
289
291
  const merged = {
290
292
  providers: {},
291
293
  environment: "production",
292
294
  ...rcConfig,
293
295
  ...credentials,
294
296
  apiKey: envKey ?? storedKey,
295
- endpoint: process.env.MUTAGENT_ENDPOINT ?? credentials?.endpoint ?? rcConfig?.endpoint,
297
+ endpoint: process.env.MUTAGENT_ENDPOINT ?? storedEndpoint,
296
298
  defaultWorkspace,
297
299
  workspaceOrigin: envWorkspace !== "" ? "override" : selected ? "selection" : undefined,
298
300
  workspaceName: envWorkspace === "" && fileSelection !== undefined && fileSelection === selected ? credentials?.workspaceName : undefined,
@@ -352,6 +354,8 @@ function clearCredentials() {
352
354
  function hasCredentials() {
353
355
  if (process.env.MUTAGENT_API_KEY)
354
356
  return true;
357
+ if (inCloudSandbox())
358
+ return true;
355
359
  if (!existsSync(CREDENTIALS_FILE))
356
360
  return false;
357
361
  const credentials = parseJsonSafe(readFileSync(CREDENTIALS_FILE, "utf-8"), credentialsSchema);
@@ -2084,4 +2088,4 @@ export {
2084
2088
  version
2085
2089
  };
2086
2090
 
2087
- //# debugId=A87B4098338999E864756E2164756E21
2091
+ //# debugId=2497007B7285F9A164756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutagent/cli",
3
- "version": "0.2.117",
3
+ "version": "0.2.119",
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.61",
48
+ "@mutagent/sdk": "0.8.62",
49
49
  "@sinclair/typebox": "^0.34.0",
50
50
  "chalk": "^5.3.0",
51
51
  "commander": "^12.1.0",