stratagem-x7 0.3.11 → 0.3.13

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 +56 -56
  2. 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
- input = "";
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;
@@ -217085,15 +217089,9 @@ var init_vscodeSdkMcp = __esm(() => {
217085
217089
  });
217086
217090
 
217087
217091
  // src/utils/agentSwarmsEnabled.ts
217088
- function isAgentTeamsFlagSet() {
217089
- return process.argv.includes("--agent-teams");
217090
- }
217091
217092
  function isAgentSwarmsEnabled() {
217092
- return isEnvTruthy(process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS) || isAgentTeamsFlagSet();
217093
+ return true;
217093
217094
  }
217094
- var init_agentSwarmsEnabled = __esm(() => {
217095
- init_envUtils();
217096
- });
217097
217095
 
217098
217096
  // src/utils/teammateContext.ts
217099
217097
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
@@ -227544,7 +227542,6 @@ Format: 2-12 words, match the user's style. Or nothing.
227544
227542
  Reply with ONLY the suggestion, no quotes or explanation.`, SUGGESTION_PROMPTS;
227545
227543
  var init_promptSuggestion = __esm(() => {
227546
227544
  init_state();
227547
- init_agentSwarmsEnabled();
227548
227545
  init_envUtils();
227549
227546
  init_errors();
227550
227547
  init_forkedAgent();
@@ -250559,6 +250556,7 @@ var init_defaultBindings = __esm(() => {
250559
250556
  "ctrl+g": "chat:externalEditor",
250560
250557
  "ctrl+s": "chat:stash",
250561
250558
  [IMAGE_PASTE_KEY]: "chat:imagePaste",
250559
+ "ctrl+p": "chat:shellMode",
250562
250560
  ...{ "shift+up": "chat:messageActions" },
250563
250561
  ...{}
250564
250562
  }
@@ -251562,6 +251560,8 @@ function getKeyName(input, key) {
251562
251560
  return "home";
251563
251561
  if (key.end)
251564
251562
  return "end";
251563
+ if (key.fn && /^f\d+$/.test(input))
251564
+ return input;
251565
251565
  if (input.length === 1)
251566
251566
  return input.toLowerCase();
251567
251567
  return null;
@@ -269006,7 +269006,6 @@ var init_agentToolUtils = __esm(() => {
269006
269006
  init_Tool();
269007
269007
  init_LocalAgentTask();
269008
269008
  init_ids();
269009
- init_agentSwarmsEnabled();
269010
269009
  init_debug();
269011
269010
  init_envUtils();
269012
269011
  init_errors();
@@ -283538,7 +283537,6 @@ var init_TaskListV2 = __esm(() => {
283538
283537
  init_ink2();
283539
283538
  init_AppState();
283540
283539
  init_agentColorManager();
283541
- init_agentSwarmsEnabled();
283542
283540
  init_collapseReadSearch();
283543
283541
  init_format2();
283544
283542
  init_tasks();
@@ -286777,7 +286775,6 @@ function consumeInvokingRequestId() {
286777
286775
  }
286778
286776
  var agentContextStorage;
286779
286777
  var init_agentContext = __esm(() => {
286780
- init_agentSwarmsEnabled();
286781
286778
  agentContextStorage = new AsyncLocalStorage4;
286782
286779
  });
286783
286780
 
@@ -296026,7 +296023,6 @@ function UserTextMessage(t0) {
296026
296023
  var import_react_compiler_runtime83, jsx_dev_runtime98;
296027
296024
  var init_UserTextMessage = __esm(() => {
296028
296025
  init_xml();
296029
- init_agentSwarmsEnabled();
296030
296026
  init_messages3();
296031
296027
  init_InterruptedByUser();
296032
296028
  init_MessageResponse();
@@ -297257,7 +297253,6 @@ var init_AttachmentMessage = __esm(() => {
297257
297253
  init_slowOperations();
297258
297254
  init_stringUtils();
297259
297255
  init_envUtils();
297260
- init_agentSwarmsEnabled();
297261
297256
  init_PlanApprovalMessage();
297262
297257
  init_figures2();
297263
297258
  init_UserTeammateMessage();
@@ -364975,7 +364970,6 @@ var init_ExitPlanModeV2Tool = __esm(() => {
364975
364970
  init_v4();
364976
364971
  init_state();
364977
364972
  init_Tool();
364978
- init_agentSwarmsEnabled();
364979
364973
  init_debug();
364980
364974
  init_inProcessTeammateHelpers();
364981
364975
  init_log3();
@@ -367683,9 +367677,7 @@ ${teammateTips}- Check TaskList first to avoid creating duplicate tasks
367683
367677
  `;
