@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,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NavGator audit verifiers — Run 2 / D2
|
|
3
|
+
*
|
|
4
|
+
* Six defect classes. First five are deterministic (free); MISSED_EDGE
|
|
5
|
+
* is the only LLM-dependent one (skipped in CLI mode).
|
|
6
|
+
*
|
|
7
|
+
* HALLUCINATED_COMPONENT — claimed component does not exist on disk
|
|
8
|
+
* HALLUCINATED_EDGE — connection's endpoints not in component graph
|
|
9
|
+
* WRONG_ENDPOINT — symbol not actually present in source file
|
|
10
|
+
* STALE_REFERENCE — file hash doesn't match recorded hash
|
|
11
|
+
* DEDUP_COLLISION — same (type,name,primary-config) appears twice
|
|
12
|
+
* MISSED_EDGE — LLM-only; emits a needs-verification payload
|
|
13
|
+
*/
|
|
14
|
+
import * as crypto from 'crypto';
|
|
15
|
+
import * as fs from 'fs';
|
|
16
|
+
import * as path from 'path';
|
|
17
|
+
// Code-level component types whose `code_reference.symbol` should appear in
|
|
18
|
+
// the recorded source file.
|
|
19
|
+
const CODE_COMPONENT_TYPES = new Set([
|
|
20
|
+
'api-endpoint',
|
|
21
|
+
'prompt',
|
|
22
|
+
'worker',
|
|
23
|
+
'component',
|
|
24
|
+
]);
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// HELPERS
|
|
27
|
+
// ============================================================================
|
|
28
|
+
async function readFileSafe(absPath) {
|
|
29
|
+
try {
|
|
30
|
+
return await fs.promises.readFile(absPath, 'utf-8');
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function escapeRegex(s) {
|
|
37
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Run 3: True when `s` is a pure JS identifier (the kind of token where `\b`
|
|
41
|
+
* word-boundary regex matching makes sense). Path-style symbols like
|
|
42
|
+
* `'./entity-analysis-service'` or scoped imports `'@scope/pkg'` contain
|
|
43
|
+
* non-word characters at their boundaries, where `\b` does NOT match.
|
|
44
|
+
*
|
|
45
|
+
* For non-identifier symbols we fall back to plain substring matching, which
|
|
46
|
+
* is correct for the WRONG_ENDPOINT verifier's intent ("does this token
|
|
47
|
+
* appear in the file?").
|
|
48
|
+
*/
|
|
49
|
+
function isIdentifierLike(s) {
|
|
50
|
+
return /^[A-Za-z_$][\w$]*$/.test(s);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Run 3: Symbol-presence test that handles path-style and identifier symbols
|
|
54
|
+
* uniformly. Identifier-like → `\b<sym>\b` regex (false-positive resistant).
|
|
55
|
+
* Otherwise → plain `content.includes(sym)`. Empty/short tokens reject.
|
|
56
|
+
*/
|
|
57
|
+
function symbolAppearsIn(content, sym) {
|
|
58
|
+
if (!sym || sym.length <= 1)
|
|
59
|
+
return false;
|
|
60
|
+
if (isIdentifierLike(sym)) {
|
|
61
|
+
const re = new RegExp(`\\b${escapeRegex(sym)}\\b`);
|
|
62
|
+
return re.test(content);
|
|
63
|
+
}
|
|
64
|
+
return content.includes(sym);
|
|
65
|
+
}
|
|
66
|
+
async function fileExists(absPath) {
|
|
67
|
+
try {
|
|
68
|
+
await fs.promises.access(absPath, fs.constants.F_OK);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async function sha256File(absPath) {
|
|
76
|
+
try {
|
|
77
|
+
const buf = await fs.promises.readFile(absPath);
|
|
78
|
+
return crypto.createHash('sha256').update(buf).digest('hex');
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// ============================================================================
|
|
85
|
+
// V1 — HALLUCINATED_COMPONENT
|
|
86
|
+
// ============================================================================
|
|
87
|
+
export async function verifyHallucinatedComponent(samples, ctx) {
|
|
88
|
+
const evidence = [];
|
|
89
|
+
for (const comp of samples) {
|
|
90
|
+
const configFiles = comp.source?.config_files ?? [];
|
|
91
|
+
if (configFiles.length === 0) {
|
|
92
|
+
// No config_files claim → can't verify, mark as ok.
|
|
93
|
+
evidence.push({ id: comp.component_id, ok: true });
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
// At least one config file must exist on disk.
|
|
97
|
+
let anyExists = false;
|
|
98
|
+
for (const rel of configFiles) {
|
|
99
|
+
const abs = path.isAbsolute(rel) ? rel : path.join(ctx.projectRoot, rel);
|
|
100
|
+
if (await fileExists(abs)) {
|
|
101
|
+
anyExists = true;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (!anyExists) {
|
|
106
|
+
evidence.push({
|
|
107
|
+
id: comp.component_id,
|
|
108
|
+
ok: false,
|
|
109
|
+
reason: `none of ${configFiles.length} config_files exist on disk`,
|
|
110
|
+
});
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
// For code-level component types, check the symbol appears in the file.
|
|
114
|
+
// Skip cleanly if symbol is missing or generic.
|
|
115
|
+
if (CODE_COMPONENT_TYPES.has(comp.type) && configFiles[0]) {
|
|
116
|
+
const sym = comp.code_reference?.symbol;
|
|
117
|
+
// ArchitectureComponent doesn't carry code_reference directly; this is a
|
|
118
|
+
// permissive check — only fail if we can confidently say "symbol absent".
|
|
119
|
+
if (sym && sym.length > 1 && /^[A-Za-z_][\w$]*$/.test(sym)) {
|
|
120
|
+
const abs = path.join(ctx.projectRoot, configFiles[0]);
|
|
121
|
+
const content = await readFileSafe(abs);
|
|
122
|
+
if (content !== null && !content.includes(sym)) {
|
|
123
|
+
evidence.push({
|
|
124
|
+
id: comp.component_id,
|
|
125
|
+
ok: false,
|
|
126
|
+
reason: `symbol "${sym}" not found in ${configFiles[0]}`,
|
|
127
|
+
});
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
evidence.push({ id: comp.component_id, ok: true });
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
class: 'HALLUCINATED_COMPONENT',
|
|
136
|
+
sampledCount: samples.length,
|
|
137
|
+
defectCount: evidence.filter((e) => !e.ok).length,
|
|
138
|
+
samples: evidence,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
// ============================================================================
|
|
142
|
+
// V2 — HALLUCINATED_EDGE
|
|
143
|
+
// ============================================================================
|
|
144
|
+
export function verifyHallucinatedEdge(samples, ctx) {
|
|
145
|
+
const evidence = samples.map((conn) => {
|
|
146
|
+
const fromOk = ctx.componentById.has(conn.from?.component_id ?? '');
|
|
147
|
+
const toOk = ctx.componentById.has(conn.to?.component_id ?? '');
|
|
148
|
+
if (fromOk && toOk)
|
|
149
|
+
return { id: conn.connection_id, ok: true };
|
|
150
|
+
return {
|
|
151
|
+
id: conn.connection_id,
|
|
152
|
+
ok: false,
|
|
153
|
+
reason: !fromOk && !toOk
|
|
154
|
+
? 'both endpoints unresolved'
|
|
155
|
+
: !fromOk
|
|
156
|
+
? `from.component_id "${conn.from?.component_id}" unresolved`
|
|
157
|
+
: `to.component_id "${conn.to?.component_id}" unresolved`,
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
class: 'HALLUCINATED_EDGE',
|
|
162
|
+
sampledCount: samples.length,
|
|
163
|
+
defectCount: evidence.filter((e) => !e.ok).length,
|
|
164
|
+
samples: evidence,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
// ============================================================================
|
|
168
|
+
// V3 — WRONG_ENDPOINT
|
|
169
|
+
// ============================================================================
|
|
170
|
+
/**
|
|
171
|
+
* Re-checks that the connection's recorded source file still contains a
|
|
172
|
+
* reference to the target component's name (or the symbol). Cheap grep —
|
|
173
|
+
* not a syntactic AST check.
|
|
174
|
+
*/
|
|
175
|
+
export async function verifyWrongEndpoint(samples, ctx) {
|
|
176
|
+
const evidence = [];
|
|
177
|
+
for (const conn of samples) {
|
|
178
|
+
const filePath = conn.code_reference?.file;
|
|
179
|
+
if (!filePath) {
|
|
180
|
+
evidence.push({ id: conn.connection_id, ok: true });
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const abs = path.join(ctx.projectRoot, filePath);
|
|
184
|
+
const content = await readFileSafe(abs);
|
|
185
|
+
if (content === null) {
|
|
186
|
+
// File missing → covered by stale-ref or hallucinated-component;
|
|
187
|
+
// not a wrong-endpoint defect by our definition.
|
|
188
|
+
evidence.push({ id: conn.connection_id, ok: true });
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
const target = ctx.componentById.get(conn.to?.component_id ?? '');
|
|
192
|
+
const symbol = conn.code_reference?.symbol;
|
|
193
|
+
const targetName = target?.name;
|
|
194
|
+
// We need at least ONE positive signal. Try (in order):
|
|
195
|
+
// 1. recorded symbol appears in the file
|
|
196
|
+
// 2. target component name appears in the file
|
|
197
|
+
// Run 3 fix: use symbolAppearsIn() which handles both identifier-style and
|
|
198
|
+
// path-style symbols. The previous \b-only regex falsely failed on imports
|
|
199
|
+
// like './entity-analysis-service' because . and / are non-word chars and
|
|
200
|
+
// \b does not match around them.
|
|
201
|
+
let found = false;
|
|
202
|
+
const tried = [];
|
|
203
|
+
if (symbol && symbol.length > 1) {
|
|
204
|
+
tried.push(`symbol="${symbol}"`);
|
|
205
|
+
if (symbolAppearsIn(content, symbol))
|
|
206
|
+
found = true;
|
|
207
|
+
}
|
|
208
|
+
if (!found && targetName && targetName.length > 1) {
|
|
209
|
+
tried.push(`name="${targetName}"`);
|
|
210
|
+
if (symbolAppearsIn(content, targetName))
|
|
211
|
+
found = true;
|
|
212
|
+
}
|
|
213
|
+
if (!found && tried.length > 0) {
|
|
214
|
+
evidence.push({
|
|
215
|
+
id: conn.connection_id,
|
|
216
|
+
ok: false,
|
|
217
|
+
reason: `no reference to ${tried.join(' or ')} in ${filePath}`,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
evidence.push({ id: conn.connection_id, ok: true });
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
class: 'WRONG_ENDPOINT',
|
|
226
|
+
sampledCount: samples.length,
|
|
227
|
+
defectCount: evidence.filter((e) => !e.ok).length,
|
|
228
|
+
samples: evidence,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
// ============================================================================
|
|
232
|
+
// V4 — STALE_REFERENCE
|
|
233
|
+
// ============================================================================
|
|
234
|
+
export async function verifyStaleReference(
|
|
235
|
+
/** Sampled FILES (relative paths), not components. */
|
|
236
|
+
sampledFiles, ctx) {
|
|
237
|
+
const evidence = [];
|
|
238
|
+
if (!ctx.hashes || !ctx.hashes.files) {
|
|
239
|
+
return {
|
|
240
|
+
class: 'STALE_REFERENCE',
|
|
241
|
+
sampledCount: sampledFiles.length,
|
|
242
|
+
defectCount: 0,
|
|
243
|
+
samples: sampledFiles.map((f) => ({ id: f, ok: true })),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
for (const rel of sampledFiles) {
|
|
247
|
+
const recorded = ctx.hashes.files[rel];
|
|
248
|
+
if (!recorded) {
|
|
249
|
+
// Not in hashes.json → can't compare; not stale by definition.
|
|
250
|
+
evidence.push({ id: rel, ok: true });
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
const abs = path.join(ctx.projectRoot, rel);
|
|
254
|
+
const current = await sha256File(abs);
|
|
255
|
+
if (current === null) {
|
|
256
|
+
// File deleted since scan → stale ref
|
|
257
|
+
evidence.push({ id: rel, ok: false, reason: 'file no longer exists on disk' });
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (current !== recorded.hash) {
|
|
261
|
+
evidence.push({
|
|
262
|
+
id: rel,
|
|
263
|
+
ok: false,
|
|
264
|
+
reason: `hash mismatch (recorded ${recorded.hash.slice(0, 8)}…, now ${current.slice(0, 8)}…)`,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
evidence.push({ id: rel, ok: true });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
class: 'STALE_REFERENCE',
|
|
273
|
+
sampledCount: sampledFiles.length,
|
|
274
|
+
defectCount: evidence.filter((e) => !e.ok).length,
|
|
275
|
+
samples: evidence,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
// ============================================================================
|
|
279
|
+
// V5 — DEDUP_COLLISION (regression check on Run 1.7 fix)
|
|
280
|
+
// ============================================================================
|
|
281
|
+
/**
|
|
282
|
+
* Scans ALL components (not a sample — this is a graph-wide invariant) for
|
|
283
|
+
* duplicate (type, name, primary-config-file) triples. Returns one evidence
|
|
284
|
+
* row per collision pair.
|
|
285
|
+
*/
|
|
286
|
+
export function verifyDedupCollision(allComponents) {
|
|
287
|
+
const seen = new Map();
|
|
288
|
+
const evidence = [];
|
|
289
|
+
for (const c of allComponents) {
|
|
290
|
+
const primary = c.source?.config_files?.[0] ?? '__none';
|
|
291
|
+
const key = `${c.type}|${c.name}|${primary}`;
|
|
292
|
+
const prior = seen.get(key);
|
|
293
|
+
if (prior) {
|
|
294
|
+
evidence.push({
|
|
295
|
+
id: c.component_id,
|
|
296
|
+
ok: false,
|
|
297
|
+
reason: `dedup-key collision with ${prior.component_id} on (${c.type}, ${c.name}, ${primary})`,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
seen.set(key, c);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// Don't generate ok-evidence for every component — only collisions.
|
|
305
|
+
return {
|
|
306
|
+
class: 'DEDUP_COLLISION',
|
|
307
|
+
sampledCount: allComponents.length,
|
|
308
|
+
defectCount: evidence.length,
|
|
309
|
+
samples: evidence,
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Build a structured payload describing each sampled file's recorded outgoing
|
|
314
|
+
* edges, for an MCP-side LLM judge to set-diff against the file contents.
|
|
315
|
+
*
|
|
316
|
+
* In CLI mode we set `llm_skipped: true` and return zero defects; the audit
|
|
317
|
+
* report flags the skip but doesn't fail.
|
|
318
|
+
*/
|
|
319
|
+
export function verifyMissedEdge(sampledFiles, allConnections, ctx) {
|
|
320
|
+
if (!ctx.isMcpMode) {
|
|
321
|
+
return {
|
|
322
|
+
class: 'MISSED_EDGE',
|
|
323
|
+
sampledCount: sampledFiles.length,
|
|
324
|
+
defectCount: 0,
|
|
325
|
+
samples: sampledFiles.map((f) => ({ id: f, ok: true, reason: 'llm-skipped' })),
|
|
326
|
+
llm_skipped: true,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
// Build per-file edge map.
|
|
330
|
+
const byFile = new Map();
|
|
331
|
+
for (const conn of allConnections) {
|
|
332
|
+
const f = conn.code_reference?.file;
|
|
333
|
+
if (!f)
|
|
334
|
+
continue;
|
|
335
|
+
let arr = byFile.get(f);
|
|
336
|
+
if (!arr) {
|
|
337
|
+
arr = [];
|
|
338
|
+
byFile.set(f, arr);
|
|
339
|
+
}
|
|
340
|
+
arr.push(conn);
|
|
341
|
+
}
|
|
342
|
+
const payload = {
|
|
343
|
+
instruction: 'For each file, list all outgoing dependencies (imports, API calls, db queries, queue producers, LLM calls). ' +
|
|
344
|
+
'Set-diff against `recorded_outgoing_edges`. Return any dependency in the file that is NOT in the recorded list.',
|
|
345
|
+
files: sampledFiles.map((rel) => ({
|
|
346
|
+
path: rel,
|
|
347
|
+
recorded_outgoing_edges: (byFile.get(rel) ?? []).map((c) => ({
|
|
348
|
+
connection_id: c.connection_id,
|
|
349
|
+
target_component_id: c.to?.component_id ?? '',
|
|
350
|
+
target_name: ctx.componentById.get(c.to?.component_id ?? '')?.name,
|
|
351
|
+
symbol: c.code_reference?.symbol,
|
|
352
|
+
})),
|
|
353
|
+
})),
|
|
354
|
+
};
|
|
355
|
+
// The LLM judge runs out-of-band; we mark all samples ok pending its reply.
|
|
356
|
+
// The MCP transport is responsible for re-injecting the verdict into the
|
|
357
|
+
// audit report on a follow-up tool call.
|
|
358
|
+
return {
|
|
359
|
+
class: 'MISSED_EDGE',
|
|
360
|
+
sampledCount: sampledFiles.length,
|
|
361
|
+
defectCount: 0,
|
|
362
|
+
samples: sampledFiles.map((f) => ({ id: f, ok: true, reason: 'awaiting-llm-verdict' })),
|
|
363
|
+
llm_payload: payload,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=verifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifiers.js","sourceRoot":"","sources":["../../src/audit/verifiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAkD7B,4EAA4E;AAC5E,4BAA4B;AAC5B,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAgB;IAClD,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,WAAW;CACZ,CAAC,CAAC;AAEH,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAAe;IACzC,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC5B,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,gBAAgB,CAAC,CAAS;IACjC,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,OAAe,EAAE,GAAW;IACnD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC;QA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,EAAE,YAAY,CAAC,MAAM;QACjC,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAC;QACvF,WAAW,EAAE,OAAO;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NavGator Semantic Connection Classification
|
|
3
|
+
* Classifies connections as production, admin, analytics, test, dev-only, migration, or unknown
|
|
4
|
+
*/
|
|
5
|
+
import { ArchitectureComponent, ArchitectureConnection } from './types.js';
|
|
6
|
+
export type SemanticClassification = 'production' | 'admin' | 'analytics' | 'test' | 'dev-only' | 'migration' | 'unknown';
|
|
7
|
+
export interface SemanticInfo {
|
|
8
|
+
classification: SemanticClassification;
|
|
9
|
+
confidence: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Classify a connection based on file path patterns of source and target components.
|
|
13
|
+
*/
|
|
14
|
+
export declare function classifyConnection(conn: ArchitectureConnection, fromComponent: ArchitectureComponent, toComponent: ArchitectureComponent): SemanticInfo;
|
|
15
|
+
/**
|
|
16
|
+
* Classify all connections in a batch
|
|
17
|
+
*/
|
|
18
|
+
export declare function classifyAllConnections(connections: ArchitectureConnection[], components: ArchitectureComponent[]): Map<string, SemanticInfo>;
|
|
19
|
+
//# sourceMappingURL=classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAE1H,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,sBAAsB,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,sBAAsB,EAC5B,aAAa,EAAE,qBAAqB,EACpC,WAAW,EAAE,qBAAqB,GACjC,YAAY,CAiEd;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,sBAAsB,EAAE,EACrC,UAAU,EAAE,qBAAqB,EAAE,GAClC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CA2C3B"}
|
package/dist/classify.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NavGator Semantic Connection Classification
|
|
3
|
+
* Classifies connections as production, admin, analytics, test, dev-only, migration, or unknown
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Classify a connection based on file path patterns of source and target components.
|
|
7
|
+
*/
|
|
8
|
+
export function classifyConnection(conn, fromComponent, toComponent) {
|
|
9
|
+
// Collect all relevant file paths
|
|
10
|
+
const paths = [
|
|
11
|
+
conn.code_reference?.file,
|
|
12
|
+
conn.from.location?.file,
|
|
13
|
+
conn.to.location?.file,
|
|
14
|
+
...(fromComponent.source.config_files || []),
|
|
15
|
+
].filter(Boolean);
|
|
16
|
+
// Check each classification pattern against all paths
|
|
17
|
+
for (const p of paths) {
|
|
18
|
+
const lower = p.toLowerCase();
|
|
19
|
+
// Test patterns (highest priority — test files shouldn't be treated as production)
|
|
20
|
+
if (isTestPath(lower)) {
|
|
21
|
+
return { classification: 'test', confidence: 0.9 };
|
|
22
|
+
}
|
|
23
|
+
// Migration patterns
|
|
24
|
+
if (isMigrationPath(lower)) {
|
|
25
|
+
return { classification: 'migration', confidence: 0.9 };
|
|
26
|
+
}
|
|
27
|
+
// Dev-only patterns
|
|
28
|
+
if (isDevPath(lower)) {
|
|
29
|
+
return { classification: 'dev-only', confidence: 0.9 };
|
|
30
|
+
}
|
|
31
|
+
// Admin patterns
|
|
32
|
+
if (isAdminPath(lower)) {
|
|
33
|
+
return { classification: 'admin', confidence: 0.9 };
|
|
34
|
+
}
|
|
35
|
+
// Analytics patterns
|
|
36
|
+
if (isAnalyticsPath(lower)) {
|
|
37
|
+
return { classification: 'analytics', confidence: 0.9 };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Component name heuristic
|
|
41
|
+
const fromName = fromComponent.name.toLowerCase();
|
|
42
|
+
const toName = toComponent.name.toLowerCase();
|
|
43
|
+
if (fromName.includes('test') || toName.includes('test')) {
|
|
44
|
+
return { classification: 'test', confidence: 0.7 };
|
|
45
|
+
}
|
|
46
|
+
if (fromName.includes('admin') || toName.includes('admin')) {
|
|
47
|
+
return { classification: 'admin', confidence: 0.7 };
|
|
48
|
+
}
|
|
49
|
+
if (fromName.includes('analytics') || fromName.includes('metric') || toName.includes('analytics') || toName.includes('metric')) {
|
|
50
|
+
return { classification: 'analytics', confidence: 0.7 };
|
|
51
|
+
}
|
|
52
|
+
// Final file path check — catches scripts/ when component names didn't trigger above
|
|
53
|
+
const connFile = conn.code_reference?.file?.toLowerCase() || '';
|
|
54
|
+
const fromFile = conn.from.location?.file?.toLowerCase() || '';
|
|
55
|
+
if (/(^scripts\/|\/scripts\/)/.test(connFile) || /(^scripts\/|\/scripts\/)/.test(fromFile)) {
|
|
56
|
+
return { classification: 'dev-only', confidence: 0.9 };
|
|
57
|
+
}
|
|
58
|
+
if (isTestPath(connFile) || isTestPath(fromFile)) {
|
|
59
|
+
return { classification: 'test', confidence: 0.8 };
|
|
60
|
+
}
|
|
61
|
+
// Default: production
|
|
62
|
+
return { classification: 'production', confidence: 0.4 };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Classify all connections in a batch
|
|
66
|
+
*/
|
|
67
|
+
export function classifyAllConnections(connections, components) {
|
|
68
|
+
const componentMap = new Map(components.map(c => [c.component_id, c]));
|
|
69
|
+
const result = new Map();
|
|
70
|
+
for (const conn of connections) {
|
|
71
|
+
const from = componentMap.get(conn.from.component_id);
|
|
72
|
+
const to = componentMap.get(conn.to.component_id);
|
|
73
|
+
if (from && to) {
|
|
74
|
+
result.set(conn.connection_id, classifyConnection(conn, from, to));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// Components not resolved (FILE: prefix IDs) — classify by file paths only
|
|
78
|
+
const filePaths = [
|
|
79
|
+
conn.code_reference?.file,
|
|
80
|
+
conn.from.location?.file,
|
|
81
|
+
conn.to.location?.file,
|
|
82
|
+
].filter(Boolean);
|
|
83
|
+
let classified = false;
|
|
84
|
+
for (const p of filePaths) {
|
|
85
|
+
const lower = p.toLowerCase();
|
|
86
|
+
if (isTestPath(lower)) {
|
|
87
|
+
result.set(conn.connection_id, { classification: 'test', confidence: 0.8 });
|
|
88
|
+
classified = true;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
if (isDevPath(lower)) {
|
|
92
|
+
result.set(conn.connection_id, { classification: 'dev-only', confidence: 0.8 });
|
|
93
|
+
classified = true;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
if (isMigrationPath(lower)) {
|
|
97
|
+
result.set(conn.connection_id, { classification: 'migration', confidence: 0.8 });
|
|
98
|
+
classified = true;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (!classified) {
|
|
103
|
+
result.set(conn.connection_id, { classification: 'production', confidence: 0.4 });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
function isTestPath(p) {
|
|
110
|
+
return /(__tests__|\.test\.|\.spec\.|\/tests?\/|\/testing\/)/.test(p);
|
|
111
|
+
}
|
|
112
|
+
function isMigrationPath(p) {
|
|
113
|
+
return /(\/migrations?\/|\/migrate|\.migration\.|\/seeds?\/)/.test(p);
|
|
114
|
+
}
|
|
115
|
+
function isDevPath(p) {
|
|
116
|
+
return /(^scripts\/|\/scripts\/|\/dev\/|\.dev\.|webpack\.config|vite\.config|rollup\.config|jest\.config|eslint|prettier|\.storybook)/.test(p);
|
|
117
|
+
}
|
|
118
|
+
function isAdminPath(p) {
|
|
119
|
+
return /(\/admin\/|\/dashboard\/|\/internal\/|\/backoffice\/)/.test(p);
|
|
120
|
+
}
|
|
121
|
+
function isAnalyticsPath(p) {
|
|
122
|
+
return /(\/analytics\/|\/tracking\/|\/telemetry\/|\/metrics\/|\/monitoring\/)/.test(p);
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=classify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../src/classify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAA4B,EAC5B,aAAoC,EACpC,WAAkC;IAElC,kCAAkC;IAClC,MAAM,KAAK,GAAG;QACZ,IAAI,CAAC,cAAc,EAAE,IAAI;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI;QACxB,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI;QACtB,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;KAC7C,CAAC,MAAM,CAAC,OAAO,CAAa,CAAC;IAE9B,sDAAsD;IACtD,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAE9B,mFAAmF;QACnF,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;QACrD,CAAC;QAED,qBAAqB;QACrB,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,E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