@optave/codegraph 3.1.5 → 3.3.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/README.md +50 -56
- package/dist/ast-analysis/engine.d.ts +17 -0
- package/dist/ast-analysis/engine.d.ts.map +1 -0
- package/dist/ast-analysis/engine.js +328 -0
- package/dist/ast-analysis/engine.js.map +1 -0
- package/dist/ast-analysis/metrics.d.ts +51 -0
- package/dist/ast-analysis/metrics.d.ts.map +1 -0
- package/dist/ast-analysis/metrics.js +106 -0
- package/dist/ast-analysis/metrics.js.map +1 -0
- package/dist/ast-analysis/rules/csharp.d.ts +24 -0
- package/dist/ast-analysis/rules/csharp.d.ts.map +1 -0
- package/dist/ast-analysis/rules/csharp.js +192 -0
- package/dist/ast-analysis/rules/csharp.js.map +1 -0
- package/dist/ast-analysis/rules/go.d.ts +24 -0
- package/dist/ast-analysis/rules/go.d.ts.map +1 -0
- package/dist/ast-analysis/rules/go.js +173 -0
- package/dist/ast-analysis/rules/go.js.map +1 -0
- package/dist/ast-analysis/rules/index.d.ts +31 -0
- package/dist/ast-analysis/rules/index.d.ts.map +1 -0
- package/dist/ast-analysis/rules/index.js +72 -0
- package/dist/ast-analysis/rules/index.js.map +1 -0
- package/dist/ast-analysis/rules/java.d.ts +24 -0
- package/dist/ast-analysis/rules/java.d.ts.map +1 -0
- package/dist/ast-analysis/rules/java.js +166 -0
- package/dist/ast-analysis/rules/java.js.map +1 -0
- package/dist/ast-analysis/rules/javascript.d.ts +31 -0
- package/dist/ast-analysis/rules/javascript.d.ts.map +1 -0
- package/dist/ast-analysis/rules/javascript.js +235 -0
- package/dist/ast-analysis/rules/javascript.js.map +1 -0
- package/dist/ast-analysis/rules/php.d.ts +24 -0
- package/dist/ast-analysis/rules/php.d.ts.map +1 -0
- package/dist/ast-analysis/rules/php.js +210 -0
- package/dist/ast-analysis/rules/php.js.map +1 -0
- package/dist/ast-analysis/rules/python.d.ts +24 -0
- package/dist/ast-analysis/rules/python.d.ts.map +1 -0
- package/dist/ast-analysis/rules/python.js +188 -0
- package/dist/ast-analysis/rules/python.js.map +1 -0
- package/dist/ast-analysis/rules/ruby.d.ts +24 -0
- package/dist/ast-analysis/rules/ruby.d.ts.map +1 -0
- package/dist/ast-analysis/rules/ruby.js +193 -0
- package/dist/ast-analysis/rules/ruby.js.map +1 -0
- package/dist/ast-analysis/rules/rust.d.ts +24 -0
- package/dist/ast-analysis/rules/rust.d.ts.map +1 -0
- package/dist/ast-analysis/rules/rust.js +165 -0
- package/dist/ast-analysis/rules/rust.js.map +1 -0
- package/dist/ast-analysis/shared.d.ts +106 -0
- package/dist/ast-analysis/shared.d.ts.map +1 -0
- package/dist/ast-analysis/shared.js +186 -0
- package/dist/ast-analysis/shared.js.map +1 -0
- package/dist/ast-analysis/visitor-utils.d.ts +41 -0
- package/dist/ast-analysis/visitor-utils.d.ts.map +1 -0
- package/dist/ast-analysis/visitor-utils.js +180 -0
- package/dist/ast-analysis/visitor-utils.js.map +1 -0
- package/dist/ast-analysis/visitor.d.ts +119 -0
- package/dist/ast-analysis/visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitor.js +146 -0
- package/dist/ast-analysis/visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts +11 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js +147 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts +8 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js +660 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts +17 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js +216 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts +8 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js +321 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js.map +1 -0
- package/dist/cli/commands/ast.d.ts +9 -0
- package/dist/cli/commands/ast.d.ts.map +1 -0
- package/dist/cli/commands/ast.js +23 -0
- package/dist/cli/commands/ast.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +9 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +46 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +9 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +70 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/branch-compare.d.ts +7 -0
- package/dist/cli/commands/branch-compare.d.ts.map +1 -0
- package/dist/cli/commands/branch-compare.js +22 -0
- package/dist/cli/commands/branch-compare.js.map +1 -0
- package/dist/cli/commands/brief.d.ts +7 -0
- package/dist/cli/commands/brief.d.ts.map +1 -0
- package/dist/cli/commands/brief.js +12 -0
- package/dist/cli/commands/brief.js.map +1 -0
- package/dist/cli/commands/build.d.ts +7 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +26 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/cfg.d.ts +10 -0
- package/dist/cli/commands/cfg.d.ts.map +1 -0
- package/dist/cli/commands/cfg.js +27 -0
- package/dist/cli/commands/cfg.js.map +1 -0
- package/dist/cli/commands/check.d.ts +8 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +65 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/children.d.ts +9 -0
- package/dist/cli/commands/children.d.ts.map +1 -0
- package/dist/cli/commands/children.js +33 -0
- package/dist/cli/commands/children.js.map +1 -0
- package/dist/cli/commands/co-change.d.ts +7 -0
- package/dist/cli/commands/co-change.d.ts.map +1 -0
- package/dist/cli/commands/co-change.js +62 -0
- package/dist/cli/commands/co-change.js.map +1 -0
- package/dist/cli/commands/communities.d.ts +8 -0
- package/dist/cli/commands/communities.d.ts.map +1 -0
- package/dist/cli/commands/communities.js +20 -0
- package/dist/cli/commands/communities.js.map +1 -0
- package/dist/cli/commands/complexity.d.ts +9 -0
- package/dist/cli/commands/complexity.d.ts.map +1 -0
- package/dist/cli/commands/complexity.js +47 -0
- package/dist/cli/commands/complexity.js.map +1 -0
- package/dist/cli/commands/context.d.ts +10 -0
- package/dist/cli/commands/context.d.ts.map +1 -0
- package/dist/cli/commands/context.js +35 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/cycles.d.ts +7 -0
- package/dist/cli/commands/cycles.d.ts.map +1 -0
- package/dist/cli/commands/cycles.js +33 -0
- package/dist/cli/commands/cycles.js.map +1 -0
- package/dist/cli/commands/dataflow.d.ts +10 -0
- package/dist/cli/commands/dataflow.d.ts.map +1 -0
- package/dist/cli/commands/dataflow.js +29 -0
- package/dist/cli/commands/dataflow.js.map +1 -0
- package/dist/cli/commands/deps.d.ts +8 -0
- package/dist/cli/commands/deps.d.ts.map +1 -0
- package/dist/cli/commands/deps.js +18 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/diff-impact.d.ts +7 -0
- package/dist/cli/commands/diff-impact.d.ts.map +1 -0
- package/dist/cli/commands/diff-impact.js +28 -0
- package/dist/cli/commands/diff-impact.js.map +1 -0
- package/dist/cli/commands/embed.d.ts +8 -0
- package/dist/cli/commands/embed.d.ts.map +1 -0
- package/dist/cli/commands/embed.js +29 -0
- package/dist/cli/commands/embed.js.map +1 -0
- package/dist/cli/commands/export.d.ts +7 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +72 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/exports.d.ts +8 -0
- package/dist/cli/commands/exports.d.ts.map +1 -0
- package/dist/cli/commands/exports.js +14 -0
- package/dist/cli/commands/exports.js.map +1 -0
- package/dist/cli/commands/flow.d.ts +10 -0
- package/dist/cli/commands/flow.d.ts.map +1 -0
- package/dist/cli/commands/flow.js +32 -0
- package/dist/cli/commands/flow.js.map +1 -0
- package/dist/cli/commands/fn-impact.d.ts +10 -0
- package/dist/cli/commands/fn-impact.d.ts.map +1 -0
- package/dist/cli/commands/fn-impact.js +33 -0
- package/dist/cli/commands/fn-impact.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +7 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +12 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/implementations.d.ts +10 -0
- package/dist/cli/commands/implementations.d.ts.map +1 -0
- package/dist/cli/commands/implementations.js +29 -0
- package/dist/cli/commands/implementations.js.map +1 -0
- package/dist/cli/commands/info.d.ts +6 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +66 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/interfaces.d.ts +10 -0
- package/dist/cli/commands/interfaces.d.ts.map +1 -0
- package/dist/cli/commands/interfaces.js +29 -0
- package/dist/cli/commands/interfaces.js.map +1 -0
- package/dist/cli/commands/map.d.ts +7 -0
- package/dist/cli/commands/map.d.ts.map +1 -0
- package/dist/cli/commands/map.js +19 -0
- package/dist/cli/commands/map.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +7 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +19 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/models.d.ts +6 -0
- package/dist/cli/commands/models.d.ts.map +1 -0
- package/dist/cli/commands/models.js +17 -0
- package/dist/cli/commands/models.js.map +1 -0
- package/dist/cli/commands/owners.d.ts +8 -0
- package/dist/cli/commands/owners.d.ts.map +1 -0
- package/dist/cli/commands/owners.js +27 -0
- package/dist/cli/commands/owners.js.map +1 -0
- package/dist/cli/commands/path.d.ts +8 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +36 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/plot.d.ts +7 -0
- package/dist/cli/commands/plot.d.ts.map +1 -0
- package/dist/cli/commands/plot.js +94 -0
- package/dist/cli/commands/plot.js.map +1 -0
- package/dist/cli/commands/query.d.ts +10 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +51 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/registry.d.ts +16 -0
- package/dist/cli/commands/registry.d.ts.map +1 -0
- package/dist/cli/commands/registry.js +95 -0
- package/dist/cli/commands/registry.js.map +1 -0
- package/dist/cli/commands/roles.d.ts +9 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +31 -0
- package/dist/cli/commands/roles.js.map +1 -0
- package/dist/cli/commands/search.d.ts +9 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +47 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/sequence.d.ts +10 -0
- package/dist/cli/commands/sequence.d.ts.map +1 -0
- package/dist/cli/commands/sequence.js +29 -0
- package/dist/cli/commands/sequence.js.map +1 -0
- package/dist/cli/commands/snapshot.d.ts +11 -0
- package/dist/cli/commands/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/snapshot.js +61 -0
- package/dist/cli/commands/snapshot.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +7 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +15 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/structure.d.ts +7 -0
- package/dist/cli/commands/structure.d.ts.map +1 -0
- package/dist/cli/commands/structure.js +33 -0
- package/dist/cli/commands/structure.js.map +1 -0
- package/dist/cli/commands/triage.d.ts +8 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +89 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +6 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +12 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/commands/where.d.ts +9 -0
- package/dist/cli/commands/where.d.ts.map +1 -0
- package/dist/cli/commands/where.js +20 -0
- package/dist/cli/commands/where.js.map +1 -0
- package/dist/cli/index.d.ts +31 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +109 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/shared/open-graph.d.ts +14 -0
- package/dist/cli/shared/open-graph.d.ts.map +1 -0
- package/dist/cli/shared/open-graph.js +13 -0
- package/dist/cli/shared/open-graph.js.map +1 -0
- package/dist/cli/shared/options.d.ts +31 -0
- package/dist/cli/shared/options.d.ts.map +1 -0
- package/dist/cli/shared/options.js +58 -0
- package/dist/cli/shared/options.js.map +1 -0
- package/dist/cli/shared/output.d.ts +2 -0
- package/dist/cli/shared/output.d.ts.map +1 -0
- package/dist/cli/shared/output.js +2 -0
- package/dist/cli/shared/output.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +15 -0
- package/dist/cli.js.map +1 -0
- package/dist/db/connection.d.ts +39 -0
- package/dist/db/connection.d.ts.map +1 -0
- package/dist/db/connection.js +217 -0
- package/dist/db/connection.js.map +1 -0
- package/dist/db/index.d.ts +5 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +6 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +8 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +323 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/query-builder.d.ts +106 -0
- package/dist/db/query-builder.d.ts.map +1 -0
- package/dist/db/query-builder.js +313 -0
- package/dist/db/query-builder.js.map +1 -0
- package/dist/db/repository/base.d.ts +115 -0
- package/dist/db/repository/base.d.ts.map +1 -0
- package/dist/db/repository/base.js +165 -0
- package/dist/db/repository/base.js.map +1 -0
- package/dist/db/repository/build-stmts.d.ts +25 -0
- package/dist/db/repository/build-stmts.d.ts.map +1 -0
- package/dist/db/repository/build-stmts.js +86 -0
- package/dist/db/repository/build-stmts.js.map +1 -0
- package/dist/db/repository/cached-stmt.d.ts +13 -0
- package/dist/db/repository/cached-stmt.d.ts.map +1 -0
- package/dist/db/repository/cached-stmt.js +20 -0
- package/dist/db/repository/cached-stmt.js.map +1 -0
- package/dist/db/repository/cfg.d.ts +27 -0
- package/dist/db/repository/cfg.d.ts.map +1 -0
- package/dist/db/repository/cfg.js +57 -0
- package/dist/db/repository/cfg.js.map +1 -0
- package/dist/db/repository/cochange.d.ts +20 -0
- package/dist/db/repository/cochange.d.ts.map +1 -0
- package/dist/db/repository/cochange.js +45 -0
- package/dist/db/repository/cochange.js.map +1 -0
- package/dist/db/repository/complexity.d.ts +15 -0
- package/dist/db/repository/complexity.d.ts.map +1 -0
- package/dist/db/repository/complexity.js +15 -0
- package/dist/db/repository/complexity.js.map +1 -0
- package/dist/db/repository/dataflow.d.ts +7 -0
- package/dist/db/repository/dataflow.d.ts.map +1 -0
- package/dist/db/repository/dataflow.js +17 -0
- package/dist/db/repository/dataflow.js.map +1 -0
- package/dist/db/repository/edges.d.ts +173 -0
- package/dist/db/repository/edges.d.ts.map +1 -0
- package/dist/db/repository/edges.js +231 -0
- package/dist/db/repository/edges.js.map +1 -0
- package/dist/db/repository/embeddings.d.ts +20 -0
- package/dist/db/repository/embeddings.d.ts.map +1 -0
- package/dist/db/repository/embeddings.js +47 -0
- package/dist/db/repository/embeddings.js.map +1 -0
- package/dist/db/repository/graph-read.d.ts +41 -0
- package/dist/db/repository/graph-read.d.ts.map +1 -0
- package/dist/db/repository/graph-read.js +41 -0
- package/dist/db/repository/graph-read.js.map +1 -0
- package/dist/db/repository/in-memory-repository.d.ts +156 -0
- package/dist/db/repository/in-memory-repository.d.ts.map +1 -0
- package/dist/db/repository/in-memory-repository.js +533 -0
- package/dist/db/repository/in-memory-repository.js.map +1 -0
- package/dist/db/repository/index.d.ts +14 -0
- package/dist/db/repository/index.d.ts.map +1 -0
- package/dist/db/repository/index.js +15 -0
- package/dist/db/repository/index.js.map +1 -0
- package/dist/db/repository/nodes.d.ts +151 -0
- package/dist/db/repository/nodes.d.ts.map +1 -0
- package/dist/db/repository/nodes.js +244 -0
- package/dist/db/repository/nodes.js.map +1 -0
- package/dist/db/repository/sqlite-repository.d.ts +100 -0
- package/dist/db/repository/sqlite-repository.d.ts.map +1 -0
- package/dist/db/repository/sqlite-repository.js +143 -0
- package/dist/db/repository/sqlite-repository.js.map +1 -0
- package/dist/domain/analysis/brief.d.ts +16 -0
- package/dist/domain/analysis/brief.d.ts.map +1 -0
- package/dist/domain/analysis/brief.js +147 -0
- package/dist/domain/analysis/brief.js.map +1 -0
- package/dist/domain/analysis/context.d.ts +3 -0
- package/dist/domain/analysis/context.d.ts.map +1 -0
- package/dist/domain/analysis/context.js +378 -0
- package/dist/domain/analysis/context.js.map +1 -0
- package/dist/domain/analysis/dependencies.d.ts +60 -0
- package/dist/domain/analysis/dependencies.d.ts.map +1 -0
- package/dist/domain/analysis/dependencies.js +359 -0
- package/dist/domain/analysis/dependencies.js.map +1 -0
- package/dist/domain/analysis/exports.d.ts +2 -0
- package/dist/domain/analysis/exports.d.ts.map +1 -0
- package/dist/domain/analysis/exports.js +168 -0
- package/dist/domain/analysis/exports.js.map +1 -0
- package/dist/domain/analysis/impact.d.ts +39 -0
- package/dist/domain/analysis/impact.d.ts.map +1 -0
- package/dist/domain/analysis/impact.js +596 -0
- package/dist/domain/analysis/impact.js.map +1 -0
- package/dist/domain/analysis/implementations.d.ts +59 -0
- package/dist/domain/analysis/implementations.d.ts.map +1 -0
- package/dist/domain/analysis/implementations.js +93 -0
- package/dist/domain/analysis/implementations.js.map +1 -0
- package/dist/domain/analysis/module-map.d.ts +64 -0
- package/dist/domain/analysis/module-map.d.ts.map +1 -0
- package/dist/domain/analysis/module-map.js +334 -0
- package/dist/domain/analysis/module-map.js.map +1 -0
- package/dist/domain/analysis/roles.d.ts +2 -0
- package/dist/domain/analysis/roles.d.ts.map +1 -0
- package/dist/domain/analysis/roles.js +50 -0
- package/dist/domain/analysis/roles.js.map +1 -0
- package/dist/domain/analysis/symbol-lookup.d.ts +12 -0
- package/dist/domain/analysis/symbol-lookup.d.ts.map +1 -0
- package/dist/domain/analysis/symbol-lookup.js +202 -0
- package/dist/domain/analysis/symbol-lookup.js.map +1 -0
- package/dist/domain/graph/builder/context.d.ts +91 -0
- package/dist/domain/graph/builder/context.d.ts.map +1 -0
- package/dist/domain/graph/builder/context.js +78 -0
- package/dist/domain/graph/builder/context.js.map +1 -0
- package/dist/domain/graph/builder/helpers.d.ts +43 -0
- package/dist/domain/graph/builder/helpers.d.ts.map +1 -0
- package/dist/domain/graph/builder/helpers.js +209 -0
- package/dist/domain/graph/builder/helpers.js.map +1 -0
- package/dist/domain/graph/builder/incremental.d.ts +17 -0
- package/dist/domain/graph/builder/incremental.d.ts.map +1 -0
- package/dist/domain/graph/builder/incremental.js +191 -0
- package/dist/domain/graph/builder/incremental.js.map +1 -0
- package/dist/domain/graph/builder/pipeline.d.ts +13 -0
- package/dist/domain/graph/builder/pipeline.d.ts.map +1 -0
- package/dist/domain/graph/builder/pipeline.js +146 -0
- package/dist/domain/graph/builder/pipeline.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts +5 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.js +387 -0
- package/dist/domain/graph/builder/stages/build-edges.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts +5 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.js +107 -0
- package/dist/domain/graph/builder/stages/build-structure.js.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts +5 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.js +45 -0
- package/dist/domain/graph/builder/stages/collect-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts +5 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.js +358 -0
- package/dist/domain/graph/builder/stages/detect-changes.js.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts +5 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.js +123 -0
- package/dist/domain/graph/builder/stages/finalize.js.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts +5 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js +183 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts +5 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.js +25 -0
- package/dist/domain/graph/builder/stages/parse-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts +18 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js +139 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts +5 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.js +39 -0
- package/dist/domain/graph/builder/stages/run-analyses.js.map +1 -0
- package/dist/domain/graph/builder.d.ts +4 -0
- package/dist/domain/graph/builder.d.ts.map +1 -0
- package/dist/domain/graph/builder.js +6 -0
- package/dist/domain/graph/builder.js.map +1 -0
- package/dist/domain/graph/change-journal.d.ts +57 -0
- package/dist/domain/graph/change-journal.d.ts.map +1 -0
- package/dist/domain/graph/change-journal.js +120 -0
- package/dist/domain/graph/change-journal.js.map +1 -0
- package/dist/domain/graph/cycles.d.ts +18 -0
- package/dist/domain/graph/cycles.d.ts.map +1 -0
- package/dist/domain/graph/cycles.js +75 -0
- package/dist/domain/graph/cycles.js.map +1 -0
- package/dist/domain/graph/journal.d.ts +27 -0
- package/dist/domain/graph/journal.d.ts.map +1 -0
- package/dist/domain/graph/journal.js +100 -0
- package/dist/domain/graph/journal.js.map +1 -0
- package/dist/domain/graph/resolve.d.ts +76 -0
- package/dist/domain/graph/resolve.d.ts.map +1 -0
- package/dist/domain/graph/resolve.js +482 -0
- package/dist/domain/graph/resolve.js.map +1 -0
- package/dist/domain/graph/watcher.d.ts +2 -0
- package/dist/domain/graph/watcher.d.ts.map +1 -0
- package/dist/domain/graph/watcher.js +140 -0
- package/dist/domain/graph/watcher.js.map +1 -0
- package/dist/domain/parser.d.ts +104 -0
- package/dist/domain/parser.d.ts.map +1 -0
- package/dist/domain/parser.js +557 -0
- package/dist/domain/parser.js.map +1 -0
- package/dist/domain/queries.d.ts +14 -0
- package/dist/domain/queries.d.ts.map +1 -0
- package/dist/domain/queries.js +25 -0
- package/dist/domain/queries.js.map +1 -0
- package/dist/domain/search/generator.d.ts +17 -0
- package/dist/domain/search/generator.d.ts.map +1 -0
- package/dist/domain/search/generator.js +135 -0
- package/dist/domain/search/generator.js.map +1 -0
- package/dist/domain/search/index.d.ts +8 -0
- package/dist/domain/search/index.d.ts.map +1 -0
- package/dist/domain/search/index.js +13 -0
- package/dist/domain/search/index.js.map +1 -0
- package/dist/domain/search/models.d.ts +82 -0
- package/dist/domain/search/models.d.ts.map +1 -0
- package/dist/domain/search/models.js +198 -0
- package/dist/domain/search/models.js.map +1 -0
- package/dist/domain/search/search/cli-formatter.d.ts +6 -0
- package/dist/domain/search/search/cli-formatter.d.ts.map +1 -0
- package/dist/domain/search/search/cli-formatter.js +135 -0
- package/dist/domain/search/search/cli-formatter.js.map +1 -0
- package/dist/domain/search/search/filters.d.ts +19 -0
- package/dist/domain/search/search/filters.d.ts.map +1 -0
- package/dist/domain/search/search/filters.js +48 -0
- package/dist/domain/search/search/filters.js.map +1 -0
- package/dist/domain/search/search/hybrid.d.ts +22 -0
- package/dist/domain/search/search/hybrid.d.ts.map +1 -0
- package/dist/domain/search/search/hybrid.js +113 -0
- package/dist/domain/search/search/hybrid.js.map +1 -0
- package/dist/domain/search/search/keyword.d.ts +17 -0
- package/dist/domain/search/search/keyword.d.ts.map +1 -0
- package/dist/domain/search/search/keyword.js +66 -0
- package/dist/domain/search/search/keyword.js.map +1 -0
- package/dist/domain/search/search/prepare.d.ts +13 -0
- package/dist/domain/search/search/prepare.d.ts.map +1 -0
- package/dist/domain/search/search/prepare.js +70 -0
- package/dist/domain/search/search/prepare.js.map +1 -0
- package/dist/domain/search/search/semantic.d.ts +34 -0
- package/dist/domain/search/search/semantic.d.ts.map +1 -0
- package/dist/domain/search/search/semantic.js +129 -0
- package/dist/domain/search/search/semantic.js.map +1 -0
- package/dist/domain/search/stores/fts5.d.ts +11 -0
- package/dist/domain/search/stores/fts5.d.ts.map +1 -0
- package/dist/domain/search/stores/fts5.js +31 -0
- package/dist/domain/search/stores/fts5.js.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts +27 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.js +22 -0
- package/dist/domain/search/stores/sqlite-blob.js.map +1 -0
- package/dist/domain/search/strategies/source.d.ts +5 -0
- package/dist/domain/search/strategies/source.d.ts.map +1 -0
- package/dist/domain/search/strategies/source.js +14 -0
- package/dist/domain/search/strategies/source.js.map +1 -0
- package/dist/domain/search/strategies/structured.d.ts +6 -0
- package/dist/domain/search/strategies/structured.d.ts.map +1 -0
- package/dist/domain/search/strategies/structured.js +40 -0
- package/dist/domain/search/strategies/structured.js.map +1 -0
- package/dist/domain/search/strategies/text-utils.d.ts +11 -0
- package/dist/domain/search/strategies/text-utils.d.ts.map +1 -0
- package/dist/domain/search/strategies/text-utils.js +47 -0
- package/dist/domain/search/strategies/text-utils.js.map +1 -0
- package/dist/extractors/csharp.d.ts +12 -0
- package/dist/extractors/csharp.d.ts.map +1 -0
- package/dist/extractors/csharp.js +402 -0
- package/dist/extractors/csharp.js.map +1 -0
- package/dist/extractors/go.d.ts +12 -0
- package/dist/extractors/go.d.ts.map +1 -0
- package/dist/extractors/go.js +381 -0
- package/dist/extractors/go.js.map +1 -0
- package/dist/extractors/hcl.d.ts +11 -0
- package/dist/extractors/hcl.d.ts.map +1 -0
- package/dist/extractors/hcl.js +105 -0
- package/dist/extractors/hcl.js.map +1 -0
- package/dist/extractors/helpers.d.ts +16 -0
- package/dist/extractors/helpers.d.ts.map +1 -0
- package/dist/extractors/helpers.js +88 -0
- package/dist/extractors/helpers.js.map +1 -0
- package/dist/extractors/index.d.ts +10 -0
- package/dist/extractors/index.d.ts.map +1 -0
- package/dist/extractors/index.js +10 -0
- package/dist/extractors/index.js.map +1 -0
- package/dist/extractors/java.d.ts +12 -0
- package/dist/extractors/java.d.ts.map +1 -0
- package/dist/extractors/java.js +325 -0
- package/dist/extractors/java.js.map +1 -0
- package/dist/extractors/javascript.d.ts +81 -0
- package/dist/extractors/javascript.d.ts.map +1 -0
- package/dist/extractors/javascript.js +1232 -0
- package/dist/extractors/javascript.js.map +1 -0
- package/dist/extractors/php.d.ts +12 -0
- package/dist/extractors/php.d.ts.map +1 -0
- package/dist/extractors/php.js +380 -0
- package/dist/extractors/php.js.map +1 -0
- package/dist/extractors/python.d.ts +12 -0
- package/dist/extractors/python.d.ts.map +1 -0
- package/dist/extractors/python.js +426 -0
- package/dist/extractors/python.js.map +1 -0
- package/dist/extractors/ruby.d.ts +11 -0
- package/dist/extractors/ruby.d.ts.map +1 -0
- package/dist/extractors/ruby.js +284 -0
- package/dist/extractors/ruby.js.map +1 -0
- package/dist/extractors/rust.d.ts +12 -0
- package/dist/extractors/rust.d.ts.map +1 -0
- package/dist/extractors/rust.js +366 -0
- package/dist/extractors/rust.js.map +1 -0
- package/dist/features/ast.d.ts +30 -0
- package/dist/features/ast.d.ts.map +1 -0
- package/dist/features/ast.js +242 -0
- package/dist/features/ast.js.map +1 -0
- package/dist/features/audit.d.ts +6 -0
- package/dist/features/audit.d.ts.map +1 -0
- package/dist/features/audit.js +283 -0
- package/dist/features/audit.js.map +1 -0
- package/dist/features/batch.d.ts +110 -0
- package/dist/features/batch.d.ts.map +1 -0
- package/dist/features/batch.js +138 -0
- package/dist/features/batch.js.map +1 -0
- package/dist/features/boundaries.d.ts +69 -0
- package/dist/features/boundaries.d.ts.map +1 -0
- package/dist/features/boundaries.js +344 -0
- package/dist/features/boundaries.js.map +1 -0
- package/dist/features/branch-compare.d.ts +52 -0
- package/dist/features/branch-compare.d.ts.map +1 -0
- package/dist/features/branch-compare.js +425 -0
- package/dist/features/branch-compare.js.map +1 -0
- package/dist/features/cfg.d.ts +51 -0
- package/dist/features/cfg.d.ts.map +1 -0
- package/dist/features/cfg.js +372 -0
- package/dist/features/cfg.js.map +1 -0
- package/dist/features/check.d.ts +99 -0
- package/dist/features/check.d.ts.map +1 -0
- package/dist/features/check.js +296 -0
- package/dist/features/check.js.map +1 -0
- package/dist/features/cochange.d.ts +119 -0
- package/dist/features/cochange.d.ts.map +1 -0
- package/dist/features/cochange.js +425 -0
- package/dist/features/cochange.js.map +1 -0
- package/dist/features/communities.d.ts +40 -0
- package/dist/features/communities.d.ts.map +1 -0
- package/dist/features/communities.js +163 -0
- package/dist/features/communities.js.map +1 -0
- package/dist/features/complexity.d.ts +127 -0
- package/dist/features/complexity.d.ts.map +1 -0
- package/dist/features/complexity.js +683 -0
- package/dist/features/complexity.js.map +1 -0
- package/dist/features/dataflow.d.ts +72 -0
- package/dist/features/dataflow.d.ts.map +1 -0
- package/dist/features/dataflow.js +483 -0
- package/dist/features/dataflow.js.map +1 -0
- package/dist/features/export.d.ts +29 -0
- package/dist/features/export.d.ts.map +1 -0
- package/dist/features/export.js +336 -0
- package/dist/features/export.js.map +1 -0
- package/dist/features/flow.d.ts +49 -0
- package/dist/features/flow.d.ts.map +1 -0
- package/dist/features/flow.js +203 -0
- package/dist/features/flow.js.map +1 -0
- package/dist/features/graph-enrichment.d.ts +54 -0
- package/dist/features/graph-enrichment.d.ts.map +1 -0
- package/dist/features/graph-enrichment.js +297 -0
- package/dist/features/graph-enrichment.js.map +1 -0
- package/dist/features/manifesto.d.ts +46 -0
- package/dist/features/manifesto.d.ts.map +1 -0
- package/dist/features/manifesto.js +398 -0
- package/dist/features/manifesto.js.map +1 -0
- package/dist/features/owners.d.ts +123 -0
- package/dist/features/owners.d.ts.map +1 -0
- package/dist/features/owners.js +289 -0
- package/dist/features/owners.js.map +1 -0
- package/dist/features/sequence.d.ts +33 -0
- package/dist/features/sequence.d.ts.map +1 -0
- package/dist/features/sequence.js +269 -0
- package/dist/features/sequence.js.map +1 -0
- package/dist/features/shared/find-nodes.d.ts +11 -0
- package/dist/features/shared/find-nodes.d.ts.map +1 -0
- package/dist/features/shared/find-nodes.js +27 -0
- package/dist/features/shared/find-nodes.js.map +1 -0
- package/dist/features/snapshot.d.ts +64 -0
- package/dist/features/snapshot.d.ts.map +1 -0
- package/dist/features/snapshot.js +132 -0
- package/dist/features/snapshot.js.map +1 -0
- package/dist/features/structure.d.ts +42 -0
- package/dist/features/structure.d.ts.map +1 -0
- package/dist/features/structure.js +596 -0
- package/dist/features/structure.js.map +1 -0
- package/dist/features/triage.d.ts +13 -0
- package/dist/features/triage.d.ts.map +1 -0
- package/dist/features/triage.js +133 -0
- package/dist/features/triage.js.map +1 -0
- package/dist/graph/algorithms/bfs.d.ts +13 -0
- package/dist/graph/algorithms/bfs.d.ts.map +1 -0
- package/dist/graph/algorithms/bfs.js +47 -0
- package/dist/graph/algorithms/bfs.js.map +1 -0
- package/dist/graph/algorithms/centrality.d.ts +11 -0
- package/dist/graph/algorithms/centrality.d.ts.map +1 -0
- package/dist/graph/algorithms/centrality.js +17 -0
- package/dist/graph/algorithms/centrality.js.map +1 -0
- package/dist/graph/algorithms/index.d.ts +6 -0
- package/dist/graph/algorithms/index.d.ts.map +1 -0
- package/dist/graph/algorithms/index.js +6 -0
- package/dist/graph/algorithms/index.js.map +1 -0
- package/dist/graph/algorithms/louvain.d.ts +5 -0
- package/dist/graph/algorithms/louvain.d.ts.map +1 -0
- package/dist/graph/algorithms/louvain.js +22 -0
- package/dist/graph/algorithms/louvain.js.map +1 -0
- package/dist/graph/algorithms/shortest-path.d.ts +10 -0
- package/dist/graph/algorithms/shortest-path.d.ts.map +1 -0
- package/dist/graph/algorithms/shortest-path.js +41 -0
- package/dist/graph/algorithms/shortest-path.js.map +1 -0
- package/dist/graph/algorithms/tarjan.d.ts +9 -0
- package/dist/graph/algorithms/tarjan.d.ts.map +1 -0
- package/dist/graph/algorithms/tarjan.js +48 -0
- package/dist/graph/algorithms/tarjan.js.map +1 -0
- package/dist/graph/builders/dependency.d.ts +15 -0
- package/dist/graph/builders/dependency.d.ts.map +1 -0
- package/dist/graph/builders/dependency.js +99 -0
- package/dist/graph/builders/dependency.js.map +1 -0
- package/dist/graph/builders/index.d.ts +4 -0
- package/dist/graph/builders/index.d.ts.map +1 -0
- package/dist/graph/builders/index.js +4 -0
- package/dist/graph/builders/index.js.map +1 -0
- package/dist/graph/builders/structure.d.ts +7 -0
- package/dist/graph/builders/structure.d.ts.map +1 -0
- package/dist/graph/builders/structure.js +32 -0
- package/dist/graph/builders/structure.js.map +1 -0
- package/dist/graph/builders/temporal.d.ts +10 -0
- package/dist/graph/builders/temporal.d.ts.map +1 -0
- package/dist/graph/builders/temporal.js +31 -0
- package/dist/graph/builders/temporal.js.map +1 -0
- package/dist/graph/classifiers/index.d.ts +3 -0
- package/dist/graph/classifiers/index.d.ts.map +1 -0
- package/dist/graph/classifiers/index.js +3 -0
- package/dist/graph/classifiers/index.js.map +1 -0
- package/dist/graph/classifiers/risk.d.ts +49 -0
- package/dist/graph/classifiers/risk.d.ts.map +1 -0
- package/dist/graph/classifiers/risk.js +84 -0
- package/dist/graph/classifiers/risk.js.map +1 -0
- package/dist/graph/classifiers/roles.d.ts +29 -0
- package/dist/graph/classifiers/roles.d.ts.map +1 -0
- package/dist/graph/classifiers/roles.js +109 -0
- package/dist/graph/classifiers/roles.js.map +1 -0
- package/dist/graph/index.d.ts +5 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +6 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/model.d.ts +53 -0
- package/dist/graph/model.d.ts.map +1 -0
- package/dist/graph/model.js +210 -0
- package/dist/graph/model.js.map +1 -0
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/config.d.ts +222 -0
- package/dist/infrastructure/config.d.ts.map +1 -0
- package/dist/infrastructure/config.js +386 -0
- package/dist/infrastructure/config.js.map +1 -0
- package/dist/infrastructure/logger.d.ts +7 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/logger.js +21 -0
- package/dist/infrastructure/logger.js.map +1 -0
- package/dist/infrastructure/native.d.ts +19 -0
- package/dist/infrastructure/native.d.ts.map +1 -0
- package/dist/infrastructure/native.js +105 -0
- package/dist/infrastructure/native.js.map +1 -0
- package/dist/infrastructure/registry.d.ts +57 -0
- package/dist/infrastructure/registry.d.ts.map +1 -0
- package/dist/infrastructure/registry.js +157 -0
- package/dist/infrastructure/registry.js.map +1 -0
- package/dist/infrastructure/result-formatter.d.ts +2 -0
- package/dist/infrastructure/result-formatter.d.ts.map +1 -0
- package/dist/infrastructure/result-formatter.js +3 -0
- package/dist/infrastructure/result-formatter.js.map +1 -0
- package/dist/infrastructure/test-filter.d.ts +5 -0
- package/dist/infrastructure/test-filter.d.ts.map +1 -0
- package/dist/infrastructure/test-filter.js +7 -0
- package/dist/infrastructure/test-filter.js.map +1 -0
- package/dist/infrastructure/update-check.d.ts +24 -0
- package/dist/infrastructure/update-check.d.ts.map +1 -0
- package/dist/infrastructure/update-check.js +150 -0
- package/dist/infrastructure/update-check.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/middleware.d.ts +26 -0
- package/dist/mcp/middleware.d.ts.map +1 -0
- package/dist/mcp/middleware.js +38 -0
- package/dist/mcp/middleware.js.map +1 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +120 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +8 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +819 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools/ast-query.d.ts +9 -0
- package/dist/mcp/tools/ast-query.d.ts.map +1 -0
- package/dist/mcp/tools/ast-query.js +13 -0
- package/dist/mcp/tools/ast-query.js.map +1 -0
- package/dist/mcp/tools/audit.d.ts +3 -0
- package/dist/mcp/tools/audit.d.ts.map +1 -0
- package/dist/mcp/tools/audit.js +20 -0
- package/dist/mcp/tools/audit.js.map +1 -0
- package/dist/mcp/tools/batch-query.d.ts +9 -0
- package/dist/mcp/tools/batch-query.d.ts.map +1 -0
- package/dist/mcp/tools/batch-query.js +11 -0
- package/dist/mcp/tools/batch-query.js.map +1 -0
- package/dist/mcp/tools/branch-compare.d.ts +3 -0
- package/dist/mcp/tools/branch-compare.d.ts.map +1 -0
- package/dist/mcp/tools/branch-compare.js +10 -0
- package/dist/mcp/tools/branch-compare.js.map +1 -0
- package/dist/mcp/tools/brief.d.ts +3 -0
- package/dist/mcp/tools/brief.d.ts.map +1 -0
- package/dist/mcp/tools/brief.js +8 -0
- package/dist/mcp/tools/brief.js.map +1 -0
- package/dist/mcp/tools/cfg.d.ts +10 -0
- package/dist/mcp/tools/cfg.d.ts.map +1 -0
- package/dist/mcp/tools/cfg.js +20 -0
- package/dist/mcp/tools/cfg.js.map +1 -0
- package/dist/mcp/tools/check.d.ts +24 -0
- package/dist/mcp/tools/check.d.ts.map +1 -0
- package/dist/mcp/tools/check.js +39 -0
- package/dist/mcp/tools/check.js.map +1 -0
- package/dist/mcp/tools/co-changes.d.ts +10 -0
- package/dist/mcp/tools/co-changes.d.ts.map +1 -0
- package/dist/mcp/tools/co-changes.js +19 -0
- package/dist/mcp/tools/co-changes.js.map +1 -0
- package/dist/mcp/tools/code-owners.d.ts +48 -0
- package/dist/mcp/tools/code-owners.d.ts.map +1 -0
- package/dist/mcp/tools/code-owners.js +12 -0
- package/dist/mcp/tools/code-owners.js.map +1 -0
- package/dist/mcp/tools/communities.d.ts +8 -0
- package/dist/mcp/tools/communities.d.ts.map +1 -0
- package/dist/mcp/tools/communities.js +14 -0
- package/dist/mcp/tools/communities.js.map +1 -0
- package/dist/mcp/tools/complexity.d.ts +7 -0
- package/dist/mcp/tools/complexity.d.ts.map +1 -0
- package/dist/mcp/tools/complexity.js +17 -0
- package/dist/mcp/tools/complexity.js.map +1 -0
- package/dist/mcp/tools/context.d.ts +3 -0
- package/dist/mcp/tools/context.d.ts.map +1 -0
- package/dist/mcp/tools/context.js +16 -0
- package/dist/mcp/tools/context.js.map +1 -0
- package/dist/mcp/tools/dataflow.d.ts +6 -0
- package/dist/mcp/tools/dataflow.d.ts.map +1 -0
- package/dist/mcp/tools/dataflow.js +25 -0
- package/dist/mcp/tools/dataflow.js.map +1 -0
- package/dist/mcp/tools/diff-impact.d.ts +3 -0
- package/dist/mcp/tools/diff-impact.d.ts.map +1 -0
- package/dist/mcp/tools/diff-impact.js +23 -0
- package/dist/mcp/tools/diff-impact.js.map +1 -0
- package/dist/mcp/tools/execution-flow.d.ts +17 -0
- package/dist/mcp/tools/execution-flow.d.ts.map +1 -0
- package/dist/mcp/tools/execution-flow.js +25 -0
- package/dist/mcp/tools/execution-flow.js.map +1 -0
- package/dist/mcp/tools/export-graph.d.ts +3 -0
- package/dist/mcp/tools/export-graph.d.ts.map +1 -0
- package/dist/mcp/tools/export-graph.js +55 -0
- package/dist/mcp/tools/export-graph.js.map +1 -0
- package/dist/mcp/tools/file-deps.d.ts +3 -0
- package/dist/mcp/tools/file-deps.d.ts.map +1 -0
- package/dist/mcp/tools/file-deps.js +11 -0
- package/dist/mcp/tools/file-deps.js.map +1 -0
- package/dist/mcp/tools/file-exports.d.ts +3 -0
- package/dist/mcp/tools/file-exports.d.ts.map +1 -0
- package/dist/mcp/tools/file-exports.js +12 -0
- package/dist/mcp/tools/file-exports.js.map +1 -0
- package/dist/mcp/tools/find-cycles.d.ts +6 -0
- package/dist/mcp/tools/find-cycles.d.ts.map +1 -0
- package/dist/mcp/tools/find-cycles.js +15 -0
- package/dist/mcp/tools/find-cycles.js.map +1 -0
- package/dist/mcp/tools/fn-impact.d.ts +3 -0
- package/dist/mcp/tools/fn-impact.d.ts.map +1 -0
- package/dist/mcp/tools/fn-impact.js +14 -0
- package/dist/mcp/tools/fn-impact.js.map +1 -0
- package/dist/mcp/tools/impact-analysis.d.ts +3 -0
- package/dist/mcp/tools/impact-analysis.d.ts.map +1 -0
- package/dist/mcp/tools/impact-analysis.js +11 -0
- package/dist/mcp/tools/impact-analysis.js.map +1 -0
- package/dist/mcp/tools/implementations.d.ts +3 -0
- package/dist/mcp/tools/implementations.d.ts.map +1 -0
- package/dist/mcp/tools/implementations.js +13 -0
- package/dist/mcp/tools/implementations.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +3 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +76 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/interfaces.d.ts +3 -0
- package/dist/mcp/tools/interfaces.d.ts.map +1 -0
- package/dist/mcp/tools/interfaces.js +13 -0
- package/dist/mcp/tools/interfaces.js.map +1 -0
- package/dist/mcp/tools/list-functions.d.ts +3 -0
- package/dist/mcp/tools/list-functions.d.ts.map +1 -0
- package/dist/mcp/tools/list-functions.js +13 -0
- package/dist/mcp/tools/list-functions.js.map +1 -0
- package/dist/mcp/tools/list-repos.d.ts +11 -0
- package/dist/mcp/tools/list-repos.d.ts.map +1 -0
- package/dist/mcp/tools/list-repos.js +11 -0
- package/dist/mcp/tools/list-repos.js.map +1 -0
- package/dist/mcp/tools/module-map.d.ts +3 -0
- package/dist/mcp/tools/module-map.d.ts.map +1 -0
- package/dist/mcp/tools/module-map.js +6 -0
- package/dist/mcp/tools/module-map.js.map +1 -0
- package/dist/mcp/tools/node-roles.d.ts +3 -0
- package/dist/mcp/tools/node-roles.d.ts.map +1 -0
- package/dist/mcp/tools/node-roles.js +13 -0
- package/dist/mcp/tools/node-roles.js.map +1 -0
- package/dist/mcp/tools/path.d.ts +3 -0
- package/dist/mcp/tools/path.d.ts.map +1 -0
- package/dist/mcp/tools/path.js +12 -0
- package/dist/mcp/tools/path.js.map +1 -0
- package/dist/mcp/tools/query.d.ts +3 -0
- package/dist/mcp/tools/query.d.ts.map +1 -0
- package/dist/mcp/tools/query.js +29 -0
- package/dist/mcp/tools/query.js.map +1 -0
- package/dist/mcp/tools/semantic-search.d.ts +3 -0
- package/dist/mcp/tools/semantic-search.d.ts.map +1 -0
- package/dist/mcp/tools/semantic-search.js +61 -0
- package/dist/mcp/tools/semantic-search.js.map +1 -0
- package/dist/mcp/tools/sequence.d.ts +18 -0
- package/dist/mcp/tools/sequence.d.ts.map +1 -0
- package/dist/mcp/tools/sequence.js +16 -0
- package/dist/mcp/tools/sequence.js.map +1 -0
- package/dist/mcp/tools/structure.d.ts +3 -0
- package/dist/mcp/tools/structure.d.ts.map +1 -0
- package/dist/mcp/tools/structure.js +14 -0
- package/dist/mcp/tools/structure.js.map +1 -0
- package/dist/mcp/tools/symbol-children.d.ts +3 -0
- package/dist/mcp/tools/symbol-children.d.ts.map +1 -0
- package/dist/mcp/tools/symbol-children.js +13 -0
- package/dist/mcp/tools/symbol-children.js.map +1 -0
- package/dist/mcp/tools/triage.d.ts +3 -0
- package/dist/mcp/tools/triage.d.ts.map +1 -0
- package/dist/mcp/tools/triage.js +34 -0
- package/dist/mcp/tools/triage.js.map +1 -0
- package/dist/mcp/tools/where.d.ts +3 -0
- package/dist/mcp/tools/where.d.ts.map +1 -0
- package/dist/mcp/tools/where.js +12 -0
- package/dist/mcp/tools/where.js.map +1 -0
- package/dist/presentation/audit.d.ts +5 -0
- package/dist/presentation/audit.d.ts.map +1 -0
- package/dist/presentation/audit.js +77 -0
- package/dist/presentation/audit.js.map +1 -0
- package/dist/presentation/batch.d.ts +10 -0
- package/dist/presentation/batch.d.ts.map +1 -0
- package/dist/presentation/batch.js +25 -0
- package/dist/presentation/batch.js.map +1 -0
- package/dist/presentation/branch-compare.d.ts +2 -0
- package/dist/presentation/branch-compare.d.ts.map +1 -0
- package/dist/presentation/branch-compare.js +75 -0
- package/dist/presentation/branch-compare.js.map +1 -0
- package/dist/presentation/brief.d.ts +12 -0
- package/dist/presentation/brief.d.ts.map +1 -0
- package/dist/presentation/brief.js +49 -0
- package/dist/presentation/brief.js.map +1 -0
- package/dist/presentation/cfg.d.ts +5 -0
- package/dist/presentation/cfg.d.ts.map +1 -0
- package/dist/presentation/cfg.js +50 -0
- package/dist/presentation/cfg.js.map +1 -0
- package/dist/presentation/check.d.ts +5 -0
- package/dist/presentation/check.d.ts.map +1 -0
- package/dist/presentation/check.js +70 -0
- package/dist/presentation/check.js.map +1 -0
- package/dist/presentation/cochange.d.ts +9 -0
- package/dist/presentation/cochange.d.ts.map +1 -0
- package/dist/presentation/cochange.js +39 -0
- package/dist/presentation/cochange.js.map +1 -0
- package/dist/presentation/colors.d.ts +26 -0
- package/dist/presentation/colors.d.ts.map +1 -0
- package/dist/presentation/colors.js +42 -0
- package/dist/presentation/colors.js.map +1 -0
- package/dist/presentation/communities.d.ts +5 -0
- package/dist/presentation/communities.d.ts.map +1 -0
- package/dist/presentation/communities.js +56 -0
- package/dist/presentation/communities.js.map +1 -0
- package/dist/presentation/complexity.d.ts +5 -0
- package/dist/presentation/complexity.d.ts.map +1 -0
- package/dist/presentation/complexity.js +56 -0
- package/dist/presentation/complexity.js.map +1 -0
- package/dist/presentation/dataflow.d.ts +5 -0
- package/dist/presentation/dataflow.d.ts.map +1 -0
- package/dist/presentation/dataflow.js +96 -0
- package/dist/presentation/dataflow.js.map +1 -0
- package/dist/presentation/export.d.ts +137 -0
- package/dist/presentation/export.d.ts.map +1 -0
- package/dist/presentation/export.js +374 -0
- package/dist/presentation/export.js.map +1 -0
- package/dist/presentation/flow.d.ts +5 -0
- package/dist/presentation/flow.d.ts.map +1 -0
- package/dist/presentation/flow.js +64 -0
- package/dist/presentation/flow.js.map +1 -0
- package/dist/presentation/manifesto.d.ts +5 -0
- package/dist/presentation/manifesto.d.ts.map +1 -0
- package/dist/presentation/manifesto.js +56 -0
- package/dist/presentation/manifesto.js.map +1 -0
- package/dist/presentation/owners.d.ts +5 -0
- package/dist/presentation/owners.d.ts.map +1 -0
- package/dist/presentation/owners.js +45 -0
- package/dist/presentation/owners.js.map +1 -0
- package/dist/presentation/queries-cli/exports.d.ts +2 -0
- package/dist/presentation/queries-cli/exports.d.ts.map +1 -0
- package/dist/presentation/queries-cli/exports.js +94 -0
- package/dist/presentation/queries-cli/exports.js.map +1 -0
- package/dist/presentation/queries-cli/impact.d.ts +6 -0
- package/dist/presentation/queries-cli/impact.d.ts.map +1 -0
- package/dist/presentation/queries-cli/impact.js +196 -0
- package/dist/presentation/queries-cli/impact.js.map +1 -0
- package/dist/presentation/queries-cli/index.d.ts +6 -0
- package/dist/presentation/queries-cli/index.d.ts.map +1 -0
- package/dist/presentation/queries-cli/index.js +6 -0
- package/dist/presentation/queries-cli/index.js.map +1 -0
- package/dist/presentation/queries-cli/inspect.d.ts +8 -0
- package/dist/presentation/queries-cli/inspect.d.ts.map +1 -0
- package/dist/presentation/queries-cli/inspect.js +353 -0
- package/dist/presentation/queries-cli/inspect.js.map +1 -0
- package/dist/presentation/queries-cli/overview.d.ts +4 -0
- package/dist/presentation/queries-cli/overview.d.ts.map +1 -0
- package/dist/presentation/queries-cli/overview.js +163 -0
- package/dist/presentation/queries-cli/overview.js.map +1 -0
- package/dist/presentation/queries-cli/path.d.ts +2 -0
- package/dist/presentation/queries-cli/path.d.ts.map +1 -0
- package/dist/presentation/queries-cli/path.js +51 -0
- package/dist/presentation/queries-cli/path.js.map +1 -0
- package/dist/presentation/queries-cli.d.ts +2 -0
- package/dist/presentation/queries-cli.d.ts.map +1 -0
- package/dist/presentation/queries-cli.js +12 -0
- package/dist/presentation/queries-cli.js.map +1 -0
- package/dist/presentation/query.d.ts +2 -0
- package/dist/presentation/query.d.ts.map +1 -0
- package/dist/presentation/query.js +6 -0
- package/dist/presentation/query.js.map +1 -0
- package/dist/presentation/result-formatter.d.ts +10 -0
- package/dist/presentation/result-formatter.d.ts.map +1 -0
- package/dist/presentation/result-formatter.js +134 -0
- package/dist/presentation/result-formatter.js.map +1 -0
- package/dist/presentation/sequence-renderer.d.ts +12 -0
- package/dist/presentation/sequence-renderer.d.ts.map +1 -0
- package/dist/presentation/sequence-renderer.js +36 -0
- package/dist/presentation/sequence-renderer.js.map +1 -0
- package/dist/presentation/sequence.d.ts +5 -0
- package/dist/presentation/sequence.d.ts.map +1 -0
- package/dist/presentation/sequence.js +29 -0
- package/dist/presentation/sequence.js.map +1 -0
- package/dist/presentation/structure.d.ts +8 -0
- package/dist/presentation/structure.d.ts.map +1 -0
- package/dist/presentation/structure.js +50 -0
- package/dist/presentation/structure.js.map +1 -0
- package/dist/presentation/table.d.ts +28 -0
- package/dist/presentation/table.d.ts.map +1 -0
- package/dist/presentation/table.js +39 -0
- package/dist/presentation/table.js.map +1 -0
- package/dist/presentation/triage.d.ts +5 -0
- package/dist/presentation/triage.d.ts.map +1 -0
- package/dist/presentation/triage.js +37 -0
- package/dist/presentation/triage.js.map +1 -0
- package/dist/presentation/viewer.d.ts +85 -0
- package/dist/presentation/viewer.d.ts.map +1 -0
- package/dist/presentation/viewer.js +621 -0
- package/dist/presentation/viewer.js.map +1 -0
- package/dist/shared/constants.d.ts +11 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +35 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/errors.d.ts +47 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +69 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/file-utils.d.ts +14 -0
- package/dist/shared/file-utils.d.ts.map +1 -0
- package/dist/shared/file-utils.js +165 -0
- package/dist/shared/file-utils.js.map +1 -0
- package/dist/shared/generators.d.ts +62 -0
- package/dist/shared/generators.d.ts.map +1 -0
- package/dist/shared/generators.js +120 -0
- package/dist/shared/generators.js.map +1 -0
- package/dist/shared/hierarchy.d.ts +2 -0
- package/dist/shared/hierarchy.d.ts.map +1 -0
- package/dist/shared/hierarchy.js +27 -0
- package/dist/shared/hierarchy.js.map +1 -0
- package/dist/shared/kinds.d.ts +11 -0
- package/dist/shared/kinds.d.ts.map +1 -0
- package/dist/shared/kinds.js +56 -0
- package/dist/shared/kinds.js.map +1 -0
- package/dist/shared/normalize.d.ts +19 -0
- package/dist/shared/normalize.d.ts.map +1 -0
- package/dist/shared/normalize.js +59 -0
- package/dist/shared/normalize.js.map +1 -0
- package/dist/shared/paginate.d.ts +80 -0
- package/dist/shared/paginate.d.ts.map +1 -0
- package/dist/shared/paginate.js +111 -0
- package/dist/shared/paginate.js.map +1 -0
- package/dist/types.d.ts +1322 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +21 -15
- package/src/ast-analysis/engine.js +252 -258
- package/src/ast-analysis/shared.js +0 -12
- package/src/ast-analysis/visitors/cfg-visitor.js +635 -649
- package/src/ast-analysis/visitors/complexity-visitor.js +135 -139
- package/src/ast-analysis/visitors/dataflow-visitor.js +230 -224
- package/src/cli/commands/ast.js +2 -1
- package/src/cli/commands/audit.js +2 -1
- package/src/cli/commands/batch.js +2 -1
- package/src/cli/commands/brief.js +12 -0
- package/src/cli/commands/cfg.js +2 -1
- package/src/cli/commands/check.js +20 -23
- package/src/cli/commands/children.js +6 -1
- package/src/cli/commands/complexity.js +2 -1
- package/src/cli/commands/context.js +6 -1
- package/src/cli/commands/dataflow.js +2 -1
- package/src/cli/commands/deps.js +8 -3
- package/src/cli/commands/diff-impact.js +2 -0
- package/src/cli/commands/flow.js +2 -1
- package/src/cli/commands/fn-impact.js +8 -1
- package/src/cli/commands/implementations.js +29 -0
- package/src/cli/commands/info.js +1 -1
- package/src/cli/commands/interfaces.js +29 -0
- package/src/cli/commands/owners.js +4 -2
- package/src/cli/commands/query.js +6 -1
- package/src/cli/commands/roles.js +4 -2
- package/src/cli/commands/search.js +8 -2
- package/src/cli/commands/sequence.js +2 -1
- package/src/cli/commands/triage.js +42 -28
- package/src/db/connection.js +18 -12
- package/src/db/index.js +2 -0
- package/src/db/migrations.js +41 -64
- package/src/db/query-builder.js +69 -8
- package/src/db/repository/edges.js +38 -0
- package/src/db/repository/in-memory-repository.js +38 -18
- package/src/db/repository/index.js +2 -0
- package/src/db/repository/nodes.js +8 -10
- package/src/domain/analysis/brief.js +161 -0
- package/src/domain/analysis/context.js +237 -199
- package/src/domain/analysis/dependencies.js +200 -146
- package/src/domain/analysis/exports.js +84 -12
- package/src/domain/analysis/impact.js +350 -157
- package/src/domain/analysis/implementations.js +98 -0
- package/src/domain/analysis/module-map.js +256 -221
- package/src/domain/analysis/roles.js +16 -7
- package/src/domain/analysis/symbol-lookup.js +7 -5
- package/src/domain/graph/builder/helpers.js +1 -1
- package/src/domain/graph/builder/incremental.js +136 -90
- package/src/domain/graph/builder/pipeline.js +114 -80
- package/src/domain/graph/builder/stages/build-edges.js +413 -237
- package/src/domain/graph/builder/stages/detect-changes.js +198 -177
- package/src/domain/graph/builder/stages/insert-nodes.js +147 -139
- package/src/domain/graph/resolve.js +315 -1
- package/src/domain/graph/watcher.js +2 -2
- package/src/domain/parser.js +90 -17
- package/src/domain/queries.js +2 -0
- package/src/domain/search/search/filters.js +9 -5
- package/src/domain/search/search/hybrid.js +7 -4
- package/src/domain/search/search/keyword.js +12 -5
- package/src/domain/search/search/prepare.js +13 -5
- package/src/domain/search/search/semantic.js +11 -6
- package/src/extractors/csharp.js +286 -207
- package/src/extractors/go.js +304 -159
- package/src/extractors/hcl.js +94 -78
- package/src/extractors/java.js +239 -207
- package/src/extractors/javascript.js +437 -305
- package/src/extractors/php.js +276 -220
- package/src/extractors/python.js +379 -247
- package/src/extractors/ruby.js +192 -185
- package/src/extractors/rust.js +243 -168
- package/src/features/ast.js +5 -3
- package/src/features/audit.js +6 -3
- package/src/features/boundaries.js +98 -83
- package/src/features/cfg.js +134 -143
- package/src/features/communities.js +70 -53
- package/src/features/complexity.js +143 -132
- package/src/features/dataflow.js +146 -149
- package/src/features/export.js +3 -3
- package/src/features/graph-enrichment.js +3 -3
- package/src/features/manifesto.js +9 -6
- package/src/features/owners.js +4 -3
- package/src/features/sequence.js +155 -142
- package/src/features/shared/find-nodes.js +31 -0
- package/src/features/structure.js +161 -101
- package/src/features/triage.js +93 -71
- package/src/graph/classifiers/risk.js +12 -4
- package/src/graph/classifiers/roles.js +54 -3
- package/src/index.js +1 -0
- package/src/infrastructure/config.js +255 -4
- package/src/mcp/middleware.js +20 -2
- package/src/mcp/server.js +71 -56
- package/src/mcp/tool-registry.js +53 -1
- package/src/mcp/tools/brief.js +8 -0
- package/src/mcp/tools/implementations.js +14 -0
- package/src/mcp/tools/index.js +6 -0
- package/src/mcp/tools/interfaces.js +14 -0
- package/src/presentation/brief.js +51 -0
- package/src/presentation/queries-cli/exports.js +72 -15
- package/src/presentation/queries-cli/impact.js +55 -39
- package/src/presentation/queries-cli/index.js +9 -1
- package/src/presentation/queries-cli/inspect.js +241 -182
- package/src/presentation/queries-cli/overview.js +57 -58
- package/src/presentation/queries-cli/path.js +36 -29
- package/src/presentation/queries-cli.js +3 -1
- package/src/presentation/result-formatter.js +9 -5
- package/src/presentation/table.js +0 -8
- package/src/shared/file-utils.js +20 -11
- package/src/shared/generators.js +7 -3
- package/src/shared/kinds.js +14 -1
- package/src/shared/paginate.js +10 -2
- package/src/types.ts +1609 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run a query command against multiple targets, returning all results.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} command - One of the keys in BATCH_COMMANDS
|
|
5
|
+
* @param {string[]} targets - List of target names/paths
|
|
6
|
+
* @param {string} [customDbPath] - Path to graph.db
|
|
7
|
+
* @param {object} [opts] - Shared options passed to every invocation
|
|
8
|
+
* @returns {{ command: string, total: number, succeeded: number, failed: number, results: object[] }}
|
|
9
|
+
*/
|
|
10
|
+
export function batchData(command: string, targets: string[], customDbPath?: string, opts?: object): {
|
|
11
|
+
command: string;
|
|
12
|
+
total: number;
|
|
13
|
+
succeeded: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
results: object[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Expand comma-separated positional args into individual entries.
|
|
19
|
+
* `['a,b', 'c']` → `['a', 'b', 'c']`.
|
|
20
|
+
* Trims whitespace, filters empties. Passes through object items unchanged.
|
|
21
|
+
*
|
|
22
|
+
* @param {Array<string|object>} targets
|
|
23
|
+
* @returns {Array<string|object>}
|
|
24
|
+
*/
|
|
25
|
+
export function splitTargets(targets: Array<string | object>): Array<string | object>;
|
|
26
|
+
/**
|
|
27
|
+
* Multi-command batch orchestration — run different commands per target.
|
|
28
|
+
*
|
|
29
|
+
* @param {Array<{command: string, target: string, opts?: object}>} items
|
|
30
|
+
* @param {string} [customDbPath]
|
|
31
|
+
* @param {object} [sharedOpts] - Default opts merged under per-item opts
|
|
32
|
+
* @returns {{ mode: 'multi', total: number, succeeded: number, failed: number, results: object[] }}
|
|
33
|
+
*/
|
|
34
|
+
export function multiBatchData(items: Array<{
|
|
35
|
+
command: string;
|
|
36
|
+
target: string;
|
|
37
|
+
opts?: object;
|
|
38
|
+
}>, customDbPath?: string, sharedOpts?: object): {
|
|
39
|
+
mode: "multi";
|
|
40
|
+
total: number;
|
|
41
|
+
succeeded: number;
|
|
42
|
+
failed: number;
|
|
43
|
+
results: object[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Map of supported batch commands → their data function + first-arg semantics.
|
|
47
|
+
* `sig` describes how the target string is passed to the data function:
|
|
48
|
+
* - 'name' → dataFn(target, dbPath, opts)
|
|
49
|
+
* - 'target' → dataFn(target, dbPath, opts)
|
|
50
|
+
* - 'file' → dataFn(target, dbPath, opts)
|
|
51
|
+
* - 'dbOnly' → dataFn(dbPath, { ...opts, target }) (target goes into opts)
|
|
52
|
+
*/
|
|
53
|
+
export const BATCH_COMMANDS: {
|
|
54
|
+
'fn-impact': {
|
|
55
|
+
fn: typeof fnImpactData;
|
|
56
|
+
sig: string;
|
|
57
|
+
};
|
|
58
|
+
context: {
|
|
59
|
+
fn: typeof contextData;
|
|
60
|
+
sig: string;
|
|
61
|
+
};
|
|
62
|
+
explain: {
|
|
63
|
+
fn: typeof explainData;
|
|
64
|
+
sig: string;
|
|
65
|
+
};
|
|
66
|
+
where: {
|
|
67
|
+
fn: typeof whereData;
|
|
68
|
+
sig: string;
|
|
69
|
+
};
|
|
70
|
+
query: {
|
|
71
|
+
fn: typeof fnDepsData;
|
|
72
|
+
sig: string;
|
|
73
|
+
};
|
|
74
|
+
impact: {
|
|
75
|
+
fn: typeof impactAnalysisData;
|
|
76
|
+
sig: string;
|
|
77
|
+
};
|
|
78
|
+
deps: {
|
|
79
|
+
fn: typeof fileDepsData;
|
|
80
|
+
sig: string;
|
|
81
|
+
};
|
|
82
|
+
exports: {
|
|
83
|
+
fn: typeof exportsData;
|
|
84
|
+
sig: string;
|
|
85
|
+
};
|
|
86
|
+
flow: {
|
|
87
|
+
fn: typeof flowData;
|
|
88
|
+
sig: string;
|
|
89
|
+
};
|
|
90
|
+
dataflow: {
|
|
91
|
+
fn: typeof dataflowData;
|
|
92
|
+
sig: string;
|
|
93
|
+
};
|
|
94
|
+
complexity: {
|
|
95
|
+
fn: typeof complexityData;
|
|
96
|
+
sig: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
import { fnImpactData } from '../domain/queries.js';
|
|
100
|
+
import { contextData } from '../domain/queries.js';
|
|
101
|
+
import { explainData } from '../domain/queries.js';
|
|
102
|
+
import { whereData } from '../domain/queries.js';
|
|
103
|
+
import { fnDepsData } from '../domain/queries.js';
|
|
104
|
+
import { impactAnalysisData } from '../domain/queries.js';
|
|
105
|
+
import { fileDepsData } from '../domain/queries.js';
|
|
106
|
+
import { exportsData } from '../domain/queries.js';
|
|
107
|
+
import { flowData } from './flow.js';
|
|
108
|
+
import { dataflowData } from './dataflow.js';
|
|
109
|
+
import { complexityData } from './complexity.js';
|
|
110
|
+
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../src/features/batch.js"],"names":[],"mappings":"AA4CA;;;;;;;;GAQG;AACH,mCANW,MAAM,WACN,MAAM,EAAE,iBACR,MAAM,SACN,MAAM,GACJ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAiCpG;AAED;;;;;;;GAOG;AACH,sCAHW,KAAK,CAAC,MAAM,GAAC,MAAM,CAAC,GAClB,KAAK,CAAC,MAAM,GAAC,MAAM,CAAC,CAehC;AAED;;;;;;;GAOG;AACH,sCALW,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,iBACvD,MAAM,eACN,MAAM,GACJ;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAwClG;AArID;;;;;;;GAOG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYE;6BA1BK,sBAAsB;4BAAtB,sBAAsB;4BAAtB,sBAAsB;0BAAtB,sBAAsB;2BAAtB,sBAAsB;mCAAtB,sBAAsB;6BAAtB,sBAAsB;4BAAtB,sBAAsB;yBAIJ,WAAW;6BADP,eAAe;+BADb,iBAAiB"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Batch query orchestration — run the same query command against multiple targets
|
|
3
|
+
* and return all results in a single JSON payload.
|
|
4
|
+
*
|
|
5
|
+
* Designed for multi-agent swarms that need to dispatch 20+ queries in one call.
|
|
6
|
+
*/
|
|
7
|
+
import { contextData, explainData, exportsData, fileDepsData, fnDepsData, fnImpactData, impactAnalysisData, whereData, } from '../domain/queries.js';
|
|
8
|
+
import { ConfigError } from '../shared/errors.js';
|
|
9
|
+
import { complexityData } from './complexity.js';
|
|
10
|
+
import { dataflowData } from './dataflow.js';
|
|
11
|
+
import { flowData } from './flow.js';
|
|
12
|
+
/**
|
|
13
|
+
* Map of supported batch commands → their data function + first-arg semantics.
|
|
14
|
+
* `sig` describes how the target string is passed to the data function:
|
|
15
|
+
* - 'name' → dataFn(target, dbPath, opts)
|
|
16
|
+
* - 'target' → dataFn(target, dbPath, opts)
|
|
17
|
+
* - 'file' → dataFn(target, dbPath, opts)
|
|
18
|
+
* - 'dbOnly' → dataFn(dbPath, { ...opts, target }) (target goes into opts)
|
|
19
|
+
*/
|
|
20
|
+
export const BATCH_COMMANDS = {
|
|
21
|
+
'fn-impact': { fn: fnImpactData, sig: 'name' },
|
|
22
|
+
context: { fn: contextData, sig: 'name' },
|
|
23
|
+
explain: { fn: explainData, sig: 'target' },
|
|
24
|
+
where: { fn: whereData, sig: 'target' },
|
|
25
|
+
query: { fn: fnDepsData, sig: 'name' },
|
|
26
|
+
impact: { fn: impactAnalysisData, sig: 'file' },
|
|
27
|
+
deps: { fn: fileDepsData, sig: 'file' },
|
|
28
|
+
exports: { fn: exportsData, sig: 'file' },
|
|
29
|
+
flow: { fn: flowData, sig: 'name' },
|
|
30
|
+
dataflow: { fn: dataflowData, sig: 'name' },
|
|
31
|
+
complexity: { fn: complexityData, sig: 'dbOnly' },
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Run a query command against multiple targets, returning all results.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} command - One of the keys in BATCH_COMMANDS
|
|
37
|
+
* @param {string[]} targets - List of target names/paths
|
|
38
|
+
* @param {string} [customDbPath] - Path to graph.db
|
|
39
|
+
* @param {object} [opts] - Shared options passed to every invocation
|
|
40
|
+
* @returns {{ command: string, total: number, succeeded: number, failed: number, results: object[] }}
|
|
41
|
+
*/
|
|
42
|
+
export function batchData(command, targets, customDbPath, opts = {}) {
|
|
43
|
+
const entry = BATCH_COMMANDS[command];
|
|
44
|
+
if (!entry) {
|
|
45
|
+
throw new ConfigError(`Unknown batch command "${command}". Valid commands: ${Object.keys(BATCH_COMMANDS).join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
const results = [];
|
|
48
|
+
let succeeded = 0;
|
|
49
|
+
let failed = 0;
|
|
50
|
+
for (const target of targets) {
|
|
51
|
+
try {
|
|
52
|
+
let data;
|
|
53
|
+
if (entry.sig === 'dbOnly') {
|
|
54
|
+
// complexityData(dbPath, { ...opts, target })
|
|
55
|
+
data = entry.fn(customDbPath, { ...opts, target });
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// All other: dataFn(target, dbPath, opts)
|
|
59
|
+
data = entry.fn(target, customDbPath, opts);
|
|
60
|
+
}
|
|
61
|
+
results.push({ target, ok: true, data });
|
|
62
|
+
succeeded++;
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
results.push({ target, ok: false, error: err.message });
|
|
66
|
+
failed++;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { command, total: targets.length, succeeded, failed, results };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Expand comma-separated positional args into individual entries.
|
|
73
|
+
* `['a,b', 'c']` → `['a', 'b', 'c']`.
|
|
74
|
+
* Trims whitespace, filters empties. Passes through object items unchanged.
|
|
75
|
+
*
|
|
76
|
+
* @param {Array<string|object>} targets
|
|
77
|
+
* @returns {Array<string|object>}
|
|
78
|
+
*/
|
|
79
|
+
export function splitTargets(targets) {
|
|
80
|
+
const out = [];
|
|
81
|
+
for (const item of targets) {
|
|
82
|
+
if (typeof item !== 'string') {
|
|
83
|
+
out.push(item);
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
for (const part of item.split(',')) {
|
|
87
|
+
const trimmed = part.trim();
|
|
88
|
+
if (trimmed)
|
|
89
|
+
out.push(trimmed);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return out;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Multi-command batch orchestration — run different commands per target.
|
|
96
|
+
*
|
|
97
|
+
* @param {Array<{command: string, target: string, opts?: object}>} items
|
|
98
|
+
* @param {string} [customDbPath]
|
|
99
|
+
* @param {object} [sharedOpts] - Default opts merged under per-item opts
|
|
100
|
+
* @returns {{ mode: 'multi', total: number, succeeded: number, failed: number, results: object[] }}
|
|
101
|
+
*/
|
|
102
|
+
export function multiBatchData(items, customDbPath, sharedOpts = {}) {
|
|
103
|
+
const results = [];
|
|
104
|
+
let succeeded = 0;
|
|
105
|
+
let failed = 0;
|
|
106
|
+
for (const item of items) {
|
|
107
|
+
const { command, target, opts: itemOpts } = item;
|
|
108
|
+
const entry = BATCH_COMMANDS[command];
|
|
109
|
+
if (!entry) {
|
|
110
|
+
results.push({
|
|
111
|
+
command,
|
|
112
|
+
target,
|
|
113
|
+
ok: false,
|
|
114
|
+
error: `Unknown batch command "${command}". Valid commands: ${Object.keys(BATCH_COMMANDS).join(', ')}`,
|
|
115
|
+
});
|
|
116
|
+
failed++;
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const merged = { ...sharedOpts, ...itemOpts };
|
|
120
|
+
try {
|
|
121
|
+
let data;
|
|
122
|
+
if (entry.sig === 'dbOnly') {
|
|
123
|
+
data = entry.fn(customDbPath, { ...merged, target });
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
data = entry.fn(target, customDbPath, merged);
|
|
127
|
+
}
|
|
128
|
+
results.push({ command, target, ok: true, data });
|
|
129
|
+
succeeded++;
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
results.push({ command, target, ok: false, error: err.message });
|
|
133
|
+
failed++;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return { mode: 'multi', total: items.length, succeeded, failed, results };
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/features/batch.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a simple glob pattern to a RegExp.
|
|
3
|
+
* Supports `**` (any path segment), `*` (non-slash), `?` (single non-slash char).
|
|
4
|
+
* @param {string} pattern
|
|
5
|
+
* @returns {RegExp}
|
|
6
|
+
*/
|
|
7
|
+
export function globToRegex(pattern: string): RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* Parse module definitions into a Map of name → { regex, pattern, layer? }.
|
|
10
|
+
* Supports string shorthand and object form.
|
|
11
|
+
* @param {object} boundaryConfig - The `manifesto.boundaries` config object
|
|
12
|
+
* @returns {Map<string, { regex: RegExp, pattern: string, layer?: string }>}
|
|
13
|
+
*/
|
|
14
|
+
export function resolveModules(boundaryConfig: object): Map<string, {
|
|
15
|
+
regex: RegExp;
|
|
16
|
+
pattern: string;
|
|
17
|
+
layer?: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Validate a boundary configuration object.
|
|
21
|
+
* @param {object} config - The `manifesto.boundaries` config
|
|
22
|
+
* @returns {{ valid: boolean, errors: string[] }}
|
|
23
|
+
*/
|
|
24
|
+
export function validateBoundaryConfig(config: object): {
|
|
25
|
+
valid: boolean;
|
|
26
|
+
errors: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Evaluate boundary rules against the dependency graph.
|
|
30
|
+
*
|
|
31
|
+
* @param {object} db - Open SQLite database (readonly)
|
|
32
|
+
* @param {object} boundaryConfig - The `manifesto.boundaries` config
|
|
33
|
+
* @param {object} [opts]
|
|
34
|
+
* @param {string[]} [opts.scopeFiles] - Only check edges from these files (diff-impact mode)
|
|
35
|
+
* @param {boolean} [opts.noTests] - Exclude test files
|
|
36
|
+
* @returns {{ violations: object[], violationCount: number }}
|
|
37
|
+
*/
|
|
38
|
+
export function evaluateBoundaries(db: object, boundaryConfig: object, opts?: {
|
|
39
|
+
scopeFiles?: string[] | undefined;
|
|
40
|
+
noTests?: boolean | undefined;
|
|
41
|
+
}): {
|
|
42
|
+
violations: object[];
|
|
43
|
+
violationCount: number;
|
|
44
|
+
};
|
|
45
|
+
export namespace PRESETS {
|
|
46
|
+
namespace hexagonal {
|
|
47
|
+
let layers: string[];
|
|
48
|
+
let description: string;
|
|
49
|
+
}
|
|
50
|
+
namespace layered {
|
|
51
|
+
let layers_1: string[];
|
|
52
|
+
export { layers_1 as layers };
|
|
53
|
+
let description_1: string;
|
|
54
|
+
export { description_1 as description };
|
|
55
|
+
}
|
|
56
|
+
namespace clean {
|
|
57
|
+
let layers_2: string[];
|
|
58
|
+
export { layers_2 as layers };
|
|
59
|
+
let description_2: string;
|
|
60
|
+
export { description_2 as description };
|
|
61
|
+
}
|
|
62
|
+
namespace onion {
|
|
63
|
+
let layers_3: string[];
|
|
64
|
+
export { layers_3 as layers };
|
|
65
|
+
let description_3: string;
|
|
66
|
+
export { description_3 as description };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=boundaries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../../src/features/boundaries.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,qCAHW,MAAM,GACJ,MAAM,CA6BlB;AA8BD;;;;;GAKG;AACH,+CAHW,MAAM,GACJ,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmB3E;AAuGD;;;;GAIG;AACH,+CAHW,MAAM,GACJ;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAahD;AAwDD;;;;;;;;;GASG;AACH,uCAPW,MAAM,kBACN,MAAM,SAEd;IAAwB,UAAU;IACX,OAAO;CAC9B,GAAU;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAsF5D"}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { debug } from '../infrastructure/logger.js';
|
|
2
|
+
import { isTestFile } from '../infrastructure/test-filter.js';
|
|
3
|
+
// ─── Glob-to-Regex ───────────────────────────────────────────────────
|
|
4
|
+
/**
|
|
5
|
+
* Convert a simple glob pattern to a RegExp.
|
|
6
|
+
* Supports `**` (any path segment), `*` (non-slash), `?` (single non-slash char).
|
|
7
|
+
* @param {string} pattern
|
|
8
|
+
* @returns {RegExp}
|
|
9
|
+
*/
|
|
10
|
+
export function globToRegex(pattern) {
|
|
11
|
+
let re = '';
|
|
12
|
+
let i = 0;
|
|
13
|
+
while (i < pattern.length) {
|
|
14
|
+
const ch = pattern[i];
|
|
15
|
+
if (ch === '*' && pattern[i + 1] === '*') {
|
|
16
|
+
// ** matches any number of path segments
|
|
17
|
+
re += '.*';
|
|
18
|
+
i += 2;
|
|
19
|
+
// Skip trailing slash after **
|
|
20
|
+
if (pattern[i] === '/')
|
|
21
|
+
i++;
|
|
22
|
+
}
|
|
23
|
+
else if (ch === '*') {
|
|
24
|
+
// * matches non-slash characters
|
|
25
|
+
re += '[^/]*';
|
|
26
|
+
i++;
|
|
27
|
+
}
|
|
28
|
+
else if (ch === '?') {
|
|
29
|
+
re += '[^/]';
|
|
30
|
+
i++;
|
|
31
|
+
}
|
|
32
|
+
else if (/[.+^${}()|[\]\\]/.test(ch)) {
|
|
33
|
+
re += `\\${ch}`;
|
|
34
|
+
i++;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
re += ch;
|
|
38
|
+
i++;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return new RegExp(`^${re}$`);
|
|
42
|
+
}
|
|
43
|
+
// ─── Presets ─────────────────────────────────────────────────────────
|
|
44
|
+
/**
|
|
45
|
+
* Built-in preset definitions.
|
|
46
|
+
* Each defines layers ordered from innermost (most protected) to outermost.
|
|
47
|
+
* Inner layers cannot import from outer layers.
|
|
48
|
+
*/
|
|
49
|
+
export const PRESETS = {
|
|
50
|
+
hexagonal: {
|
|
51
|
+
layers: ['domain', 'application', 'adapters', 'infrastructure'],
|
|
52
|
+
description: 'Inner layers cannot import outer layers',
|
|
53
|
+
},
|
|
54
|
+
layered: {
|
|
55
|
+
layers: ['data', 'business', 'presentation'],
|
|
56
|
+
description: 'Inward-only dependency direction',
|
|
57
|
+
},
|
|
58
|
+
clean: {
|
|
59
|
+
layers: ['entities', 'usecases', 'interfaces', 'frameworks'],
|
|
60
|
+
description: 'Inward-only dependency direction',
|
|
61
|
+
},
|
|
62
|
+
onion: {
|
|
63
|
+
layers: ['domain-model', 'domain-services', 'application', 'infrastructure'],
|
|
64
|
+
description: 'Inward-only dependency direction',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
// ─── Module Resolution ───────────────────────────────────────────────
|
|
68
|
+
/**
|
|
69
|
+
* Parse module definitions into a Map of name → { regex, pattern, layer? }.
|
|
70
|
+
* Supports string shorthand and object form.
|
|
71
|
+
* @param {object} boundaryConfig - The `manifesto.boundaries` config object
|
|
72
|
+
* @returns {Map<string, { regex: RegExp, pattern: string, layer?: string }>}
|
|
73
|
+
*/
|
|
74
|
+
export function resolveModules(boundaryConfig) {
|
|
75
|
+
const modules = new Map();
|
|
76
|
+
const defs = boundaryConfig?.modules;
|
|
77
|
+
if (!defs || typeof defs !== 'object')
|
|
78
|
+
return modules;
|
|
79
|
+
for (const [name, value] of Object.entries(defs)) {
|
|
80
|
+
if (typeof value === 'string') {
|
|
81
|
+
modules.set(name, { regex: globToRegex(value), pattern: value });
|
|
82
|
+
}
|
|
83
|
+
else if (value && typeof value === 'object' && value.match) {
|
|
84
|
+
modules.set(name, {
|
|
85
|
+
regex: globToRegex(value.match),
|
|
86
|
+
pattern: value.match,
|
|
87
|
+
...(value.layer ? { layer: value.layer } : {}),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return modules;
|
|
92
|
+
}
|
|
93
|
+
// ─── Validation ──────────────────────────────────────────────────────
|
|
94
|
+
/**
|
|
95
|
+
* Validate the `modules` section of a boundary config.
|
|
96
|
+
* @param {object} modules
|
|
97
|
+
* @param {string[]} errors - Mutated: push any validation errors
|
|
98
|
+
*/
|
|
99
|
+
function validateModules(modules, errors) {
|
|
100
|
+
if (!modules || typeof modules !== 'object' || Object.keys(modules).length === 0) {
|
|
101
|
+
errors.push('boundaries.modules must be a non-empty object');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
for (const [name, value] of Object.entries(modules)) {
|
|
105
|
+
if (typeof value === 'string')
|
|
106
|
+
continue;
|
|
107
|
+
if (value && typeof value === 'object' && typeof value.match === 'string')
|
|
108
|
+
continue;
|
|
109
|
+
errors.push(`boundaries.modules.${name}: must be a glob string or { match: "<glob>" }`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Validate the `preset` field of a boundary config.
|
|
114
|
+
* @param {string|null|undefined} preset
|
|
115
|
+
* @param {string[]} errors - Mutated: push any validation errors
|
|
116
|
+
*/
|
|
117
|
+
function validatePreset(preset, errors) {
|
|
118
|
+
if (preset == null)
|
|
119
|
+
return;
|
|
120
|
+
if (typeof preset !== 'string' || !PRESETS[preset]) {
|
|
121
|
+
errors.push(`boundaries.preset: must be one of ${Object.keys(PRESETS).join(', ')} (got "${preset}")`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Validate a single rule's target list (`notTo` or `onlyTo`).
|
|
126
|
+
* @param {*} list - The target list value
|
|
127
|
+
* @param {string} field - "notTo" or "onlyTo"
|
|
128
|
+
* @param {number} idx - Rule index for error messages
|
|
129
|
+
* @param {Set<string>} moduleNames
|
|
130
|
+
* @param {string[]} errors - Mutated
|
|
131
|
+
*/
|
|
132
|
+
function validateTargetList(list, field, idx, moduleNames, errors) {
|
|
133
|
+
if (!Array.isArray(list)) {
|
|
134
|
+
errors.push(`boundaries.rules[${idx}]: "${field}" must be an array`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
for (const target of list) {
|
|
138
|
+
if (!moduleNames.has(target)) {
|
|
139
|
+
errors.push(`boundaries.rules[${idx}]: "${field}" references unknown module "${target}"`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Validate the `rules` array of a boundary config.
|
|
145
|
+
* @param {Array} rules
|
|
146
|
+
* @param {object|undefined} modules - The modules config (for cross-referencing names)
|
|
147
|
+
* @param {string[]} errors - Mutated
|
|
148
|
+
*/
|
|
149
|
+
function validateRules(rules, modules, errors) {
|
|
150
|
+
if (!rules)
|
|
151
|
+
return;
|
|
152
|
+
if (!Array.isArray(rules)) {
|
|
153
|
+
errors.push('boundaries.rules must be an array');
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const moduleNames = modules ? new Set(Object.keys(modules)) : new Set();
|
|
157
|
+
for (let i = 0; i < rules.length; i++) {
|
|
158
|
+
const rule = rules[i];
|
|
159
|
+
if (!rule.from) {
|
|
160
|
+
errors.push(`boundaries.rules[${i}]: missing "from" field`);
|
|
161
|
+
}
|
|
162
|
+
else if (!moduleNames.has(rule.from)) {
|
|
163
|
+
errors.push(`boundaries.rules[${i}]: "from" references unknown module "${rule.from}"`);
|
|
164
|
+
}
|
|
165
|
+
if (rule.notTo && rule.onlyTo) {
|
|
166
|
+
errors.push(`boundaries.rules[${i}]: cannot have both "notTo" and "onlyTo"`);
|
|
167
|
+
}
|
|
168
|
+
if (!rule.notTo && !rule.onlyTo) {
|
|
169
|
+
errors.push(`boundaries.rules[${i}]: must have either "notTo" or "onlyTo"`);
|
|
170
|
+
}
|
|
171
|
+
if (rule.notTo)
|
|
172
|
+
validateTargetList(rule.notTo, 'notTo', i, moduleNames, errors);
|
|
173
|
+
if (rule.onlyTo)
|
|
174
|
+
validateTargetList(rule.onlyTo, 'onlyTo', i, moduleNames, errors);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Validate that module layer assignments match preset layers.
|
|
179
|
+
* @param {object} config
|
|
180
|
+
* @param {string[]} errors - Mutated
|
|
181
|
+
*/
|
|
182
|
+
function validateLayerAssignments(config, errors) {
|
|
183
|
+
if (!config.preset || !PRESETS[config.preset] || !config.modules)
|
|
184
|
+
return;
|
|
185
|
+
const presetLayers = new Set(PRESETS[config.preset].layers);
|
|
186
|
+
for (const [name, value] of Object.entries(config.modules)) {
|
|
187
|
+
if (typeof value === 'object' && value.layer && !presetLayers.has(value.layer)) {
|
|
188
|
+
errors.push(`boundaries.modules.${name}: layer "${value.layer}" not in preset "${config.preset}" (valid: ${[...presetLayers].join(', ')})`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Validate a boundary configuration object.
|
|
194
|
+
* @param {object} config - The `manifesto.boundaries` config
|
|
195
|
+
* @returns {{ valid: boolean, errors: string[] }}
|
|
196
|
+
*/
|
|
197
|
+
export function validateBoundaryConfig(config) {
|
|
198
|
+
if (!config || typeof config !== 'object') {
|
|
199
|
+
return { valid: false, errors: ['boundaries config must be an object'] };
|
|
200
|
+
}
|
|
201
|
+
const errors = [];
|
|
202
|
+
validateModules(config.modules, errors);
|
|
203
|
+
validatePreset(config.preset, errors);
|
|
204
|
+
validateRules(config.rules, config.modules, errors);
|
|
205
|
+
validateLayerAssignments(config, errors);
|
|
206
|
+
return { valid: errors.length === 0, errors };
|
|
207
|
+
}
|
|
208
|
+
// ─── Preset Rule Generation ─────────────────────────────────────────
|
|
209
|
+
/**
|
|
210
|
+
* Generate notTo rules from preset layer assignments.
|
|
211
|
+
* Inner layers cannot import from outer layers.
|
|
212
|
+
*/
|
|
213
|
+
function generatePresetRules(modules, presetName) {
|
|
214
|
+
const preset = PRESETS[presetName];
|
|
215
|
+
if (!preset)
|
|
216
|
+
return [];
|
|
217
|
+
const layers = preset.layers;
|
|
218
|
+
const layerIndex = new Map(layers.map((l, i) => [l, i]));
|
|
219
|
+
// Group modules by layer
|
|
220
|
+
const modulesByLayer = new Map();
|
|
221
|
+
for (const [name, mod] of modules) {
|
|
222
|
+
if (mod.layer && layerIndex.has(mod.layer)) {
|
|
223
|
+
if (!modulesByLayer.has(mod.layer))
|
|
224
|
+
modulesByLayer.set(mod.layer, []);
|
|
225
|
+
modulesByLayer.get(mod.layer).push(name);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
const rules = [];
|
|
229
|
+
// For each layer, forbid imports to any outer (higher-index) layer
|
|
230
|
+
for (const [layer, modNames] of modulesByLayer) {
|
|
231
|
+
const idx = layerIndex.get(layer);
|
|
232
|
+
const outerModules = [];
|
|
233
|
+
for (const [otherLayer, otherModNames] of modulesByLayer) {
|
|
234
|
+
if (layerIndex.get(otherLayer) > idx) {
|
|
235
|
+
outerModules.push(...otherModNames);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (outerModules.length > 0) {
|
|
239
|
+
for (const from of modNames) {
|
|
240
|
+
rules.push({ from, notTo: outerModules });
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return rules;
|
|
245
|
+
}
|
|
246
|
+
// ─── Evaluation ──────────────────────────────────────────────────────
|
|
247
|
+
/**
|
|
248
|
+
* Classify a file path into a module name. Returns the first matching module or null.
|
|
249
|
+
*/
|
|
250
|
+
function classifyFile(filePath, modules) {
|
|
251
|
+
for (const [name, mod] of modules) {
|
|
252
|
+
if (mod.regex.test(filePath))
|
|
253
|
+
return name;
|
|
254
|
+
}
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Evaluate boundary rules against the dependency graph.
|
|
259
|
+
*
|
|
260
|
+
* @param {object} db - Open SQLite database (readonly)
|
|
261
|
+
* @param {object} boundaryConfig - The `manifesto.boundaries` config
|
|
262
|
+
* @param {object} [opts]
|
|
263
|
+
* @param {string[]} [opts.scopeFiles] - Only check edges from these files (diff-impact mode)
|
|
264
|
+
* @param {boolean} [opts.noTests] - Exclude test files
|
|
265
|
+
* @returns {{ violations: object[], violationCount: number }}
|
|
266
|
+
*/
|
|
267
|
+
export function evaluateBoundaries(db, boundaryConfig, opts = {}) {
|
|
268
|
+
if (!boundaryConfig)
|
|
269
|
+
return { violations: [], violationCount: 0 };
|
|
270
|
+
const { valid, errors } = validateBoundaryConfig(boundaryConfig);
|
|
271
|
+
if (!valid) {
|
|
272
|
+
debug('boundary config validation failed: %s', errors.join('; '));
|
|
273
|
+
return { violations: [], violationCount: 0 };
|
|
274
|
+
}
|
|
275
|
+
const modules = resolveModules(boundaryConfig);
|
|
276
|
+
if (modules.size === 0)
|
|
277
|
+
return { violations: [], violationCount: 0 };
|
|
278
|
+
// Merge user rules with preset-generated rules
|
|
279
|
+
let allRules = [];
|
|
280
|
+
if (boundaryConfig.preset) {
|
|
281
|
+
allRules = generatePresetRules(modules, boundaryConfig.preset);
|
|
282
|
+
}
|
|
283
|
+
if (boundaryConfig.rules && Array.isArray(boundaryConfig.rules)) {
|
|
284
|
+
allRules = allRules.concat(boundaryConfig.rules);
|
|
285
|
+
}
|
|
286
|
+
if (allRules.length === 0)
|
|
287
|
+
return { violations: [], violationCount: 0 };
|
|
288
|
+
// Query file-level import edges
|
|
289
|
+
let edges;
|
|
290
|
+
try {
|
|
291
|
+
edges = db
|
|
292
|
+
.prepare(`SELECT DISTINCT n1.file AS source, n2.file AS target
|
|
293
|
+
FROM edges e
|
|
294
|
+
JOIN nodes n1 ON e.source_id = n1.id
|
|
295
|
+
JOIN nodes n2 ON e.target_id = n2.id
|
|
296
|
+
WHERE n1.file != n2.file AND e.kind IN ('imports', 'imports-type')`)
|
|
297
|
+
.all();
|
|
298
|
+
}
|
|
299
|
+
catch (err) {
|
|
300
|
+
debug('boundary edge query failed: %s', err.message);
|
|
301
|
+
return { violations: [], violationCount: 0 };
|
|
302
|
+
}
|
|
303
|
+
// Filter by scope and tests
|
|
304
|
+
if (opts.noTests) {
|
|
305
|
+
edges = edges.filter((e) => !isTestFile(e.source) && !isTestFile(e.target));
|
|
306
|
+
}
|
|
307
|
+
if (opts.scopeFiles) {
|
|
308
|
+
const scope = new Set(opts.scopeFiles);
|
|
309
|
+
edges = edges.filter((e) => scope.has(e.source));
|
|
310
|
+
}
|
|
311
|
+
// Check each edge against rules
|
|
312
|
+
const violations = [];
|
|
313
|
+
for (const edge of edges) {
|
|
314
|
+
const fromModule = classifyFile(edge.source, modules);
|
|
315
|
+
const toModule = classifyFile(edge.target, modules);
|
|
316
|
+
// Skip edges where source or target is not in any module
|
|
317
|
+
if (!fromModule || !toModule)
|
|
318
|
+
continue;
|
|
319
|
+
for (const rule of allRules) {
|
|
320
|
+
if (rule.from !== fromModule)
|
|
321
|
+
continue;
|
|
322
|
+
let isViolation = false;
|
|
323
|
+
if (rule.notTo?.includes(toModule)) {
|
|
324
|
+
isViolation = true;
|
|
325
|
+
}
|
|
326
|
+
else if (rule.onlyTo && !rule.onlyTo.includes(toModule)) {
|
|
327
|
+
isViolation = true;
|
|
328
|
+
}
|
|
329
|
+
if (isViolation) {
|
|
330
|
+
violations.push({
|
|
331
|
+
rule: 'boundaries',
|
|
332
|
+
name: `${fromModule} -> ${toModule}`,
|
|
333
|
+
file: edge.source,
|
|
334
|
+
targetFile: edge.target,
|
|
335
|
+
message: rule.message || `${fromModule} must not depend on ${toModule}`,
|
|
336
|
+
value: 1,
|
|
337
|
+
threshold: 0,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return { violations, violationCount: violations.length };
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=boundaries.js.map
|