stratagem-x7 0.3.24 → 0.3.26

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 +84 -20
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -55532,8 +55532,22 @@ function getAutoMemPathSetting() {
55532
55532
  function hasAutoMemPathOverride() {
55533
55533
  return getAutoMemPathOverride() !== undefined;
55534
55534
  }
55535
+ function isFilesystemRoot(p) {
55536
+ const normalized = normalize3(p);
55537
+ if (normalized === sep4)
55538
+ return true;
55539
+ if (/^[A-Za-z]:[/\\]?$/.test(normalized))
55540
+ return true;
55541
+ if (normalized.length <= 3 && /^[A-Za-z]:/.test(normalized))
55542
+ return true;
55543
+ return false;
55544
+ }
55535
55545
  function getAutoMemBase() {
55536
- return findCanonicalGitRoot(getProjectRoot()) ?? getProjectRoot();
55546
+ const gitRoot = findCanonicalGitRoot(getProjectRoot());
55547
+ if (gitRoot && !isFilesystemRoot(gitRoot)) {
55548
+ return gitRoot;
55549
+ }
55550
+ return getProjectRoot();
55537
55551
  }
55538
55552
  function getAutoMemEntrypoint() {
55539
55553
  return join24(getAutoMemPath(), AUTO_MEM_ENTRYPOINT_NAME);
@@ -57115,12 +57129,17 @@ import { dirname as dirname11, join as join25 } from "path";
57115
57129
  function getProjectInstructionFilePaths(dir) {
57116
57130
  return [
57117
57131
  join25(dir, PRIMARY_PROJECT_INSTRUCTION_FILE),
57118
- join25(dir, FALLBACK_PROJECT_INSTRUCTION_FILE)
57132
+ join25(dir, SECONDARY_PROJECT_INSTRUCTION_FILE),
57133
+ join25(dir, LEGACY_PROJECT_INSTRUCTION_FILE)
57119
57134
  ];
57120
57135
  }
57121
57136
  function getProjectInstructionFilePath(dir, existsSync7) {
57122
- const [primaryPath, fallbackPath] = getProjectInstructionFilePaths(dir);
57123
- return existsSync7(primaryPath) ? primaryPath : fallbackPath;
57137
+ const paths2 = getProjectInstructionFilePaths(dir);
57138
+ for (const p of paths2) {
57139
+ if (existsSync7(p))
57140
+ return p;
57141
+ }
57142
+ return paths2[0];
57124
57143
  }
57125
57144
  function hasProjectInstructionFile(dir, existsSync7) {
57126
57145
  return getProjectInstructionFilePaths(dir).some((path10) => existsSync7(path10));
@@ -57139,9 +57158,9 @@ function findProjectInstructionFilePathInAncestors(startDir, existsSync7) {
57139
57158
  }
57140
57159
  }
57141
57160
  function isProjectInstructionFileName(name) {
57142
- return name === PRIMARY_PROJECT_INSTRUCTION_FILE || name === FALLBACK_PROJECT_INSTRUCTION_FILE;
57161
+ return name === PRIMARY_PROJECT_INSTRUCTION_FILE || name === SECONDARY_PROJECT_INSTRUCTION_FILE || name === LEGACY_PROJECT_INSTRUCTION_FILE;
57143
57162
  }
57144
- var PRIMARY_PROJECT_INSTRUCTION_FILE = "AGENTS.md", FALLBACK_PROJECT_INSTRUCTION_FILE = "CLAUDE.md";
57163
+ var PRIMARY_PROJECT_INSTRUCTION_FILE = "STRATAGEM.md", SECONDARY_PROJECT_INSTRUCTION_FILE = "AGENTS.md", LEGACY_PROJECT_INSTRUCTION_FILE = "CLAUDE.md";
57145
57164
  var init_projectInstructions = () => {};
57146
57165
 
57147
57166
  // src/utils/configConstants.ts
@@ -58006,11 +58025,34 @@ function recordFirstStartTime() {
58006
58025
  }
58007
58026
  function getMemoryPath(memoryType) {
58008
58027
  const cwd2 = getOriginalCwd();
58028
+ const fs2 = getFsImplementation();
58009
58029
  switch (memoryType) {
58010
- case "User":
58011
- return join27(getClaudeConfigHomeDir(), "CLAUDE.md");
58012
- case "Local":
58013
- return join27(cwd2, "CLAUDE.local.md");
58030
+ case "User": {
58031
+ const stratagemPath = join27(getClaudeConfigHomeDir(), "STRATAGEM.md");
58032
+ const claudePath = join27(getClaudeConfigHomeDir(), "CLAUDE.md");
58033
+ try {
58034
+ if (fs2.statSync(stratagemPath))
58035
+ return stratagemPath;
58036
+ } catch {}
58037
+ try {
58038
+ if (fs2.statSync(claudePath))
58039
+ return claudePath;
58040
+ } catch {}
58041
+ return stratagemPath;
58042
+ }
58043
+ case "Local": {
58044
+ const stratagemPath = join27(cwd2, "STRATAGEM.local.md");
58045
+ const claudePath = join27(cwd2, "CLAUDE.local.md");
58046
+ try {
58047
+ if (fs2.statSync(stratagemPath))
58048
+ return stratagemPath;
58049
+ } catch {}
58050
+ try {
58051
+ if (fs2.statSync(claudePath))
58052
+ return claudePath;
58053
+ } catch {}
58054
+ return stratagemPath;
58055
+ }
58014
58056
  case "Project":
58015
58057
  return join27(cwd2, PRIMARY_PROJECT_INSTRUCTION_FILE);
58016
58058
  case "Managed":
@@ -169955,10 +169997,10 @@ async function shouldShowClaudeMdExternalIncludesWarning() {
169955
169997
  }
169956
169998
  function isMemoryFilePath(filePath) {
169957
169999
  const name = basename9(filePath);
169958
- if (isProjectInstructionFileName(name) || name === "CLAUDE.local.md") {
170000
+ if (isProjectInstructionFileName(name) || name === "STRATAGEM.local.md" || name === "CLAUDE.local.md") {
169959
170001
  return true;
169960
170002
  }
169961
- if (name.endsWith(".md") && filePath.includes(`${sep9}.claude${sep9}rules${sep9}`)) {
170003
+ if (name.endsWith(".md") && (filePath.includes(`${sep9}.stratagem${sep9}rules${sep9}`) || filePath.includes(`${sep9}.claude${sep9}rules${sep9}`))) {
169962
170004
  return true;
169963
170005
  }
169964
170006
  return false;
@@ -170189,8 +170231,18 @@ var init_claudemd = __esm(() => {
170189
170231
  if (isSettingSourceEnabled("projectSettings") && !skipProject) {
170190
170232
  const projectPath = getProjectInstructionFilePath(dir, getFsImplementation().existsSync);
170191
170233
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
170234
+ const dotStratagemPath = join40(dir, ".stratagem", "STRATAGEM.md");
170235
+ result.push(...await processMemoryFile(dotStratagemPath, "Project", processedPaths, includeExternal));
170192
170236
  const dotClaudePath = join40(dir, ".claude", "CLAUDE.md");
170193
170237
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
170238
+ const stratagemRulesDir = join40(dir, ".stratagem", "rules");
170239
+ result.push(...await processMdRules({
170240
+ rulesDir: stratagemRulesDir,
170241
+ type: "Project",
170242
+ processedPaths,
170243
+ includeExternal,
170244
+ conditionalRule: false
170245
+ }));
170194
170246
  const rulesDir = join40(dir, ".claude", "rules");
170195
170247
  result.push(...await processMdRules({
170196
170248
  rulesDir,
@@ -170201,6 +170253,8 @@ var init_claudemd = __esm(() => {
170201
170253
  }));
170202
170254
  }
170203
170255
  if (isSettingSourceEnabled("localSettings")) {
170256
+ const stratagemLocalPath = join40(dir, "STRATAGEM.local.md");
170257
+ result.push(...await processMemoryFile(stratagemLocalPath, "Local", processedPaths, includeExternal));
170204
170258
  const localPath = join40(dir, "CLAUDE.local.md");
170205
170259
  result.push(...await processMemoryFile(localPath, "Local", processedPaths, includeExternal));
170206
170260
  }
@@ -170210,8 +170264,18 @@ var init_claudemd = __esm(() => {
170210
170264
  for (const dir of additionalDirs) {
170211
170265
  const projectPath = getProjectInstructionFilePath(dir, getFsImplementation().existsSync);
170212
170266
  result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
170267
+ const dotStratagemPath = join40(dir, ".stratagem", "STRATAGEM.md");
170268
+ result.push(...await processMemoryFile(dotStratagemPath, "Project", processedPaths, includeExternal));
170213
170269
  const dotClaudePath = join40(dir, ".claude", "CLAUDE.md");
170214
170270
  result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
170271
+ const stratagemRulesDir = join40(dir, ".stratagem", "rules");
170272
+ result.push(...await processMdRules({
170273
+ rulesDir: stratagemRulesDir,
170274
+ type: "Project",
170275
+ processedPaths,
170276
+ includeExternal,
170277
+ conditionalRule: false
170278
+ }));
170215
170279
  const rulesDir = join40(dir, ".claude", "rules");
170216
170280
  result.push(...await processMdRules({
170217
170281
  rulesDir,
@@ -382988,7 +383052,7 @@ function getAnthropicEnvMetadata() {
382988
383052
  function getBuildAgeMinutes() {
382989
383053
  if (false)
382990
383054
  ;
382991
- const buildTime = new Date("2026-04-29T03:43:04.326Z").getTime();
383055
+ const buildTime = new Date("2026-04-29T07:32:36.984Z").getTime();
382992
383056
  if (isNaN(buildTime))
382993
383057
  return;
382994
383058
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -410165,7 +410229,7 @@ function buildPrimarySection() {
410165
410229
  }, undefined, false, undefined, this);
410166
410230
  return [{
410167
410231
  label: "Version",
410168
- value: "0.3.24"
410232
+ value: "0.3.26"
410169
410233
  }, {
410170
410234
  label: "Session name",
410171
410235
  value: nameValue
@@ -449821,7 +449885,7 @@ function getStartupLines(termWidth) {
449821
449885
  const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
449822
449886
  out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
449823
449887
  out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
449824
- out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.24"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449888
+ out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.26"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
449825
449889
  out.push("");
449826
449890
  return out;
449827
449891
  }
@@ -478410,7 +478474,7 @@ var init_bridge_kick = __esm(() => {
478410
478474
  var call60 = async () => {
478411
478475
  return {
478412
478476
  type: "text",
478413
- value: `${"99.0.0"} (built ${"2026-04-29T03:43:04.326Z"})`
478477
+ value: `${"99.0.0"} (built ${"2026-04-29T07:32:36.984Z"})`
478414
478478
  };
478415
478479
  }, version2, version_default;
478416
478480
  var init_version = __esm(() => {
@@ -553842,7 +553906,7 @@ function WelcomeV2() {
553842
553906
  dimColor: true,
553843
553907
  children: [
553844
553908
  "v",
553845
- "0.3.24",
553909
+ "0.3.26",
553846
553910
  " "
553847
553911
  ]
553848
553912
  }, undefined, true, undefined, this)
@@ -573859,7 +573923,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
573859
573923
  pendingHookMessages
573860
573924
  }, renderAndRun);
573861
573925
  }
573862
- }).version("0.3.24 (STRATAGEM X7)", "-v, --version", "Output the version number");
573926
+ }).version("0.3.26 (STRATAGEM X7)", "-v, --version", "Output the version number");
573863
573927
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
573864
573928
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
573865
573929
  if (canUserConfigureAdvisor()) {
@@ -574387,7 +574451,7 @@ if (false) {}
574387
574451
  async function main2() {
574388
574452
  const args = process.argv.slice(2);
574389
574453
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
574390
- console.log(`${"0.3.24"} (STRATAGEM X7)`);
574454
+ console.log(`${"0.3.26"} (STRATAGEM X7)`);
574391
574455
  return;
574392
574456
  }
574393
574457
  if (args.includes("--provider")) {
@@ -574509,4 +574573,4 @@ async function main2() {
574509
574573
  }
574510
574574
  main2();
574511
574575
 
574512
- //# debugId=F5D81AF49661736F64756E2164756E21
574576
+ //# debugId=CAA1924C2E815EAF64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stratagem-x7",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "description": "STRATAGEM X7 is a cyberpunk coding-agent CLI for cloud and local model providers",
5
5
  "type": "module",
6
6
  "bin": {