@monoes/monomindcli 1.11.14 → 1.13.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/generated/channel-intelligence-director.md +87 -0
- package/.claude/agents/generated/chief-growth-officer.md +88 -0
- package/.claude/agents/generated/content-seo-strategist.md +90 -0
- package/.claude/agents/generated/developer-community-strategist.md +91 -0
- package/.claude/agents/generated/outreach-partnership-strategist.md +90 -0
- package/.claude/agents/generated/social-media-strategist.md +91 -0
- package/.claude/agents/generated/video-visual-strategist.md +90 -0
- package/.claude/commands/mastermind/master.md +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +13 -4
- package/.claude/helpers/control-start.cjs +5 -0
- package/.claude/helpers/event-logger.cjs +114 -0
- package/.claude/helpers/handlers/adr-draft-handler.cjs +19 -5
- package/.claude/helpers/handlers/agent-start-handler.cjs +13 -4
- package/.claude/helpers/handlers/compact-handler.cjs +2 -0
- package/.claude/helpers/handlers/edit-handler.cjs +1 -1
- package/.claude/helpers/handlers/gates-handler.cjs +3 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +14 -8
- package/.claude/helpers/handlers/loops-status-handler.cjs +5 -2
- package/.claude/helpers/handlers/route-handler.cjs +24 -10
- package/.claude/helpers/handlers/session-handler.cjs +11 -4
- package/.claude/helpers/handlers/session-restore-handler.cjs +35 -19
- package/.claude/helpers/handlers/task-handler.cjs +13 -5
- package/.claude/helpers/hook-handler.cjs +40 -0
- package/.claude/helpers/intelligence.cjs +130 -53
- package/.claude/helpers/loop-tracker.cjs +15 -3
- package/.claude/helpers/memory-palace.cjs +461 -0
- package/.claude/helpers/memory.cjs +138 -14
- package/.claude/helpers/metrics-db.mjs +87 -0
- package/.claude/helpers/router.cjs +300 -42
- package/.claude/helpers/session.cjs +89 -30
- package/.claude/helpers/statusline.cjs +148 -4
- package/.claude/helpers/toggle-statusline.cjs +73 -0
- package/.claude/helpers/token-tracker.cjs +934 -0
- package/.claude/helpers/utils/micro-agents.cjs +20 -4
- package/.claude/helpers/utils/monograph.cjs +39 -4
- package/.claude/helpers/utils/telemetry.cjs +3 -3
- package/.claude/skills/mastermind/_protocol.md +25 -15
- package/.claude/skills/mastermind/architect.md +3 -3
- package/.claude/skills/mastermind/autodev.md +4 -2
- package/.claude/skills/mastermind/idea.md +10 -0
- package/.claude/skills/mastermind/ops.md +3 -3
- package/.claude/skills/mastermind/runorg.md +153 -86
- package/dist/src/agents/registry-builder.d.ts.map +1 -1
- package/dist/src/agents/registry-builder.js +2 -0
- package/dist/src/agents/registry-builder.js.map +1 -1
- package/dist/src/autopilot-state.d.ts.map +1 -1
- package/dist/src/autopilot-state.js +10 -5
- package/dist/src/autopilot-state.js.map +1 -1
- package/dist/src/benchmarks/benchmark-runner.d.ts.map +1 -1
- package/dist/src/benchmarks/benchmark-runner.js +13 -0
- package/dist/src/benchmarks/benchmark-runner.js.map +1 -1
- package/dist/src/benchmarks/metric-evaluators.d.ts.map +1 -1
- package/dist/src/benchmarks/metric-evaluators.js +20 -9
- package/dist/src/benchmarks/metric-evaluators.js.map +1 -1
- package/dist/src/browser/actions.d.ts.map +1 -1
- package/dist/src/browser/actions.js +10 -3
- package/dist/src/browser/actions.js.map +1 -1
- package/dist/src/browser/browser.d.ts.map +1 -1
- package/dist/src/browser/browser.js +12 -2
- package/dist/src/browser/browser.js.map +1 -1
- package/dist/src/browser/cdp.d.ts.map +1 -1
- package/dist/src/browser/cdp.js +21 -3
- package/dist/src/browser/cdp.js.map +1 -1
- package/dist/src/browser/har.d.ts.map +1 -1
- package/dist/src/browser/har.js +27 -5
- package/dist/src/browser/har.js.map +1 -1
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +11 -8
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.d.ts.map +1 -1
- package/dist/src/commands/analyze.js +36 -21
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/autopilot.d.ts.map +1 -1
- package/dist/src/commands/autopilot.js +12 -4
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/benchmark.d.ts.map +1 -1
- package/dist/src/commands/benchmark.js +51 -8
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/browse.d.ts.map +1 -1
- package/dist/src/commands/browse.js +5 -2
- package/dist/src/commands/browse.js.map +1 -1
- package/dist/src/commands/claims.d.ts.map +1 -1
- package/dist/src/commands/claims.js +29 -11
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.d.ts.map +1 -1
- package/dist/src/commands/cleanup.js +25 -5
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +15 -7
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.d.ts.map +1 -1
- package/dist/src/commands/daemon.js +6 -0
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.d.ts.map +1 -1
- package/dist/src/commands/deployment.js +34 -19
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +133 -15
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/guidance.d.ts.map +1 -1
- package/dist/src/commands/guidance.js +15 -2
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.d.ts.map +1 -1
- package/dist/src/commands/hive-mind.js +37 -14
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +42 -25
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +9 -4
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.d.ts.map +1 -1
- package/dist/src/commands/issues.js +29 -26
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +11 -5
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +10 -0
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +5 -5
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/monograph.d.ts.map +1 -1
- package/dist/src/commands/monograph.js +18 -5
- package/dist/src/commands/monograph.js.map +1 -1
- package/dist/src/commands/monovector/backup.d.ts.map +1 -1
- package/dist/src/commands/monovector/backup.js +8 -2
- package/dist/src/commands/monovector/backup.js.map +1 -1
- package/dist/src/commands/monovector/benchmark.d.ts.map +1 -1
- package/dist/src/commands/monovector/benchmark.js +20 -7
- package/dist/src/commands/monovector/benchmark.js.map +1 -1
- package/dist/src/commands/monovector/import.d.ts.map +1 -1
- package/dist/src/commands/monovector/import.js +15 -0
- package/dist/src/commands/monovector/import.js.map +1 -1
- package/dist/src/commands/monovector/migrate.d.ts.map +1 -1
- package/dist/src/commands/monovector/migrate.js +4 -1
- package/dist/src/commands/monovector/migrate.js.map +1 -1
- package/dist/src/commands/monovector/optimize.d.ts.map +1 -1
- package/dist/src/commands/monovector/optimize.js +11 -0
- package/dist/src/commands/monovector/optimize.js.map +1 -1
- package/dist/src/commands/monovector/setup.d.ts.map +1 -1
- package/dist/src/commands/monovector/setup.js +11 -1
- package/dist/src/commands/monovector/setup.js.map +1 -1
- package/dist/src/commands/neural.js +1 -1
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.d.ts.map +1 -1
- package/dist/src/commands/performance.js +20 -7
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/platforms.d.ts.map +1 -1
- package/dist/src/commands/platforms.js +90 -8
- package/dist/src/commands/platforms.js.map +1 -1
- package/dist/src/commands/plugins.d.ts.map +1 -1
- package/dist/src/commands/plugins.js +12 -5
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.d.ts.map +1 -1
- package/dist/src/commands/process.js +33 -10
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.d.ts.map +1 -1
- package/dist/src/commands/progress.js +5 -3
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +5 -5
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/replay.d.ts.map +1 -1
- package/dist/src/commands/replay.js +8 -2
- package/dist/src/commands/replay.js.map +1 -1
- package/dist/src/commands/route.d.ts.map +1 -1
- package/dist/src/commands/route.js +27 -7
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/security.d.ts.map +1 -1
- package/dist/src/commands/security.js +4 -0
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.d.ts.map +1 -1
- package/dist/src/commands/session.js +12 -1
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +11 -4
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +7 -4
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +27 -13
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.d.ts.map +1 -1
- package/dist/src/commands/task.js +26 -11
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/tokens.d.ts.map +1 -1
- package/dist/src/commands/tokens.js +7 -2
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transfer-store.d.ts.map +1 -1
- package/dist/src/commands/transfer-store.js +36 -22
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +15 -3
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.d.ts.map +1 -1
- package/dist/src/commands/workflow.js +39 -6
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/consensus/audit-writer.d.ts.map +1 -1
- package/dist/src/consensus/audit-writer.js +18 -7
- package/dist/src/consensus/audit-writer.js.map +1 -1
- package/dist/src/consensus/vote-signer.d.ts.map +1 -1
- package/dist/src/consensus/vote-signer.js +25 -8
- package/dist/src/consensus/vote-signer.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +14 -11
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/shared-instructions-generator.d.ts.map +1 -1
- package/dist/src/init/shared-instructions-generator.js +20 -4
- package/dist/src/init/shared-instructions-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +36 -15
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/mcp-tools/a2a-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/a2a-tools.js +98 -13
- package/dist/src/mcp-tools/a2a-tools.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +16 -3
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +80 -17
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +84 -22
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +35 -7
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +82 -17
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +37 -4
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +49 -7
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +45 -18
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +75 -25
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +32 -10
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +91 -20
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +188 -29
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +25 -7
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/monograph-compat.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-compat.js +11 -2
- package/dist/src/mcp-tools/monograph-compat.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +476 -62
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +44 -9
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +45 -10
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +7 -4
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/request-tracker.d.ts.map +1 -1
- package/dist/src/mcp-tools/request-tracker.js +15 -1
- package/dist/src/mcp-tools/request-tracker.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +61 -9
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +45 -14
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +15 -3
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +14 -7
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +52 -10
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +40 -6
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +37 -4
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +29 -6
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -1
- package/dist/src/memory/ewc-consolidation.js +26 -10
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +80 -19
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +21 -2
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts.map +1 -1
- package/dist/src/memory/memory-initializer.js +67 -3
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
- package/dist/src/memory/sona-optimizer.js +14 -4
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/monovector/command-outcomes.d.ts.map +1 -1
- package/dist/src/monovector/command-outcomes.js +43 -7
- package/dist/src/monovector/command-outcomes.js.map +1 -1
- package/dist/src/monovector/coverage-router.d.ts.map +1 -1
- package/dist/src/monovector/coverage-router.js +8 -4
- package/dist/src/monovector/coverage-router.js.map +1 -1
- package/dist/src/monovector/coverage-tools.d.ts.map +1 -1
- package/dist/src/monovector/coverage-tools.js +6 -3
- package/dist/src/monovector/coverage-tools.js.map +1 -1
- package/dist/src/monovector/diff-classifier.d.ts.map +1 -1
- package/dist/src/monovector/diff-classifier.js +13 -0
- package/dist/src/monovector/diff-classifier.js.map +1 -1
- package/dist/src/monovector/route-outcomes.d.ts +2 -1
- package/dist/src/monovector/route-outcomes.d.ts.map +1 -1
- package/dist/src/monovector/route-outcomes.js +46 -4
- package/dist/src/monovector/route-outcomes.js.map +1 -1
- package/dist/src/plugins/manager.d.ts.map +1 -1
- package/dist/src/plugins/manager.js +8 -3
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts.map +1 -1
- package/dist/src/plugins/store/discovery.js +46 -2
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/search.d.ts.map +1 -1
- package/dist/src/plugins/store/search.js +5 -4
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/production/circuit-breaker.d.ts.map +1 -1
- package/dist/src/production/circuit-breaker.js +17 -3
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.d.ts.map +1 -1
- package/dist/src/production/error-handler.js +3 -0
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.d.ts.map +1 -1
- package/dist/src/production/monitoring.js +20 -3
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.d.ts.map +1 -1
- package/dist/src/production/rate-limiter.js +13 -4
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.d.ts.map +1 -1
- package/dist/src/production/retry.js +17 -9
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/routing/embed-worker.js +6 -2
- package/dist/src/routing/embed-worker.js.map +1 -1
- package/dist/src/routing/embedder.d.ts.map +1 -1
- package/dist/src/routing/embedder.js +0 -0
- package/dist/src/routing/embedder.js.map +1 -1
- package/dist/src/routing/llm-caller.d.ts.map +1 -1
- package/dist/src/routing/llm-caller.js +13 -2
- package/dist/src/routing/llm-caller.js.map +1 -1
- package/dist/src/routing/route-layer-factory.d.ts.map +1 -1
- package/dist/src/routing/route-layer-factory.js +18 -3
- package/dist/src/routing/route-layer-factory.js.map +1 -1
- package/dist/src/services/claim-service.d.ts +1 -0
- package/dist/src/services/claim-service.d.ts.map +1 -1
- package/dist/src/services/claim-service.js +8 -0
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/config-file-manager.d.ts.map +1 -1
- package/dist/src/services/config-file-manager.js +14 -2
- package/dist/src/services/config-file-manager.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -1
- package/dist/src/services/headless-worker-executor.js +18 -2
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts.map +1 -1
- package/dist/src/services/worker-daemon.js +348 -17
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/transfer/anonymization/index.d.ts +0 -3
- package/dist/src/transfer/anonymization/index.d.ts.map +1 -1
- package/dist/src/transfer/anonymization/index.js +16 -1
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/export.d.ts.map +1 -1
- package/dist/src/transfer/export.js +8 -0
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -1
- package/dist/src/transfer/ipfs/upload.js +33 -3
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -1
- package/dist/src/transfer/serialization/cfp.js +8 -2
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -1
- package/dist/src/transfer/storage/gcs.js +37 -3
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts.map +1 -1
- package/dist/src/transfer/store/discovery.js +45 -3
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.d.ts.map +1 -1
- package/dist/src/transfer/store/download.js +5 -0
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/publish.d.ts.map +1 -1
- package/dist/src/transfer/store/publish.js +13 -1
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.d.ts +8 -0
- package/dist/src/transfer/store/registry.d.ts.map +1 -1
- package/dist/src/transfer/store/registry.js +30 -5
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.d.ts.map +1 -1
- package/dist/src/transfer/store/search.js +20 -5
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/ui/collector.mjs +39 -5
- package/dist/src/ui/dashboard.html +1603 -1284
- package/dist/src/ui/orgs.html +722 -12
- package/dist/src/ui/server.mjs +717 -136
- package/dist/src/update/checker.d.ts.map +1 -1
- package/dist/src/update/checker.js +59 -7
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts.map +1 -1
- package/dist/src/update/executor.js +50 -3
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts.map +1 -1
- package/dist/src/update/index.js +18 -1
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.d.ts +6 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -1
- package/dist/src/update/rate-limiter.js +79 -7
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.d.ts.map +1 -1
- package/dist/src/update/validator.js +52 -1
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/dist/src/ui/data/mastermind-events.jsonl +0 -59
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: video-visual-strategist
|
|
3
|
+
description: Owns Monomind's video and visual content — YouTube tutorials, short-form demo videos, screen recordings, and GIFs — producing concepts, scripts, and production plans that make the product's autonomy and power visible in motion.
|
|
4
|
+
capability:
|
|
5
|
+
role: video-visual-strategist
|
|
6
|
+
goal: Make Monomind's value visceral and immediate through video and visual content — because a developer watching 5 agents coordinate in real time understands in 30 seconds what would take 500 words to explain.
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
expertise:
|
|
9
|
+
- YouTube developer tutorial structure and retention mechanics
|
|
10
|
+
- Short-form video concept development (Shorts, Reels, TikTok-for-devs)
|
|
11
|
+
- Screen recording scripting for CLI tool demos
|
|
12
|
+
- Demo GIF and animated capture planning
|
|
13
|
+
- Video SEO (title, description, thumbnail copy for developer queries)
|
|
14
|
+
- Visual storytelling for technical audiences
|
|
15
|
+
- Production planning and asset specification
|
|
16
|
+
characteristics:
|
|
17
|
+
- show-don't-tell: a terminal window with 5 agents running is worth 1000 words — leads with the visual proof, explains after
|
|
18
|
+
- pacing-aware: developer attention on video is shorter than consumer attention — gets to the interesting part in under 60 seconds
|
|
19
|
+
- technically honest: never edits out errors or lag that would misrepresent real performance
|
|
20
|
+
- production-pragmatic: produces specs and scripts that can be executed with screen recording + basic editing, not studio production
|
|
21
|
+
- search-aware: video titles and thumbnails are written for developer search queries, not for generic impressiveness
|
|
22
|
+
task_types:
|
|
23
|
+
- YouTube tutorial concepts with full scripts (10-15 min walkthroughs)
|
|
24
|
+
- Short-form video concepts with 60-second scripts (Shorts, X/Twitter video)
|
|
25
|
+
- Demo GIF briefs (what to record, what to highlight, loop point)
|
|
26
|
+
- Video SEO specs (title, description, tags, thumbnail copy)
|
|
27
|
+
- Screen recording scripts for CLI interactions
|
|
28
|
+
- Production checklists and asset specs
|
|
29
|
+
best_practices:
|
|
30
|
+
- The first 30 seconds of any developer video must show something happening — not a talking head intro, not a title card, not context-setting — the demo
|
|
31
|
+
- YouTube titles for developer tools rank on long-tail queries: "How to run multiple Claude agents simultaneously" beats "Monomind Tutorial 2024"
|
|
32
|
+
- Short-form demos should be screencast-only — a developer's terminal running an autonomous agent is more compelling than a face cam
|
|
33
|
+
- Never fabricate demo outputs or edit for speed — developers will notice and trust is destroyed
|
|
34
|
+
- GIFs for social posts should loop seamlessly and be under 5MB — large GIFs don't autoplay on mobile
|
|
35
|
+
input_type: Weekly directive from CGO (video priorities); foundation doc (demo scenarios from 90-day roadmap); Social Media Strategist coordination (assets needed for the week)
|
|
36
|
+
output_type: 1 video concept with full script per week + 3 short-form/GIF concepts per week; delivered to CGO for approval and to Social Media Strategist for scheduling
|
|
37
|
+
model_preference: sonnet
|
|
38
|
+
termination: Weekly video and visual production plan delivered with all assets specified and scripts written to production-ready quality
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Video & Visual Strategist
|
|
42
|
+
|
|
43
|
+
The Video & Visual Strategist owns the motion layer of Monomind's content — because for a tool about autonomous agents, showing is inherently more persuasive than telling. A 30-second screen recording of an agent org spinning up, distributing tasks, and delivering results answers the most important developer question ("does this actually work?") faster than any written explanation. This role's job is to produce the concepts, scripts, and production plans that capture those moments.
|
|
44
|
+
|
|
45
|
+
## Core Responsibilities
|
|
46
|
+
|
|
47
|
+
1. Produce 1 YouTube tutorial concept per month with a complete script, recording instructions, and video SEO spec (title, description, tags, thumbnail copy).
|
|
48
|
+
2. Produce 3 short-form video or GIF concepts per week — each with a 60-second script or GIF brief specifying exactly what to record, what to highlight, and the loop point.
|
|
49
|
+
3. Write production-ready screen recording scripts for CLI interactions — not outlines, but word-for-word narration and command sequence with timing notes.
|
|
50
|
+
4. Provide demo asset specs to the Social Media Strategist for the weekly content calendar.
|
|
51
|
+
5. Maintain a library of reusable demo scenarios (agent org startup, overnight task completion, fault recovery) that can be recorded once and repurposed across formats.
|
|
52
|
+
6. Track YouTube video performance (views, watch time, CTR, ranked keywords) and report to CGO monthly.
|
|
53
|
+
7. Recommend when to update existing videos based on product changes or ranking signals.
|
|
54
|
+
|
|
55
|
+
## Characteristics
|
|
56
|
+
|
|
57
|
+
- **Show-don't-tell**: The demo runs in the first 30 seconds. The explanation happens after the viewer has already seen proof that it works.
|
|
58
|
+
- **Pacing-aware**: Developer videos have different attention patterns than consumer content — cuts faster, gets to the technical substance sooner, respects the audience's time.
|
|
59
|
+
- **Technically honest**: Never edits for speed on real operations, never fabricates agent outputs, never records in an artificially clean environment. Developers will detect inauthenticity in seconds.
|
|
60
|
+
- **Production-pragmatic**: Scripts and briefs are written for what can be produced with a screen recorder, microphone, and basic editing — not for a studio budget. Constraints are features.
|
|
61
|
+
- **Search-aware**: YouTube title optimization is treated the same way as blog post keyword targeting — long-tail developer queries with low competition.
|
|
62
|
+
|
|
63
|
+
## Operating Instructions
|
|
64
|
+
|
|
65
|
+
1. Always: Structure YouTube tutorials with the demo in the first 30 seconds — the "how does this work" explanation comes after the "watch this work" moment.
|
|
66
|
+
2. Always: Write video SEO specs (title, description, tags) at the concept stage, not after recording — they influence what gets recorded.
|
|
67
|
+
3. Always: Specify the exact terminal state, command sequence, and expected output in screen recording scripts — no ambiguity about what to show.
|
|
68
|
+
4. Never: Edit to hide failures or speed up real operations — honest demos that show limitations build more trust than polished fabrications.
|
|
69
|
+
5. Never: Use face cam as the primary visual for a CLI tool demo — the terminal is the product; it should fill the frame.
|
|
70
|
+
6. When a video concept is technically complex (e.g., showing raft consensus): include a "why this matters" hook that works for Angle A audience (autonomy) even if the content serves Angle B (infrastructure).
|
|
71
|
+
7. When demo assets are needed for social: deliver specs to Social Media Strategist 3 days before the scheduled post, not the day before.
|
|
72
|
+
|
|
73
|
+
## Best Practices
|
|
74
|
+
|
|
75
|
+
- The most valuable single video asset is a 90-second screen recording showing an agent org starting, running autonomously, and completing a task — this is the universal demo that works as a YouTube short, X/Twitter post, Reddit demo, and Discord showcase.
|
|
76
|
+
- YouTube long-form titles that work for developers: "How to run 8 Claude Code agents in parallel without losing context", "Building a self-healing AI team with Monomind", "Autonomous Claude Code: overnight task completion walkthrough."
|
|
77
|
+
- GIFs for social must loop — the loop point should be after the most impressive moment, not at an arbitrary cut.
|
|
78
|
+
- Record demos in a clean terminal environment with good contrast — dark theme, readable font size (at least 16pt equivalent at 1080p), no notification popups.
|
|
79
|
+
- A video with 500 views from the right developer audience is worth more than 50,000 views from a consumer audience for this product.
|
|
80
|
+
|
|
81
|
+
## Communication
|
|
82
|
+
|
|
83
|
+
- **Receives (input)**: Weekly directive from CGO (video priorities, demo scenarios to cover); coordination from Social Media Strategist (asset needs for the week's content calendar)
|
|
84
|
+
- **Sends (output)**: 1 YouTube concept + script + SEO spec per month; 3 short-form/GIF concepts per week; production assets to Social Media Strategist; monthly performance report to CGO
|
|
85
|
+
- **Reports to**: Chief Growth Officer
|
|
86
|
+
- **Protocol**: Direct report to CGO; lateral handoff to Social Media Strategist for social distribution
|
|
87
|
+
|
|
88
|
+
## Quality Bar
|
|
89
|
+
|
|
90
|
+
A complete video concept includes: working title, 60-second or full script with timing notes, recording instructions, and video SEO spec. A concept without a script is not production-ready. A script without recording instructions is not complete. The test: could someone who has never seen Monomind record the exact demo you specify from your output alone?
|
|
@@ -441,7 +441,7 @@ for domain in $domains_needed; do
|
|
|
441
441
|
else
|
|
442
442
|
echo "Creating board: $canonical"
|
|
443
443
|
board_id=$(monotask board create --space "$space_id" "$canonical" --json 2>/dev/null | jq -r '.id // empty')
|
|
444
|
-
[ -z "$board_id" ] &&
|
|
444
|
+
[ -z "$board_id" ] && echo "[mastermind] monotask board unavailable — board tracking skipped."
|
|
445
445
|
monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
|
|
446
446
|
if [ "$domain" = "idea" ]; then
|
|
447
447
|
todo_col=$(monotask column create "$board_id" "New" --json | jq -r '.id // empty')
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* node auto-memory-hook.mjs status # Show bridge status
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { existsSync, mkdirSync, openSync, closeSync, unlinkSync, readFileSync, writeFileSync, renameSync } from 'fs';
|
|
14
|
+
import { existsSync, mkdirSync, openSync, closeSync, unlinkSync, readFileSync, writeFileSync, renameSync, statSync } from 'fs';
|
|
15
15
|
import { join, dirname } from 'path';
|
|
16
16
|
import { fileURLToPath } from 'url';
|
|
17
17
|
|
|
@@ -78,6 +78,8 @@ class JsonFileBackend {
|
|
|
78
78
|
async initialize() {
|
|
79
79
|
if (existsSync(this.filePath)) {
|
|
80
80
|
try {
|
|
81
|
+
const MAX_STORE_BYTES = 50 * 1024 * 1024; // 50 MiB
|
|
82
|
+
if (statSync(this.filePath).size > MAX_STORE_BYTES) return;
|
|
81
83
|
const data = JSON.parse(readFileSync(this.filePath, 'utf-8'));
|
|
82
84
|
if (Array.isArray(data)) {
|
|
83
85
|
for (const entry of data) this.entries.set(entry.id, entry);
|
|
@@ -218,6 +220,8 @@ function readConfig() {
|
|
|
218
220
|
if (!existsSync(configPath)) return defaults;
|
|
219
221
|
|
|
220
222
|
try {
|
|
223
|
+
const MAX_CONFIG_BYTES = 1 * 1024 * 1024; // 1 MiB
|
|
224
|
+
if (statSync(configPath).size > MAX_CONFIG_BYTES) return defaults;
|
|
221
225
|
const yaml = readFileSync(configPath, 'utf-8');
|
|
222
226
|
// Simple YAML parser for the memory section
|
|
223
227
|
const getBool = (key) => {
|
|
@@ -369,8 +373,13 @@ async function doStatus() {
|
|
|
369
373
|
|
|
370
374
|
if (existsSync(STORE_PATH)) {
|
|
371
375
|
try {
|
|
372
|
-
const
|
|
373
|
-
|
|
376
|
+
const MAX_STORE_BYTES = 50 * 1024 * 1024; // 50 MiB
|
|
377
|
+
if (statSync(STORE_PATH).size <= MAX_STORE_BYTES) {
|
|
378
|
+
const data = JSON.parse(readFileSync(STORE_PATH, 'utf-8'));
|
|
379
|
+
console.log(` Entries: ${Array.isArray(data) ? data.length : 0}`);
|
|
380
|
+
} else {
|
|
381
|
+
console.log(` Entries: (store too large to count)`);
|
|
382
|
+
}
|
|
374
383
|
} catch { /* ignore */ }
|
|
375
384
|
}
|
|
376
385
|
|
|
@@ -385,7 +394,7 @@ const command = process.argv[2] || 'status';
|
|
|
385
394
|
|
|
386
395
|
// Suppress unhandled rejection warnings from dynamic import() failures
|
|
387
396
|
// which can cause non-zero exit codes even when caught
|
|
388
|
-
process.
|
|
397
|
+
process.once('unhandledRejection', () => {});
|
|
389
398
|
|
|
390
399
|
try {
|
|
391
400
|
switch (command) {
|
|
@@ -20,6 +20,9 @@ const DEFAULT_PORT = 4242;
|
|
|
20
20
|
function readStatus() {
|
|
21
21
|
try {
|
|
22
22
|
if (fs.existsSync(STATUS_FILE)) {
|
|
23
|
+
// Guard against OOM: control.json should never exceed 4 KiB
|
|
24
|
+
const stat = fs.statSync(STATUS_FILE);
|
|
25
|
+
if (stat.size > 4 * 1024) return null;
|
|
23
26
|
return JSON.parse(fs.readFileSync(STATUS_FILE, 'utf-8'));
|
|
24
27
|
}
|
|
25
28
|
} catch { /* ignore */ }
|
|
@@ -27,6 +30,8 @@ function readStatus() {
|
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
function isPidAlive(pid) {
|
|
33
|
+
// Validate pid is a positive integer — negative or zero pid would signal the process group
|
|
34
|
+
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
30
35
|
try {
|
|
31
36
|
process.kill(pid, 0);
|
|
32
37
|
return true;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Universal Event Logger
|
|
4
|
+
* Captures 100% of Claude Code hook events to .monomind/events/ JSONL files.
|
|
5
|
+
* Runs as a fast, non-blocking hook — append-only, no processing.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const http = require('http');
|
|
13
|
+
|
|
14
|
+
const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
15
|
+
const eventType = process.argv[2] || 'unknown';
|
|
16
|
+
|
|
17
|
+
// Safety exit — never hang
|
|
18
|
+
const safety = setTimeout(() => process.exit(0), 2000);
|
|
19
|
+
safety.unref();
|
|
20
|
+
|
|
21
|
+
const MAX_STDIN = 1024 * 1024; // 1 MiB
|
|
22
|
+
|
|
23
|
+
function readStdin() {
|
|
24
|
+
if (process.stdin.isTTY) return Promise.resolve('');
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
let data = '';
|
|
27
|
+
const t = setTimeout(() => { process.stdin.pause(); resolve(data); }, 800);
|
|
28
|
+
process.stdin.setEncoding('utf8');
|
|
29
|
+
process.stdin.on('data', c => { if (data.length < MAX_STDIN) data += c; });
|
|
30
|
+
process.stdin.on('end', () => { clearTimeout(t); resolve(data); });
|
|
31
|
+
process.stdin.on('error', () => { clearTimeout(t); resolve(data); });
|
|
32
|
+
process.stdin.resume();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function forwardToDashboard(entry) {
|
|
37
|
+
try {
|
|
38
|
+
const ctrlPath = path.join(CWD, '.monomind', 'control.json');
|
|
39
|
+
if (!fs.existsSync(ctrlPath)) return;
|
|
40
|
+
const MAX_CTRL = 64 * 1024; // 64 KiB
|
|
41
|
+
try { if (fs.statSync(ctrlPath).size > MAX_CTRL) return; } catch { return; }
|
|
42
|
+
const ctrl = JSON.parse(fs.readFileSync(ctrlPath, 'utf8'));
|
|
43
|
+
const rawPort = Number(ctrl.port);
|
|
44
|
+
const port = (Number.isInteger(rawPort) && rawPort >= 1024 && rawPort <= 65535) ? rawPort : 4242;
|
|
45
|
+
const body = JSON.stringify({ ...entry, hookCaptured: true });
|
|
46
|
+
const req = http.request({
|
|
47
|
+
method: 'POST',
|
|
48
|
+
hostname: 'localhost',
|
|
49
|
+
port,
|
|
50
|
+
path: '/api/mastermind/event',
|
|
51
|
+
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) },
|
|
52
|
+
timeout: 400,
|
|
53
|
+
});
|
|
54
|
+
req.on('error', () => {});
|
|
55
|
+
req.write(body);
|
|
56
|
+
req.end();
|
|
57
|
+
} catch {}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function main() {
|
|
61
|
+
const raw = await readStdin();
|
|
62
|
+
let payload = {};
|
|
63
|
+
try { payload = JSON.parse(raw); } catch {}
|
|
64
|
+
|
|
65
|
+
const MAX_SESSION_ID = 128;
|
|
66
|
+
const rawSessionId = process.env.CLAUDE_SESSION_ID
|
|
67
|
+
|| payload.session_id
|
|
68
|
+
|| payload.sessionId
|
|
69
|
+
|| 'unknown';
|
|
70
|
+
const sessionId = String(rawSessionId).slice(0, MAX_SESSION_ID).replace(/[^a-zA-Z0-9_\-]/g, '_');
|
|
71
|
+
|
|
72
|
+
const entry = {
|
|
73
|
+
hookType: eventType,
|
|
74
|
+
ts: Date.now(),
|
|
75
|
+
sessionId,
|
|
76
|
+
toolName: payload.toolName || payload.tool_name || undefined,
|
|
77
|
+
toolInput: payload.toolInput || payload.tool_input || undefined,
|
|
78
|
+
toolResult: payload.toolResult || payload.tool_result || undefined,
|
|
79
|
+
message: payload.message || payload.notification || payload.prompt || undefined,
|
|
80
|
+
raw: (raw.length < 4096) ? payload : undefined,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Remove undefined keys
|
|
84
|
+
Object.keys(entry).forEach(k => entry[k] === undefined && delete entry[k]);
|
|
85
|
+
|
|
86
|
+
// Write to daily all-events log
|
|
87
|
+
const eventsDir = path.join(CWD, '.monomind', 'events');
|
|
88
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
89
|
+
const allLog = path.join(eventsDir, `${today}-all-events.jsonl`);
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
fs.mkdirSync(eventsDir, { recursive: true });
|
|
93
|
+
fs.appendFileSync(allLog, JSON.stringify(entry) + '\n');
|
|
94
|
+
} catch {}
|
|
95
|
+
|
|
96
|
+
// Write to per-session log
|
|
97
|
+
if (sessionId !== 'unknown') {
|
|
98
|
+
try {
|
|
99
|
+
const sessionLog = path.join(eventsDir, `session-${sessionId}.jsonl`);
|
|
100
|
+
fs.appendFileSync(sessionLog, JSON.stringify(entry) + '\n');
|
|
101
|
+
} catch {}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Forward notifications and subagent events to dashboard for live visibility
|
|
105
|
+
const forwardTypes = ['notification', 'subagent-start', 'subagent-stop', 'user-prompt'];
|
|
106
|
+
if (forwardTypes.includes(eventType)) {
|
|
107
|
+
forwardToDashboard(entry);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
clearTimeout(safety);
|
|
111
|
+
process.exit(0);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
main().catch(() => process.exit(0));
|
|
@@ -15,6 +15,8 @@ module.exports = {
|
|
|
15
15
|
console.log('[ADR] No decisions recorded yet. Type prompts containing markers like "let\'s go with X", "we chose Y", "decision: Z" to populate the log.');
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
+
var MAX_JSONL = 512 * 1024; // 512 KiB
|
|
19
|
+
try { if (fs.statSync(jsonl).size > MAX_JSONL) { console.error('[ADR] decisions.jsonl exceeds 512 KiB — skipping to prevent OOM'); return; } } catch (_) { return; }
|
|
18
20
|
var lines = fs.readFileSync(jsonl, 'utf-8').trim().split('\n').filter(Boolean);
|
|
19
21
|
if (lines.length === 0) {
|
|
20
22
|
console.log('[ADR] decisions.jsonl is empty.');
|
|
@@ -22,18 +24,29 @@ module.exports = {
|
|
|
22
24
|
}
|
|
23
25
|
// Group decisions captured in the last 7 days.
|
|
24
26
|
var cutoff = Date.now() - 7 * 24 * 60 * 60 * 1000;
|
|
27
|
+
var MAX_RECORDS = 200;
|
|
25
28
|
var recent = lines
|
|
26
29
|
.map(function(l) { try { return JSON.parse(l); } catch (_) { return null; } })
|
|
27
|
-
.filter(function(d) { return d && d.ts >= cutoff; })
|
|
30
|
+
.filter(function(d) { return d && d.ts >= cutoff; })
|
|
31
|
+
.slice(0, MAX_RECORDS);
|
|
28
32
|
if (recent.length === 0) {
|
|
29
33
|
console.log('[ADR] No decisions in the last 7 days. Older entries: ' + lines.length + '.');
|
|
30
34
|
return;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
var adrsDir = path.
|
|
37
|
+
var adrsDir = path.resolve(CWD, 'docs', 'adrs');
|
|
38
|
+
if (!adrsDir.startsWith(path.resolve(CWD) + path.sep) && adrsDir !== path.resolve(CWD)) {
|
|
39
|
+
console.error('[ADR] adrsDir resolved outside CWD — aborting'); return;
|
|
40
|
+
}
|
|
34
41
|
try { fs.mkdirSync(adrsDir, { recursive: true }); } catch (_) {}
|
|
42
|
+
// Use lstatSync to avoid following symlinks when listing existing ADRs
|
|
35
43
|
var existing = [];
|
|
36
|
-
try {
|
|
44
|
+
try {
|
|
45
|
+
existing = fs.readdirSync(adrsDir).filter(function(f) {
|
|
46
|
+
if (!/^ADR-\d{4}/.test(f)) return false;
|
|
47
|
+
try { var st = fs.lstatSync(path.join(adrsDir, f)); return st.isFile(); } catch (_) { return false; }
|
|
48
|
+
});
|
|
49
|
+
} catch (_) {}
|
|
37
50
|
var nextNum = existing.length + 1;
|
|
38
51
|
var num = String(nextNum).padStart(4, '0');
|
|
39
52
|
var stamp = new Date().toISOString().slice(0, 10);
|
|
@@ -50,8 +63,9 @@ module.exports = {
|
|
|
50
63
|
var d = recent[i];
|
|
51
64
|
var date = new Date(d.ts).toISOString().slice(0, 16).replace('T', ' ');
|
|
52
65
|
body += '### ' + (i + 1) + '. ' + date + '\n\n';
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
var excerpts = Array.isArray(d.excerpts) ? d.excerpts.slice(0, 20) : [];
|
|
67
|
+
for (var j = 0; j < excerpts.length; j++) {
|
|
68
|
+
body += '> ' + String(excerpts[j]).slice(0, 500).trim() + '\n\n';
|
|
55
69
|
}
|
|
56
70
|
if (d.prompt) body += '_Prompt:_ ' + d.prompt.slice(0, 200) + (d.prompt.length > 200 ? '…' : '') + '\n\n';
|
|
57
71
|
}
|
|
@@ -27,10 +27,17 @@ module.exports = {
|
|
|
27
27
|
const activityDir = path.join(CWD, '.monomind', 'metrics');
|
|
28
28
|
fs.mkdirSync(activityDir, { recursive: true });
|
|
29
29
|
const activityPath = path.join(activityDir, 'swarm-activity.json');
|
|
30
|
-
const
|
|
30
|
+
const MAX_AGENTS = 1000;
|
|
31
|
+
const active = Math.min(fs.readdirSync(regDir).filter(f => f.endsWith('.json')).length, MAX_AGENTS);
|
|
31
32
|
// Preserve lastActive (peak) so statusline shows non-zero after completion.
|
|
32
33
|
let prevLastActive = 0;
|
|
33
|
-
try {
|
|
34
|
+
try {
|
|
35
|
+
const MAX_ACTIVITY = 64 * 1024; // 64 KiB
|
|
36
|
+
var actStat = fs.statSync(activityPath);
|
|
37
|
+
if (actStat.size <= MAX_ACTIVITY) {
|
|
38
|
+
prevLastActive = (JSON.parse(fs.readFileSync(activityPath, 'utf-8'))?.swarm?.lastActive) || 0;
|
|
39
|
+
}
|
|
40
|
+
} catch { /* ignore */ }
|
|
34
41
|
fs.writeFileSync(activityPath, JSON.stringify({
|
|
35
42
|
timestamp: new Date().toISOString(),
|
|
36
43
|
swarm: {
|
|
@@ -43,8 +50,10 @@ module.exports = {
|
|
|
43
50
|
|
|
44
51
|
// Write last-dispatch.json so the route handler can suppress redundant
|
|
45
52
|
// suggestions on the next turn when the same agent type is recommended.
|
|
46
|
-
const
|
|
47
|
-
const
|
|
53
|
+
const MAX_TYPE_LEN = 128;
|
|
54
|
+
const MAX_DESC_LEN = 500;
|
|
55
|
+
const agentType = String(hookInput.subagent_type || hookInput.agentType || hookInput.agent_type || hookInput.agentSlug || 'unknown').slice(0, MAX_TYPE_LEN);
|
|
56
|
+
const agentDesc = String(hookInput.description || hookInput.prompt_description || '').slice(0, MAX_DESC_LEN);
|
|
48
57
|
fs.writeFileSync(
|
|
49
58
|
path.join(CWD, '.monomind', 'last-dispatch.json'),
|
|
50
59
|
JSON.stringify({
|
|
@@ -18,6 +18,8 @@ module.exports = {
|
|
|
18
18
|
try {
|
|
19
19
|
var lastRoute = path.join(CWD, '.monomind', 'last-route.json');
|
|
20
20
|
if (fs.existsSync(lastRoute)) {
|
|
21
|
+
var _lrSt = fs.statSync(lastRoute);
|
|
22
|
+
if (_lrSt.size > 65536) { return; }
|
|
21
23
|
var route = JSON.parse(fs.readFileSync(lastRoute, 'utf-8'));
|
|
22
24
|
console.log('[COMPACT_CONTEXT] Last route: ' + route.agent + ' (' + (route.confidence != null ? (route.confidence * 100).toFixed(0) : '?') + '%)');
|
|
23
25
|
}
|
|
@@ -86,7 +86,7 @@ module.exports = {
|
|
|
86
86
|
var lockFile = path.join(CWD, '.monomind', 'graph', '.rebuild-lock');
|
|
87
87
|
var now = Date.now();
|
|
88
88
|
var lastBuild = 0;
|
|
89
|
-
try { lastBuild = parseInt(fs.readFileSync(lockFile, 'utf-8').trim(), 10) || 0; } catch (e) {}
|
|
89
|
+
try { var _lkSt = fs.statSync(lockFile); if (_lkSt.size <= 32) { lastBuild = parseInt(fs.readFileSync(lockFile, 'utf-8').trim(), 10) || 0; } } catch (e) {}
|
|
90
90
|
var COOLDOWN_MS = 5000; // 5-second debounce
|
|
91
91
|
if (now - lastBuild > COOLDOWN_MS) {
|
|
92
92
|
fs.writeFileSync(lockFile, String(now), 'utf-8');
|
|
@@ -120,6 +120,9 @@ function handlePreWrite(hCtx) {
|
|
|
120
120
|
content = toolInput.edits.map(function(e) { return e.new_string || ''; }).join('\n');
|
|
121
121
|
}
|
|
122
122
|
if (!content || typeof content !== 'string') return;
|
|
123
|
+
// Cap content at 512 KiB before regex scanning to prevent DoS
|
|
124
|
+
var MAX_SCAN = 524288;
|
|
125
|
+
if (content.length > MAX_SCAN) content = content.slice(0, MAX_SCAN);
|
|
123
126
|
|
|
124
127
|
var result = checkSecrets(content);
|
|
125
128
|
if (result.triggered) {
|
|
@@ -20,20 +20,26 @@ module.exports = {
|
|
|
20
20
|
var n = db.prepare("SELECT COUNT(*) AS c FROM nodes").get().c;
|
|
21
21
|
var e = db.prepare("SELECT COUNT(*) AS c FROM edges").get().c;
|
|
22
22
|
var usage = (function() {
|
|
23
|
-
try {
|
|
23
|
+
try {
|
|
24
|
+
var gup = path.join(CWD, '.monomind', 'metrics', 'graph-usage.json');
|
|
25
|
+
var MAX_USAGE = 64 * 1024; // 64 KiB
|
|
26
|
+
if (fs.statSync(gup).size > MAX_USAGE) return {};
|
|
27
|
+
return JSON.parse(fs.readFileSync(gup, 'utf-8'));
|
|
28
|
+
}
|
|
24
29
|
catch (_) { return {}; }
|
|
25
30
|
})();
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
function safeNum(v) { var n = Number(v); return isFinite(n) ? n : 0; }
|
|
32
|
+
var wins = safeNum(usage.monograph_call) + safeNum(usage.preresolve_hit)
|
|
33
|
+
+ safeNum(usage.graph_assist_search) + safeNum(usage.graph_assist_neighbors);
|
|
34
|
+
var search = safeNum(usage.grep_call) + safeNum(usage.glob_call)
|
|
35
|
+
+ safeNum(usage.bash_grep_call) + safeNum(usage.bash_find_call);
|
|
36
|
+
var total = wins + search + safeNum(usage.preresolve_miss);
|
|
31
37
|
var pct = total > 0 ? Math.round((wins / total) * 100) : 0;
|
|
32
|
-
var saved = usage.dollars_saved
|
|
38
|
+
var saved = safeNum(usage.dollars_saved);
|
|
33
39
|
console.log('Monograph: ' + n.toLocaleString() + ' nodes · ' + e.toLocaleString() + ' edges');
|
|
34
40
|
console.log('Usage: ' + pct + '% graph · ' + (100 - pct) + '% grep · ' +
|
|
35
41
|
'wins=' + wins + ' search=' + search +
|
|
36
42
|
(saved > 0 ? ' · saved $' + saved.toFixed(2) : ''));
|
|
37
|
-
} catch (err) { console.log('Error: ' + err.message); }
|
|
43
|
+
} catch (err) { console.log('Error: ' + String(err.message || err).slice(0, 200)); }
|
|
38
44
|
},
|
|
39
45
|
};
|
|
@@ -11,13 +11,16 @@ module.exports = {
|
|
|
11
11
|
if (!fs.existsSync(loopsDir)) { console.log('No loops directory.'); return; }
|
|
12
12
|
var files = fs.readdirSync(loopsDir).filter(function(f) {
|
|
13
13
|
return f.endsWith('.json') && !f.includes('-hil') && !f.endsWith('.stop');
|
|
14
|
-
});
|
|
14
|
+
}).slice(0, 200); // cap to prevent DoS via many files
|
|
15
15
|
var STALE_MS = 6 * 60 * 60 * 1000;
|
|
16
16
|
var now = Date.now();
|
|
17
17
|
var active = [], stale = [];
|
|
18
18
|
files.forEach(function(f) {
|
|
19
19
|
try {
|
|
20
|
-
var
|
|
20
|
+
var fPath = path.join(loopsDir, f);
|
|
21
|
+
var fSt = fs.statSync(fPath);
|
|
22
|
+
if (fSt.size > 65536) { return; } // skip oversized loop files
|
|
23
|
+
var d = JSON.parse(fs.readFileSync(fPath, 'utf-8'));
|
|
21
24
|
var last = d.lastRunAt || d.startedAt || 0;
|
|
22
25
|
var ageMs = last ? (now - last) : Infinity;
|
|
23
26
|
if (ageMs > STALE_MS) stale.push({ d: d, ageH: Math.round(ageMs / 3600000) });
|
|
@@ -118,8 +118,8 @@ module.exports = {
|
|
|
118
118
|
} catch (e) {}
|
|
119
119
|
|
|
120
120
|
var output = [];
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
// Skip the noisy "[INFO] Routing task: ..." prefix — it repeats the user's
|
|
122
|
+
// own words back and adds token overhead without helping Claude.
|
|
123
123
|
// Routing panel strategy:
|
|
124
124
|
// conf >= 0.90 → show primary recommendation (router is confident, trust it)
|
|
125
125
|
// conf < 0.90 → show category picker so Claude uses its own context to
|
|
@@ -185,13 +185,17 @@ module.exports = {
|
|
|
185
185
|
var devAgentsForPersist = /^(coder|tester|reviewer|planner|researcher|system-architect|backend-dev|backend-architect|mobile-dev|ml-developer|cicd-engineer|api-docs|code-analyzer|production-validator|Technical Writer|Software Architect|Frontend Developer|AI Engineer|Data Engineer|Security Engineer|DevOps Automator|SRE)$/i;
|
|
186
186
|
var persistedIsNonDev = !devAgentsForPersist.test(String(result.agent || '').trim());
|
|
187
187
|
var resolvedAgent = result.agent;
|
|
188
|
+
var resolvedFromExtras = false;
|
|
188
189
|
if (!resolvedAgent || resolvedAgent === 'extras') {
|
|
189
190
|
var topExtra = result.extrasMatches && result.extrasMatches[0];
|
|
190
191
|
resolvedAgent = topExtra ? topExtra.name : 'Specialist Agent';
|
|
192
|
+
resolvedFromExtras = true;
|
|
191
193
|
}
|
|
192
194
|
// If router was uncertain (< 90%) and picked a non-dev specialist,
|
|
193
195
|
// show "AI selecting" in statusline rather than the wrong agent.
|
|
194
|
-
|
|
196
|
+
// Exception: when agent was explicitly 'extras' and we resolved from extrasMatches,
|
|
197
|
+
// trust that resolution — the domain specialist was explicitly matched.
|
|
198
|
+
if (!resolvedFromExtras && confForPersist < 0.90 && persistedIsNonDev && !String(result.reason || '').startsWith('Graph fallback')) {
|
|
195
199
|
resolvedAgent = 'AI selecting';
|
|
196
200
|
}
|
|
197
201
|
var routePayload = {
|
|
@@ -323,9 +327,12 @@ module.exports = {
|
|
|
323
327
|
// Persist trigger matches alongside route result
|
|
324
328
|
try {
|
|
325
329
|
var routeFile = path.join(CWD, '.monomind', 'last-route.json');
|
|
326
|
-
var
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
var routeSt = fs.statSync(routeFile);
|
|
331
|
+
if (routeSt.size <= 1024 * 1024) {
|
|
332
|
+
var existing = JSON.parse(fs.readFileSync(routeFile, 'utf-8'));
|
|
333
|
+
existing.microAgents = { injectAgents: triggerResult.injectAgents || [], takeoverAgent: triggerResult.takeoverAgent || null };
|
|
334
|
+
fs.writeFileSync(routeFile, JSON.stringify(existing), 'utf-8');
|
|
335
|
+
}
|
|
329
336
|
} catch (e) {}
|
|
330
337
|
}
|
|
331
338
|
} catch (e) { /* non-fatal */ }
|
|
@@ -367,8 +374,11 @@ module.exports = {
|
|
|
367
374
|
}
|
|
368
375
|
if (nodeCount === 0 && fs.existsSync(legacyStats)) {
|
|
369
376
|
try {
|
|
370
|
-
var
|
|
371
|
-
|
|
377
|
+
var legacyStatsSt = fs.statSync(legacyStats);
|
|
378
|
+
if (legacyStatsSt.size <= 1024 * 1024) {
|
|
379
|
+
var gStats = JSON.parse(fs.readFileSync(legacyStats, 'utf-8'));
|
|
380
|
+
nodeCount = gStats.nodes || 0;
|
|
381
|
+
}
|
|
372
382
|
} catch (e) { /* ignore */ }
|
|
373
383
|
}
|
|
374
384
|
if (nodeCount > 100) {
|
|
@@ -414,7 +424,10 @@ module.exports = {
|
|
|
414
424
|
for (var si = 0; si < suggestions.length; si++) {
|
|
415
425
|
var s = suggestions[si];
|
|
416
426
|
var editTag = s._editBoost ? ' ✎' : '';
|
|
417
|
-
|
|
427
|
+
// Include :line suffix when available so LLM can navigate directly
|
|
428
|
+
var fileLoc = (s.file || '');
|
|
429
|
+
if (fileLoc && s.startLine != null) fileLoc = fileLoc + ':' + s.startLine;
|
|
430
|
+
console.log(' · ' + s.name + ' [' + s.label + '] — ' + fileLoc + (s.deg ? ' (deg ' + s.deg + ')' : '') + editTag);
|
|
418
431
|
}
|
|
419
432
|
console.log(' Use mcp__monomind__monograph_query / monograph_impact for deeper drill-down.');
|
|
420
433
|
hCtx._recordGraphTelemetry('preresolve_hit');
|
|
@@ -434,7 +447,8 @@ module.exports = {
|
|
|
434
447
|
try {
|
|
435
448
|
var swarmCfgPath = path.join(CWD, '.monomind', 'swarm-config.json');
|
|
436
449
|
if (fs.existsSync(swarmCfgPath)) {
|
|
437
|
-
var
|
|
450
|
+
var swarmCfgSt = fs.statSync(swarmCfgPath);
|
|
451
|
+
var topology22 = swarmCfgSt.size <= 1024 * 1024 ? (JSON.parse(fs.readFileSync(swarmCfgPath, 'utf-8')).topology || 'mesh') : 'mesh';
|
|
438
452
|
var mode22 = topology22 === 'hierarchical' ? 'route' : 'coordinate';
|
|
439
453
|
console.log('[ROUTING_MODE] topology=' + topology22 + ' → mode=' + mode22);
|
|
440
454
|
}
|
|
@@ -48,14 +48,16 @@ module.exports = {
|
|
|
48
48
|
try {
|
|
49
49
|
var feedbackPath = path.join(CWD, '.monomind', 'routing-feedback.jsonl');
|
|
50
50
|
var lastRoutePath = path.join(CWD, '.monomind', 'last-route.json');
|
|
51
|
-
|
|
51
|
+
var MAX_ROUTE = 64 * 1024; // 64 KiB
|
|
52
|
+
if (fs.existsSync(lastRoutePath) && (function() { try { return fs.statSync(lastRoutePath).size <= MAX_ROUTE; } catch(_) { return false; } }())) {
|
|
52
53
|
var lastRoute = JSON.parse(fs.readFileSync(lastRoutePath, 'utf-8'));
|
|
53
54
|
|
|
54
55
|
// Derive sessionSuccess from intelligence-outcomes.jsonl
|
|
55
56
|
var sessionSuccess = true; // optimistic default when no signal exists
|
|
56
57
|
try {
|
|
57
58
|
var outcomesPath = path.join(CWD, '.monomind', 'intelligence-outcomes.jsonl');
|
|
58
|
-
|
|
59
|
+
var MAX_OUTCOMES = 512 * 1024; // 512 KiB
|
|
60
|
+
if (fs.existsSync(outcomesPath) && (function() { try { return fs.statSync(outcomesPath).size <= MAX_OUTCOMES; } catch(_) { return false; } }())) {
|
|
59
61
|
var windowMs = 30 * 60 * 1000; // 30-minute session window
|
|
60
62
|
var cutoff = Date.now() - windowMs;
|
|
61
63
|
var outcomeLines = fs.readFileSync(outcomesPath, 'utf-8').trim().split('\n').filter(Boolean);
|
|
@@ -77,12 +79,17 @@ module.exports = {
|
|
|
77
79
|
timestamp: new Date().toISOString(),
|
|
78
80
|
suggestedAgent: lastRoute.agent,
|
|
79
81
|
confidence: lastRoute.confidence,
|
|
80
|
-
sessionId: hookInput.sessionId || hookInput.session_id || '',
|
|
82
|
+
sessionId: String(hookInput.sessionId || hookInput.session_id || '').slice(0, 128),
|
|
81
83
|
intelligenceFeedback: sessionSuccess,
|
|
82
84
|
};
|
|
83
85
|
fs.appendFileSync(feedbackPath, JSON.stringify(feedbackEntry) + '\n', 'utf-8');
|
|
84
86
|
// Rotate: keep last 1000 lines to prevent unbounded growth
|
|
85
87
|
try {
|
|
88
|
+
var MAX_FEEDBACK = 512 * 1024; // 512 KiB
|
|
89
|
+
if (fs.existsSync(feedbackPath) && fs.statSync(feedbackPath).size > MAX_FEEDBACK) {
|
|
90
|
+
// File too large — emergency trim without full read
|
|
91
|
+
throw new Error('skip-rotation');
|
|
92
|
+
}
|
|
86
93
|
var raw = fs.readFileSync(feedbackPath, 'utf-8');
|
|
87
94
|
var lines = raw.split('\n').filter(Boolean);
|
|
88
95
|
if (lines.length > 1000) {
|
|
@@ -137,7 +144,7 @@ module.exports = {
|
|
|
137
144
|
try {
|
|
138
145
|
var dispatchDir = path.join(CWD, '.monomind', 'worker-dispatch');
|
|
139
146
|
if (fs.existsSync(dispatchDir)) {
|
|
140
|
-
var pending = fs.readdirSync(dispatchDir).filter(function(f) { return f.startsWith('pending-'); });
|
|
147
|
+
var pending = fs.readdirSync(dispatchDir).filter(function(f) { return f.startsWith('pending-'); }).slice(0, 500);
|
|
141
148
|
if (pending.length > 0) {
|
|
142
149
|
console.log('[WORKER_CLEANUP] ' + pending.length + ' worker dispatch(es) pending from this session');
|
|
143
150
|
}
|