stratagem-x7 0.3.25 → 0.3.27
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 +70 -20
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -57129,12 +57129,17 @@ import { dirname as dirname11, join as join25 } from "path";
|
|
|
57129
57129
|
function getProjectInstructionFilePaths(dir) {
|
|
57130
57130
|
return [
|
|
57131
57131
|
join25(dir, PRIMARY_PROJECT_INSTRUCTION_FILE),
|
|
57132
|
-
join25(dir,
|
|
57132
|
+
join25(dir, SECONDARY_PROJECT_INSTRUCTION_FILE),
|
|
57133
|
+
join25(dir, LEGACY_PROJECT_INSTRUCTION_FILE)
|
|
57133
57134
|
];
|
|
57134
57135
|
}
|
|
57135
57136
|
function getProjectInstructionFilePath(dir, existsSync7) {
|
|
57136
|
-
const
|
|
57137
|
-
|
|
57137
|
+
const paths2 = getProjectInstructionFilePaths(dir);
|
|
57138
|
+
for (const p of paths2) {
|
|
57139
|
+
if (existsSync7(p))
|
|
57140
|
+
return p;
|
|
57141
|
+
}
|
|
57142
|
+
return paths2[0];
|
|
57138
57143
|
}
|
|
57139
57144
|
function hasProjectInstructionFile(dir, existsSync7) {
|
|
57140
57145
|
return getProjectInstructionFilePaths(dir).some((path10) => existsSync7(path10));
|
|
@@ -57153,9 +57158,9 @@ function findProjectInstructionFilePathInAncestors(startDir, existsSync7) {
|
|
|
57153
57158
|
}
|
|
57154
57159
|
}
|
|
57155
57160
|
function isProjectInstructionFileName(name) {
|
|
57156
|
-
return name === PRIMARY_PROJECT_INSTRUCTION_FILE || name ===
|
|
57161
|
+
return name === PRIMARY_PROJECT_INSTRUCTION_FILE || name === SECONDARY_PROJECT_INSTRUCTION_FILE || name === LEGACY_PROJECT_INSTRUCTION_FILE;
|
|
57157
57162
|
}
|
|
57158
|
-
var PRIMARY_PROJECT_INSTRUCTION_FILE = "AGENTS.md",
|
|
57163
|
+
var PRIMARY_PROJECT_INSTRUCTION_FILE = "STRATAGEM.md", SECONDARY_PROJECT_INSTRUCTION_FILE = "AGENTS.md", LEGACY_PROJECT_INSTRUCTION_FILE = "CLAUDE.md";
|
|
57159
57164
|
var init_projectInstructions = () => {};
|
|
57160
57165
|
|
|
57161
57166
|
// src/utils/configConstants.ts
|
|
@@ -58020,11 +58025,34 @@ function recordFirstStartTime() {
|
|
|
58020
58025
|
}
|
|
58021
58026
|
function getMemoryPath(memoryType) {
|
|
58022
58027
|
const cwd2 = getOriginalCwd();
|
|
58028
|
+
const fs2 = getFsImplementation();
|
|
58023
58029
|
switch (memoryType) {
|
|
58024
|
-
case "User":
|
|
58025
|
-
|
|
58026
|
-
|
|
58027
|
-
|
|
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
|
+
}
|
|
58028
58056
|
case "Project":
|
|
58029
58057
|
return join27(cwd2, PRIMARY_PROJECT_INSTRUCTION_FILE);
|
|
58030
58058
|
case "Managed":
|
|
@@ -169969,10 +169997,10 @@ async function shouldShowClaudeMdExternalIncludesWarning() {
|
|
|
169969
169997
|
}
|
|
169970
169998
|
function isMemoryFilePath(filePath) {
|
|
169971
169999
|
const name = basename9(filePath);
|
|
169972
|
-
if (isProjectInstructionFileName(name) || name === "CLAUDE.local.md") {
|
|
170000
|
+
if (isProjectInstructionFileName(name) || name === "STRATAGEM.local.md" || name === "CLAUDE.local.md") {
|
|
169973
170001
|
return true;
|
|
169974
170002
|
}
|
|
169975
|
-
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}`))) {
|
|
169976
170004
|
return true;
|
|
169977
170005
|
}
|
|
169978
170006
|
return false;
|
|
@@ -170203,8 +170231,18 @@ var init_claudemd = __esm(() => {
|
|
|
170203
170231
|
if (isSettingSourceEnabled("projectSettings") && !skipProject) {
|
|
170204
170232
|
const projectPath = getProjectInstructionFilePath(dir, getFsImplementation().existsSync);
|
|
170205
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));
|
|
170206
170236
|
const dotClaudePath = join40(dir, ".claude", "CLAUDE.md");
|
|
170207
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
|
+
}));
|
|
170208
170246
|
const rulesDir = join40(dir, ".claude", "rules");
|
|
170209
170247
|
result.push(...await processMdRules({
|
|
170210
170248
|
rulesDir,
|
|
@@ -170215,6 +170253,8 @@ var init_claudemd = __esm(() => {
|
|
|
170215
170253
|
}));
|
|
170216
170254
|
}
|
|
170217
170255
|
if (isSettingSourceEnabled("localSettings")) {
|
|
170256
|
+
const stratagemLocalPath = join40(dir, "STRATAGEM.local.md");
|
|
170257
|
+
result.push(...await processMemoryFile(stratagemLocalPath, "Local", processedPaths, includeExternal));
|
|
170218
170258
|
const localPath = join40(dir, "CLAUDE.local.md");
|
|
170219
170259
|
result.push(...await processMemoryFile(localPath, "Local", processedPaths, includeExternal));
|
|
170220
170260
|
}
|
|
@@ -170224,8 +170264,18 @@ var init_claudemd = __esm(() => {
|
|
|
170224
170264
|
for (const dir of additionalDirs) {
|
|
170225
170265
|
const projectPath = getProjectInstructionFilePath(dir, getFsImplementation().existsSync);
|
|
170226
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));
|
|
170227
170269
|
const dotClaudePath = join40(dir, ".claude", "CLAUDE.md");
|
|
170228
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
|
+
}));
|
|
170229
170279
|
const rulesDir = join40(dir, ".claude", "rules");
|
|
170230
170280
|
result.push(...await processMdRules({
|
|
170231
170281
|
rulesDir,
|
|
@@ -365420,7 +365470,7 @@ function AskUserQuestionResultMessage(t0) {
|
|
|
365420
365470
|
]
|
|
365421
365471
|
}, undefined, true, undefined, this),
|
|
365422
365472
|
/* @__PURE__ */ jsx_dev_runtime146.jsxDEV(ThemedText, {
|
|
365423
|
-
children: "User answered
|
|
365473
|
+
children: "User answered Stratagem's questions:"
|
|
365424
365474
|
}, undefined, false, undefined, this)
|
|
365425
365475
|
]
|
|
365426
365476
|
}, undefined, true, undefined, this);
|
|
@@ -383002,7 +383052,7 @@ function getAnthropicEnvMetadata() {
|
|
|
383002
383052
|
function getBuildAgeMinutes() {
|
|
383003
383053
|
if (false)
|
|
383004
383054
|
;
|
|
383005
|
-
const buildTime = new Date("2026-04-
|
|
383055
|
+
const buildTime = new Date("2026-04-30T10:18:51.852Z").getTime();
|
|
383006
383056
|
if (isNaN(buildTime))
|
|
383007
383057
|
return;
|
|
383008
383058
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -410179,7 +410229,7 @@ function buildPrimarySection() {
|
|
|
410179
410229
|
}, undefined, false, undefined, this);
|
|
410180
410230
|
return [{
|
|
410181
410231
|
label: "Version",
|
|
410182
|
-
value: "0.3.
|
|
410232
|
+
value: "0.3.27"
|
|
410183
410233
|
}, {
|
|
410184
410234
|
label: "Session name",
|
|
410185
410235
|
value: nameValue
|
|
@@ -449835,7 +449885,7 @@ function getStartupLines(termWidth) {
|
|
|
449835
449885
|
const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
|
|
449836
449886
|
out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
|
|
449837
449887
|
out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
|
|
449838
|
-
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.
|
|
449888
|
+
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.27"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
|
|
449839
449889
|
out.push("");
|
|
449840
449890
|
return out;
|
|
449841
449891
|
}
|
|
@@ -478424,7 +478474,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
478424
478474
|
var call60 = async () => {
|
|
478425
478475
|
return {
|
|
478426
478476
|
type: "text",
|
|
478427
|
-
value: `${"99.0.0"} (built ${"2026-04-
|
|
478477
|
+
value: `${"99.0.0"} (built ${"2026-04-30T10:18:51.852Z"})`
|
|
478428
478478
|
};
|
|
478429
478479
|
}, version2, version_default;
|
|
478430
478480
|
var init_version = __esm(() => {
|
|
@@ -553856,7 +553906,7 @@ function WelcomeV2() {
|
|
|
553856
553906
|
dimColor: true,
|
|
553857
553907
|
children: [
|
|
553858
553908
|
"v",
|
|
553859
|
-
"0.3.
|
|
553909
|
+
"0.3.27",
|
|
553860
553910
|
" "
|
|
553861
553911
|
]
|
|
553862
553912
|
}, undefined, true, undefined, this)
|
|
@@ -573873,7 +573923,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
573873
573923
|
pendingHookMessages
|
|
573874
573924
|
}, renderAndRun);
|
|
573875
573925
|
}
|
|
573876
|
-
}).version("0.3.
|
|
573926
|
+
}).version("0.3.27 (STRATAGEM X7)", "-v, --version", "Output the version number");
|
|
573877
573927
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
573878
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.");
|
|
573879
573929
|
if (canUserConfigureAdvisor()) {
|
|
@@ -574401,7 +574451,7 @@ if (false) {}
|
|
|
574401
574451
|
async function main2() {
|
|
574402
574452
|
const args = process.argv.slice(2);
|
|
574403
574453
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
574404
|
-
console.log(`${"0.3.
|
|
574454
|
+
console.log(`${"0.3.27"} (STRATAGEM X7)`);
|
|
574405
574455
|
return;
|
|
574406
574456
|
}
|
|
574407
574457
|
if (args.includes("--provider")) {
|
|
@@ -574523,4 +574573,4 @@ async function main2() {
|
|
|
574523
574573
|
}
|
|
574524
574574
|
main2();
|
|
574525
574575
|
|
|
574526
|
-
//# debugId=
|
|
574576
|
+
//# debugId=0517C19B3C51C48764756E2164756E21
|