monomind 1.10.57 → 1.11.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/.claude/agents/core/coordinator.md +71 -0
- package/.claude/agents/generated/case-analyst.md +50 -0
- package/.claude/agents/generated/copy-editor.md +45 -0
- package/.claude/agents/generated/court-reporter.md +50 -0
- package/.claude/agents/generated/defender.md +51 -0
- package/.claude/agents/generated/editor-in-chief.md +45 -0
- package/.claude/agents/generated/fact-checker.md +45 -0
- package/.claude/agents/generated/judge.md +51 -0
- package/.claude/agents/generated/prosecutor.md +51 -0
- package/.claude/agents/generated/reporter.md +45 -0
- package/.claude/commands/hooks/README.md +1 -1
- package/.claude/commands/hooks/overview.md +1 -1
- package/.claude/commands/mastermind/_repeat.md +1 -1
- package/.claude/commands/mastermind/do.md +3 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/master.md +39 -6
- package/.claude/commands/mastermind/memory.md +1 -1
- package/.claude/commands/memory/memory-search.md +2 -2
- package/.claude/commands/monitoring/status.md +1 -1
- package/.claude/commands/{browse.md → monobrowse.md} +2 -2
- package/.claude/commands/sparc.md +1 -1
- package/.claude/helpers/handlers/graph-status-handler.cjs +1 -1
- package/.claude/helpers/loop-tracker.cjs +1 -1
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/skills/agent-browser-testing/SKILL.md +1 -1
- package/.claude/skills/hooks-automation/SKILL.md +0 -3
- package/.claude/skills/mastermind/build.md +1 -1
- package/.claude/skills/mastermind/code-quality-reviewer-prompt.md +60 -0
- package/.claude/skills/mastermind/content.md +1 -1
- package/.claude/skills/mastermind/createorg.md +79 -2
- package/.claude/skills/mastermind/design.md +3 -1
- package/.claude/skills/mastermind/finance.md +1 -1
- package/.claude/skills/mastermind/implementer-prompt.md +109 -0
- package/.claude/skills/mastermind/marketing.md +1 -1
- package/.claude/skills/mastermind/ops.md +1 -1
- package/.claude/skills/mastermind/plan.md +20 -2
- package/.claude/skills/mastermind/release.md +1 -1
- package/.claude/skills/mastermind/research.md +1 -1
- package/.claude/skills/mastermind/review.md +1 -1
- package/.claude/skills/mastermind/sales.md +1 -1
- package/.claude/skills/mastermind/spec-reviewer-prompt.md +63 -0
- package/.claude/skills/sparc-methodology/SKILL.md +3 -3
- package/.claude/skills/swarm-advanced/SKILL.md +1 -4
- package/.claude-plugin/README.md +1 -2
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -1
- package/README.md +18 -32
- package/package.json +1 -1
- package/packages/@monomind/cli/README.md +18 -32
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +1 -7
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +10 -6
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +59 -12
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +67 -13
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +5 -5
- package/packages/@monomind/cli/dist/src/commands/agent.js +1 -6
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/analyze.js +8 -18
- package/packages/@monomind/cli/dist/src/commands/doctor.js +53 -3
- package/packages/@monomind/cli/dist/src/commands/embeddings.js +9 -33
- package/packages/@monomind/cli/dist/src/commands/hooks.js +24 -76
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +4 -6
- package/packages/@monomind/cli/dist/src/commands/index.js +8 -15
- package/packages/@monomind/cli/dist/src/commands/init.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/issues.js +16 -11
- package/packages/@monomind/cli/dist/src/commands/memory.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/migrate.js +1 -2
- package/packages/@monomind/cli/dist/src/commands/monograph.js +18 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/backup.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/backup.js +25 -25
- package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/benchmark.js +14 -14
- package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/import.js +21 -21
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.d.ts +6 -6
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.js +22 -22
- package/packages/@monomind/cli/dist/src/commands/monovector/init.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/init.js +36 -36
- package/packages/@monomind/cli/dist/src/commands/monovector/migrate.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/migrate.js +16 -16
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.js +10 -10
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/setup.js +77 -77
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.js +34 -34
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +31 -608
- package/packages/@monomind/cli/dist/src/commands/performance.js +7 -10
- package/packages/@monomind/cli/dist/src/commands/plugins.js +3 -4
- package/packages/@monomind/cli/dist/src/commands/process.js +5 -12
- package/packages/@monomind/cli/dist/src/commands/progress.js +16 -16
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/route.js +23 -23
- package/packages/@monomind/cli/dist/src/commands/status.js +0 -3
- package/packages/@monomind/cli/dist/src/commands/swarm.js +2 -3
- package/packages/@monomind/cli/dist/src/config-adapter.js +27 -0
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.d.ts +44 -17
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/index.js +5 -5
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +10 -14
- package/packages/@monomind/cli/dist/src/init/executor.js +17 -27
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-client.js +1 -7
- package/packages/@monomind/cli/dist/src/mcp-server.js +9 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +1 -52
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +6 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.js +51 -54
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +10 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +0 -24
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +189 -480
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.d.ts +334 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1108 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +76 -34
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +29 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +14 -8
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +17 -2
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +76 -23
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +37 -39
- package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +34 -0
- package/packages/@monomind/cli/dist/src/monovector/capabilities.js +37 -0
- package/packages/@monomind/cli/dist/src/monovector/command-outcomes.d.ts +37 -0
- package/packages/@monomind/cli/dist/src/monovector/command-outcomes.js +87 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.d.ts +103 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.js +337 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.js +112 -0
- package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/monovector/index.d.ts +61 -0
- package/packages/@monomind/cli/dist/src/monovector/index.js +67 -0
- package/packages/@monomind/cli/dist/src/monovector/init-state.d.ts +35 -0
- package/packages/@monomind/cli/dist/src/monovector/init-state.js +36 -0
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.d.ts +55 -0
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.js +137 -0
- package/packages/@monomind/cli/dist/src/parser.js +3 -3
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -31
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.d.ts +26 -6
- package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +55 -30
- package/packages/@monomind/cli/dist/src/production/index.d.ts +3 -20
- package/packages/@monomind/cli/dist/src/production/index.js +3 -15
- package/packages/@monomind/cli/dist/src/production/monitoring.d.ts +54 -34
- package/packages/@monomind/cli/dist/src/production/monitoring.js +12 -14
- package/packages/@monomind/cli/dist/src/production/rate-limiter.d.ts +64 -19
- package/packages/@monomind/cli/dist/src/production/rate-limiter.js +5 -5
- package/packages/@monomind/cli/dist/src/production/retry.js +4 -2
- package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +50 -59
- package/packages/@monomind/cli/dist/src/services/claim-service.js +83 -50
- package/packages/@monomind/cli/dist/src/services/config-file-manager.js +8 -1
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +4 -0
- package/packages/@monomind/cli/dist/src/types.d.ts +13 -0
- package/packages/@monomind/cli/package.json +13 -13
- package/packages/@monomind/guidance/dist/index.d.ts +1 -1
- package/packages/@monomind/guidance/dist/index.js +1 -1
- package/packages/@monomind/guidance/package.json +1 -2
- package/scripts/build-monovector.sh +10 -0
- package/scripts/publish-monovector.sh +20 -0
- package/.claude/commands/monomind/adr.md +0 -11
- package/.claude/commands/monomind/budget.md +0 -7
- package/.claude/commands/monomind/createtask.md +0 -277
- package/.claude/commands/monomind/do.md +0 -498
- package/.claude/commands/monomind/graph-status.md +0 -7
- package/.claude/commands/monomind/help.md +0 -118
- package/.claude/commands/monomind/idea.md +0 -273
- package/.claude/commands/monomind/improve.md +0 -352
- package/.claude/commands/monomind/loops.md +0 -7
- package/.claude/commands/monomind/memory.md +0 -230
- package/.claude/commands/monomind/repeat.md +0 -257
- package/.claude/commands/monomind/review.md +0 -317
- package/.claude/commands/monomind/specialagents.md +0 -125
- package/.claude/commands/monomind/swarm.md +0 -161
- package/.claude/commands/monomind/understand.md +0 -139
- package/.claude/commands/training/README.md +0 -39
- package/.claude/commands/training/neural-patterns.md +0 -73
- package/.claude/commands/training/neural-train.md +0 -79
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.js +0 -238
- package/packages/@monomind/cli/dist/src/commands/appliance.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/appliance.js +0 -406
- package/packages/@monomind/cli/dist/src/commands/ruvector/backup.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/benchmark.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/import.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/ruvector/init.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/migrate.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/setup.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.d.ts +0 -182
- package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.js +0 -316
- package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.d.ts +0 -67
- package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.js +0 -277
- package/packages/@monomind/cli/dist/src/ruvector/coverage-router.d.ts +0 -160
- package/packages/@monomind/cli/dist/src/ruvector/coverage-router.js +0 -539
- package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.js +0 -157
- package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
- package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.js +0 -551
- package/packages/@monomind/cli/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/packages/@monomind/cli/dist/src/ruvector/flash-attention.js +0 -643
- package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.d.ts +0 -187
- package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.js +0 -929
- package/packages/@monomind/cli/dist/src/ruvector/index.d.ts +0 -67
- package/packages/@monomind/cli/dist/src/ruvector/index.js +0 -88
- package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.d.ts +0 -218
- package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.js +0 -455
- package/packages/@monomind/cli/dist/src/ruvector/model-router.d.ts +0 -222
- package/packages/@monomind/cli/dist/src/ruvector/model-router.js +0 -512
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.d.ts +0 -213
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.js +0 -649
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.d.ts +0 -217
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.js +0 -712
- package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.d.ts +0 -179
- package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.js +0 -363
- package/packages/@monomind/cli/dist/src/ruvector/semantic-router.d.ts +0 -77
- package/packages/@monomind/cli/dist/src/ruvector/semantic-router.js +0 -178
- package/packages/@monomind/cli/dist/src/ruvector/vector-db.d.ts +0 -69
- package/packages/@monomind/cli/dist/src/ruvector/vector-db.js +0 -243
- package/packages/@monomind/cli/dist/src/services/ruvector-training.d.ts +0 -222
- package/packages/@monomind/cli/dist/src/services/ruvector-training.js +0 -696
- /package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.js +0 -0
|
@@ -1128,7 +1128,6 @@ const metricsCommand = {
|
|
|
1128
1128
|
output.writeln();
|
|
1129
1129
|
output.writeln(output.bold('🚀 v1 Performance Gains'));
|
|
1130
1130
|
output.printList([
|
|
1131
|
-
`Flash Attention: ${output.success(p.flashAttention ?? 'N/A')}`,
|
|
1132
1131
|
`Memory Reduction: ${output.success(p.memoryReduction ?? 'N/A')}`,
|
|
1133
1132
|
`Search Improvement: ${output.success(p.searchImprovement ?? 'N/A')}`,
|
|
1134
1133
|
`Token Reduction: ${output.success(p.tokenReduction ?? 'N/A')}`
|
|
@@ -1425,53 +1424,7 @@ const preTaskCommand = {
|
|
|
1425
1424
|
output.writeln(output.bold('Recommendations'));
|
|
1426
1425
|
output.printList(result.recommendations);
|
|
1427
1426
|
}
|
|
1428
|
-
// Enhanced model routing
|
|
1429
|
-
try {
|
|
1430
|
-
const { getEnhancedModelRouter } = await import('../ruvector/enhanced-model-router.js');
|
|
1431
|
-
const router = getEnhancedModelRouter();
|
|
1432
|
-
const routeResult = await router.route(description, { filePath: ctx.flags.file });
|
|
1433
|
-
output.writeln();
|
|
1434
|
-
output.writeln(output.bold('Intelligent Model Routing'));
|
|
1435
|
-
if (routeResult.tier === 1) {
|
|
1436
|
-
// Agent Booster can handle this task - skip LLM entirely
|
|
1437
|
-
output.writeln(output.success(` Tier 1: Agent Booster (WASM)`));
|
|
1438
|
-
output.writeln(output.dim(` Intent: ${routeResult.agentBoosterIntent?.type}`));
|
|
1439
|
-
output.writeln(output.dim(` Latency: <1ms | Cost: $0`));
|
|
1440
|
-
output.writeln();
|
|
1441
|
-
output.writeln(output.dim('─'.repeat(60)));
|
|
1442
|
-
output.writeln(output.bold(output.success(`[AGENT_BOOSTER_AVAILABLE] Skip LLM - use Agent Booster for "${routeResult.agentBoosterIntent?.type}"`)));
|
|
1443
|
-
output.writeln(output.dim(`Confidence: ${(routeResult.confidence * 100).toFixed(0)}% | Intent: ${routeResult.agentBoosterIntent?.description}`));
|
|
1444
|
-
output.writeln(output.dim('─'.repeat(60)));
|
|
1445
|
-
}
|
|
1446
|
-
else {
|
|
1447
|
-
// LLM required - show tier and model recommendation
|
|
1448
|
-
output.writeln(` Tier ${routeResult.tier}: ${routeResult.handler.toUpperCase()}`);
|
|
1449
|
-
output.writeln(output.dim(` Complexity: ${((routeResult.complexity || 0) * 100).toFixed(0)}%`));
|
|
1450
|
-
output.writeln(output.dim(` Est. Latency: ${routeResult.estimatedLatencyMs}ms | Cost: $${routeResult.estimatedCost.toFixed(4)}`));
|
|
1451
|
-
output.writeln();
|
|
1452
|
-
// Clear instruction for Claude
|
|
1453
|
-
output.writeln(output.dim('─'.repeat(60)));
|
|
1454
|
-
output.writeln(output.bold(output.success(`[TASK_MODEL_RECOMMENDATION] Use model="${routeResult.model}" for this task`)));
|
|
1455
|
-
output.writeln(output.dim(`Complexity: ${((routeResult.complexity || 0) * 100).toFixed(0)}% | Confidence: ${(routeResult.confidence * 100).toFixed(0)}%`));
|
|
1456
|
-
output.writeln(output.dim('─'.repeat(60)));
|
|
1457
|
-
}
|
|
1458
|
-
// Add routing result for programmatic use
|
|
1459
|
-
result.routeResult = routeResult;
|
|
1460
|
-
result.recommendedModel = routeResult.model;
|
|
1461
|
-
result.modelRouting = {
|
|
1462
|
-
tier: routeResult.tier,
|
|
1463
|
-
handler: routeResult.handler,
|
|
1464
|
-
model: routeResult.model,
|
|
1465
|
-
confidence: routeResult.confidence,
|
|
1466
|
-
complexity: routeResult.complexity,
|
|
1467
|
-
reasoning: routeResult.reasoning,
|
|
1468
|
-
canSkipLLM: routeResult.canSkipLLM,
|
|
1469
|
-
agentBoosterIntent: routeResult.agentBoosterIntent
|
|
1470
|
-
};
|
|
1471
|
-
}
|
|
1472
|
-
catch {
|
|
1473
|
-
// Enhanced router not available, skip recommendation
|
|
1474
|
-
}
|
|
1427
|
+
// Enhanced model routing module was never shipped — no recommendation to add.
|
|
1475
1428
|
return { success: true, data: result };
|
|
1476
1429
|
}
|
|
1477
1430
|
catch (error) {
|
|
@@ -1711,10 +1664,10 @@ const sessionRestoreCommand = {
|
|
|
1711
1664
|
}
|
|
1712
1665
|
}
|
|
1713
1666
|
};
|
|
1714
|
-
// Intelligence subcommand (
|
|
1667
|
+
// Intelligence subcommand (JS pattern/trajectory logging)
|
|
1715
1668
|
const intelligenceCommand = {
|
|
1716
1669
|
name: 'intelligence',
|
|
1717
|
-
description: '
|
|
1670
|
+
description: 'JS pattern/trajectory logging (stats, pattern-*, trajectory-*)',
|
|
1718
1671
|
options: [
|
|
1719
1672
|
{
|
|
1720
1673
|
name: 'mode',
|
|
@@ -1786,7 +1739,7 @@ const intelligenceCommand = {
|
|
|
1786
1739
|
const enableHnsw = ctx.flags['enable-hnsw'] ?? true;
|
|
1787
1740
|
const embeddingProvider = ctx.flags['embedding-provider'] || 'transformers';
|
|
1788
1741
|
output.writeln();
|
|
1789
|
-
output.writeln(output.bold('
|
|
1742
|
+
output.writeln(output.bold('Intelligence System'));
|
|
1790
1743
|
output.writeln();
|
|
1791
1744
|
if (reset) {
|
|
1792
1745
|
const confirmed = await confirm({
|
|
@@ -1893,7 +1846,7 @@ const intelligenceCommand = {
|
|
|
1893
1846
|
enabled: enableHnsw,
|
|
1894
1847
|
status: String(mcpHnsw?.status ?? (localStats.reasoningBankSize > 0 ? 'active' : 'idle')),
|
|
1895
1848
|
indexSize: Math.max(localStats.reasoningBankSize, Number(mcpHnsw?.indexSize ?? 0)),
|
|
1896
|
-
searchSpeedup: String(mcpHnsw?.searchSpeedup ?? (localStats.reasoningBankSize > 0 ? '
|
|
1849
|
+
searchSpeedup: String(mcpHnsw?.searchSpeedup ?? (localStats.reasoningBankSize > 0 ? 'pure-JS HNSW' : 'N/A')),
|
|
1897
1850
|
memoryUsage: String(mcpHnsw?.memoryUsage ?? (patternsFileSize > 0 ? `${(patternsFileSize / 1024).toFixed(1)} KB` : 'N/A')),
|
|
1898
1851
|
dimension: Number(mcpHnsw?.dimension ?? 384),
|
|
1899
1852
|
},
|
|
@@ -1910,9 +1863,8 @@ const intelligenceCommand = {
|
|
|
1910
1863
|
},
|
|
1911
1864
|
},
|
|
1912
1865
|
performance: mcpPerf ?? {
|
|
1913
|
-
flashAttention: 'N/A',
|
|
1914
1866
|
memoryReduction: patternsFileSize > 0 ? `${(patternsFileSize / 1024).toFixed(1)} KB on disk` : 'N/A',
|
|
1915
|
-
searchImprovement: localStats.reasoningBankSize > 0 ? '
|
|
1867
|
+
searchImprovement: localStats.reasoningBankSize > 0 ? 'pure-JS HNSW' : 'N/A',
|
|
1916
1868
|
tokenReduction: 'N/A',
|
|
1917
1869
|
sweBenchScore: 'N/A',
|
|
1918
1870
|
},
|
|
@@ -2007,7 +1959,7 @@ const intelligenceCommand = {
|
|
|
2007
1959
|
}
|
|
2008
1960
|
// HNSW Component
|
|
2009
1961
|
output.writeln();
|
|
2010
|
-
output.writeln(output.bold('HNSW (
|
|
1962
|
+
output.writeln(output.bold('HNSW (Pure-JS Vector Search)'));
|
|
2011
1963
|
const hnsw = result.components.hnsw;
|
|
2012
1964
|
if (hnsw.enabled) {
|
|
2013
1965
|
output.printTable({
|
|
@@ -2058,7 +2010,7 @@ const intelligenceCommand = {
|
|
|
2058
2010
|
]);
|
|
2059
2011
|
if (!persistence.patternsExist && !persistence.statsExist) {
|
|
2060
2012
|
output.writeln();
|
|
2061
|
-
output.writeln(output.dim(' No
|
|
2013
|
+
output.writeln(output.dim(' No pattern data yet. Patterns accrue as hooks run.'));
|
|
2062
2014
|
}
|
|
2063
2015
|
}
|
|
2064
2016
|
// Performance
|
|
@@ -2067,7 +2019,6 @@ const intelligenceCommand = {
|
|
|
2067
2019
|
output.writeln();
|
|
2068
2020
|
output.writeln(output.bold('v1 Performance Gains'));
|
|
2069
2021
|
output.printList([
|
|
2070
|
-
`Flash Attention: ${output.success(String(perf.flashAttention ?? 'N/A'))}`,
|
|
2071
2022
|
`Memory Reduction: ${output.success(String(perf.memoryReduction ?? 'N/A'))}`,
|
|
2072
2023
|
`Search Improvement: ${output.success(String(perf.searchImprovement ?? 'N/A'))}`,
|
|
2073
2024
|
`Token Reduction: ${output.success(String(perf.tokenReduction ?? 'N/A'))}`,
|
|
@@ -2462,7 +2413,7 @@ function formatWorkerStatus(status) {
|
|
|
2462
2413
|
// Coverage route subcommand
|
|
2463
2414
|
const coverageRouteCommand = {
|
|
2464
2415
|
name: 'coverage-route',
|
|
2465
|
-
description: 'Route task to agents based on test coverage gaps (
|
|
2416
|
+
description: 'Route task to agents based on test coverage gaps (monovector integration)',
|
|
2466
2417
|
options: [
|
|
2467
2418
|
{
|
|
2468
2419
|
name: 'task',
|
|
@@ -2478,8 +2429,8 @@ const coverageRouteCommand = {
|
|
|
2478
2429
|
default: 80
|
|
2479
2430
|
},
|
|
2480
2431
|
{
|
|
2481
|
-
name: 'no-
|
|
2482
|
-
description: 'Disable
|
|
2432
|
+
name: 'no-monovector',
|
|
2433
|
+
description: 'Disable monovector integration',
|
|
2483
2434
|
type: 'boolean',
|
|
2484
2435
|
default: false
|
|
2485
2436
|
}
|
|
@@ -2491,7 +2442,7 @@ const coverageRouteCommand = {
|
|
|
2491
2442
|
action: async (ctx) => {
|
|
2492
2443
|
const task = ctx.args[0] || ctx.flags.task;
|
|
2493
2444
|
const threshold = ctx.flags.threshold || 80;
|
|
2494
|
-
const
|
|
2445
|
+
const useMonovector = !ctx.flags['no-monovector'];
|
|
2495
2446
|
if (!task) {
|
|
2496
2447
|
output.printError('Task description is required. Use --task or -t flag.');
|
|
2497
2448
|
return { success: false, exitCode: 1 };
|
|
@@ -2614,7 +2565,7 @@ const coverageRouteCommand = {
|
|
|
2614
2565
|
const result = await callMCPTool('hooks_coverage-route', {
|
|
2615
2566
|
task,
|
|
2616
2567
|
threshold,
|
|
2617
|
-
|
|
2568
|
+
useMonovector,
|
|
2618
2569
|
});
|
|
2619
2570
|
spinner.stop();
|
|
2620
2571
|
if (ctx.flags.format === 'json') {
|
|
@@ -2681,7 +2632,7 @@ const coverageRouteCommand = {
|
|
|
2681
2632
|
// Coverage suggest subcommand
|
|
2682
2633
|
const coverageSuggestCommand = {
|
|
2683
2634
|
name: 'coverage-suggest',
|
|
2684
|
-
description: 'Suggest coverage improvements for a path (
|
|
2635
|
+
description: 'Suggest coverage improvements for a path (monovector integration)',
|
|
2685
2636
|
options: [
|
|
2686
2637
|
{
|
|
2687
2638
|
name: 'path',
|
|
@@ -2761,7 +2712,7 @@ const coverageSuggestCommand = {
|
|
|
2761
2712
|
filesBelowThreshold: belowThreshold.length,
|
|
2762
2713
|
},
|
|
2763
2714
|
prioritizedFiles,
|
|
2764
|
-
|
|
2715
|
+
monovectorAvailable: false,
|
|
2765
2716
|
source: diskCoverage.source,
|
|
2766
2717
|
};
|
|
2767
2718
|
if (ctx.flags.format === 'json') {
|
|
@@ -2823,7 +2774,7 @@ const coverageSuggestCommand = {
|
|
|
2823
2774
|
`Line Coverage: ${result.summary.overallLineCoverage.toFixed(1)}%`,
|
|
2824
2775
|
`Branch Coverage: ${result.summary.overallBranchCoverage.toFixed(1)}%`,
|
|
2825
2776
|
`Below Threshold: ${result.summary.filesBelowThreshold} files`,
|
|
2826
|
-
`
|
|
2777
|
+
`Keyword routing: ${result.monovectorAvailable ? output.success('Available') : output.dim('Unavailable')}`
|
|
2827
2778
|
].join('\n'), 'Coverage Summary');
|
|
2828
2779
|
if (result.suggestions.length > 0) {
|
|
2829
2780
|
output.writeln();
|
|
@@ -2947,7 +2898,7 @@ const coverageGapsCommand = {
|
|
|
2947
2898
|
coverageThreshold: threshold,
|
|
2948
2899
|
},
|
|
2949
2900
|
agentAssignments,
|
|
2950
|
-
|
|
2901
|
+
monovectorAvailable: false,
|
|
2951
2902
|
source: diskCoverage.source,
|
|
2952
2903
|
};
|
|
2953
2904
|
if (ctx.flags.format === 'json') {
|
|
@@ -3026,7 +2977,7 @@ const coverageGapsCommand = {
|
|
|
3026
2977
|
`Line Coverage: ${result.summary.overallLineCoverage.toFixed(1)}%`,
|
|
3027
2978
|
`Branch Coverage: ${result.summary.overallBranchCoverage.toFixed(1)}%`,
|
|
3028
2979
|
`Below ${result.summary.coverageThreshold}%: ${result.summary.filesBelowThreshold} files`,
|
|
3029
|
-
`
|
|
2980
|
+
`Keyword routing: ${result.monovectorAvailable ? output.success('Available') : output.dim('Unavailable')}`
|
|
3030
2981
|
].join('\n'), 'Coverage Gap Analysis');
|
|
3031
2982
|
if (gaps.length > 0) {
|
|
3032
2983
|
output.writeln();
|
|
@@ -3664,10 +3615,9 @@ const statuslineCommand = {
|
|
|
3664
3615
|
}
|
|
3665
3616
|
const domainsColor = progress.domainsCompleted >= 3 ? c.brightGreen : progress.domainsCompleted > 0 ? c.yellow : c.red;
|
|
3666
3617
|
// Dynamic perf indicator based on patterns/HNSW
|
|
3667
|
-
let perfIndicator = `${c.dim}⚡
|
|
3618
|
+
let perfIndicator = `${c.dim}⚡ HNSW: idle${c.reset}`;
|
|
3668
3619
|
if (agentdbStats.hasHnsw && agentdbStats.vectorCount > 0) {
|
|
3669
|
-
|
|
3670
|
-
perfIndicator = `${c.brightGreen}⚡ HNSW ${speedup}${c.reset}`;
|
|
3620
|
+
perfIndicator = `${c.brightGreen}⚡ HNSW ${agentdbStats.vectorCount.toLocaleString()} vec${c.reset}`;
|
|
3671
3621
|
}
|
|
3672
3622
|
else if (progress.patternsLearned > 0) {
|
|
3673
3623
|
const patternsK = progress.patternsLearned >= 1000 ? `${(progress.patternsLearned / 1000).toFixed(1)}k` : String(progress.patternsLearned);
|
|
@@ -4427,7 +4377,7 @@ export const hooksCommand = {
|
|
|
4427
4377
|
`${output.highlight('worker')} - Background worker management (12 workers)`,
|
|
4428
4378
|
`${output.highlight('progress')} - Check implementation progress`,
|
|
4429
4379
|
`${output.highlight('statusline')} - Generate dynamic statusline display`,
|
|
4430
|
-
`${output.highlight('coverage-route')} - Route tasks based on coverage gaps (
|
|
4380
|
+
`${output.highlight('coverage-route')} - Route tasks based on coverage gaps (monovector)`,
|
|
4431
4381
|
`${output.highlight('coverage-suggest')}- Suggest coverage improvements`,
|
|
4432
4382
|
`${output.highlight('coverage-gaps')} - List all coverage gaps with agents`,
|
|
4433
4383
|
`${output.highlight('token-optimize')} - Token optimization (30-50% savings)`,
|
|
@@ -4444,12 +4394,10 @@ export const hooksCommand = {
|
|
|
4444
4394
|
output.writeln();
|
|
4445
4395
|
output.writeln(output.bold('v1 Features:'));
|
|
4446
4396
|
output.printList([
|
|
4447
|
-
'🧠
|
|
4448
|
-
'
|
|
4449
|
-
'🔍 AgentDB integration (
|
|
4450
|
-
'📊 84.8% SWE-Bench solve rate',
|
|
4397
|
+
'🧠 Trajectory + outcome logging',
|
|
4398
|
+
'🎯 Keyword routing + route-outcome measurement',
|
|
4399
|
+
'🔍 AgentDB integration (pure-JS HNSW search)',
|
|
4451
4400
|
'🎯 32.3% token reduction',
|
|
4452
|
-
'🚀 2.8-4.4x speed improvement',
|
|
4453
4401
|
'👥 Agent Teams integration (auto task assignment)'
|
|
4454
4402
|
]);
|
|
4455
4403
|
return { success: true };
|
|
@@ -25,10 +25,9 @@ export { embeddingsCommand } from './embeddings.js';
|
|
|
25
25
|
export { neuralCommand } from './neural.js';
|
|
26
26
|
export { performanceCommand } from './performance.js';
|
|
27
27
|
export { securityCommand } from './security.js';
|
|
28
|
-
export {
|
|
28
|
+
export { monovectorCommand } from './monovector/index.js';
|
|
29
29
|
export { hiveMindCommand } from './hive-mind.js';
|
|
30
30
|
export { guidanceCommand } from './guidance.js';
|
|
31
|
-
export { applianceCommand } from './appliance.js';
|
|
32
31
|
export { cleanupCommand } from './cleanup.js';
|
|
33
32
|
export { autopilotCommand } from './autopilot.js';
|
|
34
33
|
export { monographCommand } from './monograph.js';
|
|
@@ -53,9 +52,8 @@ export declare function getAnalyzeCommand(): Promise<Command | undefined>;
|
|
|
53
52
|
export declare function getRouteCommand(): Promise<Command | undefined>;
|
|
54
53
|
export declare function getProgressCommand(): Promise<Command | undefined>;
|
|
55
54
|
export declare function getIssuesCommand(): Promise<Command | undefined>;
|
|
56
|
-
export declare function
|
|
55
|
+
export declare function getMonovectorCommand(): Promise<Command | undefined>;
|
|
57
56
|
export declare function getGuidanceCommand(): Promise<Command | undefined>;
|
|
58
|
-
export declare function getApplianceCommand(): Promise<Command | undefined>;
|
|
59
57
|
export declare function getCleanupCommand(): Promise<Command | undefined>;
|
|
60
58
|
export declare function getAutopilotCommand(): Promise<Command | undefined>;
|
|
61
59
|
export declare function getMonographCommand(): Promise<Command | undefined>;
|
|
@@ -71,8 +69,8 @@ export declare const commandsByCategory: {
|
|
|
71
69
|
primary: Command[];
|
|
72
70
|
advanced: Command[];
|
|
73
71
|
utility: Command[];
|
|
74
|
-
analysis:
|
|
75
|
-
management:
|
|
72
|
+
analysis: Command[];
|
|
73
|
+
management: Command[];
|
|
76
74
|
};
|
|
77
75
|
/**
|
|
78
76
|
* Command registry map for quick lookup
|
|
@@ -53,15 +53,12 @@ const commandLoaders = {
|
|
|
53
53
|
issues: () => import('./issues.js'),
|
|
54
54
|
// Auto-update System (ADR-025)
|
|
55
55
|
update: () => import('./update.js'),
|
|
56
|
-
//
|
|
57
|
-
|
|
56
|
+
// MonoVector PostgreSQL Bridge
|
|
57
|
+
monovector: () => import('./monovector/index.js'),
|
|
58
58
|
// Benchmark Suite (Pre-training, Neural, Memory)
|
|
59
59
|
benchmark: () => import('./benchmark.js'),
|
|
60
60
|
// Guidance Control Plane
|
|
61
61
|
guidance: () => import('./guidance.js'),
|
|
62
|
-
// RVFA Appliance Management
|
|
63
|
-
appliance: () => import('./appliance.js'),
|
|
64
|
-
'appliance-advanced': () => import('./appliance-advanced.js'),
|
|
65
62
|
'transfer-store': () => import('./transfer-store.js'),
|
|
66
63
|
cleanup: () => import('./cleanup.js'),
|
|
67
64
|
autopilot: () => import('./autopilot.js'),
|
|
@@ -121,7 +118,7 @@ import { embeddingsCommand } from './embeddings.js';
|
|
|
121
118
|
import { neuralCommand } from './neural.js';
|
|
122
119
|
import { performanceCommand } from './performance.js';
|
|
123
120
|
import { securityCommand } from './security.js';
|
|
124
|
-
import {
|
|
121
|
+
import { monovectorCommand } from './monovector/index.js';
|
|
125
122
|
import { hiveMindCommand } from './hive-mind.js';
|
|
126
123
|
// Additional commands for categorized help display
|
|
127
124
|
import { configCommand } from './config.js';
|
|
@@ -139,7 +136,6 @@ import { issuesCommand } from './issues.js';
|
|
|
139
136
|
import updateCommand from './update.js';
|
|
140
137
|
import { processCommand } from './process.js';
|
|
141
138
|
import { guidanceCommand } from './guidance.js';
|
|
142
|
-
import { applianceCommand } from './appliance.js';
|
|
143
139
|
import { cleanupCommand } from './cleanup.js';
|
|
144
140
|
import { autopilotCommand } from './autopilot.js';
|
|
145
141
|
import { monographCommand } from './monograph.js';
|
|
@@ -165,7 +161,7 @@ loadedCommands.set('embeddings', embeddingsCommand);
|
|
|
165
161
|
loadedCommands.set('neural', neuralCommand);
|
|
166
162
|
loadedCommands.set('performance', performanceCommand);
|
|
167
163
|
loadedCommands.set('security', securityCommand);
|
|
168
|
-
loadedCommands.set('
|
|
164
|
+
loadedCommands.set('monovector', monovectorCommand);
|
|
169
165
|
loadedCommands.set('hive-mind', hiveMindCommand);
|
|
170
166
|
loadedCommands.set('guidance', guidanceCommand);
|
|
171
167
|
loadedCommands.set('cleanup', cleanupCommand);
|
|
@@ -196,10 +192,9 @@ export { embeddingsCommand } from './embeddings.js';
|
|
|
196
192
|
export { neuralCommand } from './neural.js';
|
|
197
193
|
export { performanceCommand } from './performance.js';
|
|
198
194
|
export { securityCommand } from './security.js';
|
|
199
|
-
export {
|
|
195
|
+
export { monovectorCommand } from './monovector/index.js';
|
|
200
196
|
export { hiveMindCommand } from './hive-mind.js';
|
|
201
197
|
export { guidanceCommand } from './guidance.js';
|
|
202
|
-
export { applianceCommand } from './appliance.js';
|
|
203
198
|
export { cleanupCommand } from './cleanup.js';
|
|
204
199
|
export { autopilotCommand } from './autopilot.js';
|
|
205
200
|
export { monographCommand } from './monograph.js';
|
|
@@ -225,9 +220,8 @@ export async function getAnalyzeCommand() { return loadCommand('analyze'); }
|
|
|
225
220
|
export async function getRouteCommand() { return loadCommand('route'); }
|
|
226
221
|
export async function getProgressCommand() { return loadCommand('progress'); }
|
|
227
222
|
export async function getIssuesCommand() { return loadCommand('issues'); }
|
|
228
|
-
export async function
|
|
223
|
+
export async function getMonovectorCommand() { return loadCommand('monovector'); }
|
|
229
224
|
export async function getGuidanceCommand() { return loadCommand('guidance'); }
|
|
230
|
-
export async function getApplianceCommand() { return loadCommand('appliance'); }
|
|
231
225
|
export async function getCleanupCommand() { return loadCommand('cleanup'); }
|
|
232
226
|
export async function getAutopilotCommand() { return loadCommand('autopilot'); }
|
|
233
227
|
export async function getMonographCommand() { return loadCommand('monograph'); }
|
|
@@ -253,7 +247,7 @@ export const commands = [
|
|
|
253
247
|
neuralCommand,
|
|
254
248
|
performanceCommand,
|
|
255
249
|
securityCommand,
|
|
256
|
-
|
|
250
|
+
monovectorCommand,
|
|
257
251
|
hiveMindCommand,
|
|
258
252
|
guidanceCommand,
|
|
259
253
|
cleanupCommand,
|
|
@@ -283,7 +277,7 @@ export const commandsByCategory = {
|
|
|
283
277
|
performanceCommand,
|
|
284
278
|
embeddingsCommand,
|
|
285
279
|
hiveMindCommand,
|
|
286
|
-
|
|
280
|
+
monovectorCommand,
|
|
287
281
|
guidanceCommand,
|
|
288
282
|
autopilotCommand,
|
|
289
283
|
benchmarkCommand,
|
|
@@ -312,7 +306,6 @@ export const commandsByCategory = {
|
|
|
312
306
|
issuesCommand,
|
|
313
307
|
updateCommand,
|
|
314
308
|
processCommand,
|
|
315
|
-
applianceCommand,
|
|
316
309
|
storeCommand,
|
|
317
310
|
cleanupCommand,
|
|
318
311
|
platformsCommand,
|
|
@@ -265,9 +265,9 @@ const initAction = async (ctx) => {
|
|
|
265
265
|
// Recommend semantic enrichment — prominent callout, not buried tip
|
|
266
266
|
output.writeln('');
|
|
267
267
|
output.writeln(output.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
268
|
-
output.writeln(output.bold(' Run /
|
|
268
|
+
output.writeln(output.bold(' Run /mastermind:understand next'));
|
|
269
269
|
output.writeln('');
|
|
270
|
-
output.writeln(' In Claude Code, type: /
|
|
270
|
+
output.writeln(' In Claude Code, type: /mastermind:understand');
|
|
271
271
|
output.writeln('');
|
|
272
272
|
output.writeln(' This analyzes your project with an LLM and enriches the');
|
|
273
273
|
output.writeln(' knowledge graph with semantic summaries, tags, and layers.');
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { output } from '../output.js';
|
|
19
19
|
import { createClaimService } from '../services/claim-service.js';
|
|
20
|
+
function getClaimService(cwd) {
|
|
21
|
+
return createClaimService(cwd);
|
|
22
|
+
}
|
|
20
23
|
// ============================================================================
|
|
21
24
|
// Subcommands
|
|
22
25
|
// ============================================================================
|
|
@@ -41,7 +44,7 @@ const listCommand = {
|
|
|
41
44
|
},
|
|
42
45
|
],
|
|
43
46
|
action: async (ctx) => {
|
|
44
|
-
const service =
|
|
47
|
+
const service = getClaimService(ctx.cwd);
|
|
45
48
|
await service.initialize();
|
|
46
49
|
const status = ctx.flags.status;
|
|
47
50
|
const claims = status
|
|
@@ -125,7 +128,7 @@ const claimCommand = {
|
|
|
125
128
|
userId: userStr.split(':')[0],
|
|
126
129
|
name: userStr.split(':')[1] || userStr.split(':')[0],
|
|
127
130
|
};
|
|
128
|
-
const service =
|
|
131
|
+
const service = getClaimService(ctx.cwd);
|
|
129
132
|
await service.initialize();
|
|
130
133
|
const result = await service.claim(issueId, claimant);
|
|
131
134
|
if (result.success) {
|
|
@@ -184,7 +187,7 @@ const releaseCommand = {
|
|
|
184
187
|
userId: userStr.split(':')[0],
|
|
185
188
|
name: userStr.split(':')[1] || userStr.split(':')[0],
|
|
186
189
|
};
|
|
187
|
-
const service =
|
|
190
|
+
const service = getClaimService(ctx.cwd);
|
|
188
191
|
await service.initialize();
|
|
189
192
|
try {
|
|
190
193
|
await service.release(issueId, claimant);
|
|
@@ -220,7 +223,7 @@ const handoffCommand = {
|
|
|
220
223
|
output.printError('Invalid --to format. Use agent:type:id or user:id:name');
|
|
221
224
|
return { success: false, exitCode: 1 };
|
|
222
225
|
}
|
|
223
|
-
const service =
|
|
226
|
+
const service = getClaimService(ctx.cwd);
|
|
224
227
|
await service.initialize();
|
|
225
228
|
// Get current claim to find "from"
|
|
226
229
|
const claim = await service.getIssueStatus(issueId);
|
|
@@ -259,7 +262,7 @@ const statusCommand = {
|
|
|
259
262
|
output.printError('Issue ID is required');
|
|
260
263
|
return { success: false, exitCode: 1 };
|
|
261
264
|
}
|
|
262
|
-
const service =
|
|
265
|
+
const service = getClaimService(ctx.cwd);
|
|
263
266
|
await service.initialize();
|
|
264
267
|
const newStatus = ctx.flags.set;
|
|
265
268
|
const progress = ctx.flags.progress;
|
|
@@ -299,7 +302,7 @@ const stealableCommand = {
|
|
|
299
302
|
],
|
|
300
303
|
action: async (ctx) => {
|
|
301
304
|
const agentType = ctx.flags.type;
|
|
302
|
-
const service =
|
|
305
|
+
const service = getClaimService(ctx.cwd);
|
|
303
306
|
await service.initialize();
|
|
304
307
|
const stealable = await service.getStealable(agentType);
|
|
305
308
|
if (stealable.length === 0) {
|
|
@@ -339,7 +342,7 @@ const stealCommand = {
|
|
|
339
342
|
agentType: agentStr.split(':')[0],
|
|
340
343
|
agentId: agentStr.split(':')[1] || `${agentStr.split(':')[0]}-1`,
|
|
341
344
|
};
|
|
342
|
-
const service =
|
|
345
|
+
const service = getClaimService(ctx.cwd);
|
|
343
346
|
await service.initialize();
|
|
344
347
|
const result = await service.steal(issueId, stealer);
|
|
345
348
|
if (result.success) {
|
|
@@ -366,7 +369,7 @@ const loadCommand = {
|
|
|
366
369
|
],
|
|
367
370
|
action: async (ctx) => {
|
|
368
371
|
const agentId = ctx.flags.agent;
|
|
369
|
-
const service =
|
|
372
|
+
const service = getClaimService(ctx.cwd);
|
|
370
373
|
await service.initialize();
|
|
371
374
|
if (agentId) {
|
|
372
375
|
const load = await service.getAgentLoad(agentId);
|
|
@@ -416,7 +419,7 @@ const rebalanceCommand = {
|
|
|
416
419
|
],
|
|
417
420
|
action: async (ctx) => {
|
|
418
421
|
const apply = ctx.flags.apply;
|
|
419
|
-
const service =
|
|
422
|
+
const service = getClaimService(ctx.cwd);
|
|
420
423
|
await service.initialize();
|
|
421
424
|
const result = await service.rebalance('default');
|
|
422
425
|
if (result.suggested.length === 0) {
|
|
@@ -442,7 +445,7 @@ const boardCommand = {
|
|
|
442
445
|
name: 'board',
|
|
443
446
|
description: 'Visual board view of claims',
|
|
444
447
|
action: async (ctx) => {
|
|
445
|
-
const service =
|
|
448
|
+
const service = getClaimService(ctx.cwd);
|
|
446
449
|
await service.initialize();
|
|
447
450
|
const claims = await service.getAllClaims();
|
|
448
451
|
const byStatus = {
|
|
@@ -471,7 +474,9 @@ const boardCommand = {
|
|
|
471
474
|
const item = byStatus[col][i];
|
|
472
475
|
if (!item)
|
|
473
476
|
return ''.padEnd(18);
|
|
474
|
-
const owner = item.claimant.type === 'agent'
|
|
477
|
+
const owner = item.claimant.type === 'agent'
|
|
478
|
+
? item.claimant.agentType.slice(0, 6)
|
|
479
|
+
: item.claimant.name.slice(0, 6);
|
|
475
480
|
return `#${item.issueId} (${owner})`.padEnd(18);
|
|
476
481
|
});
|
|
477
482
|
output.writeln(row.join(''));
|
|
@@ -8,7 +8,7 @@ import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
|
8
8
|
import { configManager } from '../services/config-file-manager.js';
|
|
9
9
|
// Memory backends
|
|
10
10
|
const BACKENDS = [
|
|
11
|
-
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database with HNSW indexing
|
|
11
|
+
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database with pure-JS HNSW indexing' },
|
|
12
12
|
{ value: 'sqlite', label: 'SQLite', hint: 'Lightweight local storage' },
|
|
13
13
|
{ value: 'hybrid', label: 'Hybrid', hint: 'SQLite + AgentDB (recommended)' },
|
|
14
14
|
{ value: 'memory', label: 'In-Memory', hint: 'Fast but non-persistent' }
|
|
@@ -250,7 +250,7 @@ const searchCommand = {
|
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
name: 'build-hnsw',
|
|
253
|
-
description: 'Build/rebuild HNSW index before searching
|
|
253
|
+
description: 'Build/rebuild pure-JS HNSW index before searching',
|
|
254
254
|
type: 'boolean',
|
|
255
255
|
default: false
|
|
256
256
|
}
|
|
@@ -283,10 +283,10 @@ const searchCommand = {
|
|
|
283
283
|
const status = getHNSWStatus();
|
|
284
284
|
output.printSuccess(`HNSW index built (${status.entryCount} vectors, ${buildTime}ms)`);
|
|
285
285
|
output.writeln(output.dim(` Dimensions: ${status.dimensions}, Metric: cosine`));
|
|
286
|
-
output.writeln(output.dim(`
|
|
286
|
+
output.writeln(output.dim(` Complexity: O(log n) vs O(n) linear scan`));
|
|
287
287
|
}
|
|
288
288
|
else {
|
|
289
|
-
output.printWarning('HNSW index not available
|
|
289
|
+
output.printWarning('HNSW index not available');
|
|
290
290
|
}
|
|
291
291
|
output.writeln();
|
|
292
292
|
}
|
|
@@ -868,7 +868,7 @@ const statsCommand = {
|
|
|
868
868
|
]
|
|
869
869
|
});
|
|
870
870
|
output.writeln();
|
|
871
|
-
output.printInfo('v1 Performance:
|
|
871
|
+
output.printInfo('v1 Performance: O(log n) pure-JS HNSW vector search');
|
|
872
872
|
return { success: true, data: stats };
|
|
873
873
|
}
|
|
874
874
|
catch (error) {
|
|
@@ -1468,7 +1468,7 @@ const initMemoryCommand = {
|
|
|
1468
1468
|
{ table: 'memory_entries', purpose: 'Core memory storage with embeddings' },
|
|
1469
1469
|
{ table: 'patterns', purpose: 'Learned patterns with confidence scores' },
|
|
1470
1470
|
{ table: 'pattern_history', purpose: 'Pattern versioning and evolution' },
|
|
1471
|
-
{ table: 'trajectories', purpose: '
|
|
1471
|
+
{ table: 'trajectories', purpose: 'Logged execution trajectories' },
|
|
1472
1472
|
{ table: 'trajectory_steps', purpose: 'Individual trajectory steps' },
|
|
1473
1473
|
{ table: 'migration_state', purpose: 'Migration progress tracking' },
|
|
1474
1474
|
{ table: 'sessions', purpose: 'Context persistence' },
|
|
@@ -694,8 +694,7 @@ const breakingCommand = {
|
|
|
694
694
|
changes: [
|
|
695
695
|
{ change: 'Provider changed', from: 'OpenAI API / TF.js', to: 'ONNX Runtime (local)' },
|
|
696
696
|
{ change: 'Geometry support', from: 'Euclidean only', to: 'Hyperbolic (Poincaré ball)' },
|
|
697
|
-
{ change: 'Cache system', from: 'Memory-only', to: 'sql.js persistent cache' }
|
|
698
|
-
{ change: 'Neural substrate', from: 'None', to: 'RuVector integration' }
|
|
697
|
+
{ change: 'Cache system', from: 'Memory-only', to: 'sql.js persistent cache' }
|
|
699
698
|
]
|
|
700
699
|
}
|
|
701
700
|
];
|
|
@@ -104,10 +104,10 @@ const buildCommand = {
|
|
|
104
104
|
const progressLines = [];
|
|
105
105
|
try {
|
|
106
106
|
const { buildAsync } = await import('@monoes/monograph');
|
|
107
|
+
// llmMaxSections is a UI variable only; not a valid BuildOptions key in @monoes/monograph@1.1.0
|
|
107
108
|
await buildAsync(root, {
|
|
108
109
|
codeOnly,
|
|
109
110
|
force,
|
|
110
|
-
llmMaxSections,
|
|
111
111
|
onProgress: (p) => {
|
|
112
112
|
const msg = `[${p.phase}] ${p.message ?? ''}`;
|
|
113
113
|
progressLines.push(msg);
|
|
@@ -198,10 +198,10 @@ const wikiCommand = {
|
|
|
198
198
|
const progressLines = [];
|
|
199
199
|
try {
|
|
200
200
|
const { buildAsync } = await import('@monoes/monograph');
|
|
201
|
+
// llmMaxSections is a UI variable only; not a valid BuildOptions key in @monoes/monograph@1.1.0
|
|
201
202
|
await buildAsync(root, {
|
|
202
203
|
codeOnly: false,
|
|
203
204
|
force,
|
|
204
|
-
llmMaxSections,
|
|
205
205
|
onProgress: (p) => {
|
|
206
206
|
const msg = `[${p.phase}] ${p.message ?? ''}`;
|
|
207
207
|
progressLines.push(msg);
|
|
@@ -274,7 +274,11 @@ const searchCommand = {
|
|
|
274
274
|
output.writeln(output.dim(` mode: ${mode}${label ? ` label: ${label}` : ''} limit: ${limit}`));
|
|
275
275
|
output.writeln();
|
|
276
276
|
try {
|
|
277
|
-
const { openDb, closeDb, ftsSearch
|
|
277
|
+
const { openDb, closeDb, ftsSearch } = await import('@monoes/monograph');
|
|
278
|
+
// At @monoes/monograph@1.1.0, semanticSearch is not exported. Import from compat.
|
|
279
|
+
// With no embeddings at 1.1.0, --mode semantic and --mode hybrid both degrade to BM25
|
|
280
|
+
// (the RRF block merges bm25 with a sem list that is itself BM25 — harmless).
|
|
281
|
+
const { semanticSearch } = await import('../mcp-tools/monograph-compat.js');
|
|
278
282
|
const db = openDb(dbPath);
|
|
279
283
|
let results = [];
|
|
280
284
|
const K = 60;
|
|
@@ -383,19 +387,22 @@ const watchCommand = {
|
|
|
383
387
|
output.writeln(output.dim(' Press Ctrl+C to stop'));
|
|
384
388
|
output.writeln();
|
|
385
389
|
try {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
390
|
+
// watchAsync is not exported in @monoes/monograph@1.1.0.
|
|
391
|
+
// Use MonographWatcher directly, mirroring the monograph_watch MCP tool.
|
|
392
|
+
const { MonographWatcher, buildAsync } = await import('@monoes/monograph');
|
|
393
|
+
const watcher = new MonographWatcher(root);
|
|
394
|
+
watcher.on('monograph:updated', () => {
|
|
395
|
+
output.writeln(output.dim(' [watch] File change detected, rebuilding…'));
|
|
396
|
+
buildAsync(root, { codeOnly: false }).catch((err) => {
|
|
397
|
+
output.writeln(output.dim(` [watch] Rebuild error: ${err.message}`));
|
|
398
|
+
});
|
|
393
399
|
});
|
|
400
|
+
await watcher.start();
|
|
394
401
|
output.printSuccess('Watching for changes…');
|
|
395
402
|
output.writeln();
|
|
396
403
|
await new Promise(resolve => {
|
|
397
404
|
process.on('SIGINT', () => {
|
|
398
|
-
watcher
|
|
405
|
+
watcher.stop();
|
|
399
406
|
output.writeln();
|
|
400
407
|
output.writeln(output.dim('Watch stopped.'));
|
|
401
408
|
resolve();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI MonoVector Backup Command
|
|
3
|
+
* Backup and restore for MonoVector PostgreSQL data
|
|
4
|
+
*/
|
|
5
|
+
import type { Command } from '../../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* MonoVector backup main command
|
|
8
|
+
*/
|
|
9
|
+
export declare const backupCommand: Command;
|
|
10
|
+
export default backupCommand;
|
|
11
|
+
//# sourceMappingURL=backup.d.ts.map
|