@optave/codegraph 3.2.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -54
- package/dist/ast-analysis/engine.d.ts +17 -0
- package/dist/ast-analysis/engine.d.ts.map +1 -0
- package/dist/ast-analysis/engine.js +328 -0
- package/dist/ast-analysis/engine.js.map +1 -0
- package/dist/ast-analysis/metrics.d.ts +51 -0
- package/dist/ast-analysis/metrics.d.ts.map +1 -0
- package/dist/ast-analysis/metrics.js +106 -0
- package/dist/ast-analysis/metrics.js.map +1 -0
- package/dist/ast-analysis/rules/csharp.d.ts +24 -0
- package/dist/ast-analysis/rules/csharp.d.ts.map +1 -0
- package/dist/ast-analysis/rules/csharp.js +192 -0
- package/dist/ast-analysis/rules/csharp.js.map +1 -0
- package/dist/ast-analysis/rules/go.d.ts +24 -0
- package/dist/ast-analysis/rules/go.d.ts.map +1 -0
- package/dist/ast-analysis/rules/go.js +173 -0
- package/dist/ast-analysis/rules/go.js.map +1 -0
- package/dist/ast-analysis/rules/index.d.ts +31 -0
- package/dist/ast-analysis/rules/index.d.ts.map +1 -0
- package/dist/ast-analysis/rules/index.js +72 -0
- package/dist/ast-analysis/rules/index.js.map +1 -0
- package/dist/ast-analysis/rules/java.d.ts +24 -0
- package/dist/ast-analysis/rules/java.d.ts.map +1 -0
- package/dist/ast-analysis/rules/java.js +166 -0
- package/dist/ast-analysis/rules/java.js.map +1 -0
- package/dist/ast-analysis/rules/javascript.d.ts +31 -0
- package/dist/ast-analysis/rules/javascript.d.ts.map +1 -0
- package/dist/ast-analysis/rules/javascript.js +235 -0
- package/dist/ast-analysis/rules/javascript.js.map +1 -0
- package/dist/ast-analysis/rules/php.d.ts +24 -0
- package/dist/ast-analysis/rules/php.d.ts.map +1 -0
- package/dist/ast-analysis/rules/php.js +210 -0
- package/dist/ast-analysis/rules/php.js.map +1 -0
- package/dist/ast-analysis/rules/python.d.ts +24 -0
- package/dist/ast-analysis/rules/python.d.ts.map +1 -0
- package/dist/ast-analysis/rules/python.js +188 -0
- package/dist/ast-analysis/rules/python.js.map +1 -0
- package/dist/ast-analysis/rules/ruby.d.ts +24 -0
- package/dist/ast-analysis/rules/ruby.d.ts.map +1 -0
- package/dist/ast-analysis/rules/ruby.js +193 -0
- package/dist/ast-analysis/rules/ruby.js.map +1 -0
- package/dist/ast-analysis/rules/rust.d.ts +24 -0
- package/dist/ast-analysis/rules/rust.d.ts.map +1 -0
- package/dist/ast-analysis/rules/rust.js +165 -0
- package/dist/ast-analysis/rules/rust.js.map +1 -0
- package/dist/ast-analysis/shared.d.ts +106 -0
- package/dist/ast-analysis/shared.d.ts.map +1 -0
- package/dist/ast-analysis/shared.js +186 -0
- package/dist/ast-analysis/shared.js.map +1 -0
- package/dist/ast-analysis/visitor-utils.d.ts +41 -0
- package/dist/ast-analysis/visitor-utils.d.ts.map +1 -0
- package/dist/ast-analysis/visitor-utils.js +180 -0
- package/dist/ast-analysis/visitor-utils.js.map +1 -0
- package/dist/ast-analysis/visitor.d.ts +119 -0
- package/dist/ast-analysis/visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitor.js +146 -0
- package/dist/ast-analysis/visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts +11 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js +147 -0
- package/dist/ast-analysis/visitors/ast-store-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts +8 -0
- package/dist/ast-analysis/visitors/cfg-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js +660 -0
- package/dist/ast-analysis/visitors/cfg-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts +17 -0
- package/dist/ast-analysis/visitors/complexity-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js +216 -0
- package/dist/ast-analysis/visitors/complexity-visitor.js.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts +8 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.d.ts.map +1 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js +321 -0
- package/dist/ast-analysis/visitors/dataflow-visitor.js.map +1 -0
- package/dist/cli/commands/ast.d.ts +9 -0
- package/dist/cli/commands/ast.d.ts.map +1 -0
- package/dist/cli/commands/ast.js +23 -0
- package/dist/cli/commands/ast.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +9 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +46 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +9 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +70 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/branch-compare.d.ts +7 -0
- package/dist/cli/commands/branch-compare.d.ts.map +1 -0
- package/dist/cli/commands/branch-compare.js +22 -0
- package/dist/cli/commands/branch-compare.js.map +1 -0
- package/dist/cli/commands/brief.d.ts +7 -0
- package/dist/cli/commands/brief.d.ts.map +1 -0
- package/dist/cli/commands/brief.js +12 -0
- package/dist/cli/commands/brief.js.map +1 -0
- package/dist/cli/commands/build.d.ts +7 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +26 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/cfg.d.ts +10 -0
- package/dist/cli/commands/cfg.d.ts.map +1 -0
- package/dist/cli/commands/cfg.js +27 -0
- package/dist/cli/commands/cfg.js.map +1 -0
- package/dist/cli/commands/check.d.ts +8 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +65 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/children.d.ts +9 -0
- package/dist/cli/commands/children.d.ts.map +1 -0
- package/dist/cli/commands/children.js +33 -0
- package/dist/cli/commands/children.js.map +1 -0
- package/dist/cli/commands/co-change.d.ts +7 -0
- package/dist/cli/commands/co-change.d.ts.map +1 -0
- package/dist/cli/commands/co-change.js +62 -0
- package/dist/cli/commands/co-change.js.map +1 -0
- package/dist/cli/commands/communities.d.ts +8 -0
- package/dist/cli/commands/communities.d.ts.map +1 -0
- package/dist/cli/commands/communities.js +20 -0
- package/dist/cli/commands/communities.js.map +1 -0
- package/dist/cli/commands/complexity.d.ts +9 -0
- package/dist/cli/commands/complexity.d.ts.map +1 -0
- package/dist/cli/commands/complexity.js +47 -0
- package/dist/cli/commands/complexity.js.map +1 -0
- package/dist/cli/commands/context.d.ts +10 -0
- package/dist/cli/commands/context.d.ts.map +1 -0
- package/dist/cli/commands/context.js +35 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/cycles.d.ts +7 -0
- package/dist/cli/commands/cycles.d.ts.map +1 -0
- package/dist/cli/commands/cycles.js +33 -0
- package/dist/cli/commands/cycles.js.map +1 -0
- package/dist/cli/commands/dataflow.d.ts +10 -0
- package/dist/cli/commands/dataflow.d.ts.map +1 -0
- package/dist/cli/commands/dataflow.js +29 -0
- package/dist/cli/commands/dataflow.js.map +1 -0
- package/dist/cli/commands/deps.d.ts +8 -0
- package/dist/cli/commands/deps.d.ts.map +1 -0
- package/dist/cli/commands/deps.js +18 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/diff-impact.d.ts +7 -0
- package/dist/cli/commands/diff-impact.d.ts.map +1 -0
- package/dist/cli/commands/diff-impact.js +28 -0
- package/dist/cli/commands/diff-impact.js.map +1 -0
- package/dist/cli/commands/embed.d.ts +8 -0
- package/dist/cli/commands/embed.d.ts.map +1 -0
- package/dist/cli/commands/embed.js +29 -0
- package/dist/cli/commands/embed.js.map +1 -0
- package/dist/cli/commands/export.d.ts +7 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +72 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/exports.d.ts +8 -0
- package/dist/cli/commands/exports.d.ts.map +1 -0
- package/dist/cli/commands/exports.js +14 -0
- package/dist/cli/commands/exports.js.map +1 -0
- package/dist/cli/commands/flow.d.ts +10 -0
- package/dist/cli/commands/flow.d.ts.map +1 -0
- package/dist/cli/commands/flow.js +32 -0
- package/dist/cli/commands/flow.js.map +1 -0
- package/dist/cli/commands/fn-impact.d.ts +10 -0
- package/dist/cli/commands/fn-impact.d.ts.map +1 -0
- package/dist/cli/commands/fn-impact.js +33 -0
- package/dist/cli/commands/fn-impact.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +7 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +12 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/implementations.d.ts +10 -0
- package/dist/cli/commands/implementations.d.ts.map +1 -0
- package/dist/cli/commands/implementations.js +29 -0
- package/dist/cli/commands/implementations.js.map +1 -0
- package/dist/cli/commands/info.d.ts +6 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +66 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/interfaces.d.ts +10 -0
- package/dist/cli/commands/interfaces.d.ts.map +1 -0
- package/dist/cli/commands/interfaces.js +29 -0
- package/dist/cli/commands/interfaces.js.map +1 -0
- package/dist/cli/commands/map.d.ts +7 -0
- package/dist/cli/commands/map.d.ts.map +1 -0
- package/dist/cli/commands/map.js +19 -0
- package/dist/cli/commands/map.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +7 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +19 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/models.d.ts +6 -0
- package/dist/cli/commands/models.d.ts.map +1 -0
- package/dist/cli/commands/models.js +17 -0
- package/dist/cli/commands/models.js.map +1 -0
- package/dist/cli/commands/owners.d.ts +8 -0
- package/dist/cli/commands/owners.d.ts.map +1 -0
- package/dist/cli/commands/owners.js +27 -0
- package/dist/cli/commands/owners.js.map +1 -0
- package/dist/cli/commands/path.d.ts +8 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +36 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/plot.d.ts +7 -0
- package/dist/cli/commands/plot.d.ts.map +1 -0
- package/dist/cli/commands/plot.js +94 -0
- package/dist/cli/commands/plot.js.map +1 -0
- package/dist/cli/commands/query.d.ts +10 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +51 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/registry.d.ts +16 -0
- package/dist/cli/commands/registry.d.ts.map +1 -0
- package/dist/cli/commands/registry.js +95 -0
- package/dist/cli/commands/registry.js.map +1 -0
- package/dist/cli/commands/roles.d.ts +9 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +31 -0
- package/dist/cli/commands/roles.js.map +1 -0
- package/dist/cli/commands/search.d.ts +9 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +47 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/sequence.d.ts +10 -0
- package/dist/cli/commands/sequence.d.ts.map +1 -0
- package/dist/cli/commands/sequence.js +29 -0
- package/dist/cli/commands/sequence.js.map +1 -0
- package/dist/cli/commands/snapshot.d.ts +11 -0
- package/dist/cli/commands/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/snapshot.js +61 -0
- package/dist/cli/commands/snapshot.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +7 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +15 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/structure.d.ts +7 -0
- package/dist/cli/commands/structure.d.ts.map +1 -0
- package/dist/cli/commands/structure.js +33 -0
- package/dist/cli/commands/structure.js.map +1 -0
- package/dist/cli/commands/triage.d.ts +8 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +89 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +6 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +12 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/commands/where.d.ts +9 -0
- package/dist/cli/commands/where.d.ts.map +1 -0
- package/dist/cli/commands/where.js +20 -0
- package/dist/cli/commands/where.js.map +1 -0
- package/dist/cli/index.d.ts +31 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +109 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/shared/open-graph.d.ts +14 -0
- package/dist/cli/shared/open-graph.d.ts.map +1 -0
- package/dist/cli/shared/open-graph.js +13 -0
- package/dist/cli/shared/open-graph.js.map +1 -0
- package/dist/cli/shared/options.d.ts +31 -0
- package/dist/cli/shared/options.d.ts.map +1 -0
- package/dist/cli/shared/options.js +58 -0
- package/dist/cli/shared/options.js.map +1 -0
- package/dist/cli/shared/output.d.ts +2 -0
- package/dist/cli/shared/output.d.ts.map +1 -0
- package/dist/cli/shared/output.js +2 -0
- package/dist/cli/shared/output.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +15 -0
- package/dist/cli.js.map +1 -0
- package/dist/db/connection.d.ts +39 -0
- package/dist/db/connection.d.ts.map +1 -0
- package/dist/db/connection.js +217 -0
- package/dist/db/connection.js.map +1 -0
- package/dist/db/index.d.ts +5 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +6 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +8 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +323 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/query-builder.d.ts +106 -0
- package/dist/db/query-builder.d.ts.map +1 -0
- package/dist/db/query-builder.js +313 -0
- package/dist/db/query-builder.js.map +1 -0
- package/dist/db/repository/base.d.ts +115 -0
- package/dist/db/repository/base.d.ts.map +1 -0
- package/dist/db/repository/base.js +165 -0
- package/dist/db/repository/base.js.map +1 -0
- package/dist/db/repository/build-stmts.d.ts +25 -0
- package/dist/db/repository/build-stmts.d.ts.map +1 -0
- package/dist/db/repository/build-stmts.js +86 -0
- package/dist/db/repository/build-stmts.js.map +1 -0
- package/dist/db/repository/cached-stmt.d.ts +13 -0
- package/dist/db/repository/cached-stmt.d.ts.map +1 -0
- package/dist/db/repository/cached-stmt.js +20 -0
- package/dist/db/repository/cached-stmt.js.map +1 -0
- package/dist/db/repository/cfg.d.ts +27 -0
- package/dist/db/repository/cfg.d.ts.map +1 -0
- package/dist/db/repository/cfg.js +57 -0
- package/dist/db/repository/cfg.js.map +1 -0
- package/dist/db/repository/cochange.d.ts +20 -0
- package/dist/db/repository/cochange.d.ts.map +1 -0
- package/dist/db/repository/cochange.js +45 -0
- package/dist/db/repository/cochange.js.map +1 -0
- package/dist/db/repository/complexity.d.ts +15 -0
- package/dist/db/repository/complexity.d.ts.map +1 -0
- package/dist/db/repository/complexity.js +15 -0
- package/dist/db/repository/complexity.js.map +1 -0
- package/dist/db/repository/dataflow.d.ts +7 -0
- package/dist/db/repository/dataflow.d.ts.map +1 -0
- package/dist/db/repository/dataflow.js +17 -0
- package/dist/db/repository/dataflow.js.map +1 -0
- package/dist/db/repository/edges.d.ts +173 -0
- package/dist/db/repository/edges.d.ts.map +1 -0
- package/dist/db/repository/edges.js +231 -0
- package/dist/db/repository/edges.js.map +1 -0
- package/dist/db/repository/embeddings.d.ts +20 -0
- package/dist/db/repository/embeddings.d.ts.map +1 -0
- package/dist/db/repository/embeddings.js +47 -0
- package/dist/db/repository/embeddings.js.map +1 -0
- package/dist/db/repository/graph-read.d.ts +41 -0
- package/dist/db/repository/graph-read.d.ts.map +1 -0
- package/dist/db/repository/graph-read.js +41 -0
- package/dist/db/repository/graph-read.js.map +1 -0
- package/dist/db/repository/in-memory-repository.d.ts +156 -0
- package/dist/db/repository/in-memory-repository.d.ts.map +1 -0
- package/dist/db/repository/in-memory-repository.js +533 -0
- package/dist/db/repository/in-memory-repository.js.map +1 -0
- package/dist/db/repository/index.d.ts +14 -0
- package/dist/db/repository/index.d.ts.map +1 -0
- package/dist/db/repository/index.js +15 -0
- package/dist/db/repository/index.js.map +1 -0
- package/dist/db/repository/nodes.d.ts +151 -0
- package/dist/db/repository/nodes.d.ts.map +1 -0
- package/dist/db/repository/nodes.js +244 -0
- package/dist/db/repository/nodes.js.map +1 -0
- package/dist/db/repository/sqlite-repository.d.ts +100 -0
- package/dist/db/repository/sqlite-repository.d.ts.map +1 -0
- package/dist/db/repository/sqlite-repository.js +143 -0
- package/dist/db/repository/sqlite-repository.js.map +1 -0
- package/dist/domain/analysis/brief.d.ts +16 -0
- package/dist/domain/analysis/brief.d.ts.map +1 -0
- package/dist/domain/analysis/brief.js +147 -0
- package/dist/domain/analysis/brief.js.map +1 -0
- package/dist/domain/analysis/context.d.ts +3 -0
- package/dist/domain/analysis/context.d.ts.map +1 -0
- package/dist/domain/analysis/context.js +378 -0
- package/dist/domain/analysis/context.js.map +1 -0
- package/dist/domain/analysis/dependencies.d.ts +60 -0
- package/dist/domain/analysis/dependencies.d.ts.map +1 -0
- package/dist/domain/analysis/dependencies.js +359 -0
- package/dist/domain/analysis/dependencies.js.map +1 -0
- package/dist/domain/analysis/exports.d.ts +2 -0
- package/dist/domain/analysis/exports.d.ts.map +1 -0
- package/dist/domain/analysis/exports.js +168 -0
- package/dist/domain/analysis/exports.js.map +1 -0
- package/dist/domain/analysis/impact.d.ts +39 -0
- package/dist/domain/analysis/impact.d.ts.map +1 -0
- package/dist/domain/analysis/impact.js +611 -0
- package/dist/domain/analysis/impact.js.map +1 -0
- package/dist/domain/analysis/implementations.d.ts +59 -0
- package/dist/domain/analysis/implementations.d.ts.map +1 -0
- package/dist/domain/analysis/implementations.js +93 -0
- package/dist/domain/analysis/implementations.js.map +1 -0
- package/dist/domain/analysis/module-map.d.ts +64 -0
- package/dist/domain/analysis/module-map.d.ts.map +1 -0
- package/dist/domain/analysis/module-map.js +334 -0
- package/dist/domain/analysis/module-map.js.map +1 -0
- package/dist/domain/analysis/roles.d.ts +2 -0
- package/dist/domain/analysis/roles.d.ts.map +1 -0
- package/dist/domain/analysis/roles.js +50 -0
- package/dist/domain/analysis/roles.js.map +1 -0
- package/dist/domain/analysis/symbol-lookup.d.ts +12 -0
- package/dist/domain/analysis/symbol-lookup.d.ts.map +1 -0
- package/dist/domain/analysis/symbol-lookup.js +202 -0
- package/dist/domain/analysis/symbol-lookup.js.map +1 -0
- package/dist/domain/graph/builder/context.d.ts +91 -0
- package/dist/domain/graph/builder/context.d.ts.map +1 -0
- package/dist/domain/graph/builder/context.js +78 -0
- package/dist/domain/graph/builder/context.js.map +1 -0
- package/dist/domain/graph/builder/helpers.d.ts +43 -0
- package/dist/domain/graph/builder/helpers.d.ts.map +1 -0
- package/dist/domain/graph/builder/helpers.js +209 -0
- package/dist/domain/graph/builder/helpers.js.map +1 -0
- package/dist/domain/graph/builder/incremental.d.ts +17 -0
- package/dist/domain/graph/builder/incremental.d.ts.map +1 -0
- package/dist/domain/graph/builder/incremental.js +426 -0
- package/dist/domain/graph/builder/incremental.js.map +1 -0
- package/dist/domain/graph/builder/pipeline.d.ts +13 -0
- package/dist/domain/graph/builder/pipeline.d.ts.map +1 -0
- package/dist/domain/graph/builder/pipeline.js +146 -0
- package/dist/domain/graph/builder/pipeline.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts +5 -0
- package/dist/domain/graph/builder/stages/build-edges.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-edges.js +387 -0
- package/dist/domain/graph/builder/stages/build-edges.js.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts +5 -0
- package/dist/domain/graph/builder/stages/build-structure.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/build-structure.js +107 -0
- package/dist/domain/graph/builder/stages/build-structure.js.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts +5 -0
- package/dist/domain/graph/builder/stages/collect-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/collect-files.js +45 -0
- package/dist/domain/graph/builder/stages/collect-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts +5 -0
- package/dist/domain/graph/builder/stages/detect-changes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/detect-changes.js +358 -0
- package/dist/domain/graph/builder/stages/detect-changes.js.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts +5 -0
- package/dist/domain/graph/builder/stages/finalize.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/finalize.js +123 -0
- package/dist/domain/graph/builder/stages/finalize.js.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts +5 -0
- package/dist/domain/graph/builder/stages/insert-nodes.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js +183 -0
- package/dist/domain/graph/builder/stages/insert-nodes.js.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts +5 -0
- package/dist/domain/graph/builder/stages/parse-files.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/parse-files.js +25 -0
- package/dist/domain/graph/builder/stages/parse-files.js.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts +18 -0
- package/dist/domain/graph/builder/stages/resolve-imports.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js +139 -0
- package/dist/domain/graph/builder/stages/resolve-imports.js.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts +5 -0
- package/dist/domain/graph/builder/stages/run-analyses.d.ts.map +1 -0
- package/dist/domain/graph/builder/stages/run-analyses.js +39 -0
- package/dist/domain/graph/builder/stages/run-analyses.js.map +1 -0
- package/dist/domain/graph/builder.d.ts +4 -0
- package/dist/domain/graph/builder.d.ts.map +1 -0
- package/dist/domain/graph/builder.js +6 -0
- package/dist/domain/graph/builder.js.map +1 -0
- package/dist/domain/graph/change-journal.d.ts +57 -0
- package/dist/domain/graph/change-journal.d.ts.map +1 -0
- package/dist/domain/graph/change-journal.js +120 -0
- package/dist/domain/graph/change-journal.js.map +1 -0
- package/dist/domain/graph/cycles.d.ts +18 -0
- package/dist/domain/graph/cycles.d.ts.map +1 -0
- package/dist/domain/graph/cycles.js +75 -0
- package/dist/domain/graph/cycles.js.map +1 -0
- package/dist/domain/graph/journal.d.ts +27 -0
- package/dist/domain/graph/journal.d.ts.map +1 -0
- package/dist/domain/graph/journal.js +100 -0
- package/dist/domain/graph/journal.js.map +1 -0
- package/dist/domain/graph/resolve.d.ts +76 -0
- package/dist/domain/graph/resolve.d.ts.map +1 -0
- package/dist/domain/graph/resolve.js +482 -0
- package/dist/domain/graph/resolve.js.map +1 -0
- package/dist/domain/graph/watcher.d.ts +2 -0
- package/dist/domain/graph/watcher.d.ts.map +1 -0
- package/dist/domain/graph/watcher.js +140 -0
- package/dist/domain/graph/watcher.js.map +1 -0
- package/dist/domain/parser.d.ts +104 -0
- package/dist/domain/parser.d.ts.map +1 -0
- package/dist/domain/parser.js +593 -0
- package/dist/domain/parser.js.map +1 -0
- package/dist/domain/queries.d.ts +14 -0
- package/dist/domain/queries.d.ts.map +1 -0
- package/dist/domain/queries.js +25 -0
- package/dist/domain/queries.js.map +1 -0
- package/dist/domain/search/generator.d.ts +17 -0
- package/dist/domain/search/generator.d.ts.map +1 -0
- package/dist/domain/search/generator.js +135 -0
- package/dist/domain/search/generator.js.map +1 -0
- package/dist/domain/search/index.d.ts +8 -0
- package/dist/domain/search/index.d.ts.map +1 -0
- package/dist/domain/search/index.js +13 -0
- package/dist/domain/search/index.js.map +1 -0
- package/dist/domain/search/models.d.ts +82 -0
- package/dist/domain/search/models.d.ts.map +1 -0
- package/dist/domain/search/models.js +198 -0
- package/dist/domain/search/models.js.map +1 -0
- package/dist/domain/search/search/cli-formatter.d.ts +6 -0
- package/dist/domain/search/search/cli-formatter.d.ts.map +1 -0
- package/dist/domain/search/search/cli-formatter.js +135 -0
- package/dist/domain/search/search/cli-formatter.js.map +1 -0
- package/dist/domain/search/search/filters.d.ts +19 -0
- package/dist/domain/search/search/filters.d.ts.map +1 -0
- package/dist/domain/search/search/filters.js +48 -0
- package/dist/domain/search/search/filters.js.map +1 -0
- package/dist/domain/search/search/hybrid.d.ts +22 -0
- package/dist/domain/search/search/hybrid.d.ts.map +1 -0
- package/dist/domain/search/search/hybrid.js +113 -0
- package/dist/domain/search/search/hybrid.js.map +1 -0
- package/dist/domain/search/search/keyword.d.ts +17 -0
- package/dist/domain/search/search/keyword.d.ts.map +1 -0
- package/dist/domain/search/search/keyword.js +66 -0
- package/dist/domain/search/search/keyword.js.map +1 -0
- package/dist/domain/search/search/prepare.d.ts +13 -0
- package/dist/domain/search/search/prepare.d.ts.map +1 -0
- package/dist/domain/search/search/prepare.js +70 -0
- package/dist/domain/search/search/prepare.js.map +1 -0
- package/dist/domain/search/search/semantic.d.ts +34 -0
- package/dist/domain/search/search/semantic.d.ts.map +1 -0
- package/dist/domain/search/search/semantic.js +129 -0
- package/dist/domain/search/search/semantic.js.map +1 -0
- package/dist/domain/search/stores/fts5.d.ts +11 -0
- package/dist/domain/search/stores/fts5.d.ts.map +1 -0
- package/dist/domain/search/stores/fts5.js +31 -0
- package/dist/domain/search/stores/fts5.js.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts +27 -0
- package/dist/domain/search/stores/sqlite-blob.d.ts.map +1 -0
- package/dist/domain/search/stores/sqlite-blob.js +22 -0
- package/dist/domain/search/stores/sqlite-blob.js.map +1 -0
- package/dist/domain/search/strategies/source.d.ts +5 -0
- package/dist/domain/search/strategies/source.d.ts.map +1 -0
- package/dist/domain/search/strategies/source.js +14 -0
- package/dist/domain/search/strategies/source.js.map +1 -0
- package/dist/domain/search/strategies/structured.d.ts +6 -0
- package/dist/domain/search/strategies/structured.d.ts.map +1 -0
- package/dist/domain/search/strategies/structured.js +40 -0
- package/dist/domain/search/strategies/structured.js.map +1 -0
- package/dist/domain/search/strategies/text-utils.d.ts +11 -0
- package/dist/domain/search/strategies/text-utils.d.ts.map +1 -0
- package/dist/domain/search/strategies/text-utils.js +47 -0
- package/dist/domain/search/strategies/text-utils.js.map +1 -0
- package/dist/extractors/csharp.d.ts +12 -0
- package/dist/extractors/csharp.d.ts.map +1 -0
- package/dist/extractors/csharp.js +402 -0
- package/dist/extractors/csharp.js.map +1 -0
- package/dist/extractors/go.d.ts +12 -0
- package/dist/extractors/go.d.ts.map +1 -0
- package/dist/extractors/go.js +381 -0
- package/dist/extractors/go.js.map +1 -0
- package/dist/extractors/hcl.d.ts +11 -0
- package/dist/extractors/hcl.d.ts.map +1 -0
- package/dist/extractors/hcl.js +105 -0
- package/dist/extractors/hcl.js.map +1 -0
- package/dist/extractors/helpers.d.ts +16 -0
- package/dist/extractors/helpers.d.ts.map +1 -0
- package/dist/extractors/helpers.js +88 -0
- package/dist/extractors/helpers.js.map +1 -0
- package/dist/extractors/index.d.ts +10 -0
- package/dist/extractors/index.d.ts.map +1 -0
- package/dist/extractors/index.js +10 -0
- package/dist/extractors/index.js.map +1 -0
- package/dist/extractors/java.d.ts +12 -0
- package/dist/extractors/java.d.ts.map +1 -0
- package/dist/extractors/java.js +325 -0
- package/dist/extractors/java.js.map +1 -0
- package/dist/extractors/javascript.d.ts +81 -0
- package/dist/extractors/javascript.d.ts.map +1 -0
- package/dist/extractors/javascript.js +1232 -0
- package/dist/extractors/javascript.js.map +1 -0
- package/dist/extractors/php.d.ts +12 -0
- package/dist/extractors/php.d.ts.map +1 -0
- package/dist/extractors/php.js +380 -0
- package/dist/extractors/php.js.map +1 -0
- package/dist/extractors/python.d.ts +12 -0
- package/dist/extractors/python.d.ts.map +1 -0
- package/dist/extractors/python.js +426 -0
- package/dist/extractors/python.js.map +1 -0
- package/dist/extractors/ruby.d.ts +11 -0
- package/dist/extractors/ruby.d.ts.map +1 -0
- package/dist/extractors/ruby.js +284 -0
- package/dist/extractors/ruby.js.map +1 -0
- package/dist/extractors/rust.d.ts +12 -0
- package/dist/extractors/rust.d.ts.map +1 -0
- package/dist/extractors/rust.js +366 -0
- package/dist/extractors/rust.js.map +1 -0
- package/dist/features/ast.d.ts +30 -0
- package/dist/features/ast.d.ts.map +1 -0
- package/dist/features/ast.js +242 -0
- package/dist/features/ast.js.map +1 -0
- package/dist/features/audit.d.ts +6 -0
- package/dist/features/audit.d.ts.map +1 -0
- package/dist/features/audit.js +283 -0
- package/dist/features/audit.js.map +1 -0
- package/dist/features/batch.d.ts +110 -0
- package/dist/features/batch.d.ts.map +1 -0
- package/dist/features/batch.js +138 -0
- package/dist/features/batch.js.map +1 -0
- package/dist/features/boundaries.d.ts +69 -0
- package/dist/features/boundaries.d.ts.map +1 -0
- package/dist/features/boundaries.js +344 -0
- package/dist/features/boundaries.js.map +1 -0
- package/dist/features/branch-compare.d.ts +52 -0
- package/dist/features/branch-compare.d.ts.map +1 -0
- package/dist/features/branch-compare.js +425 -0
- package/dist/features/branch-compare.js.map +1 -0
- package/dist/features/cfg.d.ts +51 -0
- package/dist/features/cfg.d.ts.map +1 -0
- package/dist/features/cfg.js +372 -0
- package/dist/features/cfg.js.map +1 -0
- package/dist/features/check.d.ts +99 -0
- package/dist/features/check.d.ts.map +1 -0
- package/dist/features/check.js +296 -0
- package/dist/features/check.js.map +1 -0
- package/dist/features/cochange.d.ts +119 -0
- package/dist/features/cochange.d.ts.map +1 -0
- package/dist/features/cochange.js +425 -0
- package/dist/features/cochange.js.map +1 -0
- package/dist/features/communities.d.ts +40 -0
- package/dist/features/communities.d.ts.map +1 -0
- package/dist/features/communities.js +163 -0
- package/dist/features/communities.js.map +1 -0
- package/dist/features/complexity.d.ts +127 -0
- package/dist/features/complexity.d.ts.map +1 -0
- package/dist/features/complexity.js +683 -0
- package/dist/features/complexity.js.map +1 -0
- package/dist/features/dataflow.d.ts +72 -0
- package/dist/features/dataflow.d.ts.map +1 -0
- package/dist/features/dataflow.js +483 -0
- package/dist/features/dataflow.js.map +1 -0
- package/dist/features/export.d.ts +29 -0
- package/dist/features/export.d.ts.map +1 -0
- package/dist/features/export.js +336 -0
- package/dist/features/export.js.map +1 -0
- package/dist/features/flow.d.ts +49 -0
- package/dist/features/flow.d.ts.map +1 -0
- package/dist/features/flow.js +203 -0
- package/dist/features/flow.js.map +1 -0
- package/dist/features/graph-enrichment.d.ts +54 -0
- package/dist/features/graph-enrichment.d.ts.map +1 -0
- package/dist/features/graph-enrichment.js +297 -0
- package/dist/features/graph-enrichment.js.map +1 -0
- package/dist/features/manifesto.d.ts +46 -0
- package/dist/features/manifesto.d.ts.map +1 -0
- package/dist/features/manifesto.js +398 -0
- package/dist/features/manifesto.js.map +1 -0
- package/dist/features/owners.d.ts +123 -0
- package/dist/features/owners.d.ts.map +1 -0
- package/dist/features/owners.js +289 -0
- package/dist/features/owners.js.map +1 -0
- package/dist/features/sequence.d.ts +33 -0
- package/dist/features/sequence.d.ts.map +1 -0
- package/dist/features/sequence.js +269 -0
- package/dist/features/sequence.js.map +1 -0
- package/dist/features/shared/find-nodes.d.ts +11 -0
- package/dist/features/shared/find-nodes.d.ts.map +1 -0
- package/dist/features/shared/find-nodes.js +27 -0
- package/dist/features/shared/find-nodes.js.map +1 -0
- package/dist/features/snapshot.d.ts +64 -0
- package/dist/features/snapshot.d.ts.map +1 -0
- package/dist/features/snapshot.js +132 -0
- package/dist/features/snapshot.js.map +1 -0
- package/dist/features/structure.d.ts +42 -0
- package/dist/features/structure.d.ts.map +1 -0
- package/dist/features/structure.js +596 -0
- package/dist/features/structure.js.map +1 -0
- package/dist/features/triage.d.ts +13 -0
- package/dist/features/triage.d.ts.map +1 -0
- package/dist/features/triage.js +133 -0
- package/dist/features/triage.js.map +1 -0
- package/dist/graph/algorithms/bfs.d.ts +13 -0
- package/dist/graph/algorithms/bfs.d.ts.map +1 -0
- package/dist/graph/algorithms/bfs.js +47 -0
- package/dist/graph/algorithms/bfs.js.map +1 -0
- package/dist/graph/algorithms/centrality.d.ts +11 -0
- package/dist/graph/algorithms/centrality.d.ts.map +1 -0
- package/dist/graph/algorithms/centrality.js +17 -0
- package/dist/graph/algorithms/centrality.js.map +1 -0
- package/dist/graph/algorithms/index.d.ts +6 -0
- package/dist/graph/algorithms/index.d.ts.map +1 -0
- package/dist/graph/algorithms/index.js +6 -0
- package/dist/graph/algorithms/index.js.map +1 -0
- package/dist/graph/algorithms/louvain.d.ts +5 -0
- package/dist/graph/algorithms/louvain.d.ts.map +1 -0
- package/dist/graph/algorithms/louvain.js +22 -0
- package/dist/graph/algorithms/louvain.js.map +1 -0
- package/dist/graph/algorithms/shortest-path.d.ts +10 -0
- package/dist/graph/algorithms/shortest-path.d.ts.map +1 -0
- package/dist/graph/algorithms/shortest-path.js +41 -0
- package/dist/graph/algorithms/shortest-path.js.map +1 -0
- package/dist/graph/algorithms/tarjan.d.ts +9 -0
- package/dist/graph/algorithms/tarjan.d.ts.map +1 -0
- package/dist/graph/algorithms/tarjan.js +48 -0
- package/dist/graph/algorithms/tarjan.js.map +1 -0
- package/dist/graph/builders/dependency.d.ts +15 -0
- package/dist/graph/builders/dependency.d.ts.map +1 -0
- package/dist/graph/builders/dependency.js +99 -0
- package/dist/graph/builders/dependency.js.map +1 -0
- package/dist/graph/builders/index.d.ts +4 -0
- package/dist/graph/builders/index.d.ts.map +1 -0
- package/dist/graph/builders/index.js +4 -0
- package/dist/graph/builders/index.js.map +1 -0
- package/dist/graph/builders/structure.d.ts +7 -0
- package/dist/graph/builders/structure.d.ts.map +1 -0
- package/dist/graph/builders/structure.js +32 -0
- package/dist/graph/builders/structure.js.map +1 -0
- package/dist/graph/builders/temporal.d.ts +10 -0
- package/dist/graph/builders/temporal.d.ts.map +1 -0
- package/dist/graph/builders/temporal.js +31 -0
- package/dist/graph/builders/temporal.js.map +1 -0
- package/dist/graph/classifiers/index.d.ts +3 -0
- package/dist/graph/classifiers/index.d.ts.map +1 -0
- package/dist/graph/classifiers/index.js +3 -0
- package/dist/graph/classifiers/index.js.map +1 -0
- package/dist/graph/classifiers/risk.d.ts +49 -0
- package/dist/graph/classifiers/risk.d.ts.map +1 -0
- package/dist/graph/classifiers/risk.js +84 -0
- package/dist/graph/classifiers/risk.js.map +1 -0
- package/dist/graph/classifiers/roles.d.ts +29 -0
- package/dist/graph/classifiers/roles.d.ts.map +1 -0
- package/dist/graph/classifiers/roles.js +109 -0
- package/dist/graph/classifiers/roles.js.map +1 -0
- package/dist/graph/index.d.ts +5 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +6 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/model.d.ts +53 -0
- package/dist/graph/model.d.ts.map +1 -0
- package/dist/graph/model.js +210 -0
- package/dist/graph/model.js.map +1 -0
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/config.d.ts +228 -0
- package/dist/infrastructure/config.d.ts.map +1 -0
- package/dist/infrastructure/config.js +404 -0
- package/dist/infrastructure/config.js.map +1 -0
- package/dist/infrastructure/logger.d.ts +7 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/logger.js +21 -0
- package/dist/infrastructure/logger.js.map +1 -0
- package/dist/infrastructure/native.d.ts +19 -0
- package/dist/infrastructure/native.d.ts.map +1 -0
- package/dist/infrastructure/native.js +105 -0
- package/dist/infrastructure/native.js.map +1 -0
- package/dist/infrastructure/registry.d.ts +57 -0
- package/dist/infrastructure/registry.d.ts.map +1 -0
- package/dist/infrastructure/registry.js +157 -0
- package/dist/infrastructure/registry.js.map +1 -0
- package/dist/infrastructure/result-formatter.d.ts +2 -0
- package/dist/infrastructure/result-formatter.d.ts.map +1 -0
- package/dist/infrastructure/result-formatter.js +3 -0
- package/dist/infrastructure/result-formatter.js.map +1 -0
- package/dist/infrastructure/test-filter.d.ts +5 -0
- package/dist/infrastructure/test-filter.d.ts.map +1 -0
- package/dist/infrastructure/test-filter.js +7 -0
- package/dist/infrastructure/test-filter.js.map +1 -0
- package/dist/infrastructure/update-check.d.ts +24 -0
- package/dist/infrastructure/update-check.d.ts.map +1 -0
- package/dist/infrastructure/update-check.js +150 -0
- package/dist/infrastructure/update-check.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/middleware.d.ts +26 -0
- package/dist/mcp/middleware.d.ts.map +1 -0
- package/dist/mcp/middleware.js +38 -0
- package/dist/mcp/middleware.js.map +1 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +120 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +8 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +819 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools/ast-query.d.ts +9 -0
- package/dist/mcp/tools/ast-query.d.ts.map +1 -0
- package/dist/mcp/tools/ast-query.js +13 -0
- package/dist/mcp/tools/ast-query.js.map +1 -0
- package/dist/mcp/tools/audit.d.ts +3 -0
- package/dist/mcp/tools/audit.d.ts.map +1 -0
- package/dist/mcp/tools/audit.js +20 -0
- package/dist/mcp/tools/audit.js.map +1 -0
- package/dist/mcp/tools/batch-query.d.ts +9 -0
- package/dist/mcp/tools/batch-query.d.ts.map +1 -0
- package/dist/mcp/tools/batch-query.js +11 -0
- package/dist/mcp/tools/batch-query.js.map +1 -0
- package/dist/mcp/tools/branch-compare.d.ts +3 -0
- package/dist/mcp/tools/branch-compare.d.ts.map +1 -0
- package/dist/mcp/tools/branch-compare.js +10 -0
- package/dist/mcp/tools/branch-compare.js.map +1 -0
- package/dist/mcp/tools/brief.d.ts +3 -0
- package/dist/mcp/tools/brief.d.ts.map +1 -0
- package/dist/mcp/tools/brief.js +8 -0
- package/dist/mcp/tools/brief.js.map +1 -0
- package/dist/mcp/tools/cfg.d.ts +10 -0
- package/dist/mcp/tools/cfg.d.ts.map +1 -0
- package/dist/mcp/tools/cfg.js +20 -0
- package/dist/mcp/tools/cfg.js.map +1 -0
- package/dist/mcp/tools/check.d.ts +24 -0
- package/dist/mcp/tools/check.d.ts.map +1 -0
- package/dist/mcp/tools/check.js +39 -0
- package/dist/mcp/tools/check.js.map +1 -0
- package/dist/mcp/tools/co-changes.d.ts +10 -0
- package/dist/mcp/tools/co-changes.d.ts.map +1 -0
- package/dist/mcp/tools/co-changes.js +19 -0
- package/dist/mcp/tools/co-changes.js.map +1 -0
- package/dist/mcp/tools/code-owners.d.ts +48 -0
- package/dist/mcp/tools/code-owners.d.ts.map +1 -0
- package/dist/mcp/tools/code-owners.js +12 -0
- package/dist/mcp/tools/code-owners.js.map +1 -0
- package/dist/mcp/tools/communities.d.ts +8 -0
- package/dist/mcp/tools/communities.d.ts.map +1 -0
- package/dist/mcp/tools/communities.js +14 -0
- package/dist/mcp/tools/communities.js.map +1 -0
- package/dist/mcp/tools/complexity.d.ts +7 -0
- package/dist/mcp/tools/complexity.d.ts.map +1 -0
- package/dist/mcp/tools/complexity.js +17 -0
- package/dist/mcp/tools/complexity.js.map +1 -0
- package/dist/mcp/tools/context.d.ts +3 -0
- package/dist/mcp/tools/context.d.ts.map +1 -0
- package/dist/mcp/tools/context.js +16 -0
- package/dist/mcp/tools/context.js.map +1 -0
- package/dist/mcp/tools/dataflow.d.ts +6 -0
- package/dist/mcp/tools/dataflow.d.ts.map +1 -0
- package/dist/mcp/tools/dataflow.js +25 -0
- package/dist/mcp/tools/dataflow.js.map +1 -0
- package/dist/mcp/tools/diff-impact.d.ts +3 -0
- package/dist/mcp/tools/diff-impact.d.ts.map +1 -0
- package/dist/mcp/tools/diff-impact.js +23 -0
- package/dist/mcp/tools/diff-impact.js.map +1 -0
- package/dist/mcp/tools/execution-flow.d.ts +17 -0
- package/dist/mcp/tools/execution-flow.d.ts.map +1 -0
- package/dist/mcp/tools/execution-flow.js +25 -0
- package/dist/mcp/tools/execution-flow.js.map +1 -0
- package/dist/mcp/tools/export-graph.d.ts +3 -0
- package/dist/mcp/tools/export-graph.d.ts.map +1 -0
- package/dist/mcp/tools/export-graph.js +55 -0
- package/dist/mcp/tools/export-graph.js.map +1 -0
- package/dist/mcp/tools/file-deps.d.ts +3 -0
- package/dist/mcp/tools/file-deps.d.ts.map +1 -0
- package/dist/mcp/tools/file-deps.js +11 -0
- package/dist/mcp/tools/file-deps.js.map +1 -0
- package/dist/mcp/tools/file-exports.d.ts +3 -0
- package/dist/mcp/tools/file-exports.d.ts.map +1 -0
- package/dist/mcp/tools/file-exports.js +12 -0
- package/dist/mcp/tools/file-exports.js.map +1 -0
- package/dist/mcp/tools/find-cycles.d.ts +6 -0
- package/dist/mcp/tools/find-cycles.d.ts.map +1 -0
- package/dist/mcp/tools/find-cycles.js +15 -0
- package/dist/mcp/tools/find-cycles.js.map +1 -0
- package/dist/mcp/tools/fn-impact.d.ts +3 -0
- package/dist/mcp/tools/fn-impact.d.ts.map +1 -0
- package/dist/mcp/tools/fn-impact.js +14 -0
- package/dist/mcp/tools/fn-impact.js.map +1 -0
- package/dist/mcp/tools/impact-analysis.d.ts +3 -0
- package/dist/mcp/tools/impact-analysis.d.ts.map +1 -0
- package/dist/mcp/tools/impact-analysis.js +11 -0
- package/dist/mcp/tools/impact-analysis.js.map +1 -0
- package/dist/mcp/tools/implementations.d.ts +3 -0
- package/dist/mcp/tools/implementations.d.ts.map +1 -0
- package/dist/mcp/tools/implementations.js +13 -0
- package/dist/mcp/tools/implementations.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +3 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +76 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/interfaces.d.ts +3 -0
- package/dist/mcp/tools/interfaces.d.ts.map +1 -0
- package/dist/mcp/tools/interfaces.js +13 -0
- package/dist/mcp/tools/interfaces.js.map +1 -0
- package/dist/mcp/tools/list-functions.d.ts +3 -0
- package/dist/mcp/tools/list-functions.d.ts.map +1 -0
- package/dist/mcp/tools/list-functions.js +13 -0
- package/dist/mcp/tools/list-functions.js.map +1 -0
- package/dist/mcp/tools/list-repos.d.ts +11 -0
- package/dist/mcp/tools/list-repos.d.ts.map +1 -0
- package/dist/mcp/tools/list-repos.js +11 -0
- package/dist/mcp/tools/list-repos.js.map +1 -0
- package/dist/mcp/tools/module-map.d.ts +3 -0
- package/dist/mcp/tools/module-map.d.ts.map +1 -0
- package/dist/mcp/tools/module-map.js +6 -0
- package/dist/mcp/tools/module-map.js.map +1 -0
- package/dist/mcp/tools/node-roles.d.ts +3 -0
- package/dist/mcp/tools/node-roles.d.ts.map +1 -0
- package/dist/mcp/tools/node-roles.js +13 -0
- package/dist/mcp/tools/node-roles.js.map +1 -0
- package/dist/mcp/tools/path.d.ts +3 -0
- package/dist/mcp/tools/path.d.ts.map +1 -0
- package/dist/mcp/tools/path.js +12 -0
- package/dist/mcp/tools/path.js.map +1 -0
- package/dist/mcp/tools/query.d.ts +3 -0
- package/dist/mcp/tools/query.d.ts.map +1 -0
- package/dist/mcp/tools/query.js +29 -0
- package/dist/mcp/tools/query.js.map +1 -0
- package/dist/mcp/tools/semantic-search.d.ts +46 -0
- package/dist/mcp/tools/semantic-search.d.ts.map +1 -0
- package/dist/mcp/tools/semantic-search.js +61 -0
- package/dist/mcp/tools/semantic-search.js.map +1 -0
- package/dist/mcp/tools/sequence.d.ts +18 -0
- package/dist/mcp/tools/sequence.d.ts.map +1 -0
- package/dist/mcp/tools/sequence.js +16 -0
- package/dist/mcp/tools/sequence.js.map +1 -0
- package/dist/mcp/tools/structure.d.ts +3 -0
- package/dist/mcp/tools/structure.d.ts.map +1 -0
- package/dist/mcp/tools/structure.js +14 -0
- package/dist/mcp/tools/structure.js.map +1 -0
- package/dist/mcp/tools/symbol-children.d.ts +3 -0
- package/dist/mcp/tools/symbol-children.d.ts.map +1 -0
- package/dist/mcp/tools/symbol-children.js +13 -0
- package/dist/mcp/tools/symbol-children.js.map +1 -0
- package/dist/mcp/tools/triage.d.ts +3 -0
- package/dist/mcp/tools/triage.d.ts.map +1 -0
- package/dist/mcp/tools/triage.js +34 -0
- package/dist/mcp/tools/triage.js.map +1 -0
- package/dist/mcp/tools/where.d.ts +3 -0
- package/dist/mcp/tools/where.d.ts.map +1 -0
- package/dist/mcp/tools/where.js +12 -0
- package/dist/mcp/tools/where.js.map +1 -0
- package/dist/presentation/audit.d.ts +5 -0
- package/dist/presentation/audit.d.ts.map +1 -0
- package/dist/presentation/audit.js +77 -0
- package/dist/presentation/audit.js.map +1 -0
- package/dist/presentation/batch.d.ts +10 -0
- package/dist/presentation/batch.d.ts.map +1 -0
- package/dist/presentation/batch.js +25 -0
- package/dist/presentation/batch.js.map +1 -0
- package/dist/presentation/branch-compare.d.ts +2 -0
- package/dist/presentation/branch-compare.d.ts.map +1 -0
- package/dist/presentation/branch-compare.js +75 -0
- package/dist/presentation/branch-compare.js.map +1 -0
- package/dist/presentation/brief.d.ts +12 -0
- package/dist/presentation/brief.d.ts.map +1 -0
- package/dist/presentation/brief.js +49 -0
- package/dist/presentation/brief.js.map +1 -0
- package/dist/presentation/cfg.d.ts +5 -0
- package/dist/presentation/cfg.d.ts.map +1 -0
- package/dist/presentation/cfg.js +50 -0
- package/dist/presentation/cfg.js.map +1 -0
- package/dist/presentation/check.d.ts +5 -0
- package/dist/presentation/check.d.ts.map +1 -0
- package/dist/presentation/check.js +70 -0
- package/dist/presentation/check.js.map +1 -0
- package/dist/presentation/cochange.d.ts +9 -0
- package/dist/presentation/cochange.d.ts.map +1 -0
- package/dist/presentation/cochange.js +39 -0
- package/dist/presentation/cochange.js.map +1 -0
- package/dist/presentation/colors.d.ts +26 -0
- package/dist/presentation/colors.d.ts.map +1 -0
- package/dist/presentation/colors.js +42 -0
- package/dist/presentation/colors.js.map +1 -0
- package/dist/presentation/communities.d.ts +5 -0
- package/dist/presentation/communities.d.ts.map +1 -0
- package/dist/presentation/communities.js +56 -0
- package/dist/presentation/communities.js.map +1 -0
- package/dist/presentation/complexity.d.ts +5 -0
- package/dist/presentation/complexity.d.ts.map +1 -0
- package/dist/presentation/complexity.js +56 -0
- package/dist/presentation/complexity.js.map +1 -0
- package/dist/presentation/dataflow.d.ts +5 -0
- package/dist/presentation/dataflow.d.ts.map +1 -0
- package/dist/presentation/dataflow.js +96 -0
- package/dist/presentation/dataflow.js.map +1 -0
- package/dist/presentation/export.d.ts +137 -0
- package/dist/presentation/export.d.ts.map +1 -0
- package/dist/presentation/export.js +374 -0
- package/dist/presentation/export.js.map +1 -0
- package/dist/presentation/flow.d.ts +5 -0
- package/dist/presentation/flow.d.ts.map +1 -0
- package/dist/presentation/flow.js +64 -0
- package/dist/presentation/flow.js.map +1 -0
- package/dist/presentation/manifesto.d.ts +5 -0
- package/dist/presentation/manifesto.d.ts.map +1 -0
- package/dist/presentation/manifesto.js +56 -0
- package/dist/presentation/manifesto.js.map +1 -0
- package/dist/presentation/owners.d.ts +5 -0
- package/dist/presentation/owners.d.ts.map +1 -0
- package/dist/presentation/owners.js +45 -0
- package/dist/presentation/owners.js.map +1 -0
- package/dist/presentation/queries-cli/exports.d.ts +2 -0
- package/dist/presentation/queries-cli/exports.d.ts.map +1 -0
- package/dist/presentation/queries-cli/exports.js +94 -0
- package/dist/presentation/queries-cli/exports.js.map +1 -0
- package/dist/presentation/queries-cli/impact.d.ts +6 -0
- package/dist/presentation/queries-cli/impact.d.ts.map +1 -0
- package/dist/presentation/queries-cli/impact.js +196 -0
- package/dist/presentation/queries-cli/impact.js.map +1 -0
- package/dist/presentation/queries-cli/index.d.ts +6 -0
- package/dist/presentation/queries-cli/index.d.ts.map +1 -0
- package/dist/presentation/queries-cli/index.js +6 -0
- package/dist/presentation/queries-cli/index.js.map +1 -0
- package/dist/presentation/queries-cli/inspect.d.ts +8 -0
- package/dist/presentation/queries-cli/inspect.d.ts.map +1 -0
- package/dist/presentation/queries-cli/inspect.js +353 -0
- package/dist/presentation/queries-cli/inspect.js.map +1 -0
- package/dist/presentation/queries-cli/overview.d.ts +4 -0
- package/dist/presentation/queries-cli/overview.d.ts.map +1 -0
- package/dist/presentation/queries-cli/overview.js +163 -0
- package/dist/presentation/queries-cli/overview.js.map +1 -0
- package/dist/presentation/queries-cli/path.d.ts +2 -0
- package/dist/presentation/queries-cli/path.d.ts.map +1 -0
- package/dist/presentation/queries-cli/path.js +51 -0
- package/dist/presentation/queries-cli/path.js.map +1 -0
- package/dist/presentation/queries-cli.d.ts +2 -0
- package/dist/presentation/queries-cli.d.ts.map +1 -0
- package/dist/presentation/queries-cli.js +12 -0
- package/dist/presentation/queries-cli.js.map +1 -0
- package/dist/presentation/query.d.ts +2 -0
- package/dist/presentation/query.d.ts.map +1 -0
- package/dist/presentation/query.js +6 -0
- package/dist/presentation/query.js.map +1 -0
- package/dist/presentation/result-formatter.d.ts +10 -0
- package/dist/presentation/result-formatter.d.ts.map +1 -0
- package/dist/presentation/result-formatter.js +134 -0
- package/dist/presentation/result-formatter.js.map +1 -0
- package/dist/presentation/sequence-renderer.d.ts +12 -0
- package/dist/presentation/sequence-renderer.d.ts.map +1 -0
- package/dist/presentation/sequence-renderer.js +36 -0
- package/dist/presentation/sequence-renderer.js.map +1 -0
- package/dist/presentation/sequence.d.ts +5 -0
- package/dist/presentation/sequence.d.ts.map +1 -0
- package/dist/presentation/sequence.js +29 -0
- package/dist/presentation/sequence.js.map +1 -0
- package/dist/presentation/structure.d.ts +8 -0
- package/dist/presentation/structure.d.ts.map +1 -0
- package/dist/presentation/structure.js +50 -0
- package/dist/presentation/structure.js.map +1 -0
- package/dist/presentation/table.d.ts +28 -0
- package/dist/presentation/table.d.ts.map +1 -0
- package/dist/presentation/table.js +39 -0
- package/dist/presentation/table.js.map +1 -0
- package/dist/presentation/triage.d.ts +5 -0
- package/dist/presentation/triage.d.ts.map +1 -0
- package/dist/presentation/triage.js +37 -0
- package/dist/presentation/triage.js.map +1 -0
- package/dist/presentation/viewer.d.ts +85 -0
- package/dist/presentation/viewer.d.ts.map +1 -0
- package/dist/presentation/viewer.js +621 -0
- package/dist/presentation/viewer.js.map +1 -0
- package/dist/shared/constants.d.ts +11 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +35 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/errors.d.ts +47 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +69 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/file-utils.d.ts +14 -0
- package/dist/shared/file-utils.d.ts.map +1 -0
- package/dist/shared/file-utils.js +165 -0
- package/dist/shared/file-utils.js.map +1 -0
- package/dist/shared/generators.d.ts +62 -0
- package/dist/shared/generators.d.ts.map +1 -0
- package/dist/shared/generators.js +120 -0
- package/dist/shared/generators.js.map +1 -0
- package/dist/shared/hierarchy.d.ts +2 -0
- package/dist/shared/hierarchy.d.ts.map +1 -0
- package/dist/shared/hierarchy.js +27 -0
- package/dist/shared/hierarchy.js.map +1 -0
- package/dist/shared/kinds.d.ts +11 -0
- package/dist/shared/kinds.d.ts.map +1 -0
- package/dist/shared/kinds.js +56 -0
- package/dist/shared/kinds.js.map +1 -0
- package/dist/shared/normalize.d.ts +19 -0
- package/dist/shared/normalize.d.ts.map +1 -0
- package/dist/shared/normalize.js +59 -0
- package/dist/shared/normalize.js.map +1 -0
- package/dist/shared/paginate.d.ts +80 -0
- package/dist/shared/paginate.d.ts.map +1 -0
- package/dist/shared/paginate.js +111 -0
- package/dist/shared/paginate.js.map +1 -0
- package/dist/types.d.ts +1322 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +22 -15
- package/src/cli/commands/ast.js +1 -1
- package/src/cli/commands/diff-impact.js +2 -0
- package/src/cli/commands/fn-impact.js +2 -0
- package/src/cli/commands/implementations.js +29 -0
- package/src/cli/commands/info.js +2 -2
- package/src/cli/commands/interfaces.js +29 -0
- package/src/cli/commands/roles.js +2 -1
- package/src/cli/commands/triage.js +4 -1
- package/src/db/index.js +2 -0
- package/src/db/query-builder.js +9 -4
- package/src/db/repository/edges.js +38 -0
- package/src/db/repository/in-memory-repository.js +11 -2
- package/src/db/repository/index.js +2 -0
- package/src/domain/analysis/brief.js +12 -6
- package/src/domain/analysis/context.js +74 -20
- package/src/domain/analysis/exports.js +81 -10
- package/src/domain/analysis/impact.js +100 -6
- package/src/domain/analysis/implementations.js +98 -0
- package/src/domain/analysis/module-map.js +13 -4
- package/src/domain/analysis/roles.js +8 -2
- package/src/domain/graph/builder/incremental.js +317 -6
- package/src/domain/graph/builder/pipeline.js +9 -1
- package/src/domain/graph/builder/stages/build-edges.js +117 -20
- package/src/domain/graph/resolve.js +315 -1
- package/src/domain/parser.js +107 -6
- package/src/domain/queries.js +1 -0
- package/src/domain/search/search/hybrid.js +7 -4
- package/src/domain/search/search/semantic.js +11 -6
- package/src/extractors/csharp.js +62 -0
- package/src/extractors/go.js +141 -0
- package/src/extractors/java.js +29 -3
- package/src/extractors/javascript.js +163 -1
- package/src/extractors/php.js +43 -0
- package/src/extractors/python.js +130 -0
- package/src/extractors/rust.js +60 -0
- package/src/features/audit.js +2 -1
- package/src/features/communities.js +3 -1
- package/src/features/graph-enrichment.js +1 -1
- package/src/features/sequence.js +3 -1
- package/src/features/structure.js +33 -4
- package/src/features/triage.js +9 -2
- package/src/graph/classifiers/risk.js +9 -2
- package/src/graph/classifiers/roles.js +51 -3
- package/src/infrastructure/config.js +278 -7
- package/src/mcp/middleware.js +20 -2
- package/src/mcp/server.js +6 -0
- package/src/mcp/tool-registry.js +40 -1
- package/src/mcp/tools/implementations.js +14 -0
- package/src/mcp/tools/index.js +4 -0
- package/src/mcp/tools/interfaces.js +14 -0
- package/src/mcp/tools/semantic-search.js +3 -3
- package/src/presentation/queries-cli/exports.js +54 -4
- package/src/presentation/queries-cli/index.js +9 -1
- package/src/presentation/queries-cli/inspect.js +64 -0
- package/src/presentation/queries-cli.js +3 -1
- package/src/presentation/result-formatter.js +9 -5
- package/src/shared/file-utils.js +20 -11
- package/src/shared/kinds.js +14 -1
- package/src/shared/paginate.js +10 -2
- package/src/types.ts +1609 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { SUPPORTED_EXTENSIONS } from '../domain/parser.js';
|
|
3
|
+
export const IGNORE_DIRS = new Set([
|
|
4
|
+
'node_modules',
|
|
5
|
+
'.git',
|
|
6
|
+
'dist',
|
|
7
|
+
'build',
|
|
8
|
+
'.next',
|
|
9
|
+
'.nuxt',
|
|
10
|
+
'.svelte-kit',
|
|
11
|
+
'coverage',
|
|
12
|
+
'.codegraph',
|
|
13
|
+
'__pycache__',
|
|
14
|
+
'.tox',
|
|
15
|
+
'vendor',
|
|
16
|
+
'.venv',
|
|
17
|
+
'venv',
|
|
18
|
+
'env',
|
|
19
|
+
'.env',
|
|
20
|
+
]);
|
|
21
|
+
export { SUPPORTED_EXTENSIONS as EXTENSIONS };
|
|
22
|
+
export function shouldIgnore(dirName) {
|
|
23
|
+
return IGNORE_DIRS.has(dirName) || dirName.startsWith('.');
|
|
24
|
+
}
|
|
25
|
+
export function isSupportedFile(filePath) {
|
|
26
|
+
return SUPPORTED_EXTENSIONS.has(path.extname(filePath));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Normalize a file path to always use forward slashes.
|
|
30
|
+
* Ensures cross-platform consistency in the SQLite database.
|
|
31
|
+
*/
|
|
32
|
+
export function normalizePath(filePath) {
|
|
33
|
+
return filePath.split(path.sep).join('/');
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/shared/constants.js"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IACjC,cAAc;IACd,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,aAAa;IACb,UAAU;IACV,YAAY;IACZ,aAAa;IACb,MAAM;IACN,QAAQ;IACR,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;CACP,CAAC,CAAC;AAEH,OAAO,EAAE,oBAAoB,IAAI,UAAU,EAAE,CAAC;AAE9C,MAAM,UAAU,YAAY,CAAC,OAAO;IAClC,OAAO,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAAQ;IACtC,OAAO,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAAQ;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain error hierarchy for codegraph.
|
|
3
|
+
*
|
|
4
|
+
* Library code throws these instead of calling process.exit() or throwing
|
|
5
|
+
* bare Error instances. The CLI top-level catch formats them for humans;
|
|
6
|
+
* MCP returns structured { isError, code } responses.
|
|
7
|
+
*/
|
|
8
|
+
export class CodegraphError extends Error {
|
|
9
|
+
/**
|
|
10
|
+
* @param {string} message
|
|
11
|
+
* @param {object} [opts]
|
|
12
|
+
* @param {string} [opts.code]
|
|
13
|
+
* @param {string} [opts.file] - Related file path, if applicable
|
|
14
|
+
* @param {Error} [opts.cause] - Original error that triggered this one
|
|
15
|
+
*/
|
|
16
|
+
constructor(message: string, { code, file, cause }?: {
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
file?: string | undefined;
|
|
19
|
+
cause?: Error | undefined;
|
|
20
|
+
});
|
|
21
|
+
/** @type {string} */
|
|
22
|
+
code: string;
|
|
23
|
+
/** @type {string|undefined} */
|
|
24
|
+
file: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
export class ParseError extends CodegraphError {
|
|
27
|
+
constructor(message: any, opts?: {});
|
|
28
|
+
}
|
|
29
|
+
export class DbError extends CodegraphError {
|
|
30
|
+
constructor(message: any, opts?: {});
|
|
31
|
+
}
|
|
32
|
+
export class ConfigError extends CodegraphError {
|
|
33
|
+
constructor(message: any, opts?: {});
|
|
34
|
+
}
|
|
35
|
+
export class ResolutionError extends CodegraphError {
|
|
36
|
+
constructor(message: any, opts?: {});
|
|
37
|
+
}
|
|
38
|
+
export class EngineError extends CodegraphError {
|
|
39
|
+
constructor(message: any, opts?: {});
|
|
40
|
+
}
|
|
41
|
+
export class AnalysisError extends CodegraphError {
|
|
42
|
+
constructor(message: any, opts?: {});
|
|
43
|
+
}
|
|
44
|
+
export class BoundaryError extends CodegraphError {
|
|
45
|
+
constructor(message: any, opts?: {});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;IAOE;;;;;;OAMG;IACH,qBANW,MAAM,0BAEd;QAAsB,IAAI;QACJ,IAAI;QACJ,KAAK;KAC7B,EAMA;IAlBD,qBAAqB;IACrB,MADW,MAAM,CACZ;IAEL,+BAA+B;IAC/B,MADW,MAAM,GAAC,SAAS,CACtB;CAeN;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF;AAED;IACE,qCAGC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain error hierarchy for codegraph.
|
|
3
|
+
*
|
|
4
|
+
* Library code throws these instead of calling process.exit() or throwing
|
|
5
|
+
* bare Error instances. The CLI top-level catch formats them for humans;
|
|
6
|
+
* MCP returns structured { isError, code } responses.
|
|
7
|
+
*/
|
|
8
|
+
export class CodegraphError extends Error {
|
|
9
|
+
/** @type {string} */
|
|
10
|
+
code;
|
|
11
|
+
/** @type {string|undefined} */
|
|
12
|
+
file;
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} message
|
|
15
|
+
* @param {object} [opts]
|
|
16
|
+
* @param {string} [opts.code]
|
|
17
|
+
* @param {string} [opts.file] - Related file path, if applicable
|
|
18
|
+
* @param {Error} [opts.cause] - Original error that triggered this one
|
|
19
|
+
*/
|
|
20
|
+
constructor(message, { code = 'CODEGRAPH_ERROR', file, cause } = {}) {
|
|
21
|
+
super(message, { cause });
|
|
22
|
+
this.name = 'CodegraphError';
|
|
23
|
+
this.code = code;
|
|
24
|
+
this.file = file;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class ParseError extends CodegraphError {
|
|
28
|
+
constructor(message, opts = {}) {
|
|
29
|
+
super(message, { code: 'PARSE_FAILED', ...opts });
|
|
30
|
+
this.name = 'ParseError';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export class DbError extends CodegraphError {
|
|
34
|
+
constructor(message, opts = {}) {
|
|
35
|
+
super(message, { code: 'DB_ERROR', ...opts });
|
|
36
|
+
this.name = 'DbError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class ConfigError extends CodegraphError {
|
|
40
|
+
constructor(message, opts = {}) {
|
|
41
|
+
super(message, { code: 'CONFIG_INVALID', ...opts });
|
|
42
|
+
this.name = 'ConfigError';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export class ResolutionError extends CodegraphError {
|
|
46
|
+
constructor(message, opts = {}) {
|
|
47
|
+
super(message, { code: 'RESOLUTION_FAILED', ...opts });
|
|
48
|
+
this.name = 'ResolutionError';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export class EngineError extends CodegraphError {
|
|
52
|
+
constructor(message, opts = {}) {
|
|
53
|
+
super(message, { code: 'ENGINE_UNAVAILABLE', ...opts });
|
|
54
|
+
this.name = 'EngineError';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class AnalysisError extends CodegraphError {
|
|
58
|
+
constructor(message, opts = {}) {
|
|
59
|
+
super(message, { code: 'ANALYSIS_FAILED', ...opts });
|
|
60
|
+
this.name = 'AnalysisError';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class BoundaryError extends CodegraphError {
|
|
64
|
+
constructor(message, opts = {}) {
|
|
65
|
+
super(message, { code: 'BOUNDARY_VIOLATION', ...opts });
|
|
66
|
+
this.name = 'BoundaryError';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,qBAAqB;IACrB,IAAI,CAAC;IAEL,+BAA+B;IAC/B,IAAI,CAAC;IAEL;;;;;;OAMG;IACH,YAAY,OAAO,EAAE,EAAE,IAAI,GAAG,iBAAiB,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE;QACjE,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CA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AAI,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,cAAc;IAC/C,YAAY,OAAO,EAAE,IAAI,GAAG,EAAE;QAC5B,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,cAAc;IAC/C,YAAY,OAAO,EAAE,IAAI,GAAG,EAAE;QAC5B,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a file path relative to repoRoot, rejecting traversal outside the repo.
|
|
3
|
+
* Returns null if the resolved path escapes repoRoot.
|
|
4
|
+
*/
|
|
5
|
+
export function safePath(repoRoot: any, file: any): string | null;
|
|
6
|
+
export function readSourceRange(repoRoot: any, file: any, startLine: any, endLine: any, opts?: {}): string | null;
|
|
7
|
+
export function extractSummary(fileLines: any, line: any, opts?: {}): any;
|
|
8
|
+
export function extractSignature(fileLines: any, line: any, opts?: {}): {
|
|
9
|
+
params: any;
|
|
10
|
+
returnType: any;
|
|
11
|
+
} | null;
|
|
12
|
+
export function createFileLinesReader(repoRoot: any): (file: any) => any;
|
|
13
|
+
export function isFileLikeTarget(target: any): boolean;
|
|
14
|
+
//# sourceMappingURL=file-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../src/shared/file-utils.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,kEAIC;AAED,kHAcC;AAED,0EA6CC;AAED;;;SAoDC;AAED,uDAE+B,SAAI,SAiBlC;AAED,uDAQC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { LANGUAGE_REGISTRY } from '../domain/parser.js';
|
|
4
|
+
import { debug } from '../infrastructure/logger.js';
|
|
5
|
+
/**
|
|
6
|
+
* Resolve a file path relative to repoRoot, rejecting traversal outside the repo.
|
|
7
|
+
* Returns null if the resolved path escapes repoRoot.
|
|
8
|
+
*/
|
|
9
|
+
export function safePath(repoRoot, file) {
|
|
10
|
+
const resolved = path.resolve(repoRoot, file);
|
|
11
|
+
if (!resolved.startsWith(repoRoot + path.sep) && resolved !== repoRoot)
|
|
12
|
+
return null;
|
|
13
|
+
return resolved;
|
|
14
|
+
}
|
|
15
|
+
export function readSourceRange(repoRoot, file, startLine, endLine, opts = {}) {
|
|
16
|
+
try {
|
|
17
|
+
const absPath = safePath(repoRoot, file);
|
|
18
|
+
if (!absPath)
|
|
19
|
+
return null;
|
|
20
|
+
const content = fs.readFileSync(absPath, 'utf-8');
|
|
21
|
+
const lines = content.split('\n');
|
|
22
|
+
const excerptLines = opts.excerptLines ?? 50;
|
|
23
|
+
const start = Math.max(0, (startLine || 1) - 1);
|
|
24
|
+
const end = Math.min(lines.length, endLine || startLine + excerptLines);
|
|
25
|
+
return lines.slice(start, end).join('\n');
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
debug(`readSourceRange failed for ${file}: ${e.message}`);
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function extractSummary(fileLines, line, opts = {}) {
|
|
33
|
+
if (!fileLines || !line || line <= 1)
|
|
34
|
+
return null;
|
|
35
|
+
const idx = line - 2; // line above the definition (0-indexed)
|
|
36
|
+
const jsdocEndScanLines = opts.jsdocEndScanLines ?? 10;
|
|
37
|
+
const jsdocOpenScanLines = opts.jsdocOpenScanLines ?? 20;
|
|
38
|
+
const summaryMaxChars = opts.summaryMaxChars ?? 100;
|
|
39
|
+
// Scan up for JSDoc or comment
|
|
40
|
+
let jsdocEnd = -1;
|
|
41
|
+
for (let i = idx; i >= Math.max(0, idx - jsdocEndScanLines); i--) {
|
|
42
|
+
const trimmed = fileLines[i].trim();
|
|
43
|
+
if (trimmed.endsWith('*/')) {
|
|
44
|
+
jsdocEnd = i;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (trimmed.startsWith('//') || trimmed.startsWith('#')) {
|
|
48
|
+
// Single-line comment immediately above
|
|
49
|
+
const text = trimmed
|
|
50
|
+
.replace(/^\/\/\s*/, '')
|
|
51
|
+
.replace(/^#\s*/, '')
|
|
52
|
+
.trim();
|
|
53
|
+
return text.length > summaryMaxChars ? `${text.slice(0, summaryMaxChars)}...` : text;
|
|
54
|
+
}
|
|
55
|
+
if (trimmed !== '' && !trimmed.startsWith('*') && !trimmed.startsWith('/*'))
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
if (jsdocEnd >= 0) {
|
|
59
|
+
// Find opening /**
|
|
60
|
+
for (let i = jsdocEnd; i >= Math.max(0, jsdocEnd - jsdocOpenScanLines); i--) {
|
|
61
|
+
if (fileLines[i].trim().startsWith('/**')) {
|
|
62
|
+
// Extract first non-tag, non-empty line
|
|
63
|
+
for (let j = i + 1; j <= jsdocEnd; j++) {
|
|
64
|
+
const docLine = fileLines[j]
|
|
65
|
+
.trim()
|
|
66
|
+
.replace(/^\*\s?/, '')
|
|
67
|
+
.trim();
|
|
68
|
+
if (docLine && !docLine.startsWith('@') && docLine !== '/' && docLine !== '*/') {
|
|
69
|
+
return docLine.length > summaryMaxChars
|
|
70
|
+
? `${docLine.slice(0, summaryMaxChars)}...`
|
|
71
|
+
: docLine;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
export function extractSignature(fileLines, line, opts = {}) {
|
|
81
|
+
if (!fileLines || !line)
|
|
82
|
+
return null;
|
|
83
|
+
const idx = line - 1;
|
|
84
|
+
const signatureGatherLines = opts.signatureGatherLines ?? 5;
|
|
85
|
+
// Gather lines to handle multi-line params
|
|
86
|
+
const chunk = fileLines
|
|
87
|
+
.slice(idx, Math.min(fileLines.length, idx + signatureGatherLines))
|
|
88
|
+
.join('\n');
|
|
89
|
+
// JS/TS: function name(params) or (params) => or async function
|
|
90
|
+
let m = chunk.match(/(?:export\s+)?(?:async\s+)?function\s*\*?\s*\w*\s*\(([^)]*)\)\s*(?::\s*([^\n{]+))?/);
|
|
91
|
+
if (m) {
|
|
92
|
+
return {
|
|
93
|
+
params: m[1].trim() || null,
|
|
94
|
+
returnType: m[2] ? m[2].trim().replace(/\s*\{$/, '') : null,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
// Arrow: const name = (params) => or (params):ReturnType =>
|
|
98
|
+
m = chunk.match(/=\s*(?:async\s+)?\(([^)]*)\)\s*(?::\s*([^=>\n{]+))?\s*=>/);
|
|
99
|
+
if (m) {
|
|
100
|
+
return {
|
|
101
|
+
params: m[1].trim() || null,
|
|
102
|
+
returnType: m[2] ? m[2].trim() : null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
// Python: def name(params) -> return:
|
|
106
|
+
m = chunk.match(/def\s+\w+\s*\(([^)]*)\)\s*(?:->\s*([^:\n]+))?/);
|
|
107
|
+
if (m) {
|
|
108
|
+
return {
|
|
109
|
+
params: m[1].trim() || null,
|
|
110
|
+
returnType: m[2] ? m[2].trim() : null,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
// Go: func (recv) name(params) (returns)
|
|
114
|
+
m = chunk.match(/func\s+(?:\([^)]*\)\s+)?\w+\s*\(([^)]*)\)\s*(?:\(([^)]+)\)|(\w[^\n{]*))?/);
|
|
115
|
+
if (m) {
|
|
116
|
+
return {
|
|
117
|
+
params: m[1].trim() || null,
|
|
118
|
+
returnType: (m[2] || m[3] || '').trim() || null,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
// Rust: fn name(params) -> ReturnType
|
|
122
|
+
m = chunk.match(/fn\s+\w+\s*\(([^)]*)\)\s*(?:->\s*([^\n{]+))?/);
|
|
123
|
+
if (m) {
|
|
124
|
+
return {
|
|
125
|
+
params: m[1].trim() || null,
|
|
126
|
+
returnType: m[2] ? m[2].trim() : null,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
export function createFileLinesReader(repoRoot) {
|
|
132
|
+
const cache = new Map();
|
|
133
|
+
return function getFileLines(file) {
|
|
134
|
+
if (cache.has(file))
|
|
135
|
+
return cache.get(file);
|
|
136
|
+
try {
|
|
137
|
+
const absPath = safePath(repoRoot, file);
|
|
138
|
+
if (!absPath) {
|
|
139
|
+
cache.set(file, null);
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const lines = fs.readFileSync(absPath, 'utf-8').split('\n');
|
|
143
|
+
cache.set(file, lines);
|
|
144
|
+
return lines;
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
debug(`getFileLines failed for ${file}: ${e.message}`);
|
|
148
|
+
cache.set(file, null);
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export function isFileLikeTarget(target) {
|
|
154
|
+
if (target.includes('/') || target.includes('\\'))
|
|
155
|
+
return true;
|
|
156
|
+
const ext = path.extname(target).toLowerCase();
|
|
157
|
+
if (!ext)
|
|
158
|
+
return false;
|
|
159
|
+
for (const entry of LANGUAGE_REGISTRY) {
|
|
160
|
+
if (entry.extensions.includes(ext))
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=file-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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 -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generator: stream functions one-by-one using .iterate() for memory efficiency.
|
|
3
|
+
* @param {string} [customDbPath]
|
|
4
|
+
* @param {object} [opts]
|
|
5
|
+
* @param {boolean} [opts.noTests]
|
|
6
|
+
* @param {string} [opts.file]
|
|
7
|
+
* @param {string} [opts.pattern]
|
|
8
|
+
* @yields {{ name: string, kind: string, file: string, line: number, role: string|null }}
|
|
9
|
+
*/
|
|
10
|
+
export function iterListFunctions(customDbPath?: string, opts?: {
|
|
11
|
+
noTests?: boolean | undefined;
|
|
12
|
+
file?: string | undefined;
|
|
13
|
+
pattern?: string | undefined;
|
|
14
|
+
}): Generator<{
|
|
15
|
+
name: any;
|
|
16
|
+
kind: any;
|
|
17
|
+
file: any;
|
|
18
|
+
line: any;
|
|
19
|
+
endLine: any;
|
|
20
|
+
role: any;
|
|
21
|
+
}, void, unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Generator: stream role-classified symbols one-by-one.
|
|
24
|
+
* @param {string} [customDbPath]
|
|
25
|
+
* @param {object} [opts]
|
|
26
|
+
* @param {boolean} [opts.noTests]
|
|
27
|
+
* @param {string} [opts.role]
|
|
28
|
+
* @param {string} [opts.file]
|
|
29
|
+
* @yields {{ name: string, kind: string, file: string, line: number, endLine: number|null, role: string }}
|
|
30
|
+
*/
|
|
31
|
+
export function iterRoles(customDbPath?: string, opts?: {
|
|
32
|
+
noTests?: boolean | undefined;
|
|
33
|
+
role?: string | undefined;
|
|
34
|
+
file?: string | undefined;
|
|
35
|
+
}): Generator<{
|
|
36
|
+
name: any;
|
|
37
|
+
kind: any;
|
|
38
|
+
file: any;
|
|
39
|
+
line: any;
|
|
40
|
+
endLine: any;
|
|
41
|
+
role: any;
|
|
42
|
+
}, void, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Generator: stream symbol lookup results one-by-one.
|
|
45
|
+
* @param {string} target - Symbol name to search for (partial match)
|
|
46
|
+
* @param {string} [customDbPath]
|
|
47
|
+
* @param {object} [opts]
|
|
48
|
+
* @param {boolean} [opts.noTests]
|
|
49
|
+
* @yields {{ name: string, kind: string, file: string, line: number, role: string|null, exported: boolean, uses: object[] }}
|
|
50
|
+
*/
|
|
51
|
+
export function iterWhere(target: string, customDbPath?: string, opts?: {
|
|
52
|
+
noTests?: boolean | undefined;
|
|
53
|
+
}): Generator<{
|
|
54
|
+
name: any;
|
|
55
|
+
kind: any;
|
|
56
|
+
file: any;
|
|
57
|
+
line: any;
|
|
58
|
+
role: any;
|
|
59
|
+
exported: boolean;
|
|
60
|
+
uses: any;
|
|
61
|
+
}, void, unknown>;
|
|
62
|
+
//# sourceMappingURL=generators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../src/shared/generators.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,iDAPW,MAAM,SAEd;IAAuB,OAAO;IACR,IAAI;IACJ,OAAO;CAC7B;;;;;;;kBAqBF;AAED;;;;;;;;GAQG;AACH,yCAPW,MAAM,SAEd;IAAuB,OAAO;IACR,IAAI;IACJ,IAAI;CAC1B;;;;;;;kBAsCF;AAED;;;;;;;GAOG;AACH,kCANW,MAAM,iBACN,MAAM,SAEd;IAAuB,OAAO;CAC9B;;;;;;;;kBAwCF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { iterateFunctionNodes, openReadonlyOrFail } from '../db/index.js';
|
|
2
|
+
import { buildFileConditionSQL } from '../db/query-builder.js';
|
|
3
|
+
import { isTestFile } from '../infrastructure/test-filter.js';
|
|
4
|
+
import { ALL_SYMBOL_KINDS } from './kinds.js';
|
|
5
|
+
/**
|
|
6
|
+
* Generator: stream functions one-by-one using .iterate() for memory efficiency.
|
|
7
|
+
* @param {string} [customDbPath]
|
|
8
|
+
* @param {object} [opts]
|
|
9
|
+
* @param {boolean} [opts.noTests]
|
|
10
|
+
* @param {string} [opts.file]
|
|
11
|
+
* @param {string} [opts.pattern]
|
|
12
|
+
* @yields {{ name: string, kind: string, file: string, line: number, role: string|null }}
|
|
13
|
+
*/
|
|
14
|
+
export function* iterListFunctions(customDbPath, opts = {}) {
|
|
15
|
+
const db = openReadonlyOrFail(customDbPath);
|
|
16
|
+
try {
|
|
17
|
+
const noTests = opts.noTests || false;
|
|
18
|
+
for (const row of iterateFunctionNodes(db, { file: opts.file, pattern: opts.pattern })) {
|
|
19
|
+
if (noTests && isTestFile(row.file))
|
|
20
|
+
continue;
|
|
21
|
+
yield {
|
|
22
|
+
name: row.name,
|
|
23
|
+
kind: row.kind,
|
|
24
|
+
file: row.file,
|
|
25
|
+
line: row.line,
|
|
26
|
+
endLine: row.end_line ?? null,
|
|
27
|
+
role: row.role ?? null,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
db.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generator: stream role-classified symbols one-by-one.
|
|
37
|
+
* @param {string} [customDbPath]
|
|
38
|
+
* @param {object} [opts]
|
|
39
|
+
* @param {boolean} [opts.noTests]
|
|
40
|
+
* @param {string} [opts.role]
|
|
41
|
+
* @param {string} [opts.file]
|
|
42
|
+
* @yields {{ name: string, kind: string, file: string, line: number, endLine: number|null, role: string }}
|
|
43
|
+
*/
|
|
44
|
+
export function* iterRoles(customDbPath, opts = {}) {
|
|
45
|
+
const db = openReadonlyOrFail(customDbPath);
|
|
46
|
+
try {
|
|
47
|
+
const noTests = opts.noTests || false;
|
|
48
|
+
const conditions = ['role IS NOT NULL'];
|
|
49
|
+
const params = [];
|
|
50
|
+
if (opts.role) {
|
|
51
|
+
conditions.push('role = ?');
|
|
52
|
+
params.push(opts.role);
|
|
53
|
+
}
|
|
54
|
+
{
|
|
55
|
+
const fc = buildFileConditionSQL(opts.file, 'file');
|
|
56
|
+
if (fc.sql) {
|
|
57
|
+
conditions.push(fc.sql.replace(/^ AND /, ''));
|
|
58
|
+
params.push(...fc.params);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const stmt = db.prepare(`SELECT name, kind, file, line, end_line, role FROM nodes WHERE ${conditions.join(' AND ')} ORDER BY role, file, line`);
|
|
62
|
+
for (const row of stmt.iterate(...params)) {
|
|
63
|
+
if (noTests && isTestFile(row.file))
|
|
64
|
+
continue;
|
|
65
|
+
yield {
|
|
66
|
+
name: row.name,
|
|
67
|
+
kind: row.kind,
|
|
68
|
+
file: row.file,
|
|
69
|
+
line: row.line,
|
|
70
|
+
endLine: row.end_line ?? null,
|
|
71
|
+
role: row.role ?? null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
db.close();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Generator: stream symbol lookup results one-by-one.
|
|
81
|
+
* @param {string} target - Symbol name to search for (partial match)
|
|
82
|
+
* @param {string} [customDbPath]
|
|
83
|
+
* @param {object} [opts]
|
|
84
|
+
* @param {boolean} [opts.noTests]
|
|
85
|
+
* @yields {{ name: string, kind: string, file: string, line: number, role: string|null, exported: boolean, uses: object[] }}
|
|
86
|
+
*/
|
|
87
|
+
export function* iterWhere(target, customDbPath, opts = {}) {
|
|
88
|
+
const db = openReadonlyOrFail(customDbPath);
|
|
89
|
+
try {
|
|
90
|
+
const noTests = opts.noTests || false;
|
|
91
|
+
const placeholders = ALL_SYMBOL_KINDS.map(() => '?').join(', ');
|
|
92
|
+
const stmt = db.prepare(`SELECT * FROM nodes WHERE name LIKE ? AND kind IN (${placeholders}) ORDER BY file, line`);
|
|
93
|
+
const crossFileCallersStmt = db.prepare(`SELECT COUNT(*) as cnt FROM edges e JOIN nodes n ON e.source_id = n.id
|
|
94
|
+
WHERE e.target_id = ? AND e.kind = 'calls' AND n.file != ?`);
|
|
95
|
+
const usesStmt = db.prepare(`SELECT n.name, n.file, n.line FROM edges e JOIN nodes n ON e.source_id = n.id
|
|
96
|
+
WHERE e.target_id = ? AND e.kind = 'calls'`);
|
|
97
|
+
for (const node of stmt.iterate(`%${target}%`, ...ALL_SYMBOL_KINDS)) {
|
|
98
|
+
if (noTests && isTestFile(node.file))
|
|
99
|
+
continue;
|
|
100
|
+
const crossFileCallers = crossFileCallersStmt.get(node.id, node.file);
|
|
101
|
+
const exported = crossFileCallers.cnt > 0;
|
|
102
|
+
let uses = usesStmt.all(node.id);
|
|
103
|
+
if (noTests)
|
|
104
|
+
uses = uses.filter((u) => !isTestFile(u.file));
|
|
105
|
+
yield {
|
|
106
|
+
name: node.name,
|
|
107
|
+
kind: node.kind,
|
|
108
|
+
file: node.file,
|
|
109
|
+
line: node.line,
|
|
110
|
+
role: node.role || null,
|
|
111
|
+
exported,
|
|
112
|
+
uses: uses.map((u) => ({ name: u.name, file: u.file, line: u.line })),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
db.close();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=generators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../src/shared/generators.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,SAAS,CAAC,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,GAAG,EAAE;IACxD,MAAM,EAAE,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,CAA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,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../src/shared/hierarchy.js"],"names":[],"mappings":"AAEA,2EAwBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getClassHierarchy } from '../db/index.js';
|
|
2
|
+
export function resolveMethodViaHierarchy(db, methodName) {
|
|
3
|
+
const methods = db
|
|
4
|
+
.prepare(`SELECT * FROM nodes WHERE kind = 'method' AND name LIKE ?`)
|
|
5
|
+
.all(`%.${methodName}`);
|
|
6
|
+
const results = [...methods];
|
|
7
|
+
for (const m of methods) {
|
|
8
|
+
const className = m.name.split('.')[0];
|
|
9
|
+
const classNode = db
|
|
10
|
+
.prepare(`SELECT * FROM nodes WHERE name = ? AND kind = 'class' AND file = ?`)
|
|
11
|
+
.get(className, m.file);
|
|
12
|
+
if (!classNode)
|
|
13
|
+
continue;
|
|
14
|
+
const ancestors = getClassHierarchy(db, classNode.id);
|
|
15
|
+
for (const ancestorId of ancestors) {
|
|
16
|
+
const ancestor = db.prepare('SELECT name FROM nodes WHERE id = ?').get(ancestorId);
|
|
17
|
+
if (!ancestor)
|
|
18
|
+
continue;
|
|
19
|
+
const parentMethods = db
|
|
20
|
+
.prepare(`SELECT * FROM nodes WHERE name = ? AND kind = 'method'`)
|
|
21
|
+
.all(`${ancestor.name}.${methodName}`);
|
|
22
|
+
results.push(...parentMethods);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return results;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=hierarchy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy.js","sourceRoot":"","sources":["../../src/shared/hierarchy.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,UAAU,yBAAyB,CAAC,EAAE,EAAE,UAAU;IACtD,MAAM,OAAO,GAAG,EAAE;SACf,OAAO,CAAC,2DAA2D,CAAC;SACpE,GAAG,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,EAAE;aACjB,OAAO,CAAC,oEAAoE,CAAC;aAC7E,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS;YAAE,SAAS;QAEzB,MAAM,SAAS,GAAG,iBAAiB,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;QACtD,KAAK,MAAM,UAAU,IAAI,SAAS,EAAE,CAAC;YACnC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACnF,IAAI,CAAC,QAAQ;gBAAE,SAAS;YACxB,MAAM,aAAa,GAAG,EAAE;iBACrB,OAAO,CAAC,wDAAwD,CAAC;iBACjE,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,IAAI,UAAU,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const CORE_SYMBOL_KINDS: string[];
|
|
2
|
+
export const EXTENDED_SYMBOL_KINDS: string[];
|
|
3
|
+
export const EVERY_SYMBOL_KIND: string[];
|
|
4
|
+
export const ALL_SYMBOL_KINDS: string[];
|
|
5
|
+
export const CORE_EDGE_KINDS: string[];
|
|
6
|
+
export const STRUCTURAL_EDGE_KINDS: string[];
|
|
7
|
+
export const EVERY_EDGE_KIND: string[];
|
|
8
|
+
export const DEAD_ROLE_PREFIX: "dead";
|
|
9
|
+
export const DEAD_SUB_ROLES: string[];
|
|
10
|
+
export const VALID_ROLES: string[];
|
|
11
|
+
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../src/shared/kinds.js"],"names":[],"mappings":"AAEA,yCAWE;AAGF,6CAME;AAGF,yCAAkF;AAGlF,wCAAkD;AAIlD,uCASE;AAGF,6CAAkE;AAGlE,uCAA8E;AAG9E,+BAAgC,MAAM,CAAC;AACvC,sCAAyF;AAEzF,mCASE"}
|