@monoes/monomindcli 1.10.54 → 1.10.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/optimization/benchmark-suite.md +2 -0
- package/.claude/agents/optimization/load-balancer.md +2 -0
- package/.claude/agents/optimization/performance-monitor.md +2 -0
- package/.claude/agents/optimization/resource-allocator.md +3 -1
- package/.claude/agents/optimization/topology-optimizer.md +2 -0
- package/.claude/commands/mastermind/_repeat.md +21 -0
- package/.claude/commands/mastermind/_taskfile.md +235 -0
- package/.claude/commands/mastermind/adr.md +11 -0
- package/.claude/commands/mastermind/approve.md +94 -0
- package/.claude/commands/mastermind/autodev.md +32 -0
- package/.claude/commands/mastermind/budget.md +7 -0
- package/.claude/commands/mastermind/code-review.md +317 -0
- package/.claude/commands/mastermind/createorg.md +40 -1
- package/.claude/commands/mastermind/createtask.md +383 -0
- package/.claude/commands/mastermind/debug.md +22 -0
- package/.claude/commands/mastermind/design.md +20 -0
- package/.claude/commands/mastermind/do.md +526 -0
- package/.claude/commands/mastermind/execute.md +20 -0
- package/.claude/commands/mastermind/finish.md +20 -0
- package/.claude/commands/mastermind/graph-status.md +7 -0
- package/.claude/commands/mastermind/help.md +118 -0
- package/.claude/commands/mastermind/ideate.md +261 -0
- package/.claude/commands/mastermind/improve.md +345 -0
- package/.claude/commands/mastermind/loops.md +7 -0
- package/.claude/commands/mastermind/master.md +186 -6
- package/.claude/commands/mastermind/memory.md +230 -0
- package/.claude/commands/mastermind/plan.md +26 -0
- package/.claude/commands/mastermind/receive-review.md +20 -0
- package/.claude/commands/mastermind/repeat.md +257 -0
- package/.claude/commands/mastermind/runorg.md +3 -0
- package/.claude/commands/mastermind/skill-builder.md +20 -0
- package/.claude/commands/mastermind/specialagents.md +125 -0
- package/.claude/commands/mastermind/swarm.md +161 -0
- package/.claude/commands/mastermind/taskdev.md +26 -0
- package/.claude/commands/mastermind/tdd.md +22 -0
- package/.claude/commands/mastermind/techport.md +4 -0
- package/.claude/commands/mastermind/understand.md +139 -0
- package/.claude/commands/mastermind/verify.md +22 -0
- package/.claude/commands/mastermind/worktree.md +20 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +2 -1
- package/.claude/helpers/hook-handler.cjs +19 -0
- package/.claude/helpers/skill-registry.json +23 -0
- package/.claude/helpers/statusline.cjs +1 -1
- package/.claude/skills/mastermind/approve.md +15 -7
- package/.claude/skills/mastermind/autodev.md +534 -0
- package/.claude/skills/mastermind/createorg.md +21 -5
- package/.claude/skills/mastermind/debug.md +232 -0
- package/.claude/skills/mastermind/design.md +187 -0
- package/.claude/skills/mastermind/execute.md +104 -0
- package/.claude/skills/mastermind/finish.md +251 -0
- package/.claude/skills/mastermind/plan.md +180 -0
- package/.claude/skills/mastermind/receive-review.md +213 -0
- package/.claude/skills/mastermind/runorg.md +23 -8
- package/.claude/skills/mastermind/skill-builder.md +274 -0
- package/.claude/skills/mastermind/taskdev.md +307 -0
- package/.claude/skills/mastermind/tdd.md +394 -0
- package/.claude/skills/mastermind/verify.md +196 -0
- package/.claude/skills/mastermind/worktree.md +160 -132
- package/README.md +320 -253
- package/dist/src/commands/analyze.d.ts.map +1 -1
- package/dist/src/commands/analyze.js +9 -2
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/completions.js +1 -1
- package/dist/src/commands/guidance.js +7 -7
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +16 -3
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +3 -2
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +7 -0
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +47 -13
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/neural.d.ts.map +1 -1
- package/dist/src/commands/neural.js +100 -14
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/platforms.d.ts +11 -0
- package/dist/src/commands/platforms.d.ts.map +1 -0
- package/dist/src/commands/platforms.js +195 -0
- package/dist/src/commands/platforms.js.map +1 -0
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/update.js +6 -6
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +28 -0
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/statusline-generator.js +1 -1
- package/dist/src/init/types.d.ts +1 -0
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +92 -0
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +52 -0
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +106 -5
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -5
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -5
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +507 -5587
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +64 -4
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +4 -4
- package/dist/src/memory/intelligence.d.ts +2 -2
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +108 -3
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.js +1 -1
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +1 -10
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
- package/dist/src/memory/sona-optimizer.js +0 -46
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/runtime/headless.js +3 -3
- package/dist/src/ruvector/diff-classifier.d.ts +0 -2
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -1
- package/dist/src/ruvector/diff-classifier.js +2 -14
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +26 -9
- package/dist/src/ruvector/index.d.ts.map +1 -1
- package/dist/src/ruvector/index.js +3 -21
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.js +2 -2
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/types.d.ts +0 -15
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +0 -18
- package/dist/src/types.js.map +1 -1
- package/dist/src/ui/dashboard.html +8763 -9766
- package/dist/src/ui/orgs.html +1 -1
- package/dist/src/ui/server.mjs +504 -35
- package/dist/src/update/index.js +1 -1
- package/dist/src/update/validator.js +8 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- 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/consensus/performance-benchmarker.md +0 -831
- package/.claude/agents/data/ml/data-ml-model.md +0 -76
- 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/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/release-swarm.md +0 -597
- package/.claude/agents/goal/agent.md +0 -804
- package/.claude/agents/goal/code-goal-planner.md +0 -445
- 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 -67
- 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/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/sona/sona-learning-optimizer.md +0 -65
- 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/specialists/memory-specialist.md +0 -298
- package/.claude/agents/specialists/performance-engineer.md +0 -387
- package/.claude/agents/specialists/queen-coordinator.md +0 -67
- package/.claude/agents/specialists/security-architect.md +0 -154
- package/.claude/agents/specialized/accounts-payable-agent.md +0 -186
- 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/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-french-consulting-market.md +0 -193
- package/.claude/agents/specialized/specialized-korean-business-navigator.md +0 -217
- package/.claude/agents/specialized/specialized-salesforce-architect.md +0 -181
- package/.claude/agents/specialized/study-abroad-advisor.md +0 -283
- package/.claude/agents/specialized/supply-chain-strategist.md +0 -583
- 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/templates/github-pr-manager.md +0 -155
- 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/testing-reality-checker.md +0 -237
- package/.claude/commands/analysis/token-efficiency.md +0 -42
- package/.claude/commands/optimization/README.md +0 -73
- package/.claude/commands/optimization/parallel-execution.md +0 -76
- package/.claude/commands/swarm/swarm-analysis.md +0 -62
- package/.claude/commands/swarm/swarm-background.md +0 -65
- package/.claude/commands/swarm/swarm-modes.md +0 -67
- package/.claude/commands/swarm/swarm-monitor.md +0 -54
- package/.claude/commands/swarm/swarm-status.md +0 -44
- package/.claude/commands/swarm/swarm-strategies.md +0 -76
- package/.claude/commands/training/model-update.md +0 -78
- package/.claude/commands/training/pattern-learn.md +0 -69
- package/.claude/commands/training/specialization.md +0 -92
- package/.claude/commands/verify/check.md +0 -106
- package/.claude/commands/verify/start.md +0 -105
- package/.claude/helpers/README.md +0 -105
- package/.claude/helpers/context-persistence-hook.mjs +0 -1988
- package/.claude/helpers/intelligence.cjs +0 -247
- package/.claude/helpers/learning-service.mjs +0 -1302
- package/.claude/helpers/memory-palace.cjs +0 -461
- package/.claude/helpers/memory.cjs +0 -84
- package/.claude/helpers/metrics-db.mjs +0 -488
- package/.claude/helpers/router.cjs +0 -559
- package/.claude/helpers/session.cjs +0 -126
- 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/skills/agentdb-advanced/SKILL.md +0 -549
- package/.claude/skills/agentdb-learning/SKILL.md +0 -544
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -337
- package/.claude/skills/agentdb-optimization/SKILL.md +0 -508
- package/.claude/skills/agentdb-vector-search/SKILL.md +0 -335
- package/.claude/skills/agentic-integration/SKILL.md +0 -265
- package/.claude/skills/cli-modernization/SKILL.md +0 -950
- package/.claude/skills/core-implementation/SKILL.md +0 -892
- package/.claude/skills/ddd-architecture/SKILL.md +0 -444
- package/.claude/skills/github-code-review/SKILL.md +0 -1147
- package/.claude/skills/github-multi-repo/SKILL.md +0 -912
- package/.claude/skills/github-project-management/SKILL.md +0 -1245
- package/.claude/skills/github-release-management/SKILL.md +0 -1118
- package/.claude/skills/github-workflow-automation/SKILL.md +0 -1107
- package/.claude/skills/mcp-optimization/SKILL.md +0 -837
- package/.claude/skills/memory-unification/SKILL.md +0 -196
- package/.claude/skills/performance-optimization/SKILL.md +0 -416
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -444
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -199
- package/.claude/skills/security-hardening/SKILL.md +0 -101
- package/.claude/skills/stream-chain/SKILL.md +0 -560
- package/.claude/skills/swarm-coordination/SKILL.md +0 -451
- package/bundled-graph/dist/src/analyze.d.ts +0 -32
- package/bundled-graph/dist/src/analyze.d.ts.map +0 -1
- package/bundled-graph/dist/src/analyze.js +0 -297
- package/bundled-graph/dist/src/analyze.js.map +0 -1
- package/bundled-graph/dist/src/build.d.ts +0 -8
- package/bundled-graph/dist/src/build.d.ts.map +0 -1
- package/bundled-graph/dist/src/build.js.map +0 -1
- package/bundled-graph/dist/src/cache.d.ts +0 -12
- package/bundled-graph/dist/src/cache.d.ts.map +0 -1
- package/bundled-graph/dist/src/cache.js +0 -43
- package/bundled-graph/dist/src/cache.js.map +0 -1
- package/bundled-graph/dist/src/cluster.d.ts +0 -5
- package/bundled-graph/dist/src/cluster.d.ts.map +0 -1
- package/bundled-graph/dist/src/cluster.js.map +0 -1
- package/bundled-graph/dist/src/detect.d.ts +0 -21
- package/bundled-graph/dist/src/detect.d.ts.map +0 -1
- package/bundled-graph/dist/src/detect.js +0 -195
- package/bundled-graph/dist/src/detect.js.map +0 -1
- package/bundled-graph/dist/src/export.d.ts +0 -21
- package/bundled-graph/dist/src/export.d.ts.map +0 -1
- package/bundled-graph/dist/src/export.js +0 -68
- package/bundled-graph/dist/src/export.js.map +0 -1
- package/bundled-graph/dist/src/extract/index.d.ts +0 -20
- package/bundled-graph/dist/src/extract/index.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/index.js +0 -158
- package/bundled-graph/dist/src/extract/index.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/c.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/c.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/c.js +0 -88
- package/bundled-graph/dist/src/extract/languages/c.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/cpp.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/cpp.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/cpp.js +0 -121
- package/bundled-graph/dist/src/extract/languages/cpp.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/csharp.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/csharp.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/csharp.js +0 -121
- package/bundled-graph/dist/src/extract/languages/csharp.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/go.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/go.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/go.js +0 -181
- package/bundled-graph/dist/src/extract/languages/go.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/java.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/java.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/java.js +0 -117
- package/bundled-graph/dist/src/extract/languages/java.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/kotlin.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/kotlin.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/kotlin.js +0 -112
- package/bundled-graph/dist/src/extract/languages/kotlin.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/php.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/php.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/php.js +0 -130
- package/bundled-graph/dist/src/extract/languages/php.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/python.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/python.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/python.js +0 -230
- package/bundled-graph/dist/src/extract/languages/python.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/ruby.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/ruby.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/ruby.js +0 -120
- package/bundled-graph/dist/src/extract/languages/ruby.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/rust.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/rust.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/rust.js +0 -195
- package/bundled-graph/dist/src/extract/languages/rust.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/scala.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/scala.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/scala.js +0 -110
- package/bundled-graph/dist/src/extract/languages/scala.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/swift.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/swift.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/swift.js +0 -122
- package/bundled-graph/dist/src/extract/languages/swift.js.map +0 -1
- package/bundled-graph/dist/src/extract/languages/typescript.d.ts +0 -3
- package/bundled-graph/dist/src/extract/languages/typescript.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/languages/typescript.js +0 -295
- package/bundled-graph/dist/src/extract/languages/typescript.js.map +0 -1
- package/bundled-graph/dist/src/extract/semantic.d.ts +0 -38
- package/bundled-graph/dist/src/extract/semantic.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/semantic.js +0 -242
- package/bundled-graph/dist/src/extract/semantic.js.map +0 -1
- package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts +0 -48
- package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/tree-sitter-runner.js +0 -137
- package/bundled-graph/dist/src/extract/tree-sitter-runner.js.map +0 -1
- package/bundled-graph/dist/src/extract/types.d.ts +0 -7
- package/bundled-graph/dist/src/extract/types.d.ts.map +0 -1
- package/bundled-graph/dist/src/extract/types.js +0 -2
- package/bundled-graph/dist/src/extract/types.js.map +0 -1
- package/bundled-graph/dist/src/index.d.ts +0 -28
- package/bundled-graph/dist/src/index.d.ts.map +0 -1
- package/bundled-graph/dist/src/index.js +0 -26
- package/bundled-graph/dist/src/index.js.map +0 -1
- package/bundled-graph/dist/src/pipeline.d.ts +0 -27
- package/bundled-graph/dist/src/pipeline.d.ts.map +0 -1
- package/bundled-graph/dist/src/pipeline.js +0 -269
- package/bundled-graph/dist/src/pipeline.js.map +0 -1
- package/bundled-graph/dist/src/report.d.ts +0 -26
- package/bundled-graph/dist/src/report.d.ts.map +0 -1
- package/bundled-graph/dist/src/report.js +0 -214
- package/bundled-graph/dist/src/report.js.map +0 -1
- package/bundled-graph/dist/src/types.d.ts +0 -124
- package/bundled-graph/dist/src/types.d.ts.map +0 -1
- package/bundled-graph/dist/src/types.js +0 -2
- package/bundled-graph/dist/src/types.js.map +0 -1
- package/bundled-graph/dist/src/visualize.d.ts +0 -4
- package/bundled-graph/dist/src/visualize.d.ts.map +0 -1
- package/bundled-graph/dist/src/visualize.js +0 -574
- package/bundled-graph/dist/src/visualize.js.map +0 -1
- package/bundled-graph/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/src/ui/dashboard-v2.html +0 -5316
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Find the most connected nodes (god nodes) — core abstractions of the codebase.
|
|
3
|
-
* Sorted by total degree (in + out), descending.
|
|
4
|
-
*/
|
|
5
|
-
export function godNodes(graph, topN = 15) {
|
|
6
|
-
const nodes = [];
|
|
7
|
-
graph.forEachNode((id, attrs) => {
|
|
8
|
-
nodes.push({
|
|
9
|
-
id,
|
|
10
|
-
label: attrs.label || id,
|
|
11
|
-
degree: graph.degree(id),
|
|
12
|
-
community: attrs.community,
|
|
13
|
-
sourceFile: attrs.sourceFile || '',
|
|
14
|
-
neighbors: graph
|
|
15
|
-
.neighbors(id)
|
|
16
|
-
.slice(0, 8)
|
|
17
|
-
.map((n) => graph.getNodeAttribute(n, 'label') || n),
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
return nodes.sort((a, b) => b.degree - a.degree).slice(0, topN);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Find surprising cross-community connections.
|
|
24
|
-
* An edge is surprising when its endpoints belong to different communities.
|
|
25
|
-
* Base score is degree(source) * degree(target), boosted by confidence and file type factors.
|
|
26
|
-
*/
|
|
27
|
-
export function surprisingConnections(graph, topN = 20) {
|
|
28
|
-
const surprises = [];
|
|
29
|
-
graph.forEachEdge((_, attrs, source, target) => {
|
|
30
|
-
const cu = graph.getNodeAttribute(source, 'community');
|
|
31
|
-
const cv = graph.getNodeAttribute(target, 'community');
|
|
32
|
-
if (cu !== undefined && cv !== undefined && cu !== cv) {
|
|
33
|
-
const confidence = attrs.confidence ?? 'AMBIGUOUS';
|
|
34
|
-
const confidenceScore = attrs.confidenceScore;
|
|
35
|
-
const sourceFileType = graph.getNodeAttribute(source, 'fileType');
|
|
36
|
-
const targetFileType = graph.getNodeAttribute(target, 'fileType');
|
|
37
|
-
let score = graph.degree(source) * graph.degree(target);
|
|
38
|
-
// Boost for AMBIGUOUS edges — more uncertain = more surprising
|
|
39
|
-
if (confidence === 'AMBIGUOUS')
|
|
40
|
-
score *= 1.5;
|
|
41
|
-
// Boost for cross-file-type connections
|
|
42
|
-
if (sourceFileType && targetFileType && sourceFileType !== targetFileType)
|
|
43
|
-
score *= 1.3;
|
|
44
|
-
// Boost for INFERRED edges based on confidence score
|
|
45
|
-
if (confidence === 'INFERRED')
|
|
46
|
-
score *= 1 + (confidenceScore ?? 0.5);
|
|
47
|
-
surprises.push({
|
|
48
|
-
from: graph.getNodeAttribute(source, 'label') || source,
|
|
49
|
-
fromCommunity: cu,
|
|
50
|
-
fromFile: graph.getNodeAttribute(source, 'sourceFile') || '',
|
|
51
|
-
to: graph.getNodeAttribute(target, 'label') || target,
|
|
52
|
-
toCommunity: cv,
|
|
53
|
-
toFile: graph.getNodeAttribute(target, 'sourceFile') || '',
|
|
54
|
-
relation: attrs.relation || '',
|
|
55
|
-
confidence,
|
|
56
|
-
score,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return surprises.sort((a, b) => b.score - a.score).slice(0, topN);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Compute high-level graph statistics.
|
|
64
|
-
*/
|
|
65
|
-
export function graphStats(graph, graphPath) {
|
|
66
|
-
const confidence = {};
|
|
67
|
-
const relations = {};
|
|
68
|
-
const fileTypes = {};
|
|
69
|
-
const commSet = new Set();
|
|
70
|
-
graph.forEachEdge((_, attrs) => {
|
|
71
|
-
const c = attrs.confidence || 'UNKNOWN';
|
|
72
|
-
confidence[c] = (confidence[c] ?? 0) + 1;
|
|
73
|
-
const r = attrs.relation || 'unknown';
|
|
74
|
-
relations[r] = (relations[r] ?? 0) + 1;
|
|
75
|
-
});
|
|
76
|
-
graph.forEachNode((_, attrs) => {
|
|
77
|
-
const ft = attrs.fileType || 'unknown';
|
|
78
|
-
fileTypes[ft] = (fileTypes[ft] ?? 0) + 1;
|
|
79
|
-
const c = attrs.community;
|
|
80
|
-
if (c !== undefined)
|
|
81
|
-
commSet.add(c);
|
|
82
|
-
});
|
|
83
|
-
const topRelations = Object.fromEntries(Object.entries(relations)
|
|
84
|
-
.sort(([, a], [, b]) => b - a)
|
|
85
|
-
.slice(0, 10));
|
|
86
|
-
return {
|
|
87
|
-
nodes: graph.order,
|
|
88
|
-
edges: graph.size,
|
|
89
|
-
communities: commSet.size,
|
|
90
|
-
confidence: confidence,
|
|
91
|
-
fileTypes,
|
|
92
|
-
topRelations,
|
|
93
|
-
isDirected: graph.type === 'directed',
|
|
94
|
-
graphPath,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Build a complete GraphAnalysis object from an annotated graph.
|
|
99
|
-
* Assumes community detection has already been run (nodes have `community` attribute).
|
|
100
|
-
*/
|
|
101
|
-
export function buildAnalysis(graph, graphPath) {
|
|
102
|
-
const communities = {};
|
|
103
|
-
graph.forEachNode((id, attrs) => {
|
|
104
|
-
const c = attrs.community;
|
|
105
|
-
if (c !== undefined) {
|
|
106
|
-
if (!communities[c])
|
|
107
|
-
communities[c] = [];
|
|
108
|
-
communities[c].push(id);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
return {
|
|
112
|
-
godNodes: godNodes(graph),
|
|
113
|
-
surprises: surprisingConnections(graph),
|
|
114
|
-
communities,
|
|
115
|
-
stats: graphStats(graph, graphPath),
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Generate clarifying questions about uncertain or structurally interesting graph patterns.
|
|
120
|
-
* Sorted by priority (high → medium → low), capped at 25 total.
|
|
121
|
-
*/
|
|
122
|
-
export function suggestQuestions(graph, communities) {
|
|
123
|
-
const questions = [];
|
|
124
|
-
// Build communities map if not provided
|
|
125
|
-
const commMap = communities ?? {};
|
|
126
|
-
if (!communities) {
|
|
127
|
-
graph.forEachNode((id, attrs) => {
|
|
128
|
-
const c = attrs.community;
|
|
129
|
-
if (c !== undefined) {
|
|
130
|
-
if (!commMap[c])
|
|
131
|
-
commMap[c] = [];
|
|
132
|
-
commMap[c].push(id);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
// AMBIGUOUS_EDGE: cross-community edges with AMBIGUOUS confidence
|
|
137
|
-
graph.forEachEdge((_, attrs, source, target) => {
|
|
138
|
-
if (attrs.confidence !== 'AMBIGUOUS')
|
|
139
|
-
return;
|
|
140
|
-
const cu = graph.getNodeAttribute(source, 'community');
|
|
141
|
-
const cv = graph.getNodeAttribute(target, 'community');
|
|
142
|
-
if (cu === undefined || cv === undefined || cu === cv)
|
|
143
|
-
return;
|
|
144
|
-
const from = graph.getNodeAttribute(source, 'label') || source;
|
|
145
|
-
const to = graph.getNodeAttribute(target, 'label') || target;
|
|
146
|
-
questions.push({
|
|
147
|
-
type: 'AMBIGUOUS_EDGE',
|
|
148
|
-
question: `What is the exact relationship between ${from} and ${to}? The edge is marked AMBIGUOUS.`,
|
|
149
|
-
nodes: [source, target],
|
|
150
|
-
priority: 'high',
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
// BRIDGE_NODE: nodes with neighbors in ≥3 different communities (simple heuristic)
|
|
154
|
-
const bridgeCandidates = [];
|
|
155
|
-
graph.forEachNode((id, attrs) => {
|
|
156
|
-
const neighborComms = new Set();
|
|
157
|
-
graph.neighbors(id).forEach((n) => {
|
|
158
|
-
const c = graph.getNodeAttribute(n, 'community');
|
|
159
|
-
if (c !== undefined)
|
|
160
|
-
neighborComms.add(c);
|
|
161
|
-
});
|
|
162
|
-
if (neighborComms.size >= 3) {
|
|
163
|
-
bridgeCandidates.push({
|
|
164
|
-
id,
|
|
165
|
-
label: attrs.label || id,
|
|
166
|
-
comms: Array.from(neighborComms),
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
bridgeCandidates
|
|
171
|
-
.sort((a, b) => b.comms.length - a.comms.length)
|
|
172
|
-
.slice(0, 5)
|
|
173
|
-
.forEach(({ id, label, comms }) => {
|
|
174
|
-
questions.push({
|
|
175
|
-
type: 'BRIDGE_NODE',
|
|
176
|
-
question: `Is ${label} intentionally a bridge between communities [${comms.join(', ')}]? Should it be split?`,
|
|
177
|
-
nodes: [id],
|
|
178
|
-
priority: 'high',
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
// INFERRED_GOD_NODE: top 5 high-degree nodes where >50% of edges are INFERRED
|
|
182
|
-
const inferredGodNodes = [];
|
|
183
|
-
graph.forEachNode((id, attrs) => {
|
|
184
|
-
const edges = graph.edges(id);
|
|
185
|
-
if (edges.length === 0)
|
|
186
|
-
return;
|
|
187
|
-
const inferredCount = edges.filter((e) => graph.getEdgeAttribute(e, 'confidence') === 'INFERRED').length;
|
|
188
|
-
if (inferredCount / edges.length > 0.5) {
|
|
189
|
-
inferredGodNodes.push({
|
|
190
|
-
id,
|
|
191
|
-
label: attrs.label || id,
|
|
192
|
-
degree: graph.degree(id),
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
inferredGodNodes
|
|
197
|
-
.sort((a, b) => b.degree - a.degree)
|
|
198
|
-
.slice(0, 5)
|
|
199
|
-
.forEach(({ id, label }) => {
|
|
200
|
-
questions.push({
|
|
201
|
-
type: 'INFERRED_GOD_NODE',
|
|
202
|
-
question: `Verify the connections of ${label}: most edges are inferred, not extracted.`,
|
|
203
|
-
nodes: [id],
|
|
204
|
-
priority: 'medium',
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
// LOW_COHESION_COMMUNITY: communities where >70% of edges are cross-community
|
|
208
|
-
const commIds = Object.keys(commMap).map(Number);
|
|
209
|
-
const lowCohesion = [];
|
|
210
|
-
for (const commId of commIds) {
|
|
211
|
-
const members = new Set(commMap[commId] ?? []);
|
|
212
|
-
if (members.size === 0)
|
|
213
|
-
continue;
|
|
214
|
-
let total = 0;
|
|
215
|
-
let crossEdges = 0;
|
|
216
|
-
members.forEach((nodeId) => {
|
|
217
|
-
graph.edges(nodeId).forEach((e) => {
|
|
218
|
-
total++;
|
|
219
|
-
const src = graph.source(e);
|
|
220
|
-
const tgt = graph.target(e);
|
|
221
|
-
const otherNode = src === nodeId ? tgt : src;
|
|
222
|
-
if (!members.has(otherNode))
|
|
223
|
-
crossEdges++;
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
// Each edge is counted twice (once per endpoint), halve the totals
|
|
227
|
-
total = Math.ceil(total / 2);
|
|
228
|
-
crossEdges = Math.ceil(crossEdges / 2);
|
|
229
|
-
if (total > 0 && crossEdges / total > 0.7) {
|
|
230
|
-
lowCohesion.push({ id: commId, ratio: crossEdges / total });
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
lowCohesion
|
|
234
|
-
.sort((a, b) => b.ratio - a.ratio)
|
|
235
|
-
.slice(0, 3)
|
|
236
|
-
.forEach(({ id }) => {
|
|
237
|
-
questions.push({
|
|
238
|
-
type: 'LOW_COHESION_COMMUNITY',
|
|
239
|
-
question: `Community ${id} has low cohesion. Should it be split or reorganized?`,
|
|
240
|
-
nodes: commMap[id] ?? [],
|
|
241
|
-
priority: 'medium',
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
// ISOLATED_NODE: degree 0
|
|
245
|
-
let isolatedCount = 0;
|
|
246
|
-
graph.forEachNode((id, attrs) => {
|
|
247
|
-
if (isolatedCount >= 10)
|
|
248
|
-
return;
|
|
249
|
-
if (graph.degree(id) === 0) {
|
|
250
|
-
const label = attrs.label || id;
|
|
251
|
-
questions.push({
|
|
252
|
-
type: 'ISOLATED_NODE',
|
|
253
|
-
question: `Why is ${label} isolated (no connections)? It may need imports/references added.`,
|
|
254
|
-
nodes: [id],
|
|
255
|
-
priority: 'low',
|
|
256
|
-
});
|
|
257
|
-
isolatedCount++;
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
// Sort by priority: high → medium → low
|
|
261
|
-
const priorityOrder = { high: 0, medium: 1, low: 2 };
|
|
262
|
-
questions.sort((a, b) => priorityOrder[a.priority] - priorityOrder[b.priority]);
|
|
263
|
-
return questions.slice(0, 25);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Compute the diff between two serialized graph snapshots.
|
|
267
|
-
*/
|
|
268
|
-
export function graphDiff(before, after) {
|
|
269
|
-
const beforeNodeIds = new Set(before.nodes.map((n) => n.id));
|
|
270
|
-
const afterNodeIds = new Set(after.nodes.map((n) => n.id));
|
|
271
|
-
const addedNodes = after.nodes.filter((n) => !beforeNodeIds.has(n.id)).map((n) => n.id);
|
|
272
|
-
const removedNodes = before.nodes.filter((n) => !afterNodeIds.has(n.id)).map((n) => n.id);
|
|
273
|
-
const edgeKey = (e) => `${String(e.source)}|${String(e.target)}|${String(e['relation'] ?? '')}`;
|
|
274
|
-
const beforeEdgeKeys = new Set(before.links.map(edgeKey));
|
|
275
|
-
const afterEdgeKeys = new Set(after.links.map(edgeKey));
|
|
276
|
-
const addedEdges = after.links
|
|
277
|
-
.filter((e) => !beforeEdgeKeys.has(edgeKey(e)))
|
|
278
|
-
.map((e) => ({ source: String(e.source), target: String(e.target), relation: String(e['relation'] ?? '') }));
|
|
279
|
-
const removedEdges = before.links
|
|
280
|
-
.filter((e) => !afterEdgeKeys.has(edgeKey(e)))
|
|
281
|
-
.map((e) => ({ source: String(e.source), target: String(e.target), relation: String(e['relation'] ?? '') }));
|
|
282
|
-
// Community changes: nodes present in both snapshots with a changed community attribute
|
|
283
|
-
const beforeNodeMap = new Map(before.nodes.map((n) => [n.id, n]));
|
|
284
|
-
const communityChanges = [];
|
|
285
|
-
for (const afterNode of after.nodes) {
|
|
286
|
-
const beforeNode = beforeNodeMap.get(afterNode.id);
|
|
287
|
-
if (!beforeNode)
|
|
288
|
-
continue;
|
|
289
|
-
const oldCommunity = beforeNode['community'];
|
|
290
|
-
const newCommunity = afterNode['community'];
|
|
291
|
-
if (oldCommunity !== undefined && newCommunity !== undefined && oldCommunity !== newCommunity) {
|
|
292
|
-
communityChanges.push({ node: afterNode.id, oldCommunity, newCommunity });
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return { addedNodes, removedNodes, addedEdges, removedEdges, communityChanges };
|
|
296
|
-
}
|
|
297
|
-
//# sourceMappingURL=analyze.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/analyze.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAY,EAAE,IAAI,GAAG,EAAE;IAC9C,MAAM,KAAK,GAAc,EAAE,CAAC;IAE5B,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;QAC9B,KAAK,CAAC,IAAI,CAAC;YACT,EAAE;YACF,KAAK,EAAG,KAAK,CAAC,KAAgB,IAAI,EAAE;YACpC,MAAM,EAAE,KAAK,C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AAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,YAAY,EAAE,CAAC;YAC9F,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAClF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import Graph from 'graphology';
|
|
2
|
-
import type { ExtractionResult } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Build a graphology Graph from extracted nodes and edges.
|
|
5
|
-
* Deduplicates nodes by id, merges parallel edges with higher weight.
|
|
6
|
-
*/
|
|
7
|
-
export declare function buildGraph(extraction: ExtractionResult): Graph;
|
|
8
|
-
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,gBAAgB,GAAG,KAAK,CAsD9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,UAA4B;IACrD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAE5D,oEAAoE;IACpE,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CA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rC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC;gBACxB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,wCAAwC;YACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACtD,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,IAAI,GAAI,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAY,IAAI,CAAC,CAAC;gBACzE,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ExtractionResult } from './types.js';
|
|
2
|
-
export declare class FileCache {
|
|
3
|
-
private cacheDir;
|
|
4
|
-
constructor(outputDir: string);
|
|
5
|
-
/** Strip YAML frontmatter (--- blocks) before hashing so metadata-only changes don't bust the cache. */
|
|
6
|
-
private stripFrontmatter;
|
|
7
|
-
key(filePath: string, content: string): string;
|
|
8
|
-
get(key: string): ExtractionResult | null;
|
|
9
|
-
set(key: string, result: ExtractionResult): void;
|
|
10
|
-
has(key: string): boolean;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/cache.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAS;gBAEb,SAAS,EAAE,MAAM;IAK7B,wGAAwG;IACxG,OAAO,CAAC,gBAAgB;IAMxB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAM9C,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAUzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAOhD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAG1B"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'crypto';
|
|
2
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
export class FileCache {
|
|
5
|
-
cacheDir;
|
|
6
|
-
constructor(outputDir) {
|
|
7
|
-
this.cacheDir = join(outputDir, 'cache');
|
|
8
|
-
mkdirSync(this.cacheDir, { recursive: true });
|
|
9
|
-
}
|
|
10
|
-
/** Strip YAML frontmatter (--- blocks) before hashing so metadata-only changes don't bust the cache. */
|
|
11
|
-
stripFrontmatter(content) {
|
|
12
|
-
if (!content.startsWith('---'))
|
|
13
|
-
return content;
|
|
14
|
-
const end = content.indexOf('\n---', 3);
|
|
15
|
-
return end === -1 ? content : content.slice(end + 4);
|
|
16
|
-
}
|
|
17
|
-
key(filePath, content) {
|
|
18
|
-
return createHash('sha256')
|
|
19
|
-
.update(filePath + this.stripFrontmatter(content))
|
|
20
|
-
.digest('hex');
|
|
21
|
-
}
|
|
22
|
-
get(key) {
|
|
23
|
-
const p = join(this.cacheDir, `${key}.json`);
|
|
24
|
-
if (!existsSync(p))
|
|
25
|
-
return null;
|
|
26
|
-
try {
|
|
27
|
-
return JSON.parse(readFileSync(p, 'utf-8'));
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
set(key, result) {
|
|
34
|
-
const p = join(this.cacheDir, `${key}.json`);
|
|
35
|
-
const tmp = `${p}.tmp`;
|
|
36
|
-
writeFileSync(tmp, JSON.stringify(result), 'utf-8');
|
|
37
|
-
renameSync(tmp, p);
|
|
38
|
-
}
|
|
39
|
-
has(key) {
|
|
40
|
-
return existsSync(join(this.cacheDir, `${key}.json`));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,MAAM,OAAO,SAAS;IACZ,QAAQ,CAAS;IAEzB,YAAY,SAAiB;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACzC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,wGAAwG;IAChG,gBAAgB,CAAC,OAAe;QACtC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACxC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,GAAG,CAAC,QAAgB,EAAE,OAAe;QACnC,OAAO,UAAU,CAAC,QAAQ,CAAC;aACxB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;aACjD,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAChC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAqB,CAAC;QAClE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,MAAwB;QACvC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;QACvB,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QACpD,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type Graph from 'graphology';
|
|
2
|
-
export declare function detectCommunities(graph: Graph): Promise<Record<number, string[]>>;
|
|
3
|
-
export declare function cohesionScore(graph: Graph, communityNodes: string[]): number;
|
|
4
|
-
export declare function splitOversizedCommunities(graph: Graph, communities: Record<number, string[]>, threshold?: number, louvainFn?: ((g: Graph) => Record<string, number>) | null): Record<number, string[]>;
|
|
5
|
-
//# sourceMappingURL=cluster.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../src/cluster.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAkBvF;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,CAe5E;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,SAAS,SAAO,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA6B1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cluster.js","sourceRoot":"","sources":["../../src/cluster.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAY;IAClD,IAAI,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC;QAC5E,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAA2B,CAAC;QAE5D,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/D,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,WAAW,GAA6B,EAAE,CAAC;QACjD,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;gBAAE,WAAW,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC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from rootPath to the filesystem root,
|
|
4
|
-
* collecting patterns from any `.graphifyignore` files found along the way.
|
|
5
|
-
* Lines beginning with `#` are comments; blank lines are skipped.
|
|
6
|
-
* Returns the combined list of pattern strings (closest dir first).
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadIgnorePatterns(rootPath: string): string[];
|
|
9
|
-
/**
|
|
10
|
-
* Recursively collects and classifies all files under rootPath, applying
|
|
11
|
-
* exclusion rules for directories, file size limits, security-sensitive filenames,
|
|
12
|
-
* .graphifyignore patterns, and optional language filtering from BuildOptions.
|
|
13
|
-
*/
|
|
14
|
-
export declare function collectFiles(rootPath: string, options?: BuildOptions): ClassifiedFile[];
|
|
15
|
-
/**
|
|
16
|
-
* Analyses a collected file corpus and returns a list of human-readable warning
|
|
17
|
-
* strings describing potential issues. Returns an empty array when the corpus
|
|
18
|
-
* looks healthy.
|
|
19
|
-
*/
|
|
20
|
-
export declare function corpusHealth(files: ClassifiedFile[]): string[];
|
|
21
|
-
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/detect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAY,MAAM,YAAY,CAAC;AA6EzE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAuB7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,YAAiB,GACzB,cAAc,EAAE,CAuDlB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAsC9D"}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { readdirSync, readFileSync, statSync } from 'fs';
|
|
2
|
-
import { join, extname, relative, dirname } from 'path';
|
|
3
|
-
const DEFAULT_MAX_FILE_SIZE = 500 * 1024; // 500KB
|
|
4
|
-
const EXCLUDED_DIRS = new Set([
|
|
5
|
-
'node_modules', '.git', 'dist', 'build', '.monomind',
|
|
6
|
-
'__pycache__', '.pytest_cache', 'target', '.cache',
|
|
7
|
-
]);
|
|
8
|
-
// Maps file extension to [fileType, language]
|
|
9
|
-
const EXTENSION_MAP = {
|
|
10
|
-
'.ts': ['code', 'typescript'], '.tsx': ['code', 'typescript'],
|
|
11
|
-
'.mts': ['code', 'typescript'], '.cts': ['code', 'typescript'],
|
|
12
|
-
'.js': ['code', 'javascript'], '.jsx': ['code', 'javascript'],
|
|
13
|
-
'.mjs': ['code', 'javascript'], '.cjs': ['code', 'javascript'],
|
|
14
|
-
'.py': ['code', 'python'], '.go': ['code', 'go'],
|
|
15
|
-
'.rs': ['code', 'rust'], '.java': ['code', 'java'],
|
|
16
|
-
'.c': ['code', 'c'], '.cpp': ['code', 'cpp'],
|
|
17
|
-
'.h': ['code', 'c'], '.cs': ['code', 'csharp'],
|
|
18
|
-
'.rb': ['code', 'ruby'], '.php': ['code', 'php'],
|
|
19
|
-
'.swift': ['code', 'swift'], '.kt': ['code', 'kotlin'],
|
|
20
|
-
'.scala': ['code', 'scala'], '.md': ['document', 'markdown'],
|
|
21
|
-
'.txt': ['document', 'text'], '.rst': ['document', 'rst'],
|
|
22
|
-
};
|
|
23
|
-
// Patterns matching filenames/paths that may contain credentials or secrets.
|
|
24
|
-
// Matched against both the basename and the relative path.
|
|
25
|
-
const SECURITY_SENSITIVE_PATTERNS = [
|
|
26
|
-
// .env files
|
|
27
|
-
/^\.env(\.|$)/i,
|
|
28
|
-
/[/\\]\.env(\.|$)/i,
|
|
29
|
-
// PEM / key files
|
|
30
|
-
/\.(pem|key|p12|pfx)$/i,
|
|
31
|
-
// SSH private keys
|
|
32
|
-
/\b(id_rsa|id_dsa|id_ecdsa|id_ed25519)(\.[^/\\]*)?$/i,
|
|
33
|
-
// Credential / secret JSON / YAML
|
|
34
|
-
/\bcredentials\.json$/i,
|
|
35
|
-
/\bsecrets?\.(json|ya?ml)$/i,
|
|
36
|
-
// AWS
|
|
37
|
-
/\baws-credentials$/i,
|
|
38
|
-
/[/\\]\.aws[/\\]credentials$/i,
|
|
39
|
-
// GCP / Firebase
|
|
40
|
-
/\bservice-?account\.json$/i,
|
|
41
|
-
/\bclient_secret\.json$/i,
|
|
42
|
-
/\bgoogle-credentials\.json$/i,
|
|
43
|
-
/\bfirebase[^/\\]*\.json$/i,
|
|
44
|
-
// Auth-related
|
|
45
|
-
/\bprivate\.key$/i,
|
|
46
|
-
/\bprivate_key\.json$/i,
|
|
47
|
-
/\.htpasswd$/i,
|
|
48
|
-
/\bshadow$/i,
|
|
49
|
-
/\bvault-token$/i,
|
|
50
|
-
/\.token$/i,
|
|
51
|
-
/\bauth\.json$/i,
|
|
52
|
-
// Package auth files
|
|
53
|
-
/\.npmrc$/i,
|
|
54
|
-
/\.pypirc$/i,
|
|
55
|
-
/\bnetrc$/i,
|
|
56
|
-
/\.pgpass$/i,
|
|
57
|
-
];
|
|
58
|
-
/** Returns true if the given basename or relative path matches any security-sensitive pattern. */
|
|
59
|
-
function isSecuritySensitive(basename, relPath) {
|
|
60
|
-
return SECURITY_SENSITIVE_PATTERNS.some((re) => re.test(basename) || re.test(relPath));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Converts a .graphifyignore pattern line into a RegExp.
|
|
64
|
-
* Escapes regex special chars then converts `*` to `.*`.
|
|
65
|
-
*/
|
|
66
|
-
function patternToRegex(pattern) {
|
|
67
|
-
const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '.*');
|
|
68
|
-
return new RegExp(escaped);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Walks up the directory tree from rootPath to the filesystem root,
|
|
72
|
-
* collecting patterns from any `.graphifyignore` files found along the way.
|
|
73
|
-
* Lines beginning with `#` are comments; blank lines are skipped.
|
|
74
|
-
* Returns the combined list of pattern strings (closest dir first).
|
|
75
|
-
*/
|
|
76
|
-
export function loadIgnorePatterns(rootPath) {
|
|
77
|
-
const patterns = [];
|
|
78
|
-
let current = rootPath;
|
|
79
|
-
while (true) {
|
|
80
|
-
const candidate = join(current, '.graphifyignore');
|
|
81
|
-
try {
|
|
82
|
-
const contents = readFileSync(candidate, 'utf8');
|
|
83
|
-
for (const line of contents.split(/\r?\n/)) {
|
|
84
|
-
const trimmed = line.trim();
|
|
85
|
-
if (trimmed && !trimmed.startsWith('#')) {
|
|
86
|
-
patterns.push(trimmed);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
// File does not exist or is unreadable at this level — continue walking up
|
|
92
|
-
}
|
|
93
|
-
const parent = dirname(current);
|
|
94
|
-
if (parent === current)
|
|
95
|
-
break; // reached filesystem root
|
|
96
|
-
current = parent;
|
|
97
|
-
}
|
|
98
|
-
return patterns;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Recursively collects and classifies all files under rootPath, applying
|
|
102
|
-
* exclusion rules for directories, file size limits, security-sensitive filenames,
|
|
103
|
-
* .graphifyignore patterns, and optional language filtering from BuildOptions.
|
|
104
|
-
*/
|
|
105
|
-
export function collectFiles(rootPath, options = {}) {
|
|
106
|
-
const maxFileSizeBytes = options.maxFileSizeBytes ?? DEFAULT_MAX_FILE_SIZE;
|
|
107
|
-
const codeOnly = options.codeOnly ?? false;
|
|
108
|
-
const languageFilter = options.languages ? new Set(options.languages) : null;
|
|
109
|
-
const excludePatterns = options.excludePatterns ?? [];
|
|
110
|
-
// Load .graphifyignore patterns and compile to regexes
|
|
111
|
-
const ignorePatternStrings = loadIgnorePatterns(rootPath);
|
|
112
|
-
const ignoreRegexes = ignorePatternStrings.map(patternToRegex);
|
|
113
|
-
const results = [];
|
|
114
|
-
function walkDir(dirPath) {
|
|
115
|
-
let entries;
|
|
116
|
-
try {
|
|
117
|
-
entries = readdirSync(dirPath);
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
for (const entry of entries) {
|
|
123
|
-
const fullPath = join(dirPath, entry);
|
|
124
|
-
const relPath = relative(rootPath, fullPath);
|
|
125
|
-
// Check against caller-supplied exclude patterns
|
|
126
|
-
if (excludePatterns.some((pat) => relPath.includes(pat)))
|
|
127
|
-
continue;
|
|
128
|
-
// Check against .graphifyignore patterns
|
|
129
|
-
if (ignoreRegexes.some((re) => re.test(relPath)))
|
|
130
|
-
continue;
|
|
131
|
-
let stat;
|
|
132
|
-
try {
|
|
133
|
-
stat = statSync(fullPath);
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
if (stat.isDirectory()) {
|
|
139
|
-
if (EXCLUDED_DIRS.has(entry))
|
|
140
|
-
continue;
|
|
141
|
-
walkDir(fullPath);
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
if (!stat.isFile())
|
|
145
|
-
continue;
|
|
146
|
-
if (stat.size > maxFileSizeBytes)
|
|
147
|
-
continue;
|
|
148
|
-
// Skip security-sensitive files
|
|
149
|
-
if (isSecuritySensitive(entry, relPath))
|
|
150
|
-
continue;
|
|
151
|
-
const ext = extname(entry).toLowerCase();
|
|
152
|
-
const mapping = EXTENSION_MAP[ext];
|
|
153
|
-
if (!mapping)
|
|
154
|
-
continue;
|
|
155
|
-
const [fileType, language] = mapping;
|
|
156
|
-
if (codeOnly && fileType !== 'code')
|
|
157
|
-
continue;
|
|
158
|
-
if (languageFilter && !languageFilter.has(language))
|
|
159
|
-
continue;
|
|
160
|
-
results.push({ path: fullPath, fileType, language, sizeBytes: stat.size });
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
walkDir(rootPath);
|
|
164
|
-
return results;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Analyses a collected file corpus and returns a list of human-readable warning
|
|
168
|
-
* strings describing potential issues. Returns an empty array when the corpus
|
|
169
|
-
* looks healthy.
|
|
170
|
-
*/
|
|
171
|
-
export function corpusHealth(files) {
|
|
172
|
-
const warnings = [];
|
|
173
|
-
const codeFiles = files.filter((f) => f.fileType === 'code');
|
|
174
|
-
const docFiles = files.filter((f) => f.fileType === 'document');
|
|
175
|
-
const totalSize = files.reduce((sum, f) => sum + f.sizeBytes, 0);
|
|
176
|
-
if (codeFiles.length < 5) {
|
|
177
|
-
warnings.push(`Corpus is very small (${codeFiles.length} code files). Graph may be sparse.`);
|
|
178
|
-
}
|
|
179
|
-
if (totalSize < 50_000) {
|
|
180
|
-
const kb = Math.round(totalSize / 1024);
|
|
181
|
-
warnings.push(`Corpus total size is very small (~${kb}KB). Consider including more source files.`);
|
|
182
|
-
}
|
|
183
|
-
if (totalSize > 50_000_000) {
|
|
184
|
-
const mb = Math.round(totalSize / (1024 * 1024));
|
|
185
|
-
warnings.push(`Corpus is very large (~${mb}MB). Build may be slow. Consider using codeOnly or excludePatterns.`);
|
|
186
|
-
}
|
|
187
|
-
if (docFiles.length === 0) {
|
|
188
|
-
warnings.push('No documentation files found. Graph will have no document nodes.');
|
|
189
|
-
}
|
|
190
|
-
if (files.length > 0 && docFiles.length / files.length > 0.8) {
|
|
191
|
-
warnings.push('Corpus is mostly documentation. Consider codeOnly: true for a code-focused graph.');
|
|
192
|
-
}
|
|
193
|
-
return warnings;
|
|
194
|
-
}
|
|
195
|
-
//# sourceMappingURL=detect.js.map
|