monomind 1.10.56 → 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/mcp.d.ts +1 -1
- 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/commands/update.d.ts +1 -1
- 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.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.d.ts +1 -1
- 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/auto-install.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.d.ts +1 -1
- 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/claims-tools.d.ts +1 -1
- 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.d.ts +1 -1
- 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 -446
- 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 +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.d.ts +1 -1
- 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/transfer-tools.d.ts +1 -1
- 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/runtime/headless.d.ts +3 -3
- 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/transfer/ipfs/upload.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/transfer/storage/gcs.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/types.d.ts +13 -0
- package/packages/@monomind/cli/dist/src/update/checker.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/update/index.d.ts +1 -1
- 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 -56
- package/packages/@monomind/cli/dist/src/ruvector/index.js +0 -58
- 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
|
@@ -69,9 +69,9 @@ const benchmarkCommand = {
|
|
|
69
69
|
targetMet: embedTargetMet,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
// 2.
|
|
72
|
+
// 2. Batch Vector Operations
|
|
73
73
|
if (suite === 'all' || suite === 'wasm') {
|
|
74
|
-
spinner.setText('Benchmarking
|
|
74
|
+
spinner.setText('Benchmarking batch vector ops...');
|
|
75
75
|
const flashTimes = [];
|
|
76
76
|
// Generate test vectors
|
|
77
77
|
const testVectors = Array.from({ length: 100 }, () => new Float32Array(Array.from({ length: 384 }, () => Math.random())));
|
|
@@ -92,7 +92,7 @@ const benchmarkCommand = {
|
|
|
92
92
|
const speedup = baselineMs / mean;
|
|
93
93
|
const flashTargetMet = speedup > 1;
|
|
94
94
|
results.push({
|
|
95
|
-
operation: '
|
|
95
|
+
operation: 'Batch Vector Ops',
|
|
96
96
|
mean: `${mean.toFixed(3)}ms`,
|
|
97
97
|
p95: `${percentile(flashTimes, 95).toFixed(3)}ms`,
|
|
98
98
|
p99: `${percentile(flashTimes, 99).toFixed(3)}ms`,
|
|
@@ -150,13 +150,13 @@ const benchmarkCommand = {
|
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
// 4.
|
|
153
|
+
// 4. Pattern Adaptation Benchmark (JS)
|
|
154
154
|
if (suite === 'all' || suite === 'neural') {
|
|
155
|
-
spinner.setText('Benchmarking
|
|
155
|
+
spinner.setText('Benchmarking pattern adaptation...');
|
|
156
156
|
await initializeIntelligence();
|
|
157
157
|
const sonaResult = benchmarkAdaptation(iterations);
|
|
158
158
|
results.push({
|
|
159
|
-
operation: '
|
|
159
|
+
operation: 'Pattern Adaptation',
|
|
160
160
|
mean: `${(sonaResult.avgMs * 1000).toFixed(2)}μs`,
|
|
161
161
|
p95: `${(sonaResult.maxMs * 1000).toFixed(2)}μs`,
|
|
162
162
|
p99: `${(sonaResult.maxMs * 1000).toFixed(2)}μs`,
|
|
@@ -515,7 +515,6 @@ const optimizeCommand = {
|
|
|
515
515
|
data: [
|
|
516
516
|
{ priority: output.error('P0'), area: 'Memory', recommendation: 'Enable HNSW index quantization', impact: '+50% reduction' },
|
|
517
517
|
{ priority: output.warning('P1'), area: 'CPU', recommendation: 'Enable WASM SIMD acceleration', impact: '+4x speedup' },
|
|
518
|
-
{ priority: output.warning('P1'), area: 'Latency', recommendation: 'Enable Flash Attention', impact: '+2.49x speedup' },
|
|
519
518
|
{ priority: output.info('P2'), area: 'Cache', recommendation: 'Increase pattern cache size', impact: '+15% hit rate' },
|
|
520
519
|
{ priority: output.info('P2'), area: 'Network', recommendation: 'Enable request batching', impact: '-30% latency' },
|
|
521
520
|
],
|
|
@@ -554,7 +553,6 @@ const bottleneckCommand = {
|
|
|
554
553
|
],
|
|
555
554
|
data: [
|
|
556
555
|
{ component: 'Vector Search', bottleneck: 'Linear scan O(n)', severity: output.error('High'), solution: 'Enable HNSW indexing' },
|
|
557
|
-
{ component: 'Neural Inference', bottleneck: 'Sequential attention', severity: output.warning('Medium'), solution: 'Enable Flash Attention' },
|
|
558
556
|
{ component: 'Memory Store', bottleneck: 'Lock contention', severity: output.info('Low'), solution: 'Use sharded storage' },
|
|
559
557
|
],
|
|
560
558
|
});
|
|
@@ -588,8 +586,7 @@ export const performanceCommand = {
|
|
|
588
586
|
output.writeln();
|
|
589
587
|
output.writeln('Performance Targets:');
|
|
590
588
|
output.printList([
|
|
591
|
-
'HNSW Search:
|
|
592
|
-
'Flash Attention: 2.49x-7.47x speedup',
|
|
589
|
+
'HNSW Search: O(log n) vs O(n) brute force (pure-JS)',
|
|
593
590
|
'Memory: 50-75% reduction with quantization',
|
|
594
591
|
]);
|
|
595
592
|
output.writeln();
|
|
@@ -388,7 +388,7 @@ const infoCommand = {
|
|
|
388
388
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
389
389
|
],
|
|
390
390
|
examples: [
|
|
391
|
-
{ command: 'monomind plugins info -n @monomind/
|
|
391
|
+
{ command: 'monomind plugins info -n @monomind/security', description: 'Show plugin info' },
|
|
392
392
|
],
|
|
393
393
|
action: async (ctx) => {
|
|
394
394
|
const name = ctx.flags.name;
|
|
@@ -563,8 +563,8 @@ const upgradeCommand = {
|
|
|
563
563
|
{ name: 'version', short: 'v', type: 'string', description: 'Target version (default: latest)' },
|
|
564
564
|
],
|
|
565
565
|
examples: [
|
|
566
|
-
{ command: 'monomind plugins upgrade -n @monomind/
|
|
567
|
-
{ command: 'monomind plugins upgrade -n @monomind/
|
|
566
|
+
{ command: 'monomind plugins upgrade -n @monomind/security', description: 'Upgrade to latest' },
|
|
567
|
+
{ command: 'monomind plugins upgrade -n @monomind/security -v 3.1.0', description: 'Upgrade to specific version' },
|
|
568
568
|
],
|
|
569
569
|
action: async (ctx) => {
|
|
570
570
|
const name = ctx.flags.name;
|
|
@@ -779,7 +779,6 @@ export const pluginsCommand = {
|
|
|
779
779
|
output.writeln();
|
|
780
780
|
output.writeln(output.bold('Official Plugins:'));
|
|
781
781
|
output.printList([
|
|
782
|
-
'@monomind/neural - Neural patterns and inference (WASM SIMD)',
|
|
783
782
|
'@monomind/security - Security scanning and CVE detection',
|
|
784
783
|
'@monomind/embeddings - Vector embeddings with hyperbolic support',
|
|
785
784
|
'@monomind/claims - Claims-based authorization',
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* CLI Process Management Command
|
|
3
3
|
* Background process management, daemon mode, and monitoring
|
|
4
4
|
*/
|
|
5
|
-
import { writeFileSync, readFileSync, unlinkSync, existsSync, mkdirSync } from 'fs';
|
|
6
|
-
import { dirname, resolve } from 'path';
|
|
5
|
+
import { writeFileSync, readFileSync, unlinkSync, existsSync, mkdirSync } from 'node:fs';
|
|
6
|
+
import { dirname, resolve } from 'node:path';
|
|
7
7
|
// Helper functions for PID file management
|
|
8
8
|
function writePidFile(pidFile, pid, port) {
|
|
9
9
|
const resolved = resolve(pidFile);
|
|
@@ -23,8 +23,7 @@ function writePidFile(pidFile, pid, port) {
|
|
|
23
23
|
// Stale PID file — caller is expected to have already verified the
|
|
24
24
|
// referenced process is dead. Unlink and retry once.
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
fs.unlinkSync(resolved);
|
|
26
|
+
unlinkSync(resolved);
|
|
28
27
|
writeFileSync(resolved, data, { encoding: 'utf-8', flag: 'wx', mode: 0o600 });
|
|
29
28
|
}
|
|
30
29
|
catch (retryErr) {
|
|
@@ -270,7 +269,7 @@ const monitorCommand = {
|
|
|
270
269
|
const totalMemMB = Math.round(totalMem / 1024 / 1024);
|
|
271
270
|
// Try to read agent and task counts from local store files
|
|
272
271
|
let agentCount = 0;
|
|
273
|
-
|
|
272
|
+
const taskCounts = { running: 0, queued: 0, completed: 0, failed: 0 };
|
|
274
273
|
try {
|
|
275
274
|
const agentStorePath = resolve('.monomind/agents/store.json');
|
|
276
275
|
if (existsSync(agentStorePath)) {
|
|
@@ -619,13 +618,7 @@ const logsCommand = {
|
|
|
619
618
|
console.log('─'.repeat(70));
|
|
620
619
|
// Read actual log files from .monomind/logs/ if they exist
|
|
621
620
|
const logsDir = resolve('.monomind/logs');
|
|
622
|
-
|
|
623
|
-
const levelIcons = {
|
|
624
|
-
debug: '🔍',
|
|
625
|
-
info: 'ℹ️ ',
|
|
626
|
-
warn: '⚠️ ',
|
|
627
|
-
error: '❌',
|
|
628
|
-
};
|
|
621
|
+
const logEntries = [];
|
|
629
622
|
const levels = ['debug', 'info', 'warn', 'error'];
|
|
630
623
|
const minLevelIdx = levels.indexOf(level);
|
|
631
624
|
if (existsSync(logsDir)) {
|
|
@@ -31,7 +31,7 @@ const checkCommand = {
|
|
|
31
31
|
const spinner = output.createSpinner({ text: 'Checking v1 progress...' });
|
|
32
32
|
try {
|
|
33
33
|
spinner.start();
|
|
34
|
-
const result = await callMCPTool('progress_check', { detailed });
|
|
34
|
+
const result = (await callMCPTool('progress_check', { detailed }));
|
|
35
35
|
spinner.stop();
|
|
36
36
|
if (ctx.flags.format === 'json') {
|
|
37
37
|
output.printJson(result);
|
|
@@ -44,11 +44,16 @@ const checkCommand = {
|
|
|
44
44
|
output.writeln(progressBar(progressValue, 30));
|
|
45
45
|
output.writeln();
|
|
46
46
|
if (detailed && result.cli) {
|
|
47
|
-
output.writeln(output.highlight('CLI Commands:') +
|
|
48
|
-
|
|
49
|
-
output.writeln(output.highlight('
|
|
50
|
-
|
|
51
|
-
output.writeln(output.highlight('
|
|
47
|
+
output.writeln(output.highlight('CLI Commands:') +
|
|
48
|
+
` ${result.cli.progress}% (${result.cli.commands}/${result.cli.target})`);
|
|
49
|
+
output.writeln(output.highlight('MCP Tools:') +
|
|
50
|
+
` ${result.mcp?.progress ?? 0}% (${result.mcp?.tools ?? 0}/${result.mcp?.target ?? 0})`);
|
|
51
|
+
output.writeln(output.highlight('Hooks:') +
|
|
52
|
+
` ${result.hooks?.progress ?? 0}% (${result.hooks?.subcommands ?? 0}/${result.hooks?.target ?? 0})`);
|
|
53
|
+
output.writeln(output.highlight('Packages:') +
|
|
54
|
+
` ${result.packages?.progress ?? 0}% (${result.packages?.total ?? 0}/${result.packages?.target ?? 0})`);
|
|
55
|
+
output.writeln(output.highlight('DDD Structure:') +
|
|
56
|
+
` ${result.ddd?.progress ?? 0}% (${result.packages?.withDDD ?? 0}/${result.packages?.total ?? 0})`);
|
|
52
57
|
output.writeln();
|
|
53
58
|
if (result.codebase) {
|
|
54
59
|
output.writeln(output.dim(`Codebase: ${result.codebase.totalFiles} files, ${result.codebase.totalLines.toLocaleString()} lines`));
|
|
@@ -85,7 +90,7 @@ const syncCommand = {
|
|
|
85
90
|
const spinner = output.createSpinner({ text: 'Syncing progress...' });
|
|
86
91
|
try {
|
|
87
92
|
spinner.start();
|
|
88
|
-
const result = await callMCPTool('progress_sync', {});
|
|
93
|
+
const result = (await callMCPTool('progress_sync', {}));
|
|
89
94
|
spinner.stop();
|
|
90
95
|
if (ctx.flags.format === 'json') {
|
|
91
96
|
output.printJson(result);
|
|
@@ -117,14 +122,14 @@ const summaryCommand = {
|
|
|
117
122
|
const spinner = output.createSpinner({ text: 'Getting progress summary...' });
|
|
118
123
|
try {
|
|
119
124
|
spinner.start();
|
|
120
|
-
const result = await callMCPTool('progress_summary', {});
|
|
125
|
+
const result = (await callMCPTool('progress_summary', {}));
|
|
121
126
|
spinner.stop();
|
|
122
127
|
if (ctx.flags.format === 'json') {
|
|
123
128
|
output.printJson(result);
|
|
124
129
|
return { success: true, data: result };
|
|
125
130
|
}
|
|
126
131
|
output.writeln();
|
|
127
|
-
output.writeln(result.summary);
|
|
132
|
+
output.writeln(result.summary ?? '');
|
|
128
133
|
return { success: true, data: result };
|
|
129
134
|
}
|
|
130
135
|
catch (error) {
|
|
@@ -159,7 +164,7 @@ const watchCommand = {
|
|
|
159
164
|
let lastProgress = 0;
|
|
160
165
|
const check = async () => {
|
|
161
166
|
try {
|
|
162
|
-
const result = await callMCPTool('progress_check', {});
|
|
167
|
+
const result = (await callMCPTool('progress_check', {}));
|
|
163
168
|
const currentProgress = result.overall ?? result.progress ?? 0;
|
|
164
169
|
if (currentProgress !== lastProgress) {
|
|
165
170
|
output.writeln(`${output.warning('→')} Progress changed: ${lastProgress}% → ${output.success(currentProgress + '%')}`);
|
|
@@ -191,12 +196,7 @@ export const progressCommand = {
|
|
|
191
196
|
name: 'progress',
|
|
192
197
|
description: 'Check v1 implementation progress',
|
|
193
198
|
aliases: ['prog'],
|
|
194
|
-
subcommands: [
|
|
195
|
-
checkCommand,
|
|
196
|
-
syncCommand,
|
|
197
|
-
summaryCommand,
|
|
198
|
-
watchCommand,
|
|
199
|
-
],
|
|
199
|
+
subcommands: [checkCommand, syncCommand, summaryCommand, watchCommand],
|
|
200
200
|
options: [
|
|
201
201
|
{
|
|
202
202
|
name: 'detailed',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Route Command
|
|
3
|
-
* Intelligent task-to-agent routing using
|
|
3
|
+
* Intelligent task-to-agent routing using keyword matching
|
|
4
4
|
*
|
|
5
5
|
* Features:
|
|
6
|
-
* -
|
|
6
|
+
* - Keyword-based agent selection
|
|
7
7
|
* - Semantic task understanding
|
|
8
8
|
* - Confidence scoring
|
|
9
9
|
* - Learning from feedback
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Route Command
|
|
3
|
-
* Intelligent task-to-agent routing using
|
|
3
|
+
* Intelligent task-to-agent routing using keyword matching
|
|
4
4
|
*
|
|
5
5
|
* Features:
|
|
6
|
-
* -
|
|
6
|
+
* - Keyword-based agent selection
|
|
7
7
|
* - Semantic task understanding
|
|
8
8
|
* - Confidence scoring
|
|
9
9
|
* - Learning from feedback
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* github.com/nokhodian/monomind
|
|
12
12
|
*/
|
|
13
13
|
import { output } from '../output.js';
|
|
14
|
-
import {
|
|
14
|
+
import { createKeywordRouter, isMonovectorAvailable, } from '../monovector/index.js';
|
|
15
15
|
/**
|
|
16
16
|
* Available agent types for routing
|
|
17
17
|
*/
|
|
@@ -35,7 +35,7 @@ let routerInitialized = false;
|
|
|
35
35
|
*/
|
|
36
36
|
async function getRouter() {
|
|
37
37
|
if (!routerInstance) {
|
|
38
|
-
routerInstance =
|
|
38
|
+
routerInstance = createKeywordRouter();
|
|
39
39
|
}
|
|
40
40
|
if (!routerInitialized) {
|
|
41
41
|
await routerInstance.initialize();
|
|
@@ -54,19 +54,19 @@ function getAgentType(route) {
|
|
|
54
54
|
// ============================================================================
|
|
55
55
|
const routeTaskCommand = {
|
|
56
56
|
name: 'task',
|
|
57
|
-
description: 'Route a task to the optimal agent using
|
|
57
|
+
description: 'Route a task to the optimal agent using keyword matching',
|
|
58
58
|
options: [
|
|
59
59
|
{
|
|
60
60
|
name: 'q-learning',
|
|
61
61
|
short: 'q',
|
|
62
|
-
description: 'Use
|
|
62
|
+
description: 'Use keyword routing for agent selection (default: true)',
|
|
63
63
|
type: 'boolean',
|
|
64
64
|
default: true,
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
name: 'agent',
|
|
68
68
|
short: 'a',
|
|
69
|
-
description: 'Force specific agent (bypasses
|
|
69
|
+
description: 'Force specific agent (bypasses keyword routing)',
|
|
70
70
|
type: 'string',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
@@ -136,7 +136,7 @@ const routeTaskCommand = {
|
|
|
136
136
|
}
|
|
137
137
|
// Use Q-Learning routing
|
|
138
138
|
const router = await getRouter();
|
|
139
|
-
const result = router.route(taskDescription, useExploration);
|
|
139
|
+
const result = await router.route(taskDescription, useExploration);
|
|
140
140
|
const agent = getAgentType(result.route) || AGENT_TYPES[0];
|
|
141
141
|
spinner.succeed(`Routed to ${agent.name}`);
|
|
142
142
|
if (jsonOutput) {
|
|
@@ -147,7 +147,7 @@ const routeTaskCommand = {
|
|
|
147
147
|
confidence: result.confidence,
|
|
148
148
|
qValues: result.qValues,
|
|
149
149
|
explored: result.explored,
|
|
150
|
-
alternatives: result.alternatives.map(a => ({
|
|
150
|
+
alternatives: (result.alternatives || []).map(a => ({
|
|
151
151
|
agentId: a.route,
|
|
152
152
|
agentName: getAgentType(a.route)?.name || a.route,
|
|
153
153
|
score: a.score,
|
|
@@ -281,14 +281,14 @@ const statsCommand = {
|
|
|
281
281
|
try {
|
|
282
282
|
const router = await getRouter();
|
|
283
283
|
const stats = router.getStats();
|
|
284
|
-
const
|
|
285
|
-
const
|
|
286
|
-
available:
|
|
284
|
+
const monovectorAvailable = await isMonovectorAvailable();
|
|
285
|
+
const monovectorStatus = {
|
|
286
|
+
available: monovectorAvailable,
|
|
287
287
|
wasmAccelerated: stats.useNative === 1,
|
|
288
|
-
backend: stats.useNative === 1 ? '
|
|
288
|
+
backend: stats.useNative === 1 ? 'monovector-native' : 'fallback',
|
|
289
289
|
};
|
|
290
290
|
if (jsonOutput) {
|
|
291
|
-
output.printJson({ stats,
|
|
291
|
+
output.printJson({ stats, monovector: monovectorStatus });
|
|
292
292
|
}
|
|
293
293
|
else {
|
|
294
294
|
output.writeln();
|
|
@@ -309,14 +309,14 @@ const statsCommand = {
|
|
|
309
309
|
],
|
|
310
310
|
});
|
|
311
311
|
output.writeln();
|
|
312
|
-
output.writeln(output.bold('
|
|
312
|
+
output.writeln(output.bold('MonoVector Status'));
|
|
313
313
|
output.printList([
|
|
314
|
-
`Available: ${
|
|
315
|
-
`WASM Accelerated: ${
|
|
316
|
-
`Backend: ${
|
|
314
|
+
`Available: ${monovectorStatus.available ? output.success('Yes') : output.warning('No (using fallback)')}`,
|
|
315
|
+
`WASM Accelerated: ${monovectorStatus.wasmAccelerated ? output.success('Yes') : 'No'}`,
|
|
316
|
+
`Backend: ${monovectorStatus.backend}`,
|
|
317
317
|
]);
|
|
318
318
|
}
|
|
319
|
-
return { success: true, data: { stats,
|
|
319
|
+
return { success: true, data: { stats, monovector: monovectorStatus } };
|
|
320
320
|
}
|
|
321
321
|
catch (error) {
|
|
322
322
|
output.printError(error instanceof Error ? error.message : String(error));
|
|
@@ -606,7 +606,7 @@ const coverageRouteCommand = {
|
|
|
606
606
|
spinner.start();
|
|
607
607
|
try {
|
|
608
608
|
// Lazy load coverage router
|
|
609
|
-
const { coverageRoute, coverageSuggest, coverageGaps } = await import('../
|
|
609
|
+
const { coverageRoute, coverageSuggest, coverageGaps } = await import('../monovector/coverage-router.js');
|
|
610
610
|
if (gapsMode) {
|
|
611
611
|
// List coverage gaps with agent assignments
|
|
612
612
|
const result = await coverageGaps({ threshold, groupByAgent: true });
|
|
@@ -924,11 +924,11 @@ export const routeCommand = {
|
|
|
924
924
|
]);
|
|
925
925
|
output.writeln();
|
|
926
926
|
// Show quick status
|
|
927
|
-
const
|
|
927
|
+
const monovectorAvailable = await isMonovectorAvailable();
|
|
928
928
|
output.writeln(output.bold('Backend Status:'));
|
|
929
929
|
output.printList([
|
|
930
|
-
`
|
|
931
|
-
`Backend: ${
|
|
930
|
+
`MonoVector: ${monovectorAvailable ? output.success('Available') : output.warning('Fallback mode')}`,
|
|
931
|
+
`Backend: ${monovectorAvailable ? 'monovector-native' : 'JavaScript fallback'}`,
|
|
932
932
|
]);
|
|
933
933
|
output.writeln();
|
|
934
934
|
output.writeln(output.dim('Run "monomind route <subcommand> --help" for more info'));
|
|
@@ -111,7 +111,6 @@ async function getSystemStatus() {
|
|
|
111
111
|
performance: {
|
|
112
112
|
cpuUsage: getProcessCpuUsage(),
|
|
113
113
|
memoryUsage: getProcessMemoryUsage(),
|
|
114
|
-
flashAttention: 'not measured',
|
|
115
114
|
searchSpeed: 'not measured'
|
|
116
115
|
}
|
|
117
116
|
};
|
|
@@ -139,7 +138,6 @@ async function getSystemStatus() {
|
|
|
139
138
|
performance: {
|
|
140
139
|
cpuUsage: 0,
|
|
141
140
|
memoryUsage: 0,
|
|
142
|
-
flashAttention: 'N/A',
|
|
143
141
|
searchSpeed: 'N/A'
|
|
144
142
|
}
|
|
145
143
|
};
|
|
@@ -238,7 +236,6 @@ function displayStatus(status) {
|
|
|
238
236
|
if (status.running) {
|
|
239
237
|
output.writeln(output.bold('v1 Performance Gains'));
|
|
240
238
|
output.printList([
|
|
241
|
-
`Flash Attention: ${output.success(status.performance.flashAttention)}`,
|
|
242
239
|
`Vector Search: ${output.success(status.performance.searchSpeed)}`,
|
|
243
240
|
`CPU Usage: ${status.performance.cpuUsage.toFixed(1)}%`,
|
|
244
241
|
`Memory Usage: ${status.performance.memoryUsage.toFixed(1)}%`
|
|
@@ -260,9 +260,8 @@ const initCommand = {
|
|
|
260
260
|
output.writeln(output.dim(' Initializing memory namespace...'));
|
|
261
261
|
output.writeln(output.dim(' Setting up communication channels...'));
|
|
262
262
|
if (v1Mode) {
|
|
263
|
-
output.writeln(output.dim('
|
|
264
|
-
output.writeln(output.dim('
|
|
265
|
-
output.writeln(output.dim(' Initializing SONA learning system...'));
|
|
263
|
+
output.writeln(output.dim(' Configuring AgentDB integration (pure-JS HNSW)...'));
|
|
264
|
+
output.writeln(output.dim(' Initializing keyword routing + outcome measurement...'));
|
|
266
265
|
}
|
|
267
266
|
output.writeln();
|
|
268
267
|
output.printTable({
|
|
@@ -55,6 +55,17 @@ export function systemConfigToMonomindConfig(systemConfig) {
|
|
|
55
55
|
autoExecute: false,
|
|
56
56
|
hooks: [],
|
|
57
57
|
},
|
|
58
|
+
// Neural / SONA learning configuration
|
|
59
|
+
neural: {
|
|
60
|
+
enabled: systemConfig.neural?.enabled ?? true,
|
|
61
|
+
disableNative: systemConfig.neural?.disableNative ?? false,
|
|
62
|
+
sona: {
|
|
63
|
+
mode: systemConfig.neural?.sona?.mode ?? 'balanced',
|
|
64
|
+
learningRate: systemConfig.neural?.sona?.learningRate,
|
|
65
|
+
ewcLambda: systemConfig.neural?.sona?.ewcLambda,
|
|
66
|
+
embeddingDim: systemConfig.neural?.sona?.embeddingDim,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
58
69
|
};
|
|
59
70
|
}
|
|
60
71
|
/**
|
|
@@ -132,6 +143,22 @@ export function configToSystemConfig(config) {
|
|
|
132
143
|
logging: true,
|
|
133
144
|
},
|
|
134
145
|
},
|
|
146
|
+
// Neural / SONA learning configuration — only emit when present so we don't
|
|
147
|
+
// synthesize a neural block for configs that never had one.
|
|
148
|
+
...(config.neural
|
|
149
|
+
? {
|
|
150
|
+
neural: {
|
|
151
|
+
enabled: config.neural.enabled ?? true,
|
|
152
|
+
disableNative: config.neural.disableNative ?? false,
|
|
153
|
+
sona: {
|
|
154
|
+
mode: config.neural.sona?.mode ?? 'balanced',
|
|
155
|
+
learningRate: config.neural.sona?.learningRate,
|
|
156
|
+
ewcLambda: config.neural.sona?.ewcLambda,
|
|
157
|
+
embeddingDim: config.neural.sona?.embeddingDim,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
: {}),
|
|
135
162
|
};
|
|
136
163
|
}
|
|
137
164
|
/**
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/** Supported consensus protocols. */
|
|
2
|
+
export type ConsensusProtocol = 'byzantine' | 'raft' | 'gossip' | 'crdt' | 'quorum';
|
|
3
|
+
/** A single signed vote cast by an agent. */
|
|
4
|
+
export interface VoteRecord {
|
|
5
|
+
agentId: string;
|
|
6
|
+
agentSlug: string;
|
|
7
|
+
vote: unknown;
|
|
8
|
+
signature: string;
|
|
9
|
+
votedAt: string;
|
|
10
|
+
}
|
|
11
|
+
/** Proof that quorum was (or was not) achieved. */
|
|
12
|
+
export interface QuorumProof {
|
|
13
|
+
required: number;
|
|
14
|
+
achieved: number;
|
|
15
|
+
threshold: number;
|
|
16
|
+
satisfied: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Full audit record for a consensus decision. */
|
|
19
|
+
export interface ConsensusAuditRecord {
|
|
20
|
+
decisionId: string;
|
|
21
|
+
swarmId: string;
|
|
22
|
+
protocol: ConsensusProtocol;
|
|
23
|
+
topic: string;
|
|
24
|
+
decision: unknown;
|
|
25
|
+
votes: VoteRecord[];
|
|
26
|
+
quorumProof: QuorumProof;
|
|
27
|
+
quorumAchieved: boolean;
|
|
28
|
+
round: number;
|
|
29
|
+
startedAt: string;
|
|
30
|
+
completedAt: string;
|
|
31
|
+
durationMs: number | null;
|
|
32
|
+
/** HMAC-SHA256 over the full record (all fields above), keyed by the session secret. */
|
|
33
|
+
recordSignature?: string;
|
|
34
|
+
}
|
|
35
|
+
/** An unsigned vote supplied to {@link AuditWriter.record}. */
|
|
36
|
+
export type UnsignedVote = Omit<VoteRecord, 'signature'>;
|
|
37
|
+
/** Input to {@link AuditWriter.record}. */
|
|
8
38
|
export interface RecordInput {
|
|
9
39
|
decisionId: string;
|
|
10
40
|
swarmId: string;
|
|
11
41
|
protocol: ConsensusProtocol;
|
|
12
42
|
topic: string;
|
|
13
43
|
decision: unknown;
|
|
14
|
-
votes:
|
|
15
|
-
agentId: string;
|
|
16
|
-
agentSlug: string;
|
|
17
|
-
vote: unknown;
|
|
18
|
-
votedAt: string;
|
|
19
|
-
}>;
|
|
44
|
+
votes: UnsignedVote[];
|
|
20
45
|
quorumRequired: number;
|
|
21
46
|
quorumThreshold: number;
|
|
22
47
|
round: number;
|
|
@@ -24,6 +49,11 @@ export interface RecordInput {
|
|
|
24
49
|
completedAt: string;
|
|
25
50
|
sessionSecret: string;
|
|
26
51
|
}
|
|
52
|
+
/** Result of re-verifying a stored consensus decision. */
|
|
53
|
+
export interface VerifyResult {
|
|
54
|
+
valid: boolean;
|
|
55
|
+
invalidVotes: string[];
|
|
56
|
+
}
|
|
27
57
|
export declare class AuditWriter {
|
|
28
58
|
private readonly auditPath;
|
|
29
59
|
private readonly votesPath;
|
|
@@ -40,10 +70,7 @@ export declare class AuditWriter {
|
|
|
40
70
|
/**
|
|
41
71
|
* Re-verify all vote signatures in a decision.
|
|
42
72
|
*/
|
|
43
|
-
verifyDecision(decisionId: string, sessionSecret: string):
|
|
44
|
-
valid: boolean;
|
|
45
|
-
invalidVotes: string[];
|
|
46
|
-
};
|
|
73
|
+
verifyDecision(decisionId: string, sessionSecret: string): VerifyResult;
|
|
47
74
|
private appendLine;
|
|
48
75
|
private readLines;
|
|
49
76
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* replay. readAll() merges status records into the base entries — the last status wins.
|
|
9
9
|
* Compaction rewrites the file when status records exceed 20% of total lines.
|
|
10
10
|
*/
|
|
11
|
-
import type { DLQReplayResult } from '../../../shared/
|
|
11
|
+
import type { DLQReplayResult } from '../../../shared/dist/types/dlq.js';
|
|
12
12
|
/** A function that attempts to call a tool with the original payload */
|
|
13
13
|
export type ToolCaller = (toolName: string, payload: unknown) => Promise<void>;
|
|
14
14
|
export declare class DLQReplayer {
|
|
@@ -50,7 +50,7 @@ export declare class CLI {
|
|
|
50
50
|
/**
|
|
51
51
|
* Initialize optional subsystems at startup (non-blocking, all failures are silent).
|
|
52
52
|
* Wires TierManager, ObservabilityBus + TraceCollector, and SwarmCheckpointer
|
|
53
|
-
* so that packages/@
|
|
53
|
+
* so that packages/@monomind/* actually contribute to the live runtime.
|
|
54
54
|
*/
|
|
55
55
|
private initSubsystems;
|
|
56
56
|
/**
|
|
@@ -62,7 +62,7 @@ export class CLI {
|
|
|
62
62
|
this.showVersion();
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
if (flags.noColor) {
|
|
65
|
+
if (flags.color === false || flags.noColor) {
|
|
66
66
|
this.output.setColorEnabled(false);
|
|
67
67
|
}
|
|
68
68
|
// Set verbosity level based on flags
|
|
@@ -283,8 +283,8 @@ export class CLI {
|
|
|
283
283
|
this.output.writeln(this.output.bold('V1 FEATURES:'));
|
|
284
284
|
this.output.printList([
|
|
285
285
|
'15-agent hierarchical mesh coordination',
|
|
286
|
-
'AgentDB with HNSW indexing
|
|
287
|
-
'
|
|
286
|
+
'AgentDB with pure-JS HNSW indexing',
|
|
287
|
+
'Keyword routing + route-outcome measurement',
|
|
288
288
|
'Unified SwarmCoordinator engine',
|
|
289
289
|
'Event-sourced state management',
|
|
290
290
|
'Domain-Driven Design architecture'
|
|
@@ -419,7 +419,7 @@ export class CLI {
|
|
|
419
419
|
async initSubsystems() {
|
|
420
420
|
// GAP-003: TierManager
|
|
421
421
|
try {
|
|
422
|
-
const { TierManager, createPersistentService } = await import('@
|
|
422
|
+
const { TierManager, createPersistentService } = await import('@monoes/memory');
|
|
423
423
|
const backend = createPersistentService('.monomind/memory');
|
|
424
424
|
const _tierManager = new TierManager(backend, { shortTermCapacity: 1000 });
|
|
425
425
|
void _tierManager;
|
|
@@ -433,7 +433,7 @@ export class CLI {
|
|
|
433
433
|
catch { /* optional */ }
|
|
434
434
|
// GAP-007: SwarmCheckpointer — write checkpoint files so crashed swarms can resume
|
|
435
435
|
try {
|
|
436
|
-
const { SwarmCheckpointer } = await import('@
|
|
436
|
+
const { SwarmCheckpointer } = await import('@monoes/memory');
|
|
437
437
|
const _swarmCheckpointer = new SwarmCheckpointer({
|
|
438
438
|
dbPath: '.monomind/checkpoints/swarm.jsonl',
|
|
439
439
|
swarmId: 'default',
|
|
@@ -219,7 +219,7 @@ function hooksSystem() {
|
|
|
219
219
|
| \`pre-edit\` / \`post-edit\` | File editing with neural training |
|
|
220
220
|
| \`session-start\` / \`session-end\` | Session state persistence |
|
|
221
221
|
| \`route\` | Route task to optimal agent |
|
|
222
|
-
| \`intelligence\` |
|
|
222
|
+
| \`intelligence\` | Pattern-learning intelligence system |
|
|
223
223
|
| \`worker\` | Background worker management |
|
|
224
224
|
|
|
225
225
|
### 12 Background Workers
|
|
@@ -328,7 +328,7 @@ function performanceSection() {
|
|
|
328
328
|
- Always run benchmarks before and after performance changes
|
|
329
329
|
- Always profile before optimizing — never guess at bottlenecks
|
|
330
330
|
- Prefer algorithmic improvements over micro-optimizations
|
|
331
|
-
-
|
|
331
|
+
- Prefer indexed (HNSW) vector search over brute-force scans for pattern lookup
|
|
332
332
|
- Keep memory reduction within 50-75% target with quantization
|
|
333
333
|
|
|
334
334
|
### Performance Tooling
|
|
@@ -344,18 +344,14 @@ npx monomind@latest performance metrics --format table
|
|
|
344
344
|
- Use agent routing code 7 (hierarchical/specialized) for performance tasks`;
|
|
345
345
|
}
|
|
346
346
|
function intelligenceSystem() {
|
|
347
|
-
return `## Intelligence System
|
|
348
|
-
|
|
349
|
-
- **
|
|
350
|
-
- **
|
|
351
|
-
- **
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
1. **RETRIEVE** - Fetch relevant patterns via HNSW
|
|
356
|
-
2. **JUDGE** - Evaluate with verdicts (success/failure)
|
|
357
|
-
3. **DISTILL** - Extract key learnings via LoRA
|
|
358
|
-
4. **CONSOLIDATE** - Prevent catastrophic forgetting via EWC++`;
|
|
347
|
+
return `## Intelligence System
|
|
348
|
+
|
|
349
|
+
- **Keyword routing**: Deterministic task→agent routing via \`createKeywordRouter\`
|
|
350
|
+
- **Outcome measurement**: Route and command outcomes are recorded and scored to surface routing accuracy over time
|
|
351
|
+
- **Pattern search**: Pure-JS HNSW vector search via AgentDB for finding similar past patterns
|
|
352
|
+
|
|
353
|
+
Routing and learning are JS-only — no native engine is required. Outcomes
|
|
354
|
+
feed back into the recorded metrics so routing quality is measured, not assumed.`;
|
|
359
355
|
}
|
|
360
356
|
function envVars() {
|
|
361
357
|
return `## Environment Variables
|