stratagem-x7 0.3.50 → 0.3.52
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/cli.mjs +29 -13
- 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") &&
|
|
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();
|
|
@@ -288636,11 +288648,15 @@ async function performLogout({
|
|
|
288636
288648
|
await flushTelemetry2();
|
|
288637
288649
|
await removeApiKey();
|
|
288638
288650
|
const secureStorage = getSecureStorage();
|
|
288639
|
-
secureStorage.
|
|
288651
|
+
const current = secureStorage.read();
|
|
288652
|
+
if (current) {
|
|
288653
|
+
const { claudeAiOauth: _claudeAi, trustedDeviceToken: _trusted, ...preserved } = current;
|
|
288654
|
+
secureStorage.update(preserved);
|
|
288655
|
+
}
|
|
288640
288656
|
await clearAuthRelatedCaches();
|
|
288641
|
-
saveGlobalConfig((
|
|
288657
|
+
saveGlobalConfig((current2) => {
|
|
288642
288658
|
const updated = {
|
|
288643
|
-
...
|
|
288659
|
+
...current2
|
|
288644
288660
|
};
|
|
288645
288661
|
if (clearOnboarding) {
|
|
288646
288662
|
updated.hasCompletedOnboarding = false;
|
|
@@ -350503,7 +350519,7 @@ function getAnthropicEnvMetadata() {
|
|
|
350503
350519
|
function getBuildAgeMinutes() {
|
|
350504
350520
|
if (false)
|
|
350505
350521
|
;
|
|
350506
|
-
const buildTime = new Date("2026-05-07T14:
|
|
350522
|
+
const buildTime = new Date("2026-05-07T14:57:33.391Z").getTime();
|
|
350507
350523
|
if (isNaN(buildTime))
|
|
350508
350524
|
return;
|
|
350509
350525
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -418315,7 +418331,7 @@ function buildPrimarySection() {
|
|
|
418315
418331
|
}, undefined, false, undefined, this);
|
|
418316
418332
|
return [{
|
|
418317
418333
|
label: "Version",
|
|
418318
|
-
value: "0.3.
|
|
418334
|
+
value: "0.3.52"
|
|
418319
418335
|
}, {
|
|
418320
418336
|
label: "Session name",
|
|
418321
418337
|
value: nameValue
|
|
@@ -458009,7 +458025,7 @@ function getStartupLines(termWidth) {
|
|
|
458009
458025
|
const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
|
|
458010
458026
|
out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
|
|
458011
458027
|
out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
|
|
458012
|
-
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.
|
|
458028
|
+
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.52"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
|
|
458013
458029
|
out.push("");
|
|
458014
458030
|
return out;
|
|
458015
458031
|
}
|
|
@@ -486682,7 +486698,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
486682
486698
|
var call60 = async () => {
|
|
486683
486699
|
return {
|
|
486684
486700
|
type: "text",
|
|
486685
|
-
value: `${"99.0.0"} (built ${"2026-05-07T14:
|
|
486701
|
+
value: `${"99.0.0"} (built ${"2026-05-07T14:57:33.391Z"})`
|
|
486686
486702
|
};
|
|
486687
486703
|
}, version2, version_default;
|
|
486688
486704
|
var init_version = __esm(() => {
|
|
@@ -555415,7 +555431,7 @@ function WelcomeV2() {
|
|
|
555415
555431
|
dimColor: true,
|
|
555416
555432
|
children: [
|
|
555417
555433
|
"v",
|
|
555418
|
-
"0.3.
|
|
555434
|
+
"0.3.52",
|
|
555419
555435
|
" "
|
|
555420
555436
|
]
|
|
555421
555437
|
}, undefined, true, undefined, this)
|
|
@@ -574873,7 +574889,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
574873
574889
|
pendingHookMessages
|
|
574874
574890
|
}, renderAndRun);
|
|
574875
574891
|
}
|
|
574876
|
-
}).version("0.3.
|
|
574892
|
+
}).version("0.3.52 (STRATAGEM X7)", "-v, --version", "Output the version number");
|
|
574877
574893
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
574878
574894
|
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
574895
|
if (canUserConfigureAdvisor()) {
|
|
@@ -575334,7 +575350,7 @@ if (false) {}
|
|
|
575334
575350
|
async function main2() {
|
|
575335
575351
|
const args = process.argv.slice(2);
|
|
575336
575352
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
575337
|
-
console.log(`${"0.3.
|
|
575353
|
+
console.log(`${"0.3.52"} (STRATAGEM X7)`);
|
|
575338
575354
|
return;
|
|
575339
575355
|
}
|
|
575340
575356
|
if (args.includes("--provider")) {
|
|
@@ -575456,4 +575472,4 @@ async function main2() {
|
|
|
575456
575472
|
}
|
|
575457
575473
|
main2();
|
|
575458
575474
|
|
|
575459
|
-
//# debugId=
|
|
575475
|
+
//# debugId=E219BE9970A3174F64756E2164756E21
|