@yemi33/minions 0.1.55 → 0.1.56
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/CHANGELOG.md +5 -0
- package/bin/minions.js +63 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/bin/minions.js
CHANGED
|
@@ -472,6 +472,7 @@ if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
|
472
472
|
minions spawn <agent> <prompt> Manually spawn an agent
|
|
473
473
|
minions plan <file|text> [proj] Run a plan
|
|
474
474
|
minions cleanup Clean temp files, worktrees, zombies
|
|
475
|
+
minions reset --confirm Factory reset (delete all state, keep config)
|
|
475
476
|
|
|
476
477
|
Dashboard:
|
|
477
478
|
minions dash Start web dashboard (default :7331)
|
|
@@ -500,6 +501,68 @@ if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
|
500
501
|
dashProc.unref();
|
|
501
502
|
console.log(` Dashboard started (PID: ${dashProc.pid})`);
|
|
502
503
|
console.log(' Dashboard: http://localhost:7331\n');
|
|
504
|
+
} else if (cmd === 'reset') {
|
|
505
|
+
ensureInstalled();
|
|
506
|
+
if (!rest.includes('--confirm')) {
|
|
507
|
+
console.log(`
|
|
508
|
+
This will DELETE all runtime state:
|
|
509
|
+
- Work items, dispatch queue, PRDs, plans
|
|
510
|
+
- Agent history, sessions, output logs
|
|
511
|
+
- Notes, knowledge base, pinned notes
|
|
512
|
+
- Metrics, cooldowns, schedules
|
|
513
|
+
|
|
514
|
+
Config.json and agent charters are PRESERVED.
|
|
515
|
+
|
|
516
|
+
Run: minions reset --confirm
|
|
517
|
+
`);
|
|
518
|
+
process.exit(0);
|
|
519
|
+
}
|
|
520
|
+
// Stop engine + dashboard
|
|
521
|
+
try { execSync(`node "${path.join(MINIONS_HOME, 'engine.js')}" stop`, { stdio: 'ignore', cwd: MINIONS_HOME }); } catch {}
|
|
522
|
+
const glob = (dir, pattern) => { try { return fs.readdirSync(dir).filter(f => pattern.test(f)).map(f => path.join(dir, f)); } catch { return []; } };
|
|
523
|
+
const rm = (f) => { try { fs.unlinkSync(f); } catch {} };
|
|
524
|
+
const rmDir = (d) => { try { fs.rmSync(d, { recursive: true, force: true }); } catch {} };
|
|
525
|
+
const engineDir = path.join(MINIONS_HOME, 'engine');
|
|
526
|
+
// Engine state
|
|
527
|
+
for (const f of ['dispatch.json', 'control.json', 'log.json', 'metrics.json', 'cooldowns.json', 'schedule-runs.json', 'kb-checkpoint.json', 'cc-session.json', 'doc-sessions.json']) rm(path.join(engineDir, f));
|
|
528
|
+
glob(engineDir, /^pid-.*\.pid$/).forEach(rm);
|
|
529
|
+
rmDir(path.join(engineDir, 'tmp'));
|
|
530
|
+
// Work items + PRs
|
|
531
|
+
rm(path.join(MINIONS_HOME, 'work-items.json'));
|
|
532
|
+
rm(path.join(MINIONS_HOME, 'work-items-archive.json'));
|
|
533
|
+
rm(path.join(MINIONS_HOME, 'pull-requests.json'));
|
|
534
|
+
// Plans + PRDs
|
|
535
|
+
glob(path.join(MINIONS_HOME, 'plans'), /\.md$/).forEach(rm);
|
|
536
|
+
glob(path.join(MINIONS_HOME, 'prd'), /\.json$/).forEach(rm);
|
|
537
|
+
rmDir(path.join(MINIONS_HOME, 'prd', 'archive'));
|
|
538
|
+
rmDir(path.join(MINIONS_HOME, 'prd', 'guides'));
|
|
539
|
+
// Notes + KB
|
|
540
|
+
rm(path.join(MINIONS_HOME, 'notes.md'));
|
|
541
|
+
rm(path.join(MINIONS_HOME, 'pinned.md'));
|
|
542
|
+
rmDir(path.join(MINIONS_HOME, 'notes', 'inbox'));
|
|
543
|
+
rmDir(path.join(MINIONS_HOME, 'notes', 'archive'));
|
|
544
|
+
fs.mkdirSync(path.join(MINIONS_HOME, 'notes', 'inbox'), { recursive: true });
|
|
545
|
+
fs.mkdirSync(path.join(MINIONS_HOME, 'notes', 'archive'), { recursive: true });
|
|
546
|
+
for (const cat of ['architecture', 'conventions', 'project-notes', 'build-reports', 'reviews']) {
|
|
547
|
+
const catDir = path.join(MINIONS_HOME, 'knowledge', cat);
|
|
548
|
+
glob(catDir, /\.md$/).forEach(rm);
|
|
549
|
+
}
|
|
550
|
+
// Agent state (preserve charters)
|
|
551
|
+
const agentsDir = path.join(MINIONS_HOME, 'agents');
|
|
552
|
+
try {
|
|
553
|
+
for (const agent of fs.readdirSync(agentsDir)) {
|
|
554
|
+
const agentDir = path.join(agentsDir, agent);
|
|
555
|
+
if (!fs.statSync(agentDir).isDirectory()) continue;
|
|
556
|
+
for (const f of ['live-output.log', 'session.json', 'history.md', 'steer.md', 'status.json']) rm(path.join(agentDir, f));
|
|
557
|
+
glob(agentDir, /^output.*\.log$/).forEach(rm);
|
|
558
|
+
}
|
|
559
|
+
} catch {}
|
|
560
|
+
// Projects state
|
|
561
|
+
rmDir(path.join(MINIONS_HOME, 'projects'));
|
|
562
|
+
fs.mkdirSync(path.join(MINIONS_HOME, 'projects'), { recursive: true });
|
|
563
|
+
|
|
564
|
+
console.log('\n Reset complete. Config and charters preserved.');
|
|
565
|
+
console.log(' Run: minions up\n');
|
|
503
566
|
} else if (cmd === 'doctor') {
|
|
504
567
|
ensureInstalled();
|
|
505
568
|
const { doctor } = require(path.join(MINIONS_HOME, 'engine', 'preflight'));
|
package/package.json
CHANGED