maxsimcli 3.6.0 → 3.7.0
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/.tsbuildinfo +1 -1
- package/dist/assets/CHANGELOG.md +21 -0
- package/dist/assets/templates/commands/maxsim/init-existing.md +42 -0
- package/dist/assets/templates/workflows/init-existing.md +1099 -0
- package/dist/cli.cjs +52 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +24 -2
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +61 -0
- package/dist/core/init.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -15453,6 +15453,56 @@ function cmdInitMapCodebase(cwd, raw) {
|
|
|
15453
15453
|
codebase_dir_exists: pathExistsInternal(cwd, ".planning/codebase")
|
|
15454
15454
|
}, raw);
|
|
15455
15455
|
}
|
|
15456
|
+
function cmdInitExisting(cwd, raw) {
|
|
15457
|
+
const config = loadConfig(cwd);
|
|
15458
|
+
const homedir = node_os.default.homedir();
|
|
15459
|
+
const braveKeyFile = node_path.default.join(homedir, ".maxsim", "brave_api_key");
|
|
15460
|
+
const hasBraveSearch = !!(process.env.BRAVE_API_KEY || node_fs.default.existsSync(braveKeyFile));
|
|
15461
|
+
let hasCode = false;
|
|
15462
|
+
let hasPackageFile = false;
|
|
15463
|
+
try {
|
|
15464
|
+
hasCode = (0, node_child_process.execSync)("find . -maxdepth 3 \\( -name \"*.ts\" -o -name \"*.js\" -o -name \"*.py\" -o -name \"*.go\" -o -name \"*.rs\" -o -name \"*.swift\" -o -name \"*.java\" \\) 2>/dev/null | grep -v node_modules | grep -v .git | head -5", {
|
|
15465
|
+
cwd,
|
|
15466
|
+
encoding: "utf-8",
|
|
15467
|
+
stdio: [
|
|
15468
|
+
"pipe",
|
|
15469
|
+
"pipe",
|
|
15470
|
+
"pipe"
|
|
15471
|
+
]
|
|
15472
|
+
}).trim().length > 0;
|
|
15473
|
+
} catch (e) {
|
|
15474
|
+
if (process.env.MAXSIM_DEBUG) console.error(e);
|
|
15475
|
+
}
|
|
15476
|
+
hasPackageFile = pathExistsInternal(cwd, "package.json") || pathExistsInternal(cwd, "requirements.txt") || pathExistsInternal(cwd, "Cargo.toml") || pathExistsInternal(cwd, "go.mod") || pathExistsInternal(cwd, "Package.swift");
|
|
15477
|
+
let planningFiles = [];
|
|
15478
|
+
try {
|
|
15479
|
+
const planDir = node_path.default.join(cwd, ".planning");
|
|
15480
|
+
if (node_fs.default.existsSync(planDir)) planningFiles = node_fs.default.readdirSync(planDir, { recursive: true }).map((f) => String(f)).filter((f) => !f.startsWith("."));
|
|
15481
|
+
} catch (e) {
|
|
15482
|
+
if (process.env.MAXSIM_DEBUG) console.error(e);
|
|
15483
|
+
}
|
|
15484
|
+
output({
|
|
15485
|
+
researcher_model: resolveModelInternal(cwd, "maxsim-project-researcher"),
|
|
15486
|
+
synthesizer_model: resolveModelInternal(cwd, "maxsim-research-synthesizer"),
|
|
15487
|
+
roadmapper_model: resolveModelInternal(cwd, "maxsim-roadmapper"),
|
|
15488
|
+
mapper_model: resolveModelInternal(cwd, "maxsim-codebase-mapper"),
|
|
15489
|
+
commit_docs: config.commit_docs,
|
|
15490
|
+
project_exists: pathExistsInternal(cwd, ".planning/PROJECT.md"),
|
|
15491
|
+
planning_exists: pathExistsInternal(cwd, ".planning"),
|
|
15492
|
+
planning_files: planningFiles,
|
|
15493
|
+
has_codebase_map: pathExistsInternal(cwd, ".planning/codebase"),
|
|
15494
|
+
has_existing_code: hasCode,
|
|
15495
|
+
has_package_file: hasPackageFile,
|
|
15496
|
+
has_git: pathExistsInternal(cwd, ".git"),
|
|
15497
|
+
has_readme: pathExistsInternal(cwd, "README.md"),
|
|
15498
|
+
conflict_detected: planningFiles.length > 0,
|
|
15499
|
+
existing_file_count: planningFiles.length,
|
|
15500
|
+
brave_search_available: hasBraveSearch,
|
|
15501
|
+
parallelization: config.parallelization,
|
|
15502
|
+
project_path: ".planning/PROJECT.md",
|
|
15503
|
+
codebase_dir: ".planning/codebase"
|
|
15504
|
+
}, raw);
|
|
15505
|
+
}
|
|
15456
15506
|
function cmdInitProgress(cwd, raw) {
|
|
15457
15507
|
const config = loadConfig(cwd);
|
|
15458
15508
|
const milestone = getMilestoneInfo(cwd);
|
|
@@ -15712,10 +15762,11 @@ const handleInit = (args, cwd, raw) => {
|
|
|
15712
15762
|
"todos": () => cmdInitTodos(cwd, args[2], raw),
|
|
15713
15763
|
"milestone-op": () => cmdInitMilestoneOp(cwd, raw),
|
|
15714
15764
|
"map-codebase": () => cmdInitMapCodebase(cwd, raw),
|
|
15765
|
+
"init-existing": () => cmdInitExisting(cwd, raw),
|
|
15715
15766
|
"progress": () => cmdInitProgress(cwd, raw)
|
|
15716
15767
|
}[workflow] : void 0;
|
|
15717
15768
|
if (handler) return handler();
|
|
15718
|
-
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress`);
|
|
15769
|
+
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, init-existing, progress`);
|
|
15719
15770
|
};
|
|
15720
15771
|
const COMMANDS = {
|
|
15721
15772
|
"state": handleState,
|