@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,309 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import {
|
|
5
|
+
AlertCircle,
|
|
6
|
+
AlertTriangle,
|
|
7
|
+
ChevronDown,
|
|
8
|
+
ChevronRight,
|
|
9
|
+
FileQuestion,
|
|
10
|
+
Loader2,
|
|
11
|
+
RefreshCw,
|
|
12
|
+
ShieldCheck,
|
|
13
|
+
} from "lucide-react"
|
|
14
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
15
|
+
import { Button } from "@/components/ui/button"
|
|
16
|
+
import { Progress } from "@/components/ui/progress"
|
|
17
|
+
import { useCoverage } from "@/lib/hooks"
|
|
18
|
+
import type { CoverageGap } from "@/lib/types"
|
|
19
|
+
|
|
20
|
+
const gapTypeConfig: Record<
|
|
21
|
+
string,
|
|
22
|
+
{ label: string; icon: typeof AlertTriangle; color: string }
|
|
23
|
+
> = {
|
|
24
|
+
"unmapped-file": {
|
|
25
|
+
label: "Unmapped Files",
|
|
26
|
+
icon: FileQuestion,
|
|
27
|
+
color: "text-amber-600",
|
|
28
|
+
},
|
|
29
|
+
"low-confidence-connection": {
|
|
30
|
+
label: "Low Confidence Connections",
|
|
31
|
+
icon: AlertTriangle,
|
|
32
|
+
color: "text-amber-600",
|
|
33
|
+
},
|
|
34
|
+
"zero-consumers": {
|
|
35
|
+
label: "Zero Consumers",
|
|
36
|
+
icon: AlertCircle,
|
|
37
|
+
color: "text-red-600",
|
|
38
|
+
},
|
|
39
|
+
"no-outgoing": {
|
|
40
|
+
label: "No Outgoing Connections",
|
|
41
|
+
icon: AlertCircle,
|
|
42
|
+
color: "text-blue-600",
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const INITIAL_SHOW = 20
|
|
47
|
+
|
|
48
|
+
export function CoveragePanel() {
|
|
49
|
+
const { coverage, isLoading, error, refresh } = useCoverage({ autoFetch: true })
|
|
50
|
+
const [expandedGroups, setExpandedGroups] = useState<Set<string>>(new Set())
|
|
51
|
+
const [showAll, setShowAll] = useState<Set<string>>(new Set())
|
|
52
|
+
|
|
53
|
+
const toggleGroup = (type: string) => {
|
|
54
|
+
setExpandedGroups((prev) => {
|
|
55
|
+
const next = new Set(prev)
|
|
56
|
+
if (next.has(type)) next.delete(type)
|
|
57
|
+
else next.add(type)
|
|
58
|
+
return next
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const toggleShowAll = (type: string) => {
|
|
63
|
+
setShowAll((prev) => {
|
|
64
|
+
const next = new Set(prev)
|
|
65
|
+
if (next.has(type)) next.delete(type)
|
|
66
|
+
else next.add(type)
|
|
67
|
+
return next
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (isLoading) {
|
|
72
|
+
return (
|
|
73
|
+
<div className="flex h-64 items-center justify-center">
|
|
74
|
+
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
|
75
|
+
</div>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Group gaps by type
|
|
80
|
+
const gapsByType = (coverage?.gaps || []).reduce<Record<string, CoverageGap[]>>(
|
|
81
|
+
(acc, gap) => {
|
|
82
|
+
if (!acc[gap.type]) acc[gap.type] = []
|
|
83
|
+
acc[gap.type].push(gap)
|
|
84
|
+
return acc
|
|
85
|
+
},
|
|
86
|
+
{}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<div className="space-y-6">
|
|
91
|
+
<div className="flex items-center justify-between">
|
|
92
|
+
<div>
|
|
93
|
+
<h1 className="text-2xl font-semibold text-foreground">
|
|
94
|
+
Architecture Coverage
|
|
95
|
+
</h1>
|
|
96
|
+
<p className="text-sm text-muted-foreground">
|
|
97
|
+
{coverage
|
|
98
|
+
? `${coverage.component_coverage.coverage_percent}% file coverage, ${coverage.connection_coverage.total_connections} connections tracked`
|
|
99
|
+
: "Analyzing architecture coverage"}
|
|
100
|
+
</p>
|
|
101
|
+
</div>
|
|
102
|
+
<Button
|
|
103
|
+
variant="outline"
|
|
104
|
+
size="sm"
|
|
105
|
+
onClick={() => refresh()}
|
|
106
|
+
disabled={isLoading}
|
|
107
|
+
>
|
|
108
|
+
{isLoading ? (
|
|
109
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
110
|
+
) : (
|
|
111
|
+
<RefreshCw className="h-4 w-4" />
|
|
112
|
+
)}
|
|
113
|
+
<span className="ml-2">Refresh</span>
|
|
114
|
+
</Button>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
{error && (
|
|
118
|
+
<div className="flex items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3">
|
|
119
|
+
<AlertCircle className="h-4 w-4 text-destructive" />
|
|
120
|
+
<p className="text-sm text-destructive">{error}</p>
|
|
121
|
+
</div>
|
|
122
|
+
)}
|
|
123
|
+
|
|
124
|
+
{!coverage && !error && (
|
|
125
|
+
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
126
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-secondary">
|
|
127
|
+
<ShieldCheck className="h-6 w-6 text-muted-foreground" />
|
|
128
|
+
</div>
|
|
129
|
+
<p className="mt-4 text-sm font-medium text-foreground">
|
|
130
|
+
No coverage data
|
|
131
|
+
</p>
|
|
132
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
133
|
+
Run <code className="rounded bg-secondary px-1">navgator scan</code>{" "}
|
|
134
|
+
to analyze your project.
|
|
135
|
+
</p>
|
|
136
|
+
</div>
|
|
137
|
+
)}
|
|
138
|
+
|
|
139
|
+
{coverage && (
|
|
140
|
+
<>
|
|
141
|
+
{/* Summary cards */}
|
|
142
|
+
<div className="grid gap-4 sm:grid-cols-3">
|
|
143
|
+
<Card className="bg-card">
|
|
144
|
+
<CardHeader className="pb-2">
|
|
145
|
+
<CardTitle className="text-sm font-medium text-muted-foreground">
|
|
146
|
+
File Coverage
|
|
147
|
+
</CardTitle>
|
|
148
|
+
</CardHeader>
|
|
149
|
+
<CardContent>
|
|
150
|
+
<div className="text-2xl font-semibold text-foreground">
|
|
151
|
+
{coverage.component_coverage.coverage_percent}%
|
|
152
|
+
</div>
|
|
153
|
+
<Progress
|
|
154
|
+
value={coverage.component_coverage.coverage_percent}
|
|
155
|
+
className="mt-2 h-2"
|
|
156
|
+
/>
|
|
157
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
158
|
+
{coverage.component_coverage.files_mapped_to_components} /{" "}
|
|
159
|
+
{coverage.component_coverage.total_files_in_project} files
|
|
160
|
+
</p>
|
|
161
|
+
</CardContent>
|
|
162
|
+
</Card>
|
|
163
|
+
|
|
164
|
+
<Card className="bg-card">
|
|
165
|
+
<CardHeader className="pb-2">
|
|
166
|
+
<CardTitle className="text-sm font-medium text-muted-foreground">
|
|
167
|
+
Connection Confidence
|
|
168
|
+
</CardTitle>
|
|
169
|
+
</CardHeader>
|
|
170
|
+
<CardContent>
|
|
171
|
+
<div className="text-2xl font-semibold text-foreground">
|
|
172
|
+
{Math.round(coverage.overall_confidence * 100)}%
|
|
173
|
+
</div>
|
|
174
|
+
<div className="mt-2 flex gap-4 text-xs">
|
|
175
|
+
<span className="text-green-600">
|
|
176
|
+
{coverage.connection_coverage.by_confidence.high} high
|
|
177
|
+
</span>
|
|
178
|
+
<span className="text-amber-600">
|
|
179
|
+
{coverage.connection_coverage.by_confidence.medium} med
|
|
180
|
+
</span>
|
|
181
|
+
<span className="text-red-600">
|
|
182
|
+
{coverage.connection_coverage.by_confidence.low} low
|
|
183
|
+
</span>
|
|
184
|
+
</div>
|
|
185
|
+
</CardContent>
|
|
186
|
+
</Card>
|
|
187
|
+
|
|
188
|
+
<Card className="bg-card">
|
|
189
|
+
<CardHeader className="pb-2">
|
|
190
|
+
<CardTitle className="text-sm font-medium text-muted-foreground">
|
|
191
|
+
Classification
|
|
192
|
+
</CardTitle>
|
|
193
|
+
</CardHeader>
|
|
194
|
+
<CardContent>
|
|
195
|
+
<div className="text-2xl font-semibold text-foreground">
|
|
196
|
+
{Object.keys(coverage.connection_coverage.by_classification).length}
|
|
197
|
+
</div>
|
|
198
|
+
<div className="mt-2 space-y-1">
|
|
199
|
+
{Object.entries(coverage.connection_coverage.by_classification)
|
|
200
|
+
.sort((a, b) => b[1] - a[1])
|
|
201
|
+
.slice(0, 4)
|
|
202
|
+
.map(([cls, count]) => (
|
|
203
|
+
<div
|
|
204
|
+
key={cls}
|
|
205
|
+
className="flex items-center justify-between text-xs"
|
|
206
|
+
>
|
|
207
|
+
<span className="text-muted-foreground">{cls}</span>
|
|
208
|
+
<span className="font-medium text-foreground">
|
|
209
|
+
{count}
|
|
210
|
+
</span>
|
|
211
|
+
</div>
|
|
212
|
+
))}
|
|
213
|
+
</div>
|
|
214
|
+
</CardContent>
|
|
215
|
+
</Card>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
{/* Gaps */}
|
|
219
|
+
{Object.keys(gapsByType).length > 0 && (
|
|
220
|
+
<div className="space-y-3">
|
|
221
|
+
<h2 className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
|
|
222
|
+
Gaps ({coverage.gaps.length})
|
|
223
|
+
</h2>
|
|
224
|
+
{Object.entries(gapsByType).map(([type, gaps]) => {
|
|
225
|
+
const config = gapTypeConfig[type] || {
|
|
226
|
+
label: type,
|
|
227
|
+
icon: AlertTriangle,
|
|
228
|
+
color: "text-muted-foreground",
|
|
229
|
+
}
|
|
230
|
+
const Icon = config.icon
|
|
231
|
+
const isExpanded = expandedGroups.has(type)
|
|
232
|
+
const isShowingAll = showAll.has(type)
|
|
233
|
+
const displayed = isShowingAll
|
|
234
|
+
? gaps
|
|
235
|
+
: gaps.slice(0, INITIAL_SHOW)
|
|
236
|
+
|
|
237
|
+
return (
|
|
238
|
+
<Card key={type} className="bg-card">
|
|
239
|
+
<button
|
|
240
|
+
className="flex w-full items-center gap-2 p-4 text-left"
|
|
241
|
+
onClick={() => toggleGroup(type)}
|
|
242
|
+
>
|
|
243
|
+
{isExpanded ? (
|
|
244
|
+
<ChevronDown className="h-4 w-4 text-muted-foreground" />
|
|
245
|
+
) : (
|
|
246
|
+
<ChevronRight className="h-4 w-4 text-muted-foreground" />
|
|
247
|
+
)}
|
|
248
|
+
<Icon className={`h-4 w-4 ${config.color}`} />
|
|
249
|
+
<span className="text-sm font-medium text-foreground">
|
|
250
|
+
{config.label}
|
|
251
|
+
</span>
|
|
252
|
+
<span className="text-xs text-muted-foreground">
|
|
253
|
+
({gaps.length})
|
|
254
|
+
</span>
|
|
255
|
+
</button>
|
|
256
|
+
{isExpanded && (
|
|
257
|
+
<CardContent className="pt-0">
|
|
258
|
+
<div className="divide-y divide-border">
|
|
259
|
+
{displayed.map((gap, idx) => (
|
|
260
|
+
<div
|
|
261
|
+
key={`${gap.target}-${idx}`}
|
|
262
|
+
className="py-2 first:pt-0 last:pb-0"
|
|
263
|
+
>
|
|
264
|
+
<p className="text-sm text-foreground font-mono">
|
|
265
|
+
{gap.target}
|
|
266
|
+
</p>
|
|
267
|
+
<p className="text-xs text-muted-foreground">
|
|
268
|
+
{gap.message}
|
|
269
|
+
</p>
|
|
270
|
+
</div>
|
|
271
|
+
))}
|
|
272
|
+
</div>
|
|
273
|
+
{gaps.length > INITIAL_SHOW && (
|
|
274
|
+
<button
|
|
275
|
+
onClick={() => toggleShowAll(type)}
|
|
276
|
+
className="mt-2 text-xs text-primary hover:underline"
|
|
277
|
+
>
|
|
278
|
+
{isShowingAll
|
|
279
|
+
? "Show less"
|
|
280
|
+
: `Show ${gaps.length - INITIAL_SHOW} more`}
|
|
281
|
+
</button>
|
|
282
|
+
)}
|
|
283
|
+
</CardContent>
|
|
284
|
+
)}
|
|
285
|
+
</Card>
|
|
286
|
+
)
|
|
287
|
+
})}
|
|
288
|
+
</div>
|
|
289
|
+
)}
|
|
290
|
+
|
|
291
|
+
{/* No gaps */}
|
|
292
|
+
{coverage.gaps.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
|
+
<ShieldCheck className="h-6 w-6 text-green-600" />
|
|
296
|
+
</div>
|
|
297
|
+
<p className="mt-4 text-sm font-medium text-foreground">
|
|
298
|
+
No coverage gaps
|
|
299
|
+
</p>
|
|
300
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
301
|
+
All components are well-connected.
|
|
302
|
+
</p>
|
|
303
|
+
</div>
|
|
304
|
+
)}
|
|
305
|
+
</>
|
|
306
|
+
)}
|
|
307
|
+
</div>
|
|
308
|
+
)
|
|
309
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState, useEffect } from "react"
|
|
4
|
+
import {
|
|
5
|
+
AlertTriangle,
|
|
6
|
+
AlertCircle,
|
|
7
|
+
Info,
|
|
8
|
+
Loader2,
|
|
9
|
+
RefreshCw,
|
|
10
|
+
Shield,
|
|
11
|
+
} from "lucide-react"
|
|
12
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
13
|
+
import { Button } from "@/components/ui/button"
|
|
14
|
+
import type { RuleViolation, RulesApiResponse } from "@/lib/types"
|
|
15
|
+
|
|
16
|
+
const severityConfig = {
|
|
17
|
+
error: { icon: AlertCircle, color: "text-red-600", label: "ERROR" },
|
|
18
|
+
warning: { icon: AlertTriangle, color: "text-amber-600", label: "WARN" },
|
|
19
|
+
info: { icon: Info, color: "text-blue-600", label: "INFO" },
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const severityOrder: Array<"error" | "warning" | "info"> = ["error", "warning", "info"]
|
|
23
|
+
|
|
24
|
+
export function RulesPanel() {
|
|
25
|
+
const [violations, setViolations] = useState<RuleViolation[]>([])
|
|
26
|
+
const [summary, setSummary] = useState<{ total: number; errors: number; warnings: number; info: number }>({ total: 0, errors: 0, warnings: 0, info: 0 })
|
|
27
|
+
const [isLoading, setIsLoading] = useState(true)
|
|
28
|
+
const [error, setError] = useState<string | null>(null)
|
|
29
|
+
|
|
30
|
+
const fetchRules = async () => {
|
|
31
|
+
setIsLoading(true)
|
|
32
|
+
setError(null)
|
|
33
|
+
try {
|
|
34
|
+
const res = await fetch("/api/rules")
|
|
35
|
+
const json: RulesApiResponse = await res.json()
|
|
36
|
+
if (json.success && json.data) {
|
|
37
|
+
setViolations(json.data.violations)
|
|
38
|
+
setSummary(json.data.summary)
|
|
39
|
+
} else {
|
|
40
|
+
setError(json.error || "Failed to load rules")
|
|
41
|
+
}
|
|
42
|
+
} catch (err) {
|
|
43
|
+
setError(err instanceof Error ? err.message : "Failed to fetch rules")
|
|
44
|
+
} finally {
|
|
45
|
+
setIsLoading(false)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
fetchRules()
|
|
51
|
+
}, [])
|
|
52
|
+
|
|
53
|
+
// Group violations by severity
|
|
54
|
+
const grouped = severityOrder.reduce<Record<string, RuleViolation[]>>((acc, sev) => {
|
|
55
|
+
const items = violations.filter((v) => v.severity === sev)
|
|
56
|
+
if (items.length > 0) acc[sev] = items
|
|
57
|
+
return acc
|
|
58
|
+
}, {})
|
|
59
|
+
|
|
60
|
+
if (isLoading) {
|
|
61
|
+
return (
|
|
62
|
+
<div className="flex h-64 items-center justify-center">
|
|
63
|
+
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
|
64
|
+
</div>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div className="space-y-6">
|
|
70
|
+
<div className="flex items-center justify-between">
|
|
71
|
+
<div>
|
|
72
|
+
<h1 className="text-2xl font-semibold text-foreground">Architecture Rules</h1>
|
|
73
|
+
<p className="text-sm text-muted-foreground">
|
|
74
|
+
{summary.total === 0
|
|
75
|
+
? "No rule violations found"
|
|
76
|
+
: `${summary.total} violation${summary.total !== 1 ? "s" : ""} found`}
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
|
+
<Button variant="outline" size="sm" onClick={fetchRules} disabled={isLoading}>
|
|
80
|
+
{isLoading ? (
|
|
81
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
82
|
+
) : (
|
|
83
|
+
<RefreshCw className="h-4 w-4" />
|
|
84
|
+
)}
|
|
85
|
+
<span className="ml-2">Refresh</span>
|
|
86
|
+
</Button>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
{error && (
|
|
90
|
+
<div className="flex items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3">
|
|
91
|
+
<AlertCircle className="h-4 w-4 text-destructive" />
|
|
92
|
+
<p className="text-sm text-destructive">{error}</p>
|
|
93
|
+
</div>
|
|
94
|
+
)}
|
|
95
|
+
|
|
96
|
+
{/* Summary stats */}
|
|
97
|
+
{summary.total > 0 && (
|
|
98
|
+
<div className="flex gap-6 text-sm">
|
|
99
|
+
{summary.errors > 0 && (
|
|
100
|
+
<span className="text-red-600 font-medium">{summary.errors} error{summary.errors !== 1 ? "s" : ""}</span>
|
|
101
|
+
)}
|
|
102
|
+
{summary.warnings > 0 && (
|
|
103
|
+
<span className="text-amber-600 font-medium">{summary.warnings} warning{summary.warnings !== 1 ? "s" : ""}</span>
|
|
104
|
+
)}
|
|
105
|
+
{summary.info > 0 && (
|
|
106
|
+
<span className="text-blue-600 font-medium">{summary.info} info</span>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
|
|
111
|
+
{/* Violations grouped by severity */}
|
|
112
|
+
{Object.entries(grouped).map(([severity, items]) => {
|
|
113
|
+
const config = severityConfig[severity as keyof typeof severityConfig]
|
|
114
|
+
const SevIcon = config.icon
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<Card key={severity} className="bg-card">
|
|
118
|
+
<CardHeader className="pb-3">
|
|
119
|
+
<CardTitle className="flex items-center gap-2 text-base font-medium">
|
|
120
|
+
<SevIcon className={`h-4 w-4 ${config.color}`} />
|
|
121
|
+
<span className={config.color}>{config.label}</span>
|
|
122
|
+
<span className="text-muted-foreground font-normal">({items.length})</span>
|
|
123
|
+
</CardTitle>
|
|
124
|
+
</CardHeader>
|
|
125
|
+
<CardContent>
|
|
126
|
+
<div className="divide-y divide-border">
|
|
127
|
+
{items.map((v, idx) => (
|
|
128
|
+
<div key={`${v.rule_id}-${idx}`} className="py-3 first:pt-0 last:pb-0">
|
|
129
|
+
<p className="text-sm font-medium text-foreground">{v.rule_id.replace(/-/g, " ")}</p>
|
|
130
|
+
<p className="mt-0.5 text-sm text-muted-foreground">{v.message}</p>
|
|
131
|
+
{v.suggestion && (
|
|
132
|
+
<p className="mt-0.5 text-xs text-muted-foreground/70">{v.suggestion}</p>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
))}
|
|
136
|
+
</div>
|
|
137
|
+
</CardContent>
|
|
138
|
+
</Card>
|
|
139
|
+
)
|
|
140
|
+
})}
|
|
141
|
+
|
|
142
|
+
{/* Empty state */}
|
|
143
|
+
{summary.total === 0 && !error && (
|
|
144
|
+
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
145
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-secondary">
|
|
146
|
+
<Shield className="h-6 w-6 text-green-600" />
|
|
147
|
+
</div>
|
|
148
|
+
<p className="mt-4 text-sm font-medium text-foreground">All clear</p>
|
|
149
|
+
<p className="mt-1 text-xs text-muted-foreground">
|
|
150
|
+
No architecture rule violations detected.
|
|
151
|
+
</p>
|
|
152
|
+
</div>
|
|
153
|
+
)}
|
|
154
|
+
</div>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
Share2,
|
|
9
9
|
Settings,
|
|
10
10
|
Brain,
|
|
11
|
+
Shield,
|
|
12
|
+
BarChart3,
|
|
13
|
+
Route,
|
|
14
|
+
Network,
|
|
11
15
|
} from "lucide-react"
|
|
12
16
|
import { cn } from "@/lib/utils"
|
|
13
17
|
import type { View } from "@/app/page"
|
|
@@ -24,6 +28,10 @@ const navItems = [
|
|
|
24
28
|
{ id: "impact" as const, label: "Impact", icon: Target },
|
|
25
29
|
{ id: "diagram" as const, label: "Diagram", icon: Share2 },
|
|
26
30
|
{ id: "llm" as const, label: "LLM Tracking", icon: Brain },
|
|
31
|
+
{ id: "rules" as const, label: "Rules", icon: Shield },
|
|
32
|
+
{ id: "coverage" as const, label: "Coverage", icon: BarChart3 },
|
|
33
|
+
{ id: "trace" as const, label: "Trace", icon: Route },
|
|
34
|
+
{ id: "subgraph" as const, label: "Subgraph", icon: Network },
|
|
27
35
|
]
|
|
28
36
|
|
|
29
37
|
export function Sidebar({ activeView, setActiveView }: SidebarProps) {
|
|
@@ -15,11 +15,14 @@ import {
|
|
|
15
15
|
Brain,
|
|
16
16
|
Loader2,
|
|
17
17
|
Info,
|
|
18
|
+
Shield,
|
|
18
19
|
} from "lucide-react"
|
|
20
|
+
import { useState, useEffect } from "react"
|
|
19
21
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
20
22
|
import { Badge } from "@/components/ui/badge"
|
|
21
23
|
import { useStatus, useComponents, usePrompts } from "@/lib/hooks"
|
|
22
24
|
import type { View } from "@/app/page"
|
|
25
|
+
import type { RulesApiResponse } from "@/lib/types"
|
|
23
26
|
|
|
24
27
|
interface StatusOverviewProps {
|
|
25
28
|
onSelectComponent: (name: string) => void
|
|
@@ -62,6 +65,19 @@ export function StatusOverview({ onSelectComponent, onNavigate, onNavigateToType
|
|
|
62
65
|
const { components, summary: componentsSummary, isLoading: componentsLoading } = useComponents({ autoFetch: true })
|
|
63
66
|
const { calls, prompts, isLoading: promptsLoading } = usePrompts({ autoFetch: true })
|
|
64
67
|
|
|
68
|
+
// Fetch rules data
|
|
69
|
+
const [rulesSummary, setRulesSummary] = useState<{ total: number; errors: number; warnings: number; info: number } | null>(null)
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
fetch("/api/rules")
|
|
72
|
+
.then((r) => r.json())
|
|
73
|
+
.then((json: RulesApiResponse) => {
|
|
74
|
+
if (json.success && json.data) {
|
|
75
|
+
setRulesSummary(json.data.summary)
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
.catch(() => {})
|
|
79
|
+
}, [])
|
|
80
|
+
|
|
65
81
|
const isLoading = statusLoading || componentsLoading || promptsLoading
|
|
66
82
|
|
|
67
83
|
// Count LLM issues for the stat card badge
|
|
@@ -99,6 +115,13 @@ export function StatusOverview({ onSelectComponent, onNavigate, onNavigateToType
|
|
|
99
115
|
trend: llmIssueCount > 0 ? `${llmIssueCount} issues` : undefined,
|
|
100
116
|
view: "llm" as View,
|
|
101
117
|
},
|
|
118
|
+
{
|
|
119
|
+
label: "Rules",
|
|
120
|
+
value: rulesSummary ? rulesSummary.total.toString() : "—",
|
|
121
|
+
icon: Shield,
|
|
122
|
+
trend: rulesSummary?.errors ? `${rulesSummary.errors} errors` : undefined,
|
|
123
|
+
view: "rules" as View,
|
|
124
|
+
},
|
|
102
125
|
{
|
|
103
126
|
label: "Health",
|
|
104
127
|
value: status?.stats.vulnerable_count === 0 ? "Good" : "Issues",
|
|
@@ -165,7 +188,7 @@ export function StatusOverview({ onSelectComponent, onNavigate, onNavigateToType
|
|
|
165
188
|
)}
|
|
166
189
|
|
|
167
190
|
{/* Stats Grid - Clickable Navigation */}
|
|
168
|
-
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-
|
|
191
|
+
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-5">
|
|
169
192
|
{stats.map((stat) => (
|
|
170
193
|
<button
|
|
171
194
|
key={stat.label}
|