@tyroneross/navgator 0.2.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +24 -11
- package/.claude-plugin/plugin.json +16 -11
- package/.codex-plugin/plugin.json +30 -0
- package/AGENTS.md +468 -0
- package/CLAUDE.md +431 -28
- package/LICENSE +202 -21
- package/README.md +735 -53
- package/VERSIONING.md +62 -0
- package/agents/architecture-advisor.md +6 -2
- package/agents/architecture-investigator.md +166 -0
- package/agents/architecture-planner.md +163 -0
- package/agents/external-resolver.md +97 -0
- package/commands/feedback.md +37 -0
- package/commands/gator.md +48 -0
- package/commands/plan.md +28 -0
- package/commands/scan.md +20 -0
- package/dist/agent-output.d.ts +32 -0
- package/dist/agent-output.d.ts.map +1 -0
- package/dist/agent-output.js +238 -0
- package/dist/agent-output.js.map +1 -0
- package/dist/architecture-index.d.ts +190 -0
- package/dist/architecture-index.d.ts.map +1 -0
- package/dist/architecture-index.js +626 -0
- package/dist/architecture-index.js.map +1 -0
- package/dist/architecture-insights.d.ts +29 -0
- package/dist/architecture-insights.d.ts.map +1 -0
- package/dist/architecture-insights.js +213 -0
- package/dist/architecture-insights.js.map +1 -0
- package/dist/audit/index.d.ts +84 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +511 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/oracles/common.d.ts +37 -0
- package/dist/audit/oracles/common.d.ts.map +1 -0
- package/dist/audit/oracles/common.js +129 -0
- package/dist/audit/oracles/common.js.map +1 -0
- package/dist/audit/oracles/cron.d.ts +10 -0
- package/dist/audit/oracles/cron.d.ts.map +1 -0
- package/dist/audit/oracles/cron.js +35 -0
- package/dist/audit/oracles/cron.js.map +1 -0
- package/dist/audit/oracles/imports-scip.d.ts +25 -0
- package/dist/audit/oracles/imports-scip.d.ts.map +1 -0
- package/dist/audit/oracles/imports-scip.js +98 -0
- package/dist/audit/oracles/imports-scip.js.map +1 -0
- package/dist/audit/oracles/index.d.ts +30 -0
- package/dist/audit/oracles/index.d.ts.map +1 -0
- package/dist/audit/oracles/index.js +100 -0
- package/dist/audit/oracles/index.js.map +1 -0
- package/dist/audit/oracles/npm.d.ts +11 -0
- package/dist/audit/oracles/npm.d.ts.map +1 -0
- package/dist/audit/oracles/npm.js +37 -0
- package/dist/audit/oracles/npm.js.map +1 -0
- package/dist/audit/oracles/prisma.d.ts +42 -0
- package/dist/audit/oracles/prisma.d.ts.map +1 -0
- package/dist/audit/oracles/prisma.js +162 -0
- package/dist/audit/oracles/prisma.js.map +1 -0
- package/dist/audit/oracles/queue.d.ts +22 -0
- package/dist/audit/oracles/queue.d.ts.map +1 -0
- package/dist/audit/oracles/queue.js +114 -0
- package/dist/audit/oracles/queue.js.map +1 -0
- package/dist/audit/sampler.d.ts +166 -0
- package/dist/audit/sampler.d.ts.map +1 -0
- package/dist/audit/sampler.js +452 -0
- package/dist/audit/sampler.js.map +1 -0
- package/dist/audit/self-test.d.ts +74 -0
- package/dist/audit/self-test.d.ts.map +1 -0
- package/dist/audit/self-test.js +254 -0
- package/dist/audit/self-test.js.map +1 -0
- package/dist/audit/spc.d.ts +92 -0
- package/dist/audit/spc.d.ts.map +1 -0
- package/dist/audit/spc.js +225 -0
- package/dist/audit/spc.js.map +1 -0
- package/dist/audit/verifiers.d.ts +85 -0
- package/dist/audit/verifiers.d.ts.map +1 -0
- package/dist/audit/verifiers.js +456 -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/arch-diff.d.ts +15 -0
- package/dist/cli/commands/arch-diff.d.ts.map +1 -0
- package/dist/cli/commands/arch-diff.js +132 -0
- package/dist/cli/commands/arch-diff.js.map +1 -0
- package/dist/cli/commands/arch-index.d.ts +21 -0
- package/dist/cli/commands/arch-index.d.ts.map +1 -0
- package/dist/cli/commands/arch-index.js +96 -0
- package/dist/cli/commands/arch-index.js.map +1 -0
- package/dist/cli/commands/audit-report.d.ts +50 -0
- package/dist/cli/commands/audit-report.d.ts.map +1 -0
- package/dist/cli/commands/audit-report.js +315 -0
- package/dist/cli/commands/audit-report.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 +128 -0
- package/dist/cli/commands/connections.js.map +1 -0
- package/dist/cli/commands/coverage.d.ts +30 -0
- package/dist/cli/commands/coverage.d.ts.map +1 -0
- package/dist/cli/commands/coverage.js +111 -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 +82 -0
- package/dist/cli/commands/dead.js.map +1 -0
- package/dist/cli/commands/deep-map.d.ts +18 -0
- package/dist/cli/commands/deep-map.d.ts.map +1 -0
- package/dist/cli/commands/deep-map.js +582 -0
- package/dist/cli/commands/deep-map.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 +107 -0
- package/dist/cli/commands/diagram.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +67 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +446 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/explore.d.ts +3 -0
- package/dist/cli/commands/explore.d.ts.map +1 -0
- package/dist/cli/commands/explore.js +51 -0
- package/dist/cli/commands/explore.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 +151 -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 +107 -0
- package/dist/cli/commands/freshness.js.map +1 -0
- package/dist/cli/commands/helpers.d.ts +12 -0
- package/dist/cli/commands/helpers.d.ts.map +1 -0
- package/dist/cli/commands/helpers.js +75 -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 +175 -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 +289 -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 +81 -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 +124 -0
- package/dist/cli/commands/llm-map.js.map +1 -0
- package/dist/cli/commands/misc.d.ts +66 -0
- package/dist/cli/commands/misc.d.ts.map +1 -0
- package/dist/cli/commands/misc.js +630 -0
- package/dist/cli/commands/misc.js.map +1 -0
- package/dist/cli/commands/portfolio.d.ts +14 -0
- package/dist/cli/commands/portfolio.d.ts.map +1 -0
- package/dist/cli/commands/portfolio.js +147 -0
- package/dist/cli/commands/portfolio.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 +77 -0
- package/dist/cli/commands/prompts.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +9 -0
- package/dist/cli/commands/remote.d.ts.map +1 -0
- package/dist/cli/commands/remote.js +130 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/review.d.ts +3 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +46 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/cli/commands/rules.d.ts +36 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +133 -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 +232 -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 +129 -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 +354 -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 +57 -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 +126 -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 +70 -0
- package/dist/cli/commands/trace.js.map +1 -0
- package/dist/cli/exit-codes.d.ts +42 -0
- package/dist/cli/exit-codes.d.ts.map +1 -0
- package/dist/cli/exit-codes.js +41 -0
- package/dist/cli/exit-codes.js.map +1 -0
- package/dist/cli/index.js +149 -828
- package/dist/cli/index.js.map +1 -1
- package/dist/component-identity.d.ts +30 -0
- package/dist/component-identity.d.ts.map +1 -0
- package/dist/component-identity.js +61 -0
- package/dist/component-identity.js.map +1 -0
- package/dist/config.d.ts +27 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +129 -19
- 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 +200 -0
- package/dist/coverage.js.map +1 -0
- package/dist/dashboard-session.d.ts +91 -0
- package/dist/dashboard-session.d.ts.map +1 -0
- package/dist/dashboard-session.js +136 -0
- package/dist/dashboard-session.js.map +1 -0
- package/dist/deep-map/escalate.d.ts +68 -0
- package/dist/deep-map/escalate.d.ts.map +1 -0
- package/dist/deep-map/escalate.js +289 -0
- package/dist/deep-map/escalate.js.map +1 -0
- package/dist/deep-map/filter.d.ts +72 -0
- package/dist/deep-map/filter.d.ts.map +1 -0
- package/dist/deep-map/filter.js +139 -0
- package/dist/deep-map/filter.js.map +1 -0
- package/dist/deep-map/ingest.d.ts +60 -0
- package/dist/deep-map/ingest.d.ts.map +1 -0
- package/dist/deep-map/ingest.js +319 -0
- package/dist/deep-map/ingest.js.map +1 -0
- package/dist/deep-map/load.d.ts +44 -0
- package/dist/deep-map/load.d.ts.map +1 -0
- package/dist/deep-map/load.js +111 -0
- package/dist/deep-map/load.js.map +1 -0
- package/dist/deep-map/packets.d.ts +52 -0
- package/dist/deep-map/packets.d.ts.map +1 -0
- package/dist/deep-map/packets.js +441 -0
- package/dist/deep-map/packets.js.map +1 -0
- package/dist/deep-map/partition.d.ts +81 -0
- package/dist/deep-map/partition.d.ts.map +1 -0
- package/dist/deep-map/partition.js +253 -0
- package/dist/deep-map/partition.js.map +1 -0
- package/dist/deep-map/report.d.ts +17 -0
- package/dist/deep-map/report.d.ts.map +1 -0
- package/dist/deep-map/report.js +67 -0
- package/dist/deep-map/report.js.map +1 -0
- package/dist/deep-map/store.d.ts +58 -0
- package/dist/deep-map/store.d.ts.map +1 -0
- package/dist/deep-map/store.js +238 -0
- package/dist/deep-map/store.js.map +1 -0
- package/dist/deep-map/types.d.ts +321 -0
- package/dist/deep-map/types.d.ts.map +1 -0
- package/dist/deep-map/types.js +63 -0
- package/dist/deep-map/types.js.map +1 -0
- package/dist/diagram.d.ts.map +1 -1
- package/dist/diagram.js +59 -1
- package/dist/diagram.js.map +1 -1
- package/dist/diff.d.ts +112 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +551 -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 +224 -0
- package/dist/enrich/external-resolver.js.map +1 -0
- package/dist/enrich/fetchers.d.ts +36 -0
- package/dist/enrich/fetchers.d.ts.map +1 -0
- package/dist/enrich/fetchers.js +111 -0
- package/dist/enrich/fetchers.js.map +1 -0
- package/dist/entry-points.d.ts +107 -0
- package/dist/entry-points.d.ts.map +1 -0
- package/dist/entry-points.js +394 -0
- package/dist/entry-points.js.map +1 -0
- package/dist/explore-report.d.ts +70 -0
- package/dist/explore-report.d.ts.map +1 -0
- package/dist/explore-report.js +141 -0
- package/dist/explore-report.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 +35 -0
- package/dist/freshness/dirty-ledger.d.ts.map +1 -0
- package/dist/freshness/dirty-ledger.js +310 -0
- package/dist/freshness/dirty-ledger.js.map +1 -0
- package/dist/freshness/drainer.d.ts +63 -0
- package/dist/freshness/drainer.d.ts.map +1 -0
- package/dist/freshness/drainer.js +199 -0
- package/dist/freshness/drainer.js.map +1 -0
- package/dist/freshness/paths.d.ts +13 -0
- package/dist/freshness/paths.d.ts.map +1 -0
- package/dist/freshness/paths.js +35 -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 +8 -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-aware/canonical.d.ts +41 -0
- package/dist/git-aware/canonical.d.ts.map +1 -0
- package/dist/git-aware/canonical.js +111 -0
- package/dist/git-aware/canonical.js.map +1 -0
- package/dist/git-aware/paths.d.ts +7 -0
- package/dist/git-aware/paths.d.ts.map +1 -0
- package/dist/git-aware/paths.js +34 -0
- package/dist/git-aware/paths.js.map +1 -0
- package/dist/git-aware/premerge-diff.d.ts +32 -0
- package/dist/git-aware/premerge-diff.d.ts.map +1 -0
- package/dist/git-aware/premerge-diff.js +87 -0
- package/dist/git-aware/premerge-diff.js.map +1 -0
- package/dist/git-aware/refs.d.ts +32 -0
- package/dist/git-aware/refs.d.ts.map +1 -0
- package/dist/git-aware/refs.js +129 -0
- package/dist/git-aware/refs.js.map +1 -0
- package/dist/git.d.ts +26 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +47 -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 +159 -0
- package/dist/gitignore-safety.js.map +1 -0
- package/dist/home-config.d.ts +60 -0
- package/dist/home-config.d.ts.map +1 -0
- package/dist/home-config.js +170 -0
- package/dist/home-config.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 +41 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -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 +46 -0
- package/dist/llm-dedup.d.ts.map +1 -0
- package/dist/llm-dedup.js +382 -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 +152 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +305 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +853 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/memory/health.d.ts +130 -0
- package/dist/memory/health.d.ts.map +1 -0
- package/dist/memory/health.js +366 -0
- package/dist/memory/health.js.map +1 -0
- package/dist/memory/mirror.d.ts +84 -0
- package/dist/memory/mirror.d.ts.map +1 -0
- package/dist/memory/mirror.js +377 -0
- package/dist/memory/mirror.js.map +1 -0
- package/dist/memory/store.d.ts +305 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +820 -0
- package/dist/memory/store.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/portfolio/cross-repo.d.ts +13 -0
- package/dist/portfolio/cross-repo.d.ts.map +1 -0
- package/dist/portfolio/cross-repo.js +169 -0
- package/dist/portfolio/cross-repo.js.map +1 -0
- package/dist/portfolio/discover.d.ts +11 -0
- package/dist/portfolio/discover.d.ts.map +1 -0
- package/dist/portfolio/discover.js +77 -0
- package/dist/portfolio/discover.js.map +1 -0
- package/dist/portfolio/scan.d.ts +86 -0
- package/dist/portfolio/scan.d.ts.map +1 -0
- package/dist/portfolio/scan.js +185 -0
- package/dist/portfolio/scan.js.map +1 -0
- package/dist/portfolio/types.d.ts +109 -0
- package/dist/portfolio/types.d.ts.map +1 -0
- package/dist/portfolio/types.js +10 -0
- package/dist/portfolio/types.js.map +1 -0
- package/dist/projects.d.ts +162 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +579 -0
- package/dist/projects.js.map +1 -0
- package/dist/registry-journal.d.ts +199 -0
- package/dist/registry-journal.d.ts.map +1 -0
- package/dist/registry-journal.js +489 -0
- package/dist/registry-journal.js.map +1 -0
- package/dist/registry-lock.d.ts +113 -0
- package/dist/registry-lock.d.ts.map +1 -0
- package/dist/registry-lock.js +281 -0
- package/dist/registry-lock.js.map +1 -0
- package/dist/remote/clone.d.ts +46 -0
- package/dist/remote/clone.d.ts.map +1 -0
- package/dist/remote/clone.js +154 -0
- package/dist/remote/clone.js.map +1 -0
- package/dist/remote/github-url.d.ts +33 -0
- package/dist/remote/github-url.d.ts.map +1 -0
- package/dist/remote/github-url.js +109 -0
- package/dist/remote/github-url.js.map +1 -0
- package/dist/remote/scan-remote.d.ts +54 -0
- package/dist/remote/scan-remote.d.ts.map +1 -0
- package/dist/remote/scan-remote.js +114 -0
- package/dist/remote/scan-remote.js.map +1 -0
- package/dist/resolve.d.ts +25 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +149 -0
- package/dist/resolve.js.map +1 -0
- package/dist/review-report.d.ts +50 -0
- package/dist/review-report.d.ts.map +1 -0
- package/dist/review-report.js +123 -0
- package/dist/review-report.js.map +1 -0
- package/dist/rules.d.ts +135 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +640 -0
- package/dist/rules.js.map +1 -0
- package/dist/sandbox.d.ts +38 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +96 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/scan-lock.d.ts +73 -0
- package/dist/scan-lock.d.ts.map +1 -0
- package/dist/scan-lock.js +555 -0
- package/dist/scan-lock.js.map +1 -0
- package/dist/scanner.d.ts +212 -18
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +2493 -244
- 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 +37 -0
- package/dist/scanners/connections/import-scanner.d.ts.map +1 -0
- package/dist/scanners/connections/import-scanner.js +756 -0
- package/dist/scanners/connections/import-scanner.js.map +1 -0
- package/dist/scanners/connections/llm-call-tracer.d.ts +2 -2
- package/dist/scanners/connections/llm-call-tracer.d.ts.map +1 -1
- package/dist/scanners/connections/llm-call-tracer.js +280 -20
- 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/python-imports.d.ts +47 -0
- package/dist/scanners/connections/python-imports.d.ts.map +1 -0
- package/dist/scanners/connections/python-imports.js +309 -0
- package/dist/scanners/connections/python-imports.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/content/markdown-scanner.d.ts +15 -0
- package/dist/scanners/content/markdown-scanner.d.ts.map +1 -0
- package/dist/scanners/content/markdown-scanner.js +347 -0
- package/dist/scanners/content/markdown-scanner.js.map +1 -0
- 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 +23 -0
- package/dist/scanners/infrastructure/prisma-parser.d.ts.map +1 -0
- package/dist/scanners/infrastructure/prisma-parser.js +200 -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/cargo.d.ts +14 -0
- package/dist/scanners/packages/cargo.d.ts.map +1 -0
- package/dist/scanners/packages/cargo.js +443 -0
- package/dist/scanners/packages/cargo.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 +43 -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/rust/code-scanner.d.ts +17 -0
- package/dist/scanners/rust/code-scanner.d.ts.map +1 -0
- package/dist/scanners/rust/code-scanner.js +477 -0
- package/dist/scanners/rust/code-scanner.js.map +1 -0
- package/dist/scanners/scan-limits.d.ts +34 -0
- package/dist/scanners/scan-limits.d.ts.map +1 -0
- package/dist/scanners/scan-limits.js +107 -0
- package/dist/scanners/scan-limits.js.map +1 -0
- package/dist/scanners/swift/code-scanner.d.ts +16 -1
- package/dist/scanners/swift/code-scanner.d.ts.map +1 -1
- package/dist/scanners/swift/code-scanner.js +745 -40
- 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 +624 -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 +246 -0
- package/dist/scanners/xcode/storyboard-scanner.js.map +1 -0
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +16 -64
- package/dist/setup.js.map +1 -1
- 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 +244 -9
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1022 -87
- 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 +39 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +353 -0
- package/dist/trace.js.map +1 -0
- package/dist/types.d.ts +598 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +53 -0
- package/dist/types.js.map +1 -1
- package/dist/vendor-paths.d.ts +30 -0
- package/dist/vendor-paths.d.ts.map +1 -0
- package/dist/vendor-paths.js +67 -0
- package/dist/vendor-paths.js.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +8 -0
- package/dist/version.js.map +1 -0
- 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/mcp-optin/README.md +67 -0
- package/mcp-optin/claude.mcp.json +8 -0
- package/mcp-optin/codex.mcp.json +9 -0
- package/package.json +47 -25
- package/scripts/install-codex-plugin.sh +756 -0
- package/scripts/install-plugin.sh +473 -64
- package/scripts/promote-lessons.py +385 -0
- package/skills/architecture-export/SKILL.md +83 -0
- package/skills/architecture-scan/SKILL.md +69 -0
- package/skills/code-review/SKILL.md +375 -0
- package/skills/impact-analysis/SKILL.md +78 -0
- package/skills/infrastructure-scanning/SKILL.md +44 -0
- package/skills/navgator-setup/SKILL.md +205 -0
- package/web/runtime/.next/BUILD_ID +1 -0
- package/web/runtime/.next/app-path-routes-manifest.json +18 -0
- package/web/runtime/.next/build-manifest.json +20 -0
- package/web/runtime/.next/prerender-manifest.json +85 -0
- package/web/runtime/.next/required-server-files.json +334 -0
- package/web/runtime/.next/routes-manifest.json +156 -0
- package/web/runtime/.next/server/app/_global-error/page/build-manifest.json +16 -0
- package/web/runtime/.next/server/app/_global-error/page.js +9 -0
- package/web/runtime/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/web/runtime/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/_global-error.html +1 -0
- package/web/runtime/.next/server/app/_global-error.rsc +14 -0
- package/web/runtime/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/web/runtime/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/web/runtime/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/web/runtime/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/web/runtime/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/web/runtime/.next/server/app/_not-found/page/build-manifest.json +16 -0
- package/web/runtime/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/web/runtime/.next/server/app/_not-found/page.js +12 -0
- package/web/runtime/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/web/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/_not-found.html +1 -0
- package/web/runtime/.next/server/app/_not-found.rsc +19 -0
- package/web/runtime/.next/server/app/_not-found.segments/_full.segment.rsc +19 -0
- package/web/runtime/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/web/runtime/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
- package/web/runtime/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/web/runtime/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/web/runtime/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/web/runtime/.next/server/app/api/components/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/components/route.js +7 -0
- package/web/runtime/.next/server/app/api/components/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/components/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/connections/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/connections/route.js +7 -0
- package/web/runtime/.next/server/app/api/connections/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/connections/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/coverage/route/app-paths-manifest.json +3 -0
- package/web/runtime/.next/server/app/api/coverage/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/coverage/route.js +7 -0
- package/web/runtime/.next/server/app/api/coverage/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/coverage/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/graph/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/graph/route.js +7 -0
- package/web/runtime/.next/server/app/api/graph/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/graph/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/projects/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/projects/route.js +7 -0
- package/web/runtime/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/projects/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/prompts/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/prompts/route.js +8 -0
- package/web/runtime/.next/server/app/api/prompts/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/prompts/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/registry-health/route/app-paths-manifest.json +3 -0
- package/web/runtime/.next/server/app/api/registry-health/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/registry-health/route.js +6 -0
- package/web/runtime/.next/server/app/api/registry-health/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/registry-health/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/rules/route/app-paths-manifest.json +3 -0
- package/web/runtime/.next/server/app/api/rules/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/rules/route.js +7 -0
- package/web/runtime/.next/server/app/api/rules/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/rules/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/scan/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/scan/route.js +7 -0
- package/web/runtime/.next/server/app/api/scan/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/scan/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/settings/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/web/runtime/.next/server/app/api/settings/route.js +7 -0
- package/web/runtime/.next/server/app/api/settings/route.js.map +5 -0
- package/web/runtime/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/settings/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/status/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/status/route/server-reference-manifest.json +4 -0
- package/web/runtime/.next/server/app/api/status/route.js +7 -0
- package/web/runtime/.next/server/app/api/status/route.js.map +5 -0
- package/web/runtime/.next/server/app/api/status/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/status/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/subgraph/route/app-paths-manifest.json +3 -0
- package/web/runtime/.next/server/app/api/subgraph/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/subgraph/route/server-reference-manifest.json +4 -0
- package/web/runtime/.next/server/app/api/subgraph/route.js +7 -0
- package/web/runtime/.next/server/app/api/subgraph/route.js.map +5 -0
- package/web/runtime/.next/server/app/api/subgraph/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/subgraph/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/api/trace/route/app-paths-manifest.json +3 -0
- package/web/runtime/.next/server/app/api/trace/route/build-manifest.json +9 -0
- package/web/runtime/.next/server/app/api/trace/route/server-reference-manifest.json +4 -0
- package/web/runtime/.next/server/app/api/trace/route.js +7 -0
- package/web/runtime/.next/server/app/api/trace/route.js.map +5 -0
- package/web/runtime/.next/server/app/api/trace/route.js.nft.json +1 -0
- package/web/runtime/.next/server/app/api/trace/route_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app/index.html +1 -0
- package/web/runtime/.next/server/app/index.rsc +23 -0
- package/web/runtime/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/web/runtime/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/web/runtime/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/web/runtime/.next/server/app/index.segments/_index.segment.rsc +8 -0
- package/web/runtime/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/web/runtime/.next/server/app/page/build-manifest.json +16 -0
- package/web/runtime/.next/server/app/page/next-font-manifest.json +11 -0
- package/web/runtime/.next/server/app/page/server-reference-manifest.json +4 -0
- package/web/runtime/.next/server/app/page.js +13 -0
- package/web/runtime/.next/server/app/page.js.map +5 -0
- package/web/runtime/.next/server/app/page.js.nft.json +1 -0
- package/web/runtime/.next/server/app/page_client-reference-manifest.js +3 -0
- package/web/runtime/.next/server/app-paths-manifest.json +18 -0
- package/web/runtime/.next/server/chunks/[externals]__05l4bet._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__056mgo_._.js +20 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0_k1tzx._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0d-ts7d._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0fo8n2u._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0i-k0ag._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0i3hbar._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0uvvtqn._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__0xuaoik._.js +15 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__10psfhb._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__12eq1it._.js +5 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__14j842l._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__1a_7qvz._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__1k5hws0._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__1q2pd1s._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__1rcdz8m._.js +3 -0
- package/web/runtime/.next/server/chunks/[root-of-the-server]__1vxkow2._.js +3 -0
- package/web/runtime/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_components_route_actions_1sc-nuu.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_connections_route_actions_20wls3v.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_coverage_route_actions_16f5ldo.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_graph_route_actions_0jb26mw.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_projects_route_actions_0h5ne2f.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_prompts_route_actions_0pc_dbq.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_registry-health_route_actions_13v9930.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_rules_route_actions_1qjfstf.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_scan_route_actions_0_k8ox1.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_settings_route_actions_1bpm9ac.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_status_route_actions_1qgdeto.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_subgraph_route_actions_1zy-3xw.js +3 -0
- package/web/runtime/.next/server/chunks/_next-internal_server_app_api_trace_route_actions_09yhvhh.js +3 -0
- package/web/runtime/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1cdz2zc.js +3 -0
- package/web/runtime/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1h09hx7.js +19 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__03o8wzg._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__0dmjl_-._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__0ln09ua._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__16duv6v._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js +33 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__1vhgpuw._.js +33 -0
- package/web/runtime/.next/server/chunks/ssr/[root-of-the-server]__1y5s__6._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/web/runtime/.next/server/chunks/ssr/_1cfmrz7._.js +25 -0
- package/web/runtime/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_0h91jdk._.js +33 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_1ztp13a._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_18tu5cb._.js +6 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_1_ziy9k._.js +21 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12cvwrh.js +4 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js +4 -0
- package/web/runtime/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1nazowj.js +4 -0
- package/web/runtime/.next/server/functions-config-manifest.json +14 -0
- package/web/runtime/.next/server/middleware-build-manifest.js +20 -0
- package/web/runtime/.next/server/middleware.js +5 -0
- package/web/runtime/.next/server/next-font-manifest.js +1 -0
- package/web/runtime/.next/server/next-font-manifest.json +15 -0
- package/web/runtime/.next/server/pages/404.html +1 -0
- package/web/runtime/.next/server/pages/500.html +1 -0
- package/web/runtime/.next/server/prefetch-hints.json +1 -0
- package/web/runtime/.next/server/server-reference-manifest.js +1 -0
- package/web/runtime/.next/server/server-reference-manifest.json +5 -0
- package/web/runtime/.next/static/chunks/0lh3b_825aiwf.css +1 -0
- package/web/runtime/.next/static/chunks/16k9xgpx_hr16.js +23 -0
- package/web/runtime/.next/static/chunks/1d4h-sglyo8ft.js +1 -0
- package/web/runtime/.next/static/chunks/1htrq_0kw706i.js +5 -0
- package/web/runtime/.next/static/chunks/1i1m3-f_1qa77.js +1 -0
- package/web/runtime/.next/static/chunks/1upe53-127sm4.js +1 -0
- package/web/runtime/.next/static/chunks/25c-48-vms73p.css +2 -0
- package/web/runtime/.next/static/chunks/2nwqoerny79-z.js +31 -0
- package/web/runtime/.next/static/chunks/2q7rj7sdyymkj.js +1 -0
- package/web/runtime/.next/static/chunks/turbopack-1zsbqn2yjvkmq.js +1 -0
- package/web/runtime/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/web/runtime/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/web/runtime/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/web/runtime/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/web/runtime/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/web/runtime/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/web/runtime/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/web/runtime/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/web/runtime/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/web/runtime/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/web/runtime/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/web/runtime/.next/static/t3UvrbzeeDimLG5J5Co_p/_clientMiddlewareManifest.js +6 -0
- package/web/runtime/packages/@next/env/dist/index.js +1 -0
- package/web/runtime/packages/@next/env/package.json +35 -0
- package/web/runtime/packages/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
- package/web/runtime/packages/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
- package/web/runtime/packages/@swc/helpers/package.json +471 -0
- package/web/runtime/packages/client-only/index.js +0 -0
- package/web/runtime/packages/client-only/package.json +19 -0
- package/web/runtime/packages/next/dist/build/adapter/setup-node-env.external.js +15 -0
- package/web/runtime/packages/next/dist/build/define-env.js +255 -0
- package/web/runtime/packages/next/dist/build/duration-to-string.js +99 -0
- package/web/runtime/packages/next/dist/build/get-supported-browsers.js +38 -0
- package/web/runtime/packages/next/dist/build/next-config-ts/require-hook.js +85 -0
- package/web/runtime/packages/next/dist/build/next-config-ts/transpile-config.js +140 -0
- package/web/runtime/packages/next/dist/build/output/format.js +84 -0
- package/web/runtime/packages/next/dist/build/output/log.js +135 -0
- package/web/runtime/packages/next/dist/build/segment-config/app/app-segment-config.js +162 -0
- package/web/runtime/packages/next/dist/build/segment-config/app/app-segments.js +137 -0
- package/web/runtime/packages/next/dist/build/segment-config/app/collect-root-param-keys.js +52 -0
- package/web/runtime/packages/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
- package/web/runtime/packages/next/dist/build/static-paths/app.js +736 -0
- package/web/runtime/packages/next/dist/build/static-paths/pages.js +169 -0
- package/web/runtime/packages/next/dist/build/static-paths/utils.js +119 -0
- package/web/runtime/packages/next/dist/build/swc/helpers.js +15 -0
- package/web/runtime/packages/next/dist/build/swc/index.js +1348 -0
- package/web/runtime/packages/next/dist/build/swc/install-bindings.js +30 -0
- package/web/runtime/packages/next/dist/build/swc/jest-transformer.js +76 -0
- package/web/runtime/packages/next/dist/build/swc/loaderWorkerPool.js +40 -0
- package/web/runtime/packages/next/dist/build/swc/options.js +403 -0
- package/web/runtime/packages/next/dist/build/swc/types.js +6 -0
- package/web/runtime/packages/next/dist/build/utils.js +1216 -0
- package/web/runtime/packages/next/dist/cli/next-test.js +171 -0
- package/web/runtime/packages/next/dist/client/add-base-path.js +24 -0
- package/web/runtime/packages/next/dist/client/app-call-server.js +34 -0
- package/web/runtime/packages/next/dist/client/app-find-source-map-url.js +39 -0
- package/web/runtime/packages/next/dist/client/assign-location.js +29 -0
- package/web/runtime/packages/next/dist/client/components/app-router-announcer.js +78 -0
- package/web/runtime/packages/next/dist/client/components/app-router-headers.js +138 -0
- package/web/runtime/packages/next/dist/client/components/app-router-instance.js +397 -0
- package/web/runtime/packages/next/dist/client/components/app-router-utils.js +62 -0
- package/web/runtime/packages/next/dist/client/components/app-router.js +514 -0
- package/web/runtime/packages/next/dist/client/components/builtin/default.js +35 -0
- package/web/runtime/packages/next/dist/client/components/builtin/error-styles.js +165 -0
- package/web/runtime/packages/next/dist/client/components/builtin/global-error.js +100 -0
- package/web/runtime/packages/next/dist/client/components/dev-root-http-access-fallback-boundary.js +52 -0
- package/web/runtime/packages/next/dist/client/components/error-boundary.js +144 -0
- package/web/runtime/packages/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
- package/web/runtime/packages/next/dist/client/components/errors/root-error-boundary.js +41 -0
- package/web/runtime/packages/next/dist/client/components/forbidden.js +48 -0
- package/web/runtime/packages/next/dist/client/components/handle-isr-error.js +30 -0
- package/web/runtime/packages/next/dist/client/components/hooks-server-context.js +42 -0
- package/web/runtime/packages/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
- package/web/runtime/packages/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
- package/web/runtime/packages/next/dist/client/components/is-next-router-error.js +23 -0
- package/web/runtime/packages/next/dist/client/components/links.js +299 -0
- package/web/runtime/packages/next/dist/client/components/match-segments.js +32 -0
- package/web/runtime/packages/next/dist/client/components/nav-failure-handler.js +61 -0
- package/web/runtime/packages/next/dist/client/components/navigation-devtools.js +126 -0
- package/web/runtime/packages/next/dist/client/components/navigation-untracked.js +67 -0
- package/web/runtime/packages/next/dist/client/components/navigation.js +225 -0
- package/web/runtime/packages/next/dist/client/components/navigation.react-server.js +75 -0
- package/web/runtime/packages/next/dist/client/components/not-found.js +42 -0
- package/web/runtime/packages/next/dist/client/components/readonly-url-search-params.js +41 -0
- package/web/runtime/packages/next/dist/client/components/redirect-boundary.js +107 -0
- package/web/runtime/packages/next/dist/client/components/redirect-error.js +43 -0
- package/web/runtime/packages/next/dist/client/components/redirect-status-code.js +24 -0
- package/web/runtime/packages/next/dist/client/components/redirect.js +91 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/compute-changed-path.js +201 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/create-initial-router-state.js +153 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/create-router-cache-key.js +32 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/fetch-server-response.js +457 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +59 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/ppr-navigations.js +1341 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +63 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +23 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +83 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/restore-reducer.js +62 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +320 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +58 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/router-reducer.js +66 -0
- package/web/runtime/packages/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +66 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/bfcache.js +128 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/cache-key.js +28 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/cache-map.js +305 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/cache.js +1933 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/lru.js +152 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/navigation-testing-lock.js +194 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/navigation.js +597 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/optimistic-routes.js +543 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/prefetch.js +31 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/scheduler.js +1249 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/types.js +69 -0
- package/web/runtime/packages/next/dist/client/components/segment-cache/vary-path.js +278 -0
- package/web/runtime/packages/next/dist/client/components/static-generation-bailout.js +42 -0
- package/web/runtime/packages/next/dist/client/components/unauthorized.js +49 -0
- package/web/runtime/packages/next/dist/client/components/unrecognized-action-error.js +39 -0
- package/web/runtime/packages/next/dist/client/components/unresolved-thenable.js +23 -0
- package/web/runtime/packages/next/dist/client/components/unstable-rethrow.browser.js +28 -0
- package/web/runtime/packages/next/dist/client/components/unstable-rethrow.js +25 -0
- package/web/runtime/packages/next/dist/client/components/unstable-rethrow.server.js +32 -0
- package/web/runtime/packages/next/dist/client/components/use-action-queue.js +148 -0
- package/web/runtime/packages/next/dist/client/dev/debug-channel.js +172 -0
- package/web/runtime/packages/next/dist/client/flight-data-helpers.js +232 -0
- package/web/runtime/packages/next/dist/client/has-base-path.js +23 -0
- package/web/runtime/packages/next/dist/client/lib/console.js +177 -0
- package/web/runtime/packages/next/dist/client/lib/javascript-url.js +32 -0
- package/web/runtime/packages/next/dist/client/navigation-build-id.js +53 -0
- package/web/runtime/packages/next/dist/client/normalize-trailing-slash.js +36 -0
- package/web/runtime/packages/next/dist/client/remove-base-path.js +32 -0
- package/web/runtime/packages/next/dist/client/route-params.js +247 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/cookies/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/ponyfill/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@hapi/accept/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@hapi/accept/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@napi-rs/triples/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@napi-rs/triples/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/@opentelemetry/api/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/@opentelemetry/api/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/async-retry/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/async-retry/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/async-sema/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/async-sema/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/busboy/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/busboy/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/bytes/index.js +8 -0
- package/web/runtime/packages/next/dist/compiled/bytes/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/ci-info/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/ci-info/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/commander/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/commander/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/comment-json/index.js +7 -0
- package/web/runtime/packages/next/dist/compiled/comment-json/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/compression/index.js +58 -0
- package/web/runtime/packages/next/dist/compiled/compression/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/conf/index.js +15 -0
- package/web/runtime/packages/next/dist/compiled/conf/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/content-disposition/index.js +6 -0
- package/web/runtime/packages/next/dist/compiled/content-disposition/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/cookie/index.js +7 -0
- package/web/runtime/packages/next/dist/compiled/cookie/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/cross-spawn/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/cross-spawn/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/debug/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/debug/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/edge-runtime/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/edge-runtime/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/find-up/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/find-up/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/fresh/index.js +8 -0
- package/web/runtime/packages/next/dist/compiled/fresh/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/http-proxy/index.js +34 -0
- package/web/runtime/packages/next/dist/compiled/http-proxy/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/image-detector/detector.js +1 -0
- package/web/runtime/packages/next/dist/compiled/image-size/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/image-size/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
- package/web/runtime/packages/next/dist/compiled/ipaddr.js/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/is-animated/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/is-animated/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/is-docker/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/is-docker/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/is-wsl/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/is-wsl/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/jsonwebtoken/index.js +11 -0
- package/web/runtime/packages/next/dist/compiled/jsonwebtoken/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/nanoid/index.cjs +1 -0
- package/web/runtime/packages/next/dist/compiled/nanoid/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +55 -0
- package/web/runtime/packages/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +55 -0
- package/web/runtime/packages/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +6 -0
- package/web/runtime/packages/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
- package/web/runtime/packages/next/dist/compiled/p-limit/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/p-limit/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/p-queue/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/p-queue/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/path-browserify/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/path-browserify/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/path-to-regexp/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/path-to-regexp/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/picomatch/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/picomatch/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
- package/web/runtime/packages/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
- package/web/runtime/packages/next/dist/compiled/react-is/index.js +7 -0
- package/web/runtime/packages/next/dist/compiled/react-is/package.json +26 -0
- package/web/runtime/packages/next/dist/compiled/regenerator-runtime/package.json +19 -0
- package/web/runtime/packages/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
- package/web/runtime/packages/next/dist/compiled/semver/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/semver/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/send/index.js +70 -0
- package/web/runtime/packages/next/dist/compiled/send/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/source-map/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/source-map/source-map.js +1 -0
- package/web/runtime/packages/next/dist/compiled/stacktrace-parser/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
- package/web/runtime/packages/next/dist/compiled/string-hash/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/string-hash/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/strip-ansi/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/strip-ansi/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/superstruct/index.cjs +1 -0
- package/web/runtime/packages/next/dist/compiled/superstruct/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/tar/index.min.js +1 -0
- package/web/runtime/packages/next/dist/compiled/tar/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/text-table/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/text-table/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/watchpack/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/watchpack/watchpack.js +1 -0
- package/web/runtime/packages/next/dist/compiled/ws/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/ws/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/zod/index.cjs +1 -0
- package/web/runtime/packages/next/dist/compiled/zod/package.json +1 -0
- package/web/runtime/packages/next/dist/compiled/zod-validation-error/index.js +1 -0
- package/web/runtime/packages/next/dist/compiled/zod-validation-error/package.json +1 -0
- package/web/runtime/packages/next/dist/experimental/testmode/context.js +57 -0
- package/web/runtime/packages/next/dist/experimental/testmode/fetch.js +142 -0
- package/web/runtime/packages/next/dist/experimental/testmode/httpget.js +26 -0
- package/web/runtime/packages/next/dist/experimental/testmode/server-edge.js +32 -0
- package/web/runtime/packages/next/dist/experimental/testmode/server.js +62 -0
- package/web/runtime/packages/next/dist/export/helpers/create-incremental-cache.js +61 -0
- package/web/runtime/packages/next/dist/lib/batcher.js +65 -0
- package/web/runtime/packages/next/dist/lib/build-custom-route.js +46 -0
- package/web/runtime/packages/next/dist/lib/bundler.js +97 -0
- package/web/runtime/packages/next/dist/lib/client-and-server-references.js +54 -0
- package/web/runtime/packages/next/dist/lib/coalesced-function.js +39 -0
- package/web/runtime/packages/next/dist/lib/compile-error.js +14 -0
- package/web/runtime/packages/next/dist/lib/constants.js +420 -0
- package/web/runtime/packages/next/dist/lib/create-client-router-filter.js +67 -0
- package/web/runtime/packages/next/dist/lib/default-transpiled-packages.json +1 -0
- package/web/runtime/packages/next/dist/lib/detached-promise.js +32 -0
- package/web/runtime/packages/next/dist/lib/detect-typo.js +51 -0
- package/web/runtime/packages/next/dist/lib/download-swc.js +183 -0
- package/web/runtime/packages/next/dist/lib/error-telemetry-utils.js +42 -0
- package/web/runtime/packages/next/dist/lib/fallback.js +100 -0
- package/web/runtime/packages/next/dist/lib/fatal-error.js +14 -0
- package/web/runtime/packages/next/dist/lib/file-exists.js +53 -0
- package/web/runtime/packages/next/dist/lib/find-config.js +102 -0
- package/web/runtime/packages/next/dist/lib/find-pages-dir.js +65 -0
- package/web/runtime/packages/next/dist/lib/find-root.js +126 -0
- package/web/runtime/packages/next/dist/lib/format-cli-help-output.js +84 -0
- package/web/runtime/packages/next/dist/lib/format-dynamic-import-path.js +24 -0
- package/web/runtime/packages/next/dist/lib/format-server-error.js +75 -0
- package/web/runtime/packages/next/dist/lib/framework/boundary-components.js +62 -0
- package/web/runtime/packages/next/dist/lib/framework/boundary-constants.js +36 -0
- package/web/runtime/packages/next/dist/lib/fs/rename.js +87 -0
- package/web/runtime/packages/next/dist/lib/fs/write-atomic.js +28 -0
- package/web/runtime/packages/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
- package/web/runtime/packages/next/dist/lib/get-files-in-dir.js +33 -0
- package/web/runtime/packages/next/dist/lib/get-network-host.js +44 -0
- package/web/runtime/packages/next/dist/lib/get-package-version.js +118 -0
- package/web/runtime/packages/next/dist/lib/get-project-dir.js +51 -0
- package/web/runtime/packages/next/dist/lib/has-necessary-dependencies.js +49 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-cache-directory.js +66 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-npx-command.js +29 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-online.js +50 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-pkg-manager.js +63 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-registry.js +45 -0
- package/web/runtime/packages/next/dist/lib/helpers/get-reserved-port.js +116 -0
- package/web/runtime/packages/next/dist/lib/helpers/install.js +83 -0
- package/web/runtime/packages/next/dist/lib/import-next-warning.js +50 -0
- package/web/runtime/packages/next/dist/lib/inline-static-env.js +112 -0
- package/web/runtime/packages/next/dist/lib/install-dependencies.js +40 -0
- package/web/runtime/packages/next/dist/lib/interop-default.js +16 -0
- package/web/runtime/packages/next/dist/lib/is-api-route.js +15 -0
- package/web/runtime/packages/next/dist/lib/is-app-page-route.js +15 -0
- package/web/runtime/packages/next/dist/lib/is-app-route-route.js +15 -0
- package/web/runtime/packages/next/dist/lib/is-edge-runtime.js +16 -0
- package/web/runtime/packages/next/dist/lib/is-error.js +78 -0
- package/web/runtime/packages/next/dist/lib/is-interception-route-rewrite.js +18 -0
- package/web/runtime/packages/next/dist/lib/is-internal-component.js +36 -0
- package/web/runtime/packages/next/dist/lib/is-serializable-props.js +106 -0
- package/web/runtime/packages/next/dist/lib/known-edge-safe-packages.json +1 -0
- package/web/runtime/packages/next/dist/lib/load-custom-routes.js +594 -0
- package/web/runtime/packages/next/dist/lib/memory/gc-observer.js +53 -0
- package/web/runtime/packages/next/dist/lib/memory/shutdown.js +29 -0
- package/web/runtime/packages/next/dist/lib/memory/startup.js +47 -0
- package/web/runtime/packages/next/dist/lib/memory/trace.js +109 -0
- package/web/runtime/packages/next/dist/lib/metadata/constants.js +40 -0
- package/web/runtime/packages/next/dist/lib/metadata/default-metadata.js +82 -0
- package/web/runtime/packages/next/dist/lib/metadata/generate/icon-mark.js +22 -0
- package/web/runtime/packages/next/dist/lib/metadata/generate/utils.js +52 -0
- package/web/runtime/packages/next/dist/lib/metadata/get-metadata-route.js +123 -0
- package/web/runtime/packages/next/dist/lib/metadata/is-metadata-route.js +221 -0
- package/web/runtime/packages/next/dist/lib/metadata/metadata-context.js +18 -0
- package/web/runtime/packages/next/dist/lib/metadata/metadata.js +1686 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolve-metadata.js +884 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
- package/web/runtime/packages/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/extra-types.js +9 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/icons.js +6 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/manifest-types.js +6 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/metadata-interface.js +18 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/metadata-types.js +10 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/opengraph-types.js +6 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/resolvers.js +6 -0
- package/web/runtime/packages/next/dist/lib/metadata/types/twitter-types.js +7 -0
- package/web/runtime/packages/next/dist/lib/mime-type.js +20 -0
- package/web/runtime/packages/next/dist/lib/mkcert.js +204 -0
- package/web/runtime/packages/next/dist/lib/multi-file-writer.js +75 -0
- package/web/runtime/packages/next/dist/lib/needs-experimental-react.js +16 -0
- package/web/runtime/packages/next/dist/lib/non-nullable.js +15 -0
- package/web/runtime/packages/next/dist/lib/normalize-path.js +21 -0
- package/web/runtime/packages/next/dist/lib/oxford-comma-list.js +15 -0
- package/web/runtime/packages/next/dist/lib/page-types.js +18 -0
- package/web/runtime/packages/next/dist/lib/patch-incorrect-lockfile.js +185 -0
- package/web/runtime/packages/next/dist/lib/pick.js +19 -0
- package/web/runtime/packages/next/dist/lib/picocolors.js +177 -0
- package/web/runtime/packages/next/dist/lib/pretty-bytes.js +74 -0
- package/web/runtime/packages/next/dist/lib/realpath.js +20 -0
- package/web/runtime/packages/next/dist/lib/recursive-copy.js +76 -0
- package/web/runtime/packages/next/dist/lib/recursive-delete.js +137 -0
- package/web/runtime/packages/next/dist/lib/recursive-readdir.js +124 -0
- package/web/runtime/packages/next/dist/lib/redirect-status.js +46 -0
- package/web/runtime/packages/next/dist/lib/require-instrumentation-client.js +26 -0
- package/web/runtime/packages/next/dist/lib/resolve-build-paths.js +154 -0
- package/web/runtime/packages/next/dist/lib/resolve-from.js +65 -0
- package/web/runtime/packages/next/dist/lib/route-pattern-normalizer.js +107 -0
- package/web/runtime/packages/next/dist/lib/scheduler.js +64 -0
- package/web/runtime/packages/next/dist/lib/semver-noop.js +18 -0
- package/web/runtime/packages/next/dist/lib/server-external-packages.jsonc +103 -0
- package/web/runtime/packages/next/dist/lib/setup-exception-listeners.js +11 -0
- package/web/runtime/packages/next/dist/lib/static-env.js +92 -0
- package/web/runtime/packages/next/dist/lib/try-to-parse-path.js +67 -0
- package/web/runtime/packages/next/dist/lib/turbopack-warning.js +185 -0
- package/web/runtime/packages/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
- package/web/runtime/packages/next/dist/lib/typescript/getTypeScriptConfiguration.js +153 -0
- package/web/runtime/packages/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
- package/web/runtime/packages/next/dist/lib/typescript/loadTsConfig.js +181 -0
- package/web/runtime/packages/next/dist/lib/typescript/missingDependencyError.js +27 -0
- package/web/runtime/packages/next/dist/lib/typescript/runTypeCheck.js +149 -0
- package/web/runtime/packages/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
- package/web/runtime/packages/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
- package/web/runtime/packages/next/dist/lib/typescript/type-paths.js +51 -0
- package/web/runtime/packages/next/dist/lib/typescript/writeAppTypeDeclarations.js +75 -0
- package/web/runtime/packages/next/dist/lib/typescript/writeConfigurationDefaults.js +395 -0
- package/web/runtime/packages/next/dist/lib/url.js +75 -0
- package/web/runtime/packages/next/dist/lib/verify-partytown-setup.js +115 -0
- package/web/runtime/packages/next/dist/lib/verify-root-layout.js +165 -0
- package/web/runtime/packages/next/dist/lib/verify-typescript-setup.js +269 -0
- package/web/runtime/packages/next/dist/lib/wait.js +19 -0
- package/web/runtime/packages/next/dist/lib/with-promise-cache.js +24 -0
- package/web/runtime/packages/next/dist/lib/worker.js +234 -0
- package/web/runtime/packages/next/dist/server/ReactDOMServerPages.js +16 -0
- package/web/runtime/packages/next/dist/server/accept-header.js +132 -0
- package/web/runtime/packages/next/dist/server/after/after-context.js +140 -0
- package/web/runtime/packages/next/dist/server/after/after.js +26 -0
- package/web/runtime/packages/next/dist/server/after/awaiter.js +74 -0
- package/web/runtime/packages/next/dist/server/after/builtin-request-context.js +38 -0
- package/web/runtime/packages/next/dist/server/after/index.js +21 -0
- package/web/runtime/packages/next/dist/server/after/run-with-after.js +35 -0
- package/web/runtime/packages/next/dist/server/api-utils/get-cookie-parser.js +22 -0
- package/web/runtime/packages/next/dist/server/api-utils/index.js +201 -0
- package/web/runtime/packages/next/dist/server/api-utils/node/api-resolver.js +395 -0
- package/web/runtime/packages/next/dist/server/api-utils/node/parse-body.js +79 -0
- package/web/runtime/packages/next/dist/server/api-utils/node/try-get-preview-data.js +86 -0
- package/web/runtime/packages/next/dist/server/api-utils/web.js +17 -0
- package/web/runtime/packages/next/dist/server/app-render/action-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/action-async-storage.external.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/action-handler.js +1122 -0
- package/web/runtime/packages/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/app-render-prerender-utils.js +167 -0
- package/web/runtime/packages/next/dist/server/app-render/app-render-render-utils.js +76 -0
- package/web/runtime/packages/next/dist/server/app-render/app-render-scheduling.js +188 -0
- package/web/runtime/packages/next/dist/server/app-render/app-render.js +4522 -0
- package/web/runtime/packages/next/dist/server/app-render/async-local-storage.js +76 -0
- package/web/runtime/packages/next/dist/server/app-render/cache-signal.js +181 -0
- package/web/runtime/packages/next/dist/server/app-render/collect-segment-data.js +616 -0
- package/web/runtime/packages/next/dist/server/app-render/console-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/console-async-storage.external.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/create-component-styles-and-scripts.js +33 -0
- package/web/runtime/packages/next/dist/server/app-render/create-component-tree.js +870 -0
- package/web/runtime/packages/next/dist/server/app-render/create-error-handler.js +189 -0
- package/web/runtime/packages/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +102 -0
- package/web/runtime/packages/next/dist/server/app-render/csrf-protection.js +86 -0
- package/web/runtime/packages/next/dist/server/app-render/debug-channel-server.js +30 -0
- package/web/runtime/packages/next/dist/server/app-render/debug-channel-server.web.js +71 -0
- package/web/runtime/packages/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/dynamic-access-async-storage.external.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/dynamic-rendering.js +1144 -0
- package/web/runtime/packages/next/dist/server/app-render/encryption-utils-server.js +114 -0
- package/web/runtime/packages/next/dist/server/app-render/encryption-utils.js +93 -0
- package/web/runtime/packages/next/dist/server/app-render/encryption.js +259 -0
- package/web/runtime/packages/next/dist/server/app-render/entry-base.js +256 -0
- package/web/runtime/packages/next/dist/server/app-render/flight-render-result.js +28 -0
- package/web/runtime/packages/next/dist/server/app-render/get-asset-query-string.js +29 -0
- package/web/runtime/packages/next/dist/server/app-render/get-css-inlined-link-tags.js +49 -0
- package/web/runtime/packages/next/dist/server/app-render/get-layer-assets.js +65 -0
- package/web/runtime/packages/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
- package/web/runtime/packages/next/dist/server/app-render/get-script-nonce-from-header.js +32 -0
- package/web/runtime/packages/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
- package/web/runtime/packages/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/boundary-constants.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/boundary-impl.js +103 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/boundary-tracking.js +18 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/instant-config.js +181 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/instant-samples-client.js +128 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/instant-samples.js +432 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/instant-validation.js +713 -0
- package/web/runtime/packages/next/dist/server/app-render/instant-validation/stream-utils.js +96 -0
- package/web/runtime/packages/next/dist/server/app-render/interop-default.js +17 -0
- package/web/runtime/packages/next/dist/server/app-render/make-get-server-inserted-html.js +92 -0
- package/web/runtime/packages/next/dist/server/app-render/manifests-singleton.js +312 -0
- package/web/runtime/packages/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +29 -0
- package/web/runtime/packages/next/dist/server/app-render/module-loading/track-dynamic-import.js +57 -0
- package/web/runtime/packages/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
- package/web/runtime/packages/next/dist/server/app-render/module-loading/track-module-loading.instance.js +66 -0
- package/web/runtime/packages/next/dist/server/app-render/parse-and-validate-flight-router-state.js +49 -0
- package/web/runtime/packages/next/dist/server/app-render/postponed-state.js +157 -0
- package/web/runtime/packages/next/dist/server/app-render/prospective-render-utils.js +74 -0
- package/web/runtime/packages/next/dist/server/app-render/react-large-shell-error.js +17 -0
- package/web/runtime/packages/next/dist/server/app-render/react-server.node.js +39 -0
- package/web/runtime/packages/next/dist/server/app-render/render-css-resource.js +52 -0
- package/web/runtime/packages/next/dist/server/app-render/required-scripts.js +76 -0
- package/web/runtime/packages/next/dist/server/app-render/rsc/postpone.js +18 -0
- package/web/runtime/packages/next/dist/server/app-render/rsc/preloads.js +74 -0
- package/web/runtime/packages/next/dist/server/app-render/rsc/taint.js +79 -0
- package/web/runtime/packages/next/dist/server/app-render/segment-explorer-path.js +128 -0
- package/web/runtime/packages/next/dist/server/app-render/server-inserted-html.js +77 -0
- package/web/runtime/packages/next/dist/server/app-render/staged-rendering.js +343 -0
- package/web/runtime/packages/next/dist/server/app-render/stale-time.js +111 -0
- package/web/runtime/packages/next/dist/server/app-render/stream-ops.js +106 -0
- package/web/runtime/packages/next/dist/server/app-render/stream-ops.web.js +163 -0
- package/web/runtime/packages/next/dist/server/app-render/strip-flight-headers.js +18 -0
- package/web/runtime/packages/next/dist/server/app-render/types.js +65 -0
- package/web/runtime/packages/next/dist/server/app-render/use-flight-response.js +214 -0
- package/web/runtime/packages/next/dist/server/app-render/vary-params.js +336 -0
- package/web/runtime/packages/next/dist/server/app-render/walk-tree-with-flight-router-state.js +232 -0
- package/web/runtime/packages/next/dist/server/app-render/work-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/work-async-storage.external.js +13 -0
- package/web/runtime/packages/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
- package/web/runtime/packages/next/dist/server/app-render/work-unit-async-storage.external.js +280 -0
- package/web/runtime/packages/next/dist/server/async-storage/draft-mode-provider.js +62 -0
- package/web/runtime/packages/next/dist/server/async-storage/request-store.js +144 -0
- package/web/runtime/packages/next/dist/server/async-storage/with-store.js +6 -0
- package/web/runtime/packages/next/dist/server/async-storage/work-store.js +92 -0
- package/web/runtime/packages/next/dist/server/base-http/helpers.js +36 -0
- package/web/runtime/packages/next/dist/server/base-http/index.js +54 -0
- package/web/runtime/packages/next/dist/server/base-http/node.js +147 -0
- package/web/runtime/packages/next/dist/server/base-http/web.js +124 -0
- package/web/runtime/packages/next/dist/server/base-server.js +1882 -0
- package/web/runtime/packages/next/dist/server/body-streams.js +114 -0
- package/web/runtime/packages/next/dist/server/cache-dir.js +26 -0
- package/web/runtime/packages/next/dist/server/capsize-font-metrics.json +181516 -0
- package/web/runtime/packages/next/dist/server/ci-info.js +41 -0
- package/web/runtime/packages/next/dist/server/client-component-renderer-logger.js +70 -0
- package/web/runtime/packages/next/dist/server/config-schema.js +727 -0
- package/web/runtime/packages/next/dist/server/config-shared.js +368 -0
- package/web/runtime/packages/next/dist/server/config-utils.js +185 -0
- package/web/runtime/packages/next/dist/server/config.js +1545 -0
- package/web/runtime/packages/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
- package/web/runtime/packages/next/dist/server/crypto-utils.js +70 -0
- package/web/runtime/packages/next/dist/server/dev/browser-logs/file-logger.js +186 -0
- package/web/runtime/packages/next/dist/server/dev/browser-logs/receive-logs.js +558 -0
- package/web/runtime/packages/next/dist/server/dev/browser-logs/source-map.js +222 -0
- package/web/runtime/packages/next/dist/server/dev/debug-channel.js +87 -0
- package/web/runtime/packages/next/dist/server/dev/dev-indicator-server-state.js +15 -0
- package/web/runtime/packages/next/dist/server/dev/get-source-map-from-file.js +100 -0
- package/web/runtime/packages/next/dist/server/dev/hot-middleware.js +274 -0
- package/web/runtime/packages/next/dist/server/dev/hot-reloader-rspack.js +171 -0
- package/web/runtime/packages/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
- package/web/runtime/packages/next/dist/server/dev/hot-reloader-turbopack.js +1480 -0
- package/web/runtime/packages/next/dist/server/dev/hot-reloader-types.js +58 -0
- package/web/runtime/packages/next/dist/server/dev/hot-reloader-webpack.js +1386 -0
- package/web/runtime/packages/next/dist/server/dev/log-requests.js +149 -0
- package/web/runtime/packages/next/dist/server/dev/messages.js +74 -0
- package/web/runtime/packages/next/dist/server/dev/middleware-turbopack.js +403 -0
- package/web/runtime/packages/next/dist/server/dev/middleware-webpack.js +483 -0
- package/web/runtime/packages/next/dist/server/dev/node-stack-frames.js +72 -0
- package/web/runtime/packages/next/dist/server/dev/on-demand-entry-handler.js +773 -0
- package/web/runtime/packages/next/dist/server/dev/parse-version-info.js +108 -0
- package/web/runtime/packages/next/dist/server/dev/require-cache.js +79 -0
- package/web/runtime/packages/next/dist/server/dev/serialized-errors.js +67 -0
- package/web/runtime/packages/next/dist/server/dev/server-action-logger.js +37 -0
- package/web/runtime/packages/next/dist/server/dev/static-paths-worker.js +105 -0
- package/web/runtime/packages/next/dist/server/dev/turbopack-utils.js +687 -0
- package/web/runtime/packages/next/dist/server/dynamic-rendering-utils.js +108 -0
- package/web/runtime/packages/next/dist/server/font-utils.js +43 -0
- package/web/runtime/packages/next/dist/server/get-app-route-from-entrypoint.js +30 -0
- package/web/runtime/packages/next/dist/server/get-page-files.js +23 -0
- package/web/runtime/packages/next/dist/server/get-route-from-entrypoint.js +35 -0
- package/web/runtime/packages/next/dist/server/image-optimizer.js +1221 -0
- package/web/runtime/packages/next/dist/server/instrumentation/types.js +6 -0
- package/web/runtime/packages/next/dist/server/instrumentation/utils.js +21 -0
- package/web/runtime/packages/next/dist/server/internal-utils.js +39 -0
- package/web/runtime/packages/next/dist/server/is-private-ip.js +36 -0
- package/web/runtime/packages/next/dist/server/lib/app-dir-module.js +59 -0
- package/web/runtime/packages/next/dist/server/lib/app-info-log.js +132 -0
- package/web/runtime/packages/next/dist/server/lib/async-callback-set.js +29 -0
- package/web/runtime/packages/next/dist/server/lib/cache-control.js +22 -0
- package/web/runtime/packages/next/dist/server/lib/cache-handlers/default.external.js +18 -0
- package/web/runtime/packages/next/dist/server/lib/cache-handlers/default.js +160 -0
- package/web/runtime/packages/next/dist/server/lib/cache-handlers/types.js +8 -0
- package/web/runtime/packages/next/dist/server/lib/chrome-devtools-workspace.js +116 -0
- package/web/runtime/packages/next/dist/server/lib/clone-response.js +77 -0
- package/web/runtime/packages/next/dist/server/lib/cpu-profile.js +59 -0
- package/web/runtime/packages/next/dist/server/lib/decode-query-path-parameter.js +26 -0
- package/web/runtime/packages/next/dist/server/lib/dedupe-fetch.js +163 -0
- package/web/runtime/packages/next/dist/server/lib/dev-bundler-service.js +95 -0
- package/web/runtime/packages/next/dist/server/lib/disk-lru-cache.external.js +57 -0
- package/web/runtime/packages/next/dist/server/lib/encode-cache-tag.js +45 -0
- package/web/runtime/packages/next/dist/server/lib/etag.js +56 -0
- package/web/runtime/packages/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
- package/web/runtime/packages/next/dist/server/lib/experimental/ppr.js +47 -0
- package/web/runtime/packages/next/dist/server/lib/find-page-file.js +147 -0
- package/web/runtime/packages/next/dist/server/lib/fix-mojibake.js +25 -0
- package/web/runtime/packages/next/dist/server/lib/format-hostname.js +16 -0
- package/web/runtime/packages/next/dist/server/lib/i18n-provider.js +129 -0
- package/web/runtime/packages/next/dist/server/lib/implicit-tags.js +80 -0
- package/web/runtime/packages/next/dist/server/lib/incremental-cache/file-system-cache.js +335 -0
- package/web/runtime/packages/next/dist/server/lib/incremental-cache/index.js +538 -0
- package/web/runtime/packages/next/dist/server/lib/incremental-cache/memory-cache.external.js +57 -0
- package/web/runtime/packages/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +73 -0
- package/web/runtime/packages/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
- package/web/runtime/packages/next/dist/server/lib/install-code-frame.js +22 -0
- package/web/runtime/packages/next/dist/server/lib/is-ipv6.js +41 -0
- package/web/runtime/packages/next/dist/server/lib/is-rsc-request.js +18 -0
- package/web/runtime/packages/next/dist/server/lib/lazy-result.js +46 -0
- package/web/runtime/packages/next/dist/server/lib/lru-cache.js +191 -0
- package/web/runtime/packages/next/dist/server/lib/match-next-data-pathname.js +18 -0
- package/web/runtime/packages/next/dist/server/lib/mock-request.js +441 -0
- package/web/runtime/packages/next/dist/server/lib/module-loader/module-loader.js +8 -0
- package/web/runtime/packages/next/dist/server/lib/module-loader/node-module-loader.js +25 -0
- package/web/runtime/packages/next/dist/server/lib/module-loader/route-module-loader.js +26 -0
- package/web/runtime/packages/next/dist/server/lib/node-fs-methods.js +28 -0
- package/web/runtime/packages/next/dist/server/lib/parse-stack.js +46 -0
- package/web/runtime/packages/next/dist/server/lib/patch-fetch.js +995 -0
- package/web/runtime/packages/next/dist/server/lib/patch-set-header.js +45 -0
- package/web/runtime/packages/next/dist/server/lib/postponed-request-body.js +64 -0
- package/web/runtime/packages/next/dist/server/lib/render-server.js +155 -0
- package/web/runtime/packages/next/dist/server/lib/router-server.js +699 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/block-cross-site-dev.js +110 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/build-data-route.js +48 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/cache-life-type-utils.js +211 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/decode-path-params.js +42 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/filesystem.js +591 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/instrumentation-globals.external.js +89 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +96 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/is-postpone.js +16 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/proxy-request.js +122 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/resolve-routes.js +643 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/route-types-utils.js +286 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/router-server-context.js +26 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/typegen.js +858 -0
- package/web/runtime/packages/next/dist/server/lib/router-utils/types.js +6 -0
- package/web/runtime/packages/next/dist/server/lib/server-action-request-meta.js +53 -0
- package/web/runtime/packages/next/dist/server/lib/server-ipc/utils.js +83 -0
- package/web/runtime/packages/next/dist/server/lib/source-maps.js +196 -0
- package/web/runtime/packages/next/dist/server/lib/start-server.js +494 -0
- package/web/runtime/packages/next/dist/server/lib/streaming-metadata.js +38 -0
- package/web/runtime/packages/next/dist/server/lib/to-route.js +37 -0
- package/web/runtime/packages/next/dist/server/lib/trace/constants.js +203 -0
- package/web/runtime/packages/next/dist/server/lib/trace/tracer.js +280 -0
- package/web/runtime/packages/next/dist/server/lib/trace/utils.js +16 -0
- package/web/runtime/packages/next/dist/server/lib/types.js +6 -0
- package/web/runtime/packages/next/dist/server/lib/utils.js +278 -0
- package/web/runtime/packages/next/dist/server/lib/worker-utils.js +36 -0
- package/web/runtime/packages/next/dist/server/load-components.js +179 -0
- package/web/runtime/packages/next/dist/server/load-default-error-components.js +41 -0
- package/web/runtime/packages/next/dist/server/load-manifest.external.js +117 -0
- package/web/runtime/packages/next/dist/server/match-bundle.js +25 -0
- package/web/runtime/packages/next/dist/server/mcp/get-mcp-middleware.js +49 -0
- package/web/runtime/packages/next/dist/server/mcp/get-or-create-mcp-server.js +41 -0
- package/web/runtime/packages/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-errors.js +114 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-logs.js +67 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-routes.js +136 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/utils/browser-communication.js +90 -0
- package/web/runtime/packages/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
- package/web/runtime/packages/next/dist/server/next-server.js +1429 -0
- package/web/runtime/packages/next/dist/server/next-typescript.js +13 -0
- package/web/runtime/packages/next/dist/server/next.js +455 -0
- package/web/runtime/packages/next/dist/server/node-environment-baseline.js +25 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/console-dim.external.js +301 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/console-exit.js +49 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/console-file.js +56 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/date.js +52 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +577 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/global-behaviors.js +33 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/io-utils.js +195 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/process-error-handlers.js +91 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/random.js +28 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +508 -0
- package/web/runtime/packages/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
- package/web/runtime/packages/next/dist/server/node-environment.js +19 -0
- package/web/runtime/packages/next/dist/server/node-polyfill-crypto.js +21 -0
- package/web/runtime/packages/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/app/index.js +42 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/pages/index.js +44 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
- package/web/runtime/packages/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
- package/web/runtime/packages/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
- package/web/runtime/packages/next/dist/server/normalizers/normalizer.js +6 -0
- package/web/runtime/packages/next/dist/server/normalizers/normalizers.js +23 -0
- package/web/runtime/packages/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/base-path.js +25 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/next-data.js +38 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/prefix.js +39 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/rsc.js +19 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
- package/web/runtime/packages/next/dist/server/normalizers/request/suffix.js +27 -0
- package/web/runtime/packages/next/dist/server/normalizers/underscore-normalizer.js +17 -0
- package/web/runtime/packages/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
- package/web/runtime/packages/next/dist/server/og/image-response.js +53 -0
- package/web/runtime/packages/next/dist/server/patch-error-inspect.js +453 -0
- package/web/runtime/packages/next/dist/server/pipe-readable.js +140 -0
- package/web/runtime/packages/next/dist/server/post-process.js +39 -0
- package/web/runtime/packages/next/dist/server/render-result.js +204 -0
- package/web/runtime/packages/next/dist/server/render.js +1148 -0
- package/web/runtime/packages/next/dist/server/request/connection.js +133 -0
- package/web/runtime/packages/next/dist/server/request/cookies.js +235 -0
- package/web/runtime/packages/next/dist/server/request/draft-mode.js +230 -0
- package/web/runtime/packages/next/dist/server/request/fallback-params.js +95 -0
- package/web/runtime/packages/next/dist/server/request/headers.js +229 -0
- package/web/runtime/packages/next/dist/server/request/params.js +527 -0
- package/web/runtime/packages/next/dist/server/request/pathname.js +119 -0
- package/web/runtime/packages/next/dist/server/request/root-params.js +194 -0
- package/web/runtime/packages/next/dist/server/request/search-params.js +526 -0
- package/web/runtime/packages/next/dist/server/request/utils.js +51 -0
- package/web/runtime/packages/next/dist/server/request-meta.js +55 -0
- package/web/runtime/packages/next/dist/server/require-hook.js +82 -0
- package/web/runtime/packages/next/dist/server/require.js +109 -0
- package/web/runtime/packages/next/dist/server/response-cache/index.js +311 -0
- package/web/runtime/packages/next/dist/server/response-cache/types.js +41 -0
- package/web/runtime/packages/next/dist/server/response-cache/utils.js +104 -0
- package/web/runtime/packages/next/dist/server/response-cache/web.js +101 -0
- package/web/runtime/packages/next/dist/server/resume-data-cache/cache-store.js +96 -0
- package/web/runtime/packages/next/dist/server/resume-data-cache/resume-data-cache.js +124 -0
- package/web/runtime/packages/next/dist/server/revalidation-utils.js +157 -0
- package/web/runtime/packages/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
- package/web/runtime/packages/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
- package/web/runtime/packages/next/dist/server/route-definitions/locale-route-definition.js +6 -0
- package/web/runtime/packages/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
- package/web/runtime/packages/next/dist/server/route-definitions/pages-route-definition.js +6 -0
- package/web/runtime/packages/next/dist/server/route-definitions/route-definition.js +6 -0
- package/web/runtime/packages/next/dist/server/route-kind.js +32 -0
- package/web/runtime/packages/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +239 -0
- package/web/runtime/packages/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +120 -0
- package/web/runtime/packages/next/dist/server/route-matcher-managers/route-matcher-manager.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +55 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +43 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +91 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +112 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +77 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +77 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +28 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +106 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +42 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/dev/helpers/file-reader/file-reader.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +30 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/helpers/manifest-loaders/manifest-loader.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +34 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +20 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +21 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +55 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +64 -0
- package/web/runtime/packages/next/dist/server/route-matcher-providers/route-matcher-provider.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matchers/app-page-route-matcher.js +18 -0
- package/web/runtime/packages/next/dist/server/route-matchers/app-route-route-matcher.js +15 -0
- package/web/runtime/packages/next/dist/server/route-matchers/locale-route-matcher.js +68 -0
- package/web/runtime/packages/next/dist/server/route-matchers/pages-api-route-matcher.js +30 -0
- package/web/runtime/packages/next/dist/server/route-matchers/pages-route-matcher.js +30 -0
- package/web/runtime/packages/next/dist/server/route-matchers/route-matcher.js +54 -0
- package/web/runtime/packages/next/dist/server/route-matches/app-page-route-match.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matches/app-route-route-match.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matches/locale-route-match.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matches/pages-api-route-match.js +16 -0
- package/web/runtime/packages/next/dist/server/route-matches/pages-route-match.js +6 -0
- package/web/runtime/packages/next/dist/server/route-matches/route-match.js +6 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +51 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/module.js +162 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/module.render.js +24 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/normalize-request-url.js +25 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +140 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +125 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +85 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/module.js +915 -0
- package/web/runtime/packages/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
- package/web/runtime/packages/next/dist/server/route-modules/checks.js +45 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/module.compiled.js +20 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/module.js +92 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/module.render.js +24 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/pages-handler.js +545 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
- package/web/runtime/packages/next/dist/server/route-modules/pages-api/module.js +58 -0
- package/web/runtime/packages/next/dist/server/route-modules/route-module.js +660 -0
- package/web/runtime/packages/next/dist/server/runtime-reacts.external.js +46 -0
- package/web/runtime/packages/next/dist/server/send-payload.js +88 -0
- package/web/runtime/packages/next/dist/server/send-response.js +70 -0
- package/web/runtime/packages/next/dist/server/serve-static.js +66 -0
- package/web/runtime/packages/next/dist/server/server-route-utils.js +30 -0
- package/web/runtime/packages/next/dist/server/server-utils.js +340 -0
- package/web/runtime/packages/next/dist/server/setup-http-agent-env.js +31 -0
- package/web/runtime/packages/next/dist/server/stream-utils/encoded-tags.js +122 -0
- package/web/runtime/packages/next/dist/server/stream-utils/node-web-streams-helper.js +918 -0
- package/web/runtime/packages/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
- package/web/runtime/packages/next/dist/server/typescript/constant.js +98 -0
- package/web/runtime/packages/next/dist/server/typescript/index.js +199 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/client-boundary.js +97 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/config.js +512 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/entry.js +149 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/error.js +38 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/metadata.js +234 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/server-boundary.js +115 -0
- package/web/runtime/packages/next/dist/server/typescript/rules/server.js +79 -0
- package/web/runtime/packages/next/dist/server/typescript/utils.js +212 -0
- package/web/runtime/packages/next/dist/server/use-cache/cache-life.js +163 -0
- package/web/runtime/packages/next/dist/server/use-cache/cache-tag.js +52 -0
- package/web/runtime/packages/next/dist/server/use-cache/constants.js +28 -0
- package/web/runtime/packages/next/dist/server/use-cache/handlers.js +121 -0
- package/web/runtime/packages/next/dist/server/use-cache/use-cache-errors.js +36 -0
- package/web/runtime/packages/next/dist/server/use-cache/use-cache-wrapper.js +1588 -0
- package/web/runtime/packages/next/dist/server/utils.js +73 -0
- package/web/runtime/packages/next/dist/server/web/adapter.js +395 -0
- package/web/runtime/packages/next/dist/server/web/edge-route-module-wrapper.js +124 -0
- package/web/runtime/packages/next/dist/server/web/error.js +54 -0
- package/web/runtime/packages/next/dist/server/web/exports/index.js +56 -0
- package/web/runtime/packages/next/dist/server/web/get-edge-preview-props.js +23 -0
- package/web/runtime/packages/next/dist/server/web/globals.js +128 -0
- package/web/runtime/packages/next/dist/server/web/http.js +39 -0
- package/web/runtime/packages/next/dist/server/web/internal-edge-wait-until.js +64 -0
- package/web/runtime/packages/next/dist/server/web/next-url.js +199 -0
- package/web/runtime/packages/next/dist/server/web/sandbox/context.js +462 -0
- package/web/runtime/packages/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
- package/web/runtime/packages/next/dist/server/web/sandbox/index.js +28 -0
- package/web/runtime/packages/next/dist/server/web/sandbox/resource-managers.js +88 -0
- package/web/runtime/packages/next/dist/server/web/sandbox/sandbox.js +137 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/adapters/headers.js +192 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/adapters/next-request.js +142 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/adapters/request-cookies.js +211 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/cookies.js +29 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/fetch-event.js +98 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/image-response.js +22 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/request.js +99 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/response.js +136 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/revalidate.js +215 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/unstable-cache.js +293 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/unstable-no-store.js +51 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/url-pattern.js +14 -0
- package/web/runtime/packages/next/dist/server/web/spec-extension/user-agent.js +46 -0
- package/web/runtime/packages/next/dist/server/web/types.js +6 -0
- package/web/runtime/packages/next/dist/server/web/utils.js +151 -0
- package/web/runtime/packages/next/dist/server/web/web-on-close.js +87 -0
- package/web/runtime/packages/next/dist/shared/lib/action-revalidation-kind.js +31 -0
- package/web/runtime/packages/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
- package/web/runtime/packages/next/dist/shared/lib/app-router-types.js +46 -0
- package/web/runtime/packages/next/dist/shared/lib/constants.js +448 -0
- package/web/runtime/packages/next/dist/shared/lib/deep-freeze.js +30 -0
- package/web/runtime/packages/next/dist/shared/lib/deployment-id.js +63 -0
- package/web/runtime/packages/next/dist/shared/lib/dset.js +34 -0
- package/web/runtime/packages/next/dist/shared/lib/encode-uri-path.js +15 -0
- package/web/runtime/packages/next/dist/shared/lib/entry-constants.js +36 -0
- package/web/runtime/packages/next/dist/shared/lib/error-source.js +36 -0
- package/web/runtime/packages/next/dist/shared/lib/errors/canary-only-config-error.js +39 -0
- package/web/runtime/packages/next/dist/shared/lib/errors/code-frame.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/errors/constants.js +19 -0
- package/web/runtime/packages/next/dist/shared/lib/errors/empty-generate-static-params-error.js +24 -0
- package/web/runtime/packages/next/dist/shared/lib/errors/hard-deprecated-config-error.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/escape-regexp.js +22 -0
- package/web/runtime/packages/next/dist/shared/lib/get-hostname.js +23 -0
- package/web/runtime/packages/next/dist/shared/lib/hash.js +42 -0
- package/web/runtime/packages/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/head.js +163 -0
- package/web/runtime/packages/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
- package/web/runtime/packages/next/dist/shared/lib/html-context.shared-runtime.js +40 -0
- package/web/runtime/packages/next/dist/shared/lib/htmlescape.js +52 -0
- package/web/runtime/packages/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
- package/web/runtime/packages/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
- package/web/runtime/packages/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
- package/web/runtime/packages/next/dist/shared/lib/image-blur-svg.js +22 -0
- package/web/runtime/packages/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
- package/web/runtime/packages/next/dist/shared/lib/image-config.js +77 -0
- package/web/runtime/packages/next/dist/shared/lib/invariant-error.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/is-plain-object.js +42 -0
- package/web/runtime/packages/next/dist/shared/lib/is-thenable.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/isomorphic/path.js +14 -0
- package/web/runtime/packages/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
- package/web/runtime/packages/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
- package/web/runtime/packages/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
- package/web/runtime/packages/next/dist/shared/lib/match-local-pattern.js +46 -0
- package/web/runtime/packages/next/dist/shared/lib/match-remote-pattern.js +63 -0
- package/web/runtime/packages/next/dist/shared/lib/modern-browserslist-target.js +15 -0
- package/web/runtime/packages/next/dist/shared/lib/no-fallback-error.external.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
- package/web/runtime/packages/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/promise-with-resolvers.js +26 -0
- package/web/runtime/packages/next/dist/shared/lib/router/adapters.js +136 -0
- package/web/runtime/packages/next/dist/shared/lib/router/routes/app.js +134 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/add-locale.js +28 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/app-paths.js +62 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/cache-busting-search-param.js +70 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/format-url.js +111 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/get-dynamic-param.js +174 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/html-bots.js +17 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/index.js +30 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/interception-routes.js +108 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/is-bot.js +57 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/parse-path.js +33 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/parse-relative-url.js +43 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/parse-url.js +38 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/path-match.js +49 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/prepare-destination.js +293 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/querystring.js +79 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/remove-trailing-slash.js +21 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/route-matcher.js +45 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/route-regex.js +256 -0
- package/web/runtime/packages/next/dist/shared/lib/router/utils/sorted-routes.js +244 -0
- package/web/runtime/packages/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
- package/web/runtime/packages/next/dist/shared/lib/segment-cache/segment-value-encoding.js +99 -0
- package/web/runtime/packages/next/dist/shared/lib/segment-cache/vary-params-decoding.js +32 -0
- package/web/runtime/packages/next/dist/shared/lib/segment.js +102 -0
- package/web/runtime/packages/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
- package/web/runtime/packages/next/dist/shared/lib/server-reference-info.js +68 -0
- package/web/runtime/packages/next/dist/shared/lib/side-effect.js +63 -0
- package/web/runtime/packages/next/dist/shared/lib/size-limit.js +40 -0
- package/web/runtime/packages/next/dist/shared/lib/turbopack/internal-error.js +53 -0
- package/web/runtime/packages/next/dist/shared/lib/utils/reflect-utils.js +69 -0
- package/web/runtime/packages/next/dist/shared/lib/utils/warn-once.js +22 -0
- package/web/runtime/packages/next/dist/shared/lib/utils.js +207 -0
- package/web/runtime/packages/next/dist/shared/lib/zod.js +101 -0
- package/web/runtime/packages/next/dist/telemetry/anonymous-meta.js +89 -0
- package/web/runtime/packages/next/dist/telemetry/detached-flush.js +56 -0
- package/web/runtime/packages/next/dist/telemetry/events/build.js +174 -0
- package/web/runtime/packages/next/dist/telemetry/events/index.js +41 -0
- package/web/runtime/packages/next/dist/telemetry/events/plugins.js +51 -0
- package/web/runtime/packages/next/dist/telemetry/events/swc-load-failure.js +55 -0
- package/web/runtime/packages/next/dist/telemetry/events/version.js +66 -0
- package/web/runtime/packages/next/dist/telemetry/flush-telemetry.js +19 -0
- package/web/runtime/packages/next/dist/telemetry/post-telemetry-payload.js +48 -0
- package/web/runtime/packages/next/dist/telemetry/project-id.js +48 -0
- package/web/runtime/packages/next/dist/telemetry/storage.js +301 -0
- package/web/runtime/packages/next/dist/trace/index.js +58 -0
- package/web/runtime/packages/next/dist/trace/report/index.js +37 -0
- package/web/runtime/packages/next/dist/trace/report/to-json-build.js +40 -0
- package/web/runtime/packages/next/dist/trace/report/to-json.js +165 -0
- package/web/runtime/packages/next/dist/trace/report/to-telemetry.js +36 -0
- package/web/runtime/packages/next/dist/trace/shared.js +39 -0
- package/web/runtime/packages/next/dist/trace/trace.js +211 -0
- package/web/runtime/packages/next/package.json +136 -0
- package/web/runtime/packages/react/cjs/react-compiler-runtime.production.js +16 -0
- package/web/runtime/packages/react/cjs/react-jsx-dev-runtime.production.js +14 -0
- package/web/runtime/packages/react/cjs/react-jsx-runtime.production.js +34 -0
- package/web/runtime/packages/react/cjs/react.development.js +1284 -0
- package/web/runtime/packages/react/cjs/react.production.js +542 -0
- package/web/runtime/packages/react/compiler-runtime.js +14 -0
- package/web/runtime/packages/react/index.js +7 -0
- package/web/runtime/packages/react/jsx-dev-runtime.js +7 -0
- package/web/runtime/packages/react/jsx-runtime.js +7 -0
- package/web/runtime/packages/react/package.json +51 -0
- package/web/runtime/packages/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
- package/web/runtime/packages/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
- package/web/runtime/packages/react-dom/cjs/react-dom-server.browser.production.js +7410 -0
- package/web/runtime/packages/react-dom/cjs/react-dom-server.edge.production.js +7512 -0
- package/web/runtime/packages/react-dom/cjs/react-dom-server.node.production.js +7707 -0
- package/web/runtime/packages/react-dom/cjs/react-dom.production.js +210 -0
- package/web/runtime/packages/react-dom/index.js +38 -0
- package/web/runtime/packages/react-dom/package.json +117 -0
- package/web/runtime/packages/react-dom/server.browser.js +16 -0
- package/web/runtime/packages/react-dom/server.edge.js +17 -0
- package/web/runtime/packages/react-dom/server.node.js +18 -0
- package/web/runtime/packages/react-dom/static.node.js +14 -0
- package/web/runtime/packages/semver/classes/comparator.js +143 -0
- package/web/runtime/packages/semver/classes/range.js +577 -0
- package/web/runtime/packages/semver/classes/semver.js +350 -0
- package/web/runtime/packages/semver/functions/clean.js +8 -0
- package/web/runtime/packages/semver/functions/cmp.js +54 -0
- package/web/runtime/packages/semver/functions/coerce.js +62 -0
- package/web/runtime/packages/semver/functions/compare-build.js +9 -0
- package/web/runtime/packages/semver/functions/compare-loose.js +5 -0
- package/web/runtime/packages/semver/functions/compare.js +7 -0
- package/web/runtime/packages/semver/functions/diff.js +60 -0
- package/web/runtime/packages/semver/functions/eq.js +5 -0
- package/web/runtime/packages/semver/functions/gt.js +5 -0
- package/web/runtime/packages/semver/functions/gte.js +5 -0
- package/web/runtime/packages/semver/functions/inc.js +21 -0
- package/web/runtime/packages/semver/functions/lt.js +5 -0
- package/web/runtime/packages/semver/functions/lte.js +5 -0
- package/web/runtime/packages/semver/functions/major.js +5 -0
- package/web/runtime/packages/semver/functions/minor.js +5 -0
- package/web/runtime/packages/semver/functions/neq.js +5 -0
- package/web/runtime/packages/semver/functions/parse.js +18 -0
- package/web/runtime/packages/semver/functions/patch.js +5 -0
- package/web/runtime/packages/semver/functions/prerelease.js +8 -0
- package/web/runtime/packages/semver/functions/rcompare.js +5 -0
- package/web/runtime/packages/semver/functions/rsort.js +5 -0
- package/web/runtime/packages/semver/functions/satisfies.js +12 -0
- package/web/runtime/packages/semver/functions/sort.js +5 -0
- package/web/runtime/packages/semver/functions/truncate.js +48 -0
- package/web/runtime/packages/semver/functions/valid.js +8 -0
- package/web/runtime/packages/semver/index.js +93 -0
- package/web/runtime/packages/semver/internal/constants.js +37 -0
- package/web/runtime/packages/semver/internal/debug.js +11 -0
- package/web/runtime/packages/semver/internal/identifiers.js +29 -0
- package/web/runtime/packages/semver/internal/lrucache.js +42 -0
- package/web/runtime/packages/semver/internal/parse-options.js +17 -0
- package/web/runtime/packages/semver/internal/re.js +223 -0
- package/web/runtime/packages/semver/package.json +78 -0
- package/web/runtime/packages/semver/ranges/gtr.js +6 -0
- package/web/runtime/packages/semver/ranges/intersects.js +9 -0
- package/web/runtime/packages/semver/ranges/ltr.js +6 -0
- package/web/runtime/packages/semver/ranges/max-satisfying.js +27 -0
- package/web/runtime/packages/semver/ranges/min-satisfying.js +26 -0
- package/web/runtime/packages/semver/ranges/min-version.js +63 -0
- package/web/runtime/packages/semver/ranges/outside.js +82 -0
- package/web/runtime/packages/semver/ranges/simplify.js +49 -0
- package/web/runtime/packages/semver/ranges/subset.js +249 -0
- package/web/runtime/packages/semver/ranges/to-comparators.js +10 -0
- package/web/runtime/packages/semver/ranges/valid.js +13 -0
- package/web/runtime/packages/styled-jsx/dist/index/index.js +499 -0
- package/web/runtime/packages/styled-jsx/index.js +1 -0
- package/web/runtime/packages/styled-jsx/package.json +132 -0
- package/web/runtime/packages/styled-jsx/style.js +1 -0
- package/web/runtime/server.cjs +43 -0
- package/web/server.cjs +4 -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/BUILD_ID +0 -1
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +0 -13
- package/web/.next/standalone/web/.next/build-manifest.json +0 -20
- package/web/.next/standalone/web/.next/prerender-manifest.json +0 -88
- package/web/.next/standalone/web/.next/required-server-files.json +0 -317
- package/web/.next/standalone/web/.next/routes-manifest.json +0 -110
- package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +0 -17
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +0 -10
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.html +0 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +0 -12
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +0 -5
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +0 -12
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +0 -7
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +0 -4
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +0 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +0 -17
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +0 -13
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/_not-found.html +0 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +0 -17
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +0 -17
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +0 -8
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +0 -8
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -4
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +0 -3
- package/web/.next/standalone/web/.next/server/app/api/components/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/components/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/components/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/connections/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/connections/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/graph/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/graph/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/projects/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/projects/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js +0 -7
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/prompts/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/scan/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/scan/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/settings/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/settings/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/api/status/route/build-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/api/status/route.js +0 -6
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/api/status/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app/index.html +0 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +0 -23
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -9
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +0 -23
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +0 -8
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +0 -8
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +0 -5
- package/web/.next/standalone/web/.next/server/app/page/build-manifest.json +0 -17
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +0 -11
- package/web/.next/standalone/web/.next/server/app/page.js +0 -15
- package/web/.next/standalone/web/.next/server/app/page.js.nft.json +0 -1
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +0 -2
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +0 -13
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +0 -19
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__1ab91221._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__539ef30d._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__f3450c22._.js +0 -21
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[turbopack]_runtime.js +0 -770
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_e6039567._.js +0 -6
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_09351209._.js +0 -6
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_222be7ae._.js +0 -6
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_2346e1b3._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_cec86455._.js +0 -4
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_9c5d1a14._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_forbidden_8eae0c85.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_global-error_81159d60.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_unauthorized_7d34a31c.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_e03afa0e._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_esm_build_templates_app-page_2c8d71b9.js +0 -4
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_8910f04c.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__1a0663e6._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__4306eafc._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44903626._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__60278e3f._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__61942f24._.js +0 -4
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__8c45c3c9._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9a2f110d._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__ed07bd88._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f2db61af._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -770
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_0103e631._.js +0 -4
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +0 -14
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__global-error_page_actions_2a1e94d4.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__not-found_page_actions_9eaa9845.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_page_actions_ec26bf28.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_components_route_actions_c88bf2a6.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_connections_route_actions_b1d5e95a.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_graph_route_actions_e2dd052c.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_projects_route_actions_3f671cbb.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_prompts_route_actions_85b56166.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_scan_route_actions_861cde8d.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_settings_route_actions_e19026ae.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_status_route_actions_8b8c6c89.js +0 -3
- package/web/.next/standalone/web/.next/server/functions-config-manifest.json +0 -4
- package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +0 -21
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +0 -1
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +0 -15
- package/web/.next/standalone/web/.next/server/pages/404.html +0 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +0 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +0 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +0 -5
- package/web/.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_clientMiddlewareManifest.json +0 -1
- package/web/.next/standalone/web/.next/static/chunks/062ae79751df2759.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/159889e17b2cf1f8.js +0 -2
- package/web/.next/standalone/web/.next/static/chunks/458d6f37339fc069.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/6d3d39425a878d7f.js +0 -1
- 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/c57fee8cce8d7cb9.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/standalone/web/.next/static/chunks/dd22b5f2beb2cc31.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/e0affeef0ddb9a97.js +0 -4
- package/web/.next/standalone/web/.next/static/chunks/f74a6859e1c4d5e3.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +0 -3
- 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/standalone/web/app/api/components/route.ts +0 -252
- package/web/.next/standalone/web/app/api/connections/route.ts +0 -319
- package/web/.next/standalone/web/app/api/graph/route.ts +0 -235
- package/web/.next/standalone/web/app/api/projects/route.ts +0 -221
- package/web/.next/standalone/web/app/api/prompts/route.ts +0 -328
- package/web/.next/standalone/web/app/api/scan/route.ts +0 -108
- package/web/.next/standalone/web/app/api/settings/route.ts +0 -198
- package/web/.next/standalone/web/app/api/status/route.ts +0 -169
- package/web/.next/standalone/web/app/globals.css +0 -99
- package/web/.next/standalone/web/app/layout.tsx +0 -49
- package/web/.next/standalone/web/app/page.tsx +0 -94
- package/web/.next/standalone/web/components/components-panel.tsx +0 -240
- package/web/.next/standalone/web/components/connections-panel.tsx +0 -220
- package/web/.next/standalone/web/components/diagram-view.tsx +0 -735
- package/web/.next/standalone/web/components/header.tsx +0 -225
- package/web/.next/standalone/web/components/impact-analysis.tsx +0 -358
- package/web/.next/standalone/web/components/llm-tracking-panel.tsx +0 -1483
- package/web/.next/standalone/web/components/settings-panel.tsx +0 -671
- package/web/.next/standalone/web/components/sidebar.tsx +0 -74
- package/web/.next/standalone/web/components/status-overview.tsx +0 -326
- package/web/.next/standalone/web/components/theme-provider.tsx +0 -11
- package/web/.next/standalone/web/components/ui/accordion.tsx +0 -66
- package/web/.next/standalone/web/components/ui/alert-dialog.tsx +0 -157
- package/web/.next/standalone/web/components/ui/alert.tsx +0 -66
- package/web/.next/standalone/web/components/ui/aspect-ratio.tsx +0 -11
- package/web/.next/standalone/web/components/ui/avatar.tsx +0 -53
- package/web/.next/standalone/web/components/ui/badge.tsx +0 -46
- package/web/.next/standalone/web/components/ui/breadcrumb.tsx +0 -109
- package/web/.next/standalone/web/components/ui/button-group.tsx +0 -83
- package/web/.next/standalone/web/components/ui/button.tsx +0 -60
- package/web/.next/standalone/web/components/ui/calendar.tsx +0 -213
- package/web/.next/standalone/web/components/ui/card.tsx +0 -92
- package/web/.next/standalone/web/components/ui/carousel.tsx +0 -241
- package/web/.next/standalone/web/components/ui/chart.tsx +0 -353
- package/web/.next/standalone/web/components/ui/checkbox.tsx +0 -32
- package/web/.next/standalone/web/components/ui/collapsible.tsx +0 -33
- package/web/.next/standalone/web/components/ui/command.tsx +0 -184
- package/web/.next/standalone/web/components/ui/context-menu.tsx +0 -252
- package/web/.next/standalone/web/components/ui/dialog.tsx +0 -143
- package/web/.next/standalone/web/components/ui/drawer.tsx +0 -135
- package/web/.next/standalone/web/components/ui/dropdown-menu.tsx +0 -257
- package/web/.next/standalone/web/components/ui/empty.tsx +0 -104
- package/web/.next/standalone/web/components/ui/field.tsx +0 -244
- package/web/.next/standalone/web/components/ui/form.tsx +0 -167
- package/web/.next/standalone/web/components/ui/hover-card.tsx +0 -44
- package/web/.next/standalone/web/components/ui/input-group.tsx +0 -169
- package/web/.next/standalone/web/components/ui/input-otp.tsx +0 -77
- package/web/.next/standalone/web/components/ui/input.tsx +0 -21
- package/web/.next/standalone/web/components/ui/item.tsx +0 -193
- package/web/.next/standalone/web/components/ui/kbd.tsx +0 -28
- package/web/.next/standalone/web/components/ui/label.tsx +0 -24
- package/web/.next/standalone/web/components/ui/menubar.tsx +0 -276
- package/web/.next/standalone/web/components/ui/navigation-menu.tsx +0 -166
- package/web/.next/standalone/web/components/ui/pagination.tsx +0 -127
- package/web/.next/standalone/web/components/ui/popover.tsx +0 -48
- package/web/.next/standalone/web/components/ui/progress.tsx +0 -31
- package/web/.next/standalone/web/components/ui/radio-group.tsx +0 -45
- package/web/.next/standalone/web/components/ui/resizable.tsx +0 -56
- package/web/.next/standalone/web/components/ui/scroll-area.tsx +0 -58
- package/web/.next/standalone/web/components/ui/select.tsx +0 -185
- package/web/.next/standalone/web/components/ui/separator.tsx +0 -28
- package/web/.next/standalone/web/components/ui/sheet.tsx +0 -139
- package/web/.next/standalone/web/components/ui/sidebar.tsx +0 -726
- package/web/.next/standalone/web/components/ui/skeleton.tsx +0 -13
- package/web/.next/standalone/web/components/ui/slider.tsx +0 -63
- package/web/.next/standalone/web/components/ui/sonner.tsx +0 -25
- package/web/.next/standalone/web/components/ui/spinner.tsx +0 -16
- package/web/.next/standalone/web/components/ui/switch.tsx +0 -31
- package/web/.next/standalone/web/components/ui/table.tsx +0 -116
- package/web/.next/standalone/web/components/ui/tabs.tsx +0 -66
- package/web/.next/standalone/web/components/ui/textarea.tsx +0 -18
- package/web/.next/standalone/web/components/ui/toast.tsx +0 -129
- package/web/.next/standalone/web/components/ui/toaster.tsx +0 -35
- package/web/.next/standalone/web/components/ui/toggle-group.tsx +0 -73
- package/web/.next/standalone/web/components/ui/toggle.tsx +0 -47
- package/web/.next/standalone/web/components/ui/tooltip.tsx +0 -61
- package/web/.next/standalone/web/components/ui/use-mobile.tsx +0 -19
- package/web/.next/standalone/web/components/ui/use-toast.ts +0 -191
- package/web/.next/standalone/web/components.json +0 -21
- package/web/.next/standalone/web/hooks/use-mobile.ts +0 -19
- package/web/.next/standalone/web/hooks/use-toast.ts +0 -191
- package/web/.next/standalone/web/lib/hooks/index.ts +0 -8
- package/web/.next/standalone/web/lib/hooks/use-components.ts +0 -83
- package/web/.next/standalone/web/lib/hooks/use-connections.ts +0 -83
- package/web/.next/standalone/web/lib/hooks/use-projects.ts +0 -116
- package/web/.next/standalone/web/lib/hooks/use-prompts.ts +0 -122
- package/web/.next/standalone/web/lib/hooks/use-settings.ts +0 -135
- package/web/.next/standalone/web/lib/hooks/use-status.ts +0 -80
- package/web/.next/standalone/web/lib/project-context.tsx +0 -46
- package/web/.next/standalone/web/lib/transform.ts +0 -625
- package/web/.next/standalone/web/lib/types.ts +0 -198
- package/web/.next/standalone/web/lib/utils.ts +0 -6
- package/web/.next/standalone/web/next.config.mjs +0 -12
- package/web/.next/standalone/web/package-lock.json +0 -3987
- package/web/.next/standalone/web/package.json +0 -73
- package/web/.next/standalone/web/pnpm-lock.yaml +0 -5
- package/web/.next/standalone/web/postcss.config.mjs +0 -8
- package/web/.next/standalone/web/public/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon.svg +0 -26
- package/web/.next/standalone/web/public/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.svg +0 -1
- package/web/.next/standalone/web/public/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.svg +0 -1
- package/web/.next/standalone/web/server.js +0 -38
- package/web/.next/standalone/web/styles/globals.css +0 -125
- package/web/.next/standalone/web/tsconfig.json +0 -41
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_buildManifest.js +0 -11
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_clientMiddlewareManifest.json +0 -1
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_ssgManifest.js +0 -1
- package/web/.next/static/chunks/062ae79751df2759.js +0 -1
- package/web/.next/static/chunks/159889e17b2cf1f8.js +0 -2
- package/web/.next/static/chunks/458d6f37339fc069.js +0 -1
- package/web/.next/static/chunks/6d3d39425a878d7f.js +0 -1
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +0 -2
- package/web/.next/static/chunks/a6dad97d9634a72d.js +0 -1
- package/web/.next/static/chunks/c056475f5f4424b6.css +0 -1
- package/web/.next/static/chunks/c57fee8cce8d7cb9.js +0 -1
- package/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/static/chunks/dd22b5f2beb2cc31.js +0 -1
- package/web/.next/static/chunks/e0affeef0ddb9a97.js +0 -4
- package/web/.next/static/chunks/f74a6859e1c4d5e3.js +0 -1
- package/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +0 -3
- 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/public/apple-icon.png +0 -0
- package/web/public/icon-dark-32x32.png +0 -0
- package/web/public/icon-light-32x32.png +0 -0
- package/web/public/icon.svg +0 -26
- package/web/public/navgator-logo.png +0 -0
- package/web/public/placeholder-logo.png +0 -0
- package/web/public/placeholder-logo.svg +0 -1
- package/web/public/placeholder-user.jpg +0 -0
- package/web/public/placeholder.jpg +0 -0
- package/web/public/placeholder.svg +0 -1
- /package/web/{.next/standalone/web → runtime}/.next/package.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error/page/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error/page/next-font-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error/page/react-loadable-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error/page/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error/page.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_global-error.meta +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_not-found/page/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_not-found/page/react-loadable-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_not-found/page/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_not-found/page.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/_not-found.meta +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/components/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/components/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/components/route.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/connections/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/connections/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/connections/route.js.map +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/graph → runtime/.next/server/app/api/coverage}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/graph → runtime/.next/server/app/api/coverage}/route.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/graph/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/projects → runtime/.next/server/app/api/graph}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/projects → runtime/.next/server/app/api/graph}/route.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/projects/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/prompts → runtime/.next/server/app/api/projects}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/prompts → runtime/.next/server/app/api/projects}/route.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/prompts/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/scan → runtime/.next/server/app/api/prompts}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/scan → runtime/.next/server/app/api/prompts}/route.js.map +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/settings → runtime/.next/server/app/api/registry-health}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/settings → runtime/.next/server/app/api/registry-health}/route.js.map +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/status → runtime/.next/server/app/api/rules}/route/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/api/status → runtime/.next/server/app/api/rules}/route.js.map +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/scan/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/page → runtime/.next/server/app/api/scan/route}/server-reference-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/server/app/page.js.map → runtime/.next/server/app/api/scan/route.js.map} +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/settings/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/api/status/route/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/index.meta +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/page/app-paths-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/app/page/react-loadable-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/middleware-manifest.json +0 -0
- /package/web/{.next/standalone/web → runtime}/.next/server/pages-manifest.json +0 -0
- /package/web/{.next/standalone/web/.next/static/chunks/a6dad97d9634a72d.js → runtime/.next/static/chunks/0cz1d0mv5g_q7.js} +0 -0
- /package/web/{.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa → runtime/.next/static/t3UvrbzeeDimLG5J5Co_p}/_buildManifest.js +0 -0
- /package/web/{.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa → runtime/.next/static/t3UvrbzeeDimLG5J5Co_p}/_ssgManifest.js +0 -0
- /package/web/{.next/standalone/web → runtime}/public/apple-icon.png +0 -0
- /package/web/{.next/standalone/web → runtime}/public/icon-dark-32x32.png +0 -0
- /package/web/{.next/standalone/web → runtime}/public/icon-light-32x32.png +0 -0
- /package/web/{.next/standalone/web → runtime}/public/icon.svg +0 -0
- /package/web/{.next/standalone/web → runtime}/public/navgator-logo.png +0 -0
- /package/web/{.next/standalone/web → runtime}/public/placeholder-logo.png +0 -0
- /package/web/{.next/standalone/web → runtime}/public/placeholder-logo.svg +0 -0
- /package/web/{.next/standalone/web → runtime}/public/placeholder-user.jpg +0 -0
- /package/web/{.next/standalone/web → runtime}/public/placeholder.jpg +0 -0
- /package/web/{.next/standalone/web → runtime}/public/placeholder.svg +0 -0
package/dist/scanner.js
CHANGED
|
@@ -2,47 +2,921 @@
|
|
|
2
2
|
* NavGator Main Scanner
|
|
3
3
|
* Orchestrates all component and connection scanners
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import * as fs from 'fs';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
import { spawnSync } from 'node:child_process';
|
|
8
|
+
import { glob, globSync } from 'glob';
|
|
9
|
+
const DEFAULT_IGNORE_PATTERNS = [
|
|
10
|
+
'**/node_modules/**',
|
|
11
|
+
'**/dist/**',
|
|
12
|
+
'**/build/**',
|
|
13
|
+
'**/build-*/**',
|
|
14
|
+
'**/.next/**',
|
|
15
|
+
'**/__pycache__/**',
|
|
16
|
+
'**/venv/**',
|
|
17
|
+
'**/.venv/**',
|
|
18
|
+
'**/.git/**',
|
|
19
|
+
'**/.navgator/**',
|
|
20
|
+
'**/.rally/**',
|
|
21
|
+
'**/.build-loop/**',
|
|
22
|
+
'**/.claude/**',
|
|
23
|
+
'**/.codex/**',
|
|
24
|
+
'**/.ibr/**',
|
|
25
|
+
'**/.build/**',
|
|
26
|
+
'**/target/**',
|
|
27
|
+
'**/DerivedData/**',
|
|
28
|
+
'**/SourcePackages/**',
|
|
29
|
+
'**/.swiftpm/**',
|
|
30
|
+
'**/Pods/**',
|
|
31
|
+
'**/vendor/**',
|
|
32
|
+
'**/coverage/**',
|
|
33
|
+
// Saved-webpage asset directories (Mediasite/Confluence/MHTML exports etc.)
|
|
34
|
+
// contain inert JS that has no runtime role in the project.
|
|
35
|
+
'**/*_files/**',
|
|
36
|
+
];
|
|
37
|
+
function getIgnorePatterns(root) {
|
|
38
|
+
const userFile = path.join(root, '.navgatorignore');
|
|
39
|
+
if (!fs.existsSync(userFile))
|
|
40
|
+
return DEFAULT_IGNORE_PATTERNS;
|
|
41
|
+
try {
|
|
42
|
+
const userPatterns = fs.readFileSync(userFile, 'utf-8')
|
|
43
|
+
.split('\n')
|
|
44
|
+
.map(line => line.trim())
|
|
45
|
+
.filter(line => line && !line.startsWith('#'));
|
|
46
|
+
return [...DEFAULT_IGNORE_PATTERNS, ...userPatterns];
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return DEFAULT_IGNORE_PATTERNS;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Remove files ignored by the owning Git repository. `.gitignore` is the
|
|
54
|
+
* broadest source-grounded signal that a generated tree is not project source
|
|
55
|
+
* (for example the packaged `web/runtime/` dashboard). Tracked files are never
|
|
56
|
+
* removed by `git check-ignore`, even when a later pattern would match them.
|
|
57
|
+
* Non-Git directories and unavailable Git binaries fail open to the explicit
|
|
58
|
+
* NavGator ignore list above.
|
|
59
|
+
*/
|
|
60
|
+
export function excludeGitIgnoredFiles(root, files) {
|
|
61
|
+
if (files.length === 0 || process.env.NAVGATOR_NO_GIT_IGNORE === '1')
|
|
62
|
+
return files;
|
|
63
|
+
const input = `${files.join('\0')}\0`;
|
|
64
|
+
const result = spawnSync('git', ['check-ignore', '--stdin', '-z'], {
|
|
65
|
+
cwd: root,
|
|
66
|
+
input,
|
|
67
|
+
encoding: 'utf8',
|
|
68
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
69
|
+
});
|
|
70
|
+
if (result.status !== 0 && result.status !== 1)
|
|
71
|
+
return files;
|
|
72
|
+
const ignored = new Set((result.stdout || '').split('\0').filter(Boolean).map(file => file.replace(/\\/g, '/')));
|
|
73
|
+
// An explicitly selected scan root can itself live under a parent repo's
|
|
74
|
+
// ignored tree. In that case Git labels every path ignored; treating that as
|
|
75
|
+
// a source boundary would silently produce an empty architecture.
|
|
76
|
+
if (ignored.size === files.length)
|
|
77
|
+
return files;
|
|
78
|
+
return files.filter(file => !ignored.has(file.replace(/\\/g, '/')));
|
|
79
|
+
}
|
|
80
|
+
import { generateComponentId, } from './types.js';
|
|
81
|
+
import { getGitInfo } from './git.js';
|
|
82
|
+
import { enrichFromCache } from './enrich/external-resolver.js';
|
|
83
|
+
import { loadCache, makeLookup } from './enrich/cache.js';
|
|
6
84
|
import { scanNpmPackages, detectNpm } from './scanners/packages/npm.js';
|
|
7
85
|
import { scanPipPackages, detectPip } from './scanners/packages/pip.js';
|
|
8
86
|
import { scanSpmPackages, detectSpm } from './scanners/packages/swift.js';
|
|
87
|
+
import { scanCargoPackages, detectCargo } from './scanners/packages/cargo.js';
|
|
9
88
|
import { scanInfrastructure } from './scanners/infrastructure/index.js';
|
|
89
|
+
import { scanPrismaSchema, detectPrisma } from './scanners/infrastructure/prisma-scanner.js';
|
|
90
|
+
import { scanEnvVars, detectEnvFiles } from './scanners/infrastructure/env-scanner.js';
|
|
91
|
+
import { scanQueues, detectQueues } from './scanners/infrastructure/queue-scanner.js';
|
|
92
|
+
import { scanCronJobs, detectCrons } from './scanners/infrastructure/cron-scanner.js';
|
|
93
|
+
import { scanDeployConfig } from './scanners/infrastructure/deploy-scanner.js';
|
|
94
|
+
import { scanPrismaCalls } from './scanners/connections/prisma-calls.js';
|
|
95
|
+
import { scanFieldUsage, canAnalyzeFieldUsage } from './scanners/infrastructure/field-usage-analyzer.js';
|
|
96
|
+
import { scanTypeSpecValidation, canValidateTypeSpec } from './scanners/infrastructure/typespec-validator.js';
|
|
10
97
|
import { scanServiceCalls } from './scanners/connections/service-calls.js';
|
|
11
98
|
import { scanWithAST, scanDatabaseOperations } from './scanners/connections/ast-scanner.js';
|
|
12
99
|
import { scanPrompts, convertToArchitecture, formatPromptsOutput } from './scanners/prompts/index.js';
|
|
13
100
|
import { traceLLMCalls } from './scanners/connections/llm-call-tracer.js';
|
|
14
101
|
import { scanSwiftCode } from './scanners/swift/code-scanner.js';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
102
|
+
import { scanRustCode } from './scanners/rust/code-scanner.js';
|
|
103
|
+
import { scanImports } from './scanners/connections/import-scanner.js';
|
|
104
|
+
import { scanMarkdownContent } from './scanners/content/markdown-scanner.js';
|
|
105
|
+
import { languageOf } from './architecture-index.js';
|
|
106
|
+
import { storeComponents, storeConnections, migratePerEntityFiles, buildIndex, buildGraph, buildFileMap, buildSummary, savePromptScan, clearStorage, clearForFiles, loadIndex, loadAllComponents, loadAllConnections, loadReverseDeps, runIntegrityCheck, mergeByStableId, normalizeTrackedPath, partitionPriorStateForFiles, atomicWriteJSON, ensureStableIdPublic, buildReverseDepsIndex, buildDerivedManifest, createSnapshot, computeFileHashes, saveHashes, detectFileChanges, formatFileChangeSummary, } from './storage.js';
|
|
107
|
+
import { getConfig, ensureStorageDirectories, getIndexPath, SCHEMA_VERSION, STABLE_ID_SCHEME_VERSION, getComponentsPath, getConnectionsPath } from './config.js';
|
|
108
|
+
import { acquireScanLease } from './scan-lock.js';
|
|
109
|
+
import { scanLockPath } from './freshness/paths.js';
|
|
110
|
+
import { computeArchitectureDiff, classifySignificance, loadLatestSnapshot, buildSnapshotFromRecords, saveTimelineEntry, generateTimelineId, } from './diff.js';
|
|
111
|
+
import { registerProject } from './projects.js';
|
|
112
|
+
import { runAudit, updateEwmaForAudit } from './audit/index.js';
|
|
113
|
+
/**
|
|
114
|
+
* Strip internal scratch fields (prefixed with `__`) before persisting
|
|
115
|
+
* an AuditReport on a TimelineEntry.
|
|
116
|
+
*/
|
|
117
|
+
/**
|
|
118
|
+
* Name a synthesized file-node the same way the import-scanner names its
|
|
119
|
+
* internal-module components (`buildFileComponent` /`componentNameFromFile`),
|
|
120
|
+
* so a Swift/Rust file-node and a TypeScript module component read alike in
|
|
121
|
+
* the graph. Kept local to scanner.ts rather than exported from the import
|
|
122
|
+
* scanner because the two callers must stay independently changeable.
|
|
123
|
+
*/
|
|
124
|
+
function endpointNodeName(file) {
|
|
125
|
+
const normalized = file.replace(/\\/g, '/');
|
|
126
|
+
const withoutExtension = normalized.replace(/\.[^.]+$/, '');
|
|
127
|
+
const segments = withoutExtension.split('/').filter(Boolean);
|
|
128
|
+
if (segments[0] === 'src' || segments[0] === 'app' || segments[0] === 'lib')
|
|
129
|
+
segments.shift();
|
|
130
|
+
if (segments[segments.length - 1] === 'index' && segments.length > 1)
|
|
131
|
+
segments.pop();
|
|
132
|
+
return segments.join('/') || path.basename(withoutExtension);
|
|
133
|
+
}
|
|
134
|
+
function endpointNodeLayer(file) {
|
|
135
|
+
const normalized = file.replace(/\\/g, '/').toLowerCase();
|
|
136
|
+
if (/(^|\/)(ui|components|views|pages|frontend|web)(\/|$)/.test(normalized))
|
|
137
|
+
return 'frontend';
|
|
138
|
+
if (/(^|\/)(db|database|prisma|drizzle|migrations)(\/|$)/.test(normalized))
|
|
139
|
+
return 'database';
|
|
140
|
+
if (/(^|\/)(queue|queues|jobs|workers)(\/|$)/.test(normalized))
|
|
141
|
+
return 'queue';
|
|
142
|
+
if (/(^|\/)(infra|infrastructure|terraform|k8s|docker)(\/|$)/.test(normalized))
|
|
143
|
+
return 'infra';
|
|
144
|
+
return 'backend';
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Canonical form for a repo-relative file path used as a `FILE:` endpoint or
|
|
148
|
+
* a component's config_files entry (Run 4 fix2 #4): forward slashes, no
|
|
149
|
+
* leading `./`, no duplicated separators. `FILE:./src/a.ts`, `FILE:src//a.ts`
|
|
150
|
+
* and a component claiming `src/a.ts` must all meet on the same key.
|
|
151
|
+
*/
|
|
152
|
+
export function normalizeEndpointPath(p) {
|
|
153
|
+
let s = p.replace(/\\/g, '/');
|
|
154
|
+
s = s.replace(/\/{2,}/g, '/');
|
|
155
|
+
while (s.startsWith('./'))
|
|
156
|
+
s = s.slice(2);
|
|
157
|
+
s = s.replace(/\/\.\//g, '/');
|
|
158
|
+
return s;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* (C) Resolve FILE: prefixed connection endpoints to real component IDs so
|
|
162
|
+
* trace can follow imports from route files instead of dead-ending.
|
|
163
|
+
*
|
|
164
|
+
* (C2) Synthesize a file-node for every FILE: endpoint that survived (C).
|
|
165
|
+
* A surviving FILE: ref names a real source file that no scanner claimed as
|
|
166
|
+
* a component — Swift and Rust files, and TypeScript files the import
|
|
167
|
+
* scanner never walked (scripts/, _archive/, tests/). Storing such an edge
|
|
168
|
+
* leaves it dangling: `runIntegrityCheck` (storage.ts) exempts FILE: ids
|
|
169
|
+
* unconditionally, so the graph reports "ok" while trace dead-ends and the
|
|
170
|
+
* audit counts the edge as hallucinated. One file-node per file, created
|
|
171
|
+
* once, reused by every endpoint naming that file; only for paths that exist
|
|
172
|
+
* on disk (a component built on a phantom path would fail integrity check
|
|
173
|
+
* rule (2) and promote every later incremental scan to full).
|
|
174
|
+
*
|
|
175
|
+
* Mutates `components` (pushes file-nodes) and the endpoint ids in
|
|
176
|
+
* `connections`. Paths are normalized on both sides (fix2 #4).
|
|
177
|
+
*/
|
|
178
|
+
export function resolveFileEndpoints(components, connections, root) {
|
|
179
|
+
const compByFile = new Map(); // normalized file path → component_id
|
|
180
|
+
for (const comp of components) {
|
|
181
|
+
for (const f of comp.source?.config_files || []) {
|
|
182
|
+
const key = normalizeEndpointPath(f);
|
|
183
|
+
if (!compByFile.has(key))
|
|
184
|
+
compByFile.set(key, comp.component_id);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const fileNodeByPath = new Map();
|
|
188
|
+
const resolve = (ref) => {
|
|
189
|
+
const id = ref?.component_id;
|
|
190
|
+
if (!ref || !id?.startsWith('FILE:'))
|
|
191
|
+
return;
|
|
192
|
+
const filePath = normalizeEndpointPath(id.slice(5));
|
|
193
|
+
const claimed = compByFile.get(filePath);
|
|
194
|
+
if (claimed) {
|
|
195
|
+
ref.component_id = claimed;
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
let nodeId = fileNodeByPath.get(filePath);
|
|
199
|
+
if (!nodeId) {
|
|
200
|
+
if (!fs.existsSync(path.join(root, filePath)))
|
|
201
|
+
return;
|
|
202
|
+
const node = buildEndpointFileComponent(filePath, Date.now());
|
|
203
|
+
components.push(node);
|
|
204
|
+
compByFile.set(filePath, node.component_id);
|
|
205
|
+
fileNodeByPath.set(filePath, node.component_id);
|
|
206
|
+
nodeId = node.component_id;
|
|
207
|
+
}
|
|
208
|
+
ref.component_id = nodeId;
|
|
209
|
+
};
|
|
210
|
+
for (const conn of connections) {
|
|
211
|
+
resolve(conn.from);
|
|
212
|
+
resolve(conn.to);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Build the file-node that backs a `FILE:` connection endpoint no scanner
|
|
217
|
+
* claimed. Structurally identical to the import-scanner's internal-module
|
|
218
|
+
* component (same type/shape/config_files contract) so downstream consumers —
|
|
219
|
+
* dedup, stable_id, integrity check, trace — treat it as an ordinary component.
|
|
220
|
+
*/
|
|
221
|
+
function buildEndpointFileComponent(file, timestamp) {
|
|
222
|
+
return {
|
|
223
|
+
component_id: generateComponentId('component', endpointNodeName(file)),
|
|
224
|
+
name: endpointNodeName(file),
|
|
225
|
+
type: 'component',
|
|
226
|
+
role: {
|
|
227
|
+
purpose: `Source file at ${file}`,
|
|
228
|
+
layer: endpointNodeLayer(file),
|
|
229
|
+
critical: false,
|
|
230
|
+
},
|
|
231
|
+
source: { detection_method: 'auto', config_files: [file], confidence: 0.6 },
|
|
232
|
+
connects_to: [],
|
|
233
|
+
connected_from: [],
|
|
234
|
+
status: 'active',
|
|
235
|
+
tags: ['file-node'],
|
|
236
|
+
metadata: { file, kind: 'source-file', detected_from: 'endpoint-resolver' },
|
|
237
|
+
timestamp,
|
|
238
|
+
last_updated: timestamp,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function stripInternals(report) {
|
|
242
|
+
const { ...clean } = report;
|
|
243
|
+
for (const k of Object.keys(clean)) {
|
|
244
|
+
if (k.startsWith('__')) {
|
|
245
|
+
delete clean[k];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return clean;
|
|
249
|
+
}
|
|
250
|
+
import { classifyAllConnections } from './classify.js';
|
|
251
|
+
import { detectSandbox } from './sandbox.js';
|
|
252
|
+
import { ensureSafeGitignore } from './gitignore-safety.js';
|
|
253
|
+
// =============================================================================
|
|
254
|
+
// MULTI-STACK ROOT DISCOVERY
|
|
255
|
+
// =============================================================================
|
|
256
|
+
/**
|
|
257
|
+
* Manifest filenames that mark a directory as the root of a discrete stack.
|
|
258
|
+
* Keep language-canonical manifests together so root detection and nested
|
|
259
|
+
* discovery use the same contract.
|
|
260
|
+
*/
|
|
261
|
+
const STACK_MANIFESTS = [
|
|
262
|
+
'package.json',
|
|
263
|
+
'pyproject.toml',
|
|
264
|
+
'Cargo.toml',
|
|
265
|
+
'Package.swift',
|
|
266
|
+
'Podfile',
|
|
267
|
+
'Cartfile',
|
|
268
|
+
'go.mod',
|
|
269
|
+
'pom.xml',
|
|
270
|
+
'Gemfile',
|
|
271
|
+
// Catch-all for .NET — we glob the subdir for `*.csproj` separately
|
|
272
|
+
// because there's no fixed filename. Handled via discoverStackRoots.
|
|
273
|
+
];
|
|
274
|
+
/**
|
|
275
|
+
* Search nested wrapper directories under `root`, return roots to scan. Behavior:
|
|
276
|
+
*
|
|
277
|
+
* - If `root` has a stack manifest, include it as `{ origin: '.' }`.
|
|
278
|
+
* - Discover manifests up to five directory levels below the scan root. Any
|
|
279
|
+
* matching directory is included and nested stack descendants are pruned.
|
|
280
|
+
* - When more than one nested stack is found, all of them are scanned and
|
|
281
|
+
* components get an `origin_root` metadata tag so consumers can group.
|
|
282
|
+
*
|
|
283
|
+
* Uses the same `.navgatorignore` and Git-ignore boundary as source discovery.
|
|
284
|
+
*/
|
|
285
|
+
export function discoverStackRoots(root, verbose) {
|
|
286
|
+
// Use the same repo-root ignore contract as source discovery. `globSync`
|
|
287
|
+
// handles arbitrary `.navgatorignore` patterns; the prior hand-written
|
|
288
|
+
// directory list could not. maxDepth=5 keeps discovery bounded while
|
|
289
|
+
// supporting deeply wrapped monorepo stacks.
|
|
290
|
+
const fixedManifestPatterns = STACK_MANIFESTS.map(manifest => `**/${manifest}`);
|
|
291
|
+
const variableManifestPatterns = ['**/*.csproj', '**/*.xcodeproj', '**/*.xcworkspace'];
|
|
292
|
+
const matches = globSync([...fixedManifestPatterns, ...variableManifestPatterns], {
|
|
293
|
+
cwd: root,
|
|
294
|
+
ignore: getIgnorePatterns(root),
|
|
295
|
+
dot: false,
|
|
296
|
+
follow: false,
|
|
297
|
+
maxDepth: 5,
|
|
298
|
+
});
|
|
299
|
+
const ignoredFiltered = excludeGitIgnoredFiles(root, matches);
|
|
300
|
+
const origins = new Set();
|
|
301
|
+
for (const match of ignoredFiltered) {
|
|
302
|
+
const normalized = match.replace(/\\/g, '/');
|
|
303
|
+
const origin = path.posix.dirname(normalized);
|
|
304
|
+
origins.add(origin === '.' ? '.' : origin);
|
|
305
|
+
}
|
|
306
|
+
// Preserve the established rule: the project root is allowed to have child
|
|
307
|
+
// stack roots, but a nested stack root prunes descendants below itself.
|
|
308
|
+
const sortedOrigins = [...origins].sort((a, b) => {
|
|
309
|
+
const depth = (value) => value === '.' ? 0 : value.split('/').length;
|
|
310
|
+
return depth(a) - depth(b) || a.localeCompare(b);
|
|
311
|
+
});
|
|
312
|
+
const retained = [];
|
|
313
|
+
for (const origin of sortedOrigins) {
|
|
314
|
+
if (origin !== '.' && retained.some(parent => parent !== '.' && (origin === parent || origin.startsWith(`${parent}/`))))
|
|
315
|
+
continue;
|
|
316
|
+
retained.push(origin);
|
|
317
|
+
}
|
|
318
|
+
const found = retained.map(origin => ({
|
|
319
|
+
path: origin === '.' ? root : path.join(root, ...origin.split('/')),
|
|
320
|
+
origin,
|
|
321
|
+
}));
|
|
322
|
+
if (found.length === 0) {
|
|
323
|
+
// Nothing in the bounded nested search either — keep legacy behavior so older
|
|
324
|
+
// projects don't silently turn into no-ops.
|
|
325
|
+
if (verbose) {
|
|
326
|
+
console.log(' - No stack manifest at root or in nested wrappers; scanning root anyway');
|
|
327
|
+
}
|
|
328
|
+
return [{ path: root, origin: '.' }];
|
|
329
|
+
}
|
|
330
|
+
if (verbose && (found.length > 1 || found[0]?.origin !== '.')) {
|
|
331
|
+
console.log(` - Multi-stack project: ${found.length} nested root(s): ` +
|
|
332
|
+
found.map(f => f.origin).join(', '));
|
|
333
|
+
}
|
|
334
|
+
return found;
|
|
335
|
+
}
|
|
336
|
+
// =============================================================================
|
|
337
|
+
// MODE SELECTION (Run 1 — D2)
|
|
338
|
+
// =============================================================================
|
|
339
|
+
/**
|
|
340
|
+
* Files whose presence in fileChanges forces a full scan because they alter
|
|
341
|
+
* the package/dependency graph in ways that ripple through every component.
|
|
342
|
+
*/
|
|
343
|
+
const FULL_SCAN_TRIGGER_FILES = new Set([
|
|
344
|
+
// Lockfiles / manifests — change the package graph
|
|
345
|
+
'package.json',
|
|
346
|
+
'package-lock.json',
|
|
347
|
+
'pnpm-lock.yaml',
|
|
348
|
+
'yarn.lock',
|
|
349
|
+
'pyproject.toml',
|
|
350
|
+
'requirements.txt',
|
|
351
|
+
'requirements-dev.txt',
|
|
352
|
+
'requirements-test.txt',
|
|
353
|
+
'prisma/schema.prisma',
|
|
354
|
+
'Package.swift',
|
|
355
|
+
'Package.resolved',
|
|
356
|
+
'Podfile',
|
|
357
|
+
'Podfile.lock',
|
|
358
|
+
'Cartfile',
|
|
359
|
+
'Cartfile.resolved',
|
|
360
|
+
'Cargo.toml',
|
|
361
|
+
'Cargo.lock',
|
|
362
|
+
// Build / runtime config — change resolution, deploy targets, ignore rules
|
|
363
|
+
'tsconfig.json',
|
|
364
|
+
'jsconfig.json',
|
|
365
|
+
'vercel.json',
|
|
366
|
+
'fly.toml',
|
|
367
|
+
'railway.json',
|
|
368
|
+
'.gitignore',
|
|
369
|
+
]);
|
|
370
|
+
/** Days × ms in one day — used by stale-full check. */
|
|
371
|
+
const SEVEN_DAYS_MS = 7 * 24 * 60 * 60 * 1000;
|
|
372
|
+
/** Cap on consecutive incremental scans before forcing a full scan. */
|
|
373
|
+
const INCREMENTAL_CAP = 20;
|
|
374
|
+
/**
|
|
375
|
+
* Convert hook/ledger paths to the same project-relative POSIX identity used
|
|
376
|
+
* by glob, hashes, walk sets, and connection code references. Paths outside
|
|
377
|
+
* the project are ignored so a malformed hook payload cannot partition or
|
|
378
|
+
* clear unrelated canonical state.
|
|
379
|
+
*/
|
|
380
|
+
function normalizeForcedChangedFiles(files, root) {
|
|
381
|
+
const normalized = new Set();
|
|
382
|
+
for (const raw of files) {
|
|
383
|
+
const value = raw.trim();
|
|
384
|
+
if (!value || value.includes('\0'))
|
|
385
|
+
continue;
|
|
386
|
+
const tracked = normalizeTrackedPath(value, root);
|
|
387
|
+
if (!tracked || tracked === '..' || tracked.startsWith('../') || path.posix.isAbsolute(tracked)) {
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
normalized.add(tracked);
|
|
391
|
+
}
|
|
392
|
+
return [...normalized].sort();
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Decide whether to run a full or incremental scan based on the requested
|
|
396
|
+
* mode, the prior index state, and the file changes since last scan.
|
|
397
|
+
*
|
|
398
|
+
* Pure function — no I/O. All inputs precomputed by the caller.
|
|
399
|
+
*
|
|
400
|
+
* Policy (for mode='auto'):
|
|
401
|
+
* 1. No prior index → full / no-prior-state
|
|
402
|
+
* 2. schema_version mismatch (and not 1.0.0 → 1.1.0 soft-upgrade) → full / schema-mismatch
|
|
403
|
+
* 3. Any FULL_SCAN_TRIGGER_FILES in changedFiles → full / manifest-changed
|
|
404
|
+
* 4. now − last_full_scan > 7 days → full / stale-full
|
|
405
|
+
* 5. incrementals_since_full ≥ 20 → full / incremental-cap
|
|
406
|
+
* 6. No file changes at all → noop case (caller handles); we still return
|
|
407
|
+
* 'incremental' here for the no-op flow.
|
|
408
|
+
* 7. Else → incremental / fast-path
|
|
409
|
+
*/
|
|
410
|
+
export function selectScanMode(fileChanges, index, options, now = Date.now()) {
|
|
411
|
+
const mode = options.mode ?? (options.clearFirst ? 'full' : options.incremental ? 'incremental' : 'auto');
|
|
412
|
+
if (mode === 'full') {
|
|
413
|
+
return { mode: 'full', reason: 'flag-full' };
|
|
414
|
+
}
|
|
415
|
+
// Stable-id generations cannot be mixed in one incremental store. Force a
|
|
416
|
+
// rebuild even when the caller explicitly requested incremental; otherwise
|
|
417
|
+
// old survivors and fresh records coexist under incompatible join keys.
|
|
418
|
+
if (index && index.stable_id_scheme !== STABLE_ID_SCHEME_VERSION) {
|
|
419
|
+
return { mode: 'full', reason: 'stable-id-scheme-mismatch' };
|
|
420
|
+
}
|
|
421
|
+
if (mode === 'incremental') {
|
|
422
|
+
if (!index) {
|
|
423
|
+
return { mode: 'full', reason: 'no-prior-state' };
|
|
424
|
+
}
|
|
425
|
+
return { mode: 'incremental', reason: 'flag-incremental' };
|
|
426
|
+
}
|
|
427
|
+
// mode === 'auto'
|
|
428
|
+
if (!index) {
|
|
429
|
+
return { mode: 'full', reason: 'no-prior-state' };
|
|
430
|
+
}
|
|
431
|
+
// 1.0.0 → 1.1.0 is a soft upgrade (loadIndex injected defaults).
|
|
432
|
+
// Any other mismatch demands a full rebuild.
|
|
433
|
+
const sv = index.schema_version ?? '1.0.0';
|
|
434
|
+
if (sv !== '1.0.0' && sv !== SCHEMA_VERSION) {
|
|
435
|
+
return { mode: 'full', reason: 'schema-mismatch' };
|
|
436
|
+
}
|
|
437
|
+
// Run 2 — D5: prior scan's audit detected EWMA drift breach.
|
|
438
|
+
// Force a full + Cochran audit pass on this run.
|
|
439
|
+
if (index.pending_drift_breach) {
|
|
440
|
+
return { mode: 'full', reason: 'audit-drift-breach' };
|
|
441
|
+
}
|
|
442
|
+
const changed = new Set();
|
|
443
|
+
if (fileChanges) {
|
|
444
|
+
for (const f of fileChanges.added)
|
|
445
|
+
changed.add(f);
|
|
446
|
+
for (const f of fileChanges.modified)
|
|
447
|
+
changed.add(f);
|
|
448
|
+
for (const f of fileChanges.removed)
|
|
449
|
+
changed.add(f);
|
|
450
|
+
}
|
|
451
|
+
const changedMatchesTrigger = (file, trigger) => file === trigger || file.endsWith(`/${trigger}`);
|
|
452
|
+
for (const trigger of FULL_SCAN_TRIGGER_FILES) {
|
|
453
|
+
if (Array.from(changed).some((file) => changedMatchesTrigger(file, trigger))) {
|
|
454
|
+
return { mode: 'full', reason: 'manifest-changed' };
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
// New files have no recorded reverse-dep edges yet, so an incremental walk-set
|
|
458
|
+
// can't find their importers. Cleaner to force a full scan than gymnastics
|
|
459
|
+
// (Run 1.6 — item #5).
|
|
460
|
+
if (fileChanges && fileChanges.added.length > 0) {
|
|
461
|
+
return { mode: 'full', reason: 'new-files' };
|
|
462
|
+
}
|
|
463
|
+
const lastFull = index.last_full_scan ?? 0;
|
|
464
|
+
if (lastFull > 0 && now - lastFull > SEVEN_DAYS_MS) {
|
|
465
|
+
return { mode: 'full', reason: 'stale-full' };
|
|
466
|
+
}
|
|
467
|
+
const incCount = index.incrementals_since_full ?? 0;
|
|
468
|
+
if (incCount >= INCREMENTAL_CAP) {
|
|
469
|
+
return { mode: 'full', reason: 'incremental-cap' };
|
|
470
|
+
}
|
|
471
|
+
if (changed.size === 0) {
|
|
472
|
+
return { mode: 'incremental', reason: 'no-changes' };
|
|
473
|
+
}
|
|
474
|
+
return { mode: 'incremental', reason: 'fast-path' };
|
|
475
|
+
}
|
|
476
|
+
// =============================================================================
|
|
477
|
+
// SCAN COVERAGE (honesty contract — ARCHITECTURE.md § Coverage and blind spots)
|
|
478
|
+
// =============================================================================
|
|
479
|
+
//
|
|
480
|
+
// `src/architecture-index.ts` (lines ~71-104, ~383-431) already computes this
|
|
481
|
+
// exact idea for the committed, deterministic index projection. This section
|
|
482
|
+
// intentionally mirrors its wording and shape rather than inventing a second
|
|
483
|
+
// vocabulary for the same concept, so `scan` and `arch-index` never disagree
|
|
484
|
+
// about what "analyzed" means for a given language.
|
|
485
|
+
//
|
|
486
|
+
// The extension→language map is imported from `architecture-index.ts`
|
|
487
|
+
// (`LANGUAGE_BY_EXTENSION` / `languageOf`) rather than duplicated — a former
|
|
488
|
+
// version of this file kept its own `SCAN_COVERAGE_LANGUAGE_BY_EXTENSION`
|
|
489
|
+
// copy, and the two had already drifted (missing `.sh`/`.bash`/`.sql` here,
|
|
490
|
+
// missing `.scala` there) before this dedup. Only the extension map is
|
|
491
|
+
// shared; `SCAN_COVERAGE_ANALYZED_LANGUAGES` below stays local and
|
|
492
|
+
// deliberately different from `architecture-index.ts`'s `ANALYZED_LANGUAGES`
|
|
493
|
+
// — see the comment on it for why the two sets must never be merged.
|
|
494
|
+
/**
|
|
495
|
+
* Languages a registered scanner actually consumes, keyed to the same
|
|
496
|
+
* strings `LANGUAGE_BY_EXTENSION` (imported from `architecture-index.ts`)
|
|
497
|
+
* produces. A language absent from this set is still counted (files,
|
|
498
|
+
* components-that-happen-to-resolve) for coverage purposes, but its
|
|
499
|
+
* `internal_edges` is always reported as 0 — no scanner ever looked at it, so
|
|
500
|
+
* "zero" there means "not measured", never "not coupled".
|
|
501
|
+
*
|
|
502
|
+
* Deliberately WIDER than `architecture-index.ts`'s `ANALYZED_LANGUAGES`:
|
|
503
|
+
* the full `scan` command additionally runs the Swift and Rust code
|
|
504
|
+
* scanners (`scanSwiftCode` / `scanRustCode`, see imports above), which
|
|
505
|
+
* `arch-index` never invokes — it builds its graph from `scanImports` alone.
|
|
506
|
+
* Do not merge the two sets; doing so would make one of the two commands
|
|
507
|
+
* claim coverage it does not have.
|
|
508
|
+
*
|
|
509
|
+
* Adding a new language scanner means adding its language string here too.
|
|
510
|
+
* Nothing else in this file infers the analyzed set from scanner presence —
|
|
511
|
+
* a future scanner author must add the entry explicitly or their new
|
|
512
|
+
* language will silently keep reading as an unanalyzed blind spot.
|
|
513
|
+
*/
|
|
514
|
+
export const SCAN_COVERAGE_ANALYZED_LANGUAGES = new Set([
|
|
515
|
+
'TypeScript',
|
|
516
|
+
'JavaScript',
|
|
517
|
+
'Python',
|
|
518
|
+
'Swift',
|
|
519
|
+
'Rust',
|
|
520
|
+
]);
|
|
521
|
+
/**
|
|
522
|
+
* Computes the scan's coverage table plus the `ScanWarning`s it implies.
|
|
523
|
+
*
|
|
524
|
+
* Returns `{ coverage: undefined, warnings: [] }` when every language
|
|
525
|
+
* present in `scannableFiles` was analyzed and produced at least one
|
|
526
|
+
* internal edge (`status: 'full'`) — the caller must not attach `coverage`
|
|
527
|
+
* in that case, so a fully-covered scan stays byte-identical to a scan that
|
|
528
|
+
* predates this change.
|
|
529
|
+
*/
|
|
530
|
+
function computeScanCoverage(scannableFiles, components, connections) {
|
|
531
|
+
const filesByLanguage = new Map();
|
|
532
|
+
for (const file of scannableFiles) {
|
|
533
|
+
const lang = languageOf(file);
|
|
534
|
+
if (!lang)
|
|
535
|
+
continue;
|
|
536
|
+
if (!filesByLanguage.has(lang))
|
|
537
|
+
filesByLanguage.set(lang, []);
|
|
538
|
+
filesByLanguage.get(lang).push(file);
|
|
539
|
+
}
|
|
540
|
+
if (filesByLanguage.size === 0) {
|
|
541
|
+
return { coverage: undefined, warnings: [] };
|
|
542
|
+
}
|
|
543
|
+
// Component -> file, via the same fields every scanner in this repo uses
|
|
544
|
+
// for a source-file component: `source.config_files[0]` (import-scanner's
|
|
545
|
+
// `buildFileComponent`) or `metadata.file` (Swift/Rust scanners).
|
|
546
|
+
const componentFile = (c) => {
|
|
547
|
+
const cfgFile = c.source?.config_files?.[0];
|
|
548
|
+
if (typeof cfgFile === 'string' && cfgFile.length > 0)
|
|
549
|
+
return cfgFile;
|
|
550
|
+
const metaFile = c.metadata?.['file'];
|
|
551
|
+
return typeof metaFile === 'string' ? metaFile : undefined;
|
|
552
|
+
};
|
|
553
|
+
const componentsByLanguage = new Map();
|
|
554
|
+
for (const c of components) {
|
|
555
|
+
const file = componentFile(c);
|
|
556
|
+
if (!file)
|
|
557
|
+
continue;
|
|
558
|
+
const lang = languageOf(file);
|
|
559
|
+
if (!lang)
|
|
560
|
+
continue;
|
|
561
|
+
componentsByLanguage.set(lang, (componentsByLanguage.get(lang) ?? 0) + 1);
|
|
562
|
+
}
|
|
563
|
+
// Deduplicated internal `imports` edges by the origin file's language — two
|
|
564
|
+
// import statements for the same target are one edge, matching
|
|
565
|
+
// `architecture-index.ts`'s dedup so the two counts never disagree.
|
|
566
|
+
const edgesByLanguage = new Map();
|
|
567
|
+
for (const conn of connections) {
|
|
568
|
+
if (conn.connection_type !== 'imports')
|
|
569
|
+
continue;
|
|
570
|
+
const from = conn.from.location?.file ?? conn.code_reference?.file;
|
|
571
|
+
const to = conn.to.location?.file;
|
|
572
|
+
if (!from || !to || from === to)
|
|
573
|
+
continue;
|
|
574
|
+
const lang = languageOf(from);
|
|
575
|
+
if (!lang)
|
|
576
|
+
continue;
|
|
577
|
+
if (!edgesByLanguage.has(lang))
|
|
578
|
+
edgesByLanguage.set(lang, new Set());
|
|
579
|
+
edgesByLanguage.get(lang).add(`${from} ${to}`);
|
|
580
|
+
}
|
|
581
|
+
const languages = [...filesByLanguage.entries()]
|
|
582
|
+
.map(([language, files]) => {
|
|
583
|
+
const analyzed = SCAN_COVERAGE_ANALYZED_LANGUAGES.has(language);
|
|
584
|
+
return {
|
|
585
|
+
language,
|
|
586
|
+
files: files.length,
|
|
587
|
+
analyzed,
|
|
588
|
+
components: componentsByLanguage.get(language) ?? 0,
|
|
589
|
+
// Not analyzed => always 0, even if a stray edge matched by
|
|
590
|
+
// coincidence — an unanalyzed language cannot have produced a real
|
|
591
|
+
// edge, so reporting one would contradict `analyzed: false`.
|
|
592
|
+
internal_edges: analyzed ? edgesByLanguage.get(language)?.size ?? 0 : 0,
|
|
593
|
+
};
|
|
594
|
+
})
|
|
595
|
+
.sort((a, b) => a.language.localeCompare(b.language));
|
|
596
|
+
const analyzedLanguageNames = [...SCAN_COVERAGE_ANALYZED_LANGUAGES].sort().join('/');
|
|
597
|
+
const blindSpots = [];
|
|
598
|
+
let hasGap = false;
|
|
599
|
+
for (const lang of languages) {
|
|
600
|
+
if (!lang.analyzed) {
|
|
601
|
+
hasGap = true;
|
|
602
|
+
blindSpots.push(`${lang.files} ${lang.language} file(s) are present but NOT analyzed. NavGator's ` +
|
|
603
|
+
`scanners cover ${analyzedLanguageNames} only, so zero ${lang.language} edges here ` +
|
|
604
|
+
`means "not measured", never "not coupled".`);
|
|
605
|
+
}
|
|
606
|
+
else if (lang.files > 0 && lang.internal_edges === 0) {
|
|
607
|
+
hasGap = true;
|
|
608
|
+
blindSpots.push(`${lang.files} ${lang.language} file(s) were analyzed but produced zero internal ` +
|
|
609
|
+
`edges. Either those files genuinely import nothing local, or the scanner missed ` +
|
|
610
|
+
`them — this scan cannot tell the two apart, so do not read the absence as low coupling.`);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
blindSpots.sort();
|
|
614
|
+
const totalAnalyzedEdges = languages
|
|
615
|
+
.filter((l) => l.analyzed)
|
|
616
|
+
.reduce((sum, l) => sum + l.internal_edges, 0);
|
|
617
|
+
const status = totalAnalyzedEdges === 0 ? 'none' : hasGap ? 'partial' : 'full';
|
|
618
|
+
if (status === 'full') {
|
|
619
|
+
return { coverage: undefined, warnings: [] };
|
|
620
|
+
}
|
|
621
|
+
// Each blind spot is also a `ScanWarning`, so `warnings_count` stops
|
|
622
|
+
// reading 0 on a repo NavGator did not look at — a not-looked-at repo and
|
|
623
|
+
// a genuinely clean one must never print the same numbers.
|
|
624
|
+
const warnings = blindSpots.map((message) => ({
|
|
625
|
+
type: 'low_confidence',
|
|
626
|
+
message,
|
|
627
|
+
}));
|
|
628
|
+
return { coverage: { status, languages, blind_spots: blindSpots }, warnings };
|
|
629
|
+
}
|
|
17
630
|
// =============================================================================
|
|
18
631
|
// MAIN SCANNER
|
|
19
632
|
// =============================================================================
|
|
20
633
|
/**
|
|
21
634
|
* Run a full architecture scan
|
|
22
635
|
*/
|
|
636
|
+
/**
|
|
637
|
+
* Does a timeline diff agree with the component count the scan actually
|
|
638
|
+
* persisted?
|
|
639
|
+
*
|
|
640
|
+
* A diff whose `components_after` disagrees with what was just written is
|
|
641
|
+
* describing a different scan than the one that happened. See the call site in
|
|
642
|
+
* `scan()` for the two real entries in this repo's own timeline that exhibit
|
|
643
|
+
* it, and why the resulting event is suppressed rather than repaired here (the
|
|
644
|
+
* root cause is upstream in the Phase 5 snapshot build; this boundary only
|
|
645
|
+
* refuses to make it durable).
|
|
646
|
+
*
|
|
647
|
+
* Returns false when there is no diff at all, so the caller's ternary handles
|
|
648
|
+
* both "nothing to report" and "cannot be trusted" the same way.
|
|
649
|
+
*/
|
|
650
|
+
export function isDiffConsistentWithScan(entry, finalComponentCount) {
|
|
651
|
+
if (!entry?.diff)
|
|
652
|
+
return false;
|
|
653
|
+
return entry.diff.stats.components_after === finalComponentCount;
|
|
654
|
+
}
|
|
23
655
|
export async function scan(projectRoot, options = {}) {
|
|
24
656
|
const startTime = Date.now();
|
|
25
657
|
const root = projectRoot || process.cwd();
|
|
26
|
-
|
|
658
|
+
// Each scan owns its configuration snapshot. Call-level overrides must never
|
|
659
|
+
// mutate the cached process-wide config because a busy contender can overlap
|
|
660
|
+
// a winning scan in the same process.
|
|
661
|
+
const config = { ...getConfig() };
|
|
662
|
+
// R6 footprint fix: CLI/programmatic option overrides config flag.
|
|
663
|
+
if (options.perEntityFiles !== undefined) {
|
|
664
|
+
config.perEntityFiles = options.perEntityFiles;
|
|
665
|
+
}
|
|
666
|
+
// Degrade scan behavior per-capability, only for the restriction that
|
|
667
|
+
// capability actually needs. A permissive-but-detected environment like CI
|
|
668
|
+
// (`CI=true` sets sandbox.enabled but leaves every restriction false) is
|
|
669
|
+
// fully capable and MUST run a complete scan — otherwise AST-derived source
|
|
670
|
+
// components and child-process indexers silently vanish, which is exactly
|
|
671
|
+
// the code CI needs to exercise.
|
|
672
|
+
//
|
|
673
|
+
// Per-capability rule (do not force `quick`, `prompts: false`, or
|
|
674
|
+
// `useAST: false` from sandbox detection — that was the prior bug). Scope:
|
|
675
|
+
// the four bullets below describe the Phase-3 ANALYSIS capabilities only
|
|
676
|
+
// (src/scanners/, src/parsers/). scan() also does pre-analysis lease
|
|
677
|
+
// acquisition and post-analysis housekeeping that are NOT restriction-aware
|
|
678
|
+
// — see the paragraph after the bullets for those two exceptions.
|
|
679
|
+
// - SCIP (`options.scip` / NAVGATOR_SCIP=1) is the only genuine
|
|
680
|
+
// child-process dependency among the analysis capabilities: scip-runner.ts
|
|
681
|
+
// shells out via spawnSync. Disable it under `noChildProcess`.
|
|
682
|
+
// - `useAST` (ts-morph) and `prompts` (traceLLMCalls) both run in-process
|
|
683
|
+
// and write nothing during analysis (verified: no spawn*/exec* and no
|
|
684
|
+
// write call anywhere under src/scanners/ or src/parsers/ except
|
|
685
|
+
// scip-runner.ts). Neither needs a child process nor write access, so no
|
|
686
|
+
// restriction here disables them.
|
|
687
|
+
// - `quick` skips ALL of Phase 3 connection detection — a much bigger
|
|
688
|
+
// hammer than any single restriction justifies. Never force it here.
|
|
689
|
+
// - `readOnlyFs` is recorded in `restrictions` for visibility. It disables
|
|
690
|
+
// no analysis capability, since analysis itself performs no filesystem
|
|
691
|
+
// writes (persistence happens in the separate storage.ts write path
|
|
692
|
+
// after scan() returns).
|
|
693
|
+
//
|
|
694
|
+
// Two spots outside Phase-3 analysis do reach a child process or a real
|
|
695
|
+
// write, and neither is gated on these restrictions — both are safe under
|
|
696
|
+
// `noChildProcess` because the spawn call is try/caught with a fallback;
|
|
697
|
+
// `readOnlyFs` has one known gap, documented rather than fixed here:
|
|
698
|
+
// - `acquireScanLease` (below, ~line 637) runs BEFORE analysis starts.
|
|
699
|
+
// `execFileSync('sysctl'/'ps'/'powershell.exe')` for owner-fingerprinting
|
|
700
|
+
// (src/scan-lock.ts:88,112,124) is wrapped in try/catch per call, so the
|
|
701
|
+
// spawn cannot crash the scan. It does NOT fall back to a best-effort
|
|
702
|
+
// fingerprint: `defaultProcessFingerprint` returns `null` from its catch
|
|
703
|
+
// and from its tail, and `acquireScanLease` then publishes a record with
|
|
704
|
+
// no `owner_fingerprint`. That is not graceful degradation — under the
|
|
705
|
+
// post-SEC-011 reclaim policy a fingerprintless record is fenced on
|
|
706
|
+
// heartbeat age, so a live owner that is merely slow (suspend, SIGSTOP,
|
|
707
|
+
// blocked event loop) can be reclaimed and admit a second writer. Only
|
|
708
|
+
// `bootFingerprint()` has an uptime fallback. Tracked as a backlog item;
|
|
709
|
+
// this comment previously claimed the opposite and reassured readers
|
|
710
|
+
// about precisely the path that breaks. `fs.mkdirSync` + the lease-file
|
|
711
|
+
// publish (src/scan-lock.ts:445,475) are real writes: the publish itself
|
|
712
|
+
// is caught and returned as a structured `ScanLeaseResult` failure, but
|
|
713
|
+
// the leading `mkdirSync` is not caught — on a filesystem that is
|
|
714
|
+
// actually read-only it throws uncaught, and scan()'s
|
|
715
|
+
// `!acquisition.retryable` branch a few lines below also throws rather
|
|
716
|
+
// than returning a `degraded` result. This is a real, currently-unfixed
|
|
717
|
+
// gap in `readOnlyFs` coverage (NavGator's own `readOnlyFs` flag is
|
|
718
|
+
// advisory — nothing in this codebase gates a write on it, so nothing
|
|
719
|
+
// here actually enforces a read-only mount, and the gap does not
|
|
720
|
+
// reproduce against a normal filesystem). Behavior is unchanged from
|
|
721
|
+
// before this comment was corrected; not addressed here to avoid turning
|
|
722
|
+
// this change into a lease-subsystem refactor.
|
|
723
|
+
// - `ensureSafeGitignore` (below, ~line 2268) runs AFTER analysis
|
|
724
|
+
// completes. `execFileSync('git', ...)` (src/gitignore-safety.ts:87) is
|
|
725
|
+
// try/caught internally and falls back to treating the project as
|
|
726
|
+
// outside a git worktree. The `.gitignore` rewrite is a real write, but
|
|
727
|
+
// the call site wraps the whole `ensureSafeGitignore` call in a
|
|
728
|
+
// non-fatal try/catch — a failure there never fails the scan. The
|
|
729
|
+
// orphan-file purge after analysis (scanner.ts ~1852) is a real write
|
|
730
|
+
// too, but each unlink is individually swallowed (`.catch(() => {})`).
|
|
731
|
+
const sandbox = detectSandbox();
|
|
732
|
+
let degraded;
|
|
733
|
+
{
|
|
734
|
+
const restrictions = [];
|
|
735
|
+
const disabledCapabilities = [];
|
|
736
|
+
if (sandbox.enabled && sandbox.restrictions.noChildProcess) {
|
|
737
|
+
restrictions.push('noChildProcess');
|
|
738
|
+
options.scip = false;
|
|
739
|
+
disabledCapabilities.push('scip');
|
|
740
|
+
}
|
|
741
|
+
if (sandbox.enabled && sandbox.restrictions.readOnlyFs) {
|
|
742
|
+
restrictions.push('readOnlyFs');
|
|
743
|
+
}
|
|
744
|
+
if (disabledCapabilities.length > 0) {
|
|
745
|
+
const messageParts = [
|
|
746
|
+
'Scan ran without the SCIP overlay because the environment restricts child processes (noChildProcess).',
|
|
747
|
+
];
|
|
748
|
+
if (restrictions.includes('readOnlyFs')) {
|
|
749
|
+
messageParts.push('The environment also reports a read-only filesystem (readOnlyFs); no additional capability was disabled for it because Phase-3 analysis performs no filesystem writes.');
|
|
750
|
+
}
|
|
751
|
+
degraded = {
|
|
752
|
+
restrictions,
|
|
753
|
+
disabled_capabilities: disabledCapabilities,
|
|
754
|
+
message: messageParts.join(' '),
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
// Opt-in branch tracking
|
|
759
|
+
let gitInfo;
|
|
760
|
+
if (options.trackBranch) {
|
|
761
|
+
const info = await getGitInfo(root);
|
|
762
|
+
if (info) {
|
|
763
|
+
gitInfo = info;
|
|
764
|
+
if (options.verbose) {
|
|
765
|
+
console.log(`Branch tracking: ${info.branch} @ ${info.commit}`);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
27
769
|
if (options.verbose) {
|
|
28
770
|
console.log(`Scanning project: ${root}`);
|
|
29
771
|
}
|
|
30
|
-
// Clear existing data if requested
|
|
31
|
-
if (options.clearFirst) {
|
|
32
|
-
await clearStorage(config, root);
|
|
33
|
-
}
|
|
34
|
-
// Ensure storage directories exist
|
|
35
|
-
ensureStorageDirectories(config, root);
|
|
36
772
|
// ==========================================================================
|
|
37
|
-
// Phase 0:
|
|
773
|
+
// Phase 0.0: Concurrency lock (Run 1.6 — item #4)
|
|
38
774
|
// ==========================================================================
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
775
|
+
// Prevent two `navgator scan` processes corrupting each other's
|
|
776
|
+
// .navgator/architecture/ output. A heartbeat reports liveness; dead owners
|
|
777
|
+
// and stale unreadable records recover safely. Live contention returns `busy`.
|
|
778
|
+
const requestedScanType = options.mode ?? (options.clearFirst ? 'full' : options.incremental ? 'incremental' : 'auto');
|
|
779
|
+
const ownsLease = options._scanLease === undefined;
|
|
780
|
+
const acquisition = options._scanLease
|
|
781
|
+
? { ok: true, lease: options._scanLease }
|
|
782
|
+
: acquireScanLease(scanLockPath(root), requestedScanType);
|
|
783
|
+
if (!acquisition.ok) {
|
|
784
|
+
if (!acquisition.retryable) {
|
|
785
|
+
throw new Error(acquisition.message);
|
|
786
|
+
}
|
|
787
|
+
if (options.verbose)
|
|
788
|
+
console.log(acquisition.message);
|
|
789
|
+
const duration = Date.now() - startTime;
|
|
790
|
+
return {
|
|
791
|
+
status: 'busy',
|
|
792
|
+
retryable: true,
|
|
793
|
+
message: acquisition.message,
|
|
794
|
+
components: [],
|
|
795
|
+
connections: [],
|
|
796
|
+
warnings: [],
|
|
797
|
+
stats: {
|
|
798
|
+
scan_duration_ms: duration,
|
|
799
|
+
components_found: 0,
|
|
800
|
+
connections_found: 0,
|
|
801
|
+
warnings_count: 0,
|
|
802
|
+
files_scanned: 0,
|
|
803
|
+
files_changed: 0,
|
|
804
|
+
},
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
const lease = acquisition.lease;
|
|
808
|
+
try {
|
|
809
|
+
await options._onLeaseAcquired?.();
|
|
810
|
+
// Storage initialization includes legacy-path migration and therefore must
|
|
811
|
+
// happen only while this scan owns the canonical writer lease. Lease
|
|
812
|
+
// acquisition itself creates only the lock parent directory.
|
|
813
|
+
ensureStorageDirectories(config, root);
|
|
814
|
+
// ==========================================================================
|
|
815
|
+
// Phase 0: File Discovery & Change Detection
|
|
816
|
+
// ==========================================================================
|
|
817
|
+
// Widened (coverage reporting, Chunk 2) beyond the languages any scanner
|
|
818
|
+
// consumes: go/rb/java/kt/cs/php/scala/c/cpp/cc/hpp files must be globbed
|
|
819
|
+
// and hashed too, or `computeScanCoverage` below can never count them and
|
|
820
|
+
// the "present but not analyzed" warning silently never fires for them —
|
|
821
|
+
// the same false-negative this change exists to close. None of these
|
|
822
|
+
// extensions feed a scanner; they exist in `scannableFiles` for coverage
|
|
823
|
+
// counting and change-detection hashing only.
|
|
824
|
+
const discoveredSourceFiles = await glob('**/*.{ts,tsx,js,jsx,mjs,cjs,py,swift,rs,h,m,go,rb,java,kt,cs,php,scala,c,cpp,cc,hpp}', {
|
|
825
|
+
cwd: root,
|
|
826
|
+
ignore: getIgnorePatterns(root),
|
|
827
|
+
});
|
|
828
|
+
const sourceFiles = excludeGitIgnoredFiles(root, discoveredSourceFiles);
|
|
829
|
+
const contentEnabled = options.content === true || process.env['NAVGATOR_CONTENT'] === '1';
|
|
830
|
+
const discoveredMarkdownFiles = contentEnabled
|
|
831
|
+
? await glob('**/*.md', { cwd: root, ignore: getIgnorePatterns(root) })
|
|
832
|
+
: [];
|
|
833
|
+
const markdownFiles = excludeGitIgnoredFiles(root, discoveredMarkdownFiles);
|
|
834
|
+
const scannableFiles = [...sourceFiles, ...markdownFiles];
|
|
835
|
+
// For change detection, also include manifest files at the project root
|
|
836
|
+
// (and a few well-known nested ones). selectScanMode consults these to
|
|
837
|
+
// decide whether to force a full scan. Manifests are NOT scanned by the
|
|
838
|
+
// per-language scanners — they're tracked here only for change detection.
|
|
839
|
+
const manifestPatterns = [
|
|
840
|
+
'package.json',
|
|
841
|
+
'package-lock.json',
|
|
842
|
+
'pnpm-lock.yaml',
|
|
843
|
+
'yarn.lock',
|
|
844
|
+
'pyproject.toml',
|
|
845
|
+
'requirements.txt',
|
|
846
|
+
'requirements-dev.txt',
|
|
847
|
+
'requirements-test.txt',
|
|
848
|
+
'prisma/schema.prisma',
|
|
849
|
+
'Package.swift',
|
|
850
|
+
'Package.resolved',
|
|
851
|
+
'Podfile',
|
|
852
|
+
'Podfile.lock',
|
|
853
|
+
'Cartfile',
|
|
854
|
+
'Cartfile.resolved',
|
|
855
|
+
'Cargo.toml',
|
|
856
|
+
'Cargo.lock',
|
|
857
|
+
// Build / runtime config — track so changes trigger full scan
|
|
858
|
+
'tsconfig.json',
|
|
859
|
+
'jsconfig.json',
|
|
860
|
+
'vercel.json',
|
|
861
|
+
'fly.toml',
|
|
862
|
+
'railway.json',
|
|
863
|
+
'.gitignore',
|
|
864
|
+
];
|
|
865
|
+
const manifestFiles = [];
|
|
866
|
+
for (const m of manifestPatterns) {
|
|
867
|
+
try {
|
|
868
|
+
const fs = await import('node:fs');
|
|
869
|
+
if (fs.existsSync(path.join(root, m)))
|
|
870
|
+
manifestFiles.push(m);
|
|
871
|
+
}
|
|
872
|
+
catch {
|
|
873
|
+
// ignore
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
const rustManifestFiles = excludeGitIgnoredFiles(root, await glob('**/{Cargo.toml,Cargo.lock}', {
|
|
877
|
+
cwd: root,
|
|
878
|
+
ignore: getIgnorePatterns(root),
|
|
879
|
+
}));
|
|
880
|
+
for (const file of rustManifestFiles) {
|
|
881
|
+
if (!manifestFiles.includes(file))
|
|
882
|
+
manifestFiles.push(file);
|
|
883
|
+
}
|
|
884
|
+
const swiftManifestFiles = await glob('**/{Package.swift,Package.resolved,Podfile,Podfile.lock,Cartfile,Cartfile.resolved}', {
|
|
885
|
+
cwd: root,
|
|
886
|
+
ignore: getIgnorePatterns(root),
|
|
887
|
+
});
|
|
888
|
+
for (const file of swiftManifestFiles) {
|
|
889
|
+
if (!manifestFiles.includes(file))
|
|
890
|
+
manifestFiles.push(file);
|
|
891
|
+
}
|
|
892
|
+
const nestedModuleConfigFiles = await glob('**/{tsconfig.json,jsconfig.json}', {
|
|
893
|
+
cwd: root,
|
|
894
|
+
ignore: getIgnorePatterns(root),
|
|
895
|
+
});
|
|
896
|
+
for (const file of nestedModuleConfigFiles) {
|
|
897
|
+
if (!manifestFiles.includes(file))
|
|
898
|
+
manifestFiles.push(file);
|
|
899
|
+
}
|
|
900
|
+
const filesForChangeDetection = [...scannableFiles, ...manifestFiles];
|
|
901
|
+
// Detect file changes using prior hashes BEFORE any clearing.
|
|
902
|
+
// (Used by mode selection AND timeline summary even on full scans.)
|
|
903
|
+
let fileChanges;
|
|
904
|
+
fileChanges = await detectFileChanges(filesForChangeDetection, root, config);
|
|
905
|
+
// Freshness drains carry an immutable pre-scan ledger snapshot. Force those
|
|
906
|
+
// paths into the incremental walk even when hashes already match, because a
|
|
907
|
+
// prior scan may have persisted a late edit's hash without consuming it.
|
|
908
|
+
const forcedChangedFiles = normalizeForcedChangedFiles(options._forcedChangedFiles ?? [], root);
|
|
909
|
+
for (const forced of forcedChangedFiles) {
|
|
910
|
+
if (!fileChanges.added.includes(forced) &&
|
|
911
|
+
!fileChanges.modified.includes(forced) &&
|
|
912
|
+
!fileChanges.removed.includes(forced)) {
|
|
913
|
+
if (fs.existsSync(path.join(root, forced)))
|
|
914
|
+
fileChanges.modified.push(forced);
|
|
915
|
+
else
|
|
916
|
+
fileChanges.removed.push(forced);
|
|
917
|
+
fileChanges.unchanged = fileChanges.unchanged.filter((file) => file !== forced);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
46
920
|
if (options.verbose) {
|
|
47
921
|
console.log(`File changes: ${formatFileChangeSummary(fileChanges)}`);
|
|
48
922
|
if (fileChanges.added.length > 0 && fileChanges.added.length <= 5) {
|
|
@@ -52,283 +926,1571 @@ export async function scan(projectRoot, options = {}) {
|
|
|
52
926
|
console.log(` Modified: ${fileChanges.modified.join(', ')}`);
|
|
53
927
|
}
|
|
54
928
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
929
|
+
// ==========================================================================
|
|
930
|
+
// Phase 0.5: Scan-mode selection (Run 1 — D2)
|
|
931
|
+
// ==========================================================================
|
|
932
|
+
const priorIndex = await loadIndex(config, root);
|
|
933
|
+
const decision = selectScanMode(fileChanges, priorIndex, options);
|
|
934
|
+
// scanType captures the mode the scan ACTUALLY ran in (after potential
|
|
935
|
+
// integrity-check promotion). Initialized to the decision; may be promoted
|
|
936
|
+
// to 'incremental→full' below.
|
|
937
|
+
//
|
|
938
|
+
// Run 1.7 — Problem A: when this scan is the recursive re-entry from a
|
|
939
|
+
// failed integrity check (`_promotedFromIncremental === true`), `decision.mode`
|
|
940
|
+
// is 'full' (clearFirst forces it), but the user-visible scan_type should
|
|
941
|
+
// remain 'incremental→full' so timeline + stats consumers see the promotion
|
|
942
|
+
// evidence (Run 1.6 #3 contract). The actual scan body still runs as full.
|
|
943
|
+
let scanType = options._promotedFromIncremental ? 'incremental→full' : decision.mode;
|
|
944
|
+
if (options.verbose) {
|
|
945
|
+
console.log(`Scan mode: ${decision.mode} (${decision.reason})`);
|
|
946
|
+
}
|
|
947
|
+
// Compute walk-set for incremental: changedFiles ∪ reverseDeps
|
|
948
|
+
const changedSet = new Set();
|
|
949
|
+
if (fileChanges) {
|
|
950
|
+
for (const f of fileChanges.added)
|
|
951
|
+
changedSet.add(f);
|
|
952
|
+
for (const f of fileChanges.modified)
|
|
953
|
+
changedSet.add(f);
|
|
954
|
+
for (const f of fileChanges.removed)
|
|
955
|
+
changedSet.add(f);
|
|
956
|
+
}
|
|
957
|
+
let walkSet = new Set(changedSet);
|
|
958
|
+
if (decision.mode === 'incremental' && changedSet.size > 0) {
|
|
959
|
+
const reverseDeps = await loadReverseDeps(changedSet, config, root);
|
|
960
|
+
for (const f of reverseDeps)
|
|
961
|
+
walkSet.add(f);
|
|
962
|
+
if (options.verbose) {
|
|
963
|
+
console.log(` Walk-set: ${changedSet.size} changed + ${reverseDeps.size} reverse-deps = ${walkSet.size} files`);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
// Pass walkSet to scanners only on incremental. Full scans pass undefined to
|
|
967
|
+
// preserve bit-identical output (regression-locked by characterization snapshot).
|
|
968
|
+
const incWalkSet = decision.mode === 'incremental' ? walkSet : undefined;
|
|
969
|
+
// ==========================================================================
|
|
970
|
+
// Phase 0.6: Noop short-circuit (incremental + zero changes)
|
|
971
|
+
// ==========================================================================
|
|
972
|
+
if (decision.mode === 'incremental' && decision.reason === 'no-changes') {
|
|
973
|
+
// Nothing changed since last scan. Bump last_scan, update incrementals_since_full
|
|
974
|
+
// to 0 (no incremental work was done — but keep it as-is to honor the cap).
|
|
975
|
+
// Save fresh hashes (idempotent), update index timestamp, record noop timeline entry.
|
|
976
|
+
if (priorIndex) {
|
|
977
|
+
priorIndex.last_scan = Date.now();
|
|
978
|
+
// Note: incrementals_since_full and last_full_scan unchanged on noop.
|
|
979
|
+
await atomicWriteJSON(getIndexPath(config, root), priorIndex);
|
|
980
|
+
}
|
|
981
|
+
const fileHashes = await computeFileHashes(filesForChangeDetection, root);
|
|
982
|
+
await saveHashes(fileHashes, config, root);
|
|
983
|
+
const noopTimelineEntry = {
|
|
984
|
+
id: generateTimelineId(),
|
|
985
|
+
timestamp: Date.now(),
|
|
986
|
+
significance: 'patch',
|
|
987
|
+
triggers: [],
|
|
988
|
+
diff: {
|
|
989
|
+
components: { added: [], removed: [], modified: [] },
|
|
990
|
+
connections: { added: [], removed: [] },
|
|
991
|
+
stats: {
|
|
992
|
+
total_changes: 0,
|
|
993
|
+
components_before: priorIndex?.stats.total_components ?? 0,
|
|
994
|
+
components_after: priorIndex?.stats.total_components ?? 0,
|
|
995
|
+
connections_before: priorIndex?.stats.total_connections ?? 0,
|
|
996
|
+
connections_after: priorIndex?.stats.total_connections ?? 0,
|
|
997
|
+
},
|
|
998
|
+
},
|
|
999
|
+
git: gitInfo,
|
|
1000
|
+
scan_type: 'noop',
|
|
1001
|
+
files_scanned: 0,
|
|
1002
|
+
};
|
|
1003
|
+
await saveTimelineEntry(noopTimelineEntry, config, root);
|
|
1004
|
+
// Load existing components/connections so callers see the unchanged graph.
|
|
1005
|
+
const existingComponents = await loadAllComponents(config, root);
|
|
1006
|
+
const existingConnections = await loadAllConnections(config, root);
|
|
1007
|
+
const duration = Date.now() - startTime;
|
|
1008
|
+
if (options.verbose) {
|
|
1009
|
+
console.log(`Scan complete (noop) in ${duration}ms`);
|
|
1010
|
+
}
|
|
1011
|
+
// A noop still re-globs `scannableFiles` (Phase 0 runs before this
|
|
1012
|
+
// short-circuit), so the coverage table can be computed from the
|
|
1013
|
+
// existing graph without a fresh Phase-3 pass — a repo whose blind spot
|
|
1014
|
+
// was already disclosed on the prior scan must not go quiet on a noop.
|
|
1015
|
+
const noopCoverage = computeScanCoverage(scannableFiles, existingComponents, existingConnections);
|
|
1016
|
+
await options._beforeLeaseRelease?.();
|
|
1017
|
+
return {
|
|
1018
|
+
status: 'noop',
|
|
1019
|
+
retryable: false,
|
|
1020
|
+
components: existingComponents,
|
|
1021
|
+
connections: existingConnections,
|
|
1022
|
+
warnings: noopCoverage.warnings,
|
|
1023
|
+
fileChanges,
|
|
1024
|
+
timelineEntry: noopTimelineEntry,
|
|
1025
|
+
gitInfo,
|
|
1026
|
+
stats: {
|
|
1027
|
+
scan_duration_ms: duration,
|
|
1028
|
+
components_found: existingComponents.length,
|
|
1029
|
+
connections_found: existingConnections.length,
|
|
1030
|
+
warnings_count: noopCoverage.warnings.length,
|
|
1031
|
+
files_scanned: 0,
|
|
1032
|
+
files_changed: 0,
|
|
1033
|
+
},
|
|
1034
|
+
...(degraded ? { degraded } : {}),
|
|
1035
|
+
...(noopCoverage.coverage ? { coverage: noopCoverage.coverage } : {}),
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
// For full scans: clear ALL prior data up front (legacy clearFirst semantics).
|
|
1039
|
+
// For incremental: defer to Phase 4 (clearForFiles + merge).
|
|
1040
|
+
if (decision.mode === 'full' || options.clearFirst) {
|
|
1041
|
+
await clearStorage(config, root);
|
|
1042
|
+
ensureStorageDirectories(config, root);
|
|
1043
|
+
}
|
|
1044
|
+
const allComponents = [];
|
|
1045
|
+
const allConnections = [];
|
|
1046
|
+
const allWarnings = [];
|
|
1047
|
+
let promptScanResultHolder;
|
|
1048
|
+
let projectMetadata;
|
|
1049
|
+
// ==========================================================================
|
|
1050
|
+
// Phase 1: Package Detection
|
|
1051
|
+
// ==========================================================================
|
|
1052
|
+
if (options.verbose) {
|
|
1053
|
+
console.log('Phase 1: Scanning packages...');
|
|
1054
|
+
}
|
|
1055
|
+
// Package scanners run in parallel (independent of each other).
|
|
1056
|
+
//
|
|
1057
|
+
// Multi-stack auto-discovery: if the project root has no stack manifest
|
|
1058
|
+
// of its own, search nested wrapper directories and scan each subdir that does. This
|
|
1059
|
+
// catches the common monorepo-lite shape — a top-level `frontend/` with
|
|
1060
|
+
// package.json + a top-level `backend/` with pyproject.toml — that the
|
|
1061
|
+
// legacy single-root behavior silently missed (it would only scan
|
|
1062
|
+
// whichever side was at the root).
|
|
1063
|
+
//
|
|
1064
|
+
// Pass `singleStack: true` (CLI: --single-stack) to force the legacy
|
|
1065
|
+
// behavior. Each component scanned from a subroot gets its origin tagged
|
|
1066
|
+
// via `metadata.origin_root` so downstream layers can group by stack.
|
|
1067
|
+
const stackRoots = options.singleStack
|
|
1068
|
+
? [{ path: root, origin: '.' }]
|
|
1069
|
+
: discoverStackRoots(root, options.verbose === true);
|
|
1070
|
+
{
|
|
1071
|
+
const packageTasks = [];
|
|
1072
|
+
for (const sr of stackRoots) {
|
|
1073
|
+
const tagOrigin = (result) => {
|
|
1074
|
+
// Skip when origin is the root — keeps single-stack output identical.
|
|
1075
|
+
if (sr.origin === '.')
|
|
1076
|
+
return;
|
|
1077
|
+
for (const c of result.components) {
|
|
1078
|
+
const md = c.metadata ?? {};
|
|
1079
|
+
c.metadata = { ...md, origin_root: sr.origin };
|
|
1080
|
+
c.source.config_files = c.source.config_files.map(file => path.isAbsolute(file)
|
|
1081
|
+
? file
|
|
1082
|
+
: path.posix.join(sr.origin, file.replace(/\\/g, '/')));
|
|
1083
|
+
}
|
|
1084
|
+
for (const warning of result.warnings) {
|
|
1085
|
+
if (warning.file && !path.isAbsolute(warning.file)) {
|
|
1086
|
+
warning.file = path.posix.join(sr.origin, warning.file.replace(/\\/g, '/'));
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
if (detectNpm(sr.path)) {
|
|
1091
|
+
if (options.verbose) {
|
|
1092
|
+
console.log(` - Detected npm/yarn/pnpm project (${sr.origin})`);
|
|
1093
|
+
}
|
|
1094
|
+
packageTasks.push(scanNpmPackages(sr.path).then(result => {
|
|
1095
|
+
tagOrigin(result);
|
|
1096
|
+
allComponents.push(...result.components);
|
|
1097
|
+
allWarnings.push(...result.warnings);
|
|
1098
|
+
}));
|
|
1099
|
+
}
|
|
1100
|
+
if (detectPip(sr.path)) {
|
|
1101
|
+
if (options.verbose) {
|
|
1102
|
+
console.log(` - Detected Python project (${sr.origin})`);
|
|
1103
|
+
}
|
|
1104
|
+
packageTasks.push(scanPipPackages(sr.path).then(result => {
|
|
1105
|
+
tagOrigin(result);
|
|
1106
|
+
allComponents.push(...result.components);
|
|
1107
|
+
allWarnings.push(...result.warnings);
|
|
1108
|
+
}));
|
|
1109
|
+
}
|
|
1110
|
+
if (detectSpm(sr.path)) {
|
|
1111
|
+
if (options.verbose) {
|
|
1112
|
+
console.log(` - Detected Swift/Xcode project (${sr.origin})`);
|
|
1113
|
+
}
|
|
1114
|
+
packageTasks.push(scanSpmPackages(sr.path).then(result => {
|
|
1115
|
+
tagOrigin(result);
|
|
1116
|
+
allComponents.push(...result.components);
|
|
1117
|
+
allWarnings.push(...result.warnings);
|
|
1118
|
+
}));
|
|
1119
|
+
}
|
|
1120
|
+
if (detectCargo(sr.path)) {
|
|
1121
|
+
if (options.verbose) {
|
|
1122
|
+
console.log(` - Detected Rust/Cargo project (${sr.origin})`);
|
|
1123
|
+
}
|
|
1124
|
+
packageTasks.push(scanCargoPackages(sr.path).then(result => {
|
|
1125
|
+
tagOrigin(result);
|
|
1126
|
+
allComponents.push(...result.components);
|
|
1127
|
+
allWarnings.push(...result.warnings);
|
|
1128
|
+
}));
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
await Promise.all(packageTasks);
|
|
1132
|
+
}
|
|
1133
|
+
// ==========================================================================
|
|
1134
|
+
// Phase 1.5: Markdown content graph (opt-in)
|
|
1135
|
+
// ==========================================================================
|
|
1136
|
+
if (contentEnabled) {
|
|
1137
|
+
if (options.verbose)
|
|
1138
|
+
console.log('Phase 1.5: Scanning Markdown content links...');
|
|
1139
|
+
const contentResult = await scanMarkdownContent(root, markdownFiles, incWalkSet);
|
|
1140
|
+
allComponents.push(...contentResult.components);
|
|
1141
|
+
allConnections.push(...contentResult.connections);
|
|
1142
|
+
allWarnings.push(...contentResult.warnings);
|
|
1143
|
+
if (options.verbose) {
|
|
1144
|
+
console.log(` Documents: ${contentResult.components.length}, links: ${contentResult.connections.length}, unresolved: ${contentResult.warnings.filter(w => w.type === 'unresolved_link').length}`);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
// ==========================================================================
|
|
1148
|
+
// Phase 2: Infrastructure Detection
|
|
1149
|
+
// ==========================================================================
|
|
104
1150
|
if (options.verbose) {
|
|
105
|
-
console.log('Phase
|
|
1151
|
+
console.log('Phase 2: Scanning infrastructure...');
|
|
106
1152
|
}
|
|
107
|
-
|
|
108
|
-
|
|
1153
|
+
const infraResult = await scanInfrastructure(root);
|
|
1154
|
+
allComponents.push(...infraResult.components);
|
|
1155
|
+
allWarnings.push(...infraResult.warnings);
|
|
1156
|
+
// Prisma schema → database models + relations
|
|
1157
|
+
if (detectPrisma(root)) {
|
|
109
1158
|
if (options.verbose)
|
|
110
|
-
console.log(' -
|
|
1159
|
+
console.log(' - Detected Prisma schema');
|
|
111
1160
|
try {
|
|
112
|
-
const
|
|
113
|
-
allComponents.push(...
|
|
114
|
-
allConnections.push(...
|
|
115
|
-
allWarnings.push(...
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const dbResult = await scanDatabaseOperations(root);
|
|
120
|
-
allComponents.push(...dbResult.components);
|
|
121
|
-
allConnections.push(...dbResult.connections);
|
|
122
|
-
allWarnings.push(...dbResult.warnings);
|
|
1161
|
+
const prismaResult = await scanPrismaSchema(root);
|
|
1162
|
+
allComponents.push(...prismaResult.components);
|
|
1163
|
+
allConnections.push(...prismaResult.connections);
|
|
1164
|
+
allWarnings.push(...prismaResult.warnings);
|
|
1165
|
+
if (options.verbose) {
|
|
1166
|
+
console.log(` Models: ${prismaResult.components.length}, Relations: ${prismaResult.connections.length}`);
|
|
1167
|
+
}
|
|
123
1168
|
}
|
|
124
1169
|
catch (error) {
|
|
125
1170
|
allWarnings.push({
|
|
126
1171
|
type: 'parse_error',
|
|
127
|
-
message: `
|
|
1172
|
+
message: `Prisma scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
128
1173
|
});
|
|
129
|
-
// Fall back to regex scanning
|
|
130
|
-
if (options.verbose)
|
|
131
|
-
console.log(' - Falling back to regex scanning...');
|
|
132
|
-
const serviceResult = await scanServiceCalls(root);
|
|
133
|
-
allComponents.push(...serviceResult.components);
|
|
134
|
-
allConnections.push(...serviceResult.connections);
|
|
135
|
-
allWarnings.push(...serviceResult.warnings);
|
|
136
1174
|
}
|
|
137
1175
|
}
|
|
138
|
-
|
|
139
|
-
|
|
1176
|
+
// DB field usage analyzer (opt-in via FEATURE FLAG: fieldUsage)
|
|
1177
|
+
let fieldUsageReportResult;
|
|
1178
|
+
if (options.fieldUsage && canAnalyzeFieldUsage(root)) {
|
|
140
1179
|
if (options.verbose)
|
|
141
|
-
console.log(' -
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1180
|
+
console.log(' - Analyzing DB field usage...');
|
|
1181
|
+
try {
|
|
1182
|
+
const fieldResult = await scanFieldUsage(root, incWalkSet);
|
|
1183
|
+
allComponents.push(...fieldResult.components);
|
|
1184
|
+
allConnections.push(...fieldResult.connections);
|
|
1185
|
+
allWarnings.push(...fieldResult.warnings);
|
|
1186
|
+
fieldUsageReportResult = fieldResult.report;
|
|
1187
|
+
if (options.verbose && fieldResult.report) {
|
|
1188
|
+
const r = fieldResult.report;
|
|
1189
|
+
console.log(` Fields: ${r.totalFields} total, ${r.unusedFields} unused, ${r.writeOnlyFields} write-only`);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
catch (error) {
|
|
1193
|
+
allWarnings.push({
|
|
1194
|
+
type: 'parse_error',
|
|
1195
|
+
message: `Field usage analysis failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
// TypeSpec validator (opt-in via FEATURE FLAG: typeSpec)
|
|
1200
|
+
let typeSpecReportResult;
|
|
1201
|
+
if (options.typeSpec && canValidateTypeSpec(root)) {
|
|
149
1202
|
if (options.verbose)
|
|
150
|
-
console.log(' -
|
|
1203
|
+
console.log(' - Validating TypeSpec (Prisma vs TS interfaces)...');
|
|
151
1204
|
try {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
1205
|
+
const tsResult = await scanTypeSpecValidation(root);
|
|
1206
|
+
allWarnings.push(...tsResult.warnings);
|
|
1207
|
+
typeSpecReportResult = tsResult.report;
|
|
1208
|
+
if (options.verbose && tsResult.report) {
|
|
1209
|
+
const r = tsResult.report;
|
|
1210
|
+
console.log(` Interfaces: ${r.modelsWithInterfaces}/${r.modelsChecked} matched, ${r.totalMismatches} mismatches`);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
catch (error) {
|
|
1214
|
+
allWarnings.push({
|
|
1215
|
+
type: 'parse_error',
|
|
1216
|
+
message: `TypeSpec validation failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
// Env, queues, and crons are independent — run in parallel
|
|
1221
|
+
{
|
|
1222
|
+
const infraTasks = [];
|
|
1223
|
+
if (detectEnvFiles(root)) {
|
|
1224
|
+
if (options.verbose)
|
|
1225
|
+
console.log(' - Detected environment files');
|
|
1226
|
+
infraTasks.push(scanEnvVars(root, incWalkSet).then(envResult => {
|
|
1227
|
+
allComponents.push(...envResult.components);
|
|
1228
|
+
allConnections.push(...envResult.connections);
|
|
1229
|
+
allWarnings.push(...envResult.warnings);
|
|
1230
|
+
if (options.verbose) {
|
|
1231
|
+
console.log(` Env vars: ${envResult.components.length}, References: ${envResult.connections.length}`);
|
|
1232
|
+
}
|
|
1233
|
+
}).catch(error => {
|
|
1234
|
+
allWarnings.push({
|
|
1235
|
+
type: 'parse_error',
|
|
1236
|
+
message: `Env scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1237
|
+
});
|
|
1238
|
+
}));
|
|
1239
|
+
}
|
|
1240
|
+
if (detectQueues(root)) {
|
|
1241
|
+
if (options.verbose)
|
|
1242
|
+
console.log(' - Detected queue system');
|
|
1243
|
+
infraTasks.push(scanQueues(root, incWalkSet).then(queueResult => {
|
|
1244
|
+
allComponents.push(...queueResult.components);
|
|
1245
|
+
allConnections.push(...queueResult.connections);
|
|
1246
|
+
allWarnings.push(...queueResult.warnings);
|
|
1247
|
+
if (options.verbose) {
|
|
1248
|
+
console.log(` Queues: ${queueResult.components.length}, Connections: ${queueResult.connections.length}`);
|
|
161
1249
|
}
|
|
162
|
-
|
|
163
|
-
|
|
1250
|
+
}).catch(error => {
|
|
1251
|
+
allWarnings.push({
|
|
1252
|
+
type: 'parse_error',
|
|
1253
|
+
message: `Queue scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1254
|
+
});
|
|
1255
|
+
}));
|
|
1256
|
+
}
|
|
1257
|
+
if (detectCrons(root)) {
|
|
1258
|
+
if (options.verbose)
|
|
1259
|
+
console.log(' - Detected cron jobs');
|
|
1260
|
+
infraTasks.push(scanCronJobs(root, incWalkSet).then(cronResult => {
|
|
1261
|
+
allComponents.push(...cronResult.components);
|
|
1262
|
+
allConnections.push(...cronResult.connections);
|
|
1263
|
+
allWarnings.push(...cronResult.warnings);
|
|
1264
|
+
if (options.verbose) {
|
|
1265
|
+
console.log(` Cron jobs: ${cronResult.components.length}, Route connections: ${cronResult.connections.length}`);
|
|
164
1266
|
}
|
|
1267
|
+
}).catch(error => {
|
|
1268
|
+
allWarnings.push({
|
|
1269
|
+
type: 'parse_error',
|
|
1270
|
+
message: `Cron scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1271
|
+
});
|
|
1272
|
+
}));
|
|
1273
|
+
}
|
|
1274
|
+
await Promise.all(infraTasks);
|
|
1275
|
+
}
|
|
1276
|
+
// Deployment config → detailed infra metadata
|
|
1277
|
+
if (options.verbose)
|
|
1278
|
+
console.log(' - Scanning deployment config...');
|
|
1279
|
+
try {
|
|
1280
|
+
const deployResult = await scanDeployConfig(root);
|
|
1281
|
+
allComponents.push(...deployResult.components);
|
|
1282
|
+
allConnections.push(...deployResult.connections);
|
|
1283
|
+
allWarnings.push(...deployResult.warnings);
|
|
1284
|
+
if (options.verbose && deployResult.components.length > 0) {
|
|
1285
|
+
console.log(` Deploy configs: ${deployResult.components.length}, Entry points: ${deployResult.connections.length}`);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
catch (error) {
|
|
1289
|
+
allWarnings.push({
|
|
1290
|
+
type: 'parse_error',
|
|
1291
|
+
message: `Deploy config scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
// Prisma call detection: map source files to database models they query
|
|
1295
|
+
const prismaModelComps = allComponents.filter(c => c.type === 'database' && c.tags?.includes('prisma'));
|
|
1296
|
+
if (prismaModelComps.length > 0) {
|
|
1297
|
+
if (options.verbose)
|
|
1298
|
+
console.log(' - Scanning Prisma client calls...');
|
|
1299
|
+
try {
|
|
1300
|
+
const prismaCallResult = await scanPrismaCalls(root, prismaModelComps, incWalkSet);
|
|
1301
|
+
allConnections.push(...prismaCallResult.connections);
|
|
1302
|
+
if (options.verbose && prismaCallResult.connections.length > 0) {
|
|
1303
|
+
const uniqueModels = new Set(prismaCallResult.connections.map(c => c.description?.split(' queries ')[1]?.split(' ')[0]));
|
|
1304
|
+
console.log(` DB queries: ${prismaCallResult.connections.length} file→model connections across ${uniqueModels.size} models`);
|
|
165
1305
|
}
|
|
166
1306
|
}
|
|
167
1307
|
catch (error) {
|
|
168
1308
|
allWarnings.push({
|
|
169
1309
|
type: 'parse_error',
|
|
170
|
-
message: `
|
|
1310
|
+
message: `Prisma call scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
171
1311
|
});
|
|
172
1312
|
}
|
|
173
1313
|
}
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
|
|
1314
|
+
// ==========================================================================
|
|
1315
|
+
// Phase 3: Connection Detection (unless quick mode)
|
|
1316
|
+
// ==========================================================================
|
|
1317
|
+
if (!options.quick || options.connections) {
|
|
1318
|
+
if (options.verbose) {
|
|
1319
|
+
console.log('Phase 3: Scanning connections...');
|
|
1320
|
+
}
|
|
1321
|
+
if (options.useAST) {
|
|
1322
|
+
// AST-based scanning (more accurate)
|
|
1323
|
+
if (options.verbose)
|
|
1324
|
+
console.log(' - Running AST analysis (ts-morph)...');
|
|
1325
|
+
try {
|
|
1326
|
+
const astResult = await scanWithAST(root, incWalkSet);
|
|
1327
|
+
allComponents.push(...astResult.components);
|
|
1328
|
+
allConnections.push(...astResult.connections);
|
|
1329
|
+
allWarnings.push(...astResult.warnings);
|
|
1330
|
+
// Also scan for database operations
|
|
1331
|
+
if (options.verbose)
|
|
1332
|
+
console.log(' - Scanning database operations...');
|
|
1333
|
+
const dbResult = await scanDatabaseOperations(root, incWalkSet);
|
|
1334
|
+
allComponents.push(...dbResult.components);
|
|
1335
|
+
allConnections.push(...dbResult.connections);
|
|
1336
|
+
allWarnings.push(...dbResult.warnings);
|
|
1337
|
+
}
|
|
1338
|
+
catch (error) {
|
|
1339
|
+
allWarnings.push({
|
|
1340
|
+
type: 'parse_error',
|
|
1341
|
+
message: `AST scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1342
|
+
});
|
|
1343
|
+
// Fall back to regex scanning
|
|
1344
|
+
if (options.verbose)
|
|
1345
|
+
console.log(' - Falling back to regex scanning...');
|
|
1346
|
+
const serviceResult = await scanServiceCalls(root, incWalkSet);
|
|
1347
|
+
allComponents.push(...serviceResult.components);
|
|
1348
|
+
allConnections.push(...serviceResult.connections);
|
|
1349
|
+
allWarnings.push(...serviceResult.warnings);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
else {
|
|
1353
|
+
// Regex-based scanning (faster but less accurate)
|
|
1354
|
+
if (options.verbose)
|
|
1355
|
+
console.log(' - Scanning service calls (regex)...');
|
|
1356
|
+
const serviceResult = await scanServiceCalls(root, incWalkSet);
|
|
1357
|
+
allComponents.push(...serviceResult.components);
|
|
1358
|
+
allConnections.push(...serviceResult.connections);
|
|
1359
|
+
allWarnings.push(...serviceResult.warnings);
|
|
1360
|
+
}
|
|
1361
|
+
// File-level import graph (TS/JS + Python local imports)
|
|
177
1362
|
if (options.verbose)
|
|
178
|
-
console.log(' -
|
|
179
|
-
let traceResult;
|
|
1363
|
+
console.log(' - Scanning file imports...');
|
|
180
1364
|
try {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
1365
|
+
// Collect npm package components so bare imports (`import X from "react"`)
|
|
1366
|
+
// can be resolved to the package component and emitted as `uses-package`
|
|
1367
|
+
// edges. Use config_files filter instead of type filter: packages can be
|
|
1368
|
+
// classified as 'npm' | 'framework' | 'database' | 'service' depending
|
|
1369
|
+
// on FRAMEWORK_SIGNATURES, but all originate from a package.json. Pip
|
|
1370
|
+
// packages get the same config_files-based treatment just below, keyed
|
|
1371
|
+
// on requirements.txt / pyproject.toml instead — see `scanPipPackages`
|
|
1372
|
+
// in `src/scanners/packages/pip.ts` for what actually produces them.
|
|
1373
|
+
const npmKnownPackages = allComponents
|
|
1374
|
+
.filter(c => c.source.config_files?.some(f => f === 'package.json' || f.endsWith('/package.json')))
|
|
1375
|
+
.map(c => ({ name: c.name, component_id: c.component_id }));
|
|
1376
|
+
// Pip components: match the manifests `scanPipPackages` (pip.ts)
|
|
1377
|
+
// actually parses into components today (requirements.txt,
|
|
1378
|
+
// pyproject.toml), plus requirements-*.txt / setup.py / Pipfile for
|
|
1379
|
+
// forward compatibility if that scanner grows to parse them later.
|
|
1380
|
+
// `scanPipPackages` never emits a setup.cfg-sourced component (it's
|
|
1381
|
+
// not referenced anywhere in pip.ts), so that manifest is deliberately
|
|
1382
|
+
// left out here rather than guessed at.
|
|
1383
|
+
const PIP_MANIFEST_RE = /(^|\/)(requirements(-[\w.]+)?\.txt|pyproject\.toml|setup\.py|Pipfile)$/;
|
|
1384
|
+
const pipComponents = allComponents.filter(c => c.source.config_files?.some(f => PIP_MANIFEST_RE.test(f.replace(/\\/g, '/'))));
|
|
1385
|
+
// A pip distribution name and the name Python code actually imports
|
|
1386
|
+
// can differ (`beautifulsoup4` -> `bs4`, `Pillow` -> `PIL`, ...).
|
|
1387
|
+
// Deliberately partial — only the well-known mismatches that show up
|
|
1388
|
+
// constantly in real requirements.txt files. An import head that
|
|
1389
|
+
// isn't a known distribution name and isn't in this map resolves to
|
|
1390
|
+
// nothing, matching the TS/JS bare-import contract: no match, no
|
|
1391
|
+
// ghost node.
|
|
1392
|
+
const PIP_IMPORT_ALIASES = {
|
|
1393
|
+
beautifulsoup4: 'bs4',
|
|
1394
|
+
pillow: 'PIL',
|
|
1395
|
+
pyyaml: 'yaml',
|
|
1396
|
+
'python-dateutil': 'dateutil',
|
|
1397
|
+
'scikit-learn': 'sklearn',
|
|
1398
|
+
'opencv-python': 'cv2',
|
|
1399
|
+
attrs: 'attr',
|
|
1400
|
+
'msgpack-python': 'msgpack',
|
|
1401
|
+
protobuf: 'google',
|
|
1402
|
+
};
|
|
1403
|
+
// PyPI distribution names treat '-', '_', and '.' as equivalent
|
|
1404
|
+
// (PEP 503); canonicalize before consulting the alias map so
|
|
1405
|
+
// `scikit_learn`/`scikit.learn`/`scikit-learn` all match the same key.
|
|
1406
|
+
const canonicalPipName = (name) => name.toLowerCase().replace(/[._]+/g, '-');
|
|
1407
|
+
const pipKnownPackages = [];
|
|
1408
|
+
for (const c of pipComponents) {
|
|
1409
|
+
pipKnownPackages.push({ name: c.name, component_id: c.component_id });
|
|
1410
|
+
const alias = PIP_IMPORT_ALIASES[canonicalPipName(c.name)];
|
|
1411
|
+
if (alias)
|
|
1412
|
+
pipKnownPackages.push({ name: alias, component_id: c.component_id });
|
|
1413
|
+
}
|
|
1414
|
+
// `scanImports`'s `knownPackages` map is one flat namespace shared by
|
|
1415
|
+
// both its TS/JS and Python bare-import passes (`KnownPackage` in
|
|
1416
|
+
// `src/scanners/connections/import-scanner.ts` carries no ecosystem
|
|
1417
|
+
// tag). Passing one merged npm+pip list would let a pip package
|
|
1418
|
+
// cross-link to a same-named npm package or vice versa (e.g. a pip
|
|
1419
|
+
// `requests` resolving to an npm `requests`). Instead, call
|
|
1420
|
+
// `scanImports` once per ecosystem's own file set with only that
|
|
1421
|
+
// ecosystem's package list — the TS/JS call never sees a .py file and
|
|
1422
|
+
// the pip call never sees a TS/JS file, so neither list's names can
|
|
1423
|
+
// leak into the other's resolution. The TS/JS call's inputs
|
|
1424
|
+
// (non-Python files, npm-only package list) are unchanged from
|
|
1425
|
+
// before this split, so its output is unchanged too.
|
|
1426
|
+
const pythonSourceFiles = sourceFiles.filter(f => f.replace(/\\/g, '/').endsWith('.py'));
|
|
1427
|
+
const nonPythonSourceFiles = sourceFiles.filter(f => !f.replace(/\\/g, '/').endsWith('.py'));
|
|
1428
|
+
// Import resolution needs the complete source-file universe even when
|
|
1429
|
+
// only a subset of origins is dirty. Otherwise an unchanged local target
|
|
1430
|
+
// is absent from knownFiles and a valid edge silently disappears. Scan
|
|
1431
|
+
// against the complete universe, then retain only dirty-origin edges for
|
|
1432
|
+
// the incremental delta.
|
|
1433
|
+
const tsJsImportResult = await scanImports(root, nonPythonSourceFiles, npmKnownPackages);
|
|
1434
|
+
const pythonImportResult = pythonSourceFiles.length > 0
|
|
1435
|
+
? await scanImports(root, pythonSourceFiles, pipKnownPackages)
|
|
1436
|
+
: { components: [], connections: [], warnings: [] };
|
|
1437
|
+
const importResult = {
|
|
1438
|
+
components: [...tsJsImportResult.components, ...pythonImportResult.components],
|
|
1439
|
+
connections: [...tsJsImportResult.connections, ...pythonImportResult.connections],
|
|
1440
|
+
warnings: [...tsJsImportResult.warnings, ...pythonImportResult.warnings],
|
|
1441
|
+
};
|
|
1442
|
+
const importConnections = incWalkSet
|
|
1443
|
+
? importResult.connections.filter(connection => {
|
|
1444
|
+
const origin = connection.code_reference?.file?.replace(/\\/g, '/');
|
|
1445
|
+
return origin !== undefined && incWalkSet.has(origin);
|
|
1446
|
+
})
|
|
1447
|
+
: importResult.connections;
|
|
1448
|
+
allComponents.push(...importResult.components);
|
|
1449
|
+
allConnections.push(...importConnections);
|
|
184
1450
|
if (options.verbose) {
|
|
185
|
-
|
|
186
|
-
console.log(`
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
1451
|
+
const usesPkgCount = importConnections.filter(c => c.connection_type === 'uses-package').length;
|
|
1452
|
+
console.log(` Found ${importResult.components.length} internal modules, ${importConnections.length} file-level imports (${usesPkgCount} uses-package)`);
|
|
1453
|
+
}
|
|
1454
|
+
// SCIP overlay (T11): when --scip / NAVGATOR_SCIP=1, run the
|
|
1455
|
+
// compiler-accurate indexer and ADD any cross-file edges the regex
|
|
1456
|
+
// import-scanner missed (re-exports, dynamic imports, type-only refs,
|
|
1457
|
+
// etc.). Existing edges from the regex pass are preserved as-is so
|
|
1458
|
+
// the characterization snapshots stay stable for non-SCIP runs.
|
|
1459
|
+
// An explicit `scip: false` overrides the ambient NAVGATOR_SCIP=1 opt-in.
|
|
1460
|
+
// The sandbox degradation block sets exactly that when `noChildProcess`
|
|
1461
|
+
// is active, and SCIP is the one pass that shells out (spawnSync in
|
|
1462
|
+
// scip-runner.ts). Reading the env var alone would spawn a child process
|
|
1463
|
+
// in an environment that forbids one. The prior code masked this by
|
|
1464
|
+
// forcing `quick`, which skipped all of Phase 3 including this block.
|
|
1465
|
+
const scipRequested = process.env['NAVGATOR_SCIP'] === '1' || options.scip === true;
|
|
1466
|
+
const scipEnabled = scipRequested && options.scip !== false;
|
|
1467
|
+
if (scipEnabled) {
|
|
1468
|
+
try {
|
|
1469
|
+
const { runScip, crossFileEdges, hasTsConfig } = await import('./parsers/scip-runner.js');
|
|
1470
|
+
if (!hasTsConfig(root)) {
|
|
1471
|
+
if (options.verbose)
|
|
1472
|
+
console.log(' SCIP requested but no tsconfig.json — skipping');
|
|
1473
|
+
}
|
|
1474
|
+
else {
|
|
1475
|
+
if (options.verbose)
|
|
1476
|
+
console.log(' - Running SCIP indexer (compiler-accurate)...');
|
|
1477
|
+
const scipResult = await runScip(root, { timeoutMs: 60_000 });
|
|
1478
|
+
if (!scipResult.ok) {
|
|
1479
|
+
allWarnings.push({
|
|
1480
|
+
type: 'parse_error',
|
|
1481
|
+
message: `SCIP indexer failed: ${scipResult.error}`,
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
else {
|
|
1485
|
+
const cross = crossFileEdges(scipResult.edges);
|
|
1486
|
+
const fileToComponentId = new Map();
|
|
1487
|
+
for (const c of importResult.components) {
|
|
1488
|
+
const f = c.source?.config_files?.[0];
|
|
1489
|
+
if (f)
|
|
1490
|
+
fileToComponentId.set(f, c.component_id);
|
|
1491
|
+
}
|
|
1492
|
+
const existing = new Set(importResult.connections
|
|
1493
|
+
.filter((c) => c.connection_type === 'imports')
|
|
1494
|
+
.map((c) => `${c.from?.location?.file ?? ''}→${c.code_reference?.file ?? ''}`));
|
|
1495
|
+
let added = 0;
|
|
1496
|
+
const now = Date.now();
|
|
1497
|
+
for (const e of cross) {
|
|
1498
|
+
const fromId = fileToComponentId.get(e.from_file);
|
|
1499
|
+
const toId = fileToComponentId.get(e.to_file ?? '');
|
|
1500
|
+
if (!fromId || !toId)
|
|
1501
|
+
continue;
|
|
1502
|
+
const key = `${e.from_file}→${e.to_file}`;
|
|
1503
|
+
if (existing.has(key))
|
|
1504
|
+
continue;
|
|
1505
|
+
existing.add(key);
|
|
1506
|
+
allConnections.push({
|
|
1507
|
+
connection_id: `CONN_imports_scip_${Math.random().toString(36).slice(2, 10)}`,
|
|
1508
|
+
from: {
|
|
1509
|
+
component_id: fromId,
|
|
1510
|
+
location: { file: e.from_file, line: e.from_line + 1 },
|
|
1511
|
+
},
|
|
1512
|
+
to: { component_id: toId },
|
|
1513
|
+
connection_type: 'imports',
|
|
1514
|
+
code_reference: {
|
|
1515
|
+
file: e.from_file,
|
|
1516
|
+
symbol: e.display_name || e.symbol.split('/').pop()?.slice(0, 40) || 'scip-ref',
|
|
1517
|
+
symbol_type: e.is_definition ? 'export' : 'import',
|
|
1518
|
+
line_start: e.from_line + 1,
|
|
1519
|
+
},
|
|
1520
|
+
description: 'SCIP-resolved cross-file reference',
|
|
1521
|
+
detected_from: 'scip-typescript',
|
|
1522
|
+
confidence: 0.99,
|
|
1523
|
+
timestamp: now,
|
|
1524
|
+
last_verified: now,
|
|
1525
|
+
});
|
|
1526
|
+
added++;
|
|
1527
|
+
}
|
|
1528
|
+
if (options.verbose) {
|
|
1529
|
+
console.log(` SCIP added ${added} cross-file edges (${scipResult.duration_ms}ms, ${scipResult.documents_indexed} docs)`);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
191
1533
|
}
|
|
192
|
-
|
|
193
|
-
|
|
1534
|
+
catch (err) {
|
|
1535
|
+
allWarnings.push({
|
|
1536
|
+
type: 'parse_error',
|
|
1537
|
+
message: `SCIP overlay failed: ${err.message}`,
|
|
1538
|
+
});
|
|
194
1539
|
}
|
|
195
1540
|
}
|
|
196
1541
|
}
|
|
197
1542
|
catch (error) {
|
|
198
1543
|
allWarnings.push({
|
|
199
1544
|
type: 'parse_error',
|
|
200
|
-
message: `
|
|
1545
|
+
message: `Import scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
201
1546
|
});
|
|
1547
|
+
}
|
|
1548
|
+
// Swift code analysis (runtime deps, protocols, state, LLM calls)
|
|
1549
|
+
const swiftStackRoots = stackRoots.filter(sr => detectSpm(sr.path));
|
|
1550
|
+
if (swiftStackRoots.length > 0) {
|
|
202
1551
|
if (options.verbose)
|
|
203
|
-
console.log(
|
|
1552
|
+
console.log(' - Scanning Swift code connections...');
|
|
1553
|
+
try {
|
|
1554
|
+
const swiftResult = await scanSwiftCode(root, incWalkSet);
|
|
1555
|
+
allComponents.push(...swiftResult.components);
|
|
1556
|
+
allConnections.push(...swiftResult.connections);
|
|
1557
|
+
allWarnings.push(...swiftResult.warnings);
|
|
1558
|
+
projectMetadata = swiftResult.projectMeta;
|
|
1559
|
+
if (options.verbose) {
|
|
1560
|
+
console.log(` Swift: ${swiftResult.components.length} components, ${swiftResult.connections.length} connections`);
|
|
1561
|
+
if (swiftResult.projectMeta.platforms) {
|
|
1562
|
+
console.log(` Platforms: ${swiftResult.projectMeta.platforms.join(', ')}`);
|
|
1563
|
+
}
|
|
1564
|
+
if (swiftResult.projectMeta.architecture_pattern) {
|
|
1565
|
+
console.log(` Architecture: ${swiftResult.projectMeta.architecture_pattern}`);
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
catch (error) {
|
|
1570
|
+
allWarnings.push({
|
|
1571
|
+
type: 'parse_error',
|
|
1572
|
+
message: `Swift code scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
// Xcode project analysis (.pbxproj + storyboards)
|
|
1576
|
+
try {
|
|
1577
|
+
const { findXcodeProject } = await import('./scanners/packages/swift.js');
|
|
1578
|
+
for (const swiftRoot of swiftStackRoots) {
|
|
1579
|
+
const pbxprojPath = findXcodeProject(swiftRoot.path);
|
|
1580
|
+
if (!pbxprojPath)
|
|
1581
|
+
continue;
|
|
1582
|
+
if (options.verbose)
|
|
1583
|
+
console.log(' - Scanning Xcode project...');
|
|
1584
|
+
const { parseXcodeProject, mapTargetToComponent, mapSourceMembership } = await import('./scanners/xcode/pbxproj-parser.js');
|
|
1585
|
+
const xcodeData = parseXcodeProject(pbxprojPath);
|
|
1586
|
+
const timestamp = Date.now();
|
|
1587
|
+
for (const target of xcodeData.targets) {
|
|
1588
|
+
const comp = mapTargetToComponent(target, timestamp);
|
|
1589
|
+
if (swiftRoot.origin !== '.') {
|
|
1590
|
+
comp.metadata = { ...comp.metadata, origin_root: swiftRoot.origin };
|
|
1591
|
+
comp.source.config_files = comp.source.config_files.map(file => path.posix.join(swiftRoot.origin, path.basename(path.dirname(pbxprojPath)), file));
|
|
1592
|
+
}
|
|
1593
|
+
allComponents.push(comp);
|
|
1594
|
+
const targetForMapping = swiftRoot.origin === '.'
|
|
1595
|
+
? target
|
|
1596
|
+
: {
|
|
1597
|
+
...target,
|
|
1598
|
+
sourceFiles: target.sourceFiles.map(file => path.posix.join(swiftRoot.origin, file)),
|
|
1599
|
+
};
|
|
1600
|
+
const memberConns = mapSourceMembership(targetForMapping, comp.component_id, timestamp);
|
|
1601
|
+
if (swiftRoot.origin !== '.') {
|
|
1602
|
+
const pbxprojRelative = path.posix.join(swiftRoot.origin, path.basename(path.dirname(pbxprojPath)), 'project.pbxproj');
|
|
1603
|
+
for (const connection of memberConns) {
|
|
1604
|
+
if (connection.from.location?.file === 'project.pbxproj') {
|
|
1605
|
+
connection.from.location.file = pbxprojRelative;
|
|
1606
|
+
}
|
|
1607
|
+
if (connection.code_reference?.file === 'project.pbxproj') {
|
|
1608
|
+
connection.code_reference.file = pbxprojRelative;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
allConnections.push(...memberConns);
|
|
1613
|
+
}
|
|
1614
|
+
// Enrich project metadata with Xcode target info
|
|
1615
|
+
if (projectMetadata) {
|
|
1616
|
+
projectMetadata.targets = xcodeData.targets.map(t => ({
|
|
1617
|
+
name: t.name,
|
|
1618
|
+
type: t.type,
|
|
1619
|
+
dependencies: t.frameworks,
|
|
1620
|
+
}));
|
|
1621
|
+
projectMetadata.xcodeProject = {
|
|
1622
|
+
path: swiftRoot.origin === '.'
|
|
1623
|
+
? pbxprojPath
|
|
1624
|
+
: path.relative(root, pbxprojPath).replace(/\\/g, '/'),
|
|
1625
|
+
targets: xcodeData.targets.map(t => ({
|
|
1626
|
+
name: t.name,
|
|
1627
|
+
type: t.type,
|
|
1628
|
+
bundleId: t.bundleId,
|
|
1629
|
+
})),
|
|
1630
|
+
};
|
|
1631
|
+
}
|
|
1632
|
+
if (options.verbose) {
|
|
1633
|
+
console.log(` Xcode: ${xcodeData.targets.length} targets`);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
// Storyboard/XIB scanning
|
|
1637
|
+
const { scanStoryboards } = await import('./scanners/xcode/storyboard-scanner.js');
|
|
1638
|
+
const storyboardResult = await scanStoryboards(root);
|
|
1639
|
+
allComponents.push(...storyboardResult.components);
|
|
1640
|
+
allConnections.push(...storyboardResult.connections);
|
|
1641
|
+
if (options.verbose && storyboardResult.components.length > 0) {
|
|
1642
|
+
console.log(` Storyboards: ${storyboardResult.components.length} VCs, ${storyboardResult.connections.length} segues`);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
catch (error) {
|
|
1646
|
+
allWarnings.push({
|
|
1647
|
+
type: 'parse_error',
|
|
1648
|
+
message: `Xcode project scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
204
1651
|
}
|
|
205
|
-
//
|
|
206
|
-
if (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
1652
|
+
// Rust code analysis (modules, types, trait impls, use graph, LLM calls)
|
|
1653
|
+
if (detectCargo(root)) {
|
|
1654
|
+
if (options.verbose)
|
|
1655
|
+
console.log(' - Scanning Rust code connections...');
|
|
1656
|
+
try {
|
|
1657
|
+
const rustResult = await scanRustCode(root, incWalkSet);
|
|
1658
|
+
allComponents.push(...rustResult.components);
|
|
1659
|
+
allConnections.push(...rustResult.connections);
|
|
1660
|
+
allWarnings.push(...rustResult.warnings);
|
|
1661
|
+
if (!projectMetadata || Object.keys(projectMetadata).length === 0) {
|
|
1662
|
+
projectMetadata = rustResult.projectMeta;
|
|
1663
|
+
}
|
|
1664
|
+
if (options.verbose) {
|
|
1665
|
+
console.log(` Rust: ${rustResult.components.length} components, ${rustResult.connections.length} connections`);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
catch (error) {
|
|
1669
|
+
allWarnings.push({
|
|
1670
|
+
type: 'parse_error',
|
|
1671
|
+
message: `Rust code scanning failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
// AI prompts & LLM call tracing
|
|
1676
|
+
if (options.prompts) {
|
|
1677
|
+
// Step 1: Run anchor-based LLM call tracer (primary detection)
|
|
1678
|
+
if (options.verbose)
|
|
1679
|
+
console.log(' - Running LLM call tracer (anchor-based)...');
|
|
1680
|
+
let traceResult;
|
|
1681
|
+
try {
|
|
1682
|
+
traceResult = await traceLLMCalls(root, incWalkSet);
|
|
1683
|
+
allComponents.push(...traceResult.scanResult.components);
|
|
1684
|
+
allConnections.push(...traceResult.scanResult.connections);
|
|
1685
|
+
if (options.verbose) {
|
|
1686
|
+
console.log(` Traced ${traceResult.calls.length} LLM call sites`);
|
|
1687
|
+
console.log(` Wrappers: ${traceResult.wrappers.length}`);
|
|
1688
|
+
const providers = new Map();
|
|
1689
|
+
for (const call of traceResult.calls) {
|
|
1690
|
+
const p = call.provider.name;
|
|
1691
|
+
providers.set(p, (providers.get(p) || 0) + 1);
|
|
1692
|
+
}
|
|
1693
|
+
for (const [provider, count] of providers) {
|
|
1694
|
+
console.log(` ${provider}: ${count} call sites`);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
catch (error) {
|
|
1699
|
+
allWarnings.push({
|
|
1700
|
+
type: 'parse_error',
|
|
1701
|
+
message: `LLM call tracer failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1702
|
+
});
|
|
1703
|
+
if (options.verbose)
|
|
1704
|
+
console.log(` LLM tracer error: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
1705
|
+
}
|
|
1706
|
+
// Step 2: Run regex prompt detector with corroboration (secondary — catches prompt definitions)
|
|
1707
|
+
if (options.verbose)
|
|
1708
|
+
console.log(' - Running prompt detector (corroboration-filtered)...');
|
|
1709
|
+
promptScanResultHolder = await scanPrompts(root, {
|
|
1710
|
+
includeRawContent: true,
|
|
1711
|
+
detectVariables: true,
|
|
1712
|
+
aggressive: true,
|
|
1713
|
+
}, incWalkSet);
|
|
1714
|
+
// Attach tracer results to prompt scan data (for web UI)
|
|
1715
|
+
if (traceResult) {
|
|
1716
|
+
promptScanResultHolder.tracedCalls = traceResult.calls;
|
|
1717
|
+
promptScanResultHolder.summary.tracedCallSites = traceResult.calls.length;
|
|
1718
|
+
}
|
|
1719
|
+
// Convert prompt definitions to architecture format
|
|
1720
|
+
const promptArchitecture = convertToArchitecture(promptScanResultHolder.prompts);
|
|
1721
|
+
allComponents.push(...promptArchitecture.components);
|
|
1722
|
+
allConnections.push(...promptArchitecture.connections);
|
|
1723
|
+
allWarnings.push(...promptArchitecture.warnings);
|
|
1724
|
+
if (options.verbose) {
|
|
1725
|
+
console.log(` Found ${promptScanResultHolder.prompts.length} prompt definitions`);
|
|
1726
|
+
if (promptScanResultHolder.summary.byProvider) {
|
|
1727
|
+
for (const [provider, count] of Object.entries(promptScanResultHolder.summary.byProvider)) {
|
|
1728
|
+
console.log(` ${provider}: ${count}`);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
// ==========================================================================
|
|
1735
|
+
// Phase 3.5: Semantic Classification
|
|
1736
|
+
// ==========================================================================
|
|
1737
|
+
if (allConnections.length > 0 && allComponents.length > 0) {
|
|
1738
|
+
if (options.verbose) {
|
|
1739
|
+
console.log('Phase 3.5: Classifying connections...');
|
|
1740
|
+
}
|
|
1741
|
+
const semantics = classifyAllConnections(allConnections, allComponents);
|
|
1742
|
+
for (const conn of allConnections) {
|
|
1743
|
+
const info = semantics.get(conn.connection_id);
|
|
1744
|
+
if (info) {
|
|
1745
|
+
conn.semantic = info;
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if (options.verbose) {
|
|
1749
|
+
const byClass = new Map();
|
|
1750
|
+
for (const [, info] of semantics) {
|
|
1751
|
+
byClass.set(info.classification, (byClass.get(info.classification) || 0) + 1);
|
|
1752
|
+
}
|
|
1753
|
+
for (const [cls, count] of byClass) {
|
|
1754
|
+
console.log(` ${cls}: ${count}`);
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
// ==========================================================================
|
|
1759
|
+
// Phase 4: Deduplicate & Store
|
|
1760
|
+
// ==========================================================================
|
|
1761
|
+
if (options.verbose) {
|
|
1762
|
+
console.log('Phase 4: Storing results...');
|
|
1763
|
+
}
|
|
1764
|
+
// Normalize in-repo ownership paths before they participate in identity.
|
|
1765
|
+
// Absolute paths make stable ids machine-specific and break integrity checks
|
|
1766
|
+
// that expect project-relative source files.
|
|
1767
|
+
for (const component of allComponents) {
|
|
1768
|
+
if (!component.source)
|
|
1769
|
+
continue;
|
|
1770
|
+
component.source.config_files = (component.source.config_files ?? []).map(file => {
|
|
1771
|
+
if (!path.isAbsolute(file))
|
|
1772
|
+
return file.replace(/\\/g, '/');
|
|
1773
|
+
const relative = path.relative(root, file);
|
|
1774
|
+
if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
1775
|
+
return file.replace(/\\/g, '/');
|
|
1776
|
+
}
|
|
1777
|
+
return relative.replace(/\\/g, '/');
|
|
213
1778
|
});
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1779
|
+
}
|
|
1780
|
+
// Deduplicate components by (type, name, primary-source-file) within current scan.
|
|
1781
|
+
//
|
|
1782
|
+
// Run 1.7 — Problem B: the prior key was `component.name` alone. That
|
|
1783
|
+
// collided cross-type — e.g., the file-level component for `lib/prisma.ts`
|
|
1784
|
+
// (type='component', name='prisma') vs the Prisma DB component
|
|
1785
|
+
// (type='database', name='prisma'). The DB component won on confidence;
|
|
1786
|
+
// the file component was silently dropped. But the import-scanner had
|
|
1787
|
+
// already emitted edges referencing the dropped file component_id —
|
|
1788
|
+
// 410 orphan edges on the benchmark repo, which fired the integrity-promote and
|
|
1789
|
+
// truncated the graph (Problem A's loud symptom).
|
|
1790
|
+
//
|
|
1791
|
+
// The fix keys by `${type}|${name}|${first-config-file}`:
|
|
1792
|
+
// • Different types coexist (was: collided).
|
|
1793
|
+
// • Same-type same-name from different paths coexist (was: collided —
|
|
1794
|
+
// `app/proxy.ts` and `proxy.ts` both produce a file-level component
|
|
1795
|
+
// named `proxy`; both are real, both must be kept). Path
|
|
1796
|
+
// disambiguation matches Run 1.6 verify #6's stable_id contract for
|
|
1797
|
+
// the 6 component types where `name` alone isn't unique.
|
|
1798
|
+
// • Same-type same-name same-file STILL dedupes (the genuine duplicate
|
|
1799
|
+
// case — AST + regex both detecting the same service call), with
|
|
1800
|
+
// highest confidence winning. For components with no config_files
|
|
1801
|
+
// (rare) the key falls back to `${type}|${name}|` and behaves like
|
|
1802
|
+
// the legacy by-name dedup within that type.
|
|
1803
|
+
const componentMap = new Map();
|
|
1804
|
+
for (const component of allComponents) {
|
|
1805
|
+
const primaryFile = component.source?.config_files?.[0] ?? '';
|
|
1806
|
+
const key = `${component.type}|${component.name}|${primaryFile}`;
|
|
1807
|
+
const existing = componentMap.get(key);
|
|
1808
|
+
if (!existing || component.source.confidence > existing.source.confidence) {
|
|
1809
|
+
componentMap.set(key, component);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
const uniqueComponents = Array.from(componentMap.values());
|
|
1813
|
+
// Dedup drops the losing component, but scanners have already put its
|
|
1814
|
+
// component_id on edges — that is exactly the orphan class described above,
|
|
1815
|
+
// and it is still live: the Swift code scanner and the SwiftUI scanner both
|
|
1816
|
+
// emit a `component` named e.g. `ChatView` with no config_files, so they
|
|
1817
|
+
// share a dedup key and one is discarded along with every edge pointing at
|
|
1818
|
+
// it. Remap those endpoints onto the survivor rather than leaving them
|
|
1819
|
+
// dangling; the two components describe the same Swift type.
|
|
1820
|
+
const droppedToSurvivor = new Map();
|
|
1821
|
+
for (const component of allComponents) {
|
|
1822
|
+
const primaryFile = component.source?.config_files?.[0] ?? '';
|
|
1823
|
+
const survivor = componentMap.get(`${component.type}|${component.name}|${primaryFile}`);
|
|
1824
|
+
if (survivor && survivor.component_id !== component.component_id) {
|
|
1825
|
+
droppedToSurvivor.set(component.component_id, survivor.component_id);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
if (droppedToSurvivor.size > 0) {
|
|
1829
|
+
for (const conn of allConnections) {
|
|
1830
|
+
const from = droppedToSurvivor.get(conn.from?.component_id ?? '');
|
|
1831
|
+
if (from)
|
|
1832
|
+
conn.from.component_id = from;
|
|
1833
|
+
const to = droppedToSurvivor.get(conn.to?.component_id ?? '');
|
|
1834
|
+
if (to)
|
|
1835
|
+
conn.to.component_id = to;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
// Deduplicate connections by composite key (within current scan)
|
|
1839
|
+
// Keeps highest confidence when duplicates found (e.g., regex + AST detect same call)
|
|
1840
|
+
const connectionMap = new Map();
|
|
1841
|
+
for (const conn of allConnections) {
|
|
1842
|
+
const key = `${conn.from.component_id}|${conn.to.component_id}|${conn.connection_type}|${conn.code_reference?.file || ''}:${conn.code_reference?.line_start || ''}`;
|
|
1843
|
+
const existing = connectionMap.get(key);
|
|
1844
|
+
if (!existing || conn.confidence > existing.confidence) {
|
|
1845
|
+
connectionMap.set(key, conn);
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
const uniqueConnections = Array.from(connectionMap.values());
|
|
1849
|
+
// (C) + (C2): resolve FILE: endpoints to claimed components, then synthesize
|
|
1850
|
+
// one file-node per surviving on-disk path. Extracted to
|
|
1851
|
+
// `resolveFileEndpoints` (Run 4 fix2 #4) so path aliases are normalized in
|
|
1852
|
+
// one place and the behaviour is unit-testable without a full scan.
|
|
1853
|
+
resolveFileEndpoints(uniqueComponents, uniqueConnections, root);
|
|
1854
|
+
// Snapshot previous state before overwriting (for change tracking)
|
|
1855
|
+
// Also load the pre-scan snapshot for diff computation
|
|
1856
|
+
let preScanSnapshot = null;
|
|
1857
|
+
if (!options.clearFirst && decision.mode !== 'full') {
|
|
1858
|
+
try {
|
|
1859
|
+
await createSnapshot('pre-scan', config, root);
|
|
1860
|
+
preScanSnapshot = await loadLatestSnapshot(config, root);
|
|
1861
|
+
}
|
|
1862
|
+
catch {
|
|
1863
|
+
// No previous data to snapshot — first scan
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
else if (decision.mode === 'full') {
|
|
1867
|
+
// For full scans, still create a snapshot for diff (if prior data exists)
|
|
1868
|
+
try {
|
|
1869
|
+
preScanSnapshot = await loadLatestSnapshot(config, root);
|
|
1870
|
+
}
|
|
1871
|
+
catch {
|
|
1872
|
+
// First-ever scan, no prior snapshot.
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
// ==========================================================================
|
|
1876
|
+
// Phase 4 storage decision (Run 1 — D1 + D2):
|
|
1877
|
+
// - 'full': clearStorage was already done up front; now store everything fresh.
|
|
1878
|
+
// - 'incremental': clear ONLY components/connections that originate in the
|
|
1879
|
+
// walk-set, then merge the freshly-scanned uniqueComponents/Connections
|
|
1880
|
+
// with the survivors. Run integrity check; on failure, promote to full.
|
|
1881
|
+
// ==========================================================================
|
|
1882
|
+
let finalComponents = uniqueComponents;
|
|
1883
|
+
let finalConnections = uniqueConnections;
|
|
1884
|
+
if (decision.mode === 'incremental' && !options.clearFirst) {
|
|
1885
|
+
// Snapshot the FULL prior on-disk component set BEFORE clearForFiles —
|
|
1886
|
+
// we need it to remap surviving connections from old random component_ids
|
|
1887
|
+
// to the new ones (since stable_id is the join key but connections
|
|
1888
|
+
// reference component_id, which gets a fresh random suffix per scan).
|
|
1889
|
+
const preClearComponents = await loadAllComponents(config, root);
|
|
1890
|
+
const preClearConnections = await loadAllConnections(config, root);
|
|
1891
|
+
// Partition the prior canonical generation in memory. This is required for
|
|
1892
|
+
// the default consolidated layout: clearForFiles has no per-entity files
|
|
1893
|
+
// to delete there, and reloading would resurrect stale JSONL records.
|
|
1894
|
+
const partition = partitionPriorStateForFiles(preClearComponents, preClearConnections, walkSet, root);
|
|
1895
|
+
// Clear only the touched subset.
|
|
1896
|
+
await clearForFiles(config, root, walkSet);
|
|
1897
|
+
const survivingComponents = partition.survivingComponents;
|
|
1898
|
+
const survivingConnections = partition.survivingConnections;
|
|
1899
|
+
// Populate stable_ids on the in-memory uniqueComponents BEFORE merging.
|
|
1900
|
+
// Disk-loaded survivors get stable_ids from loadAllComponents, but
|
|
1901
|
+
// freshly-scanned components don't have them set until storeComponents
|
|
1902
|
+
// runs — and we merge BEFORE store. Without this, every fresh component
|
|
1903
|
+
// looks like a new entry to mergeByStableId (because its key falls back
|
|
1904
|
+
// to its random component_id), breaking dedup.
|
|
1905
|
+
for (const c of uniqueComponents)
|
|
1906
|
+
ensureStableIdPublic(c);
|
|
1907
|
+
// Merge: incoming wins on stable_id collision (component) or composite key (connection).
|
|
1908
|
+
// Components keyed by stable_id (or component_id fallback).
|
|
1909
|
+
finalComponents = mergeByStableId(survivingComponents, uniqueComponents, (c) => c.stable_id ?? c.component_id);
|
|
1910
|
+
// Build a remap: prior_component_id → new_component_id (via stable_id).
|
|
1911
|
+
// Connections from disk reference OLD random component_ids; the freshly
|
|
1912
|
+
// scanned components have NEW random component_ids. Same stable_id ties
|
|
1913
|
+
// them together. Rewrite surviving connection from/to ids so the merged
|
|
1914
|
+
// graph stays consistent.
|
|
1915
|
+
const stableToNewId = new Map();
|
|
1916
|
+
for (const c of finalComponents) {
|
|
1917
|
+
if (c.stable_id)
|
|
1918
|
+
stableToNewId.set(c.stable_id, c.component_id);
|
|
1919
|
+
}
|
|
1920
|
+
// oldIdToStable: maps every PRIOR-scan component_id (including ones we
|
|
1921
|
+
// just deleted via clearForFiles) to its stable_id. Built from the
|
|
1922
|
+
// pre-clear snapshot so we can resolve connection refs to their new IDs.
|
|
1923
|
+
const oldIdToStable = new Map();
|
|
1924
|
+
for (const c of preClearComponents) {
|
|
1925
|
+
if (c.stable_id)
|
|
1926
|
+
oldIdToStable.set(c.component_id, c.stable_id);
|
|
1927
|
+
}
|
|
1928
|
+
// Also map fresh components' ids → stable (no remap needed but keeps the
|
|
1929
|
+
// rewrite loop a no-op for these instead of leaving them undefined).
|
|
1930
|
+
for (const c of uniqueComponents) {
|
|
1931
|
+
if (c.stable_id)
|
|
1932
|
+
oldIdToStable.set(c.component_id, c.stable_id);
|
|
1933
|
+
}
|
|
1934
|
+
function remapId(id) {
|
|
1935
|
+
if (!id)
|
|
1936
|
+
return id;
|
|
1937
|
+
if (id.startsWith('FILE:'))
|
|
1938
|
+
return id;
|
|
1939
|
+
const stable = oldIdToStable.get(id);
|
|
1940
|
+
if (stable) {
|
|
1941
|
+
const newId = stableToNewId.get(stable);
|
|
1942
|
+
if (newId)
|
|
1943
|
+
return newId;
|
|
1944
|
+
}
|
|
1945
|
+
return id; // No remap available — leave alone, integrity check may catch
|
|
1946
|
+
}
|
|
1947
|
+
// Rewrite surviving connections to use the latest component_ids.
|
|
1948
|
+
for (const conn of survivingConnections) {
|
|
1949
|
+
if (conn.from?.component_id) {
|
|
1950
|
+
conn.from.component_id = remapId(conn.from.component_id) ?? conn.from.component_id;
|
|
1951
|
+
}
|
|
1952
|
+
if (conn.to?.component_id) {
|
|
1953
|
+
conn.to.component_id = remapId(conn.to.component_id) ?? conn.to.component_id;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
// Connections keyed by from|to|type|file:line composite (matches dedup key).
|
|
1957
|
+
const connKey = (c) => `${c.from?.component_id ?? ''}|${c.to?.component_id ?? ''}|${c.connection_type}|${c.code_reference?.file ?? ''}:${c.code_reference?.line_start ?? ''}`;
|
|
1958
|
+
finalConnections = mergeByStableId(survivingConnections, uniqueConnections, connKey);
|
|
1959
|
+
// Integrity check: every connection endpoint must exist; every walk-set
|
|
1960
|
+
// component must reference real source files. On failure → promote to full.
|
|
1961
|
+
const integrity = await runIntegrityCheck(finalComponents, finalConnections, root, walkSet);
|
|
1962
|
+
if (!integrity.ok) {
|
|
1963
|
+
if (options.verbose) {
|
|
1964
|
+
console.log(` Integrity check failed (${integrity.issues.length} issues) — promoting to full scan`);
|
|
1965
|
+
for (const issue of integrity.issues.slice(0, 3)) {
|
|
1966
|
+
console.log(` ${issue}`);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
// ============================================================
|
|
1970
|
+
// Run 1.7 — Problem A (recursive re-entry promote)
|
|
1971
|
+
// ============================================================
|
|
1972
|
+
// The pre-Run-1.7 promote reused the in-memory uniqueComponents/
|
|
1973
|
+
// uniqueConnections that were just computed under the walk-set
|
|
1974
|
+
// restriction. After Run 1.5's walk-set plumbing, those are NOT
|
|
1975
|
+
// the full source tree — only the walk-set's slice of it. Reusing
|
|
1976
|
+
// them on promote truncated the graph (the benchmark repo: 6,445 → 58
|
|
1977
|
+
// connections, 2,452 → 58 components).
|
|
1978
|
+
//
|
|
1979
|
+
// Fix: recursively re-enter scan() with `mode: 'full', clearFirst: true`
|
|
1980
|
+
// while reusing this owner-safe lease. The inner scan walks the full
|
|
1981
|
+
// source tree without opening a second writer window, and its result
|
|
1982
|
+
// is returned verbatim. The internal `_promotedFromIncremental`
|
|
1983
|
+
// flag tells the inner scan to label its timeline entry and stats
|
|
1984
|
+
// `scan_type: 'incremental→full'` — preserving the Run 1.6 #3
|
|
1985
|
+
// evidence-preservation contract.
|
|
1986
|
+
//
|
|
1987
|
+
// We `return` early so the rest of the outer scan's phases
|
|
1988
|
+
// (storage, timeline, manifest, hashes) don't double-run.
|
|
1989
|
+
return await scan(root, {
|
|
1990
|
+
...options,
|
|
1991
|
+
mode: 'full',
|
|
1992
|
+
clearFirst: true,
|
|
1993
|
+
incremental: false,
|
|
1994
|
+
_promotedFromIncremental: true,
|
|
1995
|
+
_scanLease: lease,
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
// ============================================================
|
|
1999
|
+
// Run 1.7 — orphan-disk-file cleanup on successful incremental merge.
|
|
2000
|
+
// ============================================================
|
|
2001
|
+
// `clearForFiles` only deletes disk files whose `source.config_files`
|
|
2002
|
+
// overlap the walk-set. Components produced by always-full scanners
|
|
2003
|
+
// (npm/pip/swift packages, infra, prisma) don't list user source
|
|
2004
|
+
// files in `config_files` (they list manifests / abs paths), so
|
|
2005
|
+
// their disk files survive `clearForFiles`. After the merge, the
|
|
2006
|
+
// freshly-scanned versions get NEW random `component_id`s and are
|
|
2007
|
+
// written to NEW filenames. The OLD survivor files are now orphans:
|
|
2008
|
+
// unreachable from `finalComponents` but still on disk.
|
|
2009
|
+
//
|
|
2010
|
+
// Pre-Run-1.7 this was masked by the always-failing integrity check
|
|
2011
|
+
// on real projects (`clearStorage` on promote wiped the orphans).
|
|
2012
|
+
// Now that integrity passes (Problem B fix), and the promote is
|
|
2013
|
+
// recursive (Problem A fix), this latent bug surfaces as a doubling
|
|
2014
|
+
// of `npm`/`database`/`config`/`infra` components per incremental.
|
|
2015
|
+
//
|
|
2016
|
+
// Fix: after the merge, walk the components/connections directories
|
|
2017
|
+
// and unlink any file whose ID isn't in `finalComponents` /
|
|
2018
|
+
// `finalConnections`. Idempotent and atomic per-file (unlink errors
|
|
2019
|
+
// are silently swallowed — best-effort, matches the integrity-promote
|
|
2020
|
+
// pattern). Connections also need this since their random IDs aren't
|
|
2021
|
+
// stable across scans either.
|
|
2022
|
+
{
|
|
2023
|
+
const finalComponentIds = new Set(finalComponents.map((c) => c.component_id));
|
|
2024
|
+
const finalConnectionIds = new Set(finalConnections.map((c) => c.connection_id));
|
|
2025
|
+
const fsPromises = (await import('node:fs')).promises;
|
|
2026
|
+
const purgeOrphans = async (dir, keepIds) => {
|
|
2027
|
+
try {
|
|
2028
|
+
const files = await fsPromises.readdir(dir);
|
|
2029
|
+
await Promise.all(files
|
|
2030
|
+
.filter((f) => f.endsWith('.json'))
|
|
2031
|
+
.map(async (f) => {
|
|
2032
|
+
const id = f.slice(0, -'.json'.length);
|
|
2033
|
+
if (!keepIds.has(id)) {
|
|
2034
|
+
await fsPromises.unlink(path.join(dir, f)).catch(() => { });
|
|
2035
|
+
}
|
|
2036
|
+
}));
|
|
2037
|
+
}
|
|
2038
|
+
catch {
|
|
2039
|
+
// Dir missing or unreadable — non-fatal.
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
await purgeOrphans(getComponentsPath(config, root), finalComponentIds);
|
|
2043
|
+
await purgeOrphans(getConnectionsPath(config, root), finalConnectionIds);
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
// External enrichment (structural axis): stamp boundary nodes (npm/service/
|
|
2047
|
+
// llm/infra/spm/...) with cached canonical identity, latest version, docs, and
|
|
2048
|
+
// a freshness verdict. Offline + sync — reads NavGator's own JSON cache, never
|
|
2049
|
+
// the network, so it cannot slow or fail the scan. The freshness axis (network
|
|
2050
|
+
// re-checks) runs separately via refreshExternal / the external-resolver agent.
|
|
2051
|
+
try {
|
|
2052
|
+
const cache = loadCache();
|
|
2053
|
+
enrichFromCache(finalComponents, makeLookup(cache), Date.now());
|
|
2054
|
+
}
|
|
2055
|
+
catch {
|
|
2056
|
+
/* enrichment is best-effort — never block persistence on it */
|
|
2057
|
+
}
|
|
2058
|
+
// Store final state (atomic per-file writes — see storage.ts).
|
|
2059
|
+
await storeComponents(finalComponents, config, root);
|
|
2060
|
+
await storeConnections(finalConnections, config, root);
|
|
2061
|
+
// R6 footprint fix: clean up legacy per-entity files when the feature is
|
|
2062
|
+
// disabled (default). Idempotent and best-effort — never blocks the scan.
|
|
2063
|
+
// Surfaces a one-line notice when something actually got cleaned.
|
|
2064
|
+
try {
|
|
2065
|
+
const migrated = await migratePerEntityFiles(config, root);
|
|
2066
|
+
if (options.verbose &&
|
|
2067
|
+
(migrated.componentsRemoved > 0 ||
|
|
2068
|
+
migrated.connectionsRemoved > 0 ||
|
|
2069
|
+
migrated.dirsRemoved > 0)) {
|
|
2070
|
+
console.log(` R6 migration: removed ${migrated.componentsRemoved} legacy component file(s), ${migrated.connectionsRemoved} legacy connection file(s), ${migrated.dirsRemoved} now-empty dir(s)`);
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
catch {
|
|
2074
|
+
// Best-effort.
|
|
2075
|
+
}
|
|
2076
|
+
// ==========================================================================
|
|
2077
|
+
// Phase 4.5: SQC Audit (Run 2 — D4)
|
|
2078
|
+
//
|
|
2079
|
+
// Sample the just-stored output, run deterministic verifiers (+ structured
|
|
2080
|
+
// LLM-judge payload in MCP mode), and update per-stratum EWMA state.
|
|
2081
|
+
// Audit failure NEVER fails the scan — only updates the index's EWMA so the
|
|
2082
|
+
// NEXT scan can auto-promote on detected drift.
|
|
2083
|
+
// ==========================================================================
|
|
2084
|
+
let auditReport;
|
|
2085
|
+
if (!options.noAudit) {
|
|
2086
|
+
try {
|
|
2087
|
+
const planOpt = options.auditPlan
|
|
2088
|
+
? (options.auditPlan.toUpperCase() === 'AQL'
|
|
2089
|
+
? 'AQL'
|
|
2090
|
+
: options.auditPlan.toUpperCase() === 'SPRT'
|
|
2091
|
+
? 'SPRT'
|
|
2092
|
+
: 'Cochran')
|
|
2093
|
+
: undefined;
|
|
2094
|
+
const auditOpts = {
|
|
2095
|
+
plan: planOpt,
|
|
2096
|
+
isMcpMode: !!options.isMcpMode,
|
|
2097
|
+
priorEwma: priorIndex?.ewma,
|
|
2098
|
+
priorAuditCount: priorIndex?.audit_history_count ?? 0,
|
|
2099
|
+
forceCochran: !!priorIndex?.pending_drift_breach,
|
|
2100
|
+
// Run 4 fix2 #1: `navgator scan --scip` must reach the imports oracle;
|
|
2101
|
+
// this line was lost in a concurrent edit of the (C) block.
|
|
2102
|
+
scip: options.scip === true,
|
|
2103
|
+
};
|
|
2104
|
+
const r = await runAudit({ components: finalComponents, connections: finalConnections }, config, root, auditOpts);
|
|
2105
|
+
if (r) {
|
|
2106
|
+
// Update EWMA snapshot from prior index. We do not write the index here —
|
|
2107
|
+
// the post-Phase-5 index annotation already runs (line ~1430) and we
|
|
2108
|
+
// hijack `priorIndex` via the loadIndex/atomicWriteJSON cycle there.
|
|
2109
|
+
const { ewma, anyBreach } = updateEwmaForAudit(priorIndex?.ewma ?? undefined, r);
|
|
2110
|
+
if (anyBreach)
|
|
2111
|
+
r.drift_breach = true;
|
|
2112
|
+
auditReport = r;
|
|
2113
|
+
// Stash on a local for the index-annotation block below to consume.
|
|
2114
|
+
// (We re-read priorIndex after the freshIndex write to merge ewma.)
|
|
2115
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2116
|
+
auditReport.__ewma = ewma;
|
|
2117
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2118
|
+
auditReport.__anyBreach = anyBreach;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
catch (err) {
|
|
2122
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2123
|
+
console.error('[audit] skipped due to error:', err.message);
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
// ==========================================================================
|
|
2128
|
+
// Phase 5: Architecture Diff
|
|
2129
|
+
// ==========================================================================
|
|
2130
|
+
let timelineEntry;
|
|
2131
|
+
if (options.verbose) {
|
|
2132
|
+
console.log('Phase 5: Computing architecture diff...');
|
|
2133
|
+
}
|
|
2134
|
+
try {
|
|
2135
|
+
// Build the "current" side from the scan's own in-memory records rather
|
|
2136
|
+
// than re-reading storage. On the full-scan path `clearStorage()` has
|
|
2137
|
+
// already deleted `components.full.jsonl`/`connections.full.jsonl`, and
|
|
2138
|
+
// they aren't rewritten until after this phase (Phase 5.6, below) — a
|
|
2139
|
+
// storage read here would see 0 components even though `finalComponents`
|
|
2140
|
+
// is about to be persisted with the real count. See
|
|
2141
|
+
// `.build-loop/issues/scanner-full-scan-diff-reports-zero-after.md`.
|
|
2142
|
+
const currentSnapshot = buildSnapshotFromRecords(finalComponents, finalConnections);
|
|
2143
|
+
const diff = computeArchitectureDiff(preScanSnapshot, currentSnapshot);
|
|
2144
|
+
const { significance, triggers } = classifySignificance(diff);
|
|
2145
|
+
timelineEntry = {
|
|
2146
|
+
id: generateTimelineId(),
|
|
2147
|
+
timestamp: Date.now(),
|
|
2148
|
+
significance,
|
|
2149
|
+
triggers,
|
|
2150
|
+
diff,
|
|
2151
|
+
snapshot_id: currentSnapshot.snapshot_id,
|
|
2152
|
+
git: gitInfo,
|
|
2153
|
+
scan_type: scanType,
|
|
2154
|
+
// Run 1.6 — item #3: report walk-set size for 'incremental' AND for the
|
|
2155
|
+
// legacy in-place 'incremental→full' promote (which kept walkSet
|
|
2156
|
+
// populated), so a silent integrity-promote didn't erase evidence
|
|
2157
|
+
// that an incremental walk-set was attempted.
|
|
2158
|
+
//
|
|
2159
|
+
// Run 1.7 — Problem A: the recursive-re-entry promote runs as a true
|
|
2160
|
+
// full scan (walkSet empty). Reporting `walkSet.size = 0` would be
|
|
2161
|
+
// dishonest — the inner scan really did walk every source file.
|
|
2162
|
+
// Report `scannableFiles.length` in that case. Run 1.6 #3 still holds:
|
|
2163
|
+
// any future in-place promote path (walkSet populated under
|
|
2164
|
+
// 'incremental→full') reports walk-set size.
|
|
2165
|
+
// Use decision.mode (the EFFECTIVE scan mode) instead of scanType
|
|
2166
|
+
// (the user-visible label). On the recursive-re-entry promote (Run 1.7
|
|
2167
|
+
// Problem A), decision.mode='full' even though scanType='incremental→full',
|
|
2168
|
+
// and walkSet may be populated by the still-modified file — but the inner
|
|
2169
|
+
// scan walked the full source tree, so files_scanned must be scannableFiles.length.
|
|
2170
|
+
files_scanned: decision.mode === 'incremental' && walkSet.size > 0
|
|
2171
|
+
? walkSet.size
|
|
2172
|
+
: scannableFiles.length,
|
|
2173
|
+
// Run 2 — D4: audit report (when produced).
|
|
2174
|
+
...(auditReport ? { audit: stripInternals(auditReport) } : {}),
|
|
2175
|
+
};
|
|
2176
|
+
// Only save timeline entry if there are changes (or first scan)
|
|
2177
|
+
if (diff.stats.total_changes > 0 || !preScanSnapshot) {
|
|
2178
|
+
await saveTimelineEntry(timelineEntry, config, root);
|
|
2179
|
+
}
|
|
2180
|
+
if (options.verbose) {
|
|
2181
|
+
console.log(` Significance: ${significance}`);
|
|
2182
|
+
console.log(` Changes: ${diff.stats.total_changes}`);
|
|
2183
|
+
if (triggers.length > 0) {
|
|
2184
|
+
console.log(` Triggers: ${triggers.join(', ')}`);
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
catch {
|
|
2189
|
+
// Diff computation is non-critical
|
|
224
2190
|
if (options.verbose) {
|
|
225
|
-
console.log(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
2191
|
+
console.log(' Diff computation skipped (non-critical error)');
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
// Build index, graph, file map, and summary.
|
|
2195
|
+
// R6: pass the in-memory final state so derived files don't depend on
|
|
2196
|
+
// per-entity disk reads (which are now opt-in and empty by default).
|
|
2197
|
+
const derivedData = { components: finalComponents, connections: finalConnections };
|
|
2198
|
+
await buildIndex(config, root, projectMetadata, derivedData);
|
|
2199
|
+
await buildGraph(config, root, derivedData);
|
|
2200
|
+
await buildFileMap(config, root, derivedData);
|
|
2201
|
+
// ==========================================================================
|
|
2202
|
+
// Phase 5.4: Derived reverse-deps index + manifest (Run 1.6 — items #8 + #9)
|
|
2203
|
+
// ==========================================================================
|
|
2204
|
+
// The reverse-deps index lets the next incremental scan compute walk-set
|
|
2205
|
+
// expansion from a single file open instead of walking every per-edge JSON.
|
|
2206
|
+
// The manifest lists all derived artifacts with their generated_at stamps.
|
|
2207
|
+
let reverseDepsEdgeCount;
|
|
2208
|
+
try {
|
|
2209
|
+
const result = await buildReverseDepsIndex(finalComponents, finalConnections, config, root);
|
|
2210
|
+
reverseDepsEdgeCount = result.edge_count;
|
|
2211
|
+
}
|
|
2212
|
+
catch (err) {
|
|
2213
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2214
|
+
console.error('[reverse-deps] index build skipped:', err.message);
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
try {
|
|
2218
|
+
await buildDerivedManifest(config, root, { reverseDepsEdgeCount });
|
|
2219
|
+
}
|
|
2220
|
+
catch (err) {
|
|
2221
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2222
|
+
console.error('[manifest] write skipped:', err.message);
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
// ==========================================================================
|
|
2226
|
+
// Phase 5.5: Annotate index with mode-tracking fields (Run 1 — D2)
|
|
2227
|
+
// Run AFTER buildIndex so we can annotate the freshly-written index
|
|
2228
|
+
// without buildIndex needing to know about modes.
|
|
2229
|
+
// ==========================================================================
|
|
2230
|
+
try {
|
|
2231
|
+
const freshIndex = await loadIndex(config, root);
|
|
2232
|
+
if (freshIndex) {
|
|
2233
|
+
if (scanType === 'full' || scanType === 'incremental→full') {
|
|
2234
|
+
freshIndex.last_full_scan = Date.now();
|
|
2235
|
+
freshIndex.incrementals_since_full = 0;
|
|
2236
|
+
}
|
|
2237
|
+
else if (scanType === 'incremental') {
|
|
2238
|
+
// Preserve last_full_scan from prior index; bump counter.
|
|
2239
|
+
if (priorIndex) {
|
|
2240
|
+
freshIndex.last_full_scan = priorIndex.last_full_scan ?? priorIndex.last_scan ?? 0;
|
|
229
2241
|
}
|
|
2242
|
+
freshIndex.incrementals_since_full = (priorIndex?.incrementals_since_full ?? 0) + 1;
|
|
230
2243
|
}
|
|
2244
|
+
// Always set schema_version to current build's version.
|
|
2245
|
+
freshIndex.schema_version = SCHEMA_VERSION;
|
|
2246
|
+
freshIndex.stable_id_scheme = STABLE_ID_SCHEME_VERSION;
|
|
2247
|
+
freshIndex.setup_phase = options._setupPhase ?? priorIndex?.setup_phase;
|
|
2248
|
+
// Run 2 — D5: persist EWMA + audit history bookkeeping.
|
|
2249
|
+
if (auditReport) {
|
|
2250
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2251
|
+
const stash = auditReport;
|
|
2252
|
+
if (stash.__ewma) {
|
|
2253
|
+
freshIndex.ewma = stash.__ewma;
|
|
2254
|
+
}
|
|
2255
|
+
freshIndex.audit_history_count = (priorIndex?.audit_history_count ?? 0) + 1;
|
|
2256
|
+
freshIndex.pending_drift_breach = !!stash.__anyBreach;
|
|
2257
|
+
}
|
|
2258
|
+
else if (priorIndex) {
|
|
2259
|
+
// No audit this run — preserve prior values.
|
|
2260
|
+
if (priorIndex.ewma)
|
|
2261
|
+
freshIndex.ewma = priorIndex.ewma;
|
|
2262
|
+
if (priorIndex.audit_history_count !== undefined) {
|
|
2263
|
+
freshIndex.audit_history_count = priorIndex.audit_history_count;
|
|
2264
|
+
}
|
|
2265
|
+
// Clear pending breach if we just promoted on it.
|
|
2266
|
+
if (priorIndex.pending_drift_breach && scanType !== 'incremental') {
|
|
2267
|
+
freshIndex.pending_drift_breach = false;
|
|
2268
|
+
}
|
|
2269
|
+
else if (priorIndex.pending_drift_breach !== undefined) {
|
|
2270
|
+
freshIndex.pending_drift_breach = priorIndex.pending_drift_breach;
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
await atomicWriteJSON(getIndexPath(config, root), freshIndex);
|
|
231
2274
|
}
|
|
232
2275
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
2276
|
+
catch {
|
|
2277
|
+
// Non-fatal: mode-tracking annotation is best-effort.
|
|
2278
|
+
}
|
|
2279
|
+
// Compute graph-wide metrics (PageRank + Louvain communities) → metrics.json,
|
|
2280
|
+
// and back-write per-component scores into component metadata so any consumer
|
|
2281
|
+
// that loads a component sees them. Suppressed for graphs <20 nodes.
|
|
2282
|
+
try {
|
|
2283
|
+
const { computeAndStoreMetrics } = await import('./metrics/pagerank-louvain.js');
|
|
2284
|
+
await computeAndStoreMetrics(config, root, {
|
|
2285
|
+
components: finalComponents,
|
|
2286
|
+
connections: finalConnections,
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
catch (err) {
|
|
2290
|
+
// Non-fatal — scan still produces all other artifacts.
|
|
2291
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2292
|
+
console.error('[metrics] PageRank/Louvain skipped:', err.message);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
await buildSummary(config, root, promptScanResultHolder, projectMetadata, timelineEntry, gitInfo, derivedData);
|
|
2296
|
+
// R6: full-shape JSONL writers — the consolidated source of truth when
|
|
2297
|
+
// per-entity files are disabled (the default). These carry the complete
|
|
2298
|
+
// ArchitectureComponent / ArchitectureConnection objects so downstream
|
|
2299
|
+
// loaders never need per-entity files. Always written; cheap (~2MB for
|
|
2300
|
+
// benchmark-scale projects vs the 70MB per-entity sprawl).
|
|
2301
|
+
try {
|
|
2302
|
+
const { writeFullComponentsJsonl, writeFullConnectionsJsonl, } = await import('./storage/markdown-view.js');
|
|
2303
|
+
const { getStoragePath: getStoragePathFn } = await import('./config.js');
|
|
2304
|
+
const storeDir = getStoragePathFn(config, root);
|
|
2305
|
+
await writeFullComponentsJsonl(storeDir, finalComponents);
|
|
2306
|
+
await writeFullConnectionsJsonl(storeDir, finalConnections);
|
|
2307
|
+
}
|
|
2308
|
+
catch (err) {
|
|
2309
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2310
|
+
console.error('[full-jsonl] skipped:', err.message);
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
// Markdown views + connections.jsonl (T3, trimmed scope).
|
|
2314
|
+
// Derived from in-memory components/connections — JSON remains canonical.
|
|
2315
|
+
// Emits .navgator/architecture/components-md/<type>/<slug>.md (Obsidian-readable,
|
|
2316
|
+
// git-diff-friendly, ripgrep-targetable) and connections.jsonl.
|
|
2317
|
+
// Disable via NAVGATOR_NO_MARKDOWN=1 if downstream tooling chokes.
|
|
2318
|
+
if (process.env['NAVGATOR_NO_MARKDOWN'] !== '1') {
|
|
2319
|
+
try {
|
|
2320
|
+
const { writeComponentMarkdownViews, writeConnectionsJsonl } = await import('./storage/markdown-view.js');
|
|
2321
|
+
const { getStoragePath: getStoragePathFn } = await import('./config.js');
|
|
2322
|
+
const storeDir = getStoragePathFn(config, root);
|
|
2323
|
+
await writeComponentMarkdownViews(storeDir, finalComponents, finalConnections);
|
|
2324
|
+
await writeConnectionsJsonl(storeDir, finalComponents, finalConnections);
|
|
2325
|
+
}
|
|
2326
|
+
catch (err) {
|
|
2327
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2328
|
+
console.error('[markdown-view] skipped:', err.message);
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
// Git-backed temporal snapshot (T5). Commits the .navgator/ directory to a
|
|
2333
|
+
// NESTED git store at .navgator/.git — invisible to the parent repo
|
|
2334
|
+
// (gitignored). OPT-IN: enable via NAVGATOR_COMMIT=1 or `--commit` scan
|
|
2335
|
+
// flag. Per-scan git subprocess overhead is ~180ms; default is OFF to
|
|
2336
|
+
// preserve the speed criterion.
|
|
2337
|
+
if (process.env['NAVGATOR_COMMIT'] === '1' || options.commit === true) {
|
|
2338
|
+
try {
|
|
2339
|
+
const { commitScan } = await import('./temporal/git-store.js');
|
|
2340
|
+
const { getStoragePath } = await import('./config.js');
|
|
2341
|
+
const storeDir = getStoragePath(config, root);
|
|
2342
|
+
const sha7 = (gitInfo?.commit ?? '').slice(0, 7);
|
|
2343
|
+
const msg = `scan ${new Date().toISOString()}${sha7 ? ` @ ${sha7}` : ''}`;
|
|
2344
|
+
const result = commitScan(storeDir, msg);
|
|
2345
|
+
if (!result.ok && process.env['NAVGATOR_DEBUG']) {
|
|
2346
|
+
console.error('[temporal] commit failed:', result.error);
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
catch (err) {
|
|
2350
|
+
if (process.env['NAVGATOR_DEBUG']) {
|
|
2351
|
+
console.error('[temporal] skipped:', err.message);
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
// Persist prompt scan results if available
|
|
2356
|
+
if (promptScanResultHolder) {
|
|
2357
|
+
await savePromptScan(promptScanResultHolder, config, root);
|
|
2358
|
+
}
|
|
2359
|
+
// Register project in global registry
|
|
2360
|
+
try {
|
|
2361
|
+
await registerProject(root, {
|
|
2362
|
+
components: finalComponents.length,
|
|
2363
|
+
connections: finalConnections.length,
|
|
2364
|
+
prompts: promptScanResultHolder?.prompts.length ?? 0,
|
|
2365
|
+
}, timelineEntry?.significance, gitInfo,
|
|
2366
|
+
// Already computed above (Phase 5); previously discarded at this
|
|
2367
|
+
// boundary. Feeds gator-memory's 'architecture.changed' event.
|
|
2368
|
+
//
|
|
2369
|
+
// Gated on the diff agreeing with what this scan actually wrote. On the
|
|
2370
|
+
// full-scan path `buildCurrentSnapshot` can read empty storage and
|
|
2371
|
+
// produce a diff that says everything was removed: this repo's own
|
|
2372
|
+
// timeline carries two such entries (TL_20260530080058 and
|
|
2373
|
+
// TL_20260602062857, both `components_after: 0` with `total_changes:
|
|
2374
|
+
// 636`) immediately before an entry reporting 265 components. Nothing
|
|
2375
|
+
// was removed; the diff is simply wrong.
|
|
2376
|
+
//
|
|
2377
|
+
// That upstream defect predates gator-memory, but forwarding it here is
|
|
2378
|
+
// what would make it DURABLE — written into a project's permanent
|
|
2379
|
+
// milestone list and mirrored into build-loop-memory as an
|
|
2380
|
+
// authoritative-looking narrative. Recording nothing is strictly better
|
|
2381
|
+
// than recording a confident falsehood, so the event is suppressed
|
|
2382
|
+
// rather than guessed at. The check is not a heuristic: the diff's own
|
|
2383
|
+
// `components_after` must match the component count this scan just
|
|
2384
|
+
// persisted, or the two disagree and the diff loses.
|
|
2385
|
+
isDiffConsistentWithScan(timelineEntry, finalComponents.length)
|
|
2386
|
+
? {
|
|
2387
|
+
componentsAdded: timelineEntry.diff.components.added.length,
|
|
2388
|
+
componentsRemoved: timelineEntry.diff.components.removed.length,
|
|
2389
|
+
connectionsAdded: timelineEntry.diff.connections.added.length,
|
|
2390
|
+
connectionsRemoved: timelineEntry.diff.connections.removed.length,
|
|
2391
|
+
}
|
|
2392
|
+
: undefined);
|
|
2393
|
+
}
|
|
2394
|
+
catch {
|
|
2395
|
+
// Non-critical
|
|
2396
|
+
}
|
|
2397
|
+
// ==========================================================================
|
|
2398
|
+
// Phase 6: Save File Hashes
|
|
2399
|
+
// ==========================================================================
|
|
2400
|
+
if (options.verbose) {
|
|
2401
|
+
console.log('Phase 6: Saving file hashes...');
|
|
2402
|
+
}
|
|
2403
|
+
// Phase 6: hash both source files AND manifests so manifest edits are
|
|
2404
|
+
// detectable on the next scan (selectScanMode uses this to fire 'manifest-changed').
|
|
2405
|
+
await options._beforeHashSave?.();
|
|
2406
|
+
const fileHashes = await computeFileHashes(filesForChangeDetection, root);
|
|
2407
|
+
await saveHashes(fileHashes, config, root);
|
|
2408
|
+
const duration = Date.now() - startTime;
|
|
2409
|
+
const filesChanged = fileChanges
|
|
2410
|
+
? fileChanges.added.length + fileChanges.modified.length + fileChanges.removed.length
|
|
2411
|
+
: scannableFiles.length;
|
|
2412
|
+
// Coverage runs against `finalComponents`/`finalConnections` — the full
|
|
2413
|
+
// merged state (incremental scans merge onto prior state; see
|
|
2414
|
+
// `mergeByStableId` above), not just this scan's walk-set — so the report
|
|
2415
|
+
// always describes the whole known graph, not only what just changed. Its
|
|
2416
|
+
// warnings are pushed into `allWarnings` BEFORE `warnings_count` is read
|
|
2417
|
+
// below, so a coverage gap is never silently absent from that count.
|
|
2418
|
+
const scanCoverage = computeScanCoverage(scannableFiles, finalComponents, finalConnections);
|
|
2419
|
+
allWarnings.push(...scanCoverage.warnings);
|
|
2420
|
+
if (options.verbose) {
|
|
2421
|
+
console.log(`\nScan complete in ${duration}ms`);
|
|
2422
|
+
console.log(` Components: ${finalComponents.length}`);
|
|
2423
|
+
console.log(` Connections: ${finalConnections.length}`);
|
|
2424
|
+
console.log(` Files scanned: ${scannableFiles.length}`);
|
|
2425
|
+
console.log(` Files changed: ${filesChanged}`);
|
|
2426
|
+
console.log(` Warnings: ${allWarnings.length}`);
|
|
2427
|
+
}
|
|
2428
|
+
// Gitignore safety guard: NavGator's per-config-var component files and
|
|
2429
|
+
// NAVSUMMARY docs include parsed hostnames from .env files. They're
|
|
2430
|
+
// regenerated on every scan, so there's no loss from keeping them local.
|
|
2431
|
+
// Auto-add gitignore entries on first scan so hostnames don't drift into
|
|
2432
|
+
// git history. Silent unless it makes a change.
|
|
262
2433
|
try {
|
|
263
|
-
await
|
|
2434
|
+
const guardResult = await ensureSafeGitignore(root);
|
|
2435
|
+
if (guardResult.action === 'added' && options.verbose) {
|
|
2436
|
+
console.log(` NavGator safety guard: added gitignore block for architecture/components/COMP_config_*.json + NAVSUMMARY*.md`);
|
|
2437
|
+
}
|
|
264
2438
|
}
|
|
265
2439
|
catch {
|
|
266
|
-
//
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
2440
|
+
// Non-fatal: scan already completed, gitignore guard is best-effort
|
|
2441
|
+
}
|
|
2442
|
+
await options._beforeLeaseRelease?.();
|
|
2443
|
+
return {
|
|
2444
|
+
status: 'completed',
|
|
2445
|
+
retryable: false,
|
|
2446
|
+
components: finalComponents,
|
|
2447
|
+
connections: finalConnections,
|
|
2448
|
+
warnings: allWarnings,
|
|
2449
|
+
fileChanges,
|
|
2450
|
+
promptScan: promptScanResultHolder,
|
|
2451
|
+
fieldUsageReport: fieldUsageReportResult,
|
|
2452
|
+
typeSpecReport: typeSpecReportResult,
|
|
2453
|
+
timelineEntry,
|
|
2454
|
+
gitInfo,
|
|
2455
|
+
stats: {
|
|
2456
|
+
scan_duration_ms: duration,
|
|
2457
|
+
components_found: finalComponents.length,
|
|
2458
|
+
connections_found: finalConnections.length,
|
|
2459
|
+
warnings_count: allWarnings.length,
|
|
2460
|
+
// Run 1.6 — item #3 / Run 1.7 — Problem A: walk-set size for incremental
|
|
2461
|
+
// and for an in-place promote (walkSet populated). Recursive-re-entry
|
|
2462
|
+
// promote (walkSet empty) reports actual scannable-file count.
|
|
2463
|
+
// Use decision.mode (the EFFECTIVE scan mode) instead of scanType
|
|
2464
|
+
// (the user-visible label). On the recursive-re-entry promote (Run 1.7
|
|
2465
|
+
// Problem A), decision.mode='full' even though scanType='incremental→full',
|
|
2466
|
+
// and walkSet may be populated by the still-modified file — but the inner
|
|
2467
|
+
// scan walked the full source tree, so files_scanned must be scannableFiles.length.
|
|
2468
|
+
files_scanned: decision.mode === 'incremental' && walkSet.size > 0
|
|
2469
|
+
? walkSet.size
|
|
2470
|
+
: scannableFiles.length,
|
|
2471
|
+
files_changed: filesChanged,
|
|
2472
|
+
prompts_found: promptScanResultHolder?.prompts.length,
|
|
2473
|
+
},
|
|
2474
|
+
...(degraded ? { degraded } : {}),
|
|
2475
|
+
...(scanCoverage.coverage ? { coverage: scanCoverage.coverage } : {}),
|
|
2476
|
+
};
|
|
284
2477
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const filesChanged = fileChanges
|
|
295
|
-
? fileChanges.added.length + fileChanges.modified.length + fileChanges.removed.length
|
|
296
|
-
: sourceFiles.length;
|
|
297
|
-
if (options.verbose) {
|
|
298
|
-
console.log(`\nScan complete in ${duration}ms`);
|
|
299
|
-
console.log(` Components: ${uniqueComponents.length}`);
|
|
300
|
-
console.log(` Connections: ${uniqueConnections.length}`);
|
|
301
|
-
console.log(` Files scanned: ${sourceFiles.length}`);
|
|
302
|
-
console.log(` Files changed: ${filesChanged}`);
|
|
303
|
-
console.log(` Warnings: ${allWarnings.length}`);
|
|
2478
|
+
catch (error) {
|
|
2479
|
+
await options._onLeaseFailureBeforeRelease?.();
|
|
2480
|
+
throw error;
|
|
2481
|
+
}
|
|
2482
|
+
finally {
|
|
2483
|
+
// Run 1.6 — item #4: release the scan lock on every exit path
|
|
2484
|
+
// (success, early-return, throw). Idempotent.
|
|
2485
|
+
if (ownsLease)
|
|
2486
|
+
lease.release();
|
|
304
2487
|
}
|
|
305
|
-
return {
|
|
306
|
-
components: uniqueComponents,
|
|
307
|
-
connections: uniqueConnections,
|
|
308
|
-
warnings: allWarnings,
|
|
309
|
-
fileChanges,
|
|
310
|
-
promptScan: promptScanResultHolder,
|
|
311
|
-
stats: {
|
|
312
|
-
scan_duration_ms: duration,
|
|
313
|
-
components_found: uniqueComponents.length,
|
|
314
|
-
connections_found: allConnections.length,
|
|
315
|
-
warnings_count: allWarnings.length,
|
|
316
|
-
files_scanned: sourceFiles.length,
|
|
317
|
-
files_changed: filesChanged,
|
|
318
|
-
prompts_found: promptScanResultHolder?.prompts.length,
|
|
319
|
-
},
|
|
320
|
-
};
|
|
321
2488
|
}
|
|
322
2489
|
/**
|
|
323
2490
|
* Quick scan - only packages, no code analysis
|
|
324
2491
|
*/
|
|
325
2492
|
export async function quickScan(projectRoot) {
|
|
326
|
-
|
|
327
|
-
return {
|
|
328
|
-
components: result.components,
|
|
329
|
-
connections: result.connections,
|
|
330
|
-
warnings: result.warnings,
|
|
331
|
-
};
|
|
2493
|
+
return scan(projectRoot, { quick: true });
|
|
332
2494
|
}
|
|
333
2495
|
/**
|
|
334
2496
|
* Scan only for AI prompts (detailed)
|
|
@@ -355,8 +2517,7 @@ export async function scanPromptsOnly(projectRoot, options = {}) {
|
|
|
355
2517
|
const result = await scanPrompts(root, {
|
|
356
2518
|
includeRawContent: true,
|
|
357
2519
|
detectVariables: true,
|
|
358
|
-
|
|
359
|
-
minCorroborationSignals: 2,
|
|
2520
|
+
aggressive: true,
|
|
360
2521
|
});
|
|
361
2522
|
// Attach tracer data
|
|
362
2523
|
if (traceResult) {
|
|
@@ -372,6 +2533,94 @@ export async function scanPromptsOnly(projectRoot, options = {}) {
|
|
|
372
2533
|
export { formatPromptsOutput, formatPromptDetail } from './scanners/prompts/index.js';
|
|
373
2534
|
// Re-export tracer types
|
|
374
2535
|
export { traceLLMCalls } from './scanners/connections/llm-call-tracer.js';
|
|
2536
|
+
/**
|
|
2537
|
+
* In-process debounce: tracks the timestamp of the last refresh ATTEMPT
|
|
2538
|
+
* per resolved project root. If a second call arrives while a first is still
|
|
2539
|
+
* in-flight (or was attempted within staleAfterMs), the second call returns
|
|
2540
|
+
* {refreshed:false, reason:'fresh'} without dispatching a second scan.
|
|
2541
|
+
*
|
|
2542
|
+
* This prevents a polling loop on MCP `status` from fanning out N concurrent
|
|
2543
|
+
* incremental scans. The map is module-scoped so it persists across calls
|
|
2544
|
+
* within the same Node.js process lifetime.
|
|
2545
|
+
*/
|
|
2546
|
+
const _lastRefreshAttemptMs = new Map();
|
|
2547
|
+
export async function autoRefreshIfStale(projectRoot, options = {}) {
|
|
2548
|
+
// Resolve opt-in / opt-out. Programmatic > env > default(true).
|
|
2549
|
+
const envOptOut = process.env['NAVGATOR_AUTO_REFRESH'] === 'false';
|
|
2550
|
+
const enabled = options.enabled ?? !envOptOut;
|
|
2551
|
+
if (!enabled) {
|
|
2552
|
+
return { refreshed: false, reason: 'disabled', message: 'auto-refresh disabled' };
|
|
2553
|
+
}
|
|
2554
|
+
const staleAfterMs = (options.staleAfterMinutes ?? 5) * 60 * 1000;
|
|
2555
|
+
const root = projectRoot || process.cwd();
|
|
2556
|
+
// Debounce: if a refresh was attempted for this root within staleAfterMs,
|
|
2557
|
+
// return 'fresh' immediately rather than piling on a second scan.
|
|
2558
|
+
// Stamp BEFORE any async work to close the race window — concurrent callers
|
|
2559
|
+
// see the guard the moment the first call passes it.
|
|
2560
|
+
const lastAttempt = _lastRefreshAttemptMs.get(root) ?? 0;
|
|
2561
|
+
if (Date.now() - lastAttempt < staleAfterMs) {
|
|
2562
|
+
return { refreshed: false, reason: 'fresh', message: 'refresh already in-flight or recently attempted' };
|
|
2563
|
+
}
|
|
2564
|
+
_lastRefreshAttemptMs.set(root, Date.now());
|
|
2565
|
+
try {
|
|
2566
|
+
const { loadIndex } = await import('./storage.js');
|
|
2567
|
+
const config = getConfig();
|
|
2568
|
+
const index = await loadIndex(config, root);
|
|
2569
|
+
if (!index || !index.last_scan) {
|
|
2570
|
+
return {
|
|
2571
|
+
refreshed: false,
|
|
2572
|
+
reason: 'no-index',
|
|
2573
|
+
message: 'no prior scan — run `navgator scan` first',
|
|
2574
|
+
};
|
|
2575
|
+
}
|
|
2576
|
+
const ageMs = Date.now() - index.last_scan;
|
|
2577
|
+
if (ageMs < staleAfterMs) {
|
|
2578
|
+
return {
|
|
2579
|
+
refreshed: false,
|
|
2580
|
+
reason: 'fresh',
|
|
2581
|
+
message: `graph fresh (${Math.round(ageMs / 1000)}s old)`,
|
|
2582
|
+
};
|
|
2583
|
+
}
|
|
2584
|
+
// Stale → let selectScanMode choose. Auto preserves mandatory full-scan
|
|
2585
|
+
// triggers for manifests/config while ordinary source edits stay fast.
|
|
2586
|
+
const scanFn = options.scanImpl ?? scan;
|
|
2587
|
+
const { captureDirtySnapshot, reconcileClean } = await import('./freshness/drainer.js');
|
|
2588
|
+
const dirtySnapshot = captureDirtySnapshot(root);
|
|
2589
|
+
const result = await scanFn(root, {
|
|
2590
|
+
mode: 'auto',
|
|
2591
|
+
_forcedChangedFiles: dirtySnapshot.paths,
|
|
2592
|
+
_beforeLeaseRelease: async () => reconcileClean(root, dirtySnapshot),
|
|
2593
|
+
});
|
|
2594
|
+
if (result.status === 'busy') {
|
|
2595
|
+
// Contention is retryable. Do not reconcile (the graph was not updated),
|
|
2596
|
+
// and remove the in-process debounce so the next read can retry.
|
|
2597
|
+
_lastRefreshAttemptMs.delete(root);
|
|
2598
|
+
return {
|
|
2599
|
+
refreshed: false,
|
|
2600
|
+
reason: 'busy',
|
|
2601
|
+
message: result.message,
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
const changed = (result.fileChanges?.added.length ?? 0) +
|
|
2605
|
+
(result.fileChanges?.modified.length ?? 0) +
|
|
2606
|
+
(result.fileChanges?.removed.length ?? 0);
|
|
2607
|
+
return {
|
|
2608
|
+
refreshed: true,
|
|
2609
|
+
reason: 'stale',
|
|
2610
|
+
filesChanged: changed,
|
|
2611
|
+
message: changed > 0
|
|
2612
|
+
? `↻ refreshed ${changed} changed file(s)`
|
|
2613
|
+
: '↻ refreshed (no file changes)',
|
|
2614
|
+
};
|
|
2615
|
+
}
|
|
2616
|
+
catch (err) {
|
|
2617
|
+
return {
|
|
2618
|
+
refreshed: false,
|
|
2619
|
+
reason: 'error',
|
|
2620
|
+
message: `auto-refresh failed: ${err instanceof Error ? err.message : 'unknown'}`,
|
|
2621
|
+
};
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
375
2624
|
/**
|
|
376
2625
|
* Get scan status/summary without running a full scan
|
|
377
2626
|
*/
|