stratagem-x7 0.3.12 → 0.3.14
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 +53 -21
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -121780,7 +121780,11 @@ function parseKey(keypress) {
|
|
|
121780
121780
|
processedAsSpecialSequence = true;
|
|
121781
121781
|
}
|
|
121782
121782
|
if (!processedAsSpecialSequence && keypress.name && nonAlphanumericKeys.includes(keypress.name)) {
|
|
121783
|
-
|
|
121783
|
+
if (/^f\d+$/.test(keypress.name)) {
|
|
121784
|
+
input = keypress.name;
|
|
121785
|
+
} else {
|
|
121786
|
+
input = "";
|
|
121787
|
+
}
|
|
121784
121788
|
}
|
|
121785
121789
|
if (input.length === 1 && typeof input[0] === "string" && input[0] >= "A" && input[0] <= "Z") {
|
|
121786
121790
|
key.shift = true;
|
|
@@ -250552,6 +250556,7 @@ var init_defaultBindings = __esm(() => {
|
|
|
250552
250556
|
"ctrl+g": "chat:externalEditor",
|
|
250553
250557
|
"ctrl+s": "chat:stash",
|
|
250554
250558
|
[IMAGE_PASTE_KEY]: "chat:imagePaste",
|
|
250559
|
+
"ctrl+p": "chat:shellMode",
|
|
250555
250560
|
...{ "shift+up": "chat:messageActions" },
|
|
250556
250561
|
...{}
|
|
250557
250562
|
}
|
|
@@ -251555,6 +251560,8 @@ function getKeyName(input, key) {
|
|
|
251555
251560
|
return "home";
|
|
251556
251561
|
if (key.end)
|
|
251557
251562
|
return "end";
|
|
251563
|
+
if (key.fn && /^f\d+$/.test(input))
|
|
251564
|
+
return input;
|
|
251558
251565
|
if (input.length === 1)
|
|
251559
251566
|
return input.toLowerCase();
|
|
251560
251567
|
return null;
|
|
@@ -300766,9 +300773,6 @@ function AssistantMessageBlock(t0) {
|
|
|
300766
300773
|
return t1;
|
|
300767
300774
|
}
|
|
300768
300775
|
case "redacted_thinking": {
|
|
300769
|
-
if (!isTranscriptMode && !verbose) {
|
|
300770
|
-
return null;
|
|
300771
|
-
}
|
|
300772
300776
|
let t1;
|
|
300773
300777
|
if ($2[29] !== addMargin) {
|
|
300774
300778
|
t1 = /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(AssistantRedactedThinkingMessage, {
|
|
@@ -300782,9 +300786,6 @@ function AssistantMessageBlock(t0) {
|
|
|
300782
300786
|
return t1;
|
|
300783
300787
|
}
|
|
300784
300788
|
case "thinking": {
|
|
300785
|
-
if (!isTranscriptMode && !verbose) {
|
|
300786
|
-
return null;
|
|
300787
|
-
}
|
|
300788
300789
|
const isLastThinking = !lastThinkingBlockId || thinkingBlockId === lastThinkingBlockId;
|
|
300789
300790
|
const t1 = isTranscriptMode && !isLastThinking;
|
|
300790
300791
|
let t2;
|
|
@@ -382885,7 +382886,7 @@ function getAnthropicEnvMetadata() {
|
|
|
382885
382886
|
function getBuildAgeMinutes() {
|
|
382886
382887
|
if (false)
|
|
382887
382888
|
;
|
|
382888
|
-
const buildTime = new Date("2026-04-
|
|
382889
|
+
const buildTime = new Date("2026-04-25T07:06:51.803Z").getTime();
|
|
382889
382890
|
if (isNaN(buildTime))
|
|
382890
382891
|
return;
|
|
382891
382892
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -410062,7 +410063,7 @@ function buildPrimarySection() {
|
|
|
410062
410063
|
}, undefined, false, undefined, this);
|
|
410063
410064
|
return [{
|
|
410064
410065
|
label: "Version",
|
|
410065
|
-
value: "0.3.
|
|
410066
|
+
value: "0.3.14"
|
|
410066
410067
|
}, {
|
|
410067
410068
|
label: "Session name",
|
|
410068
410069
|
value: nameValue
|
|
@@ -449688,7 +449689,7 @@ function getStartupLines(termWidth) {
|
|
|
449688
449689
|
const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
|
|
449689
449690
|
out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
|
|
449690
449691
|
out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
|
|
449691
|
-
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.
|
|
449692
|
+
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.14"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
|
|
449692
449693
|
out.push("");
|
|
449693
449694
|
return out;
|
|
449694
449695
|
}
|
|
@@ -478237,7 +478238,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
478237
478238
|
var call60 = async () => {
|
|
478238
478239
|
return {
|
|
478239
478240
|
type: "text",
|
|
478240
|
-
value: `${"99.0.0"} (built ${"2026-04-
|
|
478241
|
+
value: `${"99.0.0"} (built ${"2026-04-25T07:06:51.803Z"})`
|
|
478241
478242
|
};
|
|
478242
478243
|
}, version2, version_default;
|
|
478243
478244
|
var init_version = __esm(() => {
|
|
@@ -530720,14 +530721,24 @@ function ModeIndicator({
|
|
|
530720
530721
|
}, [voiceEnabled, voiceHintUnderCap]);
|
|
530721
530722
|
const isKillAgentsConfirmShowing = useAppState((s_7) => s_7.notifications.current?.key === "kill-agents-confirm");
|
|
530722
530723
|
const hasTeams = isAgentSwarmsEnabled() && !isInProcessEnabled() && teamContext !== undefined && count2(Object.values(teamContext.teammates), (t_0) => t_0.name !== "team-lead") > 0;
|
|
530724
|
+
const currentMode = toolPermissionContext?.mode;
|
|
530725
|
+
const autonomyMode = useAppState((s_8) => s_8.settings.autonomyMode ?? "off");
|
|
530723
530726
|
if (mode === "bash") {
|
|
530724
530727
|
return /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530725
530728
|
color: "bashBorder",
|
|
530726
|
-
children:
|
|
530727
|
-
|
|
530729
|
+
children: [
|
|
530730
|
+
/* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530731
|
+
bold: true,
|
|
530732
|
+
children: "SHELL MODE"
|
|
530733
|
+
}, undefined, false, undefined, this),
|
|
530734
|
+
" ",
|
|
530735
|
+
/* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530736
|
+
dimColor: true,
|
|
530737
|
+
children: "[Ctrl+P to exit]"
|
|
530738
|
+
}, undefined, false, undefined, this)
|
|
530739
|
+
]
|
|
530740
|
+
}, undefined, true, undefined, this);
|
|
530728
530741
|
}
|
|
530729
|
-
const currentMode = toolPermissionContext?.mode;
|
|
530730
|
-
const autonomyMode = useAppState((s_8) => s_8.settings.autonomyMode ?? "off");
|
|
530731
530742
|
const hasActiveMode = !isDefaultMode(currentMode);
|
|
530732
530743
|
const viewedTask = viewingAgentTaskId ? tasks2[viewingAgentTaskId] : undefined;
|
|
530733
530744
|
const isViewingTeammate = viewSelectionMode === "viewing-agent" && viewedTask?.type === "in_process_teammate";
|
|
@@ -531313,7 +531324,7 @@ function PromptInputModeIndicator(t0) {
|
|
|
531313
531324
|
}, undefined, false, undefined, this) : mode === "bash" ? /* @__PURE__ */ jsx_dev_runtime431.jsxDEV(ThemedText, {
|
|
531314
531325
|
color: "bashBorder",
|
|
531315
531326
|
dimColor: isLoading,
|
|
531316
|
-
children: "
|
|
531327
|
+
children: "$ "
|
|
531317
531328
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime431.jsxDEV(PromptChar, {
|
|
531318
531329
|
isLoading,
|
|
531319
531330
|
themeColor: isAgentSwarmsEnabled() ? teammateColor : undefined
|
|
@@ -531881,6 +531892,7 @@ function PromptInput({
|
|
|
531881
531892
|
onInputChange,
|
|
531882
531893
|
mode,
|
|
531883
531894
|
onModeChange,
|
|
531895
|
+
onToggleShellMode,
|
|
531884
531896
|
stashedPrompt,
|
|
531885
531897
|
setStashedPrompt,
|
|
531886
531898
|
submitCount,
|
|
@@ -533135,6 +533147,21 @@ function PromptInput({
|
|
|
533135
533147
|
context: "Footer",
|
|
533136
533148
|
isActive: !!footerItemSelected && !isModalOverlayActive
|
|
533137
533149
|
});
|
|
533150
|
+
useKeybinding("chat:shellMode", () => {
|
|
533151
|
+
const nextMode = mode === "bash" ? "prompt" : "bash";
|
|
533152
|
+
onModeChange(nextMode);
|
|
533153
|
+
if (onToggleShellMode)
|
|
533154
|
+
onToggleShellMode();
|
|
533155
|
+
addNotification({
|
|
533156
|
+
key: "shell-mode-toggle",
|
|
533157
|
+
text: nextMode === "bash" ? "⚡ Shell Mode — commands go directly to OS" : "\uD83E\uDD16 Agent Mode — input goes to LLM",
|
|
533158
|
+
priority: "immediate",
|
|
533159
|
+
timeoutMs: 2000
|
|
533160
|
+
});
|
|
533161
|
+
}, {
|
|
533162
|
+
context: "Chat",
|
|
533163
|
+
isActive: !isModalOverlayActive
|
|
533164
|
+
});
|
|
533138
533165
|
use_input_default((char, key) => {
|
|
533139
533166
|
if (showTeamsDialog || showQuickOpen || showGlobalSearch || showHistoryPicker) {
|
|
533140
533167
|
return;
|
|
@@ -549493,6 +549520,9 @@ function REPL({
|
|
|
549493
549520
|
return () => clearTimeout(timer);
|
|
549494
549521
|
}, [inputValue]);
|
|
549495
549522
|
const [inputMode, setInputMode] = import_react316.useState("prompt");
|
|
549523
|
+
const [shellMode, setShellMode] = import_react316.useState(false);
|
|
549524
|
+
const shellModeRef = import_react316.useRef(shellMode);
|
|
549525
|
+
shellModeRef.current = shellMode;
|
|
549496
549526
|
const [stashedPrompt, setStashedPrompt] = import_react316.useState();
|
|
549497
549527
|
const handleRemoteInit = import_react316.useCallback((remoteSlashCommands) => {
|
|
549498
549528
|
const remoteCommandSet = new Set(remoteSlashCommands);
|
|
@@ -550742,7 +550772,8 @@ Error: sandbox required but unavailable: ${reason}
|
|
|
550742
550772
|
setPastedContents({});
|
|
550743
550773
|
}
|
|
550744
550774
|
if (submitsNow) {
|
|
550745
|
-
|
|
550775
|
+
if (!shellModeRef.current)
|
|
550776
|
+
setInputMode("prompt");
|
|
550746
550777
|
setIDESelection(undefined);
|
|
550747
550778
|
setSubmitCount((_) => _ + 1);
|
|
550748
550779
|
helpers.clearBuffer();
|
|
@@ -552118,6 +552149,7 @@ Note: ctrl + z now suspends STRATAGEM X7, ctrl + _ undoes input.
|
|
|
552118
552149
|
setIsSearchingHistory,
|
|
552119
552150
|
helpOpen: isHelpOpen,
|
|
552120
552151
|
setHelpOpen: setIsHelpOpen,
|
|
552152
|
+
onToggleShellMode: () => setShellMode((prev) => !prev),
|
|
552121
552153
|
insertTextRef: undefined,
|
|
552122
552154
|
voiceInterimRange: voice.interimRange
|
|
552123
552155
|
}, undefined, false, undefined, this),
|
|
@@ -553618,7 +553650,7 @@ function WelcomeV2() {
|
|
|
553618
553650
|
dimColor: true,
|
|
553619
553651
|
children: [
|
|
553620
553652
|
"v",
|
|
553621
|
-
"0.3.
|
|
553653
|
+
"0.3.14",
|
|
553622
553654
|
" "
|
|
553623
553655
|
]
|
|
553624
553656
|
}, undefined, true, undefined, this)
|
|
@@ -573635,7 +573667,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
573635
573667
|
pendingHookMessages
|
|
573636
573668
|
}, renderAndRun);
|
|
573637
573669
|
}
|
|
573638
|
-
}).version("0.3.
|
|
573670
|
+
}).version("0.3.14 (STRATAGEM X7)", "-v, --version", "Output the version number");
|
|
573639
573671
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
573640
573672
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
573641
573673
|
if (canUserConfigureAdvisor()) {
|
|
@@ -574163,7 +574195,7 @@ if (false) {}
|
|
|
574163
574195
|
async function main2() {
|
|
574164
574196
|
const args = process.argv.slice(2);
|
|
574165
574197
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
574166
|
-
console.log(`${"0.3.
|
|
574198
|
+
console.log(`${"0.3.14"} (STRATAGEM X7)`);
|
|
574167
574199
|
return;
|
|
574168
574200
|
}
|
|
574169
574201
|
if (args.includes("--provider")) {
|
|
@@ -574285,4 +574317,4 @@ async function main2() {
|
|
|
574285
574317
|
}
|
|
574286
574318
|
main2();
|
|
574287
574319
|
|
|
574288
|
-
//# debugId=
|
|
574320
|
+
//# debugId=24872291663D4E0C64756E2164756E21
|