@tyroneross/navgator 0.2.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +21 -7
- package/.claude-plugin/plugin.json +16 -11
- package/.codex-plugin/plugin.json +31 -0
- package/.mcp.json +8 -0
- package/CLAUDE.md +197 -23
- package/LICENSE +202 -21
- package/README.md +220 -33
- package/agents/architecture-advisor.md +6 -2
- package/agents/architecture-investigator.md +163 -0
- package/agents/architecture-planner.md +160 -0
- package/agents/external-resolver.md +97 -0
- package/dist/__tests__/agent-output.test.d.ts +5 -0
- package/dist/__tests__/agent-output.test.d.ts.map +1 -0
- package/dist/__tests__/agent-output.test.js +233 -0
- package/dist/__tests__/agent-output.test.js.map +1 -0
- package/dist/__tests__/architecture-insights-stack.test.d.ts +21 -0
- package/dist/__tests__/architecture-insights-stack.test.d.ts.map +1 -0
- package/dist/__tests__/architecture-insights-stack.test.js +86 -0
- package/dist/__tests__/architecture-insights-stack.test.js.map +1 -0
- package/dist/__tests__/architecture-insights.test.d.ts +2 -0
- package/dist/__tests__/architecture-insights.test.d.ts.map +1 -0
- package/dist/__tests__/architecture-insights.test.js +46 -0
- package/dist/__tests__/architecture-insights.test.js.map +1 -0
- package/dist/__tests__/audit-sampler.test.d.ts +10 -0
- package/dist/__tests__/audit-sampler.test.d.ts.map +1 -0
- package/dist/__tests__/audit-sampler.test.js +172 -0
- package/dist/__tests__/audit-sampler.test.js.map +1 -0
- package/dist/__tests__/audit-spc.test.d.ts +5 -0
- package/dist/__tests__/audit-spc.test.d.ts.map +1 -0
- package/dist/__tests__/audit-spc.test.js +94 -0
- package/dist/__tests__/audit-spc.test.js.map +1 -0
- package/dist/__tests__/audit-verifiers.test.d.ts +5 -0
- package/dist/__tests__/audit-verifiers.test.d.ts.map +1 -0
- package/dist/__tests__/audit-verifiers.test.js +248 -0
- package/dist/__tests__/audit-verifiers.test.js.map +1 -0
- package/dist/__tests__/auto-refresh.test.d.ts +12 -0
- package/dist/__tests__/auto-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/auto-refresh.test.js +236 -0
- package/dist/__tests__/auto-refresh.test.js.map +1 -0
- package/dist/__tests__/bare-imports.test.d.ts +8 -0
- package/dist/__tests__/bare-imports.test.d.ts.map +1 -0
- package/dist/__tests__/bare-imports.test.js +176 -0
- package/dist/__tests__/bare-imports.test.js.map +1 -0
- package/dist/__tests__/classify.test.d.ts +5 -0
- package/dist/__tests__/classify.test.d.ts.map +1 -0
- package/dist/__tests__/classify.test.js +158 -0
- package/dist/__tests__/classify.test.js.map +1 -0
- package/dist/__tests__/cli-commands.test.d.ts +8 -0
- package/dist/__tests__/cli-commands.test.d.ts.map +1 -0
- package/dist/__tests__/cli-commands.test.js +207 -0
- package/dist/__tests__/cli-commands.test.js.map +1 -0
- package/dist/__tests__/consolidated-readers.test.d.ts +23 -0
- package/dist/__tests__/consolidated-readers.test.d.ts.map +1 -0
- package/dist/__tests__/consolidated-readers.test.js +200 -0
- package/dist/__tests__/consolidated-readers.test.js.map +1 -0
- package/dist/__tests__/coverage.test.d.ts +5 -0
- package/dist/__tests__/coverage.test.d.ts.map +1 -0
- package/dist/__tests__/coverage.test.js +120 -0
- package/dist/__tests__/coverage.test.js.map +1 -0
- package/dist/__tests__/deploy-scanner-runtime.test.d.ts +6 -0
- package/dist/__tests__/deploy-scanner-runtime.test.d.ts.map +1 -0
- package/dist/__tests__/deploy-scanner-runtime.test.js +168 -0
- package/dist/__tests__/deploy-scanner-runtime.test.js.map +1 -0
- package/dist/__tests__/env-scanner.test.d.ts +2 -0
- package/dist/__tests__/env-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/env-scanner.test.js +191 -0
- package/dist/__tests__/env-scanner.test.js.map +1 -0
- package/dist/__tests__/freshness/cli-freshness.test.d.ts +2 -0
- package/dist/__tests__/freshness/cli-freshness.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/cli-freshness.test.js +26 -0
- package/dist/__tests__/freshness/cli-freshness.test.js.map +1 -0
- package/dist/__tests__/freshness/dirty-ledger.test.d.ts +2 -0
- package/dist/__tests__/freshness/dirty-ledger.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/dirty-ledger.test.js +39 -0
- package/dist/__tests__/freshness/dirty-ledger.test.js.map +1 -0
- package/dist/__tests__/freshness/drainer.test.d.ts +2 -0
- package/dist/__tests__/freshness/drainer.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/drainer.test.js +103 -0
- package/dist/__tests__/freshness/drainer.test.js.map +1 -0
- package/dist/__tests__/freshness/paths.test.d.ts +2 -0
- package/dist/__tests__/freshness/paths.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/paths.test.js +19 -0
- package/dist/__tests__/freshness/paths.test.js.map +1 -0
- package/dist/__tests__/freshness/scan-lock.test.d.ts +2 -0
- package/dist/__tests__/freshness/scan-lock.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/scan-lock.test.js +40 -0
- package/dist/__tests__/freshness/scan-lock.test.js.map +1 -0
- package/dist/__tests__/freshness/stamp.test.d.ts +2 -0
- package/dist/__tests__/freshness/stamp.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/stamp.test.js +36 -0
- package/dist/__tests__/freshness/stamp.test.js.map +1 -0
- package/dist/__tests__/gitignore-safety.test.d.ts +2 -0
- package/dist/__tests__/gitignore-safety.test.d.ts.map +1 -0
- package/dist/__tests__/gitignore-safety.test.js +110 -0
- package/dist/__tests__/gitignore-safety.test.js.map +1 -0
- package/dist/__tests__/helpers.d.ts +37 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/__tests__/helpers.js +134 -0
- package/dist/__tests__/helpers.js.map +1 -0
- package/dist/__tests__/impact.test.d.ts +5 -0
- package/dist/__tests__/impact.test.d.ts.map +1 -0
- package/dist/__tests__/impact.test.js +221 -0
- package/dist/__tests__/impact.test.js.map +1 -0
- package/dist/__tests__/lessons-store.test.d.ts +8 -0
- package/dist/__tests__/lessons-store.test.d.ts.map +1 -0
- package/dist/__tests__/lessons-store.test.js +232 -0
- package/dist/__tests__/lessons-store.test.js.map +1 -0
- package/dist/__tests__/llm-dedup.test.d.ts +2 -0
- package/dist/__tests__/llm-dedup.test.d.ts.map +1 -0
- package/dist/__tests__/llm-dedup.test.js +155 -0
- package/dist/__tests__/llm-dedup.test.js.map +1 -0
- package/dist/__tests__/mjs-frontend-fetch.test.d.ts +19 -0
- package/dist/__tests__/mjs-frontend-fetch.test.d.ts.map +1 -0
- package/dist/__tests__/mjs-frontend-fetch.test.js +179 -0
- package/dist/__tests__/mjs-frontend-fetch.test.js.map +1 -0
- package/dist/__tests__/multi-stack-discovery.test.d.ts +11 -0
- package/dist/__tests__/multi-stack-discovery.test.d.ts.map +1 -0
- package/dist/__tests__/multi-stack-discovery.test.js +75 -0
- package/dist/__tests__/multi-stack-discovery.test.js.map +1 -0
- package/dist/__tests__/per-entity-files-gate.test.d.ts +22 -0
- package/dist/__tests__/per-entity-files-gate.test.d.ts.map +1 -0
- package/dist/__tests__/per-entity-files-gate.test.js +160 -0
- package/dist/__tests__/per-entity-files-gate.test.js.map +1 -0
- package/dist/__tests__/prisma-calls.test.d.ts +2 -0
- package/dist/__tests__/prisma-calls.test.d.ts.map +1 -0
- package/dist/__tests__/prisma-calls.test.js +125 -0
- package/dist/__tests__/prisma-calls.test.js.map +1 -0
- package/dist/__tests__/prisma-parser.test.d.ts +2 -0
- package/dist/__tests__/prisma-parser.test.d.ts.map +1 -0
- package/dist/__tests__/prisma-parser.test.js +252 -0
- package/dist/__tests__/prisma-parser.test.js.map +1 -0
- package/dist/__tests__/prompt-detector.test.d.ts +5 -0
- package/dist/__tests__/prompt-detector.test.d.ts.map +1 -0
- package/dist/__tests__/prompt-detector.test.js +75 -0
- package/dist/__tests__/prompt-detector.test.js.map +1 -0
- package/dist/__tests__/queue-scanner.test.d.ts +5 -0
- package/dist/__tests__/queue-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/queue-scanner.test.js +85 -0
- package/dist/__tests__/queue-scanner.test.js.map +1 -0
- package/dist/__tests__/resolve.test.d.ts +5 -0
- package/dist/__tests__/resolve.test.d.ts.map +1 -0
- package/dist/__tests__/resolve.test.js +196 -0
- package/dist/__tests__/resolve.test.js.map +1 -0
- package/dist/__tests__/rules.test.d.ts +2 -0
- package/dist/__tests__/rules.test.d.ts.map +1 -0
- package/dist/__tests__/rules.test.js +343 -0
- package/dist/__tests__/rules.test.js.map +1 -0
- package/dist/__tests__/sandbox.test.d.ts +5 -0
- package/dist/__tests__/sandbox.test.d.ts.map +1 -0
- package/dist/__tests__/sandbox.test.js +189 -0
- package/dist/__tests__/sandbox.test.js.map +1 -0
- package/dist/__tests__/scanner-audit.test.d.ts +9 -0
- package/dist/__tests__/scanner-audit.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-audit.test.js +64 -0
- package/dist/__tests__/scanner-audit.test.js.map +1 -0
- package/dist/__tests__/scanner-characterization.test.d.ts +16 -0
- package/dist/__tests__/scanner-characterization.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-characterization.test.js +167 -0
- package/dist/__tests__/scanner-characterization.test.js.map +1 -0
- package/dist/__tests__/scanner-incremental.test.d.ts +13 -0
- package/dist/__tests__/scanner-incremental.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-incremental.test.js +725 -0
- package/dist/__tests__/scanner-incremental.test.js.map +1 -0
- package/dist/__tests__/scanner-integration.test.d.ts +7 -0
- package/dist/__tests__/scanner-integration.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-integration.test.js +211 -0
- package/dist/__tests__/scanner-integration.test.js.map +1 -0
- package/dist/__tests__/scip-new-catches.test.d.ts +19 -0
- package/dist/__tests__/scip-new-catches.test.d.ts.map +1 -0
- package/dist/__tests__/scip-new-catches.test.js +90 -0
- package/dist/__tests__/scip-new-catches.test.js.map +1 -0
- package/dist/__tests__/subgraph.test.d.ts +5 -0
- package/dist/__tests__/subgraph.test.d.ts.map +1 -0
- package/dist/__tests__/subgraph.test.js +145 -0
- package/dist/__tests__/subgraph.test.js.map +1 -0
- package/dist/__tests__/trace.test.d.ts +5 -0
- package/dist/__tests__/trace.test.d.ts.map +1 -0
- package/dist/__tests__/trace.test.js +221 -0
- package/dist/__tests__/trace.test.js.map +1 -0
- package/dist/agent-output.d.ts +16 -0
- package/dist/agent-output.d.ts.map +1 -0
- package/dist/agent-output.js +142 -0
- package/dist/agent-output.js.map +1 -0
- package/dist/architecture-insights.d.ts +17 -0
- package/dist/architecture-insights.d.ts.map +1 -0
- package/dist/architecture-insights.js +178 -0
- package/dist/architecture-insights.js.map +1 -0
- package/dist/audit/index.d.ts +69 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +255 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/sampler.d.ts +98 -0
- package/dist/audit/sampler.d.ts.map +1 -0
- package/dist/audit/sampler.js +298 -0
- package/dist/audit/sampler.js.map +1 -0
- package/dist/audit/spc.d.ts +62 -0
- package/dist/audit/spc.d.ts.map +1 -0
- package/dist/audit/spc.js +81 -0
- package/dist/audit/spc.js.map +1 -0
- package/dist/audit/verifiers.d.ts +81 -0
- package/dist/audit/verifiers.d.ts.map +1 -0
- package/dist/audit/verifiers.js +366 -0
- package/dist/audit/verifiers.js.map +1 -0
- package/dist/classify.d.ts +19 -0
- package/dist/classify.d.ts.map +1 -0
- package/dist/classify.js +124 -0
- package/dist/classify.js.map +1 -0
- package/dist/cli/commands/connections.d.ts +3 -0
- package/dist/cli/commands/connections.d.ts.map +1 -0
- package/dist/cli/commands/connections.js +125 -0
- package/dist/cli/commands/connections.js.map +1 -0
- package/dist/cli/commands/coverage.d.ts +3 -0
- package/dist/cli/commands/coverage.d.ts.map +1 -0
- package/dist/cli/commands/coverage.js +94 -0
- package/dist/cli/commands/coverage.js.map +1 -0
- package/dist/cli/commands/dead.d.ts +3 -0
- package/dist/cli/commands/dead.d.ts.map +1 -0
- package/dist/cli/commands/dead.js +80 -0
- package/dist/cli/commands/dead.js.map +1 -0
- package/dist/cli/commands/diagram.d.ts +3 -0
- package/dist/cli/commands/diagram.d.ts.map +1 -0
- package/dist/cli/commands/diagram.js +102 -0
- package/dist/cli/commands/diagram.js.map +1 -0
- package/dist/cli/commands/find.d.ts +3 -0
- package/dist/cli/commands/find.d.ts.map +1 -0
- package/dist/cli/commands/find.js +128 -0
- package/dist/cli/commands/find.js.map +1 -0
- package/dist/cli/commands/freshness.d.ts +20 -0
- package/dist/cli/commands/freshness.d.ts.map +1 -0
- package/dist/cli/commands/freshness.js +90 -0
- package/dist/cli/commands/freshness.js.map +1 -0
- package/dist/cli/commands/helpers.d.ts +7 -0
- package/dist/cli/commands/helpers.d.ts.map +1 -0
- package/dist/cli/commands/helpers.js +30 -0
- package/dist/cli/commands/helpers.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +3 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +172 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/lessons.d.ts +6 -0
- package/dist/cli/commands/lessons.d.ts.map +1 -0
- package/dist/cli/commands/lessons.js +279 -0
- package/dist/cli/commands/lessons.js.map +1 -0
- package/dist/cli/commands/list.d.ts +3 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +91 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/llm-map.d.ts +3 -0
- package/dist/cli/commands/llm-map.d.ts.map +1 -0
- package/dist/cli/commands/llm-map.js +121 -0
- package/dist/cli/commands/llm-map.js.map +1 -0
- package/dist/cli/commands/misc.d.ts +17 -0
- package/dist/cli/commands/misc.d.ts.map +1 -0
- package/dist/cli/commands/misc.js +495 -0
- package/dist/cli/commands/misc.js.map +1 -0
- package/dist/cli/commands/prompts.d.ts +3 -0
- package/dist/cli/commands/prompts.d.ts.map +1 -0
- package/dist/cli/commands/prompts.js +74 -0
- package/dist/cli/commands/prompts.js.map +1 -0
- package/dist/cli/commands/rules.d.ts +3 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +61 -0
- package/dist/cli/commands/rules.js.map +1 -0
- package/dist/cli/commands/scan.d.ts +3 -0
- package/dist/cli/commands/scan.d.ts.map +1 -0
- package/dist/cli/commands/scan.js +177 -0
- package/dist/cli/commands/scan.js.map +1 -0
- package/dist/cli/commands/schema.d.ts +3 -0
- package/dist/cli/commands/schema.d.ts.map +1 -0
- package/dist/cli/commands/schema.js +126 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +340 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/subgraph.d.ts +3 -0
- package/dist/cli/commands/subgraph.d.ts.map +1 -0
- package/dist/cli/commands/subgraph.js +55 -0
- package/dist/cli/commands/subgraph.js.map +1 -0
- package/dist/cli/commands/temporal.d.ts +3 -0
- package/dist/cli/commands/temporal.d.ts.map +1 -0
- package/dist/cli/commands/temporal.js +112 -0
- package/dist/cli/commands/temporal.js.map +1 -0
- package/dist/cli/commands/trace.d.ts +3 -0
- package/dist/cli/commands/trace.d.ts.map +1 -0
- package/dist/cli/commands/trace.js +65 -0
- package/dist/cli/commands/trace.js.map +1 -0
- package/dist/cli/index.js +88 -825
- package/dist/cli/index.js.map +1 -1
- package/dist/config.d.ts +13 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +106 -12
- package/dist/config.js.map +1 -1
- package/dist/coverage.d.ts +37 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/coverage.js +177 -0
- package/dist/coverage.js.map +1 -0
- package/dist/diagram.d.ts.map +1 -1
- package/dist/diagram.js +41 -0
- package/dist/diagram.js.map +1 -1
- package/dist/diff.d.ts +57 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +527 -0
- package/dist/diff.js.map +1 -0
- package/dist/enrich/cache.d.ts +41 -0
- package/dist/enrich/cache.d.ts.map +1 -0
- package/dist/enrich/cache.js +97 -0
- package/dist/enrich/cache.js.map +1 -0
- package/dist/enrich/external-enrichment.types.d.ts +91 -0
- package/dist/enrich/external-enrichment.types.d.ts.map +1 -0
- package/dist/enrich/external-enrichment.types.js +38 -0
- package/dist/enrich/external-enrichment.types.js.map +1 -0
- package/dist/enrich/external-resolver.d.ts +95 -0
- package/dist/enrich/external-resolver.d.ts.map +1 -0
- package/dist/enrich/external-resolver.js +222 -0
- package/dist/enrich/external-resolver.js.map +1 -0
- package/dist/enrich/fetchers.d.ts +30 -0
- package/dist/enrich/fetchers.d.ts.map +1 -0
- package/dist/enrich/fetchers.js +89 -0
- package/dist/enrich/fetchers.js.map +1 -0
- package/dist/file-resolve.d.ts +35 -0
- package/dist/file-resolve.d.ts.map +1 -0
- package/dist/file-resolve.js +159 -0
- package/dist/file-resolve.js.map +1 -0
- package/dist/freshness/dirty-ledger.d.ts +7 -0
- package/dist/freshness/dirty-ledger.d.ts.map +1 -0
- package/dist/freshness/dirty-ledger.js +56 -0
- package/dist/freshness/dirty-ledger.js.map +1 -0
- package/dist/freshness/drainer.d.ts +38 -0
- package/dist/freshness/drainer.d.ts.map +1 -0
- package/dist/freshness/drainer.js +88 -0
- package/dist/freshness/drainer.js.map +1 -0
- package/dist/freshness/paths.d.ts +9 -0
- package/dist/freshness/paths.d.ts.map +1 -0
- package/dist/freshness/paths.js +24 -0
- package/dist/freshness/paths.js.map +1 -0
- package/dist/freshness/scan-lock.d.ts +8 -0
- package/dist/freshness/scan-lock.d.ts.map +1 -0
- package/dist/freshness/scan-lock.js +68 -0
- package/dist/freshness/scan-lock.js.map +1 -0
- package/dist/freshness/stamp.d.ts +25 -0
- package/dist/freshness/stamp.d.ts.map +1 -0
- package/dist/freshness/stamp.js +50 -0
- package/dist/freshness/stamp.js.map +1 -0
- package/dist/git.d.ts +12 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +42 -0
- package/dist/git.js.map +1 -0
- package/dist/gitignore-safety.d.ts +41 -0
- package/dist/gitignore-safety.d.ts.map +1 -0
- package/dist/gitignore-safety.js +107 -0
- package/dist/gitignore-safety.js.map +1 -0
- package/dist/impact.d.ts +20 -0
- package/dist/impact.d.ts.map +1 -0
- package/dist/impact.js +89 -0
- package/dist/impact.js.map +1 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/lessons-store.d.ts +93 -0
- package/dist/lessons-store.d.ts.map +1 -0
- package/dist/lessons-store.js +265 -0
- package/dist/lessons-store.js.map +1 -0
- package/dist/llm-dedup.d.ts +40 -0
- package/dist/llm-dedup.d.ts.map +1 -0
- package/dist/llm-dedup.js +373 -0
- package/dist/llm-dedup.js.map +1 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +87 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +198 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +744 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/metrics/pagerank-louvain.d.ts +44 -0
- package/dist/metrics/pagerank-louvain.d.ts.map +1 -0
- package/dist/metrics/pagerank-louvain.js +128 -0
- package/dist/metrics/pagerank-louvain.js.map +1 -0
- package/dist/parsers/scip-runner.d.ts +63 -0
- package/dist/parsers/scip-runner.d.ts.map +1 -0
- package/dist/parsers/scip-runner.js +179 -0
- package/dist/parsers/scip-runner.js.map +1 -0
- package/dist/projects.d.ts +54 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +153 -0
- package/dist/projects.js.map +1 -0
- package/dist/resolve.d.ts +22 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +128 -0
- package/dist/resolve.js.map +1 -0
- package/dist/rules.d.ts +36 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +484 -0
- package/dist/rules.js.map +1 -0
- package/dist/sandbox.d.ts +33 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +91 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/scan-lock.d.ts +37 -0
- package/dist/scan-lock.d.ts.map +1 -0
- package/dist/scan-lock.js +145 -0
- package/dist/scan-lock.js.map +1 -0
- package/dist/scanner.d.ts +126 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +1711 -235
- package/dist/scanner.js.map +1 -1
- package/dist/scanners/connections/ast-scanner.d.ts +9 -2
- package/dist/scanners/connections/ast-scanner.d.ts.map +1 -1
- package/dist/scanners/connections/ast-scanner.js +19 -4
- package/dist/scanners/connections/ast-scanner.js.map +1 -1
- package/dist/scanners/connections/import-scanner.d.ts +27 -0
- package/dist/scanners/connections/import-scanner.d.ts.map +1 -0
- package/dist/scanners/connections/import-scanner.js +537 -0
- package/dist/scanners/connections/import-scanner.js.map +1 -0
- package/dist/scanners/connections/llm-call-tracer.d.ts +1 -1
- package/dist/scanners/connections/llm-call-tracer.d.ts.map +1 -1
- package/dist/scanners/connections/llm-call-tracer.js +6 -2
- package/dist/scanners/connections/llm-call-tracer.js.map +1 -1
- package/dist/scanners/connections/prisma-calls.d.ts +11 -0
- package/dist/scanners/connections/prisma-calls.d.ts.map +1 -0
- package/dist/scanners/connections/prisma-calls.js +237 -0
- package/dist/scanners/connections/prisma-calls.js.map +1 -0
- package/dist/scanners/connections/service-calls.d.ts +1 -1
- package/dist/scanners/connections/service-calls.d.ts.map +1 -1
- package/dist/scanners/connections/service-calls.js +35 -3
- package/dist/scanners/connections/service-calls.js.map +1 -1
- package/dist/scanners/infrastructure/cron-scanner.d.ts +14 -0
- package/dist/scanners/infrastructure/cron-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/cron-scanner.js +383 -0
- package/dist/scanners/infrastructure/cron-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/deploy-scanner.d.ts +11 -0
- package/dist/scanners/infrastructure/deploy-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/deploy-scanner.js +508 -0
- package/dist/scanners/infrastructure/deploy-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/env-scanner.d.ts +55 -0
- package/dist/scanners/infrastructure/env-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/env-scanner.js +431 -0
- package/dist/scanners/infrastructure/env-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.d.ts +52 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.d.ts.map +1 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.js +480 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.js.map +1 -0
- package/dist/scanners/infrastructure/prisma-parser.d.ts +21 -0
- package/dist/scanners/infrastructure/prisma-parser.d.ts.map +1 -0
- package/dist/scanners/infrastructure/prisma-parser.js +58 -0
- package/dist/scanners/infrastructure/prisma-parser.js.map +1 -0
- package/dist/scanners/infrastructure/prisma-scanner.d.ts +30 -0
- package/dist/scanners/infrastructure/prisma-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/prisma-scanner.js +329 -0
- package/dist/scanners/infrastructure/prisma-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/queue-scanner.d.ts +14 -0
- package/dist/scanners/infrastructure/queue-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/queue-scanner.js +455 -0
- package/dist/scanners/infrastructure/queue-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/typespec-validator.d.ts +50 -0
- package/dist/scanners/infrastructure/typespec-validator.d.ts.map +1 -0
- package/dist/scanners/infrastructure/typespec-validator.js +407 -0
- package/dist/scanners/infrastructure/typespec-validator.js.map +1 -0
- package/dist/scanners/packages/swift.d.ts +5 -0
- package/dist/scanners/packages/swift.d.ts.map +1 -1
- package/dist/scanners/packages/swift.js +23 -0
- package/dist/scanners/packages/swift.js.map +1 -1
- package/dist/scanners/prompts/detector.d.ts +13 -2
- package/dist/scanners/prompts/detector.d.ts.map +1 -1
- package/dist/scanners/prompts/detector.js +97 -46
- package/dist/scanners/prompts/detector.js.map +1 -1
- package/dist/scanners/prompts/index.d.ts +1 -1
- package/dist/scanners/prompts/index.d.ts.map +1 -1
- package/dist/scanners/prompts/index.js +2 -2
- package/dist/scanners/prompts/index.js.map +1 -1
- package/dist/scanners/swift/code-scanner.d.ts +1 -1
- package/dist/scanners/swift/code-scanner.d.ts.map +1 -1
- package/dist/scanners/swift/code-scanner.js +216 -2
- package/dist/scanners/swift/code-scanner.js.map +1 -1
- package/dist/scanners/swift/swiftui-scanner.d.ts +45 -0
- package/dist/scanners/swift/swiftui-scanner.d.ts.map +1 -0
- package/dist/scanners/swift/swiftui-scanner.js +606 -0
- package/dist/scanners/swift/swiftui-scanner.js.map +1 -0
- package/dist/scanners/xcode/pbxproj-parser.d.ts +32 -0
- package/dist/scanners/xcode/pbxproj-parser.d.ts.map +1 -0
- package/dist/scanners/xcode/pbxproj-parser.js +407 -0
- package/dist/scanners/xcode/pbxproj-parser.js.map +1 -0
- package/dist/scanners/xcode/storyboard-scanner.d.ts +13 -0
- package/dist/scanners/xcode/storyboard-scanner.d.ts.map +1 -0
- package/dist/scanners/xcode/storyboard-scanner.js +236 -0
- package/dist/scanners/xcode/storyboard-scanner.js.map +1 -0
- package/dist/storage/markdown-view.d.ts +49 -0
- package/dist/storage/markdown-view.d.ts.map +1 -0
- package/dist/storage/markdown-view.js +233 -0
- package/dist/storage/markdown-view.js.map +1 -0
- package/dist/storage.d.ts +225 -9
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +945 -86
- package/dist/storage.js.map +1 -1
- package/dist/subgraph.d.ts +30 -0
- package/dist/subgraph.d.ts.map +1 -0
- package/dist/subgraph.js +106 -0
- package/dist/subgraph.js.map +1 -0
- package/dist/temporal/git-store.d.ts +65 -0
- package/dist/temporal/git-store.d.ts.map +1 -0
- package/dist/temporal/git-store.js +166 -0
- package/dist/temporal/git-store.js.map +1 -0
- package/dist/trace.d.ts +38 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +292 -0
- package/dist/trace.js.map +1 -0
- package/dist/types.d.ts +322 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +53 -0
- package/dist/types.js.map +1 -1
- package/hooks/hooks.json +1 -55
- package/hooks/mark-dirty.sh +20 -0
- package/hooks/post-bash-suggest.sh +30 -0
- package/hooks/post-edit-suggest.sh +29 -0
- package/hooks/pre-edit-warn.sh +28 -0
- package/hooks/session-start.sh +19 -0
- package/hooks/stop-suggest.sh +49 -0
- package/package.json +30 -11
- package/scripts/install-codex-plugin.sh +119 -0
- package/scripts/install-plugin.sh +29 -24
- package/skills/architecture-export/SKILL.md +79 -0
- package/skills/architecture-scan/SKILL.md +64 -0
- package/skills/code-review/SKILL.md +368 -0
- package/skills/impact-analysis/SKILL.md +80 -0
- package/skills/infrastructure-scanning.md +42 -0
- package/skills/navgator-setup/SKILL.md +108 -0
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +3 -0
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/required-server-files.json +4 -4
- package/web/.next/standalone/web/.next/routes-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/api/rules/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +2 -2
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__0426efe8._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__cd5f36ce._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__ee6fc95f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +9 -4
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_rules_route_actions_3de01bd5.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_subgraph_route_actions_d8b5a63f.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_trace_route_actions_b0703ae2.js +3 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +4 -4
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/22a09ecf6ba35cfd.js +17 -0
- package/web/.next/standalone/web/.next/static/chunks/9857ba86ce4e82d8.css +2 -0
- package/web/.next/standalone/web/.next/static/chunks/f899547f99ef4b76.css +1 -0
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/53b9e256198e5412-s.853d50a3.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.55554cd0.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.ea323500.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.3b6cae6d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/fef07dbb0973bf53-s.518e079e.woff2 +0 -0
- package/web/.next/standalone/web/app/api/components/route.ts +1 -1
- package/web/.next/standalone/web/app/api/connections/route.ts +3 -1
- package/web/.next/standalone/web/app/api/graph/route.ts +3 -3
- package/web/.next/standalone/web/app/api/projects/route.ts +1 -1
- package/web/.next/standalone/web/app/api/prompts/route.ts +2 -2
- package/web/.next/standalone/web/app/api/rules/route.ts +213 -0
- package/web/.next/standalone/web/app/api/settings/route.ts +2 -2
- package/web/.next/standalone/web/app/api/status/route.ts +1 -1
- package/web/.next/standalone/web/app/api/subgraph/route.ts +267 -0
- package/web/.next/standalone/web/app/api/trace/route.ts +321 -0
- package/web/.next/standalone/web/app/page.tsx +9 -1
- package/web/.next/standalone/web/components/connections-panel.tsx +23 -6
- package/web/.next/standalone/web/components/coverage-panel.tsx +309 -0
- package/web/.next/standalone/web/components/rules-panel.tsx +156 -0
- package/web/.next/standalone/web/components/sidebar.tsx +8 -0
- package/web/.next/standalone/web/components/status-overview.tsx +24 -1
- package/web/.next/standalone/web/components/subgraph-panel.tsx +382 -0
- package/web/.next/standalone/web/components/trace-panel.tsx +325 -0
- package/web/.next/standalone/web/lib/hooks/index.ts +3 -0
- package/web/.next/standalone/web/lib/hooks/use-coverage.ts +68 -0
- package/web/.next/standalone/web/lib/hooks/use-subgraph.ts +85 -0
- package/web/.next/standalone/web/lib/hooks/use-trace.ts +84 -0
- package/web/.next/standalone/web/lib/types.ts +108 -0
- package/web/.next/standalone/web/package-lock.json +218 -0
- package/web/.next/standalone/web/package.json +4 -2
- package/web/.next/standalone/web/server.js +1 -1
- package/web/.next/static/chunks/22a09ecf6ba35cfd.js +17 -0
- package/web/.next/static/chunks/9857ba86ce4e82d8.css +2 -0
- package/web/.next/static/chunks/f899547f99ef4b76.css +1 -0
- package/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/static/media/53b9e256198e5412-s.853d50a3.woff2 +0 -0
- package/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.55554cd0.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.ea323500.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.3b6cae6d.woff2 +0 -0
- package/web/.next/static/media/fef07dbb0973bf53-s.518e079e.woff2 +0 -0
- package/skills/check/SKILL.md +0 -64
- package/skills/connections/SKILL.md +0 -54
- package/skills/diagram/SKILL.md +0 -64
- package/skills/export/SKILL.md +0 -49
- package/skills/impact/SKILL.md +0 -58
- package/skills/install/SKILL.md +0 -94
- package/skills/scan/SKILL.md +0 -75
- package/skills/status/SKILL.md +0 -37
- package/skills/ui/SKILL.md +0 -43
- package/skills/update/SKILL.md +0 -43
- package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +0 -2
- package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +0 -1
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +0 -2
- package/web/.next/static/chunks/c056475f5f4424b6.css +0 -1
- package/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_ssgManifest.js +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_buildManifest.js +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Route: /api/rules
|
|
3
|
+
*
|
|
4
|
+
* Runs architecture rules against stored components/connections.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
8
|
+
import * as fs from "fs/promises";
|
|
9
|
+
import * as path from "path";
|
|
10
|
+
import type { RulesApiResponse, RuleViolation } from "@/lib/types";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* GET /api/rules
|
|
14
|
+
*/
|
|
15
|
+
export async function GET(request: NextRequest) {
|
|
16
|
+
const searchParams = request.nextUrl.searchParams;
|
|
17
|
+
const projectPath = searchParams.get("path");
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const root =
|
|
21
|
+
projectPath ||
|
|
22
|
+
process.env.NAVGATOR_PROJECT_PATH ||
|
|
23
|
+
process.cwd().replace(/\/web$/, "");
|
|
24
|
+
|
|
25
|
+
const componentsDir = path.join(root, ".navgator", "architecture", "components");
|
|
26
|
+
const connectionsDir = path.join(root, ".navgator", "architecture", "connections");
|
|
27
|
+
|
|
28
|
+
// Load components
|
|
29
|
+
const components = await loadJsonDir(componentsDir);
|
|
30
|
+
const connections = await loadJsonDir(connectionsDir);
|
|
31
|
+
|
|
32
|
+
if (components.length === 0) {
|
|
33
|
+
return NextResponse.json<RulesApiResponse>({
|
|
34
|
+
success: true,
|
|
35
|
+
data: {
|
|
36
|
+
violations: [],
|
|
37
|
+
summary: { total: 0, errors: 0, warnings: 0, info: 0 },
|
|
38
|
+
},
|
|
39
|
+
source: "scan",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Run rules inline (avoid importing from src which needs compilation)
|
|
44
|
+
const violations = runBuiltinRules(components, connections);
|
|
45
|
+
|
|
46
|
+
return NextResponse.json<RulesApiResponse>({
|
|
47
|
+
success: true,
|
|
48
|
+
data: {
|
|
49
|
+
violations,
|
|
50
|
+
summary: {
|
|
51
|
+
total: violations.length,
|
|
52
|
+
errors: violations.filter((v) => v.severity === "error").length,
|
|
53
|
+
warnings: violations.filter((v) => v.severity === "warning").length,
|
|
54
|
+
info: violations.filter((v) => v.severity === "info").length,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
source: "scan",
|
|
58
|
+
});
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.error("Error running rules:", error);
|
|
61
|
+
return NextResponse.json<RulesApiResponse>({
|
|
62
|
+
success: false,
|
|
63
|
+
data: {
|
|
64
|
+
violations: [],
|
|
65
|
+
summary: { total: 0, errors: 0, warnings: 0, info: 0 },
|
|
66
|
+
},
|
|
67
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
68
|
+
source: "scan",
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function loadJsonDir(dir: string): Promise<Record<string, unknown>[]> {
|
|
74
|
+
try {
|
|
75
|
+
const files = await fs.readdir(dir);
|
|
76
|
+
const results: Record<string, unknown>[] = [];
|
|
77
|
+
for (const file of files.filter((f) => f.endsWith(".json"))) {
|
|
78
|
+
try {
|
|
79
|
+
const content = await fs.readFile(path.join(dir, file), "utf-8");
|
|
80
|
+
results.push(JSON.parse(content));
|
|
81
|
+
} catch {
|
|
82
|
+
// Skip invalid files
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return results;
|
|
86
|
+
} catch {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Run built-in rules against raw component/connection JSON.
|
|
93
|
+
* This mirrors the rules in src/rules.ts but works on raw JSON objects
|
|
94
|
+
* so we don't need to import from the CLI build.
|
|
95
|
+
*/
|
|
96
|
+
function runBuiltinRules(
|
|
97
|
+
components: Record<string, unknown>[],
|
|
98
|
+
connections: Record<string, unknown>[]
|
|
99
|
+
): RuleViolation[] {
|
|
100
|
+
const violations: RuleViolation[] = [];
|
|
101
|
+
|
|
102
|
+
// Helper to get nested values
|
|
103
|
+
const getLayer = (c: Record<string, unknown>) =>
|
|
104
|
+
(c.role as Record<string, unknown> | undefined)?.layer as string | undefined;
|
|
105
|
+
const getId = (c: Record<string, unknown>) => String(c.component_id || "");
|
|
106
|
+
const getName = (c: Record<string, unknown>) => String(c.name || "?");
|
|
107
|
+
const getStatus = (c: Record<string, unknown>) => String(c.status || "active");
|
|
108
|
+
const getFromId = (c: Record<string, unknown>) =>
|
|
109
|
+
String((c.from as Record<string, unknown> | undefined)?.component_id || "");
|
|
110
|
+
const getToId = (c: Record<string, unknown>) =>
|
|
111
|
+
String((c.to as Record<string, unknown> | undefined)?.component_id || "");
|
|
112
|
+
|
|
113
|
+
// Rule: Orphan components (0 connections)
|
|
114
|
+
const connectedIds = new Set<string>();
|
|
115
|
+
for (const conn of connections) {
|
|
116
|
+
connectedIds.add(getFromId(conn));
|
|
117
|
+
connectedIds.add(getToId(conn));
|
|
118
|
+
}
|
|
119
|
+
for (const comp of components) {
|
|
120
|
+
if (!connectedIds.has(getId(comp))) {
|
|
121
|
+
violations.push({
|
|
122
|
+
rule_id: "orphan-component",
|
|
123
|
+
severity: "warning",
|
|
124
|
+
component: getName(comp),
|
|
125
|
+
message: `${getName(comp)} has no connections — may be unused or untracked`,
|
|
126
|
+
suggestion: "Verify this component is used, or remove it if not needed",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Rule: Frontend direct DB access
|
|
132
|
+
const frontendIds = new Set(
|
|
133
|
+
components.filter((c) => getLayer(c) === "frontend").map(getId)
|
|
134
|
+
);
|
|
135
|
+
const dbIds = new Set(
|
|
136
|
+
components.filter((c) => getLayer(c) === "database").map(getId)
|
|
137
|
+
);
|
|
138
|
+
const compMap = new Map(components.map((c) => [getId(c), c]));
|
|
139
|
+
|
|
140
|
+
for (const conn of connections) {
|
|
141
|
+
if (frontendIds.has(getFromId(conn)) && dbIds.has(getToId(conn))) {
|
|
142
|
+
const from = compMap.get(getFromId(conn));
|
|
143
|
+
const to = compMap.get(getToId(conn));
|
|
144
|
+
violations.push({
|
|
145
|
+
rule_id: "frontend-direct-db",
|
|
146
|
+
severity: "error",
|
|
147
|
+
component: from ? getName(from) : undefined,
|
|
148
|
+
message: `${from ? getName(from) : "?"} (frontend) connects directly to ${to ? getName(to) : "?"} (database)`,
|
|
149
|
+
suggestion: "Add a backend API layer between frontend and database",
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Rule: Unused packages
|
|
155
|
+
for (const comp of components) {
|
|
156
|
+
if (getStatus(comp) === "unused") {
|
|
157
|
+
violations.push({
|
|
158
|
+
rule_id: "unused-package",
|
|
159
|
+
severity: "info",
|
|
160
|
+
component: getName(comp),
|
|
161
|
+
message: `${getName(comp)} is detected but unused`,
|
|
162
|
+
suggestion: `Remove with: npm uninstall ${getName(comp)}`,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Rule: Vulnerable dependencies
|
|
168
|
+
for (const comp of components) {
|
|
169
|
+
if (getStatus(comp) === "vulnerable") {
|
|
170
|
+
violations.push({
|
|
171
|
+
rule_id: "vulnerable-dependency",
|
|
172
|
+
severity: "error",
|
|
173
|
+
component: getName(comp),
|
|
174
|
+
message: `${getName(comp)} has known security vulnerabilities`,
|
|
175
|
+
suggestion: "Run npm audit fix or update to a patched version",
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Rule: Deprecated dependencies
|
|
181
|
+
for (const comp of components) {
|
|
182
|
+
if (getStatus(comp) === "deprecated") {
|
|
183
|
+
violations.push({
|
|
184
|
+
rule_id: "deprecated-dependency",
|
|
185
|
+
severity: "warning",
|
|
186
|
+
component: getName(comp),
|
|
187
|
+
message: `${getName(comp)} is deprecated`,
|
|
188
|
+
suggestion: "Find a replacement package before it becomes unmaintained",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Rule: Single point of failure (>5 dependents)
|
|
194
|
+
const dependentCounts = new Map<string, number>();
|
|
195
|
+
for (const conn of connections) {
|
|
196
|
+
const toId = getToId(conn);
|
|
197
|
+
dependentCounts.set(toId, (dependentCounts.get(toId) || 0) + 1);
|
|
198
|
+
}
|
|
199
|
+
for (const comp of components) {
|
|
200
|
+
const id = getId(comp);
|
|
201
|
+
if (getLayer(comp) === "backend" && (dependentCounts.get(id) || 0) > 5) {
|
|
202
|
+
violations.push({
|
|
203
|
+
rule_id: "single-point-of-failure",
|
|
204
|
+
severity: "warning",
|
|
205
|
+
component: getName(comp),
|
|
206
|
+
message: `${getName(comp)} has ${dependentCounts.get(id)} dependents — single point of failure`,
|
|
207
|
+
suggestion: "Consider adding redundancy or splitting responsibilities",
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return violations;
|
|
213
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Route: /api/settings
|
|
3
3
|
*
|
|
4
|
-
* Loads and saves NavGator settings to .
|
|
4
|
+
* Loads and saves NavGator settings to .navgator/settings.json
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { NextRequest, NextResponse } from "next/server";
|
|
@@ -94,7 +94,7 @@ function getSettingsPath(projectPath?: string | null): string {
|
|
|
94
94
|
projectPath ||
|
|
95
95
|
process.env.NAVGATOR_PROJECT_PATH ||
|
|
96
96
|
process.cwd().replace(/\/web$/, "");
|
|
97
|
-
return path.join(root, ".
|
|
97
|
+
return path.join(root, ".navgator", "settings.json");
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
async function loadSettings(
|
|
@@ -73,7 +73,7 @@ async function loadStatusData(projectPath?: string | null): Promise<ProjectStatu
|
|
|
73
73
|
const root = projectPath ||
|
|
74
74
|
process.env.NAVGATOR_PROJECT_PATH ||
|
|
75
75
|
process.cwd().replace(/\/web$/, "");
|
|
76
|
-
const indexPath = path.join(root, ".
|
|
76
|
+
const indexPath = path.join(root, ".navgator", "architecture", "index.json");
|
|
77
77
|
|
|
78
78
|
try {
|
|
79
79
|
const content = await fs.readFile(indexPath, "utf-8");
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Route: /api/subgraph
|
|
3
|
+
*
|
|
4
|
+
* Extracts a focused subgraph from the architecture.
|
|
5
|
+
* Mirrors src/subgraph.ts logic but works on raw JSON files.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
9
|
+
import * as fs from "fs/promises";
|
|
10
|
+
import * as path from "path";
|
|
11
|
+
import type { SubgraphApiResponse, SubgraphResult } from "@/lib/types";
|
|
12
|
+
|
|
13
|
+
export async function GET(request: NextRequest) {
|
|
14
|
+
const searchParams = request.nextUrl.searchParams;
|
|
15
|
+
const focus = searchParams.get("focus");
|
|
16
|
+
const depth = Math.min(parseInt(searchParams.get("depth") || "2", 10), 5);
|
|
17
|
+
const layers = searchParams.get("layers");
|
|
18
|
+
const classification = searchParams.get("classification") || undefined;
|
|
19
|
+
const maxNodes = Math.min(
|
|
20
|
+
parseInt(searchParams.get("maxNodes") || "50", 10),
|
|
21
|
+
200
|
|
22
|
+
);
|
|
23
|
+
const projectPath = searchParams.get("path");
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const root =
|
|
27
|
+
projectPath ||
|
|
28
|
+
process.env.NAVGATOR_PROJECT_PATH ||
|
|
29
|
+
process.cwd().replace(/\/web$/, "");
|
|
30
|
+
|
|
31
|
+
const componentsDir = path.join(root, ".navgator", "architecture", "components");
|
|
32
|
+
const connectionsDir = path.join(root, ".navgator", "architecture", "connections");
|
|
33
|
+
|
|
34
|
+
const components = await loadJsonDir(componentsDir);
|
|
35
|
+
const connections = await loadJsonDir(connectionsDir);
|
|
36
|
+
|
|
37
|
+
if (components.length === 0) {
|
|
38
|
+
return NextResponse.json<SubgraphApiResponse>({
|
|
39
|
+
success: true,
|
|
40
|
+
data: {
|
|
41
|
+
components: [],
|
|
42
|
+
connections: [],
|
|
43
|
+
stats: { nodes: 0, edges: 0 },
|
|
44
|
+
},
|
|
45
|
+
source: "scan",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const focusList = focus
|
|
50
|
+
? focus.split(",").map((s) => s.trim()).filter(Boolean)
|
|
51
|
+
: [];
|
|
52
|
+
const layerList = layers
|
|
53
|
+
? layers.split(",").map((s) => s.trim()).filter(Boolean)
|
|
54
|
+
: [];
|
|
55
|
+
|
|
56
|
+
const result = extractSubgraphInline(components, connections, {
|
|
57
|
+
focus: focusList,
|
|
58
|
+
layers: layerList,
|
|
59
|
+
classification,
|
|
60
|
+
depth,
|
|
61
|
+
maxNodes,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return NextResponse.json<SubgraphApiResponse>({
|
|
65
|
+
success: true,
|
|
66
|
+
data: result,
|
|
67
|
+
source: "scan",
|
|
68
|
+
});
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error("Error extracting subgraph:", error);
|
|
71
|
+
return NextResponse.json<SubgraphApiResponse>({
|
|
72
|
+
success: false,
|
|
73
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
74
|
+
source: "scan",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function loadJsonDir(dir: string): Promise<Record<string, unknown>[]> {
|
|
80
|
+
try {
|
|
81
|
+
const files = await fs.readdir(dir);
|
|
82
|
+
const results: Record<string, unknown>[] = [];
|
|
83
|
+
for (const file of files.filter((f) => f.endsWith(".json"))) {
|
|
84
|
+
try {
|
|
85
|
+
const content = await fs.readFile(path.join(dir, file), "utf-8");
|
|
86
|
+
results.push(JSON.parse(content));
|
|
87
|
+
} catch {
|
|
88
|
+
// Skip invalid files
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return results;
|
|
92
|
+
} catch {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function getId(c: Record<string, unknown>): string {
|
|
98
|
+
return String(c.component_id || "");
|
|
99
|
+
}
|
|
100
|
+
function getName(c: Record<string, unknown>): string {
|
|
101
|
+
return String(c.name || "?");
|
|
102
|
+
}
|
|
103
|
+
function getType(c: Record<string, unknown>): string {
|
|
104
|
+
return String(c.type || "");
|
|
105
|
+
}
|
|
106
|
+
function getLayer(c: Record<string, unknown>): string {
|
|
107
|
+
return String((c.role as Record<string, unknown> | undefined)?.layer || "");
|
|
108
|
+
}
|
|
109
|
+
function getFromId(c: Record<string, unknown>): string {
|
|
110
|
+
return String((c.from as Record<string, unknown> | undefined)?.component_id || "");
|
|
111
|
+
}
|
|
112
|
+
function getToId(c: Record<string, unknown>): string {
|
|
113
|
+
return String((c.to as Record<string, unknown> | undefined)?.component_id || "");
|
|
114
|
+
}
|
|
115
|
+
function getConnId(c: Record<string, unknown>): string {
|
|
116
|
+
return String(c.connection_id || "");
|
|
117
|
+
}
|
|
118
|
+
function getConnType(c: Record<string, unknown>): string {
|
|
119
|
+
return String(c.type || "");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface SubgraphOpts {
|
|
123
|
+
focus: string[];
|
|
124
|
+
layers: string[];
|
|
125
|
+
classification?: string;
|
|
126
|
+
depth: number;
|
|
127
|
+
maxNodes: number;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function extractSubgraphInline(
|
|
131
|
+
components: Record<string, unknown>[],
|
|
132
|
+
connections: Record<string, unknown>[],
|
|
133
|
+
opts: SubgraphOpts
|
|
134
|
+
): SubgraphResult {
|
|
135
|
+
// Synthesize virtual components for FILE: references in connections
|
|
136
|
+
const allComponents = [...components];
|
|
137
|
+
const knownIds = new Set(components.map(getId));
|
|
138
|
+
for (const conn of connections) {
|
|
139
|
+
for (const refId of [getFromId(conn), getToId(conn)]) {
|
|
140
|
+
if (refId && !knownIds.has(refId) && refId.startsWith("FILE:")) {
|
|
141
|
+
const filePath = refId.slice(5);
|
|
142
|
+
const fileName = filePath.split("/").pop() || filePath;
|
|
143
|
+
allComponents.push({
|
|
144
|
+
component_id: refId,
|
|
145
|
+
name: fileName,
|
|
146
|
+
type: "file",
|
|
147
|
+
role: { layer: "application" },
|
|
148
|
+
});
|
|
149
|
+
knownIds.add(refId);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
let filteredIds = new Set<string>();
|
|
155
|
+
|
|
156
|
+
if (opts.focus.length > 0) {
|
|
157
|
+
// Resolve focus names to component IDs
|
|
158
|
+
const focusIds = new Set<string>();
|
|
159
|
+
for (const query of opts.focus) {
|
|
160
|
+
const queryLower = query.toLowerCase();
|
|
161
|
+
const match =
|
|
162
|
+
allComponents.find((c) => getName(c).toLowerCase() === queryLower) ||
|
|
163
|
+
allComponents.find((c) => getName(c).toLowerCase().includes(queryLower));
|
|
164
|
+
if (match) focusIds.add(getId(match));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (focusIds.size === 0) {
|
|
168
|
+
return {
|
|
169
|
+
components: [],
|
|
170
|
+
connections: [],
|
|
171
|
+
stats: { nodes: 0, edges: 0 },
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// BFS from focus components
|
|
176
|
+
const visited = new Set<string>(focusIds);
|
|
177
|
+
let frontier = [...focusIds];
|
|
178
|
+
|
|
179
|
+
for (let d = 0; d < opts.depth; d++) {
|
|
180
|
+
const nextFrontier: string[] = [];
|
|
181
|
+
for (const id of frontier) {
|
|
182
|
+
for (const conn of connections) {
|
|
183
|
+
if (getFromId(conn) === id && !visited.has(getToId(conn))) {
|
|
184
|
+
visited.add(getToId(conn));
|
|
185
|
+
nextFrontier.push(getToId(conn));
|
|
186
|
+
}
|
|
187
|
+
if (getToId(conn) === id && !visited.has(getFromId(conn))) {
|
|
188
|
+
visited.add(getFromId(conn));
|
|
189
|
+
nextFrontier.push(getFromId(conn));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
frontier = nextFrontier;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
filteredIds = visited;
|
|
197
|
+
} else {
|
|
198
|
+
filteredIds = new Set(allComponents.map(getId));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Layer filter
|
|
202
|
+
if (opts.layers.length > 0) {
|
|
203
|
+
const layerSet = new Set(opts.layers);
|
|
204
|
+
for (const id of [...filteredIds]) {
|
|
205
|
+
const comp = allComponents.find((c) => getId(c) === id);
|
|
206
|
+
if (comp && !layerSet.has(getLayer(comp))) {
|
|
207
|
+
filteredIds.delete(id);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Filter connections
|
|
213
|
+
let filteredConns = connections.filter(
|
|
214
|
+
(c) => filteredIds.has(getFromId(c)) && filteredIds.has(getToId(c))
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
// Classification filter
|
|
218
|
+
if (opts.classification) {
|
|
219
|
+
filteredConns = filteredConns.filter((c) => {
|
|
220
|
+
const semantic = c.semantic as Record<string, unknown> | undefined;
|
|
221
|
+
return semantic?.classification === opts.classification;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Apply maxNodes
|
|
226
|
+
const filteredComps = allComponents.filter((c) => filteredIds.has(getId(c)));
|
|
227
|
+
const limited = filteredComps.slice(0, opts.maxNodes);
|
|
228
|
+
const limitedIds = new Set(limited.map(getId));
|
|
229
|
+
const limitedConns = filteredConns.filter(
|
|
230
|
+
(c) => limitedIds.has(getFromId(c)) && limitedIds.has(getToId(c))
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
// Build compact output
|
|
234
|
+
const compactComponents = limited.map((c) => ({
|
|
235
|
+
id: getId(c),
|
|
236
|
+
n: getName(c),
|
|
237
|
+
t: getType(c),
|
|
238
|
+
l: getLayer(c),
|
|
239
|
+
}));
|
|
240
|
+
const compactConnections = limitedConns.map((c) => ({
|
|
241
|
+
id: getConnId(c),
|
|
242
|
+
f: getFromId(c),
|
|
243
|
+
t: getToId(c),
|
|
244
|
+
tp: getConnType(c),
|
|
245
|
+
}));
|
|
246
|
+
|
|
247
|
+
// Generate Mermaid
|
|
248
|
+
const mermaidLines = ["graph TD", ""];
|
|
249
|
+
for (const comp of compactComponents) {
|
|
250
|
+
const safeId = comp.id.replace(/[^a-zA-Z0-9_]/g, "_");
|
|
251
|
+
const safeName = comp.n.replace(/"/g, "'").slice(0, 40);
|
|
252
|
+
mermaidLines.push(` ${safeId}["${safeName}"]`);
|
|
253
|
+
}
|
|
254
|
+
mermaidLines.push("");
|
|
255
|
+
for (const conn of compactConnections) {
|
|
256
|
+
const sourceId = conn.f.replace(/[^a-zA-Z0-9_]/g, "_");
|
|
257
|
+
const targetId = conn.t.replace(/[^a-zA-Z0-9_]/g, "_");
|
|
258
|
+
mermaidLines.push(` ${sourceId} --> ${targetId}`);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return {
|
|
262
|
+
components: compactComponents,
|
|
263
|
+
connections: compactConnections,
|
|
264
|
+
stats: { nodes: compactComponents.length, edges: compactConnections.length },
|
|
265
|
+
mermaid: mermaidLines.join("\n"),
|
|
266
|
+
};
|
|
267
|
+
}
|