optave-codegraph 3.13.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/LICENSE +190 -0
- package/README.md +984 -0
- package/dist/ast-analysis/engine.d.ts +19 -0
- package/dist/ast-analysis/engine.d.ts.map +1 -0
- package/dist/ast-analysis/engine.js +660 -0
- package/dist/ast-analysis/engine.js.map +1 -0
- package/dist/ast-analysis/metrics.d.ts +34 -0
- package/dist/ast-analysis/metrics.d.ts.map +1 -0
- package/dist/ast-analysis/metrics.js +123 -0
- package/dist/ast-analysis/metrics.js.map +1 -0
- package/dist/ast-analysis/rules/b2.d.ts +7 -0
- package/dist/ast-analysis/rules/b2.d.ts.map +1 -0
- package/dist/ast-analysis/rules/b2.js +240 -0
- package/dist/ast-analysis/rules/b2.js.map +1 -0
- package/dist/ast-analysis/rules/b3.d.ts +6 -0
- package/dist/ast-analysis/rules/b3.d.ts.map +1 -0
- package/dist/ast-analysis/rules/b3.js +105 -0
- package/dist/ast-analysis/rules/b3.js.map +1 -0
- package/dist/ast-analysis/rules/b4.d.ts +9 -0
- package/dist/ast-analysis/rules/b4.d.ts.map +1 -0
- package/dist/ast-analysis/rules/b4.js +361 -0
- package/dist/ast-analysis/rules/b4.js.map +1 -0
- package/dist/ast-analysis/rules/b5.d.ts +4 -0
- package/dist/ast-analysis/rules/b5.d.ts.map +1 -0
- package/dist/ast-analysis/rules/b5.js +52 -0
- package/dist/ast-analysis/rules/b5.js.map +1 -0
- package/dist/ast-analysis/rules/c.d.ts +4 -0
- package/dist/ast-analysis/rules/c.d.ts.map +1 -0
- package/dist/ast-analysis/rules/c.js +143 -0
- package/dist/ast-analysis/rules/c.js.map +1 -0
- package/dist/ast-analysis/rules/csharp.d.ts +7 -0
- package/dist/ast-analysis/rules/csharp.d.ts.map +1 -0
- package/dist/ast-analysis/rules/csharp.js +196 -0
- package/dist/ast-analysis/rules/csharp.js.map +1 -0
- package/dist/ast-analysis/rules/go.d.ts +7 -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 +13 -0
- package/dist/ast-analysis/rules/index.d.ts.map +1 -0
- package/dist/ast-analysis/rules/index.js +325 -0
- package/dist/ast-analysis/rules/index.js.map +1 -0
- package/dist/ast-analysis/rules/java.d.ts +7 -0
- package/dist/ast-analysis/rules/java.d.ts.map +1 -0
- package/dist/ast-analysis/rules/java.js +167 -0
- package/dist/ast-analysis/rules/java.js.map +1 -0
- package/dist/ast-analysis/rules/javascript.d.ts +7 -0
- package/dist/ast-analysis/rules/javascript.d.ts.map +1 -0
- package/dist/ast-analysis/rules/javascript.js +233 -0
- package/dist/ast-analysis/rules/javascript.js.map +1 -0
- package/dist/ast-analysis/rules/php.d.ts +7 -0
- package/dist/ast-analysis/rules/php.d.ts.map +1 -0
- package/dist/ast-analysis/rules/php.js +212 -0
- package/dist/ast-analysis/rules/php.js.map +1 -0
- package/dist/ast-analysis/rules/python.d.ts +7 -0
- package/dist/ast-analysis/rules/python.d.ts.map +1 -0
- package/dist/ast-analysis/rules/python.js +189 -0
- package/dist/ast-analysis/rules/python.js.map +1 -0
- package/dist/ast-analysis/rules/ruby.d.ts +7 -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 +7 -0
- package/dist/ast-analysis/rules/rust.d.ts.map +1 -0
- package/dist/ast-analysis/rules/rust.js +166 -0
- package/dist/ast-analysis/rules/rust.js.map +1 -0
- package/dist/ast-analysis/shared.d.ts +12 -0
- package/dist/ast-analysis/shared.d.ts.map +1 -0
- package/dist/ast-analysis/shared.js +166 -0
- package/dist/ast-analysis/shared.js.map +1 -0
- package/dist/ast-analysis/visitor-utils.d.ts +70 -0
- package/dist/ast-analysis/visitor-utils.d.ts.map +1 -0
- package/dist/ast-analysis/visitor-utils.js +235 -0
- package/dist/ast-analysis/visitor-utils.js.map +1 -0
- package/dist/ast-analysis/visitor.d.ts +27 -0
- package/dist/ast-analysis/visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitor.js +178 -0
- package/dist/ast-analysis/visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts +4 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js +288 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-conditionals.d.ts +5 -0
- package/dist/ast-analysis/visitors/cfg-conditionals.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-conditionals.js +166 -0
- package/dist/ast-analysis/visitors/cfg-conditionals.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-loops.d.ts +7 -0
- package/dist/ast-analysis/visitors/cfg-loops.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-loops.js +73 -0
- package/dist/ast-analysis/visitors/cfg-loops.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-shared.d.ts +56 -0
- package/dist/ast-analysis/visitors/cfg-shared.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-shared.js +107 -0
- package/dist/ast-analysis/visitors/cfg-shared.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-try-catch.d.ts +4 -0
- package/dist/ast-analysis/visitors/cfg-try-catch.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-try-catch.js +100 -0
- package/dist/ast-analysis/visitors/cfg-try-catch.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts +5 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js +231 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts +8 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js +233 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts +5 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js +378 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js.map +1 -0
- package/dist/cli/commands/ast.d.ts +3 -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 +3 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +47 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +3 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +66 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/branch-compare.d.ts +3 -0
- package/dist/cli/commands/branch-compare.d.ts.map +1 -0
- package/dist/cli/commands/branch-compare.js +26 -0
- package/dist/cli/commands/branch-compare.js.map +1 -0
- package/dist/cli/commands/brief.d.ts +3 -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 +3 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +33 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/cfg.d.ts +3 -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 +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/co-change.d.ts.map +1 -0
- package/dist/cli/commands/co-change.js +66 -0
- package/dist/cli/commands/co-change.js.map +1 -0
- package/dist/cli/commands/communities.d.ts +3 -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 +3 -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/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +275 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/context.d.ts +3 -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 +3 -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 +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/diff-impact.d.ts.map +1 -0
- package/dist/cli/commands/diff-impact.js +29 -0
- package/dist/cli/commands/diff-impact.js.map +1 -0
- package/dist/cli/commands/embed.d.ts +3 -0
- package/dist/cli/commands/embed.d.ts.map +1 -0
- package/dist/cli/commands/embed.js +75 -0
- package/dist/cli/commands/embed.js.map +1 -0
- package/dist/cli/commands/export.d.ts +3 -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 +3 -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 +3 -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 +3 -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 +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +67 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/interfaces.d.ts +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +18 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/models.d.ts +3 -0
- package/dist/cli/commands/models.d.ts.map +1 -0
- package/dist/cli/commands/models.js +19 -0
- package/dist/cli/commands/models.js.map +1 -0
- package/dist/cli/commands/owners.d.ts +3 -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 +3 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +41 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/plot.d.ts +3 -0
- package/dist/cli/commands/plot.d.ts.map +1 -0
- package/dist/cli/commands/plot.js +96 -0
- package/dist/cli/commands/plot.js.map +1 -0
- package/dist/cli/commands/query.d.ts +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +36 -0
- package/dist/cli/commands/roles.js.map +1 -0
- package/dist/cli/commands/search.d.ts +3 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +43 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/sequence.d.ts +3 -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 +3 -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 +3 -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 +3 -0
- package/dist/cli/commands/structure.d.ts.map +1 -0
- package/dist/cli/commands/structure.js +50 -0
- package/dist/cli/commands/structure.js.map +1 -0
- package/dist/cli/commands/triage.d.ts +3 -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 +3 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +28 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/commands/where.d.ts +3 -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 +22 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +139 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/shared/open-graph.d.ts +11 -0
- package/dist/cli/shared/open-graph.d.ts.map +1 -0
- package/dist/cli/shared/open-graph.js +9 -0
- package/dist/cli/shared/open-graph.js.map +1 -0
- package/dist/cli/shared/options.d.ts +25 -0
- package/dist/cli/shared/options.d.ts.map +1 -0
- package/dist/cli/shared/options.js +66 -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/types.d.ts +32 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +38 -0
- package/dist/cli.js.map +1 -0
- package/dist/db/better-sqlite3.d.ts +4 -0
- package/dist/db/better-sqlite3.d.ts.map +1 -0
- package/dist/db/better-sqlite3.js +19 -0
- package/dist/db/better-sqlite3.js.map +1 -0
- package/dist/db/connection.d.ts +82 -0
- package/dist/db/connection.d.ts.map +1 -0
- package/dist/db/connection.js +444 -0
- package/dist/db/connection.js.map +1 -0
- package/dist/db/index.d.ts +6 -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 +11 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +416 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/query-builder.d.ts +88 -0
- package/dist/db/query-builder.d.ts.map +1 -0
- package/dist/db/query-builder.js +321 -0
- package/dist/db/query-builder.js.map +1 -0
- package/dist/db/repository/base.d.ts +103 -0
- package/dist/db/repository/base.d.ts.map +1 -0
- package/dist/db/repository/base.js +172 -0
- package/dist/db/repository/base.js.map +1 -0
- package/dist/db/repository/build-stmts.d.ts +16 -0
- package/dist/db/repository/build-stmts.d.ts.map +1 -0
- package/dist/db/repository/build-stmts.js +76 -0
- package/dist/db/repository/build-stmts.js.map +1 -0
- package/dist/db/repository/cached-stmt.d.ts +9 -0
- package/dist/db/repository/cached-stmt.d.ts.map +1 -0
- package/dist/db/repository/cached-stmt.js +15 -0
- package/dist/db/repository/cached-stmt.js.map +1 -0
- package/dist/db/repository/cfg.d.ts +34 -0
- package/dist/db/repository/cfg.d.ts.map +1 -0
- package/dist/db/repository/cfg.js +46 -0
- package/dist/db/repository/cfg.js.map +1 -0
- package/dist/db/repository/cochange.d.ts +14 -0
- package/dist/db/repository/cochange.d.ts.map +1 -0
- package/dist/db/repository/cochange.js +38 -0
- package/dist/db/repository/cochange.js.map +1 -0
- package/dist/db/repository/complexity.d.ts +7 -0
- package/dist/db/repository/complexity.d.ts.map +1 -0
- package/dist/db/repository/complexity.js +12 -0
- package/dist/db/repository/complexity.js.map +1 -0
- package/dist/db/repository/dataflow.d.ts +11 -0
- package/dist/db/repository/dataflow.d.ts.map +1 -0
- package/dist/db/repository/dataflow.js +30 -0
- package/dist/db/repository/dataflow.js.map +1 -0
- package/dist/db/repository/edges.d.ts +66 -0
- package/dist/db/repository/edges.d.ts.map +1 -0
- package/dist/db/repository/edges.js +175 -0
- package/dist/db/repository/edges.js.map +1 -0
- package/dist/db/repository/embeddings.d.ts +14 -0
- package/dist/db/repository/embeddings.d.ts.map +1 -0
- package/dist/db/repository/embeddings.js +40 -0
- package/dist/db/repository/embeddings.js.map +1 -0
- package/dist/db/repository/graph-read.d.ts +18 -0
- package/dist/db/repository/graph-read.d.ts.map +1 -0
- package/dist/db/repository/graph-read.js +33 -0
- package/dist/db/repository/graph-read.js.map +1 -0
- package/dist/db/repository/in-memory-repository.d.ts +88 -0
- package/dist/db/repository/in-memory-repository.d.ts.map +1 -0
- package/dist/db/repository/in-memory-repository.js +541 -0
- package/dist/db/repository/in-memory-repository.js.map +1 -0
- package/dist/db/repository/index.d.ts +16 -0
- package/dist/db/repository/index.d.ts.map +1 -0
- package/dist/db/repository/index.js +16 -0
- package/dist/db/repository/index.js.map +1 -0
- package/dist/db/repository/native-repository.d.ts +70 -0
- package/dist/db/repository/native-repository.d.ts.map +1 -0
- package/dist/db/repository/native-repository.js +418 -0
- package/dist/db/repository/native-repository.js.map +1 -0
- package/dist/db/repository/nodes.d.ts +86 -0
- package/dist/db/repository/nodes.d.ts.map +1 -0
- package/dist/db/repository/nodes.js +203 -0
- package/dist/db/repository/nodes.js.map +1 -0
- package/dist/db/repository/sqlite-repository.d.ts +59 -0
- package/dist/db/repository/sqlite-repository.d.ts.map +1 -0
- package/dist/db/repository/sqlite-repository.js +199 -0
- package/dist/db/repository/sqlite-repository.js.map +1 -0
- package/dist/domain/analysis/brief.d.ts +25 -0
- package/dist/domain/analysis/brief.d.ts.map +1 -0
- package/dist/domain/analysis/brief.js +136 -0
- package/dist/domain/analysis/brief.js.map +1 -0
- package/dist/domain/analysis/context.d.ts +241 -0
- package/dist/domain/analysis/context.d.ts.map +1 -0
- package/dist/domain/analysis/context.js +361 -0
- package/dist/domain/analysis/context.js.map +1 -0
- package/dist/domain/analysis/dependencies.d.ts +158 -0
- package/dist/domain/analysis/dependencies.d.ts.map +1 -0
- package/dist/domain/analysis/dependencies.js +522 -0
- package/dist/domain/analysis/dependencies.js.map +1 -0
- package/dist/domain/analysis/diff-impact.d.ts +90 -0
- package/dist/domain/analysis/diff-impact.d.ts.map +1 -0
- package/dist/domain/analysis/diff-impact.js +301 -0
- package/dist/domain/analysis/diff-impact.js.map +1 -0
- package/dist/domain/analysis/exports.d.ts +8 -0
- package/dist/domain/analysis/exports.d.ts.map +1 -0
- package/dist/domain/analysis/exports.js +178 -0
- package/dist/domain/analysis/exports.js.map +1 -0
- package/dist/domain/analysis/fn-impact.d.ts +61 -0
- package/dist/domain/analysis/fn-impact.d.ts.map +1 -0
- package/dist/domain/analysis/fn-impact.js +190 -0
- package/dist/domain/analysis/fn-impact.js.map +1 -0
- package/dist/domain/analysis/impact.d.ts +11 -0
- package/dist/domain/analysis/impact.d.ts.map +1 -0
- package/dist/domain/analysis/impact.js +11 -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 +65 -0
- package/dist/domain/analysis/implementations.js.map +1 -0
- package/dist/domain/analysis/module-map.d.ts +86 -0
- package/dist/domain/analysis/module-map.d.ts.map +1 -0
- package/dist/domain/analysis/module-map.js +468 -0
- package/dist/domain/analysis/module-map.js.map +1 -0
- package/dist/domain/analysis/query-helpers.d.ts +27 -0
- package/dist/domain/analysis/query-helpers.d.ts.map +1 -0
- package/dist/domain/analysis/query-helpers.js +41 -0
- package/dist/domain/analysis/query-helpers.js.map +1 -0
- package/dist/domain/analysis/roles.d.ts +20 -0
- package/dist/domain/analysis/roles.d.ts.map +1 -0
- package/dist/domain/analysis/roles.js +74 -0
- package/dist/domain/analysis/roles.js.map +1 -0
- package/dist/domain/analysis/symbol-lookup.d.ts +125 -0
- package/dist/domain/analysis/symbol-lookup.d.ts.map +1 -0
- package/dist/domain/analysis/symbol-lookup.js +206 -0
- package/dist/domain/analysis/symbol-lookup.js.map +1 -0
- package/dist/domain/graph/builder/call-resolver.d.ts +89 -0
- package/dist/domain/graph/builder/call-resolver.d.ts.map +1 -0
- package/dist/domain/graph/builder/call-resolver.js +212 -0
- package/dist/domain/graph/builder/call-resolver.js.map +1 -0
- package/dist/domain/graph/builder/cha.d.ts +69 -0
- package/dist/domain/graph/builder/cha.d.ts.map +1 -0
- package/dist/domain/graph/builder/cha.js +158 -0
- package/dist/domain/graph/builder/cha.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 +66 -0
- package/dist/domain/graph/builder/context.js.map +1 -0
- package/dist/domain/graph/builder/helpers.d.ts +97 -0
- package/dist/domain/graph/builder/helpers.d.ts.map +1 -0
- package/dist/domain/graph/builder/helpers.js +558 -0
- package/dist/domain/graph/builder/helpers.js.map +1 -0
- package/dist/domain/graph/builder/incremental.d.ts +53 -0
- package/dist/domain/graph/builder/incremental.d.ts.map +1 -0
- package/dist/domain/graph/builder/incremental.js +647 -0
- package/dist/domain/graph/builder/incremental.js.map +1 -0
- package/dist/domain/graph/builder/native-db-proxy.d.ts +24 -0
- package/dist/domain/graph/builder/native-db-proxy.d.ts.map +1 -0
- package/dist/domain/graph/builder/native-db-proxy.js +91 -0
- package/dist/domain/graph/builder/native-db-proxy.js.map +1 -0
- package/dist/domain/graph/builder/pipeline.d.ts +9 -0
- package/dist/domain/graph/builder/pipeline.d.ts.map +1 -0
- package/dist/domain/graph/builder/pipeline.js +448 -0
- package/dist/domain/graph/builder/pipeline.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts +3 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.js +1425 -0
- package/dist/domain/graph/builder/stages/build-edges.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts +3 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.js +250 -0
- package/dist/domain/graph/builder/stages/build-structure.js.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts +3 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.js +161 -0
- package/dist/domain/graph/builder/stages/collect-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts +27 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.js +593 -0
- package/dist/domain/graph/builder/stages/detect-changes.js.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts +3 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.js +274 -0
- package/dist/domain/graph/builder/stages/finalize.js.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts +35 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js +351 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js.map +1 -0
- package/dist/domain/graph/builder/stages/native-db-lifecycle.d.ts +14 -0
- package/dist/domain/graph/builder/stages/native-db-lifecycle.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/native-db-lifecycle.js +77 -0
- package/dist/domain/graph/builder/stages/native-db-lifecycle.js.map +1 -0
- package/dist/domain/graph/builder/stages/native-orchestrator.d.ts +62 -0
- package/dist/domain/graph/builder/stages/native-orchestrator.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/native-orchestrator.js +1763 -0
- package/dist/domain/graph/builder/stages/native-orchestrator.js.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts +3 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.js +22 -0
- package/dist/domain/graph/builder/stages/parse-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts +7 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js +231 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts +3 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.js +23 -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 +50 -0
- package/dist/domain/graph/change-journal.d.ts.map +1 -0
- package/dist/domain/graph/change-journal.js +97 -0
- package/dist/domain/graph/change-journal.js.map +1 -0
- package/dist/domain/graph/cycles.d.ts +19 -0
- package/dist/domain/graph/cycles.d.ts.map +1 -0
- package/dist/domain/graph/cycles.js +142 -0
- package/dist/domain/graph/cycles.js.map +1 -0
- package/dist/domain/graph/journal.d.ts +30 -0
- package/dist/domain/graph/journal.d.ts.map +1 -0
- package/dist/domain/graph/journal.js +360 -0
- package/dist/domain/graph/journal.js.map +1 -0
- package/dist/domain/graph/resolve.d.ts +67 -0
- package/dist/domain/graph/resolve.d.ts.map +1 -0
- package/dist/domain/graph/resolve.js +521 -0
- package/dist/domain/graph/resolve.js.map +1 -0
- package/dist/domain/graph/resolver/points-to.d.ts +53 -0
- package/dist/domain/graph/resolver/points-to.d.ts.map +1 -0
- package/dist/domain/graph/resolver/points-to.js +261 -0
- package/dist/domain/graph/resolver/points-to.js.map +1 -0
- package/dist/domain/graph/resolver/strategy.d.ts +61 -0
- package/dist/domain/graph/resolver/strategy.d.ts.map +1 -0
- package/dist/domain/graph/resolver/strategy.js +222 -0
- package/dist/domain/graph/resolver/strategy.js.map +1 -0
- package/dist/domain/graph/resolver/ts-resolver.d.ts +9 -0
- package/dist/domain/graph/resolver/ts-resolver.d.ts.map +1 -0
- package/dist/domain/graph/resolver/ts-resolver.js +476 -0
- package/dist/domain/graph/resolver/ts-resolver.js.map +1 -0
- package/dist/domain/graph/watcher.d.ts +23 -0
- package/dist/domain/graph/watcher.d.ts.map +1 -0
- package/dist/domain/graph/watcher.js +272 -0
- package/dist/domain/graph/watcher.js.map +1 -0
- package/dist/domain/parser.d.ts +128 -0
- package/dist/domain/parser.d.ts.map +1 -0
- package/dist/domain/parser.js +1246 -0
- package/dist/domain/parser.js.map +1 -0
- package/dist/domain/queries.d.ts +22 -0
- package/dist/domain/queries.d.ts.map +1 -0
- package/dist/domain/queries.js +26 -0
- package/dist/domain/queries.js.map +1 -0
- package/dist/domain/search/generator.d.ts +16 -0
- package/dist/domain/search/generator.d.ts.map +1 -0
- package/dist/domain/search/generator.js +181 -0
- package/dist/domain/search/generator.js.map +1 -0
- package/dist/domain/search/index.d.ts +15 -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 +63 -0
- package/dist/domain/search/models.d.ts.map +1 -0
- package/dist/domain/search/models.js +303 -0
- package/dist/domain/search/models.js.map +1 -0
- package/dist/domain/search/search/cli-formatter.d.ts +10 -0
- package/dist/domain/search/search/cli-formatter.d.ts.map +1 -0
- package/dist/domain/search/search/cli-formatter.js +134 -0
- package/dist/domain/search/search/cli-formatter.js.map +1 -0
- package/dist/domain/search/search/filters.d.ts +9 -0
- package/dist/domain/search/search/filters.d.ts.map +1 -0
- package/dist/domain/search/search/filters.js +31 -0
- package/dist/domain/search/search/filters.js.map +1 -0
- package/dist/domain/search/search/hybrid.d.ts +21 -0
- package/dist/domain/search/search/hybrid.d.ts.map +1 -0
- package/dist/domain/search/search/hybrid.js +122 -0
- package/dist/domain/search/search/hybrid.js.map +1 -0
- package/dist/domain/search/search/keyword.d.ts +18 -0
- package/dist/domain/search/search/keyword.d.ts.map +1 -0
- package/dist/domain/search/search/keyword.js +58 -0
- package/dist/domain/search/search/keyword.js.map +1 -0
- package/dist/domain/search/search/prepare.d.ts +25 -0
- package/dist/domain/search/search/prepare.d.ts.map +1 -0
- package/dist/domain/search/search/prepare.js +63 -0
- package/dist/domain/search/search/prepare.js.map +1 -0
- package/dist/domain/search/search/semantic.d.ts +41 -0
- package/dist/domain/search/search/semantic.d.ts.map +1 -0
- package/dist/domain/search/search/semantic.js +135 -0
- package/dist/domain/search/search/semantic.js.map +1 -0
- package/dist/domain/search/stores/fts5.d.ts +10 -0
- package/dist/domain/search/stores/fts5.d.ts.map +1 -0
- package/dist/domain/search/stores/fts5.js +27 -0
- package/dist/domain/search/stores/fts5.js.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts +5 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.js +16 -0
- package/dist/domain/search/stores/sqlite-blob.js.map +1 -0
- package/dist/domain/search/strategies/source.d.ts +6 -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 +10 -0
- package/dist/domain/search/strategies/structured.d.ts.map +1 -0
- package/dist/domain/search/strategies/structured.js +35 -0
- package/dist/domain/search/strategies/structured.js.map +1 -0
- package/dist/domain/search/strategies/text-utils.d.ts +9 -0
- package/dist/domain/search/strategies/text-utils.d.ts.map +1 -0
- package/dist/domain/search/strategies/text-utils.js +45 -0
- package/dist/domain/search/strategies/text-utils.js.map +1 -0
- package/dist/domain/wasm-worker-entry.d.ts +24 -0
- package/dist/domain/wasm-worker-entry.d.ts.map +1 -0
- package/dist/domain/wasm-worker-entry.js +749 -0
- package/dist/domain/wasm-worker-entry.js.map +1 -0
- package/dist/domain/wasm-worker-pool.d.ts +59 -0
- package/dist/domain/wasm-worker-pool.d.ts.map +1 -0
- package/dist/domain/wasm-worker-pool.js +363 -0
- package/dist/domain/wasm-worker-pool.js.map +1 -0
- package/dist/domain/wasm-worker-protocol.d.ts +81 -0
- package/dist/domain/wasm-worker-protocol.d.ts.map +1 -0
- package/dist/domain/wasm-worker-protocol.js +13 -0
- package/dist/domain/wasm-worker-protocol.js.map +1 -0
- package/dist/extractors/bash.d.ts +6 -0
- package/dist/extractors/bash.d.ts.map +1 -0
- package/dist/extractors/bash.js +91 -0
- package/dist/extractors/bash.js.map +1 -0
- package/dist/extractors/c.d.ts +6 -0
- package/dist/extractors/c.d.ts.map +1 -0
- package/dist/extractors/c.js +223 -0
- package/dist/extractors/c.js.map +1 -0
- package/dist/extractors/clojure.d.ts +12 -0
- package/dist/extractors/clojure.d.ts.map +1 -0
- package/dist/extractors/clojure.js +245 -0
- package/dist/extractors/clojure.js.map +1 -0
- package/dist/extractors/cpp.d.ts +6 -0
- package/dist/extractors/cpp.d.ts.map +1 -0
- package/dist/extractors/cpp.js +365 -0
- package/dist/extractors/cpp.js.map +1 -0
- package/dist/extractors/csharp.d.ts +6 -0
- package/dist/extractors/csharp.d.ts.map +1 -0
- package/dist/extractors/csharp.js +430 -0
- package/dist/extractors/csharp.js.map +1 -0
- package/dist/extractors/cuda.d.ts +11 -0
- package/dist/extractors/cuda.d.ts.map +1 -0
- package/dist/extractors/cuda.js +419 -0
- package/dist/extractors/cuda.js.map +1 -0
- package/dist/extractors/dart.d.ts +6 -0
- package/dist/extractors/dart.d.ts.map +1 -0
- package/dist/extractors/dart.js +277 -0
- package/dist/extractors/dart.js.map +1 -0
- package/dist/extractors/elixir.d.ts +9 -0
- package/dist/extractors/elixir.d.ts.map +1 -0
- package/dist/extractors/elixir.js +327 -0
- package/dist/extractors/elixir.js.map +1 -0
- package/dist/extractors/erlang.d.ts +14 -0
- package/dist/extractors/erlang.d.ts.map +1 -0
- package/dist/extractors/erlang.js +275 -0
- package/dist/extractors/erlang.js.map +1 -0
- package/dist/extractors/fsharp.d.ts +20 -0
- package/dist/extractors/fsharp.d.ts.map +1 -0
- package/dist/extractors/fsharp.js +312 -0
- package/dist/extractors/fsharp.js.map +1 -0
- package/dist/extractors/gleam.d.ts +14 -0
- package/dist/extractors/gleam.d.ts.map +1 -0
- package/dist/extractors/gleam.js +225 -0
- package/dist/extractors/gleam.js.map +1 -0
- package/dist/extractors/go.d.ts +6 -0
- package/dist/extractors/go.d.ts.map +1 -0
- package/dist/extractors/go.js +460 -0
- package/dist/extractors/go.js.map +1 -0
- package/dist/extractors/groovy.d.ts +10 -0
- package/dist/extractors/groovy.d.ts.map +1 -0
- package/dist/extractors/groovy.js +403 -0
- package/dist/extractors/groovy.js.map +1 -0
- package/dist/extractors/haskell.d.ts +8 -0
- package/dist/extractors/haskell.d.ts.map +1 -0
- package/dist/extractors/haskell.js +261 -0
- package/dist/extractors/haskell.js.map +1 -0
- package/dist/extractors/hcl.d.ts +6 -0
- package/dist/extractors/hcl.d.ts.map +1 -0
- package/dist/extractors/hcl.js +114 -0
- package/dist/extractors/hcl.js.map +1 -0
- package/dist/extractors/helpers.d.ts +144 -0
- package/dist/extractors/helpers.d.ts.map +1 -0
- package/dist/extractors/helpers.js +360 -0
- package/dist/extractors/helpers.js.map +1 -0
- package/dist/extractors/index.d.ts +33 -0
- package/dist/extractors/index.d.ts.map +1 -0
- package/dist/extractors/index.js +33 -0
- package/dist/extractors/index.js.map +1 -0
- package/dist/extractors/java.d.ts +6 -0
- package/dist/extractors/java.d.ts.map +1 -0
- package/dist/extractors/java.js +390 -0
- package/dist/extractors/java.js.map +1 -0
- package/dist/extractors/javascript.d.ts +10 -0
- package/dist/extractors/javascript.d.ts.map +1 -0
- package/dist/extractors/javascript.js +3618 -0
- package/dist/extractors/javascript.js.map +1 -0
- package/dist/extractors/julia.d.ts +16 -0
- package/dist/extractors/julia.d.ts.map +1 -0
- package/dist/extractors/julia.js +411 -0
- package/dist/extractors/julia.js.map +1 -0
- package/dist/extractors/kotlin.d.ts +6 -0
- package/dist/extractors/kotlin.d.ts.map +1 -0
- package/dist/extractors/kotlin.js +340 -0
- package/dist/extractors/kotlin.js.map +1 -0
- package/dist/extractors/lua.d.ts +6 -0
- package/dist/extractors/lua.d.ts.map +1 -0
- package/dist/extractors/lua.js +162 -0
- package/dist/extractors/lua.js.map +1 -0
- package/dist/extractors/objc.d.ts +9 -0
- package/dist/extractors/objc.d.ts.map +1 -0
- package/dist/extractors/objc.js +543 -0
- package/dist/extractors/objc.js.map +1 -0
- package/dist/extractors/ocaml.d.ts +6 -0
- package/dist/extractors/ocaml.d.ts.map +1 -0
- package/dist/extractors/ocaml.js +310 -0
- package/dist/extractors/ocaml.js.map +1 -0
- package/dist/extractors/php.d.ts +6 -0
- package/dist/extractors/php.d.ts.map +1 -0
- package/dist/extractors/php.js +381 -0
- package/dist/extractors/php.js.map +1 -0
- package/dist/extractors/python.d.ts +6 -0
- package/dist/extractors/python.d.ts.map +1 -0
- package/dist/extractors/python.js +428 -0
- package/dist/extractors/python.js.map +1 -0
- package/dist/extractors/r.d.ts +13 -0
- package/dist/extractors/r.d.ts.map +1 -0
- package/dist/extractors/r.js +267 -0
- package/dist/extractors/r.js.map +1 -0
- package/dist/extractors/ruby.d.ts +6 -0
- package/dist/extractors/ruby.d.ts.map +1 -0
- package/dist/extractors/ruby.js +281 -0
- package/dist/extractors/ruby.js.map +1 -0
- package/dist/extractors/rust.d.ts +6 -0
- package/dist/extractors/rust.d.ts.map +1 -0
- package/dist/extractors/rust.js +354 -0
- package/dist/extractors/rust.js.map +1 -0
- package/dist/extractors/scala.d.ts +6 -0
- package/dist/extractors/scala.d.ts.map +1 -0
- package/dist/extractors/scala.js +315 -0
- package/dist/extractors/scala.js.map +1 -0
- package/dist/extractors/solidity.d.ts +9 -0
- package/dist/extractors/solidity.d.ts.map +1 -0
- package/dist/extractors/solidity.js +351 -0
- package/dist/extractors/solidity.js.map +1 -0
- package/dist/extractors/swift.d.ts +6 -0
- package/dist/extractors/swift.d.ts.map +1 -0
- package/dist/extractors/swift.js +326 -0
- package/dist/extractors/swift.js.map +1 -0
- package/dist/extractors/verilog.d.ts +9 -0
- package/dist/extractors/verilog.d.ts.map +1 -0
- package/dist/extractors/verilog.js +351 -0
- package/dist/extractors/verilog.js.map +1 -0
- package/dist/extractors/zig.d.ts +9 -0
- package/dist/extractors/zig.d.ts.map +1 -0
- package/dist/extractors/zig.js +274 -0
- package/dist/extractors/zig.js.map +1 -0
- package/dist/features/ast.d.ts +78 -0
- package/dist/features/ast.d.ts.map +1 -0
- package/dist/features/ast.js +228 -0
- package/dist/features/ast.js.map +1 -0
- package/dist/features/audit.d.ts +15 -0
- package/dist/features/audit.d.ts.map +1 -0
- package/dist/features/audit.js +275 -0
- package/dist/features/audit.js.map +1 -0
- package/dist/features/batch.d.ts +54 -0
- package/dist/features/batch.d.ts.map +1 -0
- package/dist/features/batch.js +97 -0
- package/dist/features/batch.js.map +1 -0
- package/dist/features/boundaries.d.ts +51 -0
- package/dist/features/boundaries.d.ts.map +1 -0
- package/dist/features/boundaries.js +248 -0
- package/dist/features/boundaries.js.map +1 -0
- package/dist/features/branch-compare.d.ts +71 -0
- package/dist/features/branch-compare.d.ts.map +1 -0
- package/dist/features/branch-compare.js +444 -0
- package/dist/features/branch-compare.js.map +1 -0
- package/dist/features/cfg.d.ts +79 -0
- package/dist/features/cfg.d.ts.map +1 -0
- package/dist/features/cfg.js +483 -0
- package/dist/features/cfg.js.map +1 -0
- package/dist/features/check.d.ts +84 -0
- package/dist/features/check.d.ts.map +1 -0
- package/dist/features/check.js +290 -0
- package/dist/features/check.js.map +1 -0
- package/dist/features/cochange.d.ts +68 -0
- package/dist/features/cochange.d.ts.map +1 -0
- package/dist/features/cochange.js +384 -0
- package/dist/features/cochange.js.map +1 -0
- package/dist/features/communities.d.ts +26 -0
- package/dist/features/communities.d.ts.map +1 -0
- package/dist/features/communities.js +149 -0
- package/dist/features/communities.js.map +1 -0
- package/dist/features/complexity-query.d.ts +37 -0
- package/dist/features/complexity-query.d.ts.map +1 -0
- package/dist/features/complexity-query.js +268 -0
- package/dist/features/complexity-query.js.map +1 -0
- package/dist/features/complexity.d.ts +52 -0
- package/dist/features/complexity.d.ts.map +1 -0
- package/dist/features/complexity.js +490 -0
- package/dist/features/complexity.js.map +1 -0
- package/dist/features/dataflow.d.ts +129 -0
- package/dist/features/dataflow.d.ts.map +1 -0
- package/dist/features/dataflow.js +1079 -0
- package/dist/features/dataflow.js.map +1 -0
- package/dist/features/export.d.ts +35 -0
- package/dist/features/export.d.ts.map +1 -0
- package/dist/features/export.js +340 -0
- package/dist/features/export.js.map +1 -0
- package/dist/features/flow.d.ts +21 -0
- package/dist/features/flow.d.ts.map +1 -0
- package/dist/features/flow.js +195 -0
- package/dist/features/flow.js.map +1 -0
- package/dist/features/graph-enrichment.d.ts +44 -0
- package/dist/features/graph-enrichment.d.ts.map +1 -0
- package/dist/features/graph-enrichment.js +312 -0
- package/dist/features/graph-enrichment.js.map +1 -0
- package/dist/features/manifesto.d.ts +23 -0
- package/dist/features/manifesto.d.ts.map +1 -0
- package/dist/features/manifesto.js +382 -0
- package/dist/features/manifesto.js.map +1 -0
- package/dist/features/owners.d.ts +60 -0
- package/dist/features/owners.d.ts.map +1 -0
- package/dist/features/owners.js +248 -0
- package/dist/features/owners.js.map +1 -0
- package/dist/features/sequence.d.ts +42 -0
- package/dist/features/sequence.d.ts.map +1 -0
- package/dist/features/sequence.js +271 -0
- package/dist/features/sequence.js.map +1 -0
- package/dist/features/shared/find-nodes.d.ts +7 -0
- package/dist/features/shared/find-nodes.d.ts.map +1 -0
- package/dist/features/shared/find-nodes.js +18 -0
- package/dist/features/shared/find-nodes.js.map +1 -0
- package/dist/features/snapshot.d.ts +25 -0
- package/dist/features/snapshot.d.ts.map +1 -0
- package/dist/features/snapshot.js +188 -0
- package/dist/features/snapshot.js.map +1 -0
- package/dist/features/structure-query.d.ts +76 -0
- package/dist/features/structure-query.d.ts.map +1 -0
- package/dist/features/structure-query.js +274 -0
- package/dist/features/structure-query.js.map +1 -0
- package/dist/features/structure.d.ts +39 -0
- package/dist/features/structure.d.ts.map +1 -0
- package/dist/features/structure.js +796 -0
- package/dist/features/structure.js.map +1 -0
- package/dist/features/triage.d.ts +47 -0
- package/dist/features/triage.d.ts.map +1 -0
- package/dist/features/triage.js +123 -0
- package/dist/features/triage.js.map +1 -0
- package/dist/graph/algorithms/bfs.d.ts +14 -0
- package/dist/graph/algorithms/bfs.d.ts.map +1 -0
- package/dist/graph/algorithms/bfs.js +72 -0
- package/dist/graph/algorithms/bfs.js.map +1 -0
- package/dist/graph/algorithms/centrality.d.ts +12 -0
- package/dist/graph/algorithms/centrality.d.ts.map +1 -0
- package/dist/graph/algorithms/centrality.js +42 -0
- package/dist/graph/algorithms/centrality.js.map +1 -0
- package/dist/graph/algorithms/index.d.ts +7 -0
- package/dist/graph/algorithms/index.d.ts.map +1 -0
- package/dist/graph/algorithms/index.js +7 -0
- package/dist/graph/algorithms/index.js.map +1 -0
- package/dist/graph/algorithms/leiden/adapter.d.ts +37 -0
- package/dist/graph/algorithms/leiden/adapter.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/adapter.js +173 -0
- package/dist/graph/algorithms/leiden/adapter.js.map +1 -0
- package/dist/graph/algorithms/leiden/cpm.d.ts +28 -0
- package/dist/graph/algorithms/leiden/cpm.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/cpm.js +48 -0
- package/dist/graph/algorithms/leiden/cpm.js.map +1 -0
- package/dist/graph/algorithms/leiden/index.d.ts +37 -0
- package/dist/graph/algorithms/leiden/index.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/index.js +157 -0
- package/dist/graph/algorithms/leiden/index.js.map +1 -0
- package/dist/graph/algorithms/leiden/modularity.d.ts +33 -0
- package/dist/graph/algorithms/leiden/modularity.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/modularity.js +80 -0
- package/dist/graph/algorithms/leiden/modularity.js.map +1 -0
- package/dist/graph/algorithms/leiden/optimiser.d.ts +62 -0
- package/dist/graph/algorithms/leiden/optimiser.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/optimiser.js +530 -0
- package/dist/graph/algorithms/leiden/optimiser.js.map +1 -0
- package/dist/graph/algorithms/leiden/partition.d.ts +44 -0
- package/dist/graph/algorithms/leiden/partition.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/partition.js +438 -0
- package/dist/graph/algorithms/leiden/partition.js.map +1 -0
- package/dist/graph/algorithms/leiden/rng.d.ts +9 -0
- package/dist/graph/algorithms/leiden/rng.d.ts.map +1 -0
- package/dist/graph/algorithms/leiden/rng.js +17 -0
- package/dist/graph/algorithms/leiden/rng.js.map +1 -0
- package/dist/graph/algorithms/louvain.d.ts +20 -0
- package/dist/graph/algorithms/louvain.d.ts.map +1 -0
- package/dist/graph/algorithms/louvain.js +52 -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 +55 -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 +52 -0
- package/dist/graph/algorithms/tarjan.js.map +1 -0
- package/dist/graph/builders/dependency.d.ts +18 -0
- package/dist/graph/builders/dependency.d.ts.map +1 -0
- package/dist/graph/builders/dependency.js +101 -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 +10 -0
- package/dist/graph/builders/structure.d.ts.map +1 -0
- package/dist/graph/builders/structure.js +33 -0
- package/dist/graph/builders/structure.js.map +1 -0
- package/dist/graph/builders/temporal.d.ts +13 -0
- package/dist/graph/builders/temporal.d.ts.map +1 -0
- package/dist/graph/builders/temporal.js +29 -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 +39 -0
- package/dist/graph/classifiers/risk.d.ts.map +1 -0
- package/dist/graph/classifiers/risk.js +78 -0
- package/dist/graph/classifiers/risk.js.map +1 -0
- package/dist/graph/classifiers/roles.d.ts +48 -0
- package/dist/graph/classifiers/roles.d.ts.map +1 -0
- package/dist/graph/classifiers/roles.js +180 -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 +57 -0
- package/dist/graph/model.d.ts.map +1 -0
- package/dist/graph/model.js +205 -0
- package/dist/graph/model.js.map +1 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.ts +37 -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 +281 -0
- package/dist/infrastructure/config.d.ts.map +1 -0
- package/dist/infrastructure/config.js +857 -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 +38 -0
- package/dist/infrastructure/native.d.ts.map +1 -0
- package/dist/infrastructure/native.js +182 -0
- package/dist/infrastructure/native.js.map +1 -0
- package/dist/infrastructure/registry.d.ts +81 -0
- package/dist/infrastructure/registry.d.ts.map +1 -0
- package/dist/infrastructure/registry.js +229 -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/suppress.d.ts +25 -0
- package/dist/infrastructure/suppress.d.ts.map +1 -0
- package/dist/infrastructure/suppress.js +43 -0
- package/dist/infrastructure/suppress.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 +26 -0
- package/dist/infrastructure/update-check.d.ts.map +1 -0
- package/dist/infrastructure/update-check.js +164 -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 +32 -0
- package/dist/mcp/middleware.js.map +1 -0
- package/dist/mcp/server.d.ts +14 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +193 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +21 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +839 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools/ast-query.d.ts +14 -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 +15 -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 +13 -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 +12 -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 +9 -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 +14 -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 +20 -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 +12 -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 +12 -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 +13 -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 +16 -0
- package/dist/mcp/tools/complexity.d.ts.map +1 -0
- package/dist/mcp/tools/complexity.js +16 -0
- package/dist/mcp/tools/complexity.js.map +1 -0
- package/dist/mcp/tools/context.d.ts +16 -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 +15 -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 +14 -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 +15 -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 +11 -0
- package/dist/mcp/tools/export-graph.d.ts.map +1 -0
- package/dist/mcp/tools/export-graph.js +57 -0
- package/dist/mcp/tools/export-graph.js.map +1 -0
- package/dist/mcp/tools/file-deps.d.ts +11 -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 +12 -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 +7 -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 +14 -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 +9 -0
- package/dist/mcp/tools/impact-analysis.d.ts.map +1 -0
- package/dist/mcp/tools/impact-analysis.js +8 -0
- package/dist/mcp/tools/impact-analysis.js.map +1 -0
- package/dist/mcp/tools/implementations.d.ts +13 -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 +7 -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 +13 -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 +12 -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 +8 -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 +9 -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 +12 -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 +15 -0
- package/dist/mcp/tools/path.d.ts.map +1 -0
- package/dist/mcp/tools/path.js +21 -0
- package/dist/mcp/tools/path.js.map +1 -0
- package/dist/mcp/tools/query.d.ts +20 -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 +13 -0
- package/dist/mcp/tools/semantic-search.d.ts.map +1 -0
- package/dist/mcp/tools/semantic-search.js +62 -0
- package/dist/mcp/tools/semantic-search.js.map +1 -0
- package/dist/mcp/tools/sequence.d.ts +16 -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 +13 -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 +13 -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 +17 -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 +12 -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/mcp/types.d.ts +19 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +6 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/presentation/audit.d.ts +15 -0
- package/dist/presentation/audit.d.ts.map +1 -0
- package/dist/presentation/audit.js +78 -0
- package/dist/presentation/audit.js.map +1 -0
- package/dist/presentation/batch.d.ts +20 -0
- package/dist/presentation/batch.d.ts.map +1 -0
- package/dist/presentation/batch.js +21 -0
- package/dist/presentation/batch.js.map +1 -0
- package/dist/presentation/branch-compare.d.ts +13 -0
- package/dist/presentation/branch-compare.d.ts.map +1 -0
- package/dist/presentation/branch-compare.js +91 -0
- package/dist/presentation/branch-compare.js.map +1 -0
- package/dist/presentation/brief.d.ts +9 -0
- package/dist/presentation/brief.d.ts.map +1 -0
- package/dist/presentation/brief.js +39 -0
- package/dist/presentation/brief.js.map +1 -0
- package/dist/presentation/cfg.d.ts +13 -0
- package/dist/presentation/cfg.d.ts.map +1 -0
- package/dist/presentation/cfg.js +62 -0
- package/dist/presentation/cfg.js.map +1 -0
- package/dist/presentation/check.d.ts +19 -0
- package/dist/presentation/check.d.ts.map +1 -0
- package/dist/presentation/check.js +74 -0
- package/dist/presentation/check.js.map +1 -0
- package/dist/presentation/cochange.d.ts +32 -0
- package/dist/presentation/cochange.d.ts.map +1 -0
- package/dist/presentation/cochange.js +33 -0
- package/dist/presentation/cochange.js.map +1 -0
- package/dist/presentation/colors.d.ts +12 -0
- package/dist/presentation/colors.d.ts.map +1 -0
- package/dist/presentation/colors.js +47 -0
- package/dist/presentation/colors.js.map +1 -0
- package/dist/presentation/communities.d.ts +11 -0
- package/dist/presentation/communities.d.ts.map +1 -0
- package/dist/presentation/communities.js +57 -0
- package/dist/presentation/communities.js.map +1 -0
- package/dist/presentation/complexity.d.ts +17 -0
- package/dist/presentation/complexity.d.ts.map +1 -0
- package/dist/presentation/complexity.js +59 -0
- package/dist/presentation/complexity.js.map +1 -0
- package/dist/presentation/dataflow.d.ts +14 -0
- package/dist/presentation/dataflow.d.ts.map +1 -0
- package/dist/presentation/dataflow.js +100 -0
- package/dist/presentation/dataflow.js.map +1 -0
- package/dist/presentation/diff-impact-mermaid.d.ts +11 -0
- package/dist/presentation/diff-impact-mermaid.d.ts.map +1 -0
- package/dist/presentation/diff-impact-mermaid.js +114 -0
- package/dist/presentation/diff-impact-mermaid.js.map +1 -0
- package/dist/presentation/export.d.ts +130 -0
- package/dist/presentation/export.d.ts.map +1 -0
- package/dist/presentation/export.js +311 -0
- package/dist/presentation/export.js.map +1 -0
- package/dist/presentation/flow.d.ts +16 -0
- package/dist/presentation/flow.d.ts.map +1 -0
- package/dist/presentation/flow.js +85 -0
- package/dist/presentation/flow.js.map +1 -0
- package/dist/presentation/manifesto.d.ts +13 -0
- package/dist/presentation/manifesto.d.ts.map +1 -0
- package/dist/presentation/manifesto.js +51 -0
- package/dist/presentation/manifesto.js.map +1 -0
- package/dist/presentation/owners.d.ts +16 -0
- package/dist/presentation/owners.d.ts.map +1 -0
- package/dist/presentation/owners.js +42 -0
- package/dist/presentation/owners.js.map +1 -0
- package/dist/presentation/queries-cli/exports.d.ts +12 -0
- package/dist/presentation/queries-cli/exports.d.ts.map +1 -0
- package/dist/presentation/queries-cli/exports.js +100 -0
- package/dist/presentation/queries-cli/exports.js.map +1 -0
- package/dist/presentation/queries-cli/impact.d.ts +23 -0
- package/dist/presentation/queries-cli/impact.d.ts.map +1 -0
- package/dist/presentation/queries-cli/impact.js +208 -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 +23 -0
- package/dist/presentation/queries-cli/inspect.d.ts.map +1 -0
- package/dist/presentation/queries-cli/inspect.js +376 -0
- package/dist/presentation/queries-cli/inspect.js.map +1 -0
- package/dist/presentation/queries-cli/overview.d.ts +19 -0
- package/dist/presentation/queries-cli/overview.d.ts.map +1 -0
- package/dist/presentation/queries-cli/overview.js +196 -0
- package/dist/presentation/queries-cli/overview.js.map +1 -0
- package/dist/presentation/queries-cli/path.d.ts +15 -0
- package/dist/presentation/queries-cli/path.d.ts.map +1 -0
- package/dist/presentation/queries-cli/path.js +101 -0
- package/dist/presentation/queries-cli/path.js.map +1 -0
- package/dist/presentation/queries-cli.d.ts +12 -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 +2 -0
- package/dist/presentation/query.js.map +1 -0
- package/dist/presentation/result-formatter.d.ts +23 -0
- package/dist/presentation/result-formatter.d.ts.map +1 -0
- package/dist/presentation/result-formatter.js +122 -0
- package/dist/presentation/result-formatter.js.map +1 -0
- package/dist/presentation/sequence-renderer.d.ts +19 -0
- package/dist/presentation/sequence-renderer.d.ts.map +1 -0
- package/dist/presentation/sequence-renderer.js +23 -0
- package/dist/presentation/sequence-renderer.js.map +1 -0
- package/dist/presentation/sequence.d.ts +15 -0
- package/dist/presentation/sequence.d.ts.map +1 -0
- package/dist/presentation/sequence.js +26 -0
- package/dist/presentation/sequence.js.map +1 -0
- package/dist/presentation/structure.d.ts +46 -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 +24 -0
- package/dist/presentation/table.d.ts.map +1 -0
- package/dist/presentation/table.js +33 -0
- package/dist/presentation/table.js.map +1 -0
- package/dist/presentation/triage.d.ts +19 -0
- package/dist/presentation/triage.d.ts.map +1 -0
- package/dist/presentation/triage.js +34 -0
- package/dist/presentation/triage.js.map +1 -0
- package/dist/presentation/viewer.d.ts +102 -0
- package/dist/presentation/viewer.d.ts.map +1 -0
- package/dist/presentation/viewer.js +618 -0
- package/dist/presentation/viewer.js.map +1 -0
- package/dist/shared/constants.d.ts +33 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +54 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/errors.d.ts +46 -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 +27 -0
- package/dist/shared/file-utils.d.ts.map +1 -0
- package/dist/shared/file-utils.js +186 -0
- package/dist/shared/file-utils.js.map +1 -0
- package/dist/shared/generators.d.ts +57 -0
- package/dist/shared/generators.d.ts.map +1 -0
- package/dist/shared/generators.js +106 -0
- package/dist/shared/generators.js.map +1 -0
- package/dist/shared/globs.d.ts +40 -0
- package/dist/shared/globs.d.ts.map +1 -0
- package/dist/shared/globs.js +126 -0
- package/dist/shared/globs.js.map +1 -0
- package/dist/shared/hierarchy.d.ts +9 -0
- package/dist/shared/hierarchy.d.ts.map +1 -0
- package/dist/shared/hierarchy.js +68 -0
- package/dist/shared/hierarchy.js.map +1 -0
- package/dist/shared/kinds.d.ts +12 -0
- package/dist/shared/kinds.d.ts.map +1 -0
- package/dist/shared/kinds.js +67 -0
- package/dist/shared/kinds.js.map +1 -0
- package/dist/shared/normalize.d.ts +49 -0
- package/dist/shared/normalize.d.ts.map +1 -0
- package/dist/shared/normalize.js +57 -0
- package/dist/shared/normalize.js.map +1 -0
- package/dist/shared/paginate.d.ts +32 -0
- package/dist/shared/paginate.d.ts.map +1 -0
- package/dist/shared/paginate.js +82 -0
- package/dist/shared/paginate.js.map +1 -0
- package/dist/shared/version.d.ts +2 -0
- package/dist/shared/version.d.ts.map +1 -0
- package/dist/shared/version.js +5 -0
- package/dist/shared/version.js.map +1 -0
- package/dist/types.d.ts +2468 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/grammars/tree-sitter-bash.wasm +0 -0
- package/grammars/tree-sitter-c.wasm +0 -0
- package/grammars/tree-sitter-c_sharp.wasm +0 -0
- package/grammars/tree-sitter-clojure.wasm +0 -0
- package/grammars/tree-sitter-cpp.wasm +0 -0
- package/grammars/tree-sitter-cuda.wasm +0 -0
- package/grammars/tree-sitter-dart.wasm +0 -0
- package/grammars/tree-sitter-elixir.wasm +0 -0
- package/grammars/tree-sitter-erlang.wasm +0 -0
- package/grammars/tree-sitter-fsharp.wasm +0 -0
- package/grammars/tree-sitter-fsharp_signature.wasm +0 -0
- package/grammars/tree-sitter-gleam.wasm +0 -0
- package/grammars/tree-sitter-go.wasm +0 -0
- package/grammars/tree-sitter-groovy.wasm +0 -0
- package/grammars/tree-sitter-haskell.wasm +0 -0
- package/grammars/tree-sitter-hcl.wasm +0 -0
- package/grammars/tree-sitter-java.wasm +0 -0
- package/grammars/tree-sitter-javascript.wasm +0 -0
- package/grammars/tree-sitter-julia.wasm +0 -0
- package/grammars/tree-sitter-kotlin.wasm +0 -0
- package/grammars/tree-sitter-lua.wasm +0 -0
- package/grammars/tree-sitter-objc.wasm +0 -0
- package/grammars/tree-sitter-ocaml.wasm +0 -0
- package/grammars/tree-sitter-ocaml_interface.wasm +0 -0
- package/grammars/tree-sitter-php.wasm +0 -0
- package/grammars/tree-sitter-python.wasm +0 -0
- package/grammars/tree-sitter-r.wasm +0 -0
- package/grammars/tree-sitter-ruby.wasm +0 -0
- package/grammars/tree-sitter-rust.wasm +0 -0
- package/grammars/tree-sitter-scala.wasm +0 -0
- package/grammars/tree-sitter-solidity.wasm +0 -0
- package/grammars/tree-sitter-swift.wasm +0 -0
- package/grammars/tree-sitter-tsx.wasm +0 -0
- package/grammars/tree-sitter-typescript.wasm +0 -0
- package/grammars/tree-sitter-verilog.wasm +0 -0
- package/grammars/tree-sitter-zig.wasm +0 -0
- package/package.json +188 -0
- package/src/ast-analysis/engine.ts +926 -0
- package/src/ast-analysis/metrics.ts +150 -0
- package/src/ast-analysis/rules/b2.ts +263 -0
- package/src/ast-analysis/rules/b3.ts +127 -0
- package/src/ast-analysis/rules/b4.ts +378 -0
- package/src/ast-analysis/rules/b5.ts +65 -0
- package/src/ast-analysis/rules/c.ts +157 -0
- package/src/ast-analysis/rules/csharp.ts +210 -0
- package/src/ast-analysis/rules/go.ts +187 -0
- package/src/ast-analysis/rules/index.ts +380 -0
- package/src/ast-analysis/rules/java.ts +181 -0
- package/src/ast-analysis/rules/javascript.ts +249 -0
- package/src/ast-analysis/rules/php.ts +226 -0
- package/src/ast-analysis/rules/python.ts +202 -0
- package/src/ast-analysis/rules/ruby.ts +209 -0
- package/src/ast-analysis/rules/rust.ts +179 -0
- package/src/ast-analysis/shared.ts +223 -0
- package/src/ast-analysis/visitor-utils.ts +278 -0
- package/src/ast-analysis/visitor.ts +266 -0
- package/src/ast-analysis/visitors/ast-store-visitor.ts +334 -0
- package/src/ast-analysis/visitors/cfg-conditionals.ts +227 -0
- package/src/ast-analysis/visitors/cfg-loops.ts +136 -0
- package/src/ast-analysis/visitors/cfg-shared.ts +196 -0
- package/src/ast-analysis/visitors/cfg-try-catch.ts +142 -0
- package/src/ast-analysis/visitors/cfg-visitor.ts +367 -0
- package/src/ast-analysis/visitors/complexity-visitor.ts +328 -0
- package/src/ast-analysis/visitors/dataflow-visitor.ts +571 -0
- package/src/cli/commands/ast.ts +24 -0
- package/src/cli/commands/audit.ts +48 -0
- package/src/cli/commands/batch.ts +66 -0
- package/src/cli/commands/branch-compare.ts +27 -0
- package/src/cli/commands/brief.ts +13 -0
- package/src/cli/commands/build.ts +35 -0
- package/src/cli/commands/cfg.ts +28 -0
- package/src/cli/commands/check.ts +72 -0
- package/src/cli/commands/children.ts +34 -0
- package/src/cli/commands/co-change.ts +72 -0
- package/src/cli/commands/communities.ts +21 -0
- package/src/cli/commands/complexity.ts +48 -0
- package/src/cli/commands/config.ts +353 -0
- package/src/cli/commands/context.ts +36 -0
- package/src/cli/commands/cycles.ts +33 -0
- package/src/cli/commands/dataflow.ts +30 -0
- package/src/cli/commands/deps.ts +18 -0
- package/src/cli/commands/diff-impact.ts +30 -0
- package/src/cli/commands/embed.ts +82 -0
- package/src/cli/commands/export.ts +79 -0
- package/src/cli/commands/exports.ts +15 -0
- package/src/cli/commands/flow.ts +34 -0
- package/src/cli/commands/fn-impact.ts +34 -0
- package/src/cli/commands/impact.ts +13 -0
- package/src/cli/commands/implementations.ts +30 -0
- package/src/cli/commands/info.ts +79 -0
- package/src/cli/commands/interfaces.ts +30 -0
- package/src/cli/commands/map.ts +20 -0
- package/src/cli/commands/mcp.ts +19 -0
- package/src/cli/commands/models.ts +29 -0
- package/src/cli/commands/owners.ts +28 -0
- package/src/cli/commands/path.ts +42 -0
- package/src/cli/commands/plot.ts +110 -0
- package/src/cli/commands/query.ts +51 -0
- package/src/cli/commands/registry.ts +106 -0
- package/src/cli/commands/roles.ts +38 -0
- package/src/cli/commands/search.ts +45 -0
- package/src/cli/commands/sequence.ts +30 -0
- package/src/cli/commands/snapshot.ts +67 -0
- package/src/cli/commands/stats.ts +16 -0
- package/src/cli/commands/structure.ts +55 -0
- package/src/cli/commands/triage.ts +93 -0
- package/src/cli/commands/watch.ts +29 -0
- package/src/cli/commands/where.ts +21 -0
- package/src/cli/index.ts +159 -0
- package/src/cli/shared/open-graph.ts +13 -0
- package/src/cli/shared/options.ts +69 -0
- package/src/cli/shared/output.ts +1 -0
- package/src/cli/types.ts +35 -0
- package/src/cli.ts +37 -0
- package/src/db/better-sqlite3.ts +21 -0
- package/src/db/connection.ts +478 -0
- package/src/db/index.ts +84 -0
- package/src/db/migrations.ts +440 -0
- package/src/db/query-builder.ts +371 -0
- package/src/db/repository/base.ts +269 -0
- package/src/db/repository/build-stmts.ts +126 -0
- package/src/db/repository/cached-stmt.ts +20 -0
- package/src/db/repository/cfg.ts +81 -0
- package/src/db/repository/cochange.ts +48 -0
- package/src/db/repository/complexity.ts +21 -0
- package/src/db/repository/dataflow.ts +35 -0
- package/src/db/repository/edges.ts +281 -0
- package/src/db/repository/embeddings.ts +47 -0
- package/src/db/repository/graph-read.ts +62 -0
- package/src/db/repository/in-memory-repository.ts +657 -0
- package/src/db/repository/index.ts +53 -0
- package/src/db/repository/native-repository.ts +546 -0
- package/src/db/repository/nodes.ts +322 -0
- package/src/db/repository/sqlite-repository.ts +303 -0
- package/src/domain/analysis/brief.ts +165 -0
- package/src/domain/analysis/context.ts +537 -0
- package/src/domain/analysis/dependencies.ts +738 -0
- package/src/domain/analysis/diff-impact.ts +381 -0
- package/src/domain/analysis/exports.ts +262 -0
- package/src/domain/analysis/fn-impact.ts +311 -0
- package/src/domain/analysis/impact.ts +11 -0
- package/src/domain/analysis/implementations.ts +81 -0
- package/src/domain/analysis/module-map.ts +576 -0
- package/src/domain/analysis/query-helpers.ts +52 -0
- package/src/domain/analysis/roles.ts +95 -0
- package/src/domain/analysis/symbol-lookup.ts +284 -0
- package/src/domain/graph/builder/call-resolver.ts +289 -0
- package/src/domain/graph/builder/cha.ts +192 -0
- package/src/domain/graph/builder/context.ts +120 -0
- package/src/domain/graph/builder/helpers.ts +665 -0
- package/src/domain/graph/builder/incremental.ts +987 -0
- package/src/domain/graph/builder/native-db-proxy.ts +104 -0
- package/src/domain/graph/builder/pipeline.ts +517 -0
- package/src/domain/graph/builder/stages/build-edges.ts +1986 -0
- package/src/domain/graph/builder/stages/build-structure.ts +330 -0
- package/src/domain/graph/builder/stages/collect-files.ts +175 -0
- package/src/domain/graph/builder/stages/detect-changes.ts +751 -0
- package/src/domain/graph/builder/stages/finalize.ts +321 -0
- package/src/domain/graph/builder/stages/insert-nodes.ts +489 -0
- package/src/domain/graph/builder/stages/native-db-lifecycle.ts +74 -0
- package/src/domain/graph/builder/stages/native-orchestrator.ts +2241 -0
- package/src/domain/graph/builder/stages/parse-files.ts +26 -0
- package/src/domain/graph/builder/stages/resolve-imports.ts +285 -0
- package/src/domain/graph/builder/stages/run-analyses.ts +26 -0
- package/src/domain/graph/builder.ts +11 -0
- package/src/domain/graph/change-journal.ts +141 -0
- package/src/domain/graph/cycles.ts +155 -0
- package/src/domain/graph/journal.ts +377 -0
- package/src/domain/graph/resolve.ts +579 -0
- package/src/domain/graph/resolver/points-to.ts +377 -0
- package/src/domain/graph/resolver/strategy.ts +265 -0
- package/src/domain/graph/resolver/ts-resolver.ts +536 -0
- package/src/domain/graph/watcher.ts +339 -0
- package/src/domain/parser.ts +1437 -0
- package/src/domain/queries.ts +50 -0
- package/src/domain/search/generator.ts +260 -0
- package/src/domain/search/index.ts +15 -0
- package/src/domain/search/models.ts +356 -0
- package/src/domain/search/search/cli-formatter.ts +179 -0
- package/src/domain/search/search/filters.ts +38 -0
- package/src/domain/search/search/hybrid.ts +197 -0
- package/src/domain/search/search/keyword.ts +101 -0
- package/src/domain/search/search/prepare.ts +95 -0
- package/src/domain/search/search/semantic.ts +226 -0
- package/src/domain/search/stores/fts5.ts +27 -0
- package/src/domain/search/stores/sqlite-blob.ts +15 -0
- package/src/domain/search/strategies/source.ts +19 -0
- package/src/domain/search/strategies/structured.ts +48 -0
- package/src/domain/search/strategies/text-utils.ts +41 -0
- package/src/domain/wasm-worker-entry.ts +921 -0
- package/src/domain/wasm-worker-pool.ts +375 -0
- package/src/domain/wasm-worker-protocol.ts +98 -0
- package/src/extractors/bash.ts +97 -0
- package/src/extractors/c.ts +231 -0
- package/src/extractors/clojure.ts +273 -0
- package/src/extractors/cpp.ts +383 -0
- package/src/extractors/csharp.ts +448 -0
- package/src/extractors/cuda.ts +433 -0
- package/src/extractors/dart.ts +304 -0
- package/src/extractors/elixir.ts +350 -0
- package/src/extractors/erlang.ts +295 -0
- package/src/extractors/fsharp.ts +357 -0
- package/src/extractors/gleam.ts +247 -0
- package/src/extractors/go.ts +512 -0
- package/src/extractors/groovy.ts +436 -0
- package/src/extractors/haskell.ts +276 -0
- package/src/extractors/hcl.ts +136 -0
- package/src/extractors/helpers.ts +449 -0
- package/src/extractors/index.ts +32 -0
- package/src/extractors/java.ts +439 -0
- package/src/extractors/javascript.ts +3844 -0
- package/src/extractors/julia.ts +432 -0
- package/src/extractors/kotlin.ts +358 -0
- package/src/extractors/lua.ts +169 -0
- package/src/extractors/objc.ts +555 -0
- package/src/extractors/ocaml.ts +337 -0
- package/src/extractors/php.ts +399 -0
- package/src/extractors/python.ts +439 -0
- package/src/extractors/r.ts +275 -0
- package/src/extractors/ruby.ts +292 -0
- package/src/extractors/rust.ts +371 -0
- package/src/extractors/scala.ts +335 -0
- package/src/extractors/solidity.ts +375 -0
- package/src/extractors/swift.ts +337 -0
- package/src/extractors/verilog.ts +383 -0
- package/src/extractors/zig.ts +291 -0
- package/src/features/ast.ts +405 -0
- package/src/features/audit.ts +446 -0
- package/src/features/batch.ts +182 -0
- package/src/features/boundaries.ts +345 -0
- package/src/features/branch-compare.ts +618 -0
- package/src/features/cfg.ts +750 -0
- package/src/features/check.ts +454 -0
- package/src/features/cochange.ts +506 -0
- package/src/features/communities.ts +232 -0
- package/src/features/complexity-query.ts +388 -0
- package/src/features/complexity.ts +753 -0
- package/src/features/dataflow.ts +1654 -0
- package/src/features/export.ts +486 -0
- package/src/features/flow.ts +307 -0
- package/src/features/graph-enrichment.ts +493 -0
- package/src/features/manifesto.ts +508 -0
- package/src/features/owners.ts +360 -0
- package/src/features/sequence.ts +410 -0
- package/src/features/shared/find-nodes.ts +28 -0
- package/src/features/snapshot.ts +221 -0
- package/src/features/structure-query.ts +456 -0
- package/src/features/structure.ts +1100 -0
- package/src/features/triage.ts +199 -0
- package/src/graph/algorithms/bfs.ts +92 -0
- package/src/graph/algorithms/centrality.ts +50 -0
- package/src/graph/algorithms/index.ts +6 -0
- package/src/graph/algorithms/leiden/LICENSE +24 -0
- package/src/graph/algorithms/leiden/adapter.ts +252 -0
- package/src/graph/algorithms/leiden/cpm.ts +77 -0
- package/src/graph/algorithms/leiden/index.ts +224 -0
- package/src/graph/algorithms/leiden/modularity.ts +122 -0
- package/src/graph/algorithms/leiden/optimiser.ts +706 -0
- package/src/graph/algorithms/leiden/partition.ts +577 -0
- package/src/graph/algorithms/leiden/rng.ts +20 -0
- package/src/graph/algorithms/louvain.ts +75 -0
- package/src/graph/algorithms/shortest-path.ts +59 -0
- package/src/graph/algorithms/tarjan.ts +55 -0
- package/src/graph/builders/dependency.ts +148 -0
- package/src/graph/builders/index.ts +3 -0
- package/src/graph/builders/structure.ts +58 -0
- package/src/graph/builders/temporal.ts +51 -0
- package/src/graph/classifiers/index.ts +2 -0
- package/src/graph/classifiers/risk.ts +123 -0
- package/src/graph/classifiers/roles.ts +226 -0
- package/src/graph/index.ts +13 -0
- package/src/graph/model.ts +238 -0
- package/src/index.cjs +16 -0
- package/src/index.ts +72 -0
- package/src/infrastructure/config.ts +954 -0
- package/src/infrastructure/logger.ts +24 -0
- package/src/infrastructure/native.ts +199 -0
- package/src/infrastructure/registry.ts +313 -0
- package/src/infrastructure/result-formatter.ts +2 -0
- package/src/infrastructure/suppress.ts +47 -0
- package/src/infrastructure/test-filter.ts +7 -0
- package/src/infrastructure/update-check.ts +196 -0
- package/src/mcp/index.ts +2 -0
- package/src/mcp/middleware.ts +38 -0
- package/src/mcp/server.ts +259 -0
- package/src/mcp/tool-registry.ts +890 -0
- package/src/mcp/tools/ast-query.ts +25 -0
- package/src/mcp/tools/audit.ts +33 -0
- package/src/mcp/tools/batch-query.ts +22 -0
- package/src/mcp/tools/branch-compare.ts +22 -0
- package/src/mcp/tools/brief.ts +15 -0
- package/src/mcp/tools/cfg.ts +32 -0
- package/src/mcp/tools/check.ts +60 -0
- package/src/mcp/tools/co-changes.ts +29 -0
- package/src/mcp/tools/code-owners.ts +22 -0
- package/src/mcp/tools/communities.ts +25 -0
- package/src/mcp/tools/complexity.ts +30 -0
- package/src/mcp/tools/context.ts +30 -0
- package/src/mcp/tools/dataflow.ts +38 -0
- package/src/mcp/tools/diff-impact.ts +35 -0
- package/src/mcp/tools/execution-flow.ts +38 -0
- package/src/mcp/tools/export-graph.ts +67 -0
- package/src/mcp/tools/file-deps.ts +20 -0
- package/src/mcp/tools/file-exports.ts +22 -0
- package/src/mcp/tools/find-cycles.ts +19 -0
- package/src/mcp/tools/fn-impact.ts +26 -0
- package/src/mcp/tools/impact-analysis.ts +15 -0
- package/src/mcp/tools/implementations.ts +24 -0
- package/src/mcp/tools/index.ts +81 -0
- package/src/mcp/tools/interfaces.ts +24 -0
- package/src/mcp/tools/list-functions.ts +23 -0
- package/src/mcp/tools/list-repos.ts +17 -0
- package/src/mcp/tools/module-map.ts +13 -0
- package/src/mcp/tools/node-roles.ts +23 -0
- package/src/mcp/tools/path.ts +34 -0
- package/src/mcp/tools/query.ts +47 -0
- package/src/mcp/tools/semantic-search.ts +76 -0
- package/src/mcp/tools/sequence.ts +30 -0
- package/src/mcp/tools/structure.ts +25 -0
- package/src/mcp/tools/symbol-children.ts +24 -0
- package/src/mcp/tools/triage.ts +50 -0
- package/src/mcp/tools/where.ts +22 -0
- package/src/mcp/types.ts +21 -0
- package/src/presentation/audit.ts +109 -0
- package/src/presentation/batch.ts +50 -0
- package/src/presentation/branch-compare.ts +148 -0
- package/src/presentation/brief.ts +63 -0
- package/src/presentation/cfg.ts +103 -0
- package/src/presentation/check.ts +138 -0
- package/src/presentation/cochange.ts +57 -0
- package/src/presentation/colors.ts +51 -0
- package/src/presentation/communities.ts +114 -0
- package/src/presentation/complexity.ts +127 -0
- package/src/presentation/dataflow.ts +179 -0
- package/src/presentation/diff-impact-mermaid.ts +169 -0
- package/src/presentation/export.ts +509 -0
- package/src/presentation/flow.ts +147 -0
- package/src/presentation/manifesto.ts +92 -0
- package/src/presentation/owners.ts +89 -0
- package/src/presentation/queries-cli/exports.ts +152 -0
- package/src/presentation/queries-cli/impact.ts +340 -0
- package/src/presentation/queries-cli/index.ts +13 -0
- package/src/presentation/queries-cli/inspect.ts +594 -0
- package/src/presentation/queries-cli/overview.ts +375 -0
- package/src/presentation/queries-cli/path.ts +187 -0
- package/src/presentation/queries-cli.ts +30 -0
- package/src/presentation/query.ts +17 -0
- package/src/presentation/result-formatter.ts +161 -0
- package/src/presentation/sequence-renderer.ts +46 -0
- package/src/presentation/sequence.ts +43 -0
- package/src/presentation/structure.ts +109 -0
- package/src/presentation/table.ts +45 -0
- package/src/presentation/triage.ts +84 -0
- package/src/presentation/viewer.ts +715 -0
- package/src/shared/constants.ts +70 -0
- package/src/shared/errors.ts +85 -0
- package/src/shared/file-utils.ts +233 -0
- package/src/shared/generators.ts +176 -0
- package/src/shared/globs.ts +121 -0
- package/src/shared/hierarchy.ts +81 -0
- package/src/shared/kinds.ts +85 -0
- package/src/shared/normalize.ts +106 -0
- package/src/shared/paginate.ts +93 -0
- package/src/shared/version.ts +10 -0
- package/src/types.ts +2871 -0
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { debug } from '../../infrastructure/logger.js';
|
|
4
|
+
import { loadNative } from '../../infrastructure/native.js';
|
|
5
|
+
import { normalizePath } from '../../shared/constants.js';
|
|
6
|
+
import { toErrorMessage } from '../../shared/errors.js';
|
|
7
|
+
import type { BareSpecifier, BatchResolvedMap, ImportBatchItem, PathAliases } from '../../types.js';
|
|
8
|
+
|
|
9
|
+
// ── package.json exports resolution ─────────────────────────────────
|
|
10
|
+
|
|
11
|
+
/** Cache: packageDir → parsed exports field (or null) */
|
|
12
|
+
const _exportsCache: Map<string, any> = new Map();
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Parse a bare specifier into { packageName, subpath }.
|
|
16
|
+
* Scoped: "@scope/pkg/sub" → { packageName: "@scope/pkg", subpath: "./sub" }
|
|
17
|
+
* Plain: "pkg/sub" → { packageName: "pkg", subpath: "./sub" }
|
|
18
|
+
* No sub: "pkg" → { packageName: "pkg", subpath: "." }
|
|
19
|
+
*/
|
|
20
|
+
export function parseBareSpecifier(specifier: string): BareSpecifier | null {
|
|
21
|
+
let packageName: string, rest: string;
|
|
22
|
+
if (specifier.startsWith('@')) {
|
|
23
|
+
const parts = specifier.split('/');
|
|
24
|
+
if (parts.length < 2) return null;
|
|
25
|
+
packageName = `${parts[0]}/${parts[1]}`;
|
|
26
|
+
rest = parts.slice(2).join('/');
|
|
27
|
+
} else {
|
|
28
|
+
const slashIdx = specifier.indexOf('/');
|
|
29
|
+
if (slashIdx === -1) {
|
|
30
|
+
packageName = specifier;
|
|
31
|
+
rest = '';
|
|
32
|
+
} else {
|
|
33
|
+
packageName = specifier.slice(0, slashIdx);
|
|
34
|
+
rest = specifier.slice(slashIdx + 1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return { packageName, subpath: rest ? `./${rest}` : '.' };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Find the package directory for a given package name, starting from rootDir.
|
|
42
|
+
* Walks up node_modules directories.
|
|
43
|
+
*/
|
|
44
|
+
function findPackageDir(packageName: string, rootDir: string): string | null {
|
|
45
|
+
let dir = rootDir;
|
|
46
|
+
while (true) {
|
|
47
|
+
const candidate = path.join(dir, 'node_modules', packageName);
|
|
48
|
+
if (fs.existsSync(path.join(candidate, 'package.json'))) return candidate;
|
|
49
|
+
const parent = path.dirname(dir);
|
|
50
|
+
if (parent === dir) return null;
|
|
51
|
+
dir = parent;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Read and cache the exports field from a package's package.json.
|
|
57
|
+
* Returns the exports value or null.
|
|
58
|
+
*/
|
|
59
|
+
function getPackageExports(packageDir: string): any {
|
|
60
|
+
if (_exportsCache.has(packageDir)) return _exportsCache.get(packageDir);
|
|
61
|
+
try {
|
|
62
|
+
const raw = fs.readFileSync(path.join(packageDir, 'package.json'), 'utf8');
|
|
63
|
+
const pkg = JSON.parse(raw);
|
|
64
|
+
const exports = pkg.exports ?? null;
|
|
65
|
+
_exportsCache.set(packageDir, exports);
|
|
66
|
+
return exports;
|
|
67
|
+
} catch (e) {
|
|
68
|
+
debug(`readPackageExports: failed to read package.json in ${packageDir}: ${toErrorMessage(e)}`);
|
|
69
|
+
_exportsCache.set(packageDir, null);
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Condition names to try, in priority order. */
|
|
75
|
+
const CONDITION_ORDER: readonly string[] = ['import', 'require', 'default'];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Resolve a conditional exports value (string, object with conditions, or array).
|
|
79
|
+
* Returns a string target or null.
|
|
80
|
+
*/
|
|
81
|
+
function resolveCondition(value: unknown): string | null {
|
|
82
|
+
if (typeof value === 'string') return value;
|
|
83
|
+
if (Array.isArray(value)) {
|
|
84
|
+
for (const item of value) {
|
|
85
|
+
const r = resolveCondition(item);
|
|
86
|
+
if (r) return r;
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
if (value && typeof value === 'object') {
|
|
91
|
+
for (const cond of CONDITION_ORDER) {
|
|
92
|
+
if (cond in (value as Record<string, unknown>))
|
|
93
|
+
return resolveCondition((value as Record<string, unknown>)[cond]);
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Match a subpath against an exports map key that uses a wildcard pattern.
|
|
102
|
+
* Key: "./lib/*" matches subpath "./lib/foo/bar" → substitution "foo/bar"
|
|
103
|
+
*/
|
|
104
|
+
function matchSubpathPattern(pattern: string, subpath: string): string | null {
|
|
105
|
+
const starIdx = pattern.indexOf('*');
|
|
106
|
+
if (starIdx === -1) return null;
|
|
107
|
+
const prefix = pattern.slice(0, starIdx);
|
|
108
|
+
const suffix = pattern.slice(starIdx + 1);
|
|
109
|
+
if (!subpath.startsWith(prefix)) return null;
|
|
110
|
+
if (suffix && !subpath.endsWith(suffix)) return null;
|
|
111
|
+
const matched = subpath.slice(prefix.length, suffix ? -suffix.length || undefined : undefined);
|
|
112
|
+
if (!suffix && subpath.length <= prefix.length) return null;
|
|
113
|
+
return matched;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Resolve a bare specifier through the package.json exports field.
|
|
118
|
+
* Returns an absolute path or null.
|
|
119
|
+
*/
|
|
120
|
+
/** Try to resolve a condition target to a file path in packageDir. */
|
|
121
|
+
function tryResolveTarget(target: string | null, packageDir: string): string | null {
|
|
122
|
+
if (!target) return null;
|
|
123
|
+
const resolved = path.resolve(packageDir, target);
|
|
124
|
+
return fs.existsSync(resolved) ? resolved : null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Resolve subpath against a subpath map (object with "." keys). */
|
|
128
|
+
function resolveSubpathMap(
|
|
129
|
+
exports: Record<string, unknown>,
|
|
130
|
+
subpath: string,
|
|
131
|
+
packageDir: string,
|
|
132
|
+
): string | null {
|
|
133
|
+
// Exact match first
|
|
134
|
+
if (subpath in exports) {
|
|
135
|
+
return tryResolveTarget(resolveCondition(exports[subpath]), packageDir);
|
|
136
|
+
}
|
|
137
|
+
// Pattern matching (keys with *)
|
|
138
|
+
for (const [pattern, value] of Object.entries(exports)) {
|
|
139
|
+
if (!pattern.includes('*')) continue;
|
|
140
|
+
const matched = matchSubpathPattern(pattern, subpath);
|
|
141
|
+
if (matched == null) continue;
|
|
142
|
+
const rawTarget = resolveCondition(value);
|
|
143
|
+
if (!rawTarget) continue;
|
|
144
|
+
return tryResolveTarget(rawTarget.replace(/\*/g, matched), packageDir);
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function resolveViaExports(specifier: string, rootDir: string): string | null {
|
|
150
|
+
const parsed = parseBareSpecifier(specifier);
|
|
151
|
+
if (!parsed) return null;
|
|
152
|
+
|
|
153
|
+
const packageDir = findPackageDir(parsed.packageName, rootDir);
|
|
154
|
+
if (!packageDir) return null;
|
|
155
|
+
|
|
156
|
+
const exports = getPackageExports(packageDir);
|
|
157
|
+
if (exports == null) return null;
|
|
158
|
+
|
|
159
|
+
const { subpath } = parsed;
|
|
160
|
+
|
|
161
|
+
// Simple string exports: "exports": "./index.js"
|
|
162
|
+
if (typeof exports === 'string') {
|
|
163
|
+
return subpath === '.' ? tryResolveTarget(exports, packageDir) : null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Array form at top level
|
|
167
|
+
if (Array.isArray(exports)) {
|
|
168
|
+
return subpath === '.' ? tryResolveTarget(resolveCondition(exports), packageDir) : null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (typeof exports !== 'object') return null;
|
|
172
|
+
|
|
173
|
+
// Determine if exports is a conditions object or a subpath map
|
|
174
|
+
const keys = Object.keys(exports);
|
|
175
|
+
const isSubpathMap = keys.length > 0 && keys.some((k) => k.startsWith('.'));
|
|
176
|
+
|
|
177
|
+
if (!isSubpathMap) {
|
|
178
|
+
return subpath === '.' ? tryResolveTarget(resolveCondition(exports), packageDir) : null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return resolveSubpathMap(exports as Record<string, unknown>, subpath, packageDir);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Clear the exports cache (for testing). */
|
|
185
|
+
export function clearExportsCache(): void {
|
|
186
|
+
_exportsCache.clear();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ── Monorepo workspace resolution ───────────────────────────────────
|
|
190
|
+
|
|
191
|
+
/** Cache: rootDir → Map<packageName, { dir, entry }> */
|
|
192
|
+
const _workspaceCache: Map<string, Map<string, { dir: string; entry: string | null }>> = new Map();
|
|
193
|
+
|
|
194
|
+
/** Set of resolved relative paths that came from workspace resolution. */
|
|
195
|
+
const _workspaceResolvedPaths: Set<string> = new Set();
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Set the workspace map for a given rootDir.
|
|
199
|
+
* Called by the build pipeline after detecting workspaces.
|
|
200
|
+
*/
|
|
201
|
+
export function setWorkspaces(
|
|
202
|
+
rootDir: string,
|
|
203
|
+
map: Map<string, { dir: string; entry: string | null }>,
|
|
204
|
+
): void {
|
|
205
|
+
_workspaceCache.set(rootDir, map);
|
|
206
|
+
_workspaceResolvedPaths.clear();
|
|
207
|
+
_exportsCache.clear();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get workspace packages for a rootDir. Returns empty map if not set.
|
|
212
|
+
*/
|
|
213
|
+
function getWorkspaces(rootDir: string): Map<string, { dir: string; entry: string | null }> {
|
|
214
|
+
return _workspaceCache.get(rootDir) || new Map();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Resolve a bare specifier through monorepo workspace packages.
|
|
219
|
+
*
|
|
220
|
+
* For "@myorg/utils" → finds the workspace package dir → resolves entry point.
|
|
221
|
+
* For "@myorg/utils/sub" → finds package dir → tries exports field → filesystem probe.
|
|
222
|
+
*
|
|
223
|
+
* @returns Absolute path to resolved file, or null.
|
|
224
|
+
*/
|
|
225
|
+
export function resolveViaWorkspace(specifier: string, rootDir: string): string | null {
|
|
226
|
+
const parsed = parseBareSpecifier(specifier);
|
|
227
|
+
if (!parsed) return null;
|
|
228
|
+
|
|
229
|
+
const workspaces = getWorkspaces(rootDir);
|
|
230
|
+
if (workspaces.size === 0) return null;
|
|
231
|
+
|
|
232
|
+
const info = workspaces.get(parsed.packageName);
|
|
233
|
+
if (!info) return null;
|
|
234
|
+
|
|
235
|
+
// Root import ("@myorg/utils") — use the entry point
|
|
236
|
+
if (parsed.subpath === '.') {
|
|
237
|
+
// Try exports field first (reuses existing exports logic)
|
|
238
|
+
const exportsResult = resolveViaExports(specifier, rootDir);
|
|
239
|
+
if (exportsResult) return exportsResult;
|
|
240
|
+
// Fall back to workspace entry
|
|
241
|
+
return info.entry;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Subpath import ("@myorg/utils/helpers") — try exports, then filesystem probe
|
|
245
|
+
const exportsResult = resolveViaExports(specifier, rootDir);
|
|
246
|
+
if (exportsResult) return exportsResult;
|
|
247
|
+
|
|
248
|
+
// Filesystem probe within the package directory
|
|
249
|
+
const subRel = parsed.subpath.slice(2); // strip "./"
|
|
250
|
+
const base = path.resolve(info.dir, subRel);
|
|
251
|
+
for (const ext of [
|
|
252
|
+
'',
|
|
253
|
+
'.ts',
|
|
254
|
+
'.tsx',
|
|
255
|
+
'.js',
|
|
256
|
+
'.jsx',
|
|
257
|
+
'.mjs',
|
|
258
|
+
'/index.ts',
|
|
259
|
+
'/index.tsx',
|
|
260
|
+
'/index.js',
|
|
261
|
+
]) {
|
|
262
|
+
const candidate = base + ext;
|
|
263
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Try src/ subdirectory (common monorepo convention)
|
|
267
|
+
const srcBase = path.resolve(info.dir, 'src', subRel);
|
|
268
|
+
for (const ext of [
|
|
269
|
+
'',
|
|
270
|
+
'.ts',
|
|
271
|
+
'.tsx',
|
|
272
|
+
'.js',
|
|
273
|
+
'.jsx',
|
|
274
|
+
'.mjs',
|
|
275
|
+
'/index.ts',
|
|
276
|
+
'/index.tsx',
|
|
277
|
+
'/index.js',
|
|
278
|
+
]) {
|
|
279
|
+
const candidate = srcBase + ext;
|
|
280
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Check if a resolved relative path was resolved via workspace detection.
|
|
288
|
+
* Used by computeConfidence to assign high confidence (0.95) to workspace imports.
|
|
289
|
+
*/
|
|
290
|
+
export function isWorkspaceResolved(resolvedPath: string): boolean {
|
|
291
|
+
return _workspaceResolvedPaths.has(resolvedPath);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** Clear workspace caches (for testing). */
|
|
295
|
+
export function clearWorkspaceCache(): void {
|
|
296
|
+
_workspaceCache.clear();
|
|
297
|
+
_workspaceResolvedPaths.clear();
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// ── JS → TS extension remap cache ───────────────────────────────────
|
|
301
|
+
|
|
302
|
+
/** Cache: absolute .js path → remapped .ts/.tsx relative path (or null if no TS file exists). */
|
|
303
|
+
const _jsToTsCache: Map<string, string | null> = new Map();
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* If `resolved` ends with `.js`, check whether a `.ts` or `.tsx` counterpart
|
|
307
|
+
* exists on disk and return its relative path from `rootDir`. Results are
|
|
308
|
+
* cached for the lifetime of the process to avoid repeated stat calls in the
|
|
309
|
+
* batch hot path.
|
|
310
|
+
*
|
|
311
|
+
* The cache stores **absolute** `.ts`/`.tsx` paths (or `null`) so that the
|
|
312
|
+
* same cached entry is correct regardless of which `rootDir` is passed — the
|
|
313
|
+
* relative path is computed on every cache hit. This is important for MCP
|
|
314
|
+
* `--multi-repo` mode where the same absolute `.js` file may be resolved with
|
|
315
|
+
* different `rootDir` values.
|
|
316
|
+
*
|
|
317
|
+
* Always returns a normalised relative path from `rootDir` — both the remap
|
|
318
|
+
* branch and the fallback compute `path.relative(rootDir, abs)` to ensure a
|
|
319
|
+
* consistent format regardless of whether the native resolver returned an
|
|
320
|
+
* absolute or relative path.
|
|
321
|
+
*/
|
|
322
|
+
function remapJsToTs(resolved: string, rootDir: string): string {
|
|
323
|
+
if (!resolved.endsWith('.js')) return resolved;
|
|
324
|
+
const abs = path.resolve(rootDir, resolved);
|
|
325
|
+
if (_jsToTsCache.has(abs)) {
|
|
326
|
+
const cachedAbs = _jsToTsCache.get(abs);
|
|
327
|
+
return cachedAbs
|
|
328
|
+
? normalizePath(path.relative(rootDir, cachedAbs))
|
|
329
|
+
: normalizePath(path.relative(rootDir, abs));
|
|
330
|
+
}
|
|
331
|
+
const tsAbs = abs.replace(/\.js$/, '.ts');
|
|
332
|
+
if (fs.existsSync(tsAbs)) {
|
|
333
|
+
_jsToTsCache.set(abs, tsAbs);
|
|
334
|
+
return normalizePath(path.relative(rootDir, tsAbs));
|
|
335
|
+
}
|
|
336
|
+
const tsxAbs = abs.replace(/\.js$/, '.tsx');
|
|
337
|
+
if (fs.existsSync(tsxAbs)) {
|
|
338
|
+
_jsToTsCache.set(abs, tsxAbs);
|
|
339
|
+
return normalizePath(path.relative(rootDir, tsxAbs));
|
|
340
|
+
}
|
|
341
|
+
_jsToTsCache.set(abs, null);
|
|
342
|
+
// Normalise fallback to relative to stay consistent with the remap branch —
|
|
343
|
+
// avoids a format mismatch if the native resolver ever returns an absolute path.
|
|
344
|
+
return normalizePath(path.relative(rootDir, abs));
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** Clear the .js → .ts remap cache (for testing). */
|
|
348
|
+
export function clearJsToTsCache(): void {
|
|
349
|
+
_jsToTsCache.clear();
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// ── Alias format conversion ─────────────────────────────────────────
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Convert JS alias format { baseUrl, paths: { pattern: [targets] } }
|
|
356
|
+
* to native format { baseUrl, paths: [{ pattern, targets }] }.
|
|
357
|
+
*/
|
|
358
|
+
export function convertAliasesForNative(
|
|
359
|
+
aliases: PathAliases | null | undefined,
|
|
360
|
+
): { baseUrl: string; paths: { pattern: string; targets: string[] }[] } | null {
|
|
361
|
+
if (!aliases) return null;
|
|
362
|
+
return {
|
|
363
|
+
baseUrl: aliases.baseUrl || '',
|
|
364
|
+
paths: Object.entries(aliases.paths || {}).map(([pattern, targets]) => ({
|
|
365
|
+
pattern,
|
|
366
|
+
targets,
|
|
367
|
+
})),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// ── JS fallback implementations ─────────────────────────────────────
|
|
372
|
+
|
|
373
|
+
function resolveViaAlias(
|
|
374
|
+
importSource: string,
|
|
375
|
+
aliases: PathAliases,
|
|
376
|
+
_rootDir: string,
|
|
377
|
+
): string | null {
|
|
378
|
+
if (aliases.baseUrl && !importSource.startsWith('.') && !importSource.startsWith('/')) {
|
|
379
|
+
const candidate = path.resolve(aliases.baseUrl, importSource);
|
|
380
|
+
for (const ext of ['', '.ts', '.tsx', '.js', '.jsx', '/index.ts', '/index.tsx', '/index.js']) {
|
|
381
|
+
const full = candidate + ext;
|
|
382
|
+
if (fs.existsSync(full)) return full;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
for (const [pattern, targets] of Object.entries(aliases.paths || {})) {
|
|
387
|
+
const prefix = pattern.replace(/\*$/, '');
|
|
388
|
+
if (!importSource.startsWith(prefix)) continue;
|
|
389
|
+
const rest = importSource.slice(prefix.length);
|
|
390
|
+
for (const target of targets) {
|
|
391
|
+
const resolved = target.replace(/\*$/, rest);
|
|
392
|
+
for (const ext of [
|
|
393
|
+
'',
|
|
394
|
+
'.ts',
|
|
395
|
+
'.tsx',
|
|
396
|
+
'.js',
|
|
397
|
+
'.jsx',
|
|
398
|
+
'/index.ts',
|
|
399
|
+
'/index.tsx',
|
|
400
|
+
'/index.js',
|
|
401
|
+
]) {
|
|
402
|
+
const full = resolved + ext;
|
|
403
|
+
if (fs.existsSync(full)) return full;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return null;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function resolveImportPathJS(
|
|
411
|
+
fromFile: string,
|
|
412
|
+
importSource: string,
|
|
413
|
+
rootDir: string,
|
|
414
|
+
aliases: PathAliases | null,
|
|
415
|
+
): string {
|
|
416
|
+
if (!importSource.startsWith('.') && aliases) {
|
|
417
|
+
const aliasResolved = resolveViaAlias(importSource, aliases, rootDir);
|
|
418
|
+
if (aliasResolved) return normalizePath(path.relative(rootDir, aliasResolved));
|
|
419
|
+
}
|
|
420
|
+
if (!importSource.startsWith('.')) {
|
|
421
|
+
// Workspace packages take priority over node_modules
|
|
422
|
+
const wsResolved = resolveViaWorkspace(importSource, rootDir);
|
|
423
|
+
if (wsResolved) {
|
|
424
|
+
const rel = normalizePath(path.relative(rootDir, wsResolved));
|
|
425
|
+
_workspaceResolvedPaths.add(rel);
|
|
426
|
+
return rel;
|
|
427
|
+
}
|
|
428
|
+
const exportsResolved = resolveViaExports(importSource, rootDir);
|
|
429
|
+
if (exportsResolved) return normalizePath(path.relative(rootDir, exportsResolved));
|
|
430
|
+
return importSource;
|
|
431
|
+
}
|
|
432
|
+
const dir = path.dirname(fromFile);
|
|
433
|
+
const resolved = path.resolve(dir, importSource);
|
|
434
|
+
|
|
435
|
+
if (resolved.endsWith('.js')) {
|
|
436
|
+
const tsCandidate = resolved.replace(/\.js$/, '.ts');
|
|
437
|
+
if (fs.existsSync(tsCandidate)) return normalizePath(path.relative(rootDir, tsCandidate));
|
|
438
|
+
const tsxCandidate = resolved.replace(/\.js$/, '.tsx');
|
|
439
|
+
if (fs.existsSync(tsxCandidate)) return normalizePath(path.relative(rootDir, tsxCandidate));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
for (const ext of [
|
|
443
|
+
'.ts',
|
|
444
|
+
'.tsx',
|
|
445
|
+
'.js',
|
|
446
|
+
'.jsx',
|
|
447
|
+
'.mjs',
|
|
448
|
+
'.py',
|
|
449
|
+
'.pyi',
|
|
450
|
+
'/index.ts',
|
|
451
|
+
'/index.tsx',
|
|
452
|
+
'/index.js',
|
|
453
|
+
'/__init__.py',
|
|
454
|
+
]) {
|
|
455
|
+
const candidate = resolved + ext;
|
|
456
|
+
if (fs.existsSync(candidate)) {
|
|
457
|
+
return normalizePath(path.relative(rootDir, candidate));
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
if (fs.existsSync(resolved)) return normalizePath(path.relative(rootDir, resolved));
|
|
461
|
+
return normalizePath(path.relative(rootDir, resolved));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function computeConfidenceJS(
|
|
465
|
+
callerFile: string,
|
|
466
|
+
targetFile: string,
|
|
467
|
+
importedFrom: string | null,
|
|
468
|
+
): number {
|
|
469
|
+
if (!targetFile || !callerFile) return 0.3;
|
|
470
|
+
if (callerFile === targetFile) return 1.0;
|
|
471
|
+
if (importedFrom === targetFile) return 1.0;
|
|
472
|
+
// Workspace-resolved imports get high confidence even across package boundaries
|
|
473
|
+
if (importedFrom && _workspaceResolvedPaths.has(importedFrom)) return 0.95;
|
|
474
|
+
if (path.dirname(callerFile) === path.dirname(targetFile)) return 0.7;
|
|
475
|
+
const callerParent = path.dirname(path.dirname(callerFile));
|
|
476
|
+
const targetParent = path.dirname(path.dirname(targetFile));
|
|
477
|
+
if (callerParent === targetParent) return 0.5;
|
|
478
|
+
return 0.3;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// ── Public API with native dispatch ─────────────────────────────────
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Resolve a single import path.
|
|
485
|
+
* Tries native, falls back to JS.
|
|
486
|
+
*/
|
|
487
|
+
export function resolveImportPath(
|
|
488
|
+
fromFile: string,
|
|
489
|
+
importSource: string,
|
|
490
|
+
rootDir: string,
|
|
491
|
+
aliases: PathAliases | null,
|
|
492
|
+
): string {
|
|
493
|
+
const native = loadNative();
|
|
494
|
+
if (native) {
|
|
495
|
+
try {
|
|
496
|
+
const result = native.resolveImport(
|
|
497
|
+
fromFile,
|
|
498
|
+
importSource,
|
|
499
|
+
rootDir,
|
|
500
|
+
convertAliasesForNative(aliases),
|
|
501
|
+
);
|
|
502
|
+
const normalized = normalizePath(path.normalize(result));
|
|
503
|
+
// The native resolver's .js → .ts remap fails when paths contain
|
|
504
|
+
// unresolved ".." components (PathBuf::components().collect() doesn't
|
|
505
|
+
// collapse parent refs). Apply the remap on the JS side as a fallback.
|
|
506
|
+
return remapJsToTs(normalized, rootDir);
|
|
507
|
+
} catch (e) {
|
|
508
|
+
debug(
|
|
509
|
+
`resolveImportPath: native resolution failed, falling back to JS: ${toErrorMessage(e)}`,
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return resolveImportPathJS(fromFile, importSource, rootDir, aliases);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Compute proximity-based confidence for call resolution.
|
|
518
|
+
* Tries native, falls back to JS.
|
|
519
|
+
*/
|
|
520
|
+
export function computeConfidence(
|
|
521
|
+
callerFile: string,
|
|
522
|
+
targetFile: string,
|
|
523
|
+
importedFrom: string | null,
|
|
524
|
+
): number {
|
|
525
|
+
const native = loadNative();
|
|
526
|
+
if (native) {
|
|
527
|
+
try {
|
|
528
|
+
return native.computeConfidence(callerFile, targetFile, importedFrom || null);
|
|
529
|
+
} catch (e) {
|
|
530
|
+
debug(
|
|
531
|
+
`computeConfidence: native computation failed, falling back to JS: ${toErrorMessage(e)}`,
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return computeConfidenceJS(callerFile, targetFile, importedFrom);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Batch resolve multiple imports in a single native call.
|
|
540
|
+
* Returns Map<"fromFile|importSource", resolvedPath> or null when native unavailable.
|
|
541
|
+
*/
|
|
542
|
+
export function resolveImportsBatch(
|
|
543
|
+
inputs: ImportBatchItem[],
|
|
544
|
+
rootDir: string,
|
|
545
|
+
aliases: PathAliases | null,
|
|
546
|
+
knownFiles?: string[] | null,
|
|
547
|
+
): BatchResolvedMap | null {
|
|
548
|
+
const native = loadNative();
|
|
549
|
+
if (!native) return null;
|
|
550
|
+
|
|
551
|
+
try {
|
|
552
|
+
const nativeInputs = inputs.map(({ fromFile, importSource }) => ({
|
|
553
|
+
fromFile,
|
|
554
|
+
importSource,
|
|
555
|
+
}));
|
|
556
|
+
const results = native.resolveImports(
|
|
557
|
+
nativeInputs,
|
|
558
|
+
rootDir,
|
|
559
|
+
convertAliasesForNative(aliases),
|
|
560
|
+
knownFiles || null,
|
|
561
|
+
);
|
|
562
|
+
const map: BatchResolvedMap = new Map();
|
|
563
|
+
for (const r of results) {
|
|
564
|
+
const normalized = normalizePath(path.normalize(r.resolvedPath));
|
|
565
|
+
// Native resolver's .js → .ts remap fails on unnormalized paths —
|
|
566
|
+
// apply JS-side fallback (same fix as resolveImportPath).
|
|
567
|
+
const resolved = remapJsToTs(normalized, rootDir);
|
|
568
|
+
map.set(`${normalizePath(r.fromFile)}|${r.importSource}`, resolved);
|
|
569
|
+
}
|
|
570
|
+
return map;
|
|
571
|
+
} catch (e) {
|
|
572
|
+
debug(`batchResolve: native batch resolution failed: ${toErrorMessage(e)}`);
|
|
573
|
+
return null;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// ── Exported for testing ────────────────────────────────────────────
|
|
578
|
+
|
|
579
|
+
export { computeConfidenceJS, resolveImportPathJS };
|