@tyroneross/navgator 0.2.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +21 -7
- package/.claude-plugin/plugin.json +16 -11
- package/.codex-plugin/plugin.json +31 -0
- package/.mcp.json +8 -0
- package/CLAUDE.md +197 -23
- package/LICENSE +202 -21
- package/README.md +220 -33
- package/agents/architecture-advisor.md +6 -2
- package/agents/architecture-investigator.md +163 -0
- package/agents/architecture-planner.md +160 -0
- package/agents/external-resolver.md +97 -0
- package/dist/__tests__/agent-output.test.d.ts +5 -0
- package/dist/__tests__/agent-output.test.d.ts.map +1 -0
- package/dist/__tests__/agent-output.test.js +233 -0
- package/dist/__tests__/agent-output.test.js.map +1 -0
- package/dist/__tests__/architecture-insights-stack.test.d.ts +21 -0
- package/dist/__tests__/architecture-insights-stack.test.d.ts.map +1 -0
- package/dist/__tests__/architecture-insights-stack.test.js +86 -0
- package/dist/__tests__/architecture-insights-stack.test.js.map +1 -0
- package/dist/__tests__/architecture-insights.test.d.ts +2 -0
- package/dist/__tests__/architecture-insights.test.d.ts.map +1 -0
- package/dist/__tests__/architecture-insights.test.js +46 -0
- package/dist/__tests__/architecture-insights.test.js.map +1 -0
- package/dist/__tests__/audit-sampler.test.d.ts +10 -0
- package/dist/__tests__/audit-sampler.test.d.ts.map +1 -0
- package/dist/__tests__/audit-sampler.test.js +172 -0
- package/dist/__tests__/audit-sampler.test.js.map +1 -0
- package/dist/__tests__/audit-spc.test.d.ts +5 -0
- package/dist/__tests__/audit-spc.test.d.ts.map +1 -0
- package/dist/__tests__/audit-spc.test.js +94 -0
- package/dist/__tests__/audit-spc.test.js.map +1 -0
- package/dist/__tests__/audit-verifiers.test.d.ts +5 -0
- package/dist/__tests__/audit-verifiers.test.d.ts.map +1 -0
- package/dist/__tests__/audit-verifiers.test.js +248 -0
- package/dist/__tests__/audit-verifiers.test.js.map +1 -0
- package/dist/__tests__/auto-refresh.test.d.ts +12 -0
- package/dist/__tests__/auto-refresh.test.d.ts.map +1 -0
- package/dist/__tests__/auto-refresh.test.js +236 -0
- package/dist/__tests__/auto-refresh.test.js.map +1 -0
- package/dist/__tests__/bare-imports.test.d.ts +8 -0
- package/dist/__tests__/bare-imports.test.d.ts.map +1 -0
- package/dist/__tests__/bare-imports.test.js +176 -0
- package/dist/__tests__/bare-imports.test.js.map +1 -0
- package/dist/__tests__/classify.test.d.ts +5 -0
- package/dist/__tests__/classify.test.d.ts.map +1 -0
- package/dist/__tests__/classify.test.js +158 -0
- package/dist/__tests__/classify.test.js.map +1 -0
- package/dist/__tests__/cli-commands.test.d.ts +8 -0
- package/dist/__tests__/cli-commands.test.d.ts.map +1 -0
- package/dist/__tests__/cli-commands.test.js +207 -0
- package/dist/__tests__/cli-commands.test.js.map +1 -0
- package/dist/__tests__/consolidated-readers.test.d.ts +23 -0
- package/dist/__tests__/consolidated-readers.test.d.ts.map +1 -0
- package/dist/__tests__/consolidated-readers.test.js +200 -0
- package/dist/__tests__/consolidated-readers.test.js.map +1 -0
- package/dist/__tests__/coverage.test.d.ts +5 -0
- package/dist/__tests__/coverage.test.d.ts.map +1 -0
- package/dist/__tests__/coverage.test.js +120 -0
- package/dist/__tests__/coverage.test.js.map +1 -0
- package/dist/__tests__/deploy-scanner-runtime.test.d.ts +6 -0
- package/dist/__tests__/deploy-scanner-runtime.test.d.ts.map +1 -0
- package/dist/__tests__/deploy-scanner-runtime.test.js +168 -0
- package/dist/__tests__/deploy-scanner-runtime.test.js.map +1 -0
- package/dist/__tests__/env-scanner.test.d.ts +2 -0
- package/dist/__tests__/env-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/env-scanner.test.js +191 -0
- package/dist/__tests__/env-scanner.test.js.map +1 -0
- package/dist/__tests__/freshness/cli-freshness.test.d.ts +2 -0
- package/dist/__tests__/freshness/cli-freshness.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/cli-freshness.test.js +26 -0
- package/dist/__tests__/freshness/cli-freshness.test.js.map +1 -0
- package/dist/__tests__/freshness/dirty-ledger.test.d.ts +2 -0
- package/dist/__tests__/freshness/dirty-ledger.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/dirty-ledger.test.js +39 -0
- package/dist/__tests__/freshness/dirty-ledger.test.js.map +1 -0
- package/dist/__tests__/freshness/drainer.test.d.ts +2 -0
- package/dist/__tests__/freshness/drainer.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/drainer.test.js +103 -0
- package/dist/__tests__/freshness/drainer.test.js.map +1 -0
- package/dist/__tests__/freshness/paths.test.d.ts +2 -0
- package/dist/__tests__/freshness/paths.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/paths.test.js +19 -0
- package/dist/__tests__/freshness/paths.test.js.map +1 -0
- package/dist/__tests__/freshness/scan-lock.test.d.ts +2 -0
- package/dist/__tests__/freshness/scan-lock.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/scan-lock.test.js +40 -0
- package/dist/__tests__/freshness/scan-lock.test.js.map +1 -0
- package/dist/__tests__/freshness/stamp.test.d.ts +2 -0
- package/dist/__tests__/freshness/stamp.test.d.ts.map +1 -0
- package/dist/__tests__/freshness/stamp.test.js +36 -0
- package/dist/__tests__/freshness/stamp.test.js.map +1 -0
- package/dist/__tests__/gitignore-safety.test.d.ts +2 -0
- package/dist/__tests__/gitignore-safety.test.d.ts.map +1 -0
- package/dist/__tests__/gitignore-safety.test.js +110 -0
- package/dist/__tests__/gitignore-safety.test.js.map +1 -0
- package/dist/__tests__/helpers.d.ts +37 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/__tests__/helpers.js +134 -0
- package/dist/__tests__/helpers.js.map +1 -0
- package/dist/__tests__/impact.test.d.ts +5 -0
- package/dist/__tests__/impact.test.d.ts.map +1 -0
- package/dist/__tests__/impact.test.js +221 -0
- package/dist/__tests__/impact.test.js.map +1 -0
- package/dist/__tests__/lessons-store.test.d.ts +8 -0
- package/dist/__tests__/lessons-store.test.d.ts.map +1 -0
- package/dist/__tests__/lessons-store.test.js +232 -0
- package/dist/__tests__/lessons-store.test.js.map +1 -0
- package/dist/__tests__/llm-dedup.test.d.ts +2 -0
- package/dist/__tests__/llm-dedup.test.d.ts.map +1 -0
- package/dist/__tests__/llm-dedup.test.js +155 -0
- package/dist/__tests__/llm-dedup.test.js.map +1 -0
- package/dist/__tests__/mjs-frontend-fetch.test.d.ts +19 -0
- package/dist/__tests__/mjs-frontend-fetch.test.d.ts.map +1 -0
- package/dist/__tests__/mjs-frontend-fetch.test.js +179 -0
- package/dist/__tests__/mjs-frontend-fetch.test.js.map +1 -0
- package/dist/__tests__/multi-stack-discovery.test.d.ts +11 -0
- package/dist/__tests__/multi-stack-discovery.test.d.ts.map +1 -0
- package/dist/__tests__/multi-stack-discovery.test.js +75 -0
- package/dist/__tests__/multi-stack-discovery.test.js.map +1 -0
- package/dist/__tests__/per-entity-files-gate.test.d.ts +22 -0
- package/dist/__tests__/per-entity-files-gate.test.d.ts.map +1 -0
- package/dist/__tests__/per-entity-files-gate.test.js +160 -0
- package/dist/__tests__/per-entity-files-gate.test.js.map +1 -0
- package/dist/__tests__/prisma-calls.test.d.ts +2 -0
- package/dist/__tests__/prisma-calls.test.d.ts.map +1 -0
- package/dist/__tests__/prisma-calls.test.js +125 -0
- package/dist/__tests__/prisma-calls.test.js.map +1 -0
- package/dist/__tests__/prisma-parser.test.d.ts +2 -0
- package/dist/__tests__/prisma-parser.test.d.ts.map +1 -0
- package/dist/__tests__/prisma-parser.test.js +252 -0
- package/dist/__tests__/prisma-parser.test.js.map +1 -0
- package/dist/__tests__/prompt-detector.test.d.ts +5 -0
- package/dist/__tests__/prompt-detector.test.d.ts.map +1 -0
- package/dist/__tests__/prompt-detector.test.js +75 -0
- package/dist/__tests__/prompt-detector.test.js.map +1 -0
- package/dist/__tests__/queue-scanner.test.d.ts +5 -0
- package/dist/__tests__/queue-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/queue-scanner.test.js +85 -0
- package/dist/__tests__/queue-scanner.test.js.map +1 -0
- package/dist/__tests__/resolve.test.d.ts +5 -0
- package/dist/__tests__/resolve.test.d.ts.map +1 -0
- package/dist/__tests__/resolve.test.js +196 -0
- package/dist/__tests__/resolve.test.js.map +1 -0
- package/dist/__tests__/rules.test.d.ts +2 -0
- package/dist/__tests__/rules.test.d.ts.map +1 -0
- package/dist/__tests__/rules.test.js +343 -0
- package/dist/__tests__/rules.test.js.map +1 -0
- package/dist/__tests__/sandbox.test.d.ts +5 -0
- package/dist/__tests__/sandbox.test.d.ts.map +1 -0
- package/dist/__tests__/sandbox.test.js +189 -0
- package/dist/__tests__/sandbox.test.js.map +1 -0
- package/dist/__tests__/scanner-audit.test.d.ts +9 -0
- package/dist/__tests__/scanner-audit.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-audit.test.js +64 -0
- package/dist/__tests__/scanner-audit.test.js.map +1 -0
- package/dist/__tests__/scanner-characterization.test.d.ts +16 -0
- package/dist/__tests__/scanner-characterization.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-characterization.test.js +167 -0
- package/dist/__tests__/scanner-characterization.test.js.map +1 -0
- package/dist/__tests__/scanner-incremental.test.d.ts +13 -0
- package/dist/__tests__/scanner-incremental.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-incremental.test.js +725 -0
- package/dist/__tests__/scanner-incremental.test.js.map +1 -0
- package/dist/__tests__/scanner-integration.test.d.ts +7 -0
- package/dist/__tests__/scanner-integration.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-integration.test.js +211 -0
- package/dist/__tests__/scanner-integration.test.js.map +1 -0
- package/dist/__tests__/scip-new-catches.test.d.ts +19 -0
- package/dist/__tests__/scip-new-catches.test.d.ts.map +1 -0
- package/dist/__tests__/scip-new-catches.test.js +90 -0
- package/dist/__tests__/scip-new-catches.test.js.map +1 -0
- package/dist/__tests__/subgraph.test.d.ts +5 -0
- package/dist/__tests__/subgraph.test.d.ts.map +1 -0
- package/dist/__tests__/subgraph.test.js +145 -0
- package/dist/__tests__/subgraph.test.js.map +1 -0
- package/dist/__tests__/trace.test.d.ts +5 -0
- package/dist/__tests__/trace.test.d.ts.map +1 -0
- package/dist/__tests__/trace.test.js +221 -0
- package/dist/__tests__/trace.test.js.map +1 -0
- package/dist/agent-output.d.ts +16 -0
- package/dist/agent-output.d.ts.map +1 -0
- package/dist/agent-output.js +142 -0
- package/dist/agent-output.js.map +1 -0
- package/dist/architecture-insights.d.ts +17 -0
- package/dist/architecture-insights.d.ts.map +1 -0
- package/dist/architecture-insights.js +178 -0
- package/dist/architecture-insights.js.map +1 -0
- package/dist/audit/index.d.ts +69 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +255 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/sampler.d.ts +98 -0
- package/dist/audit/sampler.d.ts.map +1 -0
- package/dist/audit/sampler.js +298 -0
- package/dist/audit/sampler.js.map +1 -0
- package/dist/audit/spc.d.ts +62 -0
- package/dist/audit/spc.d.ts.map +1 -0
- package/dist/audit/spc.js +81 -0
- package/dist/audit/spc.js.map +1 -0
- package/dist/audit/verifiers.d.ts +81 -0
- package/dist/audit/verifiers.d.ts.map +1 -0
- package/dist/audit/verifiers.js +366 -0
- package/dist/audit/verifiers.js.map +1 -0
- package/dist/classify.d.ts +19 -0
- package/dist/classify.d.ts.map +1 -0
- package/dist/classify.js +124 -0
- package/dist/classify.js.map +1 -0
- package/dist/cli/commands/connections.d.ts +3 -0
- package/dist/cli/commands/connections.d.ts.map +1 -0
- package/dist/cli/commands/connections.js +125 -0
- package/dist/cli/commands/connections.js.map +1 -0
- package/dist/cli/commands/coverage.d.ts +3 -0
- package/dist/cli/commands/coverage.d.ts.map +1 -0
- package/dist/cli/commands/coverage.js +94 -0
- package/dist/cli/commands/coverage.js.map +1 -0
- package/dist/cli/commands/dead.d.ts +3 -0
- package/dist/cli/commands/dead.d.ts.map +1 -0
- package/dist/cli/commands/dead.js +80 -0
- package/dist/cli/commands/dead.js.map +1 -0
- package/dist/cli/commands/diagram.d.ts +3 -0
- package/dist/cli/commands/diagram.d.ts.map +1 -0
- package/dist/cli/commands/diagram.js +102 -0
- package/dist/cli/commands/diagram.js.map +1 -0
- package/dist/cli/commands/find.d.ts +3 -0
- package/dist/cli/commands/find.d.ts.map +1 -0
- package/dist/cli/commands/find.js +128 -0
- package/dist/cli/commands/find.js.map +1 -0
- package/dist/cli/commands/freshness.d.ts +20 -0
- package/dist/cli/commands/freshness.d.ts.map +1 -0
- package/dist/cli/commands/freshness.js +90 -0
- package/dist/cli/commands/freshness.js.map +1 -0
- package/dist/cli/commands/helpers.d.ts +7 -0
- package/dist/cli/commands/helpers.d.ts.map +1 -0
- package/dist/cli/commands/helpers.js +30 -0
- package/dist/cli/commands/helpers.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +3 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +172 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/lessons.d.ts +6 -0
- package/dist/cli/commands/lessons.d.ts.map +1 -0
- package/dist/cli/commands/lessons.js +279 -0
- package/dist/cli/commands/lessons.js.map +1 -0
- package/dist/cli/commands/list.d.ts +3 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +91 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/llm-map.d.ts +3 -0
- package/dist/cli/commands/llm-map.d.ts.map +1 -0
- package/dist/cli/commands/llm-map.js +121 -0
- package/dist/cli/commands/llm-map.js.map +1 -0
- package/dist/cli/commands/misc.d.ts +17 -0
- package/dist/cli/commands/misc.d.ts.map +1 -0
- package/dist/cli/commands/misc.js +495 -0
- package/dist/cli/commands/misc.js.map +1 -0
- package/dist/cli/commands/prompts.d.ts +3 -0
- package/dist/cli/commands/prompts.d.ts.map +1 -0
- package/dist/cli/commands/prompts.js +74 -0
- package/dist/cli/commands/prompts.js.map +1 -0
- package/dist/cli/commands/rules.d.ts +3 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +61 -0
- package/dist/cli/commands/rules.js.map +1 -0
- package/dist/cli/commands/scan.d.ts +3 -0
- package/dist/cli/commands/scan.d.ts.map +1 -0
- package/dist/cli/commands/scan.js +177 -0
- package/dist/cli/commands/scan.js.map +1 -0
- package/dist/cli/commands/schema.d.ts +3 -0
- package/dist/cli/commands/schema.d.ts.map +1 -0
- package/dist/cli/commands/schema.js +126 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +340 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/subgraph.d.ts +3 -0
- package/dist/cli/commands/subgraph.d.ts.map +1 -0
- package/dist/cli/commands/subgraph.js +55 -0
- package/dist/cli/commands/subgraph.js.map +1 -0
- package/dist/cli/commands/temporal.d.ts +3 -0
- package/dist/cli/commands/temporal.d.ts.map +1 -0
- package/dist/cli/commands/temporal.js +112 -0
- package/dist/cli/commands/temporal.js.map +1 -0
- package/dist/cli/commands/trace.d.ts +3 -0
- package/dist/cli/commands/trace.d.ts.map +1 -0
- package/dist/cli/commands/trace.js +65 -0
- package/dist/cli/commands/trace.js.map +1 -0
- package/dist/cli/index.js +88 -825
- package/dist/cli/index.js.map +1 -1
- package/dist/config.d.ts +13 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +106 -12
- package/dist/config.js.map +1 -1
- package/dist/coverage.d.ts +37 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/coverage.js +177 -0
- package/dist/coverage.js.map +1 -0
- package/dist/diagram.d.ts.map +1 -1
- package/dist/diagram.js +41 -0
- package/dist/diagram.js.map +1 -1
- package/dist/diff.d.ts +57 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +527 -0
- package/dist/diff.js.map +1 -0
- package/dist/enrich/cache.d.ts +41 -0
- package/dist/enrich/cache.d.ts.map +1 -0
- package/dist/enrich/cache.js +97 -0
- package/dist/enrich/cache.js.map +1 -0
- package/dist/enrich/external-enrichment.types.d.ts +91 -0
- package/dist/enrich/external-enrichment.types.d.ts.map +1 -0
- package/dist/enrich/external-enrichment.types.js +38 -0
- package/dist/enrich/external-enrichment.types.js.map +1 -0
- package/dist/enrich/external-resolver.d.ts +95 -0
- package/dist/enrich/external-resolver.d.ts.map +1 -0
- package/dist/enrich/external-resolver.js +222 -0
- package/dist/enrich/external-resolver.js.map +1 -0
- package/dist/enrich/fetchers.d.ts +30 -0
- package/dist/enrich/fetchers.d.ts.map +1 -0
- package/dist/enrich/fetchers.js +89 -0
- package/dist/enrich/fetchers.js.map +1 -0
- package/dist/file-resolve.d.ts +35 -0
- package/dist/file-resolve.d.ts.map +1 -0
- package/dist/file-resolve.js +159 -0
- package/dist/file-resolve.js.map +1 -0
- package/dist/freshness/dirty-ledger.d.ts +7 -0
- package/dist/freshness/dirty-ledger.d.ts.map +1 -0
- package/dist/freshness/dirty-ledger.js +56 -0
- package/dist/freshness/dirty-ledger.js.map +1 -0
- package/dist/freshness/drainer.d.ts +38 -0
- package/dist/freshness/drainer.d.ts.map +1 -0
- package/dist/freshness/drainer.js +88 -0
- package/dist/freshness/drainer.js.map +1 -0
- package/dist/freshness/paths.d.ts +9 -0
- package/dist/freshness/paths.d.ts.map +1 -0
- package/dist/freshness/paths.js +24 -0
- package/dist/freshness/paths.js.map +1 -0
- package/dist/freshness/scan-lock.d.ts +8 -0
- package/dist/freshness/scan-lock.d.ts.map +1 -0
- package/dist/freshness/scan-lock.js +68 -0
- package/dist/freshness/scan-lock.js.map +1 -0
- package/dist/freshness/stamp.d.ts +25 -0
- package/dist/freshness/stamp.d.ts.map +1 -0
- package/dist/freshness/stamp.js +50 -0
- package/dist/freshness/stamp.js.map +1 -0
- package/dist/git.d.ts +12 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +42 -0
- package/dist/git.js.map +1 -0
- package/dist/gitignore-safety.d.ts +41 -0
- package/dist/gitignore-safety.d.ts.map +1 -0
- package/dist/gitignore-safety.js +107 -0
- package/dist/gitignore-safety.js.map +1 -0
- package/dist/impact.d.ts +20 -0
- package/dist/impact.d.ts.map +1 -0
- package/dist/impact.js +89 -0
- package/dist/impact.js.map +1 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/lessons-store.d.ts +93 -0
- package/dist/lessons-store.d.ts.map +1 -0
- package/dist/lessons-store.js +265 -0
- package/dist/lessons-store.js.map +1 -0
- package/dist/llm-dedup.d.ts +40 -0
- package/dist/llm-dedup.d.ts.map +1 -0
- package/dist/llm-dedup.js +373 -0
- package/dist/llm-dedup.js.map +1 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +87 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +198 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +744 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/metrics/pagerank-louvain.d.ts +44 -0
- package/dist/metrics/pagerank-louvain.d.ts.map +1 -0
- package/dist/metrics/pagerank-louvain.js +128 -0
- package/dist/metrics/pagerank-louvain.js.map +1 -0
- package/dist/parsers/scip-runner.d.ts +63 -0
- package/dist/parsers/scip-runner.d.ts.map +1 -0
- package/dist/parsers/scip-runner.js +179 -0
- package/dist/parsers/scip-runner.js.map +1 -0
- package/dist/projects.d.ts +54 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +153 -0
- package/dist/projects.js.map +1 -0
- package/dist/resolve.d.ts +22 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +128 -0
- package/dist/resolve.js.map +1 -0
- package/dist/rules.d.ts +36 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +484 -0
- package/dist/rules.js.map +1 -0
- package/dist/sandbox.d.ts +33 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +91 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/scan-lock.d.ts +37 -0
- package/dist/scan-lock.d.ts.map +1 -0
- package/dist/scan-lock.js +145 -0
- package/dist/scan-lock.js.map +1 -0
- package/dist/scanner.d.ts +126 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +1711 -235
- package/dist/scanner.js.map +1 -1
- package/dist/scanners/connections/ast-scanner.d.ts +9 -2
- package/dist/scanners/connections/ast-scanner.d.ts.map +1 -1
- package/dist/scanners/connections/ast-scanner.js +19 -4
- package/dist/scanners/connections/ast-scanner.js.map +1 -1
- package/dist/scanners/connections/import-scanner.d.ts +27 -0
- package/dist/scanners/connections/import-scanner.d.ts.map +1 -0
- package/dist/scanners/connections/import-scanner.js +537 -0
- package/dist/scanners/connections/import-scanner.js.map +1 -0
- package/dist/scanners/connections/llm-call-tracer.d.ts +1 -1
- package/dist/scanners/connections/llm-call-tracer.d.ts.map +1 -1
- package/dist/scanners/connections/llm-call-tracer.js +6 -2
- package/dist/scanners/connections/llm-call-tracer.js.map +1 -1
- package/dist/scanners/connections/prisma-calls.d.ts +11 -0
- package/dist/scanners/connections/prisma-calls.d.ts.map +1 -0
- package/dist/scanners/connections/prisma-calls.js +237 -0
- package/dist/scanners/connections/prisma-calls.js.map +1 -0
- package/dist/scanners/connections/service-calls.d.ts +1 -1
- package/dist/scanners/connections/service-calls.d.ts.map +1 -1
- package/dist/scanners/connections/service-calls.js +35 -3
- package/dist/scanners/connections/service-calls.js.map +1 -1
- package/dist/scanners/infrastructure/cron-scanner.d.ts +14 -0
- package/dist/scanners/infrastructure/cron-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/cron-scanner.js +383 -0
- package/dist/scanners/infrastructure/cron-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/deploy-scanner.d.ts +11 -0
- package/dist/scanners/infrastructure/deploy-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/deploy-scanner.js +508 -0
- package/dist/scanners/infrastructure/deploy-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/env-scanner.d.ts +55 -0
- package/dist/scanners/infrastructure/env-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/env-scanner.js +431 -0
- package/dist/scanners/infrastructure/env-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.d.ts +52 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.d.ts.map +1 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.js +480 -0
- package/dist/scanners/infrastructure/field-usage-analyzer.js.map +1 -0
- package/dist/scanners/infrastructure/prisma-parser.d.ts +21 -0
- package/dist/scanners/infrastructure/prisma-parser.d.ts.map +1 -0
- package/dist/scanners/infrastructure/prisma-parser.js +58 -0
- package/dist/scanners/infrastructure/prisma-parser.js.map +1 -0
- package/dist/scanners/infrastructure/prisma-scanner.d.ts +30 -0
- package/dist/scanners/infrastructure/prisma-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/prisma-scanner.js +329 -0
- package/dist/scanners/infrastructure/prisma-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/queue-scanner.d.ts +14 -0
- package/dist/scanners/infrastructure/queue-scanner.d.ts.map +1 -0
- package/dist/scanners/infrastructure/queue-scanner.js +455 -0
- package/dist/scanners/infrastructure/queue-scanner.js.map +1 -0
- package/dist/scanners/infrastructure/typespec-validator.d.ts +50 -0
- package/dist/scanners/infrastructure/typespec-validator.d.ts.map +1 -0
- package/dist/scanners/infrastructure/typespec-validator.js +407 -0
- package/dist/scanners/infrastructure/typespec-validator.js.map +1 -0
- package/dist/scanners/packages/swift.d.ts +5 -0
- package/dist/scanners/packages/swift.d.ts.map +1 -1
- package/dist/scanners/packages/swift.js +23 -0
- package/dist/scanners/packages/swift.js.map +1 -1
- package/dist/scanners/prompts/detector.d.ts +13 -2
- package/dist/scanners/prompts/detector.d.ts.map +1 -1
- package/dist/scanners/prompts/detector.js +97 -46
- package/dist/scanners/prompts/detector.js.map +1 -1
- package/dist/scanners/prompts/index.d.ts +1 -1
- package/dist/scanners/prompts/index.d.ts.map +1 -1
- package/dist/scanners/prompts/index.js +2 -2
- package/dist/scanners/prompts/index.js.map +1 -1
- package/dist/scanners/swift/code-scanner.d.ts +1 -1
- package/dist/scanners/swift/code-scanner.d.ts.map +1 -1
- package/dist/scanners/swift/code-scanner.js +216 -2
- package/dist/scanners/swift/code-scanner.js.map +1 -1
- package/dist/scanners/swift/swiftui-scanner.d.ts +45 -0
- package/dist/scanners/swift/swiftui-scanner.d.ts.map +1 -0
- package/dist/scanners/swift/swiftui-scanner.js +606 -0
- package/dist/scanners/swift/swiftui-scanner.js.map +1 -0
- package/dist/scanners/xcode/pbxproj-parser.d.ts +32 -0
- package/dist/scanners/xcode/pbxproj-parser.d.ts.map +1 -0
- package/dist/scanners/xcode/pbxproj-parser.js +407 -0
- package/dist/scanners/xcode/pbxproj-parser.js.map +1 -0
- package/dist/scanners/xcode/storyboard-scanner.d.ts +13 -0
- package/dist/scanners/xcode/storyboard-scanner.d.ts.map +1 -0
- package/dist/scanners/xcode/storyboard-scanner.js +236 -0
- package/dist/scanners/xcode/storyboard-scanner.js.map +1 -0
- package/dist/storage/markdown-view.d.ts +49 -0
- package/dist/storage/markdown-view.d.ts.map +1 -0
- package/dist/storage/markdown-view.js +233 -0
- package/dist/storage/markdown-view.js.map +1 -0
- package/dist/storage.d.ts +225 -9
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +945 -86
- package/dist/storage.js.map +1 -1
- package/dist/subgraph.d.ts +30 -0
- package/dist/subgraph.d.ts.map +1 -0
- package/dist/subgraph.js +106 -0
- package/dist/subgraph.js.map +1 -0
- package/dist/temporal/git-store.d.ts +65 -0
- package/dist/temporal/git-store.d.ts.map +1 -0
- package/dist/temporal/git-store.js +166 -0
- package/dist/temporal/git-store.js.map +1 -0
- package/dist/trace.d.ts +38 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +292 -0
- package/dist/trace.js.map +1 -0
- package/dist/types.d.ts +322 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +53 -0
- package/dist/types.js.map +1 -1
- package/hooks/hooks.json +1 -55
- package/hooks/mark-dirty.sh +20 -0
- package/hooks/post-bash-suggest.sh +30 -0
- package/hooks/post-edit-suggest.sh +29 -0
- package/hooks/pre-edit-warn.sh +28 -0
- package/hooks/session-start.sh +19 -0
- package/hooks/stop-suggest.sh +49 -0
- package/package.json +30 -11
- package/scripts/install-codex-plugin.sh +119 -0
- package/scripts/install-plugin.sh +29 -24
- package/skills/architecture-export/SKILL.md +79 -0
- package/skills/architecture-scan/SKILL.md +64 -0
- package/skills/code-review/SKILL.md +368 -0
- package/skills/impact-analysis/SKILL.md +80 -0
- package/skills/infrastructure-scanning.md +42 -0
- package/skills/navgator-setup/SKILL.md +108 -0
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +3 -0
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/required-server-files.json +4 -4
- package/web/.next/standalone/web/.next/routes-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/api/rules/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/rules/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/subgraph/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/trace/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +2 -2
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__0426efe8._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__cd5f36ce._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__ee6fc95f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +9 -4
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_rules_route_actions_3de01bd5.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_subgraph_route_actions_d8b5a63f.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_trace_route_actions_b0703ae2.js +3 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +4 -4
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/22a09ecf6ba35cfd.js +17 -0
- package/web/.next/standalone/web/.next/static/chunks/9857ba86ce4e82d8.css +2 -0
- package/web/.next/standalone/web/.next/static/chunks/f899547f99ef4b76.css +1 -0
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/53b9e256198e5412-s.853d50a3.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.55554cd0.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.ea323500.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.3b6cae6d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/fef07dbb0973bf53-s.518e079e.woff2 +0 -0
- package/web/.next/standalone/web/app/api/components/route.ts +1 -1
- package/web/.next/standalone/web/app/api/connections/route.ts +3 -1
- package/web/.next/standalone/web/app/api/graph/route.ts +3 -3
- package/web/.next/standalone/web/app/api/projects/route.ts +1 -1
- package/web/.next/standalone/web/app/api/prompts/route.ts +2 -2
- package/web/.next/standalone/web/app/api/rules/route.ts +213 -0
- package/web/.next/standalone/web/app/api/settings/route.ts +2 -2
- package/web/.next/standalone/web/app/api/status/route.ts +1 -1
- package/web/.next/standalone/web/app/api/subgraph/route.ts +267 -0
- package/web/.next/standalone/web/app/api/trace/route.ts +321 -0
- package/web/.next/standalone/web/app/page.tsx +9 -1
- package/web/.next/standalone/web/components/connections-panel.tsx +23 -6
- package/web/.next/standalone/web/components/coverage-panel.tsx +309 -0
- package/web/.next/standalone/web/components/rules-panel.tsx +156 -0
- package/web/.next/standalone/web/components/sidebar.tsx +8 -0
- package/web/.next/standalone/web/components/status-overview.tsx +24 -1
- package/web/.next/standalone/web/components/subgraph-panel.tsx +382 -0
- package/web/.next/standalone/web/components/trace-panel.tsx +325 -0
- package/web/.next/standalone/web/lib/hooks/index.ts +3 -0
- package/web/.next/standalone/web/lib/hooks/use-coverage.ts +68 -0
- package/web/.next/standalone/web/lib/hooks/use-subgraph.ts +85 -0
- package/web/.next/standalone/web/lib/hooks/use-trace.ts +84 -0
- package/web/.next/standalone/web/lib/types.ts +108 -0
- package/web/.next/standalone/web/package-lock.json +218 -0
- package/web/.next/standalone/web/package.json +4 -2
- package/web/.next/standalone/web/server.js +1 -1
- package/web/.next/static/chunks/22a09ecf6ba35cfd.js +17 -0
- package/web/.next/static/chunks/9857ba86ce4e82d8.css +2 -0
- package/web/.next/static/chunks/f899547f99ef4b76.css +1 -0
- package/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/static/media/53b9e256198e5412-s.853d50a3.woff2 +0 -0
- package/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.55554cd0.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.ea323500.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.3b6cae6d.woff2 +0 -0
- package/web/.next/static/media/fef07dbb0973bf53-s.518e079e.woff2 +0 -0
- package/skills/check/SKILL.md +0 -64
- package/skills/connections/SKILL.md +0 -54
- package/skills/diagram/SKILL.md +0 -64
- package/skills/export/SKILL.md +0 -49
- package/skills/impact/SKILL.md +0 -58
- package/skills/install/SKILL.md +0 -94
- package/skills/scan/SKILL.md +0 -75
- package/skills/status/SKILL.md +0 -37
- package/skills/ui/SKILL.md +0 -43
- package/skills/update/SKILL.md +0 -43
- package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +0 -2
- package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +0 -1
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +0 -2
- package/web/.next/static/chunks/c056475f5f4424b6.css +0 -1
- package/web/.next/static/chunks/cb3513192b63e480.js +0 -12
- package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_ssgManifest.js +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_buildManifest.js +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{P-ZMQO7_Wnj487ks3guqa → qZVrJ4kmwXfw4Ikgj1oXR}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import {
|
|
5
|
+
AlertCircle,
|
|
6
|
+
ArrowRight,
|
|
7
|
+
Loader2,
|
|
8
|
+
RefreshCw,
|
|
9
|
+
Route,
|
|
10
|
+
Search,
|
|
11
|
+
} from "lucide-react"
|
|
12
|
+
import { Card, CardContent } from "@/components/ui/card"
|
|
13
|
+
import { Button } from "@/components/ui/button"
|
|
14
|
+
import { Input } from "@/components/ui/input"
|
|
15
|
+
import { Badge } from "@/components/ui/badge"
|
|
16
|
+
import { Slider } from "@/components/ui/slider"
|
|
17
|
+
import { cn } from "@/lib/utils"
|
|
18
|
+
import { useTrace } from "@/lib/hooks"
|
|
19
|
+
import { useComponents } from "@/lib/hooks"
|
|
20
|
+
|
|
21
|
+
const directionOptions = [
|
|
22
|
+
{ value: "forward" as const, label: "Forward" },
|
|
23
|
+
{ value: "backward" as const, label: "Backward" },
|
|
24
|
+
{ value: "both" as const, label: "Both" },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
const classificationColors: Record<string, string> = {
|
|
28
|
+
production: "text-gray-600",
|
|
29
|
+
test: "text-amber-600",
|
|
30
|
+
admin: "text-blue-600",
|
|
31
|
+
analytics: "text-green-600",
|
|
32
|
+
"dev-only": "text-purple-600",
|
|
33
|
+
migration: "text-orange-600",
|
|
34
|
+
unknown: "text-gray-400",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function TracePanel() {
|
|
38
|
+
const [query, setQuery] = useState("")
|
|
39
|
+
const [activeComponent, setActiveComponent] = useState("")
|
|
40
|
+
const [direction, setDirection] = useState<"forward" | "backward" | "both">(
|
|
41
|
+
"both"
|
|
42
|
+
)
|
|
43
|
+
const [maxDepth, setMaxDepth] = useState(5)
|
|
44
|
+
const [showSuggestions, setShowSuggestions] = useState(false)
|
|
45
|
+
|
|
46
|
+
const { components } = useComponents({ autoFetch: true })
|
|
47
|
+
const { trace, isLoading, error, refresh } = useTrace({
|
|
48
|
+
component: activeComponent || undefined,
|
|
49
|
+
direction,
|
|
50
|
+
maxDepth,
|
|
51
|
+
autoFetch: !!activeComponent,
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
// Filter component names for autocomplete
|
|
55
|
+
const suggestions = query.length > 0
|
|
56
|
+
? components
|
|
57
|
+
.filter((c) =>
|
|
58
|
+
c.name.toLowerCase().includes(query.toLowerCase())
|
|
59
|
+
)
|
|
60
|
+
.slice(0, 8)
|
|
61
|
+
: []
|
|
62
|
+
|
|
63
|
+
const handleTrace = () => {
|
|
64
|
+
if (query.trim()) {
|
|
65
|
+
setActiveComponent(query.trim())
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const handleSelectSuggestion = (name: string) => {
|
|
70
|
+
setQuery(name)
|
|
71
|
+
setActiveComponent(name)
|
|
72
|
+
setShowSuggestions(false)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div className="space-y-6">
|
|
77
|
+
<div className="flex items-center justify-between">
|
|
78
|
+
<div>
|
|
79
|
+
<h1 className="text-2xl font-semibold text-foreground">
|
|
80
|
+
Dataflow Trace
|
|
81
|
+
</h1>
|
|
82
|
+
<p className="text-sm text-muted-foreground">
|
|
83
|
+
{trace
|
|
84
|
+
? `${trace.paths.length} path${trace.paths.length !== 1 ? "s" : ""} found, ${trace.components_touched.length} components touched`
|
|
85
|
+
: "Select a component and trace its dataflow"}
|
|
86
|
+
</p>
|
|
87
|
+
</div>
|
|
88
|
+
{activeComponent && (
|
|
89
|
+
<Button
|
|
90
|
+
variant="outline"
|
|
91
|
+
size="sm"
|
|
92
|
+
onClick={() => refresh()}
|
|
93
|
+
disabled={isLoading}
|
|
94
|
+
>
|
|
95
|
+
{isLoading ? (
|
|
96
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
97
|
+
) : (
|
|
98
|
+
<RefreshCw className="h-4 w-4" />
|
|
99
|
+
)}
|
|
100
|
+
<span className="ml-2">Refresh</span>
|
|
101
|
+
</Button>
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
{error && (
|
|
106
|
+
<div className="flex items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3">
|
|
107
|
+
<AlertCircle className="h-4 w-4 text-destructive" />
|
|
108
|
+
<p className="text-sm text-destructive">{error}</p>
|
|
109
|
+
</div>
|
|
110
|
+
)}
|
|
111
|
+
|
|
112
|
+
{/* Controls */}
|
|
113
|
+
<Card className="bg-card">
|
|
114
|
+
<CardContent className="p-4">
|
|
115
|
+
<div className="flex flex-col gap-4 sm:flex-row sm:items-end">
|
|
116
|
+
{/* Component input with autocomplete */}
|
|
117
|
+
<div className="relative flex-1">
|
|
118
|
+
<label className="mb-1 block text-xs font-medium text-muted-foreground">
|
|
119
|
+
Component
|
|
120
|
+
</label>
|
|
121
|
+
<div className="relative">
|
|
122
|
+
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
|
123
|
+
<Input
|
|
124
|
+
placeholder="Search components..."
|
|
125
|
+
value={query}
|
|
126
|
+
onChange={(e) => {
|
|
127
|
+
setQuery(e.target.value)
|
|
128
|
+
setShowSuggestions(true)
|
|
129
|
+
}}
|
|
130
|
+
onFocus={() => setShowSuggestions(true)}
|
|
131
|
+
onKeyDown={(e) => {
|
|
132
|
+
if (e.key === "Enter") {
|
|
133
|
+
handleTrace()
|
|
134
|
+
setShowSuggestions(false)
|
|
135
|
+
}
|
|
136
|
+
}}
|
|
137
|
+
className="pl-9"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
{showSuggestions && suggestions.length > 0 && (
|
|
141
|
+
<div className="absolute z-10 mt-1 w-full rounded-md border border-border bg-popover shadow-md">
|
|
142
|
+
{suggestions.map((c) => (
|
|
143
|
+
<button
|
|
144
|
+
key={c.id}
|
|
145
|
+
className="flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-accent"
|
|
146
|
+
onMouseDown={(e) => e.preventDefault()}
|
|
147
|
+
onClick={() => handleSelectSuggestion(c.name)}
|
|
148
|
+
>
|
|
149
|
+
<span className="font-medium text-foreground">
|
|
150
|
+
{c.name}
|
|
151
|
+
</span>
|
|
152
|
+
<span className="text-xs text-muted-foreground">
|
|
153
|
+
{c.layer}
|
|
154
|
+
</span>
|
|
155
|
+
</button>
|
|
156
|
+
))}
|
|
157
|
+
</div>
|
|
158
|
+
)}
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
{/* Direction toggle */}
|
|
162
|
+
<div>
|
|
163
|
+
<label className="mb-1 block text-xs font-medium text-muted-foreground">
|
|
164
|
+
Direction
|
|
165
|
+
</label>
|
|
166
|
+
<div className="flex rounded-md border border-border">
|
|
167
|
+
{directionOptions.map((opt) => (
|
|
168
|
+
<button
|
|
169
|
+
key={opt.value}
|
|
170
|
+
onClick={() => setDirection(opt.value)}
|
|
171
|
+
className={cn(
|
|
172
|
+
"px-3 py-2 text-xs font-medium transition-colors",
|
|
173
|
+
direction === opt.value
|
|
174
|
+
? "bg-primary text-primary-foreground"
|
|
175
|
+
: "text-muted-foreground hover:bg-accent"
|
|
176
|
+
)}
|
|
177
|
+
>
|
|
178
|
+
{opt.label}
|
|
179
|
+
</button>
|
|
180
|
+
))}
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
{/* Depth slider */}
|
|
185
|
+
<div className="w-32">
|
|
186
|
+
<label className="mb-1 block text-xs font-medium text-muted-foreground">
|
|
187
|
+
Depth: {maxDepth}
|
|
188
|
+
</label>
|
|
189
|
+
<Slider
|
|
190
|
+
value={[maxDepth]}
|
|
191
|
+
onValueChange={([v]) => setMaxDepth(v)}
|
|
192
|
+
min={1}
|
|
193
|
+
max={10}
|
|
194
|
+
step={1}
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<Button
|
|
199
|
+
onClick={handleTrace}
|
|
200
|
+
disabled={!query.trim() || isLoading}
|
|
201
|
+
size="sm"
|
|
202
|
+
>
|
|
203
|
+
{isLoading ? (
|
|
204
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
205
|
+
) : (
|
|
206
|
+
<Route className="h-4 w-4" />
|
|
207
|
+
)}
|
|
208
|
+
<span className="ml-2">Trace</span>
|
|
209
|
+
</Button>
|
|
210
|
+
</div>
|
|
211
|
+
</CardContent>
|
|
212
|
+
</Card>
|
|
213
|
+
|
|
214
|
+
{/* Loading */}
|
|
215
|
+
{isLoading && (
|
|
216
|
+
<div className="flex h-32 items-center justify-center">
|
|
217
|
+
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
|
218
|
+
</div>
|
|
219
|
+
)}
|
|
220
|
+
|
|
221
|
+
{/* Results */}
|
|
222
|
+
{trace && !isLoading && (
|
|
223
|
+
<>
|
|
224
|
+
{/* Layers crossed */}
|
|
225
|
+
{trace.layers_crossed.length > 0 && (
|
|
226
|
+
<div className="flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
|
|
227
|
+
<span className="font-medium">Layers:</span>
|
|
228
|
+
{trace.layers_crossed.map((layer) => (
|
|
229
|
+
<Badge key={layer} variant="secondary" className="text-xs">
|
|
230
|
+
{layer}
|
|
231
|
+
</Badge>
|
|
232
|
+
))}
|
|
233
|
+
</div>
|
|
234
|
+
)}
|
|
235
|
+
|
|
236
|
+
{/* Paths */}
|
|
237
|
+
<div className="space-y-3">
|
|
238
|
+
{trace.paths.map((tracePath, i) => (
|
|
239
|
+
<Card key={i} className="bg-card">
|
|
240
|
+
<CardContent className="p-4">
|
|
241
|
+
<div className="mb-2 flex items-center gap-2">
|
|
242
|
+
<span className="text-xs font-medium text-muted-foreground">
|
|
243
|
+
Path {i + 1}
|
|
244
|
+
</span>
|
|
245
|
+
{tracePath.classification && (
|
|
246
|
+
<span
|
|
247
|
+
className={cn(
|
|
248
|
+
"text-xs",
|
|
249
|
+
classificationColors[tracePath.classification] ||
|
|
250
|
+
"text-gray-400"
|
|
251
|
+
)}
|
|
252
|
+
>
|
|
253
|
+
{tracePath.classification}
|
|
254
|
+
</span>
|
|
255
|
+
)}
|
|
256
|
+
</div>
|
|
257
|
+
<div className="flex flex-wrap items-center gap-1">
|
|
258
|
+
{tracePath.steps.map((step, j) => (
|
|
259
|
+
<div key={j} className="flex items-center gap-1">
|
|
260
|
+
{j > 0 && (
|
|
261
|
+
<ArrowRight className="h-3 w-3 text-muted-foreground" />
|
|
262
|
+
)}
|
|
263
|
+
<div className="flex items-center gap-1 rounded bg-secondary px-2 py-1">
|
|
264
|
+
<span className="font-mono text-xs text-foreground">
|
|
265
|
+
{step.component.n}
|
|
266
|
+
</span>
|
|
267
|
+
<span className="text-[10px] text-muted-foreground">
|
|
268
|
+
[{step.component.l}]
|
|
269
|
+
</span>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
))}
|
|
273
|
+
</div>
|
|
274
|
+
{tracePath.steps.some((s) => s.file) && (
|
|
275
|
+
<div className="mt-2 text-[10px] text-muted-foreground">
|
|
276
|
+
{tracePath.steps
|
|
277
|
+
.filter((s) => s.file)
|
|
278
|
+
.map((s, k) => (
|
|
279
|
+
<span key={k} className="mr-3">
|
|
280
|
+
{s.file}
|
|
281
|
+
{s.line ? `:${s.line}` : ""}
|
|
282
|
+
</span>
|
|
283
|
+
))}
|
|
284
|
+
</div>
|
|
285
|
+
)}
|
|
286
|
+
</CardContent>
|
|
287
|
+
</Card>
|
|
288
|
+
))}
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
{/* Empty result */}
|
|
292
|
+
{trace.paths.length === 0 && (
|
|
293
|
+
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
294
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-secondary">
|
|
295
|
+
<Route className="h-6 w-6 text-muted-foreground" />
|
|
296
|
+
</div>
|
|
297
|
+
<p className="mt-4 text-sm font-medium text-foreground">
|
|
298
|
+
No paths found
|
|
299
|
+
</p>
|
|
300
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
301
|
+
Try adjusting the direction or increasing the depth.
|
|
302
|
+
</p>
|
|
303
|
+
</div>
|
|
304
|
+
)}
|
|
305
|
+
</>
|
|
306
|
+
)}
|
|
307
|
+
|
|
308
|
+
{/* Initial empty state */}
|
|
309
|
+
{!trace && !isLoading && !error && (
|
|
310
|
+
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
311
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-secondary">
|
|
312
|
+
<Route className="h-6 w-6 text-muted-foreground" />
|
|
313
|
+
</div>
|
|
314
|
+
<p className="mt-4 text-sm font-medium text-foreground">
|
|
315
|
+
Select a component and trace its dataflow
|
|
316
|
+
</p>
|
|
317
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
318
|
+
Search for a component above, then click Trace to follow its
|
|
319
|
+
connections.
|
|
320
|
+
</p>
|
|
321
|
+
</div>
|
|
322
|
+
)}
|
|
323
|
+
</div>
|
|
324
|
+
)
|
|
325
|
+
}
|
|
@@ -6,3 +6,6 @@ export { useSettings } from "./use-settings";
|
|
|
6
6
|
export type { AllSettings, ScanConfig, DetectionConfig, NotificationConfig, DisplayConfig } from "./use-settings";
|
|
7
7
|
export { useProjects } from "./use-projects";
|
|
8
8
|
export type { RegisteredProject } from "./use-projects";
|
|
9
|
+
export { useCoverage } from "./use-coverage";
|
|
10
|
+
export { useTrace } from "./use-trace";
|
|
11
|
+
export { useSubgraph } from "./use-subgraph";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for fetching architecture coverage data
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import type { CoverageReport, CoverageApiResponse } from "../types";
|
|
7
|
+
import { useActiveProject } from "../project-context";
|
|
8
|
+
|
|
9
|
+
interface UseCoverageResult {
|
|
10
|
+
coverage: CoverageReport | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
refresh: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface UseCoverageOptions {
|
|
17
|
+
autoFetch?: boolean;
|
|
18
|
+
projectPath?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function useCoverage(options: UseCoverageOptions = {}): UseCoverageResult {
|
|
22
|
+
const { autoFetch = true, projectPath: explicitPath } = options;
|
|
23
|
+
const { activeProjectPath } = useActiveProject();
|
|
24
|
+
const projectPath = explicitPath || activeProjectPath || undefined;
|
|
25
|
+
|
|
26
|
+
const [coverage, setCoverage] = useState<CoverageReport | null>(null);
|
|
27
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
28
|
+
const [error, setError] = useState<string | null>(null);
|
|
29
|
+
|
|
30
|
+
const fetchData = useCallback(
|
|
31
|
+
async (forceRefresh = false) => {
|
|
32
|
+
setIsLoading(true);
|
|
33
|
+
setError(null);
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const params = new URLSearchParams();
|
|
37
|
+
if (forceRefresh) params.set("refresh", "true");
|
|
38
|
+
if (projectPath) params.set("path", projectPath);
|
|
39
|
+
|
|
40
|
+
const response = await fetch(`/api/coverage?${params.toString()}`);
|
|
41
|
+
const result: CoverageApiResponse = await response.json();
|
|
42
|
+
|
|
43
|
+
if (result.success && result.data) {
|
|
44
|
+
setCoverage(result.data);
|
|
45
|
+
} else {
|
|
46
|
+
setError(result.error || "Failed to fetch coverage data");
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
50
|
+
} finally {
|
|
51
|
+
setIsLoading(false);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
[projectPath]
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const refresh = useCallback(async () => {
|
|
58
|
+
await fetchData(true);
|
|
59
|
+
}, [fetchData]);
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (autoFetch) {
|
|
63
|
+
fetchData();
|
|
64
|
+
}
|
|
65
|
+
}, [autoFetch, fetchData]);
|
|
66
|
+
|
|
67
|
+
return { coverage, isLoading, error, refresh };
|
|
68
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for extracting focused subgraphs from architecture
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import type { SubgraphResult, SubgraphApiResponse } from "../types";
|
|
7
|
+
import { useActiveProject } from "../project-context";
|
|
8
|
+
|
|
9
|
+
interface UseSubgraphResult {
|
|
10
|
+
subgraph: SubgraphResult | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
refresh: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface UseSubgraphOptions {
|
|
17
|
+
focus?: string[];
|
|
18
|
+
depth?: number;
|
|
19
|
+
layers?: string[];
|
|
20
|
+
classification?: string;
|
|
21
|
+
maxNodes?: number;
|
|
22
|
+
autoFetch?: boolean;
|
|
23
|
+
projectPath?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useSubgraph(options: UseSubgraphOptions = {}): UseSubgraphResult {
|
|
27
|
+
const {
|
|
28
|
+
focus = [],
|
|
29
|
+
depth = 2,
|
|
30
|
+
layers = [],
|
|
31
|
+
classification,
|
|
32
|
+
maxNodes = 50,
|
|
33
|
+
autoFetch = false,
|
|
34
|
+
projectPath: explicitPath,
|
|
35
|
+
} = options;
|
|
36
|
+
const { activeProjectPath } = useActiveProject();
|
|
37
|
+
const projectPath = explicitPath || activeProjectPath || undefined;
|
|
38
|
+
|
|
39
|
+
const [subgraph, setSubgraph] = useState<SubgraphResult | null>(null);
|
|
40
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
41
|
+
const [error, setError] = useState<string | null>(null);
|
|
42
|
+
|
|
43
|
+
const fetchData = useCallback(
|
|
44
|
+
async () => {
|
|
45
|
+
setIsLoading(true);
|
|
46
|
+
setError(null);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const params = new URLSearchParams();
|
|
50
|
+
if (focus.length > 0) params.set("focus", focus.join(","));
|
|
51
|
+
params.set("depth", String(depth));
|
|
52
|
+
if (layers.length > 0) params.set("layers", layers.join(","));
|
|
53
|
+
if (classification) params.set("classification", classification);
|
|
54
|
+
params.set("maxNodes", String(maxNodes));
|
|
55
|
+
if (projectPath) params.set("path", projectPath);
|
|
56
|
+
|
|
57
|
+
const response = await fetch(`/api/subgraph?${params.toString()}`);
|
|
58
|
+
const result: SubgraphApiResponse = await response.json();
|
|
59
|
+
|
|
60
|
+
if (result.success && result.data) {
|
|
61
|
+
setSubgraph(result.data);
|
|
62
|
+
} else {
|
|
63
|
+
setError(result.error || "Failed to extract subgraph");
|
|
64
|
+
}
|
|
65
|
+
} catch (err) {
|
|
66
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
67
|
+
} finally {
|
|
68
|
+
setIsLoading(false);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
[focus.join(","), depth, layers.join(","), classification, maxNodes, projectPath]
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const refresh = useCallback(async () => {
|
|
75
|
+
await fetchData();
|
|
76
|
+
}, [fetchData]);
|
|
77
|
+
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (autoFetch) {
|
|
80
|
+
fetchData();
|
|
81
|
+
}
|
|
82
|
+
}, [autoFetch, fetchData]);
|
|
83
|
+
|
|
84
|
+
return { subgraph, isLoading, error, refresh };
|
|
85
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for tracing dataflow through architecture
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import type { TraceResult, TraceApiResponse } from "../types";
|
|
7
|
+
import { useActiveProject } from "../project-context";
|
|
8
|
+
|
|
9
|
+
interface UseTraceResult {
|
|
10
|
+
trace: TraceResult | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
refresh: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface UseTraceOptions {
|
|
17
|
+
component?: string;
|
|
18
|
+
direction?: "forward" | "backward" | "both";
|
|
19
|
+
maxDepth?: number;
|
|
20
|
+
filter?: string;
|
|
21
|
+
autoFetch?: boolean;
|
|
22
|
+
projectPath?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function useTrace(options: UseTraceOptions = {}): UseTraceResult {
|
|
26
|
+
const {
|
|
27
|
+
component,
|
|
28
|
+
direction = "both",
|
|
29
|
+
maxDepth = 5,
|
|
30
|
+
filter,
|
|
31
|
+
autoFetch = false,
|
|
32
|
+
projectPath: explicitPath,
|
|
33
|
+
} = options;
|
|
34
|
+
const { activeProjectPath } = useActiveProject();
|
|
35
|
+
const projectPath = explicitPath || activeProjectPath || undefined;
|
|
36
|
+
|
|
37
|
+
const [trace, setTrace] = useState<TraceResult | null>(null);
|
|
38
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
39
|
+
const [error, setError] = useState<string | null>(null);
|
|
40
|
+
|
|
41
|
+
const fetchData = useCallback(
|
|
42
|
+
async () => {
|
|
43
|
+
if (!component) return;
|
|
44
|
+
|
|
45
|
+
setIsLoading(true);
|
|
46
|
+
setError(null);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const params = new URLSearchParams();
|
|
50
|
+
params.set("component", component);
|
|
51
|
+
params.set("direction", direction);
|
|
52
|
+
params.set("maxDepth", String(maxDepth));
|
|
53
|
+
if (filter) params.set("filter", filter);
|
|
54
|
+
if (projectPath) params.set("path", projectPath);
|
|
55
|
+
|
|
56
|
+
const response = await fetch(`/api/trace?${params.toString()}`);
|
|
57
|
+
const result: TraceApiResponse = await response.json();
|
|
58
|
+
|
|
59
|
+
if (result.success && result.data) {
|
|
60
|
+
setTrace(result.data);
|
|
61
|
+
} else {
|
|
62
|
+
setError(result.error || "Failed to trace dataflow");
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
66
|
+
} finally {
|
|
67
|
+
setIsLoading(false);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[component, direction, maxDepth, filter, projectPath]
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const refresh = useCallback(async () => {
|
|
74
|
+
await fetchData();
|
|
75
|
+
}, [fetchData]);
|
|
76
|
+
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (autoFetch && component) {
|
|
79
|
+
fetchData();
|
|
80
|
+
}
|
|
81
|
+
}, [autoFetch, component, fetchData]);
|
|
82
|
+
|
|
83
|
+
return { trace, isLoading, error, refresh };
|
|
84
|
+
}
|
|
@@ -92,6 +92,34 @@ export interface Connection {
|
|
|
92
92
|
line: number;
|
|
93
93
|
code: string;
|
|
94
94
|
confidence?: number;
|
|
95
|
+
classification?: "production" | "admin" | "analytics" | "test" | "dev-only" | "migration" | "unknown";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// =============================================================================
|
|
99
|
+
// RULES
|
|
100
|
+
// =============================================================================
|
|
101
|
+
|
|
102
|
+
export interface RuleViolation {
|
|
103
|
+
rule_id: string;
|
|
104
|
+
severity: "error" | "warning" | "info";
|
|
105
|
+
component?: string;
|
|
106
|
+
message: string;
|
|
107
|
+
suggestion?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface RulesApiResponse {
|
|
111
|
+
success: boolean;
|
|
112
|
+
data?: {
|
|
113
|
+
violations: RuleViolation[];
|
|
114
|
+
summary: {
|
|
115
|
+
total: number;
|
|
116
|
+
errors: number;
|
|
117
|
+
warnings: number;
|
|
118
|
+
info: number;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
error?: string;
|
|
122
|
+
source: "scan" | "cache";
|
|
95
123
|
}
|
|
96
124
|
|
|
97
125
|
// =============================================================================
|
|
@@ -196,3 +224,83 @@ export interface ScanRequest {
|
|
|
196
224
|
projectPath?: string;
|
|
197
225
|
forceRescan?: boolean;
|
|
198
226
|
}
|
|
227
|
+
|
|
228
|
+
// =============================================================================
|
|
229
|
+
// COVERAGE
|
|
230
|
+
// =============================================================================
|
|
231
|
+
|
|
232
|
+
export interface CoverageGap {
|
|
233
|
+
type: "unmapped-file" | "low-confidence-connection" | "zero-consumers" | "no-outgoing";
|
|
234
|
+
target: string;
|
|
235
|
+
message: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface CoverageReport {
|
|
239
|
+
overall_confidence: number;
|
|
240
|
+
component_coverage: {
|
|
241
|
+
total_files_in_project: number;
|
|
242
|
+
files_mapped_to_components: number;
|
|
243
|
+
coverage_percent: number;
|
|
244
|
+
};
|
|
245
|
+
connection_coverage: {
|
|
246
|
+
total_connections: number;
|
|
247
|
+
by_confidence: { high: number; medium: number; low: number };
|
|
248
|
+
by_classification: Record<string, number>;
|
|
249
|
+
};
|
|
250
|
+
gaps: CoverageGap[];
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface CoverageApiResponse {
|
|
254
|
+
success: boolean;
|
|
255
|
+
data?: CoverageReport;
|
|
256
|
+
error?: string;
|
|
257
|
+
source: "scan" | "cache";
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// =============================================================================
|
|
261
|
+
// TRACE
|
|
262
|
+
// =============================================================================
|
|
263
|
+
|
|
264
|
+
export interface TraceStep {
|
|
265
|
+
component: { id: string; n: string; t: string; l: string };
|
|
266
|
+
connection?: { id: string; f: string; t: string; tp: string };
|
|
267
|
+
file?: string;
|
|
268
|
+
line?: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface TracePath {
|
|
272
|
+
steps: TraceStep[];
|
|
273
|
+
classification?: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface TraceResult {
|
|
277
|
+
query: string;
|
|
278
|
+
paths: TracePath[];
|
|
279
|
+
components_touched: string[];
|
|
280
|
+
layers_crossed: string[];
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface TraceApiResponse {
|
|
284
|
+
success: boolean;
|
|
285
|
+
data?: TraceResult;
|
|
286
|
+
error?: string;
|
|
287
|
+
source: "scan" | "cache";
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// =============================================================================
|
|
291
|
+
// SUBGRAPH
|
|
292
|
+
// =============================================================================
|
|
293
|
+
|
|
294
|
+
export interface SubgraphResult {
|
|
295
|
+
components: Array<{ id: string; n: string; t: string; l: string }>;
|
|
296
|
+
connections: Array<{ id: string; f: string; t: string; tp: string }>;
|
|
297
|
+
stats: { nodes: number; edges: number };
|
|
298
|
+
mermaid?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface SubgraphApiResponse {
|
|
302
|
+
success: boolean;
|
|
303
|
+
data?: SubgraphResult;
|
|
304
|
+
error?: string;
|
|
305
|
+
source: "scan" | "cache";
|
|
306
|
+
}
|