stratagem-x7 0.3.4 → 0.3.6

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 +162 -59
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -35467,7 +35467,7 @@ function resolveProfileFilePath(options) {
35467
35467
  return resolve3(options?.cwd ?? process.cwd(), PROFILE_FILE_NAME);
35468
35468
  }
35469
35469
  function isProviderProfile(value) {
35470
- return value === "openai" || value === "ollama" || value === "codex" || value === "gemini" || value === "atomic-chat" || value === "nvidia-nim" || value === "minimax" || value === "mistral";
35470
+ return value === "openai" || value === "ollama" || value === "codex" || value === "gemini" || value === "atomic-chat" || value === "nvidia-nim" || value === "minimax" || value === "mistral" || value === "opencode" || value === "opencode-go";
35471
35471
  }
35472
35472
  function buildOllamaProfileEnv(model, options) {
35473
35473
  return {
@@ -35756,6 +35756,25 @@ async function buildLaunchEnv(options) {
35756
35756
  delete env3.CODEX_ACCOUNT_ID;
35757
35757
  return env3;
35758
35758
  }
35759
+ if (options.profile === "opencode" || options.profile === "opencode-go") {
35760
+ const isGo = options.profile === "opencode-go";
35761
+ const defaultBaseUrl = isGo ? DEFAULT_OPENCODE_GO_BASE_URL : DEFAULT_OPENCODE_BASE_URL;
35762
+ const defaultModel = isGo ? DEFAULT_OPENCODE_GO_MODEL : DEFAULT_OPENCODE_MODEL;
35763
+ env3.OPENAI_BASE_URL = persistedOpenAIBaseUrl || defaultBaseUrl;
35764
+ env3.OPENAI_MODEL = persistedOpenAIModel || defaultModel;
35765
+ const shellKey = sanitizeApiKey(processEnv.OPENCODE_API_KEY);
35766
+ const persistedKey = sanitizeApiKey(persistedEnv.OPENCODE_API_KEY);
35767
+ const key = shellKey || persistedKey || sanitizeApiKey(processEnv.OPENAI_API_KEY) || sanitizeApiKey(persistedEnv.OPENAI_API_KEY);
35768
+ if (key) {
35769
+ env3.OPENAI_API_KEY = key;
35770
+ } else {
35771
+ delete env3.OPENAI_API_KEY;
35772
+ }
35773
+ delete env3.CODEX_API_KEY;
35774
+ delete env3.CHATGPT_ACCOUNT_ID;
35775
+ delete env3.CODEX_ACCOUNT_ID;
35776
+ return env3;
35777
+ }
35759
35778
  if (options.profile === "codex") {
35760
35779
  env3.OPENAI_BASE_URL = persistedOpenAIBaseUrl && isCodexBaseUrl(persistedOpenAIBaseUrl) ? persistedOpenAIBaseUrl : DEFAULT_CODEX_BASE_URL;
35761
35780
  env3.OPENAI_MODEL = persistedOpenAIModel || "codexplan";
@@ -35860,7 +35879,7 @@ async function applySavedProfileToCurrentSession(options) {
35860
35879
  applyProfileEnvToProcessEnv(processEnv, nextEnv);
35861
35880
  return null;
35862
35881
  }
35863
- var PROFILE_FILE_NAME = ".stratagem-profile.json", DEFAULT_GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai", DEFAULT_GEMINI_MODEL = "gemini-2.0-flash", DEFAULT_MISTRAL_BASE_URL2 = "https://api.mistral.ai/v1", DEFAULT_MISTRAL_MODEL = "devstral-latest", PROFILE_ENV_KEYS;
35882
+ var PROFILE_FILE_NAME = ".stratagem-profile.json", DEFAULT_GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai", DEFAULT_GEMINI_MODEL = "gemini-2.0-flash", DEFAULT_MISTRAL_BASE_URL2 = "https://api.mistral.ai/v1", DEFAULT_MISTRAL_MODEL = "devstral-latest", DEFAULT_OPENCODE_BASE_URL = "https://opencode.ai/zen/v1", DEFAULT_OPENCODE_GO_BASE_URL = "https://opencode.ai/zen/go/v1", DEFAULT_OPENCODE_MODEL = "gpt-5.4", DEFAULT_OPENCODE_GO_MODEL = "glm-5", PROFILE_ENV_KEYS;
35864
35883
  var init_providerProfile = __esm(() => {
35865
35884
  init_providerConfig();
35866
35885
  init_codexOAuthShared();
@@ -35898,7 +35917,8 @@ var init_providerProfile = __esm(() => {
35898
35917
  "MINIMAX_MODEL",
35899
35918
  "MISTRAL_BASE_URL",
35900
35919
  "MISTRAL_API_KEY",
35901
- "MISTRAL_MODEL"
35920
+ "MISTRAL_MODEL",
35921
+ "OPENCODE_API_KEY"
35902
35922
  ];
35903
35923
  });
35904
35924
 
@@ -109001,7 +109021,9 @@ var init_configs = __esm(() => {
109001
109021
  github: "github:copilot",
109002
109022
  codex: "gpt-5.4",
109003
109023
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109004
- minimax: "MiniMax-M2.5"
109024
+ minimax: "MiniMax-M2.5",
109025
+ mistral: "devstral-latest",
109026
+ opencode: "gpt-5.4"
109005
109027
  };
109006
109028
  CLAUDE_3_5_V2_SONNET_CONFIG = {
109007
109029
  firstParty: "claude-3-5-sonnet-20241022",
@@ -109013,7 +109035,9 @@ var init_configs = __esm(() => {
109013
109035
  github: "github:copilot",
109014
109036
  codex: "gpt-5.4",
109015
109037
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109016
- minimax: "MiniMax-M2.5"
109038
+ minimax: "MiniMax-M2.5",
109039
+ mistral: "devstral-latest",
109040
+ opencode: "gpt-5.4"
109017
109041
  };
109018
109042
  CLAUDE_3_5_HAIKU_CONFIG = {
109019
109043
  firstParty: "claude-3-5-haiku-20241022",
@@ -109025,7 +109049,9 @@ var init_configs = __esm(() => {
109025
109049
  github: "github:copilot",
109026
109050
  codex: "gpt-5.4",
109027
109051
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109028
- minimax: "MiniMax-M2.5"
109052
+ minimax: "MiniMax-M2.5",
109053
+ mistral: "devstral-latest",
109054
+ opencode: "gpt-5.4"
109029
109055
  };
109030
109056
  CLAUDE_HAIKU_4_5_CONFIG = {
109031
109057
  firstParty: "claude-haiku-4-5-20251001",
@@ -109037,7 +109063,9 @@ var init_configs = __esm(() => {
109037
109063
  github: "github:copilot",
109038
109064
  codex: "gpt-5.4",
109039
109065
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109040
- minimax: "MiniMax-M2.5"
109066
+ minimax: "MiniMax-M2.5",
109067
+ mistral: "devstral-latest",
109068
+ opencode: "gpt-5.4"
109041
109069
  };
109042
109070
  CLAUDE_SONNET_4_CONFIG = {
109043
109071
  firstParty: "claude-sonnet-4-20250514",
@@ -109049,7 +109077,9 @@ var init_configs = __esm(() => {
109049
109077
  github: "github:copilot",
109050
109078
  codex: "gpt-5.4",
109051
109079
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109052
- minimax: "MiniMax-M2.5"
109080
+ minimax: "MiniMax-M2.5",
109081
+ mistral: "devstral-latest",
109082
+ opencode: "gpt-5.4"
109053
109083
  };
109054
109084
  CLAUDE_SONNET_4_5_CONFIG = {
109055
109085
  firstParty: "claude-sonnet-4-5-20250929",
@@ -109061,7 +109091,9 @@ var init_configs = __esm(() => {
109061
109091
  github: "github:copilot",
109062
109092
  codex: "gpt-5.4",
109063
109093
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109064
- minimax: "MiniMax-M2.5"
109094
+ minimax: "MiniMax-M2.5",
109095
+ mistral: "devstral-latest",
109096
+ opencode: "gpt-5.4"
109065
109097
  };
109066
109098
  CLAUDE_OPUS_4_CONFIG = {
109067
109099
  firstParty: "claude-opus-4-20250514",
@@ -109073,7 +109105,9 @@ var init_configs = __esm(() => {
109073
109105
  github: "github:copilot",
109074
109106
  codex: "gpt-5.4",
109075
109107
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109076
- minimax: "MiniMax-M2.5"
109108
+ minimax: "MiniMax-M2.5",
109109
+ mistral: "devstral-latest",
109110
+ opencode: "gpt-5.4"
109077
109111
  };
109078
109112
  CLAUDE_OPUS_4_1_CONFIG = {
109079
109113
  firstParty: "claude-opus-4-1-20250805",
@@ -109085,7 +109119,9 @@ var init_configs = __esm(() => {
109085
109119
  github: "github:copilot",
109086
109120
  codex: "gpt-5.4",
109087
109121
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109088
- minimax: "MiniMax-M2.5"
109122
+ minimax: "MiniMax-M2.5",
109123
+ mistral: "devstral-latest",
109124
+ opencode: "gpt-5.4"
109089
109125
  };
109090
109126
  CLAUDE_OPUS_4_5_CONFIG = {
109091
109127
  firstParty: "claude-opus-4-5-20251101",
@@ -109097,7 +109133,9 @@ var init_configs = __esm(() => {
109097
109133
  github: "github:copilot",
109098
109134
  codex: "gpt-5.4",
109099
109135
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109100
- minimax: "MiniMax-M2.5"
109136
+ minimax: "MiniMax-M2.5",
109137
+ mistral: "devstral-latest",
109138
+ opencode: "gpt-5.4"
109101
109139
  };
109102
109140
  CLAUDE_OPUS_4_6_CONFIG = {
109103
109141
  firstParty: "claude-opus-4-6",
@@ -109109,7 +109147,9 @@ var init_configs = __esm(() => {
109109
109147
  github: "github:copilot",
109110
109148
  codex: "gpt-5.4",
109111
109149
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109112
- minimax: "MiniMax-M2.5"
109150
+ minimax: "MiniMax-M2.5",
109151
+ mistral: "devstral-latest",
109152
+ opencode: "gpt-5.4"
109113
109153
  };
109114
109154
  CLAUDE_SONNET_4_6_CONFIG = {
109115
109155
  firstParty: "claude-sonnet-4-6",
@@ -109121,7 +109161,9 @@ var init_configs = __esm(() => {
109121
109161
  github: "github:copilot",
109122
109162
  codex: "gpt-5.4",
109123
109163
  "nvidia-nim": "nvidia/llama-3.1-nemotron-70b-instruct",
109124
- minimax: "MiniMax-M2.5"
109164
+ minimax: "MiniMax-M2.5",
109165
+ mistral: "devstral-latest",
109166
+ opencode: "gpt-5.4"
109125
109167
  };
109126
109168
  ALL_MODEL_CONFIGS = {
109127
109169
  haiku35: CLAUDE_3_5_HAIKU_CONFIG,
@@ -109148,6 +109190,9 @@ function getAPIProvider() {
109148
109190
  if (isEnvTruthy(process.env.MINIMAX_API_KEY)) {
109149
109191
  return "minimax";
109150
109192
  }
109193
+ if (process.env.OPENAI_BASE_URL?.includes("opencode.ai")) {
109194
+ return "opencode";
109195
+ }
109151
109196
  return isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI) ? "gemini" : isEnvTruthy(process.env.CLAUDE_CODE_USE_MISTRAL) ? "mistral" : isEnvTruthy(process.env.CLAUDE_CODE_USE_GITHUB) ? "github" : isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) ? isCodexModel() ? "codex" : "openai" : isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ? "bedrock" : isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ? "vertex" : isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ? "foundry" : "firstParty";
109152
109197
  }
109153
109198
  function usesAnthropicAccountFlow() {
@@ -110561,7 +110606,7 @@ function getSmallFastModel() {
110561
110606
  if (getAPIProvider() === "mistral") {
110562
110607
  return process.env.MISTRAL_MODEL || "ministral-3b-latest";
110563
110608
  }
110564
- if (getAPIProvider() === "openai") {
110609
+ if (getAPIProvider() === "openai" || getAPIProvider() === "opencode") {
110565
110610
  return process.env.OPENAI_MODEL || "gpt-4o-mini";
110566
110611
  }
110567
110612
  if (getAPIProvider() === "github") {
@@ -110581,7 +110626,7 @@ function getUserSpecifiedModelSetting() {
110581
110626
  const settings = getSettings_DEPRECATED() || {};
110582
110627
  const setting = normalizeModelSetting(settings.model);
110583
110628
  const provider = getAPIProvider();
110584
- specifiedModel = (provider === "gemini" ? process.env.GEMINI_MODEL : undefined) || (provider === "mistral" ? process.env.MISTRAL_MODEL : undefined) || (provider === "openai" || provider === "gemini" || provider === "mistral" || provider === "github" ? process.env.OPENAI_MODEL : undefined) || (provider === "firstParty" ? process.env.ANTHROPIC_MODEL : undefined) || setting || undefined;
110629
+ specifiedModel = (provider === "gemini" ? process.env.GEMINI_MODEL : undefined) || (provider === "mistral" ? process.env.MISTRAL_MODEL : undefined) || (provider === "openai" || provider === "gemini" || provider === "mistral" || provider === "github" || provider === "opencode" ? process.env.OPENAI_MODEL : undefined) || (provider === "firstParty" ? process.env.ANTHROPIC_MODEL : undefined) || setting || undefined;
110585
110630
  }
110586
110631
  if (specifiedModel && !isModelAllowed(specifiedModel)) {
110587
110632
  return;
@@ -110608,7 +110653,7 @@ function getDefaultOpusModel() {
110608
110653
  if (getAPIProvider() === "mistral") {
110609
110654
  return process.env.MISTRAL_MODEL || "devstral-latest";
110610
110655
  }
110611
- if (getAPIProvider() === "openai") {
110656
+ if (getAPIProvider() === "openai" || getAPIProvider() === "opencode") {
110612
110657
  return process.env.OPENAI_MODEL || "gpt-4o";
110613
110658
  }
110614
110659
  if (getAPIProvider() === "codex") {
@@ -110632,7 +110677,7 @@ function getDefaultSonnetModel() {
110632
110677
  if (getAPIProvider() === "mistral") {
110633
110678
  return process.env.MISTRAL_MODEL || "mistral-medium-latest";
110634
110679
  }
110635
- if (getAPIProvider() === "openai") {
110680
+ if (getAPIProvider() === "openai" || getAPIProvider() === "opencode") {
110636
110681
  return process.env.OPENAI_MODEL || "gpt-4o";
110637
110682
  }
110638
110683
  if (getAPIProvider() === "codex") {
@@ -110653,7 +110698,7 @@ function getDefaultHaikuModel() {
110653
110698
  if (getAPIProvider() === "mistral") {
110654
110699
  return process.env.MISTRAL_MODEL || "ministral-3b-latest";
110655
110700
  }
110656
- if (getAPIProvider() === "openai") {
110701
+ if (getAPIProvider() === "openai" || getAPIProvider() === "opencode") {
110657
110702
  return process.env.OPENAI_MODEL || "gpt-4o-mini";
110658
110703
  }
110659
110704
  if (getAPIProvider() === "codex") {
@@ -110688,7 +110733,7 @@ function getDefaultMainLoopModelSetting() {
110688
110733
  if (getAPIProvider() === "mistral") {
110689
110734
  return process.env.MISTRAL_MODEL || "devstral-latest";
110690
110735
  }
110691
- if (getAPIProvider() === "openai") {
110736
+ if (getAPIProvider() === "openai" || getAPIProvider() === "opencode") {
110692
110737
  return process.env.OPENAI_MODEL || "gpt-4o";
110693
110738
  }
110694
110739
  if (getAPIProvider() === "codex") {
@@ -110808,7 +110853,7 @@ function renderModelSetting(setting) {
110808
110853
  return renderModelName(setting);
110809
110854
  }
110810
110855
  function getPublicModelDisplayName(model) {
110811
- if (getAPIProvider() === "openai" || getAPIProvider() === "gemini" || getAPIProvider() === "codex" || getAPIProvider() === "github") {
110856
+ if (getAPIProvider() === "openai" || getAPIProvider() === "gemini" || getAPIProvider() === "codex" || getAPIProvider() === "github" || getAPIProvider() === "opencode") {
110812
110857
  const copilotModelNames = {
110813
110858
  "gpt-5.4": "GPT-5.4",
110814
110859
  "gpt-5.4-mini": "GPT-5.4 mini",
@@ -113484,6 +113529,24 @@ function getProviderPresetDefaults(preset) {
113484
113529
  apiKey: "",
113485
113530
  requiresApiKey: true
113486
113531
  };
113532
+ case "opencode":
113533
+ return {
113534
+ provider: "openai",
113535
+ name: "OpenCode Zen",
113536
+ baseUrl: "https://opencode.ai/zen/v1",
113537
+ model: "gpt-5.4",
113538
+ apiKey: process.env.OPENCODE_API_KEY ?? "",
113539
+ requiresApiKey: true
113540
+ };
113541
+ case "opencode-go":
113542
+ return {
113543
+ provider: "openai",
113544
+ name: "OpenCode Go",
113545
+ baseUrl: "https://opencode.ai/zen/go/v1",
113546
+ model: "glm-5",
113547
+ apiKey: process.env.OPENCODE_API_KEY ?? "",
113548
+ requiresApiKey: true
113549
+ };
113487
113550
  case "ollama":
113488
113551
  default:
113489
113552
  return {
@@ -113552,6 +113615,7 @@ function clearProviderProfileEnvFromProcessEnv(processEnv = process.env) {
113552
113615
  delete processEnv.MINIMAX_API_KEY;
113553
113616
  delete processEnv.NVIDIA_API_KEY;
113554
113617
  delete processEnv.NVIDIA_NIM;
113618
+ delete processEnv.OPENCODE_API_KEY;
113555
113619
  }
113556
113620
  function applyProviderProfileToProcessEnv(profile) {
113557
113621
  clearProviderProfileEnvFromProcessEnv();
@@ -218845,6 +218909,9 @@ function convertMessages(messages, system) {
218845
218909
  return typeof c6 === "string" ? c6 : Array.isArray(c6) ? c6.map((p) => p.text ?? "").join("") : "";
218846
218910
  })()
218847
218911
  };
218912
+ if (thinkingBlock && thinkingBlock.thinking) {
218913
+ assistantMsg.reasoning_content = thinkingBlock.thinking;
218914
+ }
218848
218915
  if (toolUses.length > 0) {
218849
218916
  assistantMsg.tool_calls = toolUses.map((tu, index) => {
218850
218917
  const toolCall = {
@@ -281635,6 +281702,16 @@ function ProviderManager({ mode, onDone }) {
281635
281702
  label: "Ollama Cloud",
281636
281703
  description: "Ollama Cloud API — just needs API key"
281637
281704
  },
281705
+ {
281706
+ value: "opencode",
281707
+ label: "OpenCode Zen",
281708
+ description: "OpenCode Zen proxy — premium multi-provider API"
281709
+ },
281710
+ {
281711
+ value: "opencode-go",
281712
+ label: "OpenCode Go",
281713
+ description: "OpenCode Go proxy — lightweight multi-provider API"
281714
+ },
281638
281715
  ...mode === "first-run" ? [
281639
281716
  {
281640
281717
  value: "skip",
@@ -292382,7 +292459,7 @@ function AssistantTextMessage(t0) {
292382
292459
  let t6;
292383
292460
  if ($2[27] !== t4 || $2[28] !== t5) {
292384
292461
  t6 = /* @__PURE__ */ jsx_dev_runtime77.jsxDEV(ThemedBox_default, {
292385
- flexDirection: "row",
292462
+ flexDirection: "column",
292386
292463
  borderStyle: "single",
292387
292464
  borderColor: "claude",
292388
292465
  borderLeft: true,
@@ -292391,8 +292468,21 @@ function AssistantTextMessage(t0) {
292391
292468
  borderBottom: false,
292392
292469
  paddingLeft: 1,
292393
292470
  children: [
292394
- t4,
292395
- t5
292471
+ /* @__PURE__ */ jsx_dev_runtime77.jsxDEV(ThemedBox_default, {
292472
+ marginBottom: 1,
292473
+ children: /* @__PURE__ */ jsx_dev_runtime77.jsxDEV(ThemedText, {
292474
+ color: "claude",
292475
+ italic: true,
292476
+ children: "STRATAGEM"
292477
+ }, undefined, false, undefined, this)
292478
+ }, undefined, false, undefined, this),
292479
+ /* @__PURE__ */ jsx_dev_runtime77.jsxDEV(ThemedBox_default, {
292480
+ flexDirection: "row",
292481
+ children: [
292482
+ t4,
292483
+ t5
292484
+ ]
292485
+ }, undefined, true, undefined, this)
292396
292486
  ]
292397
292487
  }, undefined, true, undefined, this);
292398
292488
  $2[27] = t4;
@@ -292472,7 +292562,7 @@ function AssistantThinkingMessage(t0) {
292472
292562
  let t52;
292473
292563
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
292474
292564
  t52 = /* @__PURE__ */ jsx_dev_runtime78.jsxDEV(ThemedText, {
292475
- color: "promptBorder",
292565
+ dimColor: true,
292476
292566
  italic: true,
292477
292567
  children: [
292478
292568
  "TRACE // COGNITION",
@@ -292489,7 +292579,7 @@ function AssistantThinkingMessage(t0) {
292489
292579
  t62 = /* @__PURE__ */ jsx_dev_runtime78.jsxDEV(ThemedBox_default, {
292490
292580
  marginTop: t42,
292491
292581
  borderStyle: "single",
292492
- borderColor: "promptBorder",
292582
+ borderColor: "dim",
292493
292583
  borderLeft: true,
292494
292584
  borderTop: false,
292495
292585
  borderRight: false,
@@ -292508,7 +292598,7 @@ function AssistantThinkingMessage(t0) {
292508
292598
  let t5;
292509
292599
  if ($2[3] === Symbol.for("react.memo_cache_sentinel")) {
292510
292600
  t5 = /* @__PURE__ */ jsx_dev_runtime78.jsxDEV(ThemedText, {
292511
- color: "promptBorder",
292601
+ dimColor: true,
292512
292602
  italic: true,
292513
292603
  children: [
292514
292604
  "TRACE // COGNITION",
@@ -292541,7 +292631,7 @@ function AssistantThinkingMessage(t0) {
292541
292631
  marginTop: t4,
292542
292632
  width: "100%",
292543
292633
  borderStyle: "single",
292544
- borderColor: "promptBorder",
292634
+ borderColor: "dim",
292545
292635
  borderLeft: true,
292546
292636
  borderTop: false,
292547
292637
  borderRight: false,
@@ -294675,12 +294765,22 @@ ${tail}`;
294675
294765
  borderTop: false,
294676
294766
  borderRight: false,
294677
294767
  borderBottom: false,
294678
- children: /* @__PURE__ */ jsx_dev_runtime92.jsxDEV(HighlightedThinkingText, {
294679
- text: displayText,
294680
- useBriefLayout,
294681
- timestamp: useBriefLayout ? timestamp : undefined
294682
- }, undefined, false, undefined, this)
294683
- }, undefined, false, undefined, this);
294768
+ children: [
294769
+ !useBriefLayout && /* @__PURE__ */ jsx_dev_runtime92.jsxDEV(ThemedBox_default, {
294770
+ marginBottom: 1,
294771
+ children: /* @__PURE__ */ jsx_dev_runtime92.jsxDEV(ThemedText, {
294772
+ color: "promptBorder",
294773
+ italic: true,
294774
+ children: "USER"
294775
+ }, undefined, false, undefined, this)
294776
+ }, undefined, false, undefined, this),
294777
+ /* @__PURE__ */ jsx_dev_runtime92.jsxDEV(HighlightedThinkingText, {
294778
+ text: displayText,
294779
+ useBriefLayout,
294780
+ timestamp: useBriefLayout ? timestamp : undefined
294781
+ }, undefined, false, undefined, this)
294782
+ ]
294783
+ }, undefined, true, undefined, this);
294684
294784
  }
294685
294785
  var import_react70, jsx_dev_runtime92, MAX_DISPLAY_CHARS = 1e4, TRUNCATE_HEAD_CHARS = 2500, TRUNCATE_TAIL_CHARS = 2500;
294686
294786
  var init_UserPromptMessage = __esm(() => {
@@ -373455,11 +373555,11 @@ function collapseReadSearchGroups(messages, tools) {
373455
373555
  if (currentGroup.messages.length === 0) {
373456
373556
  return;
373457
373557
  }
373458
- result.push(createCollapsedGroup(currentGroup));
373459
373558
  for (const deferred of deferredSkippable) {
373460
373559
  result.push(deferred);
373461
373560
  }
373462
373561
  deferredSkippable = [];
373562
+ result.push(createCollapsedGroup(currentGroup));
373463
373563
  currentGroup = createEmptyGroup();
373464
373564
  }
373465
373565
  for (const msg of messages) {
@@ -373547,7 +373647,11 @@ function collapseReadSearchGroups(messages, tools) {
373547
373647
  currentGroup.relevantMemories ??= [];
373548
373648
  currentGroup.relevantMemories.push(...msg.attachment.memories);
373549
373649
  } else if (shouldSkipMessage(msg)) {
373550
- if (currentGroup.messages.length > 0 && !(msg.type === "attachment" && msg.attachment.type === "nested_memory")) {
373650
+ const isThinking = msg.type === "assistant" && (msg.message.content[0]?.type === "thinking" || msg.message.content[0]?.type === "redacted_thinking");
373651
+ if (isThinking && currentGroup.messages.length > 0) {
373652
+ flushGroup();
373653
+ result.push(msg);
373654
+ } else if (currentGroup.messages.length > 0 && !(msg.type === "attachment" && msg.attachment.type === "nested_memory")) {
373551
373655
  deferredSkippable.push(msg);
373552
373656
  } else {
373553
373657
  result.push(msg);
@@ -382714,7 +382818,7 @@ function getAnthropicEnvMetadata() {
382714
382818
  function getBuildAgeMinutes() {
382715
382819
  if (false)
382716
382820
  ;
382717
- const buildTime = new Date("2026-04-24T07:53:54.383Z").getTime();
382821
+ const buildTime = new Date("2026-04-24T13:00:51.720Z").getTime();
382718
382822
  if (isNaN(buildTime))
382719
382823
  return;
382720
382824
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -406983,7 +407087,7 @@ var init_feedback2 = __esm(() => {
406983
407087
  aliases: ["bug"],
406984
407088
  type: "local-jsx",
406985
407089
  name: "feedback",
406986
- description: `Submit feedback about Claude Code`,
407090
+ description: `Submit feedback about Stratagem`,
406987
407091
  argumentHint: "[report]",
406988
407092
  isEnabled: () => !(isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) || isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) || isEnvTruthy(process.env.DISABLE_FEEDBACK_COMMAND) || isEnvTruthy(process.env.DISABLE_BUG_COMMAND) || isEssentialTrafficOnly() || process.env.USER_TYPE === "ant" || !isPolicyAllowed("allow_product_feedback")),
406989
407093
  load: () => Promise.resolve().then(() => (init_feedback(), exports_feedback))
@@ -409893,7 +409997,7 @@ function buildPrimarySection() {
409893
409997
  }, undefined, false, undefined, this);
409894
409998
  return [{
409895
409999
  label: "Version",
409896
- value: "0.3.4"
410000
+ value: "0.3.6"
409897
410001
  }, {
409898
410002
  label: "Session name",
409899
410003
  value: nameValue
@@ -421490,7 +421594,7 @@ var init_doctor2 = __esm(() => {
421490
421594
  init_envUtils();
421491
421595
  doctor = {
421492
421596
  name: "doctor",
421493
- description: "Diagnose and verify your Claude Code installation and settings",
421597
+ description: "Diagnose and verify your Stratagem installation and settings",
421494
421598
  isEnabled: () => !isEnvTruthy(process.env.DISABLE_DOCTOR_COMMAND),
421495
421599
  type: "local-jsx",
421496
421600
  load: () => Promise.resolve().then(() => (init_doctor(), exports_doctor))
@@ -421844,7 +421948,7 @@ var init_memoryFileSelectorPaths = __esm(() => {
421844
421948
 
421845
421949
  // src/components/memory/MemoryFileSelector.tsx
421846
421950
  import { mkdir as mkdir29 } from "fs/promises";
421847
- import { basename as basename36, join as join112 } from "path";
421951
+ import { basename as basename36 } from "path";
421848
421952
  function MemoryFileSelector(t0) {
421849
421953
  const $2 = import_react_compiler_runtime156.c(58);
421850
421954
  const {
@@ -421853,7 +421957,7 @@ function MemoryFileSelector(t0) {
421853
421957
  } = t0;
421854
421958
  const existingMemoryFiles = import_react121.use(getMemoryFiles());
421855
421959
  const originalCwd = getOriginalCwd();
421856
- const userMemoryPath = join112(getClaudeConfigHomeDir(), "CLAUDE.md");
421960
+ const userMemoryPath = getAutoMemEntrypoint();
421857
421961
  const projectMemoryPath = getProjectMemoryPathForSelector(existingMemoryFiles, originalCwd);
421858
421962
  const projectMemoryFileName = basename36(projectMemoryPath);
421859
421963
  const hasUserMemory = existingMemoryFiles.some((f) => f.path === userMemoryPath);
@@ -421893,7 +421997,7 @@ function MemoryFileSelector(t0) {
421893
421997
  let description;
421894
421998
  const isGit = projectIsInGitRepo(originalCwd);
421895
421999
  if (file2.type === "User" && !file2.isNested) {
421896
- description = "Saved in ~/.claude/CLAUDE.md";
422000
+ description = `Saved in ${getDisplayPath(userMemoryPath)}`;
421897
422001
  } else {
421898
422002
  if (file2.type === "Project" && !file2.isNested && file2.path === projectMemoryPath) {
421899
422003
  description = `${isGit ? "Checked in at" : "Saved in"} ./${projectMemoryFileName}`;
@@ -422305,7 +422409,6 @@ var init_MemoryFileSelector = __esm(() => {
422305
422409
  init_agentMemory();
422306
422410
  init_browser();
422307
422411
  init_claudemd();
422308
- init_envUtils();
422309
422412
  init_file();
422310
422413
  init_format2();
422311
422414
  init_versions3();
@@ -422640,7 +422743,7 @@ ${editorHint}`, {
422640
422743
  children: [
422641
422744
  "Learn more: ",
422642
422745
  /* @__PURE__ */ jsx_dev_runtime207.jsxDEV(Link, {
422643
- url: "https://code.claude.com/docs/en/memory"
422746
+ url: "https://github.com/EstarinAzx/STRATAGEM"
422644
422747
  }, undefined, false, undefined, this)
422645
422748
  ]
422646
422749
  }, undefined, true, undefined, this)
@@ -422676,7 +422779,7 @@ var init_memory2 = __esm(() => {
422676
422779
  memory = {
422677
422780
  type: "local-jsx",
422678
422781
  name: "memory",
422679
- description: "Edit Claude memory files",
422782
+ description: "Edit memory files",
422680
422783
  load: () => Promise.resolve().then(() => (init_memory(), exports_memory))
422681
422784
  };
422682
422785
  memory_default = memory;
@@ -448076,7 +448179,7 @@ var init_mobile2 = __esm(() => {
448076
448179
  type: "local-jsx",
448077
448180
  name: "mobile",
448078
448181
  aliases: ["ios", "android"],
448079
- description: "Show QR code to download the Claude mobile app",
448182
+ description: "Show QR code to download the mobile app",
448080
448183
  load: () => Promise.resolve().then(() => (init_mobile(), exports_mobile))
448081
448184
  };
448082
448185
  mobile_default = mobile;
@@ -449521,7 +449624,7 @@ function getStartupLines(termWidth) {
449521
449624
  const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
449522
449625
  out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
449523
449626
  out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
449524
- out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.4"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449627
+ out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.6"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449525
449628
  out.push("");
449526
449629
  return out;
449527
449630
  }
@@ -456956,7 +457059,7 @@ var init_status3 = __esm(() => {
456956
457059
  status = {
456957
457060
  type: "local-jsx",
456958
457061
  name: "status",
456959
- description: "Show Claude Code status including version, model, account, API connectivity, and tool statuses",
457062
+ description: "Show Stratagem status including version, model, account, API connectivity, and tool statuses",
456960
457063
  immediate: true,
456961
457064
  load: () => Promise.resolve().then(() => (init_status2(), exports_status))
456962
457065
  };
@@ -477161,7 +477264,7 @@ var init_plugin2 = __esm(() => {
477161
477264
  type: "local-jsx",
477162
477265
  name: "plugin",
477163
477266
  aliases: ["plugins", "marketplace"],
477164
- description: "Manage Claude Code plugins",
477267
+ description: "Manage Stratagem plugins",
477165
477268
  immediate: true,
477166
477269
  load: () => Promise.resolve().then(() => (init_plugin(), exports_plugin))
477167
477270
  };
@@ -478070,7 +478173,7 @@ var init_bridge_kick = __esm(() => {
478070
478173
  var call60 = async () => {
478071
478174
  return {
478072
478175
  type: "text",
478073
- value: `${"99.0.0"} (built ${"2026-04-24T07:53:54.383Z"})`
478176
+ value: `${"99.0.0"} (built ${"2026-04-24T13:00:51.720Z"})`
478074
478177
  };
478075
478178
  }, version2, version_default;
478076
478179
  var init_version = __esm(() => {
@@ -480550,7 +480653,7 @@ var init_stickers2 = __esm(() => {
480550
480653
  stickers = {
480551
480654
  type: "local",
480552
480655
  name: "stickers",
480553
- description: "Order Claude Code stickers",
480656
+ description: "Order Stratagem stickers",
480554
480657
  supportsNonInteractive: false,
480555
480658
  load: () => Promise.resolve().then(() => (init_stickers(), exports_stickers))
480556
480659
  };
@@ -482069,7 +482172,7 @@ var init_model3 = __esm(() => {
482069
482172
  type: "local-jsx",
482070
482173
  name: "model",
482071
482174
  get description() {
482072
- return `Set the AI model for Claude Code (currently ${renderModelName(getMainLoopModel())})`;
482175
+ return `Set the AI model for Stratagem (currently ${renderModelName(getMainLoopModel())})`;
482073
482176
  },
482074
482177
  argumentHint: "[model]",
482075
482178
  get immediate() {
@@ -486425,7 +486528,7 @@ var init_stats3 = __esm(() => {
486425
486528
  stats = {
486426
486529
  type: "local-jsx",
486427
486530
  name: "stats",
486428
- description: "Show your Claude Code usage statistics and activity",
486531
+ description: "Show your Stratagem usage statistics and activity",
486429
486532
  load: () => Promise.resolve().then(() => (init_stats2(), exports_stats))
486430
486533
  };
486431
486534
  stats_default = stats;
@@ -553461,7 +553564,7 @@ function WelcomeV2() {
553461
553564
  dimColor: true,
553462
553565
  children: [
553463
553566
  "v",
553464
- "0.3.4",
553567
+ "0.3.6",
553465
553568
  " "
553466
553569
  ]
553467
553570
  }, undefined, true, undefined, this)
@@ -557546,7 +557649,7 @@ function generateSettingsSchema() {
557546
557649
  function registerUpdateConfigSkill() {
557547
557650
  registerBundledSkill({
557548
557651
  name: "update-config",
557549
- description: 'Use this skill to configure the Claude Code harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not Claude, so memory/preferences cannot fulfill them. Also use for: permissions ("allow X", "add permission", "move permission to"), env vars ("set X=Y"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: "allow npm commands", "add bq permission to global settings", "move permission to user settings", "set DEBUG=true", "when claude stops show X". For simple settings like theme/model, use Config tool.',
557652
+ description: 'Use this skill to configure the Stratagem harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not the agent, so memory/preferences cannot fulfill them. Also use for: permissions ("allow X", "add permission", "move permission to"), env vars ("set X=Y"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: "allow npm commands", "add bq permission to global settings", "move permission to user settings", "set DEBUG=true", "when claude stops show X". For simple settings like theme/model, use Config tool.',
557550
557653
  allowedTools: ["Read"],
557551
557654
  userInvocable: true,
557552
557655
  async getPromptForCommand(args) {
@@ -573479,7 +573582,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
573479
573582
  pendingHookMessages
573480
573583
  }, renderAndRun);
573481
573584
  }
573482
- }).version("0.3.4 (STRATAGEM X7)", "-v, --version", "Output the version number");
573585
+ }).version("0.3.6 (STRATAGEM X7)", "-v, --version", "Output the version number");
573483
573586
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
573484
573587
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
573485
573588
  if (canUserConfigureAdvisor()) {
@@ -574008,7 +574111,7 @@ if (false) {}
574008
574111
  async function main2() {
574009
574112
  const args = process.argv.slice(2);
574010
574113
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
574011
- console.log(`${"0.3.4"} (STRATAGEM X7)`);
574114
+ console.log(`${"0.3.6"} (STRATAGEM X7)`);
574012
574115
  return;
574013
574116
  }
574014
574117
  if (args.includes("--provider")) {
@@ -574130,4 +574233,4 @@ async function main2() {
574130
574233
  }
574131
574234
  main2();
574132
574235
 
574133
- //# debugId=1704741C7842E25964756E2164756E21
574236
+ //# debugId=213DA9419217F0CA64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratagem-x7",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "STRATAGEM X7 is a cyberpunk coding-agent CLI for cloud and local model providers",
5
5
  "type": "module",
6
6
  "bin": {