stratagem-x7 0.3.50 → 0.3.51

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/cli.mjs +22 -10
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -186279,6 +186279,16 @@ var init_errorUtils = __esm(() => {
186279
186279
  });
186280
186280
 
186281
186281
  // src/services/api/errors.ts
186282
+ function isAnthropicAuthFlow() {
186283
+ try {
186284
+ const profile = getActiveProviderProfile();
186285
+ if (profile?.provider === "openai")
186286
+ return false;
186287
+ if (profile?.provider === "anthropic")
186288
+ return true;
186289
+ } catch {}
186290
+ return getAPIProvider() === "firstParty";
186291
+ }
186282
186292
  function startsWithApiErrorPrefix(text) {
186283
186293
  return text.startsWith(API_ERROR_MESSAGE_PREFIX) || text.startsWith(`Please run /login · ${API_ERROR_MESSAGE_PREFIX}`);
186284
186294
  }
@@ -186661,7 +186671,7 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
186661
186671
  });
186662
186672
  }
186663
186673
  }
186664
- if (error42 instanceof Error && error42.message.toLowerCase().includes("x-api-key") && getAPIProvider() === "firstParty") {
186674
+ if (error42 instanceof Error && error42.message.toLowerCase().includes("x-api-key") && isAnthropicAuthFlow()) {
186665
186675
  if (isCCRMode()) {
186666
186676
  return createAssistantAPIErrorMessage({
186667
186677
  error: "authentication_failed",
@@ -186694,9 +186704,10 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
186694
186704
  content: CCR_AUTH_ERROR_MESSAGE
186695
186705
  });
186696
186706
  }
186707
+ const isAnthropic = isAnthropicAuthFlow();
186697
186708
  return createAssistantAPIErrorMessage({
186698
186709
  error: "authentication_failed",
186699
- content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Please run /login · ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
186710
+ content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : isAnthropic ? `Please run /login · ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Provider authentication failed · run /provider to update credentials · ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
186700
186711
  });
186701
186712
  }
186702
186713
  if (isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) && error42 instanceof Error && error42.message.toLowerCase().includes("model id")) {
@@ -186873,6 +186884,7 @@ var init_errors4 = __esm(() => {
186873
186884
  init_model();
186874
186885
  init_modelStrings();
186875
186886
  init_providers();
186887
+ init_providerProfiles();
186876
186888
  init_state();
186877
186889
  init_apiLimits();
186878
186890
  init_envUtils();
@@ -350503,7 +350515,7 @@ function getAnthropicEnvMetadata() {
350503
350515
  function getBuildAgeMinutes() {
350504
350516
  if (false)
350505
350517
  ;
350506
- const buildTime = new Date("2026-05-07T14:27:14.120Z").getTime();
350518
+ const buildTime = new Date("2026-05-07T14:38:28.643Z").getTime();
350507
350519
  if (isNaN(buildTime))
350508
350520
  return;
350509
350521
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -418315,7 +418327,7 @@ function buildPrimarySection() {
418315
418327
  }, undefined, false, undefined, this);
418316
418328
  return [{
418317
418329
  label: "Version",
418318
- value: "0.3.50"
418330
+ value: "0.3.51"
418319
418331
  }, {
418320
418332
  label: "Session name",
418321
418333
  value: nameValue
@@ -458009,7 +458021,7 @@ function getStartupLines(termWidth) {
458009
458021
  const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
458010
458022
  out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
458011
458023
  out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
458012
- out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.50"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
458024
+ out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.51"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
458013
458025
  out.push("");
458014
458026
  return out;
458015
458027
  }
@@ -486682,7 +486694,7 @@ var init_bridge_kick = __esm(() => {
486682
486694
  var call60 = async () => {
486683
486695
  return {
486684
486696
  type: "text",
486685
- value: `${"99.0.0"} (built ${"2026-05-07T14:27:14.120Z"})`
486697
+ value: `${"99.0.0"} (built ${"2026-05-07T14:38:28.643Z"})`
486686
486698
  };
486687
486699
  }, version2, version_default;
486688
486700
  var init_version = __esm(() => {
@@ -555415,7 +555427,7 @@ function WelcomeV2() {
555415
555427
  dimColor: true,
555416
555428
  children: [
555417
555429
  "v",
555418
- "0.3.50",
555430
+ "0.3.51",
555419
555431
  " "
555420
555432
  ]
555421
555433
  }, undefined, true, undefined, this)
@@ -574873,7 +574885,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
574873
574885
  pendingHookMessages
574874
574886
  }, renderAndRun);
574875
574887
  }
574876
- }).version("0.3.50 (STRATAGEM X7)", "-v, --version", "Output the version number");
574888
+ }).version("0.3.51 (STRATAGEM X7)", "-v, --version", "Output the version number");
574877
574889
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
574878
574890
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
574879
574891
  if (canUserConfigureAdvisor()) {
@@ -575334,7 +575346,7 @@ if (false) {}
575334
575346
  async function main2() {
575335
575347
  const args = process.argv.slice(2);
575336
575348
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
575337
- console.log(`${"0.3.50"} (STRATAGEM X7)`);
575349
+ console.log(`${"0.3.51"} (STRATAGEM X7)`);
575338
575350
  return;
575339
575351
  }
575340
575352
  if (args.includes("--provider")) {
@@ -575456,4 +575468,4 @@ async function main2() {
575456
575468
  }
575457
575469
  main2();
575458
575470
 
575459
- //# debugId=A5EFE932D24D026164756E2164756E21
575471
+ //# debugId=A9016E52CED531B064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratagem-x7",
3
- "version": "0.3.50",
3
+ "version": "0.3.51",
4
4
  "description": "STRATAGEM X7 is a cyberpunk coding-agent CLI for cloud and local model providers",
5
5
  "type": "module",
6
6
  "bin": {