367684
367678
  }
367685
367679
  var DESCRIPTION14 = "Create a new task in the task list";
367686
- var init_prompt17 = __esm(() => {
367687
- init_agentSwarmsEnabled();
367688
- });
367680
+ var init_prompt17 = () => {};
367689
367681
 
367690
367682
  // src/tools/TaskCreateTool/TaskCreateTool.ts
367691
367683
  var inputSchema30, outputSchema25, TaskCreateTool;
@@ -368002,7 +367994,6 @@ var init_TaskUpdateTool = __esm(() => {
368002
367994
  init_v4();
368003
367995
  init_growthbook();
368004
367996
  init_Tool();
368005
- init_agentSwarmsEnabled();
368006
367997
  init_hooks5();
368007
367998
  init_tasks();
368008
367999
  init_teammate();
@@ -368298,9 +368289,7 @@ Use TaskGet with a specific task ID to view full details including description a
368298
368289
  ${teammateWorkflow}`;
368299
368290
  }
368300
368291
  var DESCRIPTION17 = "List all tasks in the task list";
368301
- var init_prompt18 = __esm(() => {
368302
- init_agentSwarmsEnabled();
368303
- });
368292
+ var init_prompt18 = () => {};
368304
368293
 
368305
368294
  // src/tools/TaskListTool/TaskListTool.ts
368306
368295
  var inputSchema33, outputSchema28, TaskListTool;
@@ -369017,7 +369006,6 @@ var init_TeamCreateTool = __esm(() => {
369017
369006
  init_v4();
369018
369007
  init_state();
369019
369008
  init_Tool();
369020
- init_agentSwarmsEnabled();
369021
369009
  init_cwd2();
369022
369010
  init_model();
369023
369011
  init_slowOperations();
@@ -369195,7 +369183,6 @@ var inputSchema39, TeamDeleteTool;
369195
369183
  var init_TeamDeleteTool = __esm(() => {
369196
369184
  init_v4();
369197
369185
  init_Tool();
369198
- init_agentSwarmsEnabled();
369199
369186
  init_slowOperations();
369200
369187
  init_teamHelpers();
369201
369188
  init_teammateLayoutManager();
@@ -370286,7 +370273,6 @@ var init_SendMessageTool = __esm(() => {
370286
370273
  init_LocalAgentTask();
370287
370274
  init_LocalMainSessionTask();
370288
370275
  init_ids();
370289
- init_agentSwarmsEnabled();
370290
370276
  init_debug();
370291
370277
  init_errors();
370292
370278
  init_format2();
@@ -370721,7 +370707,6 @@ var init_tools2 = __esm(() => {
370721
370707
  init_embeddedTools();
370722
370708
  init_envUtils();
370723
370709
  init_shellToolUtils();
370724
- init_agentSwarmsEnabled();
370725
370710
  init_constants5();
370726
370711
  cronTools = [
370727
370712
  (init_CronCreateTool(), __toCommonJS(exports_CronCreateTool)).CronCreateTool,
@@ -372138,7 +372123,6 @@ var init_AgentTool = __esm(() => {
372138
372123
  init_tools2();
372139
372124
  init_ids();
372140
372125
  init_agentContext();
372141
- init_agentSwarmsEnabled();
372142
372126
  init_cwd2();
372143
372127
  init_debug();
372144
372128
  init_envUtils();
@@ -382908,7 +382892,7 @@ function getAnthropicEnvMetadata() {
382908
382892
  function getBuildAgeMinutes() {
382909
382893
  if (false)
382910
382894
  ;
382911
- const buildTime = new Date("2026-04-25T04:18:15.797Z").getTime();
382895
+ const buildTime = new Date("2026-04-25T05:38:00.638Z").getTime();
382912
382896
  if (isNaN(buildTime))
382913
382897
  return;
382914
382898
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -390406,7 +390390,6 @@ var init_attachments2 = __esm(() => {
390406
390390
  init_common();
390407
390391
  init_pdf();
390408
390392
  init_apiLimits();
390409
- init_agentSwarmsEnabled();
390410
390393
  init_findRelevantMemories();
390411
390394
  init_paths();
390412
390395
  init_agentMemory();
@@ -398758,7 +398741,6 @@ var init_messages3 = __esm(() => {
398758
398741
  init_growthbook();
398759
398742
  init_errors6();
398760
398743
  init_advisor();
398761
- init_agentSwarmsEnabled();
398762
398744
  init_attachments2();
398763
398745
  init_shellQuote();
398764
398746
  init_format2();
@@ -410087,7 +410069,7 @@ function buildPrimarySection() {
410087
410069
  }, undefined, false, undefined, this);
410088
410070
  return [{
410089
410071
  label: "Version",
410090
- value: "0.3.11"
410072
+ value: "0.3.13"
410091
410073
  }, {
410092
410074
  label: "Session name",
410093
410075
  value: nameValue
@@ -415110,7 +415092,6 @@ var init_Config = __esm(() => {
415110
415092
  init_outputStyles();
415111
415093
  init_envUtils();
415112
415094
  init_growthbook();
415113
- init_agentSwarmsEnabled();
415114
415095
  init_teammateModeSnapshot();
415115
415096
  init_teammateModel();
415116
415097
  init_useSearchInput();
@@ -449714,7 +449695,7 @@ function getStartupLines(termWidth) {
449714
449695
  const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
449715
449696
  out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
449716
449697
  out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
449717
- out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.11"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449698
+ out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.13"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449718
449699
  out.push("");
449719
449700
  return out;
449720
449701
  }
@@ -478263,7 +478244,7 @@ var init_bridge_kick = __esm(() => {
478263
478244
  var call60 = async () => {
478264
478245
  return {
478265
478246
  type: "text",
478266
- value: `${"99.0.0"} (built ${"2026-04-25T04:18:15.797Z"})`
478247
+ value: `${"99.0.0"} (built ${"2026-04-25T05:38:00.638Z"})`
478267
478248
  };
478268
478249
  }, version2, version_default;
478269
478250
  var init_version = __esm(() => {
@@ -499840,7 +499821,6 @@ var init_api3 = __esm(() => {
499840
499821
  init_system();
499841
499822
  init_tokenEstimation();
499842
499823
  init_constants3();
499843
- init_agentSwarmsEnabled();
499844
499824
  init_betas2();
499845
499825
  init_cwd2();
499846
499826
  init_debug();
@@ -506157,7 +506137,6 @@ function useLogMessages(messages, ignore6 = false) {
506157
506137
  var import_react194;
506158
506138
  var init_useLogMessages = __esm(() => {
506159
506139
  init_AppState();
506160
- init_agentSwarmsEnabled();
506161
506140
  init_sessionStorage();
506162
506141
  import_react194 = __toESM(require_react(), 1);
506163
506142
  });
@@ -515160,7 +515139,6 @@ var init_ExitPlanModePermissionRequest = __esm(() => {
515160
515139
  init_ultraplan();
515161
515140
  init_ink2();
515162
515141
  init_constants3();
515163
- init_agentSwarmsEnabled();
515164
515142
  init_context();
515165
515143
  init_editor();
515166
515144
  init_file();
@@ -526328,7 +526306,6 @@ var init_useTypeahead = __esm(() => {
526328
526306
  init_useKeybinding();
526329
526307
  init_useShortcutDisplay();
526330
526308
  init_AppState();
526331
- init_agentSwarmsEnabled();
526332
526309
  init_argumentSubstitution();
526333
526310
  init_shellCompletion();
526334
526311
  init_format2();
@@ -530750,14 +530727,24 @@ function ModeIndicator({
530750
530727
  }, [voiceEnabled, voiceHintUnderCap]);
530751
530728
  const isKillAgentsConfirmShowing = useAppState((s_7) => s_7.notifications.current?.key === "kill-agents-confirm");
530752
530729
  const hasTeams = isAgentSwarmsEnabled() && !isInProcessEnabled() && teamContext !== undefined && count2(Object.values(teamContext.teammates), (t_0) => t_0.name !== "team-lead") > 0;
530730
+ const currentMode = toolPermissionContext?.mode;
530731
+ const autonomyMode = useAppState((s_8) => s_8.settings.autonomyMode ?? "off");
530753
530732
  if (mode === "bash") {
530754
530733
  return /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
530755
530734
  color: "bashBorder",
530756
- children: "! for bash mode"
530757
- }, undefined, false, undefined, this);
530735
+ children: [
530736
+ /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
530737
+ bold: true,
530738
+ children: "SHELL MODE"
530739
+ }, undefined, false, undefined, this),
530740
+ " ",
530741
+ /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
530742
+ dimColor: true,
530743
+ children: "[Ctrl+P to exit]"
530744
+ }, undefined, false, undefined, this)
530745
+ ]
530746
+ }, undefined, true, undefined, this);
530758
530747
  }
530759
- const currentMode = toolPermissionContext?.mode;
530760
- const autonomyMode = useAppState((s_8) => s_8.settings.autonomyMode ?? "off");
530761
530748
  const hasActiveMode = !isDefaultMode(currentMode);
530762
530749
  const viewedTask = viewingAgentTaskId ? tasks2[viewingAgentTaskId] : undefined;
530763
530750
  const isViewingTeammate = viewSelectionMode === "viewing-agent" && viewedTask?.type === "in_process_teammate";
@@ -531005,7 +530992,6 @@ var init_PromptInputFooterLeftSide = __esm(() => {
531005
530992
  init_LocalAgentTask();
531006
530993
  init_CoordinatorAgentStatus();
531007
530994
  init_taskStatusUtils();
531008
- init_agentSwarmsEnabled();
531009
530995
  init_TeamStatus();
531010
530996
  init_registry();
531011
530997
  init_AppState();
@@ -531344,7 +531330,7 @@ function PromptInputModeIndicator(t0) {
531344
531330
  }, undefined, false, undefined, this) : mode === "bash" ? /* @__PURE__ */ jsx_dev_runtime431.jsxDEV(ThemedText, {
531345
531331
  color: "bashBorder",
531346
531332
  dimColor: isLoading,
531347
- children: "! "
531333
+ children: "$ "
531348
531334
  }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime431.jsxDEV(PromptChar, {
531349
531335
  isLoading,
531350
531336
  themeColor: isAgentSwarmsEnabled() ? teammateColor : undefined
@@ -531366,7 +531352,6 @@ var init_PromptInputModeIndicator = __esm(() => {
531366
531352
  init_ink2();
531367
531353
  init_agentColorManager();
531368
531354
  init_teammate();
531369
- init_agentSwarmsEnabled();
531370
531355
  import_react_compiler_runtime322 = __toESM(require_dist3(), 1);
531371
531356
  jsx_dev_runtime431 = __toESM(require_jsx_dev_runtime(), 1);
531372
531357
  });
@@ -531913,6 +531898,7 @@ function PromptInput({
531913
531898
  onInputChange,
531914
531899
  mode,
531915
531900
  onModeChange,
531901
+ onToggleShellMode,
531916
531902
  stashedPrompt,
531917
531903
  setStashedPrompt,
531918
531904
  submitCount,
@@ -533167,6 +533153,21 @@ function PromptInput({
533167
533153
  context: "Footer",
533168
533154
  isActive: !!footerItemSelected && !isModalOverlayActive
533169
533155
  });
533156
+ useKeybinding("chat:shellMode", () => {
533157
+ const nextMode = mode === "bash" ? "prompt" : "bash";
533158
+ onModeChange(nextMode);
533159
+ if (onToggleShellMode)
533160
+ onToggleShellMode();
533161
+ addNotification({
533162
+ key: "shell-mode-toggle",
533163
+ text: nextMode === "bash" ? "⚡ Shell Mode — commands go directly to OS" : "\uD83E\uDD16 Agent Mode — input goes to LLM",
533164
+ priority: "immediate",
533165
+ timeoutMs: 2000
533166
+ });
533167
+ }, {
533168
+ context: "Chat",
533169
+ isActive: !isModalOverlayActive
533170
+ });
533170
533171
  use_input_default((char, key) => {
533171
533172
  if (showTeamsDialog || showQuickOpen || showGlobalSearch || showHistoryPicker) {
533172
533173
  return;
@@ -533744,7 +533745,6 @@ var init_PromptInput = __esm(() => {
533744
533745
  init_InProcessTeammateTask();
533745
533746
  init_LocalAgentTask();
533746
533747
  init_agentColorManager();
533747
- init_agentSwarmsEnabled();
533748
533748
  init_autonomy();
533749
533749
  init_Cursor();
533750
533750
  init_config();
@@ -537254,7 +537254,6 @@ function useSwarmInitialization(setAppState, initialMessages, { enabled = true }
537254
537254
  var import_react272;
537255
537255
  var init_useSwarmInitialization = __esm(() => {
537256
537256
  init_state();
537257
- init_agentSwarmsEnabled();
537258
537257
  init_reconnection();
537259
537258
  init_teamHelpers();
537260
537259
  init_teammateInit();
@@ -537748,7 +537747,6 @@ async function handleSwarmWorkerPermission(params) {
537748
537747
  }
537749
537748
  }
537750
537749
  var init_swarmWorkerHandler = __esm(() => {
537751
- init_agentSwarmsEnabled();
537752
537750
  init_errors();
537753
537751
  init_log3();
537754
537752
  init_permissionSync();
@@ -549528,6 +549526,9 @@ function REPL({
549528
549526
  return () => clearTimeout(timer);
549529
549527
  }, [inputValue]);
549530
549528
  const [inputMode, setInputMode] = import_react316.useState("prompt");
549529
+ const [shellMode, setShellMode] = import_react316.useState(false);
549530
+ const shellModeRef = import_react316.useRef(shellMode);
549531
+ shellModeRef.current = shellMode;
549531
549532
  const [stashedPrompt, setStashedPrompt] = import_react316.useState();
549532
549533
  const handleRemoteInit = import_react316.useCallback((remoteSlashCommands) => {
549533
549534
  const remoteCommandSet = new Set(remoteSlashCommands);
@@ -550777,7 +550778,8 @@ Error: sandbox required but unavailable: ${reason}
550777
550778
  setPastedContents({});
550778
550779
  }
550779
550780
  if (submitsNow) {
550780
- setInputMode("prompt");
550781
+ if (!shellModeRef.current)
550782
+ setInputMode("prompt");
550781
550783
  setIDESelection(undefined);
550782
550784
  setSubmitCount((_) => _ + 1);
550783
550785
  helpers.clearBuffer();
@@ -552153,6 +552155,7 @@ Note: ctrl + z now suspends STRATAGEM X7, ctrl + _ undoes input.
552153
552155
  setIsSearchingHistory,
552154
552156
  helpOpen: isHelpOpen,
552155
552157
  setHelpOpen: setIsHelpOpen,
552158
+ onToggleShellMode: () => setShellMode((prev) => !prev),
552156
552159
  insertTextRef: undefined,
552157
552160
  voiceInterimRange: voice.interimRange
552158
552161
  }, undefined, false, undefined, this),
@@ -552389,7 +552392,6 @@ var init_REPL = __esm(() => {
552389
552392
  init_concurrentSessions();
552390
552393
  init_RemoteAgentTask();
552391
552394
  init_useInboxPoller();
552392
- init_agentSwarmsEnabled();
552393
552395
  init_useTaskListWatcher();
552394
552396
  init_ide();
552395
552397
  init_useIDEIntegration();
@@ -553654,7 +553656,7 @@ function WelcomeV2() {
553654
553656
  dimColor: true,
553655
553657
  children: [
553656
553658
  "v",
553657
- "0.3.11",
553659
+ "0.3.13",
553658
553660
  " "
553659
553661
  ]
553660
553662
  }, undefined, true, undefined, this)
@@ -559725,7 +559727,6 @@ var init_setup3 = __esm(() => {
559725
559727
  init_commands2();
559726
559728
  init_sessionMemory();
559727
559729
  init_ids();
559728
- init_agentSwarmsEnabled();
559729
559730
  init_appleTerminalBackup();
559730
559731
  init_auth();
559731
559732
  init_claudemd();
@@ -573672,7 +573673,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
573672
573673
  pendingHookMessages
573673
573674
  }, renderAndRun);
573674
573675
  }
573675
- }).version("0.3.11 (STRATAGEM X7)", "-v, --version", "Output the version number");
573676
+ }).version("0.3.13 (STRATAGEM X7)", "-v, --version", "Output the version number");
573676
573677
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
573677
573678
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
573678
573679
  if (canUserConfigureAdvisor()) {
@@ -574050,7 +574051,6 @@ var init_main3 = __esm(() => {
574050
574051
  init_tools2();
574051
574052
  init_autonomy();
574052
574053
  init_advisor();
574053
- init_agentSwarmsEnabled();
574054
574054
  init_auth();
574055
574055
  init_config();
574056
574056
  init_earlyInput();
@@ -574201,7 +574201,7 @@ if (false) {}
574201
574201
  async function main2() {
574202
574202
  const args = process.argv.slice(2);
574203
574203
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
574204
- console.log(`${"0.3.11"} (STRATAGEM X7)`);
574204
+ console.log(`${"0.3.13"} (STRATAGEM X7)`);
574205
574205
  return;
574206
574206
  }
574207
574207
  if (args.includes("--provider")) {
@@ -574323,4 +574323,4 @@ async function main2() {
574323
574323
  }
574324
574324
  main2();
574325
574325
 
574326
- //# debugId=AD29159858C1C98464756E2164756E21
574326
+ //# debugId=4C7542699EEA5FD964756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratagem-x7",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "STRATAGEM X7 is a cyberpunk coding-agent CLI for cloud and local model providers",
5
5
  "type": "module",
6
6
  "bin": {