monomind 1.6.0 → 1.6.1
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/bin/monomind.js +50 -0
- package/package.json +10 -69
- package/.claude/agents/academic/academic-anthropologist.md +0 -126
- package/.claude/agents/academic/academic-geographer.md +0 -128
- package/.claude/agents/academic/academic-historian.md +0 -124
- package/.claude/agents/academic/academic-narratologist.md +0 -119
- package/.claude/agents/academic/academic-psychologist.md +0 -119
- package/.claude/agents/analysis/analyze-code-quality.md +0 -58
- package/.claude/agents/analysis/code-analyzer.md +0 -189
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +0 -58
- package/.claude/agents/architecture/system-design/arch-system-design.md +0 -54
- package/.claude/agents/consensus/crdt-synchronizer.md +0 -977
- package/.claude/agents/consensus/performance-benchmarker.md +0 -831
- package/.claude/agents/consensus/quorum-manager.md +0 -803
- package/.claude/agents/consensus/security-manager.md +0 -602
- package/.claude/agents/core/coder.md +0 -262
- package/.claude/agents/core/planner.md +0 -170
- package/.claude/agents/core/researcher.md +0 -192
- package/.claude/agents/core/reviewer.md +0 -327
- package/.claude/agents/core/tester.md +0 -318
- package/.claude/agents/data/ml/data-ml-model.md +0 -76
- package/.claude/agents/design/design-brand-guardian.md +0 -323
- package/.claude/agents/design/design-image-prompt-engineer.md +0 -237
- package/.claude/agents/design/design-inclusive-visuals-specialist.md +0 -72
- package/.claude/agents/design/design-ui-designer.md +0 -384
- package/.claude/agents/design/design-ux-architect.md +0 -470
- package/.claude/agents/design/design-ux-researcher.md +0 -330
- package/.claude/agents/design/design-visual-storyteller.md +0 -150
- package/.claude/agents/design/design-whimsy-injector.md +0 -439
- package/.claude/agents/development/dev-backend-api.md +0 -178
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -52
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -63
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +0 -212
- package/.claude/agents/engineering/engineering-ai-engineer.md +0 -165
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -108
- package/.claude/agents/engineering/engineering-backend-architect.md +0 -254
- package/.claude/agents/engineering/engineering-code-reviewer.md +0 -95
- package/.claude/agents/engineering/engineering-data-engineer.md +0 -307
- package/.claude/agents/engineering/engineering-database-optimizer.md +0 -200
- package/.claude/agents/engineering/engineering-devops-automator.md +0 -430
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +0 -174
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +0 -607
- package/.claude/agents/engineering/engineering-frontend-developer.md +0 -249
- package/.claude/agents/engineering/engineering-git-workflow-master.md +0 -108
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -482
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +0 -499
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +0 -463
- package/.claude/agents/engineering/engineering-security-engineer.md +0 -303
- package/.claude/agents/engineering/engineering-senior-developer.md +0 -195
- package/.claude/agents/engineering/engineering-software-architect.md +0 -100
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +0 -528
- package/.claude/agents/engineering/engineering-sre.md +0 -114
- package/.claude/agents/engineering/engineering-technical-writer.md +0 -412
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -540
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +0 -351
- package/.claude/agents/game-development/blender/blender-addon-engineer.md +0 -235
- package/.claude/agents/game-development/game-audio-engineer.md +0 -265
- package/.claude/agents/game-development/game-designer.md +0 -168
- package/.claude/agents/game-development/godot/godot-gameplay-scripter.md +0 -335
- package/.claude/agents/game-development/godot/godot-multiplayer-engineer.md +0 -298
- package/.claude/agents/game-development/godot/godot-shader-developer.md +0 -267
- package/.claude/agents/game-development/level-designer.md +0 -209
- package/.claude/agents/game-development/narrative-designer.md +0 -244
- package/.claude/agents/game-development/roblox-studio/roblox-avatar-creator.md +0 -298
- package/.claude/agents/game-development/roblox-studio/roblox-experience-designer.md +0 -306
- package/.claude/agents/game-development/roblox-studio/roblox-systems-scripter.md +0 -326
- package/.claude/agents/game-development/technical-artist.md +0 -230
- package/.claude/agents/game-development/unity/unity-architect.md +0 -272
- package/.claude/agents/game-development/unity/unity-editor-tool-developer.md +0 -311
- package/.claude/agents/game-development/unity/unity-multiplayer-engineer.md +0 -322
- package/.claude/agents/game-development/unity/unity-shader-graph-artist.md +0 -270
- package/.claude/agents/game-development/unreal-engine/unreal-multiplayer-architect.md +0 -314
- package/.claude/agents/game-development/unreal-engine/unreal-systems-engineer.md +0 -311
- package/.claude/agents/game-development/unreal-engine/unreal-technical-artist.md +0 -257
- package/.claude/agents/game-development/unreal-engine/unreal-world-builder.md +0 -274
- package/.claude/agents/github/code-review-swarm.md +0 -557
- package/.claude/agents/github/github-modes.md +0 -154
- package/.claude/agents/github/issue-tracker.md +0 -299
- package/.claude/agents/github/multi-repo-swarm.md +0 -525
- package/.claude/agents/github/pr-manager.md +0 -163
- package/.claude/agents/github/project-board-sync.md +0 -478
- package/.claude/agents/github/release-manager.md +0 -352
- package/.claude/agents/github/release-swarm.md +0 -597
- package/.claude/agents/github/repo-architect.md +0 -378
- package/.claude/agents/github/swarm-issue.md +0 -548
- package/.claude/agents/github/swarm-pr.md +0 -427
- package/.claude/agents/github/sync-coordinator.md +0 -423
- package/.claude/agents/github/workflow-automation.md +0 -640
- package/.claude/agents/goal/agent.md +0 -804
- package/.claude/agents/goal/code-goal-planner.md +0 -445
- package/.claude/agents/goal/goal-planner.md +0 -168
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -129
- package/.claude/agents/hive-mind/queen-coordinator.md +0 -202
- package/.claude/agents/hive-mind/scout-explorer.md +0 -241
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -192
- package/.claude/agents/hive-mind/worker-specialist.md +0 -216
- package/.claude/agents/marketing/marketing-ai-citation-strategist.md +0 -171
- package/.claude/agents/marketing/marketing-app-store-optimizer.md +0 -322
- package/.claude/agents/marketing/marketing-baidu-seo-specialist.md +0 -227
- package/.claude/agents/marketing/marketing-bilibili-content-strategist.md +0 -200
- package/.claude/agents/marketing/marketing-book-co-author.md +0 -111
- package/.claude/agents/marketing/marketing-carousel-growth-engine.md +0 -200
- package/.claude/agents/marketing/marketing-china-ecommerce-operator.md +0 -284
- package/.claude/agents/marketing/marketing-content-creator.md +0 -54
- package/.claude/agents/marketing/marketing-cross-border-ecommerce.md +0 -260
- package/.claude/agents/marketing/marketing-douyin-strategist.md +0 -150
- package/.claude/agents/marketing/marketing-growth-hacker.md +0 -54
- package/.claude/agents/marketing/marketing-instagram-curator.md +0 -114
- package/.claude/agents/marketing/marketing-kuaishou-strategist.md +0 -224
- package/.claude/agents/marketing/marketing-linkedin-content-creator.md +0 -215
- package/.claude/agents/marketing/marketing-livestream-commerce-coach.md +0 -306
- package/.claude/agents/marketing/marketing-podcast-strategist.md +0 -278
- package/.claude/agents/marketing/marketing-private-domain-operator.md +0 -309
- package/.claude/agents/marketing/marketing-reddit-community-builder.md +0 -124
- package/.claude/agents/marketing/marketing-seo-specialist.md +0 -279
- package/.claude/agents/marketing/marketing-short-video-editing-coach.md +0 -413
- package/.claude/agents/marketing/marketing-social-media-strategist.md +0 -125
- package/.claude/agents/marketing/marketing-tiktok-strategist.md +0 -126
- package/.claude/agents/marketing/marketing-twitter-engager.md +0 -127
- package/.claude/agents/marketing/marketing-wechat-official-account.md +0 -146
- package/.claude/agents/marketing/marketing-weibo-strategist.md +0 -241
- package/.claude/agents/marketing/marketing-xiaohongshu-specialist.md +0 -139
- package/.claude/agents/marketing/marketing-zhihu-strategist.md +0 -163
- package/.claude/agents/neural/safla-neural.md +0 -74
- package/.claude/agents/optimization/benchmark-suite.md +0 -663
- package/.claude/agents/optimization/load-balancer.md +0 -429
- package/.claude/agents/optimization/performance-monitor.md +0 -670
- package/.claude/agents/optimization/resource-allocator.md +0 -672
- package/.claude/agents/optimization/topology-optimizer.md +0 -806
- package/.claude/agents/paid-media/paid-media-auditor.md +0 -71
- package/.claude/agents/paid-media/paid-media-creative-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-paid-social-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-ppc-strategist.md +0 -71
- package/.claude/agents/paid-media/paid-media-programmatic-buyer.md +0 -71
- package/.claude/agents/paid-media/paid-media-search-query-analyst.md +0 -71
- package/.claude/agents/paid-media/paid-media-tracking-specialist.md +0 -71
- package/.claude/agents/payments/agentic-payments.md +0 -126
- package/.claude/agents/product/product-behavioral-nudge-engine.md +0 -81
- package/.claude/agents/product/product-feedback-synthesizer.md +0 -119
- package/.claude/agents/product/product-manager.md +0 -469
- package/.claude/agents/product/product-sprint-prioritizer.md +0 -154
- package/.claude/agents/product/product-trend-researcher.md +0 -159
- package/.claude/agents/project-management/project-management-experiment-tracker.md +0 -199
- package/.claude/agents/project-management/project-management-jira-workflow-steward.md +0 -231
- package/.claude/agents/project-management/project-management-project-shepherd.md +0 -195
- package/.claude/agents/project-management/project-management-studio-operations.md +0 -201
- package/.claude/agents/project-management/project-management-studio-producer.md +0 -204
- package/.claude/agents/project-management/project-manager-senior.md +0 -136
- package/.claude/agents/reasoning/agent.md +0 -804
- package/.claude/agents/reasoning/goal-planner.md +0 -73
- package/.claude/agents/sales/sales-account-strategist.md +0 -228
- package/.claude/agents/sales/sales-coach.md +0 -272
- package/.claude/agents/sales/sales-deal-strategist.md +0 -181
- package/.claude/agents/sales/sales-discovery-coach.md +0 -226
- package/.claude/agents/sales/sales-engineer.md +0 -183
- package/.claude/agents/sales/sales-outbound-strategist.md +0 -202
- package/.claude/agents/sales/sales-pipeline-analyst.md +0 -268
- package/.claude/agents/sales/sales-proposal-strategist.md +0 -218
- package/.claude/agents/schemas/architecture-output.json +0 -43
- package/.claude/agents/schemas/code-review-output.json +0 -28
- package/.claude/agents/schemas/generic-task-input.json +0 -12
- package/.claude/agents/schemas/implementation-output.json +0 -18
- package/.claude/agents/schemas/research-output.json +0 -31
- package/.claude/agents/schemas/security-audit-output.json +0 -29
- package/.claude/agents/schemas/test-report-output.json +0 -29
- package/.claude/agents/sona/sona-learning-optimizer.md +0 -65
- package/.claude/agents/sparc/architecture.md +0 -453
- package/.claude/agents/sparc/pseudocode.md +0 -299
- package/.claude/agents/sparc/refinement.md +0 -504
- package/.claude/agents/sparc/specification.md +0 -258
- package/.claude/agents/spatial-computing/macos-spatial-metal-engineer.md +0 -338
- package/.claude/agents/spatial-computing/terminal-integration-specialist.md +0 -71
- package/.claude/agents/spatial-computing/visionos-spatial-engineer.md +0 -55
- package/.claude/agents/specialized/accounts-payable-agent.md +0 -186
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -388
- package/.claude/agents/specialized/agents-orchestrator.md +0 -368
- package/.claude/agents/specialized/automation-governance-architect.md +0 -217
- package/.claude/agents/specialized/blockchain-security-auditor.md +0 -497
- package/.claude/agents/specialized/compliance-auditor.md +0 -159
- package/.claude/agents/specialized/corporate-training-designer.md +0 -193
- package/.claude/agents/specialized/data-consolidation-agent.md +0 -61
- package/.claude/agents/specialized/government-digital-presales-consultant.md +0 -364
- package/.claude/agents/specialized/healthcare-marketing-compliance.md +0 -396
- package/.claude/agents/specialized/identity-graph-operator.md +0 -261
- package/.claude/agents/specialized/lsp-index-engineer.md +0 -315
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -89
- package/.claude/agents/specialized/recruitment-specialist.md +0 -510
- package/.claude/agents/specialized/report-distribution-agent.md +0 -66
- package/.claude/agents/specialized/sales-data-extraction-agent.md +0 -68
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -89
- package/.claude/agents/specialized/specialized-developer-advocate.md +0 -318
- package/.claude/agents/specialized/specialized-document-generator.md +0 -56
- package/.claude/agents/specialized/specialized-french-consulting-market.md +0 -193
- package/.claude/agents/specialized/specialized-korean-business-navigator.md +0 -217
- package/.claude/agents/specialized/specialized-mcp-builder.md +0 -64
- package/.claude/agents/specialized/specialized-model-qa.md +0 -489
- package/.claude/agents/specialized/specialized-salesforce-architect.md +0 -181
- package/.claude/agents/specialized/specialized-workflow-architect.md +0 -598
- package/.claude/agents/specialized/study-abroad-advisor.md +0 -283
- package/.claude/agents/specialized/supply-chain-strategist.md +0 -583
- package/.claude/agents/specialized/zk-steward.md +0 -212
- package/.claude/agents/sublinear/consensus-coordinator.md +0 -333
- package/.claude/agents/sublinear/matrix-optimizer.md +0 -180
- package/.claude/agents/sublinear/pagerank-analyzer.md +0 -295
- package/.claude/agents/sublinear/performance-optimizer.md +0 -363
- package/.claude/agents/sublinear/trading-predictor.md +0 -242
- package/.claude/agents/support/support-analytics-reporter.md +0 -366
- package/.claude/agents/support/support-executive-summary-generator.md +0 -213
- package/.claude/agents/support/support-finance-tracker.md +0 -443
- package/.claude/agents/support/support-infrastructure-maintainer.md +0 -619
- package/.claude/agents/support/support-legal-compliance-checker.md +0 -589
- package/.claude/agents/support/support-support-responder.md +0 -586
- package/.claude/agents/swarm/adaptive-coordinator.md +0 -364
- package/.claude/agents/swarm/hierarchical-coordinator.md +0 -318
- package/.claude/agents/swarm/mesh-coordinator.md +0 -363
- package/.claude/agents/templates/automation-smart-agent.md +0 -185
- package/.claude/agents/templates/coordinator-swarm-init.md +0 -83
- package/.claude/agents/templates/github-pr-manager.md +0 -155
- package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
- package/.claude/agents/templates/memory-coordinator.md +0 -163
- package/.claude/agents/templates/migration-plan.md +0 -724
- package/.claude/agents/templates/orchestrator-task.md +0 -120
- package/.claude/agents/templates/performance-analyzer.md +0 -179
- package/.claude/agents/templates/sparc-coordinator.md +0 -163
- package/.claude/agents/testing/production-validator.md +0 -374
- package/.claude/agents/testing/tdd-london-swarm.md +0 -241
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -322
- package/.claude/agents/testing/testing-api-tester.md +0 -307
- package/.claude/agents/testing/testing-evidence-collector.md +0 -211
- package/.claude/agents/testing/testing-performance-benchmarker.md +0 -269
- package/.claude/agents/testing/testing-reality-checker.md +0 -237
- package/.claude/agents/testing/testing-test-results-analyzer.md +0 -306
- package/.claude/agents/testing/testing-tool-evaluator.md +0 -395
- package/.claude/agents/testing/testing-workflow-optimizer.md +0 -451
- package/.claude/agents/v3/integration-architect.md +0 -338
- package/.claude/agents/v3/memory-specialist.md +0 -298
- package/.claude/agents/v3/performance-engineer.md +0 -387
- package/.claude/agents/v3/queen-coordinator.md +0 -67
- package/.claude/agents/v3/security-architect.md +0 -154
- package/.claude/checkpoints/1767754460.json +0 -8
- package/.claude/commands/agents/README.md +0 -10
- package/.claude/commands/agents/agent-capabilities.md +0 -21
- package/.claude/commands/agents/agent-coordination.md +0 -28
- package/.claude/commands/agents/agent-spawning.md +0 -28
- package/.claude/commands/agents/agent-types.md +0 -26
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
- package/.claude/commands/analysis/README.md +0 -9
- package/.claude/commands/analysis/bottleneck-detect.md +0 -162
- package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
- package/.claude/commands/analysis/performance-report.md +0 -25
- package/.claude/commands/analysis/token-efficiency.md +0 -45
- package/.claude/commands/analysis/token-usage.md +0 -25
- package/.claude/commands/automation/README.md +0 -9
- package/.claude/commands/automation/auto-agent.md +0 -122
- package/.claude/commands/automation/self-healing.md +0 -106
- package/.claude/commands/automation/session-memory.md +0 -90
- package/.claude/commands/automation/smart-agents.md +0 -73
- package/.claude/commands/automation/smart-spawn.md +0 -25
- package/.claude/commands/automation/workflow-select.md +0 -25
- package/.claude/commands/browse.md +0 -27
- package/.claude/commands/coordination/README.md +0 -9
- package/.claude/commands/coordination/agent-spawn.md +0 -25
- package/.claude/commands/coordination/init.md +0 -44
- package/.claude/commands/coordination/orchestrate.md +0 -43
- package/.claude/commands/coordination/spawn.md +0 -45
- package/.claude/commands/coordination/swarm-init.md +0 -85
- package/.claude/commands/coordination/task-orchestrate.md +0 -25
- package/.claude/commands/github/README.md +0 -11
- package/.claude/commands/github/code-review-swarm.md +0 -550
- package/.claude/commands/github/code-review.md +0 -25
- package/.claude/commands/github/github-modes.md +0 -147
- package/.claude/commands/github/github-swarm.md +0 -121
- package/.claude/commands/github/issue-tracker.md +0 -292
- package/.claude/commands/github/issue-triage.md +0 -25
- package/.claude/commands/github/multi-repo-swarm.md +0 -519
- package/.claude/commands/github/pr-enhance.md +0 -26
- package/.claude/commands/github/pr-manager.md +0 -170
- package/.claude/commands/github/project-board-sync.md +0 -471
- package/.claude/commands/github/release-manager.md +0 -355
- package/.claude/commands/github/release-swarm.md +0 -590
- package/.claude/commands/github/repo-analyze.md +0 -25
- package/.claude/commands/github/repo-architect.md +0 -381
- package/.claude/commands/github/swarm-issue.md +0 -482
- package/.claude/commands/github/swarm-pr.md +0 -310
- package/.claude/commands/github/sync-coordinator.md +0 -301
- package/.claude/commands/github/workflow-automation.md +0 -468
- package/.claude/commands/hive-mind/README.md +0 -17
- package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-init.md +0 -18
- package/.claude/commands/hive-mind/hive-mind-memory.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -21
- package/.claude/commands/hive-mind/hive-mind-status.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-stop.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
- package/.claude/commands/hive-mind/hive-mind.md +0 -27
- package/.claude/commands/hooks/README.md +0 -11
- package/.claude/commands/hooks/overview.md +0 -58
- package/.claude/commands/hooks/post-edit.md +0 -117
- package/.claude/commands/hooks/post-task.md +0 -112
- package/.claude/commands/hooks/pre-edit.md +0 -113
- package/.claude/commands/hooks/pre-task.md +0 -111
- package/.claude/commands/hooks/session-end.md +0 -118
- package/.claude/commands/hooks/setup.md +0 -103
- package/.claude/commands/list-agents.md +0 -17
- package/.claude/commands/mastermind.md +0 -121
- package/.claude/commands/memory/README.md +0 -9
- package/.claude/commands/memory/memory-persist.md +0 -25
- package/.claude/commands/memory/memory-search.md +0 -25
- package/.claude/commands/memory/memory-usage.md +0 -25
- package/.claude/commands/memory/neural.md +0 -47
- package/.claude/commands/metrics.md +0 -11
- package/.claude/commands/monitoring/README.md +0 -9
- package/.claude/commands/monitoring/agent-metrics.md +0 -25
- package/.claude/commands/monitoring/agents.md +0 -44
- package/.claude/commands/monitoring/real-time-view.md +0 -25
- package/.claude/commands/monitoring/status.md +0 -46
- package/.claude/commands/monitoring/swarm-monitor.md +0 -25
- package/.claude/commands/monobrain-help.md +0 -103
- package/.claude/commands/monobrain-memory.md +0 -107
- package/.claude/commands/monobrain-swarm.md +0 -205
- package/.claude/commands/monomind-do.md +0 -276
- package/.claude/commands/monomind-idea.md +0 -269
- package/.claude/commands/monomind-repeat.md +0 -95
- package/.claude/commands/optimization/README.md +0 -9
- package/.claude/commands/optimization/auto-topology.md +0 -62
- package/.claude/commands/optimization/cache-manage.md +0 -25
- package/.claude/commands/optimization/parallel-execution.md +0 -50
- package/.claude/commands/optimization/topology-optimize.md +0 -25
- package/.claude/commands/pair/README.md +0 -261
- package/.claude/commands/pair/commands.md +0 -546
- package/.claude/commands/pair/config.md +0 -510
- package/.claude/commands/pair/examples.md +0 -512
- package/.claude/commands/pair/modes.md +0 -348
- package/.claude/commands/pair/session.md +0 -407
- package/.claude/commands/pair/start.md +0 -209
- package/.claude/commands/sparc/analyzer.md +0 -52
- package/.claude/commands/sparc/architect.md +0 -53
- package/.claude/commands/sparc/ask.md +0 -97
- package/.claude/commands/sparc/batch-executor.md +0 -54
- package/.claude/commands/sparc/code.md +0 -89
- package/.claude/commands/sparc/coder.md +0 -54
- package/.claude/commands/sparc/debug.md +0 -83
- package/.claude/commands/sparc/debugger.md +0 -54
- package/.claude/commands/sparc/designer.md +0 -53
- package/.claude/commands/sparc/devops.md +0 -109
- package/.claude/commands/sparc/docs-writer.md +0 -80
- package/.claude/commands/sparc/documenter.md +0 -54
- package/.claude/commands/sparc/innovator.md +0 -54
- package/.claude/commands/sparc/integration.md +0 -83
- package/.claude/commands/sparc/mcp.md +0 -117
- package/.claude/commands/sparc/memory-manager.md +0 -54
- package/.claude/commands/sparc/optimizer.md +0 -54
- package/.claude/commands/sparc/orchestrator.md +0 -132
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -83
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -83
- package/.claude/commands/sparc/researcher.md +0 -54
- package/.claude/commands/sparc/reviewer.md +0 -54
- package/.claude/commands/sparc/security-review.md +0 -80
- package/.claude/commands/sparc/sparc-modes.md +0 -174
- package/.claude/commands/sparc/sparc.md +0 -111
- package/.claude/commands/sparc/spec-pseudocode.md +0 -80
- package/.claude/commands/sparc/supabase-admin.md +0 -348
- package/.claude/commands/sparc/swarm-coordinator.md +0 -54
- package/.claude/commands/sparc/tdd.md +0 -54
- package/.claude/commands/sparc/tester.md +0 -54
- package/.claude/commands/sparc/tutorial.md +0 -79
- package/.claude/commands/sparc/workflow-manager.md +0 -54
- package/.claude/commands/sparc.md +0 -166
- package/.claude/commands/stream-chain/pipeline.md +0 -121
- package/.claude/commands/stream-chain/run.md +0 -70
- package/.claude/commands/swarm/README.md +0 -15
- package/.claude/commands/swarm/analysis.md +0 -95
- package/.claude/commands/swarm/development.md +0 -96
- package/.claude/commands/swarm/examples.md +0 -168
- package/.claude/commands/swarm/maintenance.md +0 -102
- package/.claude/commands/swarm/optimization.md +0 -117
- package/.claude/commands/swarm/research.md +0 -136
- package/.claude/commands/swarm/swarm-analysis.md +0 -8
- package/.claude/commands/swarm/swarm-background.md +0 -8
- package/.claude/commands/swarm/swarm-modes.md +0 -8
- package/.claude/commands/swarm/swarm-monitor.md +0 -8
- package/.claude/commands/swarm/swarm-status.md +0 -8
- package/.claude/commands/swarm/swarm-strategies.md +0 -8
- package/.claude/commands/swarm/swarm.md +0 -27
- package/.claude/commands/swarm/testing.md +0 -131
- package/.claude/commands/tokens.md +0 -13
- package/.claude/commands/training/README.md +0 -9
- package/.claude/commands/training/model-update.md +0 -25
- package/.claude/commands/training/neural-patterns.md +0 -74
- package/.claude/commands/training/neural-train.md +0 -25
- package/.claude/commands/training/pattern-learn.md +0 -25
- package/.claude/commands/training/specialization.md +0 -63
- package/.claude/commands/truth/start.md +0 -143
- package/.claude/commands/ts.md +0 -9
- package/.claude/commands/use-agent.md +0 -67
- package/.claude/commands/verify/check.md +0 -50
- package/.claude/commands/verify/start.md +0 -128
- package/.claude/commands/workflows/README.md +0 -9
- package/.claude/commands/workflows/development.md +0 -78
- package/.claude/commands/workflows/research.md +0 -63
- package/.claude/commands/workflows/workflow-create.md +0 -25
- package/.claude/commands/workflows/workflow-execute.md +0 -25
- package/.claude/commands/workflows/workflow-export.md +0 -25
- package/.claude/config/v1-dependency-optimization.json +0 -266
- package/.claude/config/v1-performance-targets.json +0 -251
- package/.claude/helpers/README.md +0 -105
- package/.claude/helpers/auto-memory-hook.mjs +0 -369
- package/.claude/helpers/context-persistence-hook.mjs +0 -1988
- package/.claude/helpers/extras-registry.json +0 -3028
- package/.claude/helpers/graphify-freshen.cjs +0 -109
- package/.claude/helpers/hook-handler.cjs +0 -1446
- package/.claude/helpers/intelligence.cjs +0 -227
- package/.claude/helpers/learning-service.mjs +0 -1144
- package/.claude/helpers/memory-palace.cjs +0 -401
- package/.claude/helpers/memory.cjs +0 -84
- package/.claude/helpers/metrics-db.mjs +0 -488
- package/.claude/helpers/router.cjs +0 -306
- package/.claude/helpers/session.cjs +0 -125
- package/.claude/helpers/skill-registry.json +0 -961
- package/.claude/helpers/statusline.cjs +0 -1276
- package/.claude/helpers/swarm-hooks.sh +0 -761
- package/.claude/helpers/toggle-statusline.cjs +0 -58
- package/.claude/helpers/token-tracker.cjs +0 -934
- package/.claude/mcp.json +0 -3
- package/.claude/settings.json +0 -303
- package/.claude/settings.local.json +0 -48
- package/.claude/skills/agent-browser-testing/SKILL.md +0 -312
- package/.claude/skills/agentdb-advanced/SKILL.md +0 -550
- package/.claude/skills/agentdb-learning/SKILL.md +0 -545
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -339
- package/.claude/skills/agentdb-optimization/SKILL.md +0 -509
- package/.claude/skills/agentdb-vector-search/SKILL.md +0 -339
- package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/.claude/skills/github-code-review/SKILL.md +0 -1148
- package/.claude/skills/github-multi-repo/SKILL.md +0 -916
- package/.claude/skills/github-project-management/SKILL.md +0 -1250
- package/.claude/skills/github-release-management/SKILL.md +0 -1124
- package/.claude/skills/github-workflow-automation/SKILL.md +0 -1111
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -709
- package/.claude/skills/hooks-automation/SKILL.md +0 -1200
- package/.claude/skills/pair-programming/SKILL.md +0 -1202
- package/.claude/skills/performance-analysis/SKILL.md +0 -560
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -446
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -201
- package/.claude/skills/skill-builder/SKILL.md +0 -910
- package/.claude/skills/sparc-methodology/SKILL.md +0 -1106
- package/.claude/skills/specialagent/SKILL.md +0 -208
- package/.claude/skills/stream-chain/SKILL.md +0 -560
- package/.claude/skills/swarm-advanced/SKILL.md +0 -970
- package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
- package/.claude/skills/v3-cli-modernization/SKILL.md +0 -941
- package/.claude/skills/v3-core-implementation/SKILL.md +0 -867
- package/.claude/skills/v3-ddd-architecture/SKILL.md +0 -451
- package/.claude/skills/v3-integration-deep/SKILL.md +0 -258
- package/.claude/skills/v3-mcp-optimization/SKILL.md +0 -816
- package/.claude/skills/v3-memory-unification/SKILL.md +0 -180
- package/.claude/skills/v3-performance-optimization/SKILL.md +0 -408
- package/.claude/skills/v3-security-overhaul/SKILL.md +0 -91
- package/.claude/skills/v3-swarm-coordination/SKILL.md +0 -433
- package/.claude/skills/verification-quality/SKILL.md +0 -674
- package/.claude/statusline-command.sh +0 -176
- package/.claude/statusline.mjs +0 -109
- package/.claude/statusline.sh +0 -431
- package/.claude/workflows/feature-dev.yaml +0 -18
- package/.claude/workflows/security-audit.yaml +0 -10
- package/.claude-plugin/README.md +0 -705
- package/.claude-plugin/docs/INSTALLATION.md +0 -258
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -359
- package/.claude-plugin/docs/QUICKSTART.md +0 -360
- package/.claude-plugin/docs/STRUCTURE.md +0 -126
- package/.claude-plugin/hooks/hooks.json +0 -74
- package/.claude-plugin/marketplace.json +0 -98
- package/.claude-plugin/plugin.json +0 -70
- package/.claude-plugin/scripts/install.sh +0 -234
- package/.claude-plugin/scripts/uninstall.sh +0 -36
- package/.claude-plugin/scripts/verify.sh +0 -108
- package/LICENSE +0 -21
- package/README.md +0 -687
- package/bin/cli.js +0 -11
- package/bin/npx-safe-launch.js +0 -9
- package/packages/@monomind/cli/README.md +0 -687
- package/packages/@monomind/cli/bin/cli.js +0 -156
- package/packages/@monomind/cli/bin/mcp-server.js +0 -189
- package/packages/@monomind/cli/bin/preinstall.cjs +0 -2
- package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/agents/halt-signal.js +0 -50
- package/packages/@monomind/cli/dist/src/agents/index.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/agents/index.js +0 -13
- package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +0 -41
- package/packages/@monomind/cli/dist/src/agents/managed-agent.js +0 -66
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +0 -49
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +0 -58
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +0 -36
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +0 -200
- package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +0 -71
- package/packages/@monomind/cli/dist/src/agents/registry-query.js +0 -125
- package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/agents/score-decay.js +0 -22
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +0 -40
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +0 -54
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +0 -204
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +0 -30
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +0 -84
- package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +0 -20
- package/packages/@monomind/cli/dist/src/agents/trigger-index.js +0 -38
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +0 -62
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +0 -260
- package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/agents/version-diff.js +0 -64
- package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +0 -61
- package/packages/@monomind/cli/dist/src/agents/version-store.js +0 -212
- package/packages/@monomind/cli/dist/src/autopilot-state.d.ts +0 -77
- package/packages/@monomind/cli/dist/src/autopilot-state.js +0 -279
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +0 -82
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +0 -261
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.d.ts +0 -35
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.js +0 -91
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +0 -404
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +0 -333
- package/packages/@monomind/cli/dist/src/commands/agent.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/agent.js +0 -941
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/commands/analyze.js +0 -2048
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.js +0 -215
- 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/autopilot.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/commands/autopilot.js +0 -362
- package/packages/@monomind/cli/dist/src/commands/benchmark.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/benchmark.js +0 -460
- package/packages/@monomind/cli/dist/src/commands/claims.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/claims.js +0 -624
- package/packages/@monomind/cli/dist/src/commands/cleanup.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/commands/cleanup.js +0 -218
- package/packages/@monomind/cli/dist/src/commands/completions.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/completions.js +0 -539
- package/packages/@monomind/cli/dist/src/commands/config.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/config.js +0 -428
- package/packages/@monomind/cli/dist/src/commands/daemon.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/daemon.js +0 -669
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -672
- package/packages/@monomind/cli/dist/src/commands/doctor.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/doctor.js +0 -619
- package/packages/@monomind/cli/dist/src/commands/embeddings.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/embeddings.js +0 -1576
- package/packages/@monomind/cli/dist/src/commands/guidance.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/guidance.js +0 -560
- package/packages/@monomind/cli/dist/src/commands/hive-mind.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +0 -1237
- package/packages/@monomind/cli/dist/src/commands/hooks.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/hooks.js +0 -4442
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -117
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -391
- package/packages/@monomind/cli/dist/src/commands/init.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/init.js +0 -817
- package/packages/@monomind/cli/dist/src/commands/issues.d.ts +0 -21
- package/packages/@monomind/cli/dist/src/commands/issues.js +0 -567
- package/packages/@monomind/cli/dist/src/commands/mcp.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/mcp.js +0 -718
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/memory.js +0 -1565
- package/packages/@monomind/cli/dist/src/commands/migrate.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/migrate.js +0 -742
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/neural.js +0 -1454
- package/packages/@monomind/cli/dist/src/commands/performance.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/performance.js +0 -579
- package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/plugins.js +0 -820
- package/packages/@monomind/cli/dist/src/commands/process.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/process.js +0 -695
- package/packages/@monomind/cli/dist/src/commands/progress.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/progress.js +0 -259
- package/packages/@monomind/cli/dist/src/commands/providers.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/providers.js +0 -359
- package/packages/@monomind/cli/dist/src/commands/replay.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/replay.js +0 -60
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/commands/route.js +0 -907
- package/packages/@monomind/cli/dist/src/commands/ruvector/backup.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/backup.js +0 -746
- package/packages/@monomind/cli/dist/src/commands/ruvector/benchmark.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/benchmark.js +0 -489
- package/packages/@monomind/cli/dist/src/commands/ruvector/import.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/ruvector/import.js +0 -349
- package/packages/@monomind/cli/dist/src/commands/ruvector/index.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/commands/ruvector/index.js +0 -129
- package/packages/@monomind/cli/dist/src/commands/ruvector/init.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/init.js +0 -466
- package/packages/@monomind/cli/dist/src/commands/ruvector/migrate.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/migrate.js +0 -497
- package/packages/@monomind/cli/dist/src/commands/ruvector/optimize.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/optimize.js +0 -504
- package/packages/@monomind/cli/dist/src/commands/ruvector/setup.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/ruvector/setup.js +0 -765
- package/packages/@monomind/cli/dist/src/commands/ruvector/status.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/status.js +0 -478
- package/packages/@monomind/cli/dist/src/commands/security.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/security.js +0 -794
- package/packages/@monomind/cli/dist/src/commands/session.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/session.js +0 -750
- package/packages/@monomind/cli/dist/src/commands/start.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/start.js +0 -418
- package/packages/@monomind/cli/dist/src/commands/status.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/status.js +0 -591
- package/packages/@monomind/cli/dist/src/commands/swarm.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/swarm.js +0 -801
- package/packages/@monomind/cli/dist/src/commands/task.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/task.js +0 -671
- package/packages/@monomind/cli/dist/src/commands/tokens.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/tokens.js +0 -107
- package/packages/@monomind/cli/dist/src/commands/transfer-store.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/commands/transfer-store.js +0 -428
- package/packages/@monomind/cli/dist/src/commands/ui.js +0 -68
- package/packages/@monomind/cli/dist/src/commands/update.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/update.js +0 -276
- package/packages/@monomind/cli/dist/src/commands/workflow.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/workflow.js +0 -617
- package/packages/@monomind/cli/dist/src/config-adapter.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/config-adapter.js +0 -186
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.d.ts +0 -50
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.js +0 -109
- package/packages/@monomind/cli/dist/src/consensus/index.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/consensus/index.js +0 -6
- package/packages/@monomind/cli/dist/src/consensus/vote-signer.d.ts +0 -39
- package/packages/@monomind/cli/dist/src/consensus/vote-signer.js +0 -63
- package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/context/context-provider.js +0 -25
- package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/context/git-state-provider.js +0 -34
- package/packages/@monomind/cli/dist/src/context/index.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/context/index.js +0 -12
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +0 -19
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +0 -93
- package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/context/task-history-provider.js +0 -32
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +0 -27
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +0 -64
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +0 -20
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.js +0 -56
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +0 -43
- package/packages/@monomind/cli/dist/src/dlq/index.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/dlq/index.js +0 -7
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +0 -97
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +0 -23
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +0 -59
- package/packages/@monomind/cli/dist/src/eval/index.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/eval/index.js +0 -7
- package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +0 -40
- package/packages/@monomind/cli/dist/src/eval/trace-collector.js +0 -82
- package/packages/@monomind/cli/dist/src/index.d.ts +0 -82
- package/packages/@monomind/cli/dist/src/index.js +0 -578
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +0 -264
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +0 -522
- package/packages/@monomind/cli/dist/src/init/executor.d.ts +0 -38
- package/packages/@monomind/cli/dist/src/init/executor.js +0 -1919
- package/packages/@monomind/cli/dist/src/init/helpers-generator.d.ts +0 -60
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +0 -1222
- package/packages/@monomind/cli/dist/src/init/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/init/index.js +0 -15
- package/packages/@monomind/cli/dist/src/init/mcp-generator.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/init/mcp-generator.js +0 -99
- package/packages/@monomind/cli/dist/src/init/settings-generator.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -392
- package/packages/@monomind/cli/dist/src/init/statusline-generator.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +0 -1157
- package/packages/@monomind/cli/dist/src/init/types.d.ts +0 -291
- package/packages/@monomind/cli/dist/src/init/types.js +0 -258
- package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/interactive/interrupt.js +0 -66
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +0 -48
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +0 -61
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +0 -212
- package/packages/@monomind/cli/dist/src/mcp-client.d.ts +0 -92
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -261
- package/packages/@monomind/cli/dist/src/mcp-server.d.ts +0 -163
- package/packages/@monomind/cli/dist/src/mcp-server.js +0 -682
- package/packages/@monomind/cli/dist/src/mcp-tools/a2a-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/a2a-tools.js +0 -244
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -564
- package/packages/@monomind/cli/dist/src/mcp-tools/agentdb-tools.d.ts +0 -30
- package/packages/@monomind/cli/dist/src/mcp-tools/agentdb-tools.js +0 -569
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.d.ts +0 -38
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +0 -317
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +0 -83
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +0 -131
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.js +0 -227
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +0 -550
- package/packages/@monomind/cli/dist/src/mcp-tools/claims-tools.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/mcp-tools/claims-tools.js +0 -747
- package/packages/@monomind/cli/dist/src/mcp-tools/config-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/config-tools.js +0 -353
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.js +0 -673
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.js +0 -473
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +0 -782
- package/packages/@monomind/cli/dist/src/mcp-tools/github-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/github-tools.js +0 -472
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.d.ts +0 -73
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.js +0 -1235
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +0 -618
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +0 -877
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +0 -3397
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -38
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -40
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +0 -514
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +0 -634
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +0 -643
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +0 -348
- package/packages/@monomind/cli/dist/src/mcp-tools/request-tracker.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/request-tracker.js +0 -27
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.js +0 -284
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +0 -434
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.js +0 -338
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.js +0 -289
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.js +0 -551
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.js +0 -406
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +0 -260
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.js +0 -396
- package/packages/@monomind/cli/dist/src/mcp-tools/types.d.ts +0 -37
- package/packages/@monomind/cli/dist/src/mcp-tools/types.js +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +0 -230
- package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.js +0 -562
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.d.ts +0 -295
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.js +0 -601
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +0 -338
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +0 -1023
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +0 -409
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +0 -1561
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +0 -414
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +0 -2222
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.d.ts +0 -227
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.js +0 -633
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +0 -21
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +0 -106
- package/packages/@monomind/cli/dist/src/model/index.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/model/index.js +0 -4
- package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/model/model-settings.js +0 -33
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +0 -65
- package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/orchestration/index.js +0 -6
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +0 -31
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +0 -68
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +0 -150
- package/packages/@monomind/cli/dist/src/output.d.ts +0 -133
- package/packages/@monomind/cli/dist/src/output.js +0 -514
- package/packages/@monomind/cli/dist/src/parser.d.ts +0 -51
- package/packages/@monomind/cli/dist/src/parser.js +0 -425
- package/packages/@monomind/cli/dist/src/plugins/manager.d.ts +0 -133
- package/packages/@monomind/cli/dist/src/plugins/manager.js +0 -400
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.d.ts +0 -88
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -841
- package/packages/@monomind/cli/dist/src/plugins/store/index.d.ts +0 -76
- package/packages/@monomind/cli/dist/src/plugins/store/index.js +0 -141
- package/packages/@monomind/cli/dist/src/plugins/store/search.d.ts +0 -46
- package/packages/@monomind/cli/dist/src/plugins/store/search.js +0 -230
- package/packages/@monomind/cli/dist/src/plugins/store/types.d.ts +0 -274
- package/packages/@monomind/cli/dist/src/plugins/store/types.js +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.d.ts +0 -101
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.js +0 -241
- package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +0 -92
- package/packages/@monomind/cli/dist/src/production/error-handler.js +0 -299
- package/packages/@monomind/cli/dist/src/production/index.d.ts +0 -23
- package/packages/@monomind/cli/dist/src/production/index.js +0 -18
- package/packages/@monomind/cli/dist/src/production/monitoring.d.ts +0 -161
- package/packages/@monomind/cli/dist/src/production/monitoring.js +0 -356
- package/packages/@monomind/cli/dist/src/production/rate-limiter.d.ts +0 -80
- package/packages/@monomind/cli/dist/src/production/rate-limiter.js +0 -201
- package/packages/@monomind/cli/dist/src/production/retry.d.ts +0 -48
- package/packages/@monomind/cli/dist/src/production/retry.js +0 -179
- package/packages/@monomind/cli/dist/src/prompt.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/prompt.js +0 -501
- package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +0 -60
- package/packages/@monomind/cli/dist/src/runtime/headless.js +0 -284
- 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 -529
- 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/diff-classifier.d.ts +0 -175
- package/packages/@monomind/cli/dist/src/ruvector/diff-classifier.js +0 -698
- 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 -529
- 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 -40
- package/packages/@monomind/cli/dist/src/ruvector/index.js +0 -76
- 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 -220
- package/packages/@monomind/cli/dist/src/ruvector/model-router.js +0 -488
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.d.ts +0 -206
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.js +0 -626
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.d.ts +0 -211
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.js +0 -681
- 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/agentic-flow-bridge.d.ts +0 -50
- package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +0 -95
- package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +0 -204
- package/packages/@monomind/cli/dist/src/services/claim-service.js +0 -818
- package/packages/@monomind/cli/dist/src/services/config-file-manager.d.ts +0 -37
- package/packages/@monomind/cli/dist/src/services/config-file-manager.js +0 -224
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +0 -197
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +0 -583
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.d.ts +0 -304
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.js +0 -1024
- package/packages/@monomind/cli/dist/src/services/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/services/index.js +0 -11
- package/packages/@monomind/cli/dist/src/services/registry-api.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/services/registry-api.js +0 -146
- package/packages/@monomind/cli/dist/src/services/ruvector-training.d.ts +0 -222
- package/packages/@monomind/cli/dist/src/services/ruvector-training.js +0 -688
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +0 -245
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -999
- package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +0 -194
- package/packages/@monomind/cli/dist/src/services/worker-queue.js +0 -513
- package/packages/@monomind/cli/dist/src/suggest.d.ts +0 -53
- package/packages/@monomind/cli/dist/src/suggest.js +0 -200
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +0 -77
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +0 -49
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +0 -44
- package/packages/@monomind/cli/dist/src/transfer/anonymization/index.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/transfer/anonymization/index.js +0 -175
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +0 -205
- package/packages/@monomind/cli/dist/src/transfer/export.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/transfer/export.js +0 -113
- package/packages/@monomind/cli/dist/src/transfer/index.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/transfer/index.js +0 -31
- package/packages/@monomind/cli/dist/src/transfer/ipfs/client.d.ts +0 -109
- package/packages/@monomind/cli/dist/src/transfer/ipfs/client.js +0 -307
- package/packages/@monomind/cli/dist/src/transfer/ipfs/upload.d.ts +0 -95
- package/packages/@monomind/cli/dist/src/transfer/ipfs/upload.js +0 -411
- package/packages/@monomind/cli/dist/src/transfer/models/seraphine.d.ts +0 -72
- package/packages/@monomind/cli/dist/src/transfer/models/seraphine.js +0 -373
- package/packages/@monomind/cli/dist/src/transfer/serialization/cfp.d.ts +0 -49
- package/packages/@monomind/cli/dist/src/transfer/serialization/cfp.js +0 -183
- package/packages/@monomind/cli/dist/src/transfer/storage/gcs.d.ts +0 -82
- package/packages/@monomind/cli/dist/src/transfer/storage/gcs.js +0 -272
- package/packages/@monomind/cli/dist/src/transfer/storage/index.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/transfer/storage/index.js +0 -6
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.d.ts +0 -84
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.js +0 -382
- package/packages/@monomind/cli/dist/src/transfer/store/download.d.ts +0 -70
- package/packages/@monomind/cli/dist/src/transfer/store/download.js +0 -334
- package/packages/@monomind/cli/dist/src/transfer/store/index.d.ts +0 -84
- package/packages/@monomind/cli/dist/src/transfer/store/index.js +0 -153
- package/packages/@monomind/cli/dist/src/transfer/store/publish.d.ts +0 -76
- package/packages/@monomind/cli/dist/src/transfer/store/publish.js +0 -294
- package/packages/@monomind/cli/dist/src/transfer/store/registry.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/transfer/store/registry.js +0 -285
- package/packages/@monomind/cli/dist/src/transfer/store/search.d.ts +0 -54
- package/packages/@monomind/cli/dist/src/transfer/store/search.js +0 -232
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +0 -190
- package/packages/@monomind/cli/dist/src/transfer/store/types.d.ts +0 -193
- package/packages/@monomind/cli/dist/src/transfer/store/types.js +0 -6
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +0 -105
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +0 -214
- package/packages/@monomind/cli/dist/src/transfer/types.d.ts +0 -245
- package/packages/@monomind/cli/dist/src/transfer/types.js +0 -6
- package/packages/@monomind/cli/dist/src/types.d.ts +0 -198
- package/packages/@monomind/cli/dist/src/types.js +0 -38
- package/packages/@monomind/cli/dist/src/update/checker.d.ts +0 -34
- package/packages/@monomind/cli/dist/src/update/checker.js +0 -185
- package/packages/@monomind/cli/dist/src/update/executor.d.ts +0 -32
- package/packages/@monomind/cli/dist/src/update/executor.js +0 -181
- package/packages/@monomind/cli/dist/src/update/index.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/update/index.js +0 -64
- package/packages/@monomind/cli/dist/src/update/rate-limiter.d.ts +0 -20
- package/packages/@monomind/cli/dist/src/update/rate-limiter.js +0 -96
- package/packages/@monomind/cli/dist/src/update/validator.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/update/validator.js +0 -118
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +0 -48
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +0 -23
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +0 -113
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +0 -78
- package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +0 -41
- package/packages/@monomind/cli/dist/src/workflow/dag-types.js +0 -8
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +0 -20
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +0 -162
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +0 -78
- package/packages/@monomind/cli/dist/src/workflow/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/workflow/index.js +0 -11
- package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/workflow/template-engine.js +0 -33
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +0 -146
- package/packages/@monomind/cli/package.json +0 -105
- package/packages/@monomind/guidance/README.md +0 -1195
- package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
- package/packages/@monomind/guidance/dist/adversarial.js +0 -572
- package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
- package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
- package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
- package/packages/@monomind/guidance/dist/artifacts.js +0 -356
- package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
- package/packages/@monomind/guidance/dist/authority.js +0 -558
- package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
- package/packages/@monomind/guidance/dist/capabilities.js +0 -485
- package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
- package/packages/@monomind/guidance/dist/coherence.js +0 -372
- package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
- package/packages/@monomind/guidance/dist/compiler.js +0 -419
- package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
- package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
- package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
- package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
- package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
- package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
- package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
- package/packages/@monomind/guidance/dist/evolution.js +0 -500
- package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
- package/packages/@monomind/guidance/dist/gates.js +0 -302
- package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
- package/packages/@monomind/guidance/dist/gateway.js +0 -452
- package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
- package/packages/@monomind/guidance/dist/generators.js +0 -682
- package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
- package/packages/@monomind/guidance/dist/headless.js +0 -342
- package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
- package/packages/@monomind/guidance/dist/hooks.js +0 -347
- package/packages/@monomind/guidance/dist/index.d.ts +0 -205
- package/packages/@monomind/guidance/dist/index.js +0 -321
- package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
- package/packages/@monomind/guidance/dist/ledger.js +0 -375
- package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
- package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
- package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
- package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
- package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
- package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
- package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
- package/packages/@monomind/guidance/dist/optimizer.js +0 -329
- package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
- package/packages/@monomind/guidance/dist/persistence.js +0 -464
- package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
- package/packages/@monomind/guidance/dist/proof.js +0 -238
- package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
- package/packages/@monomind/guidance/dist/retriever.js +0 -394
- package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
- package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
- package/packages/@monomind/guidance/dist/temporal.d.ts +0 -426
- package/packages/@monomind/guidance/dist/temporal.js +0 -658
- package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
- package/packages/@monomind/guidance/dist/trust.js +0 -473
- package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
- package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
- package/packages/@monomind/guidance/dist/types.d.ts +0 -378
- package/packages/@monomind/guidance/dist/types.js +0 -10
- package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
- package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
- package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
- package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
- package/packages/@monomind/guidance/package.json +0 -198
- package/packages/@monomind/shared/README.md +0 -323
- package/packages/@monomind/shared/dist/agent-contract.d.ts +0 -28
- package/packages/@monomind/shared/dist/agent-contract.js +0 -57
- package/packages/@monomind/shared/dist/agent-error-result.d.ts +0 -17
- package/packages/@monomind/shared/dist/agent-error-result.js +0 -23
- package/packages/@monomind/shared/dist/core/config/defaults.d.ts +0 -41
- package/packages/@monomind/shared/dist/core/config/defaults.js +0 -186
- package/packages/@monomind/shared/dist/core/config/index.d.ts +0 -8
- package/packages/@monomind/shared/dist/core/config/index.js +0 -12
- package/packages/@monomind/shared/dist/core/config/loader.d.ts +0 -45
- package/packages/@monomind/shared/dist/core/config/loader.js +0 -238
- package/packages/@monomind/shared/dist/core/config/schema.d.ts +0 -324
- package/packages/@monomind/shared/dist/core/config/schema.js +0 -160
- package/packages/@monomind/shared/dist/core/config/validator.d.ts +0 -92
- package/packages/@monomind/shared/dist/core/config/validator.js +0 -147
- package/packages/@monomind/shared/dist/core/event-bus.d.ts +0 -31
- package/packages/@monomind/shared/dist/core/event-bus.js +0 -197
- package/packages/@monomind/shared/dist/core/index.d.ts +0 -15
- package/packages/@monomind/shared/dist/core/index.js +0 -19
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.d.ts +0 -224
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.js +0 -46
- package/packages/@monomind/shared/dist/core/interfaces/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/core/interfaces/index.js +0 -15
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.d.ts +0 -185
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.js +0 -101
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.js +0 -166
- package/packages/@monomind/shared/dist/core/orchestrator/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/core/orchestrator/index.js +0 -64
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.js +0 -193
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.js +0 -253
- package/packages/@monomind/shared/dist/events/domain-events.d.ts +0 -282
- package/packages/@monomind/shared/dist/events/domain-events.js +0 -165
- package/packages/@monomind/shared/dist/events/event-store.d.ts +0 -126
- package/packages/@monomind/shared/dist/events/event-store.js +0 -416
- package/packages/@monomind/shared/dist/events/event-store.test.d.ts +0 -8
- package/packages/@monomind/shared/dist/events/event-store.test.js +0 -293
- package/packages/@monomind/shared/dist/events/example-usage.d.ts +0 -10
- package/packages/@monomind/shared/dist/events/example-usage.js +0 -193
- package/packages/@monomind/shared/dist/events/index.d.ts +0 -21
- package/packages/@monomind/shared/dist/events/index.js +0 -22
- package/packages/@monomind/shared/dist/events/projections.d.ts +0 -177
- package/packages/@monomind/shared/dist/events/projections.js +0 -421
- package/packages/@monomind/shared/dist/events/rvf-event-log.d.ts +0 -82
- package/packages/@monomind/shared/dist/events/rvf-event-log.js +0 -340
- package/packages/@monomind/shared/dist/events/state-reconstructor.d.ts +0 -101
- package/packages/@monomind/shared/dist/events/state-reconstructor.js +0 -263
- package/packages/@monomind/shared/dist/events.d.ts +0 -80
- package/packages/@monomind/shared/dist/events.js +0 -249
- package/packages/@monomind/shared/dist/hooks/example-usage.d.ts +0 -42
- package/packages/@monomind/shared/dist/hooks/example-usage.js +0 -351
- package/packages/@monomind/shared/dist/hooks/executor.d.ts +0 -100
- package/packages/@monomind/shared/dist/hooks/executor.js +0 -264
- package/packages/@monomind/shared/dist/hooks/hooks.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/hooks.test.js +0 -322
- package/packages/@monomind/shared/dist/hooks/index.d.ts +0 -52
- package/packages/@monomind/shared/dist/hooks/index.js +0 -51
- package/packages/@monomind/shared/dist/hooks/registry.d.ts +0 -133
- package/packages/@monomind/shared/dist/hooks/registry.js +0 -277
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.js +0 -481
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.d.ts +0 -144
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.js +0 -328
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.d.ts +0 -158
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.js +0 -450
- package/packages/@monomind/shared/dist/hooks/safety/index.d.ts +0 -17
- package/packages/@monomind/shared/dist/hooks/safety/index.js +0 -17
- package/packages/@monomind/shared/dist/hooks/session-hooks.d.ts +0 -234
- package/packages/@monomind/shared/dist/hooks/session-hooks.js +0 -334
- package/packages/@monomind/shared/dist/hooks/task-hooks.d.ts +0 -163
- package/packages/@monomind/shared/dist/hooks/task-hooks.js +0 -326
- package/packages/@monomind/shared/dist/hooks/types.d.ts +0 -267
- package/packages/@monomind/shared/dist/hooks/types.js +0 -62
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.js +0 -93
- package/packages/@monomind/shared/dist/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/index.js +0 -77
- package/packages/@monomind/shared/dist/mcp/connection-pool.d.ts +0 -98
- package/packages/@monomind/shared/dist/mcp/connection-pool.js +0 -364
- package/packages/@monomind/shared/dist/mcp/index.d.ts +0 -69
- package/packages/@monomind/shared/dist/mcp/index.js +0 -84
- package/packages/@monomind/shared/dist/mcp/server.d.ts +0 -166
- package/packages/@monomind/shared/dist/mcp/server.js +0 -593
- package/packages/@monomind/shared/dist/mcp/session-manager.d.ts +0 -136
- package/packages/@monomind/shared/dist/mcp/session-manager.js +0 -335
- package/packages/@monomind/shared/dist/mcp/tool-registry.d.ts +0 -178
- package/packages/@monomind/shared/dist/mcp/tool-registry.js +0 -439
- package/packages/@monomind/shared/dist/mcp/transport/http.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/http.js +0 -476
- package/packages/@monomind/shared/dist/mcp/transport/index.d.ts +0 -102
- package/packages/@monomind/shared/dist/mcp/transport/index.js +0 -238
- package/packages/@monomind/shared/dist/mcp/transport/stdio.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/stdio.js +0 -263
- package/packages/@monomind/shared/dist/mcp/transport/websocket.d.ts +0 -133
- package/packages/@monomind/shared/dist/mcp/transport/websocket.js +0 -396
- package/packages/@monomind/shared/dist/mcp/types.d.ts +0 -438
- package/packages/@monomind/shared/dist/mcp/types.js +0 -54
- package/packages/@monomind/shared/dist/plugin-interface.d.ts +0 -544
- package/packages/@monomind/shared/dist/plugin-interface.js +0 -23
- package/packages/@monomind/shared/dist/plugin-loader.d.ts +0 -139
- package/packages/@monomind/shared/dist/plugin-loader.js +0 -434
- package/packages/@monomind/shared/dist/plugin-registry.d.ts +0 -183
- package/packages/@monomind/shared/dist/plugin-registry.js +0 -457
- package/packages/@monomind/shared/dist/plugins/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
- package/packages/@monomind/shared/dist/plugins/official/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/official/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.js +0 -355
- package/packages/@monomind/shared/dist/plugins/types.d.ts +0 -93
- package/packages/@monomind/shared/dist/plugins/types.js +0 -9
- package/packages/@monomind/shared/dist/reducers.d.ts +0 -33
- package/packages/@monomind/shared/dist/reducers.js +0 -89
- package/packages/@monomind/shared/dist/resilience/bulkhead.d.ts +0 -105
- package/packages/@monomind/shared/dist/resilience/bulkhead.js +0 -206
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.d.ts +0 -132
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.js +0 -233
- package/packages/@monomind/shared/dist/resilience/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/resilience/index.js +0 -19
- package/packages/@monomind/shared/dist/resilience/rate-limiter.d.ts +0 -168
- package/packages/@monomind/shared/dist/resilience/rate-limiter.js +0 -314
- package/packages/@monomind/shared/dist/resilience/retry.d.ts +0 -91
- package/packages/@monomind/shared/dist/resilience/retry.js +0 -159
- package/packages/@monomind/shared/dist/retry-policy.d.ts +0 -14
- package/packages/@monomind/shared/dist/retry-policy.js +0 -23
- package/packages/@monomind/shared/dist/retry-runner.d.ts +0 -21
- package/packages/@monomind/shared/dist/retry-runner.js +0 -57
- package/packages/@monomind/shared/dist/schema-validator.d.ts +0 -46
- package/packages/@monomind/shared/dist/schema-validator.js +0 -133
- package/packages/@monomind/shared/dist/scratchpad.d.ts +0 -23
- package/packages/@monomind/shared/dist/scratchpad.js +0 -32
- package/packages/@monomind/shared/dist/security/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/security/index.js +0 -12
- package/packages/@monomind/shared/dist/security/input-validation.d.ts +0 -73
- package/packages/@monomind/shared/dist/security/input-validation.js +0 -201
- package/packages/@monomind/shared/dist/security/secure-random.d.ts +0 -92
- package/packages/@monomind/shared/dist/security/secure-random.js +0 -142
- package/packages/@monomind/shared/dist/services/index.d.ts +0 -7
- package/packages/@monomind/shared/dist/services/index.js +0 -7
- package/packages/@monomind/shared/dist/services/progress.service.d.ts +0 -124
- package/packages/@monomind/shared/dist/services/progress.service.js +0 -402
- package/packages/@monomind/shared/dist/state-manager.d.ts +0 -34
- package/packages/@monomind/shared/dist/state-manager.js +0 -73
- package/packages/@monomind/shared/dist/state-validator.d.ts +0 -20
- package/packages/@monomind/shared/dist/state-validator.js +0 -49
- package/packages/@monomind/shared/dist/swarm-state.d.ts +0 -52
- package/packages/@monomind/shared/dist/swarm-state.js +0 -18
- package/packages/@monomind/shared/dist/testing/fixture-builder.d.ts +0 -14
- package/packages/@monomind/shared/dist/testing/fixture-builder.js +0 -32
- package/packages/@monomind/shared/dist/testing/index.d.ts +0 -2
- package/packages/@monomind/shared/dist/testing/index.js +0 -2
- package/packages/@monomind/shared/dist/testing/test-model.d.ts +0 -29
- package/packages/@monomind/shared/dist/testing/test-model.js +0 -53
- package/packages/@monomind/shared/dist/types/agent-registry.d.ts +0 -62
- package/packages/@monomind/shared/dist/types/agent-registry.js +0 -8
- package/packages/@monomind/shared/dist/types/agent-version.d.ts +0 -49
- package/packages/@monomind/shared/dist/types/agent-version.js +0 -7
- package/packages/@monomind/shared/dist/types/agent.types.d.ts +0 -137
- package/packages/@monomind/shared/dist/types/agent.types.js +0 -6
- package/packages/@monomind/shared/dist/types/benchmark.d.ts +0 -39
- package/packages/@monomind/shared/dist/types/benchmark.js +0 -6
- package/packages/@monomind/shared/dist/types/communication-flow.d.ts +0 -25
- package/packages/@monomind/shared/dist/types/communication-flow.js +0 -7
- package/packages/@monomind/shared/dist/types/consensus-audit.d.ts +0 -38
- package/packages/@monomind/shared/dist/types/consensus-audit.js +0 -7
- package/packages/@monomind/shared/dist/types/dlq.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/dlq.js +0 -7
- package/packages/@monomind/shared/dist/types/eval.d.ts +0 -59
- package/packages/@monomind/shared/dist/types/eval.js +0 -6
- package/packages/@monomind/shared/dist/types/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/types/index.js +0 -33
- package/packages/@monomind/shared/dist/types/mcp.types.d.ts +0 -266
- package/packages/@monomind/shared/dist/types/mcp.types.js +0 -7
- package/packages/@monomind/shared/dist/types/memory.types.d.ts +0 -236
- package/packages/@monomind/shared/dist/types/memory.types.js +0 -7
- package/packages/@monomind/shared/dist/types/retry.d.ts +0 -72
- package/packages/@monomind/shared/dist/types/retry.js +0 -40
- package/packages/@monomind/shared/dist/types/specialization.d.ts +0 -27
- package/packages/@monomind/shared/dist/types/specialization.js +0 -8
- package/packages/@monomind/shared/dist/types/swarm.types.d.ts +0 -186
- package/packages/@monomind/shared/dist/types/swarm.types.js +0 -65
- package/packages/@monomind/shared/dist/types/task.types.d.ts +0 -178
- package/packages/@monomind/shared/dist/types/task.types.js +0 -32
- package/packages/@monomind/shared/dist/types/termination.d.ts +0 -29
- package/packages/@monomind/shared/dist/types/termination.js +0 -14
- package/packages/@monomind/shared/dist/types/tool-version.d.ts +0 -41
- package/packages/@monomind/shared/dist/types/tool-version.js +0 -8
- package/packages/@monomind/shared/dist/types/trigger.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/trigger.js +0 -8
- package/packages/@monomind/shared/dist/types.d.ts +0 -197
- package/packages/@monomind/shared/dist/types.js +0 -21
- package/packages/@monomind/shared/dist/utils/secure-logger.d.ts +0 -69
- package/packages/@monomind/shared/dist/utils/secure-logger.js +0 -208
- package/packages/@monomind/shared/package.json +0 -42
- package/packages/README.md +0 -514
|
@@ -1,1235 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Graphify MCP Tools
|
|
3
|
-
*
|
|
4
|
-
* Bridges @monomind/graph's knowledge graph into monomind's MCP tool surface.
|
|
5
|
-
* Agents can query the codebase knowledge graph without reading files —
|
|
6
|
-
* god_nodes(), query_graph(), shortest_path() give structural understanding
|
|
7
|
-
* in milliseconds vs. reading dozens of source files.
|
|
8
|
-
*
|
|
9
|
-
* Graph is built automatically on `monomind init` and stored at
|
|
10
|
-
* .monomind/graph/graph.json (legacy: graphify-out/graph.json).
|
|
11
|
-
* Rebuild manually: call graphify_build via MCP.
|
|
12
|
-
*/
|
|
13
|
-
import { existsSync, readFileSync } from 'fs';
|
|
14
|
-
import { join, resolve } from 'path';
|
|
15
|
-
import { getProjectCwd } from './types.js';
|
|
16
|
-
// ── Path helpers ──────────────────────────────────────────────────────────────
|
|
17
|
-
/** Resolve graph path: prefer native monomind path, fall back to legacy graphify path. */
|
|
18
|
-
function getGraphPath(cwd) {
|
|
19
|
-
const nativePath = resolve(join(cwd, '.monomind', 'graph', 'graph.json'));
|
|
20
|
-
const legacyPath = resolve(join(cwd, 'graphify-out', 'graph.json'));
|
|
21
|
-
if (existsSync(nativePath))
|
|
22
|
-
return nativePath;
|
|
23
|
-
if (existsSync(legacyPath))
|
|
24
|
-
return legacyPath;
|
|
25
|
-
return nativePath; // return expected path even if not yet built
|
|
26
|
-
}
|
|
27
|
-
function graphExists(cwd) {
|
|
28
|
-
return existsSync(getGraphPath(cwd));
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Load the knowledge graph.
|
|
32
|
-
* Tries @monomind/graph's loadGraph first; falls back to parsing raw JSON.
|
|
33
|
-
*/
|
|
34
|
-
async function loadKnowledgeGraph(cwd) {
|
|
35
|
-
const graphPath = getGraphPath(cwd);
|
|
36
|
-
let rawNodes = [];
|
|
37
|
-
let rawEdges = [];
|
|
38
|
-
try {
|
|
39
|
-
// Prefer @monomind/graph's loader which handles format normalization.
|
|
40
|
-
const { loadGraph } = await import('@monomind/graph');
|
|
41
|
-
const loaded = loadGraph(graphPath);
|
|
42
|
-
rawNodes = loaded.nodes;
|
|
43
|
-
rawEdges = loaded.edges;
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
// Fallback: parse JSON directly
|
|
47
|
-
const data = JSON.parse(readFileSync(graphPath, 'utf-8'));
|
|
48
|
-
rawNodes = data.nodes || [];
|
|
49
|
-
rawEdges = data.links || data.edges || [];
|
|
50
|
-
}
|
|
51
|
-
// Build in-memory graph structures
|
|
52
|
-
const nodes = new Map();
|
|
53
|
-
for (const n of rawNodes) {
|
|
54
|
-
nodes.set(n.id, n);
|
|
55
|
-
}
|
|
56
|
-
const adj = new Map();
|
|
57
|
-
const radj = new Map();
|
|
58
|
-
const degree = new Map();
|
|
59
|
-
for (const n of rawNodes) {
|
|
60
|
-
adj.set(n.id, []);
|
|
61
|
-
radj.set(n.id, []);
|
|
62
|
-
degree.set(n.id, 0);
|
|
63
|
-
}
|
|
64
|
-
for (const e of rawEdges) {
|
|
65
|
-
const src = e.source;
|
|
66
|
-
const tgt = e.target;
|
|
67
|
-
adj.get(src)?.push(tgt);
|
|
68
|
-
radj.get(tgt)?.push(src);
|
|
69
|
-
degree.set(src, (degree.get(src) ?? 0) + 1);
|
|
70
|
-
degree.set(tgt, (degree.get(tgt) ?? 0) + 1);
|
|
71
|
-
}
|
|
72
|
-
return { nodes, adj, radj, edges: rawEdges, degree, graphPath };
|
|
73
|
-
}
|
|
74
|
-
// ── Shared output helpers ─────────────────────────────────────────────────────
|
|
75
|
-
function nodeOut(g, id) {
|
|
76
|
-
const d = g.nodes.get(id) ?? { id };
|
|
77
|
-
return {
|
|
78
|
-
id,
|
|
79
|
-
label: d.label ?? id,
|
|
80
|
-
file: d.source_file ?? '',
|
|
81
|
-
location: d.source_location ?? '',
|
|
82
|
-
community: d.community ?? null,
|
|
83
|
-
degree: g.degree.get(id) ?? 0,
|
|
84
|
-
file_type: d.file_type ?? '',
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
/** Score a node against search terms. */
|
|
88
|
-
function scoreNode(g, id, terms) {
|
|
89
|
-
const d = g.nodes.get(id);
|
|
90
|
-
if (!d)
|
|
91
|
-
return 0;
|
|
92
|
-
const label = (d.label ?? id).toLowerCase();
|
|
93
|
-
const file = (d.source_file ?? '').toLowerCase();
|
|
94
|
-
return terms.reduce((s, t) => {
|
|
95
|
-
if (label.includes(t))
|
|
96
|
-
s += 1;
|
|
97
|
-
if (file.includes(t))
|
|
98
|
-
s += 0.5;
|
|
99
|
-
return s;
|
|
100
|
-
}, 0);
|
|
101
|
-
}
|
|
102
|
-
// ── Tool Definitions ──────────────────────────────────────────────────────────
|
|
103
|
-
/**
|
|
104
|
-
* Build or rebuild the knowledge graph for a directory.
|
|
105
|
-
*/
|
|
106
|
-
export const graphifyBuildTool = {
|
|
107
|
-
name: 'graphify_build',
|
|
108
|
-
description: 'Build (or rebuild) the knowledge graph for a project directory. ' +
|
|
109
|
-
'Extracts AST structure from code files, semantic relationships from docs, ' +
|
|
110
|
-
'and clusters them into communities. Run this first before using other graphify tools. ' +
|
|
111
|
-
'Code-only changes are fast (tree-sitter, no LLM). Doc changes require an LLM call.',
|
|
112
|
-
category: 'graphify',
|
|
113
|
-
tags: ['knowledge-graph', 'codebase', 'architecture', 'analysis'],
|
|
114
|
-
inputSchema: {
|
|
115
|
-
type: 'object',
|
|
116
|
-
properties: {
|
|
117
|
-
path: {
|
|
118
|
-
type: 'string',
|
|
119
|
-
description: 'Path to analyse (defaults to current project root)',
|
|
120
|
-
},
|
|
121
|
-
codeOnly: {
|
|
122
|
-
type: 'boolean',
|
|
123
|
-
description: 'Only re-extract changed code files — no LLM, fast rebuild',
|
|
124
|
-
default: false,
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
handler: async (params) => {
|
|
129
|
-
const cwd = getProjectCwd();
|
|
130
|
-
const targetPath = params.path || cwd;
|
|
131
|
-
try {
|
|
132
|
-
const { buildGraph } = await import('@monomind/graph');
|
|
133
|
-
const outputDir = join(targetPath, '.monomind', 'graph');
|
|
134
|
-
const result = await buildGraph(targetPath, {
|
|
135
|
-
codeOnly: Boolean(params.codeOnly),
|
|
136
|
-
outputDir,
|
|
137
|
-
});
|
|
138
|
-
return {
|
|
139
|
-
success: true,
|
|
140
|
-
graphPath: result.graphPath,
|
|
141
|
-
reportPath: result.reportPath,
|
|
142
|
-
filesProcessed: result.filesProcessed,
|
|
143
|
-
fromCache: result.fromCache,
|
|
144
|
-
nodes: result.analysis.stats.nodes,
|
|
145
|
-
edges: result.analysis.stats.edges,
|
|
146
|
-
communities: result.analysis.stats.communities,
|
|
147
|
-
graphQuality: result.graphQuality,
|
|
148
|
-
experimentStatus: result.experimentStatus,
|
|
149
|
-
corpusWarnings: result.corpusWarnings,
|
|
150
|
-
message: `[${result.experimentStatus}] Knowledge graph built — quality=${result.graphQuality.toFixed(4)} (${result.analysis.stats.nodes}n/${result.analysis.stats.edges}e/${result.analysis.stats.communities}c)`,
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
catch (err) {
|
|
154
|
-
return {
|
|
155
|
-
error: true,
|
|
156
|
-
message: String(err),
|
|
157
|
-
hint: '@monomind/graph package not available — ensure it is installed and built.',
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* Query the knowledge graph with natural language.
|
|
164
|
-
*/
|
|
165
|
-
export const graphifyQueryTool = {
|
|
166
|
-
name: 'graphify_query',
|
|
167
|
-
description: 'Search the knowledge graph with a natural language question or keywords. ' +
|
|
168
|
-
'Returns relevant nodes and edges as structured context — use this instead of reading ' +
|
|
169
|
-
'many files when you want to understand how components relate. ' +
|
|
170
|
-
'BFS mode gives broad context; DFS traces a specific call path.',
|
|
171
|
-
category: 'graphify',
|
|
172
|
-
tags: ['knowledge-graph', 'search', 'architecture', 'codebase'],
|
|
173
|
-
inputSchema: {
|
|
174
|
-
type: 'object',
|
|
175
|
-
properties: {
|
|
176
|
-
question: {
|
|
177
|
-
type: 'string',
|
|
178
|
-
description: 'Natural language question or keyword (e.g. "authentication flow", "how does caching work")',
|
|
179
|
-
},
|
|
180
|
-
mode: {
|
|
181
|
-
type: 'string',
|
|
182
|
-
enum: ['bfs', 'dfs'],
|
|
183
|
-
default: 'bfs',
|
|
184
|
-
description: 'bfs = broad context, dfs = trace specific path',
|
|
185
|
-
},
|
|
186
|
-
depth: {
|
|
187
|
-
type: 'integer',
|
|
188
|
-
default: 3,
|
|
189
|
-
description: 'Traversal depth (1–6)',
|
|
190
|
-
},
|
|
191
|
-
tokenBudget: {
|
|
192
|
-
type: 'integer',
|
|
193
|
-
default: 2000,
|
|
194
|
-
description: 'Approximate max output tokens',
|
|
195
|
-
},
|
|
196
|
-
path: {
|
|
197
|
-
type: 'string',
|
|
198
|
-
description: 'Project path whose graph to query (defaults to current project root)',
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
required: ['question'],
|
|
202
|
-
},
|
|
203
|
-
handler: async (params) => {
|
|
204
|
-
const cwd = getProjectCwd();
|
|
205
|
-
const targetPath = params.path || cwd;
|
|
206
|
-
if (!graphExists(targetPath)) {
|
|
207
|
-
return {
|
|
208
|
-
error: true,
|
|
209
|
-
message: 'No graph found. Run graphify_build first.',
|
|
210
|
-
hint: `Expected: ${getGraphPath(targetPath)}`,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
const question = params.question;
|
|
214
|
-
const mode = params.mode || 'bfs';
|
|
215
|
-
const depth = params.depth || 3;
|
|
216
|
-
try {
|
|
217
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
218
|
-
const terms = question.toLowerCase().split(/\s+/).filter(t => t.length > 2);
|
|
219
|
-
// Score nodes; fall back to highest-degree nodes if no match
|
|
220
|
-
let startNodes = [];
|
|
221
|
-
if (terms.length > 0) {
|
|
222
|
-
const scored = [];
|
|
223
|
-
for (const id of g.nodes.keys()) {
|
|
224
|
-
const s = scoreNode(g, id, terms);
|
|
225
|
-
if (s > 0)
|
|
226
|
-
scored.push([s, id]);
|
|
227
|
-
}
|
|
228
|
-
scored.sort((a, b) => b[0] - a[0]);
|
|
229
|
-
startNodes = scored.slice(0, 5).map(([, id]) => id);
|
|
230
|
-
}
|
|
231
|
-
if (startNodes.length === 0) {
|
|
232
|
-
startNodes = [...g.nodes.keys()]
|
|
233
|
-
.sort((a, b) => (g.degree.get(b) ?? 0) - (g.degree.get(a) ?? 0))
|
|
234
|
-
.slice(0, 3);
|
|
235
|
-
}
|
|
236
|
-
const visited = new Set(startNodes);
|
|
237
|
-
const edgesSeen = [];
|
|
238
|
-
if (mode === 'bfs') {
|
|
239
|
-
let frontier = new Set(startNodes);
|
|
240
|
-
for (let d = 0; d < depth; d++) {
|
|
241
|
-
const next = new Set();
|
|
242
|
-
for (const n of frontier) {
|
|
243
|
-
for (const nbr of g.adj.get(n) ?? []) {
|
|
244
|
-
if (!visited.has(nbr)) {
|
|
245
|
-
next.add(nbr);
|
|
246
|
-
edgesSeen.push([n, nbr]);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
for (const n of next)
|
|
251
|
-
visited.add(n);
|
|
252
|
-
frontier = next;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
// DFS
|
|
257
|
-
const stack = startNodes.map(n => [n, 0]);
|
|
258
|
-
while (stack.length > 0) {
|
|
259
|
-
const [node, d] = stack.pop();
|
|
260
|
-
if (visited.has(node) && d > 0)
|
|
261
|
-
continue;
|
|
262
|
-
if (d > depth)
|
|
263
|
-
continue;
|
|
264
|
-
visited.add(node);
|
|
265
|
-
for (const nbr of g.adj.get(node) ?? []) {
|
|
266
|
-
if (!visited.has(nbr)) {
|
|
267
|
-
stack.push([nbr, d + 1]);
|
|
268
|
-
edgesSeen.push([node, nbr]);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
const nodesOut = [...visited]
|
|
274
|
-
.sort((a, b) => (g.degree.get(b) ?? 0) - (g.degree.get(a) ?? 0))
|
|
275
|
-
.slice(0, 60)
|
|
276
|
-
.map(id => nodeOut(g, id));
|
|
277
|
-
// Build edge lookup for attribute access
|
|
278
|
-
const edgeLookup = new Map();
|
|
279
|
-
for (const e of g.edges) {
|
|
280
|
-
edgeLookup.set(`${e.source}__${e.target}`, e);
|
|
281
|
-
}
|
|
282
|
-
const edgesOut = edgesSeen
|
|
283
|
-
.filter(([u, v]) => visited.has(u) && visited.has(v))
|
|
284
|
-
.slice(0, 80)
|
|
285
|
-
.map(([u, v]) => {
|
|
286
|
-
const e = edgeLookup.get(`${u}__${v}`) ?? {};
|
|
287
|
-
return {
|
|
288
|
-
from: (g.nodes.get(u)?.label ?? u),
|
|
289
|
-
to: (g.nodes.get(v)?.label ?? v),
|
|
290
|
-
relation: e.relation ?? '',
|
|
291
|
-
confidence: e.confidence ?? '',
|
|
292
|
-
};
|
|
293
|
-
});
|
|
294
|
-
return {
|
|
295
|
-
question,
|
|
296
|
-
mode,
|
|
297
|
-
depth,
|
|
298
|
-
nodes: nodesOut,
|
|
299
|
-
edges: edgesOut,
|
|
300
|
-
total_nodes: visited.size,
|
|
301
|
-
total_edges: edgesSeen.length,
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
catch (err) {
|
|
305
|
-
return { error: true, message: String(err) };
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
/**
|
|
310
|
-
* Get the most connected (god) nodes — the core abstractions.
|
|
311
|
-
*/
|
|
312
|
-
export const graphifyGodNodesTool = {
|
|
313
|
-
name: 'graphify_god_nodes',
|
|
314
|
-
description: 'Return the most connected nodes in the knowledge graph — the core abstractions ' +
|
|
315
|
-
'and central concepts of the codebase. Use this at the start of any architectural analysis ' +
|
|
316
|
-
'to understand what the most important components are before diving into details.',
|
|
317
|
-
category: 'graphify',
|
|
318
|
-
tags: ['knowledge-graph', 'architecture', 'abstractions', 'codebase'],
|
|
319
|
-
inputSchema: {
|
|
320
|
-
type: 'object',
|
|
321
|
-
properties: {
|
|
322
|
-
topN: {
|
|
323
|
-
type: 'integer',
|
|
324
|
-
default: 15,
|
|
325
|
-
description: 'Number of god nodes to return',
|
|
326
|
-
},
|
|
327
|
-
path: {
|
|
328
|
-
type: 'string',
|
|
329
|
-
description: 'Project path (defaults to current project root)',
|
|
330
|
-
},
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
handler: async (params) => {
|
|
334
|
-
const cwd = getProjectCwd();
|
|
335
|
-
const targetPath = params.path || cwd;
|
|
336
|
-
if (!graphExists(targetPath)) {
|
|
337
|
-
return {
|
|
338
|
-
error: true,
|
|
339
|
-
message: 'No graph found. Run graphify_build first.',
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
const topN = params.topN || 15;
|
|
343
|
-
try {
|
|
344
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
345
|
-
const sortedIds = [...g.nodes.keys()]
|
|
346
|
-
.filter(id => {
|
|
347
|
-
const source_file = g.nodes.get(id)?.source_file ?? '';
|
|
348
|
-
return source_file !== '';
|
|
349
|
-
})
|
|
350
|
-
.sort((a, b) => (g.degree.get(b) ?? 0) - (g.degree.get(a) ?? 0))
|
|
351
|
-
.slice(0, topN);
|
|
352
|
-
const godNodes = sortedIds.map(id => {
|
|
353
|
-
const d = g.nodes.get(id) ?? { id };
|
|
354
|
-
const neighbors = (g.adj.get(id) ?? [])
|
|
355
|
-
.slice(0, 8)
|
|
356
|
-
.map(nid => g.nodes.get(nid)?.label ?? nid);
|
|
357
|
-
return {
|
|
358
|
-
label: d.label ?? id,
|
|
359
|
-
degree: g.degree.get(id) ?? 0,
|
|
360
|
-
file: d.source_file ?? '',
|
|
361
|
-
location: d.source_location ?? '',
|
|
362
|
-
community: d.community ?? null,
|
|
363
|
-
file_type: d.file_type ?? '',
|
|
364
|
-
neighbors,
|
|
365
|
-
};
|
|
366
|
-
});
|
|
367
|
-
const internalCount = [...g.nodes.keys()].filter(id => (g.nodes.get(id)?.source_file ?? '') !== '').length;
|
|
368
|
-
return { god_nodes: godNodes, total_nodes: g.nodes.size, internal_nodes: internalCount };
|
|
369
|
-
}
|
|
370
|
-
catch (err) {
|
|
371
|
-
return { error: true, message: String(err) };
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
/**
|
|
376
|
-
* Get full details for a specific node.
|
|
377
|
-
*/
|
|
378
|
-
export const graphifyGetNodeTool = {
|
|
379
|
-
name: 'graphify_get_node',
|
|
380
|
-
description: 'Get all details for a specific concept/node in the knowledge graph: ' +
|
|
381
|
-
'its source location, community, all relationships, and confidence levels. ' +
|
|
382
|
-
'Use this when you need to deeply understand one specific component.',
|
|
383
|
-
category: 'graphify',
|
|
384
|
-
tags: ['knowledge-graph', 'node', 'details'],
|
|
385
|
-
inputSchema: {
|
|
386
|
-
type: 'object',
|
|
387
|
-
properties: {
|
|
388
|
-
label: {
|
|
389
|
-
type: 'string',
|
|
390
|
-
description: 'Node label or ID to look up (case-insensitive)',
|
|
391
|
-
},
|
|
392
|
-
path: {
|
|
393
|
-
type: 'string',
|
|
394
|
-
description: 'Project path (defaults to current project root)',
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
required: ['label'],
|
|
398
|
-
},
|
|
399
|
-
handler: async (params) => {
|
|
400
|
-
const cwd = getProjectCwd();
|
|
401
|
-
const targetPath = params.path || cwd;
|
|
402
|
-
if (!graphExists(targetPath)) {
|
|
403
|
-
return { error: true, message: 'No graph found. Run graphify_build first.' };
|
|
404
|
-
}
|
|
405
|
-
try {
|
|
406
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
407
|
-
const term = params.label.toLowerCase();
|
|
408
|
-
const matches = [...g.nodes.entries()]
|
|
409
|
-
.filter(([id, d]) => (d.label ?? id).toLowerCase().includes(term) || id.toLowerCase() === term)
|
|
410
|
-
.sort(([aId], [bId]) => (g.degree.get(bId) ?? 0) - (g.degree.get(aId) ?? 0))
|
|
411
|
-
.map(([id]) => id);
|
|
412
|
-
if (matches.length === 0) {
|
|
413
|
-
return { error: 'Node not found', searched: term };
|
|
414
|
-
}
|
|
415
|
-
const id = matches[0];
|
|
416
|
-
const d = g.nodes.get(id) ?? { id };
|
|
417
|
-
// Build edge lookup
|
|
418
|
-
const edgeLookup = new Map();
|
|
419
|
-
for (const e of g.edges) {
|
|
420
|
-
edgeLookup.set(`${e.source}__${e.target}`, e);
|
|
421
|
-
}
|
|
422
|
-
const outEdges = (g.adj.get(id) ?? []).slice(0, 40).map(tgt => {
|
|
423
|
-
const e = edgeLookup.get(`${id}__${tgt}`) ?? {};
|
|
424
|
-
return {
|
|
425
|
-
direction: 'outgoing',
|
|
426
|
-
to: g.nodes.get(tgt)?.label ?? tgt,
|
|
427
|
-
relation: e.relation ?? '',
|
|
428
|
-
confidence: e.confidence ?? '',
|
|
429
|
-
confidence_score: e.confidence_score ?? null,
|
|
430
|
-
};
|
|
431
|
-
});
|
|
432
|
-
const inEdges = (g.radj.get(id) ?? []).slice(0, 40).map(src => {
|
|
433
|
-
const e = edgeLookup.get(`${src}__${id}`) ?? {};
|
|
434
|
-
return {
|
|
435
|
-
direction: 'incoming',
|
|
436
|
-
from: g.nodes.get(src)?.label ?? src,
|
|
437
|
-
relation: e.relation ?? '',
|
|
438
|
-
confidence: e.confidence ?? '',
|
|
439
|
-
};
|
|
440
|
-
});
|
|
441
|
-
// Strip well-known fields from attributes output to avoid duplication
|
|
442
|
-
const knownKeys = new Set(['label', 'source_file', 'source_location', 'community', 'file_type', 'id']);
|
|
443
|
-
const attributes = {};
|
|
444
|
-
for (const [k, v] of Object.entries(d)) {
|
|
445
|
-
if (!knownKeys.has(k))
|
|
446
|
-
attributes[k] = v;
|
|
447
|
-
}
|
|
448
|
-
return {
|
|
449
|
-
id,
|
|
450
|
-
label: d.label ?? id,
|
|
451
|
-
file: d.source_file ?? '',
|
|
452
|
-
location: d.source_location ?? '',
|
|
453
|
-
community: d.community ?? null,
|
|
454
|
-
file_type: d.file_type ?? '',
|
|
455
|
-
degree: g.degree.get(id) ?? 0,
|
|
456
|
-
attributes,
|
|
457
|
-
edges: [...outEdges, ...inEdges],
|
|
458
|
-
all_matches: matches.slice(0, 10).map(m => g.nodes.get(m)?.label ?? m),
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
catch (err) {
|
|
462
|
-
return { error: true, message: String(err) };
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
};
|
|
466
|
-
/**
|
|
467
|
-
* Find shortest path between two concepts.
|
|
468
|
-
*/
|
|
469
|
-
export const graphifyShortestPathTool = {
|
|
470
|
-
name: 'graphify_shortest_path',
|
|
471
|
-
description: 'Find the shortest relationship path between two concepts in the knowledge graph. ' +
|
|
472
|
-
'Use this to trace how component A depends on or relates to component B, ' +
|
|
473
|
-
'revealing hidden coupling chains (e.g. "how does the router connect to the database?").',
|
|
474
|
-
category: 'graphify',
|
|
475
|
-
tags: ['knowledge-graph', 'path', 'dependencies', 'coupling'],
|
|
476
|
-
inputSchema: {
|
|
477
|
-
type: 'object',
|
|
478
|
-
properties: {
|
|
479
|
-
source: { type: 'string', description: 'Source concept label' },
|
|
480
|
-
target: { type: 'string', description: 'Target concept label' },
|
|
481
|
-
maxHops: { type: 'integer', default: 8, description: 'Maximum hops to search' },
|
|
482
|
-
path: { type: 'string', description: 'Project path (defaults to current project root)' },
|
|
483
|
-
},
|
|
484
|
-
required: ['source', 'target'],
|
|
485
|
-
},
|
|
486
|
-
handler: async (params) => {
|
|
487
|
-
const cwd = getProjectCwd();
|
|
488
|
-
const targetPath = params.path || cwd;
|
|
489
|
-
if (!graphExists(targetPath)) {
|
|
490
|
-
return { error: true, message: 'No graph found. Run graphify_build first.' };
|
|
491
|
-
}
|
|
492
|
-
try {
|
|
493
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
494
|
-
const maxHops = params.maxHops || 8;
|
|
495
|
-
/** Find node ids matching a search term, sorted by degree descending. */
|
|
496
|
-
function findNodes(term) {
|
|
497
|
-
const t = term.toLowerCase();
|
|
498
|
-
return [...g.nodes.entries()]
|
|
499
|
-
.filter(([id, d]) => (d.label ?? id).toLowerCase().includes(t) || id.toLowerCase() === t)
|
|
500
|
-
.sort(([aId], [bId]) => (g.degree.get(bId) ?? 0) - (g.degree.get(aId) ?? 0))
|
|
501
|
-
.map(([id]) => id);
|
|
502
|
-
}
|
|
503
|
-
const srcNodes = findNodes(params.source);
|
|
504
|
-
const tgtNodes = findNodes(params.target);
|
|
505
|
-
if (srcNodes.length === 0) {
|
|
506
|
-
return { error: true, message: `Source not found: ${params.source}` };
|
|
507
|
-
}
|
|
508
|
-
if (tgtNodes.length === 0) {
|
|
509
|
-
return { error: true, message: `Target not found: ${params.target}` };
|
|
510
|
-
}
|
|
511
|
-
// BFS on undirected graph (use both adj and radj as neighbours)
|
|
512
|
-
function bfsPath(start, end) {
|
|
513
|
-
const prev = new Map();
|
|
514
|
-
const queue = [start];
|
|
515
|
-
const visited = new Set([start]);
|
|
516
|
-
while (queue.length > 0) {
|
|
517
|
-
const cur = queue.shift();
|
|
518
|
-
if (cur === end) {
|
|
519
|
-
// Reconstruct path
|
|
520
|
-
const path = [];
|
|
521
|
-
let node = end;
|
|
522
|
-
while (node !== undefined) {
|
|
523
|
-
path.unshift(node);
|
|
524
|
-
node = prev.get(node);
|
|
525
|
-
}
|
|
526
|
-
return path.length - 1 <= maxHops ? path : null;
|
|
527
|
-
}
|
|
528
|
-
// Treat edges as undirected
|
|
529
|
-
const nbrs = [...(g.adj.get(cur) ?? []), ...(g.radj.get(cur) ?? [])];
|
|
530
|
-
for (const nbr of nbrs) {
|
|
531
|
-
if (!visited.has(nbr)) {
|
|
532
|
-
visited.add(nbr);
|
|
533
|
-
prev.set(nbr, cur);
|
|
534
|
-
if (queue.length < 100000)
|
|
535
|
-
queue.push(nbr);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
return null;
|
|
540
|
-
}
|
|
541
|
-
let bestPath = null;
|
|
542
|
-
for (const src of srcNodes.slice(0, 3)) {
|
|
543
|
-
for (const tgt of tgtNodes.slice(0, 3)) {
|
|
544
|
-
const p = bfsPath(src, tgt);
|
|
545
|
-
if (p && (!bestPath || p.length < bestPath.length)) {
|
|
546
|
-
bestPath = p;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
if (!bestPath) {
|
|
551
|
-
return {
|
|
552
|
-
found: false,
|
|
553
|
-
message: `No path within ${maxHops} hops between "${params.source}" and "${params.target}"`,
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
// Build edge lookup
|
|
557
|
-
const edgeLookup = new Map();
|
|
558
|
-
for (const e of g.edges) {
|
|
559
|
-
edgeLookup.set(`${e.source}__${e.target}`, e);
|
|
560
|
-
edgeLookup.set(`${e.target}__${e.source}`, e); // bidirectional lookup
|
|
561
|
-
}
|
|
562
|
-
const steps = bestPath.map((id, i) => {
|
|
563
|
-
const d = g.nodes.get(id) ?? { id };
|
|
564
|
-
const step = {
|
|
565
|
-
label: d.label ?? id,
|
|
566
|
-
file: d.source_file ?? '',
|
|
567
|
-
location: d.source_location ?? '',
|
|
568
|
-
};
|
|
569
|
-
if (i < bestPath.length - 1) {
|
|
570
|
-
const nextId = bestPath[i + 1];
|
|
571
|
-
const e = edgeLookup.get(`${id}__${nextId}`) ?? edgeLookup.get(`${nextId}__${id}`) ?? {};
|
|
572
|
-
step.next_relation = e.relation ?? '';
|
|
573
|
-
step.confidence = e.confidence ?? '';
|
|
574
|
-
}
|
|
575
|
-
return step;
|
|
576
|
-
});
|
|
577
|
-
return { found: true, hops: bestPath.length - 1, path: steps };
|
|
578
|
-
}
|
|
579
|
-
catch (err) {
|
|
580
|
-
return { error: true, message: String(err) };
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
};
|
|
584
|
-
/**
|
|
585
|
-
* Get all nodes in a community (cluster of related components).
|
|
586
|
-
*/
|
|
587
|
-
export const graphifyGetCommunityTool = {
|
|
588
|
-
name: 'graphify_community',
|
|
589
|
-
description: 'Get all nodes in a specific community cluster. Communities are groups of ' +
|
|
590
|
-
'tightly related components detected by graph clustering. Use graph_stats first to ' +
|
|
591
|
-
'see community count, then explore communities to understand subsystem boundaries.',
|
|
592
|
-
category: 'graphify',
|
|
593
|
-
tags: ['knowledge-graph', 'community', 'clusters', 'subsystems'],
|
|
594
|
-
inputSchema: {
|
|
595
|
-
type: 'object',
|
|
596
|
-
properties: {
|
|
597
|
-
communityId: {
|
|
598
|
-
type: 'integer',
|
|
599
|
-
description: 'Community ID (0 = largest community)',
|
|
600
|
-
},
|
|
601
|
-
path: {
|
|
602
|
-
type: 'string',
|
|
603
|
-
description: 'Project path (defaults to current project root)',
|
|
604
|
-
},
|
|
605
|
-
},
|
|
606
|
-
required: ['communityId'],
|
|
607
|
-
},
|
|
608
|
-
handler: async (params) => {
|
|
609
|
-
const cwd = getProjectCwd();
|
|
610
|
-
const targetPath = params.path || cwd;
|
|
611
|
-
if (!graphExists(targetPath)) {
|
|
612
|
-
return { error: true, message: 'No graph found. Run graphify_build first.' };
|
|
613
|
-
}
|
|
614
|
-
try {
|
|
615
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
616
|
-
const cid = params.communityId;
|
|
617
|
-
const members = [...g.nodes.entries()]
|
|
618
|
-
.filter(([, d]) => d.community === cid)
|
|
619
|
-
.sort(([aId], [bId]) => (g.degree.get(bId) ?? 0) - (g.degree.get(aId) ?? 0))
|
|
620
|
-
.slice(0, 50)
|
|
621
|
-
.map(([id, d]) => ({
|
|
622
|
-
label: d.label ?? id,
|
|
623
|
-
file: d.source_file ?? '',
|
|
624
|
-
location: d.source_location ?? '',
|
|
625
|
-
degree: g.degree.get(id) ?? 0,
|
|
626
|
-
file_type: d.file_type ?? '',
|
|
627
|
-
}));
|
|
628
|
-
// Build edge lookup
|
|
629
|
-
const edgeLookup = new Map();
|
|
630
|
-
for (const e of g.edges) {
|
|
631
|
-
edgeLookup.set(`${e.source}__${e.target}`, e);
|
|
632
|
-
}
|
|
633
|
-
const externalEdges = [];
|
|
634
|
-
for (const [id, d] of g.nodes.entries()) {
|
|
635
|
-
if (d.community !== cid)
|
|
636
|
-
continue;
|
|
637
|
-
for (const nbr of g.adj.get(id) ?? []) {
|
|
638
|
-
const nbrD = g.nodes.get(nbr);
|
|
639
|
-
if (nbrD?.community !== cid) {
|
|
640
|
-
const e = edgeLookup.get(`${id}__${nbr}`) ?? {};
|
|
641
|
-
externalEdges.push({
|
|
642
|
-
from: d.label ?? id,
|
|
643
|
-
to: nbrD?.label ?? nbr,
|
|
644
|
-
to_community: nbrD?.community ?? null,
|
|
645
|
-
relation: e.relation ?? '',
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
return {
|
|
651
|
-
community_id: cid,
|
|
652
|
-
member_count: members.length,
|
|
653
|
-
members,
|
|
654
|
-
external_connections: externalEdges.slice(0, 30),
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
catch (err) {
|
|
658
|
-
return { error: true, message: String(err) };
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
};
|
|
662
|
-
/**
|
|
663
|
-
* Get graph statistics: node/edge counts, communities, confidence breakdown.
|
|
664
|
-
*/
|
|
665
|
-
export const graphifyStatsTool = {
|
|
666
|
-
name: 'graphify_stats',
|
|
667
|
-
description: 'Get summary statistics for the knowledge graph: node count, edge count, ' +
|
|
668
|
-
'community count, confidence breakdown (EXTRACTED/INFERRED/AMBIGUOUS), ' +
|
|
669
|
-
'and top god nodes. Use this first to understand graph size and structure.',
|
|
670
|
-
category: 'graphify',
|
|
671
|
-
tags: ['knowledge-graph', 'stats', 'overview'],
|
|
672
|
-
inputSchema: {
|
|
673
|
-
type: 'object',
|
|
674
|
-
properties: {
|
|
675
|
-
path: {
|
|
676
|
-
type: 'string',
|
|
677
|
-
description: 'Project path (defaults to current project root)',
|
|
678
|
-
},
|
|
679
|
-
},
|
|
680
|
-
},
|
|
681
|
-
handler: async (params) => {
|
|
682
|
-
const cwd = getProjectCwd();
|
|
683
|
-
const targetPath = params.path || cwd;
|
|
684
|
-
if (!graphExists(targetPath)) {
|
|
685
|
-
return {
|
|
686
|
-
error: true,
|
|
687
|
-
message: 'No graph found. Run graphify_build first.',
|
|
688
|
-
hint: `Expected: ${getGraphPath(targetPath)}`,
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
try {
|
|
692
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
693
|
-
// Community sizes
|
|
694
|
-
const communities = new Map();
|
|
695
|
-
for (const d of g.nodes.values()) {
|
|
696
|
-
if (d.community != null) {
|
|
697
|
-
communities.set(d.community, (communities.get(d.community) ?? 0) + 1);
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
const communitySizes = {};
|
|
701
|
-
[...communities.entries()]
|
|
702
|
-
.sort((a, b) => b[1] - a[1])
|
|
703
|
-
.slice(0, 10)
|
|
704
|
-
.forEach(([cid, count]) => { communitySizes[String(cid)] = count; });
|
|
705
|
-
// Confidence and relation counts
|
|
706
|
-
const confidenceCounts = {};
|
|
707
|
-
const relationCounts = {};
|
|
708
|
-
const fileTypeCounts = {};
|
|
709
|
-
for (const e of g.edges) {
|
|
710
|
-
const conf = e.confidence ?? 'UNKNOWN';
|
|
711
|
-
confidenceCounts[conf] = (confidenceCounts[conf] ?? 0) + 1;
|
|
712
|
-
const rel = e.relation ?? 'unknown';
|
|
713
|
-
relationCounts[rel] = (relationCounts[rel] ?? 0) + 1;
|
|
714
|
-
}
|
|
715
|
-
for (const d of g.nodes.values()) {
|
|
716
|
-
const ft = d.file_type ?? 'unknown';
|
|
717
|
-
fileTypeCounts[ft] = (fileTypeCounts[ft] ?? 0) + 1;
|
|
718
|
-
}
|
|
719
|
-
const topRelations = Object.entries(relationCounts)
|
|
720
|
-
.sort((a, b) => b[1] - a[1])
|
|
721
|
-
.slice(0, 10)
|
|
722
|
-
.reduce((acc, [k, v]) => { acc[k] = v; return acc; }, {});
|
|
723
|
-
const topGodNodes = [...g.nodes.keys()]
|
|
724
|
-
.filter(id => {
|
|
725
|
-
const source_file = g.nodes.get(id)?.source_file ?? '';
|
|
726
|
-
return source_file !== '';
|
|
727
|
-
})
|
|
728
|
-
.sort((a, b) => (g.degree.get(b) ?? 0) - (g.degree.get(a) ?? 0))
|
|
729
|
-
.slice(0, 5)
|
|
730
|
-
.map(id => g.nodes.get(id)?.label ?? id);
|
|
731
|
-
return {
|
|
732
|
-
nodes: g.nodes.size,
|
|
733
|
-
edges: g.edges.length,
|
|
734
|
-
communities: communities.size,
|
|
735
|
-
community_sizes: communitySizes,
|
|
736
|
-
confidence: confidenceCounts,
|
|
737
|
-
top_relations: topRelations,
|
|
738
|
-
file_types: fileTypeCounts,
|
|
739
|
-
graph_path: g.graphPath,
|
|
740
|
-
top_god_nodes: topGodNodes,
|
|
741
|
-
is_directed: true,
|
|
742
|
-
};
|
|
743
|
-
}
|
|
744
|
-
catch (err) {
|
|
745
|
-
return { error: true, message: String(err) };
|
|
746
|
-
}
|
|
747
|
-
},
|
|
748
|
-
};
|
|
749
|
-
/**
|
|
750
|
-
* Find surprising cross-community connections (architectural insights).
|
|
751
|
-
*/
|
|
752
|
-
export const graphifySurprisesTool = {
|
|
753
|
-
name: 'graphify_surprises',
|
|
754
|
-
description: 'Find surprising connections between components that are in different communities ' +
|
|
755
|
-
'but have strong relationships. These unexpected couplings often reveal hidden dependencies, ' +
|
|
756
|
-
'design smells, or important architectural patterns worth understanding.',
|
|
757
|
-
category: 'graphify',
|
|
758
|
-
tags: ['knowledge-graph', 'architecture', 'coupling', 'surprises'],
|
|
759
|
-
inputSchema: {
|
|
760
|
-
type: 'object',
|
|
761
|
-
properties: {
|
|
762
|
-
topN: {
|
|
763
|
-
type: 'integer',
|
|
764
|
-
default: 10,
|
|
765
|
-
description: 'Number of surprising connections to return',
|
|
766
|
-
},
|
|
767
|
-
path: {
|
|
768
|
-
type: 'string',
|
|
769
|
-
description: 'Project path (defaults to current project root)',
|
|
770
|
-
},
|
|
771
|
-
},
|
|
772
|
-
},
|
|
773
|
-
handler: async (params) => {
|
|
774
|
-
const cwd = getProjectCwd();
|
|
775
|
-
const targetPath = params.path || cwd;
|
|
776
|
-
if (!graphExists(targetPath)) {
|
|
777
|
-
return { error: true, message: 'No graph found. Run graphify_build first.' };
|
|
778
|
-
}
|
|
779
|
-
try {
|
|
780
|
-
const g = await loadKnowledgeGraph(targetPath);
|
|
781
|
-
const topN = params.topN || 10;
|
|
782
|
-
const surprises = [];
|
|
783
|
-
for (const e of g.edges) {
|
|
784
|
-
const uD = g.nodes.get(e.source);
|
|
785
|
-
const vD = g.nodes.get(e.target);
|
|
786
|
-
const cu = uD?.community ?? null;
|
|
787
|
-
const cv = vD?.community ?? null;
|
|
788
|
-
if (cu != null && cv != null && cu !== cv) {
|
|
789
|
-
const score = (g.degree.get(e.source) ?? 0) * (g.degree.get(e.target) ?? 0);
|
|
790
|
-
surprises.push({
|
|
791
|
-
score,
|
|
792
|
-
from: uD?.label ?? e.source,
|
|
793
|
-
from_community: cu,
|
|
794
|
-
from_file: uD?.source_file ?? '',
|
|
795
|
-
to: vD?.label ?? e.target,
|
|
796
|
-
to_community: cv,
|
|
797
|
-
to_file: vD?.source_file ?? '',
|
|
798
|
-
relation: e.relation ?? '',
|
|
799
|
-
confidence: e.confidence ?? '',
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
surprises.sort((a, b) => b.score - a.score);
|
|
804
|
-
return {
|
|
805
|
-
surprises: surprises.slice(0, topN),
|
|
806
|
-
total_cross_community_edges: surprises.length,
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
catch (err) {
|
|
810
|
-
return { error: true, message: String(err) };
|
|
811
|
-
}
|
|
812
|
-
},
|
|
813
|
-
};
|
|
814
|
-
/**
|
|
815
|
-
* Generate or open the interactive HTML visualization of the knowledge graph.
|
|
816
|
-
*/
|
|
817
|
-
export const graphifyVisualizeTool = {
|
|
818
|
-
name: 'graphify_visualize',
|
|
819
|
-
description: 'Generate (and optionally open) the interactive HTML knowledge graph explorer. ' +
|
|
820
|
-
'Produces graph.html alongside graph.json — a self-contained visualization with force-directed ' +
|
|
821
|
-
'layout, community coloring, god-node panel, sidebar details, minimap, and search. ' +
|
|
822
|
-
'No internet connection or server required — just open the HTML file in a browser.',
|
|
823
|
-
category: 'graphify',
|
|
824
|
-
tags: ['knowledge-graph', 'visualization', 'html', 'browser'],
|
|
825
|
-
inputSchema: {
|
|
826
|
-
type: 'object',
|
|
827
|
-
properties: {
|
|
828
|
-
open: {
|
|
829
|
-
type: 'boolean',
|
|
830
|
-
description: 'Open the HTML file in the default browser after generating (macOS/Linux)',
|
|
831
|
-
default: false,
|
|
832
|
-
},
|
|
833
|
-
path: {
|
|
834
|
-
type: 'string',
|
|
835
|
-
description: 'Project path (defaults to current project root)',
|
|
836
|
-
},
|
|
837
|
-
},
|
|
838
|
-
},
|
|
839
|
-
handler: async (params) => {
|
|
840
|
-
const cwd = getProjectCwd();
|
|
841
|
-
const targetPath = params.path || cwd;
|
|
842
|
-
if (!graphExists(targetPath)) {
|
|
843
|
-
return {
|
|
844
|
-
error: true,
|
|
845
|
-
message: 'No graph found. Run graphify_build first.',
|
|
846
|
-
hint: `Expected: ${getGraphPath(targetPath)}`,
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
try {
|
|
850
|
-
const graphPath = getGraphPath(targetPath);
|
|
851
|
-
const { readFileSync } = await import('fs');
|
|
852
|
-
const { join, dirname } = await import('path');
|
|
853
|
-
const outputDir = dirname(graphPath);
|
|
854
|
-
const { exportHTML } = await import('@monomind/graph');
|
|
855
|
-
const raw = JSON.parse(readFileSync(graphPath, 'utf-8'));
|
|
856
|
-
const htmlPath = exportHTML(raw, outputDir);
|
|
857
|
-
if (params.open) {
|
|
858
|
-
const { spawn } = await import('child_process');
|
|
859
|
-
const opener = process.platform === 'darwin' ? 'open'
|
|
860
|
-
: process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
861
|
-
spawn(opener, [htmlPath], { detached: true, stdio: 'ignore' }).unref();
|
|
862
|
-
}
|
|
863
|
-
return {
|
|
864
|
-
success: true,
|
|
865
|
-
htmlPath,
|
|
866
|
-
message: `Interactive visualization generated at ${htmlPath}`,
|
|
867
|
-
hint: params.open ? 'Opening in browser…' : `Open in browser: open "${htmlPath}"`,
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
catch (err) {
|
|
871
|
-
return { error: true, message: String(err) };
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
};
|
|
875
|
-
// ── Watch PID helpers ─────────────────────────────────────────────────────────
|
|
876
|
-
function getPidPath(cwd) {
|
|
877
|
-
return resolve(join(cwd, '.monomind', 'graph', 'watch.pid'));
|
|
878
|
-
}
|
|
879
|
-
function readWatchPid(cwd) {
|
|
880
|
-
const pidPath = getPidPath(cwd);
|
|
881
|
-
if (!existsSync(pidPath))
|
|
882
|
-
return null;
|
|
883
|
-
try {
|
|
884
|
-
const pid = parseInt(readFileSync(pidPath, 'utf-8').trim(), 10);
|
|
885
|
-
return isNaN(pid) ? null : pid;
|
|
886
|
-
}
|
|
887
|
-
catch {
|
|
888
|
-
return null;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
function isProcessRunning(pid) {
|
|
892
|
-
try {
|
|
893
|
-
process.kill(pid, 0);
|
|
894
|
-
return true;
|
|
895
|
-
}
|
|
896
|
-
catch {
|
|
897
|
-
return false;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
// ── Watch tools ───────────────────────────────────────────────────────────────
|
|
901
|
-
/**
|
|
902
|
-
* Start a background file watcher that rebuilds the knowledge graph + HTML
|
|
903
|
-
* whenever source files change (debounced 2 s).
|
|
904
|
-
*/
|
|
905
|
-
export const graphifyWatchTool = {
|
|
906
|
-
name: 'graphify_watch',
|
|
907
|
-
description: 'Start a background file watcher that automatically rebuilds the knowledge graph ' +
|
|
908
|
-
'(graph.json + graph.html) whenever source files change. Uses a 2-second debounce ' +
|
|
909
|
-
'so rapid saves do not trigger repeated rebuilds. The watcher runs as a detached ' +
|
|
910
|
-
'background process — call graphify_watch_stop to stop it.',
|
|
911
|
-
category: 'graphify',
|
|
912
|
-
tags: ['knowledge-graph', 'watch', 'auto-rebuild'],
|
|
913
|
-
inputSchema: {
|
|
914
|
-
type: 'object',
|
|
915
|
-
properties: {
|
|
916
|
-
path: {
|
|
917
|
-
type: 'string',
|
|
918
|
-
description: 'Project root to watch (defaults to current project root)',
|
|
919
|
-
},
|
|
920
|
-
debounce: {
|
|
921
|
-
type: 'number',
|
|
922
|
-
description: 'Debounce delay in milliseconds (default 2000)',
|
|
923
|
-
default: 2000,
|
|
924
|
-
},
|
|
925
|
-
extensions: {
|
|
926
|
-
type: 'string',
|
|
927
|
-
description: 'Comma-separated list of file extensions to watch (default: ts,js,tsx,jsx,py,go,rs,java,cs,rb,cpp,c)',
|
|
928
|
-
default: 'ts,js,tsx,jsx,py,go,rs,java,cs,rb,cpp,c',
|
|
929
|
-
},
|
|
930
|
-
},
|
|
931
|
-
},
|
|
932
|
-
handler: async (params) => {
|
|
933
|
-
const cwd = getProjectCwd();
|
|
934
|
-
const targetPath = params.path || cwd;
|
|
935
|
-
const debounceMs = params.debounce || 2000;
|
|
936
|
-
const extensions = (params.extensions || 'ts,js,tsx,jsx,py,go,rs,java,cs,rb,cpp,c')
|
|
937
|
-
.split(',')
|
|
938
|
-
.map((e) => e.trim())
|
|
939
|
-
.filter(Boolean);
|
|
940
|
-
// Check if already running
|
|
941
|
-
const existingPid = readWatchPid(targetPath);
|
|
942
|
-
if (existingPid !== null && isProcessRunning(existingPid)) {
|
|
943
|
-
return {
|
|
944
|
-
success: false,
|
|
945
|
-
message: `Watcher already running (PID ${existingPid})`,
|
|
946
|
-
hint: 'Call graphify_watch_stop first to restart.',
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
const pidPath = getPidPath(targetPath);
|
|
950
|
-
const outputDir = resolve(join(targetPath, '.monomind', 'graph'));
|
|
951
|
-
// Inline watcher script — runs as a detached node process
|
|
952
|
-
const watcherScript = `
|
|
953
|
-
import { watch } from 'chokidar';
|
|
954
|
-
import { writeFileSync, mkdirSync } from 'fs';
|
|
955
|
-
import { join } from 'path';
|
|
956
|
-
|
|
957
|
-
const TARGET = ${JSON.stringify(targetPath)};
|
|
958
|
-
const OUTPUT_DIR = ${JSON.stringify(outputDir)};
|
|
959
|
-
const PID_PATH = ${JSON.stringify(pidPath)};
|
|
960
|
-
const DEBOUNCE_MS = ${debounceMs};
|
|
961
|
-
const EXTS = new Set(${JSON.stringify(extensions)});
|
|
962
|
-
const IGNORE = [
|
|
963
|
-
/node_modules/,
|
|
964
|
-
/\\.git/,
|
|
965
|
-
/\\.monomind/,
|
|
966
|
-
/dist[\\\\/]/,
|
|
967
|
-
/\\.next/,
|
|
968
|
-
/\\.turbo/,
|
|
969
|
-
/coverage/,
|
|
970
|
-
];
|
|
971
|
-
|
|
972
|
-
// Write own PID
|
|
973
|
-
mkdirSync(OUTPUT_DIR, { recursive: true });
|
|
974
|
-
writeFileSync(PID_PATH, String(process.pid));
|
|
975
|
-
|
|
976
|
-
console.log('[graphify-watch] PID', process.pid, '— watching', TARGET);
|
|
977
|
-
|
|
978
|
-
let timer = null;
|
|
979
|
-
|
|
980
|
-
async function rebuild() {
|
|
981
|
-
const start = Date.now();
|
|
982
|
-
console.log('[graphify-watch] Change detected — rebuilding graph…');
|
|
983
|
-
try {
|
|
984
|
-
const { buildGraph } = await import('@monomind/graph');
|
|
985
|
-
const { graph: serialized } = await buildGraph(TARGET, { outputDir: OUTPUT_DIR });
|
|
986
|
-
const { exportHTML } = await import('@monomind/graph');
|
|
987
|
-
exportHTML(serialized, OUTPUT_DIR);
|
|
988
|
-
console.log('[graphify-watch] Done in', Date.now() - start, 'ms');
|
|
989
|
-
} catch (err) {
|
|
990
|
-
console.error('[graphify-watch] Build error:', err.message ?? err);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
const watcher = watch(TARGET, {
|
|
995
|
-
ignored: (p) => IGNORE.some((r) => r.test(p)),
|
|
996
|
-
persistent: true,
|
|
997
|
-
ignoreInitial: true,
|
|
998
|
-
awaitWriteFinish: { stabilityThreshold: 300, pollInterval: 100 },
|
|
999
|
-
});
|
|
1000
|
-
|
|
1001
|
-
watcher.on('all', (event, filePath) => {
|
|
1002
|
-
const ext = filePath.split('.').pop() ?? '';
|
|
1003
|
-
if (!EXTS.has(ext)) return;
|
|
1004
|
-
if (timer) clearTimeout(timer);
|
|
1005
|
-
timer = setTimeout(rebuild, DEBOUNCE_MS);
|
|
1006
|
-
});
|
|
1007
|
-
|
|
1008
|
-
watcher.on('error', (err) => console.error('[graphify-watch] Watcher error:', err));
|
|
1009
|
-
|
|
1010
|
-
// Clean up PID on exit
|
|
1011
|
-
process.on('exit', () => { try { require('fs').unlinkSync(PID_PATH); } catch {} });
|
|
1012
|
-
process.on('SIGINT', () => process.exit(0));
|
|
1013
|
-
process.on('SIGTERM', () => process.exit(0));
|
|
1014
|
-
`;
|
|
1015
|
-
try {
|
|
1016
|
-
const { spawn } = await import('child_process');
|
|
1017
|
-
const { writeFileSync } = await import('fs');
|
|
1018
|
-
const { mkdirSync } = await import('fs');
|
|
1019
|
-
mkdirSync(outputDir, { recursive: true });
|
|
1020
|
-
// Write the script to a temp file so it can use ESM imports
|
|
1021
|
-
const scriptPath = resolve(join(outputDir, '_watcher.mjs'));
|
|
1022
|
-
writeFileSync(scriptPath, watcherScript);
|
|
1023
|
-
const child = spawn(process.execPath, [scriptPath], {
|
|
1024
|
-
detached: true,
|
|
1025
|
-
stdio: 'ignore',
|
|
1026
|
-
env: { ...process.env },
|
|
1027
|
-
});
|
|
1028
|
-
child.unref();
|
|
1029
|
-
// Give the process a moment to write its own PID
|
|
1030
|
-
await new Promise((r) => setTimeout(r, 500));
|
|
1031
|
-
const pid = readWatchPid(targetPath) ?? child.pid;
|
|
1032
|
-
return {
|
|
1033
|
-
success: true,
|
|
1034
|
-
pid,
|
|
1035
|
-
watching: targetPath,
|
|
1036
|
-
debounceMs,
|
|
1037
|
-
extensions,
|
|
1038
|
-
message: `Graph watcher started (PID ${pid}). graph.json + graph.html will rebuild on file changes.`,
|
|
1039
|
-
hint: 'Call graphify_watch_stop to stop.',
|
|
1040
|
-
};
|
|
1041
|
-
}
|
|
1042
|
-
catch (err) {
|
|
1043
|
-
return { error: true, message: String(err) };
|
|
1044
|
-
}
|
|
1045
|
-
},
|
|
1046
|
-
};
|
|
1047
|
-
/**
|
|
1048
|
-
* Stop the background graph watcher started by graphify_watch.
|
|
1049
|
-
*/
|
|
1050
|
-
export const graphifyWatchStopTool = {
|
|
1051
|
-
name: 'graphify_watch_stop',
|
|
1052
|
-
description: 'Stop the background file watcher started by graphify_watch.',
|
|
1053
|
-
category: 'graphify',
|
|
1054
|
-
tags: ['knowledge-graph', 'watch'],
|
|
1055
|
-
inputSchema: {
|
|
1056
|
-
type: 'object',
|
|
1057
|
-
properties: {
|
|
1058
|
-
path: {
|
|
1059
|
-
type: 'string',
|
|
1060
|
-
description: 'Project root (defaults to current project root)',
|
|
1061
|
-
},
|
|
1062
|
-
},
|
|
1063
|
-
},
|
|
1064
|
-
handler: async (params) => {
|
|
1065
|
-
const cwd = getProjectCwd();
|
|
1066
|
-
const targetPath = params.path || cwd;
|
|
1067
|
-
const pid = readWatchPid(targetPath);
|
|
1068
|
-
if (pid === null) {
|
|
1069
|
-
return { success: false, message: 'No watcher PID found — watcher may not be running.' };
|
|
1070
|
-
}
|
|
1071
|
-
if (!isProcessRunning(pid)) {
|
|
1072
|
-
// Clean up stale PID file
|
|
1073
|
-
try {
|
|
1074
|
-
const { unlinkSync } = await import('fs');
|
|
1075
|
-
unlinkSync(getPidPath(targetPath));
|
|
1076
|
-
}
|
|
1077
|
-
catch { /* ignore */ }
|
|
1078
|
-
return { success: false, message: `Process ${pid} is not running (stale PID cleaned up).` };
|
|
1079
|
-
}
|
|
1080
|
-
try {
|
|
1081
|
-
process.kill(pid, 'SIGTERM');
|
|
1082
|
-
// Remove PID file
|
|
1083
|
-
try {
|
|
1084
|
-
const { unlinkSync } = await import('fs');
|
|
1085
|
-
unlinkSync(getPidPath(targetPath));
|
|
1086
|
-
}
|
|
1087
|
-
catch { /* ignore */ }
|
|
1088
|
-
return { success: true, message: `Watcher (PID ${pid}) stopped.` };
|
|
1089
|
-
}
|
|
1090
|
-
catch (err) {
|
|
1091
|
-
return { error: true, message: `Failed to stop PID ${pid}: ${String(err)}` };
|
|
1092
|
-
}
|
|
1093
|
-
},
|
|
1094
|
-
};
|
|
1095
|
-
/**
|
|
1096
|
-
* Read the GRAPH_REPORT.md generated during the last build.
|
|
1097
|
-
*/
|
|
1098
|
-
export const graphifyReportTool = {
|
|
1099
|
-
name: 'graphify_report',
|
|
1100
|
-
description: 'Read the GRAPH_REPORT.md generated by the last graphify_build. ' +
|
|
1101
|
-
'Returns the full markdown audit trail: corpus check, god nodes, surprising connections, ' +
|
|
1102
|
-
'communities, ambiguous edges, knowledge gaps, and suggested questions.',
|
|
1103
|
-
category: 'graphify',
|
|
1104
|
-
tags: ['knowledge-graph', 'report', 'audit'],
|
|
1105
|
-
inputSchema: {
|
|
1106
|
-
type: 'object',
|
|
1107
|
-
properties: {
|
|
1108
|
-
path: {
|
|
1109
|
-
type: 'string',
|
|
1110
|
-
description: 'Project path (defaults to current project root)',
|
|
1111
|
-
},
|
|
1112
|
-
},
|
|
1113
|
-
},
|
|
1114
|
-
handler: async (params) => {
|
|
1115
|
-
const cwd = getProjectCwd();
|
|
1116
|
-
const targetPath = params.path || cwd;
|
|
1117
|
-
const reportPath = resolve(join(targetPath, '.monomind', 'graph', 'GRAPH_REPORT.md'));
|
|
1118
|
-
if (!existsSync(reportPath)) {
|
|
1119
|
-
return {
|
|
1120
|
-
error: true,
|
|
1121
|
-
message: 'No report found. Run graphify_build first.',
|
|
1122
|
-
hint: `Expected: ${reportPath}`,
|
|
1123
|
-
};
|
|
1124
|
-
}
|
|
1125
|
-
try {
|
|
1126
|
-
const content = readFileSync(reportPath, 'utf-8');
|
|
1127
|
-
return { success: true, reportPath, content };
|
|
1128
|
-
}
|
|
1129
|
-
catch (err) {
|
|
1130
|
-
return { error: true, message: String(err) };
|
|
1131
|
-
}
|
|
1132
|
-
},
|
|
1133
|
-
};
|
|
1134
|
-
/**
|
|
1135
|
-
* Suggest questions the knowledge graph can answer about the codebase.
|
|
1136
|
-
*/
|
|
1137
|
-
export const graphifySuggestTool = {
|
|
1138
|
-
name: 'graphify_suggest',
|
|
1139
|
-
description: 'Return a prioritised list of questions this knowledge graph is uniquely ' +
|
|
1140
|
-
'positioned to answer — e.g. bridge nodes between subsystems, god nodes worth investigating, ' +
|
|
1141
|
-
'isolated components with no connections, and low-cohesion communities. ' +
|
|
1142
|
-
'Use after graphify_build to guide architectural analysis.',
|
|
1143
|
-
category: 'graphify',
|
|
1144
|
-
tags: ['knowledge-graph', 'questions', 'analysis'],
|
|
1145
|
-
inputSchema: {
|
|
1146
|
-
type: 'object',
|
|
1147
|
-
properties: {
|
|
1148
|
-
path: {
|
|
1149
|
-
type: 'string',
|
|
1150
|
-
description: 'Project path (defaults to current project root)',
|
|
1151
|
-
},
|
|
1152
|
-
},
|
|
1153
|
-
},
|
|
1154
|
-
handler: async (params) => {
|
|
1155
|
-
const cwd = getProjectCwd();
|
|
1156
|
-
const targetPath = params.path || cwd;
|
|
1157
|
-
if (!graphExists(targetPath)) {
|
|
1158
|
-
return { error: true, message: 'No graph found. Run graphify_build first.' };
|
|
1159
|
-
}
|
|
1160
|
-
try {
|
|
1161
|
-
const { loadGraph, suggestQuestions, buildAnalysis } = await import('@monomind/graph');
|
|
1162
|
-
const graphPath = getGraphPath(targetPath);
|
|
1163
|
-
const outputDir = resolve(join(targetPath, '.monomind', 'graph'));
|
|
1164
|
-
const { buildGraphologyGraph } = await import('@monomind/graph');
|
|
1165
|
-
const raw = loadGraph(graphPath);
|
|
1166
|
-
const graph = buildGraphologyGraph({ nodes: raw.nodes, edges: raw.edges, hyperedges: [], filesProcessed: 0, fromCache: 0, errors: [] });
|
|
1167
|
-
const analysis = buildAnalysis(graph, outputDir);
|
|
1168
|
-
const questions = suggestQuestions(graph, analysis.communities);
|
|
1169
|
-
return { success: true, questions, total: questions.length };
|
|
1170
|
-
}
|
|
1171
|
-
catch (err) {
|
|
1172
|
-
return { error: true, message: String(err) };
|
|
1173
|
-
}
|
|
1174
|
-
},
|
|
1175
|
-
};
|
|
1176
|
-
/**
|
|
1177
|
-
* Run a corpus health check on the project files.
|
|
1178
|
-
*/
|
|
1179
|
-
export const graphifyHealthTool = {
|
|
1180
|
-
name: 'graphify_health',
|
|
1181
|
-
description: 'Run a corpus health check on the project directory — warns when the codebase ' +
|
|
1182
|
-
'is too small for graph analysis, too large to be useful, security-sensitive files were ' +
|
|
1183
|
-
'found, or when the doc-to-code ratio is skewed. Run before graphify_build to catch issues early.',
|
|
1184
|
-
category: 'graphify',
|
|
1185
|
-
tags: ['knowledge-graph', 'health', 'corpus'],
|
|
1186
|
-
inputSchema: {
|
|
1187
|
-
type: 'object',
|
|
1188
|
-
properties: {
|
|
1189
|
-
path: {
|
|
1190
|
-
type: 'string',
|
|
1191
|
-
description: 'Project path (defaults to current project root)',
|
|
1192
|
-
},
|
|
1193
|
-
},
|
|
1194
|
-
},
|
|
1195
|
-
handler: async (params) => {
|
|
1196
|
-
const cwd = getProjectCwd();
|
|
1197
|
-
const targetPath = params.path || cwd;
|
|
1198
|
-
try {
|
|
1199
|
-
const { collectFiles, corpusHealth } = await import('@monomind/graph');
|
|
1200
|
-
const files = collectFiles(targetPath);
|
|
1201
|
-
const warnings = corpusHealth(files);
|
|
1202
|
-
return {
|
|
1203
|
-
success: true,
|
|
1204
|
-
totalFiles: files.length,
|
|
1205
|
-
warnings,
|
|
1206
|
-
healthy: warnings.length === 0,
|
|
1207
|
-
message: warnings.length === 0
|
|
1208
|
-
? `Corpus looks healthy (${files.length} files).`
|
|
1209
|
-
: `${warnings.length} warning(s) found.`,
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
catch (err) {
|
|
1213
|
-
return { error: true, message: String(err) };
|
|
1214
|
-
}
|
|
1215
|
-
},
|
|
1216
|
-
};
|
|
1217
|
-
// ── Exports ───────────────────────────────────────────────────────────────────
|
|
1218
|
-
export const graphifyTools = [
|
|
1219
|
-
graphifyBuildTool,
|
|
1220
|
-
graphifyQueryTool,
|
|
1221
|
-
graphifyGodNodesTool,
|
|
1222
|
-
graphifyGetNodeTool,
|
|
1223
|
-
graphifyShortestPathTool,
|
|
1224
|
-
graphifyGetCommunityTool,
|
|
1225
|
-
graphifyStatsTool,
|
|
1226
|
-
graphifySurprisesTool,
|
|
1227
|
-
graphifyVisualizeTool,
|
|
1228
|
-
graphifyWatchTool,
|
|
1229
|
-
graphifyWatchStopTool,
|
|
1230
|
-
graphifyReportTool,
|
|
1231
|
-
graphifySuggestTool,
|
|
1232
|
-
graphifyHealthTool,
|
|
1233
|
-
];
|
|
1234
|
-
export default graphifyTools;
|
|
1235
|
-
//# sourceMappingURL=graphify-tools.js.map
|