arceus-s 1.6.4
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 +395 -0
- package/dist/_shared/graph/types.d.ts +81 -0
- package/dist/_shared/graph/types.d.ts.map +1 -0
- package/dist/_shared/graph/types.js +8 -0
- package/dist/_shared/graph/types.js.map +1 -0
- package/dist/_shared/index.d.ts +63 -0
- package/dist/_shared/index.d.ts.map +1 -0
- package/dist/_shared/index.js +48 -0
- package/dist/_shared/index.js.map +1 -0
- package/dist/_shared/integrations/circuit-breaker.d.ts +183 -0
- package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -0
- package/dist/_shared/integrations/circuit-breaker.js +236 -0
- package/dist/_shared/integrations/circuit-breaker.js.map +1 -0
- package/dist/_shared/integrations/resilient-fetch.d.ts +99 -0
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -0
- package/dist/_shared/integrations/resilient-fetch.js +204 -0
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -0
- package/dist/_shared/integrations/retry.d.ts +60 -0
- package/dist/_shared/integrations/retry.d.ts.map +1 -0
- package/dist/_shared/integrations/retry.js +67 -0
- package/dist/_shared/integrations/retry.js.map +1 -0
- package/dist/_shared/integrations/understand-quickly.d.ts +77 -0
- package/dist/_shared/integrations/understand-quickly.d.ts.map +1 -0
- package/dist/_shared/integrations/understand-quickly.js +176 -0
- package/dist/_shared/integrations/understand-quickly.js.map +1 -0
- package/dist/_shared/language-detection.d.ts +23 -0
- package/dist/_shared/language-detection.d.ts.map +1 -0
- package/dist/_shared/language-detection.js +139 -0
- package/dist/_shared/language-detection.js.map +1 -0
- package/dist/_shared/languages.d.ts +26 -0
- package/dist/_shared/languages.d.ts.map +1 -0
- package/dist/_shared/languages.js +27 -0
- package/dist/_shared/languages.js.map +1 -0
- package/dist/_shared/lbug/schema-constants.d.ts +16 -0
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -0
- package/dist/_shared/lbug/schema-constants.js +67 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -0
- package/dist/_shared/mro-strategy.d.ts +41 -0
- package/dist/_shared/mro-strategy.d.ts.map +1 -0
- package/dist/_shared/mro-strategy.js +2 -0
- package/dist/_shared/mro-strategy.js.map +1 -0
- package/dist/_shared/pipeline.d.ts +16 -0
- package/dist/_shared/pipeline.d.ts.map +1 -0
- package/dist/_shared/pipeline.js +5 -0
- package/dist/_shared/pipeline.js.map +1 -0
- package/dist/_shared/scope-resolution/def-index.d.ts +36 -0
- package/dist/_shared/scope-resolution/def-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/def-index.js +51 -0
- package/dist/_shared/scope-resolution/def-index.js.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts +69 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.js +84 -0
- package/dist/_shared/scope-resolution/evidence-weights.js.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +149 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js +795 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts +26 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.js +44 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts +106 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.js +98 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.js.map +1 -0
- package/dist/_shared/scope-resolution/module-scope-index.d.ts +46 -0
- package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/module-scope-index.js +58 -0
- package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts +14 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.js +21 -0
- package/dist/_shared/scope-resolution/origin-priority.js.map +1 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts +76 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/parsed-file.js +54 -0
- package/dist/_shared/scope-resolution/parsed-file.js.map +1 -0
- package/dist/_shared/scope-resolution/position-index.d.ts +62 -0
- package/dist/_shared/scope-resolution/position-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/position-index.js +134 -0
- package/dist/_shared/scope-resolution/position-index.js.map +1 -0
- package/dist/_shared/scope-resolution/qualified-name-index.d.ts +44 -0
- package/dist/_shared/scope-resolution/qualified-name-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/qualified-name-index.js +75 -0
- package/dist/_shared/scope-resolution/qualified-name-index.js.map +1 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts +75 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/reference-site.js +24 -0
- package/dist/_shared/scope-resolution/reference-site.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/class-registry.d.ts +27 -0
- package/dist/_shared/scope-resolution/registries/class-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/class-registry.js +30 -0
- package/dist/_shared/scope-resolution/registries/class-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts +69 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/context.js +44 -0
- package/dist/_shared/scope-resolution/registries/context.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/evidence.d.ts +56 -0
- package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/evidence.js +150 -0
- package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/field-registry.d.ts +26 -0
- package/dist/_shared/scope-resolution/registries/field-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/field-registry.js +31 -0
- package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.d.ts +81 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.js +349 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.d.ts +33 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.js +56 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/method-registry.d.ts +36 -0
- package/dist/_shared/scope-resolution/registries/method-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/method-registry.js +32 -0
- package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.d.ts +43 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.js +60 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.js.map +1 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts +53 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.js +126 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.js.map +1 -0
- package/dist/_shared/scope-resolution/scope-id.d.ts +43 -0
- package/dist/_shared/scope-resolution/scope-id.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/scope-id.js +46 -0
- package/dist/_shared/scope-resolution/scope-id.js.map +1 -0
- package/dist/_shared/scope-resolution/scope-tree.d.ts +83 -0
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/scope-tree.js +220 -0
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +63 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.js +122 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.js.map +1 -0
- package/dist/_shared/scope-resolution/shadow/diff.d.ts +59 -0
- package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/shadow/diff.js +79 -0
- package/dist/_shared/scope-resolution/shadow/diff.js.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +34 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.js +12 -0
- package/dist/_shared/scope-resolution/symbol-definition.js.map +1 -0
- package/dist/_shared/scope-resolution/types.d.ts +400 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/types.js +25 -0
- package/dist/_shared/scope-resolution/types.js.map +1 -0
- package/dist/_shared/test-helpers.d.ts +13 -0
- package/dist/_shared/test-helpers.d.ts.map +1 -0
- package/dist/_shared/test-helpers.js +13 -0
- package/dist/_shared/test-helpers.js.map +1 -0
- package/dist/cli/ai-context.d.ts +28 -0
- package/dist/cli/ai-context.js +289 -0
- package/dist/cli/analyze.d.ts +80 -0
- package/dist/cli/analyze.js +525 -0
- package/dist/cli/augment.d.ts +13 -0
- package/dist/cli/augment.js +33 -0
- package/dist/cli/clean.d.ts +10 -0
- package/dist/cli/clean.js +79 -0
- package/dist/cli/cli-message.d.ts +16 -0
- package/dist/cli/cli-message.js +71 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +31 -0
- package/dist/cli/eval-server.d.ts +37 -0
- package/dist/cli/eval-server.js +423 -0
- package/dist/cli/group.d.ts +1 -0
- package/dist/cli/group.js +323 -0
- package/dist/cli/index-repo.d.ts +15 -0
- package/dist/cli/index-repo.js +120 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +492 -0
- package/dist/cli/lazy-action.d.ts +6 -0
- package/dist/cli/lazy-action.js +18 -0
- package/dist/cli/list.d.ts +6 -0
- package/dist/cli/list.js +40 -0
- package/dist/cli/mcp.d.ts +29 -0
- package/dist/cli/mcp.js +73 -0
- package/dist/cli/optional-grammars.d.ts +47 -0
- package/dist/cli/optional-grammars.js +87 -0
- package/dist/cli/publish.d.ts +29 -0
- package/dist/cli/publish.js +174 -0
- package/dist/cli/remove.d.ts +30 -0
- package/dist/cli/remove.js +102 -0
- package/dist/cli/serve.d.ts +4 -0
- package/dist/cli/serve.js +55 -0
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +642 -0
- package/dist/cli/skill-gen.d.ts +26 -0
- package/dist/cli/skill-gen.js +555 -0
- package/dist/cli/status.d.ts +6 -0
- package/dist/cli/status.js +36 -0
- package/dist/cli/tool.d.ts +43 -0
- package/dist/cli/tool.js +169 -0
- package/dist/cli/wiki.d.ts +23 -0
- package/dist/cli/wiki.js +616 -0
- package/dist/config/ignore-service.d.ts +35 -0
- package/dist/config/ignore-service.js +439 -0
- package/dist/config/supported-languages.d.ts +13 -0
- package/dist/config/supported-languages.js +13 -0
- package/dist/core/augmentation/engine.d.ts +26 -0
- package/dist/core/augmentation/engine.js +272 -0
- package/dist/core/embedding-mode.d.ts +51 -0
- package/dist/core/embedding-mode.js +48 -0
- package/dist/core/embeddings/ast-utils.d.ts +22 -0
- package/dist/core/embeddings/ast-utils.js +106 -0
- package/dist/core/embeddings/character-chunk.d.ts +12 -0
- package/dist/core/embeddings/character-chunk.js +43 -0
- package/dist/core/embeddings/chunker.d.ts +14 -0
- package/dist/core/embeddings/chunker.js +239 -0
- package/dist/core/embeddings/config.d.ts +2 -0
- package/dist/core/embeddings/config.js +36 -0
- package/dist/core/embeddings/embedder.d.ts +65 -0
- package/dist/core/embeddings/embedder.js +349 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +68 -0
- package/dist/core/embeddings/embedding-pipeline.js +552 -0
- package/dist/core/embeddings/exact-search.d.ts +15 -0
- package/dist/core/embeddings/exact-search.js +27 -0
- package/dist/core/embeddings/hf-env.d.ts +135 -0
- package/dist/core/embeddings/hf-env.js +232 -0
- package/dist/core/embeddings/http-client.d.ts +37 -0
- package/dist/core/embeddings/http-client.js +199 -0
- package/dist/core/embeddings/index.d.ts +10 -0
- package/dist/core/embeddings/index.js +10 -0
- package/dist/core/embeddings/line-index.d.ts +7 -0
- package/dist/core/embeddings/line-index.js +42 -0
- package/dist/core/embeddings/server-mapping.d.ts +15 -0
- package/dist/core/embeddings/server-mapping.js +33 -0
- package/dist/core/embeddings/structural-extractor.d.ts +15 -0
- package/dist/core/embeddings/structural-extractor.js +58 -0
- package/dist/core/embeddings/text-generator.d.ts +31 -0
- package/dist/core/embeddings/text-generator.js +208 -0
- package/dist/core/embeddings/types.d.ts +211 -0
- package/dist/core/embeddings/types.js +202 -0
- package/dist/core/git-staleness.d.ts +37 -0
- package/dist/core/git-staleness.js +167 -0
- package/dist/core/graph/graph.d.ts +2 -0
- package/dist/core/graph/graph.js +173 -0
- package/dist/core/graph/types.d.ts +36 -0
- package/dist/core/graph/types.js +1 -0
- package/dist/core/group/bridge-db.d.ts +82 -0
- package/dist/core/group/bridge-db.js +609 -0
- package/dist/core/group/bridge-schema.d.ts +27 -0
- package/dist/core/group/bridge-schema.js +55 -0
- package/dist/core/group/config-parser.d.ts +7 -0
- package/dist/core/group/config-parser.js +122 -0
- package/dist/core/group/contract-extractor.d.ts +7 -0
- package/dist/core/group/contract-extractor.js +1 -0
- package/dist/core/group/cross-impact.d.ts +85 -0
- package/dist/core/group/cross-impact.js +515 -0
- package/dist/core/group/extractors/elixir-workspace-extractor.d.ts +15 -0
- package/dist/core/group/extractors/elixir-workspace-extractor.js +204 -0
- package/dist/core/group/extractors/fs-utils.d.ts +10 -0
- package/dist/core/group/extractors/fs-utils.js +24 -0
- package/dist/core/group/extractors/go-workspace-extractor.d.ts +14 -0
- package/dist/core/group/extractors/go-workspace-extractor.js +217 -0
- package/dist/core/group/extractors/grpc-extractor.d.ts +25 -0
- package/dist/core/group/extractors/grpc-extractor.js +414 -0
- package/dist/core/group/extractors/grpc-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/go.js +97 -0
- package/dist/core/group/extractors/grpc-patterns/index.d.ts +19 -0
- package/dist/core/group/extractors/grpc-patterns/index.js +46 -0
- package/dist/core/group/extractors/grpc-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/java.js +173 -0
- package/dist/core/group/extractors/grpc-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/grpc-patterns/node.js +290 -0
- package/dist/core/group/extractors/grpc-patterns/proto.d.ts +9 -0
- package/dist/core/group/extractors/grpc-patterns/proto.js +134 -0
- package/dist/core/group/extractors/grpc-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/python.js +67 -0
- package/dist/core/group/extractors/grpc-patterns/types.d.ts +50 -0
- package/dist/core/group/extractors/grpc-patterns/types.js +1 -0
- package/dist/core/group/extractors/http-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/go.js +215 -0
- package/dist/core/group/extractors/http-patterns/index.d.ts +17 -0
- package/dist/core/group/extractors/http-patterns/index.js +44 -0
- package/dist/core/group/extractors/http-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/java.js +253 -0
- package/dist/core/group/extractors/http-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/http-patterns/node.js +484 -0
- package/dist/core/group/extractors/http-patterns/php.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/php.js +178 -0
- package/dist/core/group/extractors/http-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/python.js +308 -0
- package/dist/core/group/extractors/http-patterns/types.d.ts +61 -0
- package/dist/core/group/extractors/http-patterns/types.js +1 -0
- package/dist/core/group/extractors/http-route-extractor.d.ts +21 -0
- package/dist/core/group/extractors/http-route-extractor.js +430 -0
- package/dist/core/group/extractors/include-extractor.d.ts +39 -0
- package/dist/core/group/extractors/include-extractor.js +566 -0
- package/dist/core/group/extractors/java-workspace-extractor.d.ts +16 -0
- package/dist/core/group/extractors/java-workspace-extractor.js +204 -0
- package/dist/core/group/extractors/manifest-extractor.d.ts +54 -0
- package/dist/core/group/extractors/manifest-extractor.js +320 -0
- package/dist/core/group/extractors/node-workspace-extractor.d.ts +14 -0
- package/dist/core/group/extractors/node-workspace-extractor.js +207 -0
- package/dist/core/group/extractors/python-workspace-extractor.d.ts +15 -0
- package/dist/core/group/extractors/python-workspace-extractor.js +205 -0
- package/dist/core/group/extractors/rust-workspace-extractor.d.ts +44 -0
- package/dist/core/group/extractors/rust-workspace-extractor.js +240 -0
- package/dist/core/group/extractors/thrift-extractor.d.ts +22 -0
- package/dist/core/group/extractors/thrift-extractor.js +283 -0
- package/dist/core/group/extractors/thrift-patterns/index.d.ts +4 -0
- package/dist/core/group/extractors/thrift-patterns/index.js +10 -0
- package/dist/core/group/extractors/thrift-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/thrift-patterns/java.js +220 -0
- package/dist/core/group/extractors/thrift-patterns/types.d.ts +17 -0
- package/dist/core/group/extractors/thrift-patterns/types.js +1 -0
- package/dist/core/group/extractors/topic-extractor.d.ts +8 -0
- package/dist/core/group/extractors/topic-extractor.js +97 -0
- package/dist/core/group/extractors/topic-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/go.js +120 -0
- package/dist/core/group/extractors/topic-patterns/index.d.ts +14 -0
- package/dist/core/group/extractors/topic-patterns/index.js +38 -0
- package/dist/core/group/extractors/topic-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/java.js +80 -0
- package/dist/core/group/extractors/topic-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/topic-patterns/node.js +155 -0
- package/dist/core/group/extractors/topic-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/python.js +116 -0
- package/dist/core/group/extractors/topic-patterns/types.d.ts +25 -0
- package/dist/core/group/extractors/topic-patterns/types.js +10 -0
- package/dist/core/group/extractors/tree-sitter-scanner.d.ts +113 -0
- package/dist/core/group/extractors/tree-sitter-scanner.js +95 -0
- package/dist/core/group/extractors/workspace-extractor.d.ts +13 -0
- package/dist/core/group/extractors/workspace-extractor.js +65 -0
- package/dist/core/group/group-path-utils.d.ts +17 -0
- package/dist/core/group/group-path-utils.js +40 -0
- package/dist/core/group/matching.d.ts +13 -0
- package/dist/core/group/matching.js +284 -0
- package/dist/core/group/normalization.d.ts +3 -0
- package/dist/core/group/normalization.js +115 -0
- package/dist/core/group/resolve-at-member.d.ts +10 -0
- package/dist/core/group/resolve-at-member.js +31 -0
- package/dist/core/group/service-boundary-detector.d.ts +8 -0
- package/dist/core/group/service-boundary-detector.js +155 -0
- package/dist/core/group/service.d.ts +56 -0
- package/dist/core/group/service.js +395 -0
- package/dist/core/group/storage.d.ts +9 -0
- package/dist/core/group/storage.js +157 -0
- package/dist/core/group/sync.d.ts +21 -0
- package/dist/core/group/sync.js +267 -0
- package/dist/core/group/types.d.ts +181 -0
- package/dist/core/group/types.js +1 -0
- package/dist/core/incremental/shadow-candidates.d.ts +44 -0
- package/dist/core/incremental/shadow-candidates.js +74 -0
- package/dist/core/incremental/subgraph-extract.d.ts +64 -0
- package/dist/core/incremental/subgraph-extract.js +111 -0
- package/dist/core/ingestion/ast-cache.d.ts +26 -0
- package/dist/core/ingestion/ast-cache.js +48 -0
- package/dist/core/ingestion/binding-accumulator.d.ts +212 -0
- package/dist/core/ingestion/binding-accumulator.js +336 -0
- package/dist/core/ingestion/call-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/c-cpp.js +8 -0
- package/dist/core/ingestion/call-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/csharp.js +6 -0
- package/dist/core/ingestion/call-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/dart.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/go.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/jvm.js +51 -0
- package/dist/core/ingestion/call-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/php.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/python.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/ruby.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/rust.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/swift.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/typescript-javascript.js +8 -0
- package/dist/core/ingestion/call-extractors/generic.d.ts +5 -0
- package/dist/core/ingestion/call-extractors/generic.js +59 -0
- package/dist/core/ingestion/call-processor.d.ts +235 -0
- package/dist/core/ingestion/call-processor.js +2754 -0
- package/dist/core/ingestion/call-routing.d.ts +55 -0
- package/dist/core/ingestion/call-routing.js +95 -0
- package/dist/core/ingestion/call-types.d.ts +135 -0
- package/dist/core/ingestion/call-types.js +2 -0
- package/dist/core/ingestion/class-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/class-extractors/configs/c-cpp.js +11 -0
- package/dist/core/ingestion/class-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/csharp.js +21 -0
- package/dist/core/ingestion/class-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/dart.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/go.js +20 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.js +35 -0
- package/dist/core/ingestion/class-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/php.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/python.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/ruby.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/rust.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/swift.js +18 -0
- package/dist/core/ingestion/class-extractors/configs/typescript-javascript.d.ts +4 -0
- package/dist/core/ingestion/class-extractors/configs/typescript-javascript.js +28 -0
- package/dist/core/ingestion/class-extractors/generic.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/generic.js +135 -0
- package/dist/core/ingestion/class-types.d.ts +34 -0
- package/dist/core/ingestion/class-types.js +1 -0
- package/dist/core/ingestion/cluster-enricher.d.ts +38 -0
- package/dist/core/ingestion/cluster-enricher.js +169 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.d.ts +57 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.js +376 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +212 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1727 -0
- package/dist/core/ingestion/cobol/jcl-parser.d.ts +68 -0
- package/dist/core/ingestion/cobol/jcl-parser.js +217 -0
- package/dist/core/ingestion/cobol/jcl-processor.d.ts +33 -0
- package/dist/core/ingestion/cobol/jcl-processor.js +229 -0
- package/dist/core/ingestion/cobol-processor.d.ts +54 -0
- package/dist/core/ingestion/cobol-processor.js +1232 -0
- package/dist/core/ingestion/community-processor.d.ts +39 -0
- package/dist/core/ingestion/community-processor.js +336 -0
- package/dist/core/ingestion/constants.d.ts +17 -0
- package/dist/core/ingestion/constants.js +21 -0
- package/dist/core/ingestion/cpp-ue-preprocessor.d.ts +12 -0
- package/dist/core/ingestion/cpp-ue-preprocessor.js +260 -0
- package/dist/core/ingestion/emit-references.d.ts +88 -0
- package/dist/core/ingestion/emit-references.js +229 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +40 -0
- package/dist/core/ingestion/entry-point-scoring.js +196 -0
- package/dist/core/ingestion/export-detection.d.ts +57 -0
- package/dist/core/ingestion/export-detection.js +233 -0
- package/dist/core/ingestion/field-extractor.d.ts +29 -0
- package/dist/core/ingestion/field-extractor.js +25 -0
- package/dist/core/ingestion/field-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/c-cpp.js +104 -0
- package/dist/core/ingestion/field-extractors/configs/csharp.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/csharp.js +121 -0
- package/dist/core/ingestion/field-extractors/configs/dart.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/dart.js +78 -0
- package/dist/core/ingestion/field-extractors/configs/go.d.ts +11 -0
- package/dist/core/ingestion/field-extractors/configs/go.js +60 -0
- package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +53 -0
- package/dist/core/ingestion/field-extractors/configs/helpers.js +158 -0
- package/dist/core/ingestion/field-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/jvm.js +118 -0
- package/dist/core/ingestion/field-extractors/configs/php.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/php.js +65 -0
- package/dist/core/ingestion/field-extractors/configs/python.d.ts +12 -0
- package/dist/core/ingestion/field-extractors/configs/python.js +91 -0
- package/dist/core/ingestion/field-extractors/configs/ruby.d.ts +16 -0
- package/dist/core/ingestion/field-extractors/configs/ruby.js +76 -0
- package/dist/core/ingestion/field-extractors/configs/rust.d.ts +9 -0
- package/dist/core/ingestion/field-extractors/configs/rust.js +52 -0
- package/dist/core/ingestion/field-extractors/configs/swift.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/swift.js +65 -0
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +56 -0
- package/dist/core/ingestion/field-extractors/generic.d.ts +49 -0
- package/dist/core/ingestion/field-extractors/generic.js +117 -0
- package/dist/core/ingestion/field-extractors/typescript.d.ts +77 -0
- package/dist/core/ingestion/field-extractors/typescript.js +291 -0
- package/dist/core/ingestion/field-types.d.ts +61 -0
- package/dist/core/ingestion/field-types.js +2 -0
- package/dist/core/ingestion/filesystem-walker.d.ts +28 -0
- package/dist/core/ingestion/filesystem-walker.js +92 -0
- package/dist/core/ingestion/finalize-orchestrator.d.ts +63 -0
- package/dist/core/ingestion/finalize-orchestrator.js +142 -0
- package/dist/core/ingestion/framework-detection.d.ts +30 -0
- package/dist/core/ingestion/framework-detection.js +428 -0
- package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +13 -0
- package/dist/core/ingestion/heritage-extractors/configs/go.js +20 -0
- package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +18 -0
- package/dist/core/ingestion/heritage-extractors/configs/ruby.js +65 -0
- package/dist/core/ingestion/heritage-extractors/generic.d.ts +23 -0
- package/dist/core/ingestion/heritage-extractors/generic.js +47 -0
- package/dist/core/ingestion/heritage-processor.d.ts +54 -0
- package/dist/core/ingestion/heritage-processor.js +367 -0
- package/dist/core/ingestion/heritage-types.d.ts +73 -0
- package/dist/core/ingestion/heritage-types.js +2 -0
- package/dist/core/ingestion/import-processor.d.ts +23 -0
- package/dist/core/ingestion/import-processor.js +377 -0
- package/dist/core/ingestion/import-resolvers/configs/c-cpp.d.ts +7 -0
- package/dist/core/ingestion/import-resolvers/configs/c-cpp.js +14 -0
- package/dist/core/ingestion/import-resolvers/configs/csharp.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/csharp.js +27 -0
- package/dist/core/ingestion/import-resolvers/configs/dart.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/configs/dart.js +54 -0
- package/dist/core/ingestion/import-resolvers/configs/go.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/go.js +26 -0
- package/dist/core/ingestion/import-resolvers/configs/jvm.d.ts +13 -0
- package/dist/core/ingestion/import-resolvers/configs/jvm.js +68 -0
- package/dist/core/ingestion/import-resolvers/configs/php.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/php.js +15 -0
- package/dist/core/ingestion/import-resolvers/configs/python.d.ts +12 -0
- package/dist/core/ingestion/import-resolvers/configs/python.js +41 -0
- package/dist/core/ingestion/import-resolvers/configs/ruby.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/ruby.js +16 -0
- package/dist/core/ingestion/import-resolvers/configs/rust.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/rust.js +54 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.js +29 -0
- package/dist/core/ingestion/import-resolvers/configs/typescript-javascript.d.ts +9 -0
- package/dist/core/ingestion/import-resolvers/configs/typescript-javascript.js +23 -0
- package/dist/core/ingestion/import-resolvers/csharp.d.ts +18 -0
- package/dist/core/ingestion/import-resolvers/csharp.js +115 -0
- package/dist/core/ingestion/import-resolvers/go.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/go.js +46 -0
- package/dist/core/ingestion/import-resolvers/jvm.d.ts +27 -0
- package/dist/core/ingestion/import-resolvers/jvm.js +106 -0
- package/dist/core/ingestion/import-resolvers/php.d.ts +24 -0
- package/dist/core/ingestion/import-resolvers/php.js +77 -0
- package/dist/core/ingestion/import-resolvers/python.d.ts +22 -0
- package/dist/core/ingestion/import-resolvers/python.js +72 -0
- package/dist/core/ingestion/import-resolvers/resolver-factory.d.ts +24 -0
- package/dist/core/ingestion/import-resolvers/resolver-factory.js +33 -0
- package/dist/core/ingestion/import-resolvers/ruby.d.ts +14 -0
- package/dist/core/ingestion/import-resolvers/ruby.js +17 -0
- package/dist/core/ingestion/import-resolvers/rust.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/rust.js +75 -0
- package/dist/core/ingestion/import-resolvers/standard.d.ts +35 -0
- package/dist/core/ingestion/import-resolvers/standard.js +168 -0
- package/dist/core/ingestion/import-resolvers/types.d.ts +68 -0
- package/dist/core/ingestion/import-resolvers/types.js +6 -0
- package/dist/core/ingestion/import-resolvers/utils.d.ts +35 -0
- package/dist/core/ingestion/import-resolvers/utils.js +153 -0
- package/dist/core/ingestion/import-target-adapter.d.ts +73 -0
- package/dist/core/ingestion/import-target-adapter.js +95 -0
- package/dist/core/ingestion/language-config.d.ts +52 -0
- package/dist/core/ingestion/language-config.js +182 -0
- package/dist/core/ingestion/language-provider.d.ts +465 -0
- package/dist/core/ingestion/language-provider.js +24 -0
- package/dist/core/ingestion/languages/c/arity-metadata.d.ts +14 -0
- package/dist/core/ingestion/languages/c/arity-metadata.js +94 -0
- package/dist/core/ingestion/languages/c/arity.d.ts +6 -0
- package/dist/core/ingestion/languages/c/arity.js +18 -0
- package/dist/core/ingestion/languages/c/captures.d.ts +2 -0
- package/dist/core/ingestion/languages/c/captures.js +105 -0
- package/dist/core/ingestion/languages/c/header-scan.d.ts +7 -0
- package/dist/core/ingestion/languages/c/header-scan.js +55 -0
- package/dist/core/ingestion/languages/c/import-decomposer.d.ts +8 -0
- package/dist/core/ingestion/languages/c/import-decomposer.js +50 -0
- package/dist/core/ingestion/languages/c/import-target.d.ts +14 -0
- package/dist/core/ingestion/languages/c/import-target.js +57 -0
- package/dist/core/ingestion/languages/c/index.d.ts +11 -0
- package/dist/core/ingestion/languages/c/index.js +11 -0
- package/dist/core/ingestion/languages/c/interpret.d.ts +14 -0
- package/dist/core/ingestion/languages/c/interpret.js +48 -0
- package/dist/core/ingestion/languages/c/merge-bindings.d.ts +7 -0
- package/dist/core/ingestion/languages/c/merge-bindings.js +23 -0
- package/dist/core/ingestion/languages/c/query.d.ts +3 -0
- package/dist/core/ingestion/languages/c/query.js +161 -0
- package/dist/core/ingestion/languages/c/scope-resolver.d.ts +13 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +60 -0
- package/dist/core/ingestion/languages/c/simple-hooks.d.ts +14 -0
- package/dist/core/ingestion/languages/c/simple-hooks.js +19 -0
- package/dist/core/ingestion/languages/c/static-linkage.d.ts +13 -0
- package/dist/core/ingestion/languages/c/static-linkage.js +57 -0
- package/dist/core/ingestion/languages/c-cpp.d.ts +12 -0
- package/dist/core/ingestion/languages/c-cpp.js +411 -0
- package/dist/core/ingestion/languages/cobol.d.ts +1 -0
- package/dist/core/ingestion/languages/cobol.js +28 -0
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.d.ts +21 -0
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.js +56 -0
- package/dist/core/ingestion/languages/csharp/arity-metadata.d.ts +26 -0
- package/dist/core/ingestion/languages/csharp/arity-metadata.js +46 -0
- package/dist/core/ingestion/languages/csharp/arity.d.ts +23 -0
- package/dist/core/ingestion/languages/csharp/arity.js +37 -0
- package/dist/core/ingestion/languages/csharp/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/csharp/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/csharp/captures.d.ts +19 -0
- package/dist/core/ingestion/languages/csharp/captures.js +346 -0
- package/dist/core/ingestion/languages/csharp/import-decomposer.d.ts +19 -0
- package/dist/core/ingestion/languages/csharp/import-decomposer.js +93 -0
- package/dist/core/ingestion/languages/csharp/import-target.d.ts +25 -0
- package/dist/core/ingestion/languages/csharp/import-target.js +123 -0
- package/dist/core/ingestion/languages/csharp/index.d.ts +82 -0
- package/dist/core/ingestion/languages/csharp/index.js +82 -0
- package/dist/core/ingestion/languages/csharp/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/csharp/interpret.js +132 -0
- package/dist/core/ingestion/languages/csharp/merge-bindings.d.ts +27 -0
- package/dist/core/ingestion/languages/csharp/merge-bindings.js +55 -0
- package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +51 -0
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +387 -0
- package/dist/core/ingestion/languages/csharp/query.d.ts +35 -0
- package/dist/core/ingestion/languages/csharp/query.js +521 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.d.ts +31 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.js +135 -0
- package/dist/core/ingestion/languages/csharp/scope-resolver.d.ts +10 -0
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +63 -0
- package/dist/core/ingestion/languages/csharp/simple-hooks.d.ts +53 -0
- package/dist/core/ingestion/languages/csharp/simple-hooks.js +76 -0
- package/dist/core/ingestion/languages/csharp.d.ts +8 -0
- package/dist/core/ingestion/languages/csharp.js +201 -0
- package/dist/core/ingestion/languages/dart.d.ts +12 -0
- package/dist/core/ingestion/languages/dart.js +138 -0
- package/dist/core/ingestion/languages/go/arity-metadata.d.ts +8 -0
- package/dist/core/ingestion/languages/go/arity-metadata.js +37 -0
- package/dist/core/ingestion/languages/go/arity.d.ts +2 -0
- package/dist/core/ingestion/languages/go/arity.js +14 -0
- package/dist/core/ingestion/languages/go/cache-stats.d.ts +7 -0
- package/dist/core/ingestion/languages/go/cache-stats.js +15 -0
- package/dist/core/ingestion/languages/go/captures.d.ts +2 -0
- package/dist/core/ingestion/languages/go/captures.js +129 -0
- package/dist/core/ingestion/languages/go/expand-wildcards.d.ts +15 -0
- package/dist/core/ingestion/languages/go/expand-wildcards.js +93 -0
- package/dist/core/ingestion/languages/go/import-decomposer.d.ts +3 -0
- package/dist/core/ingestion/languages/go/import-decomposer.js +44 -0
- package/dist/core/ingestion/languages/go/import-target.d.ts +21 -0
- package/dist/core/ingestion/languages/go/import-target.js +67 -0
- package/dist/core/ingestion/languages/go/index.d.ts +17 -0
- package/dist/core/ingestion/languages/go/index.js +17 -0
- package/dist/core/ingestion/languages/go/interface-impls.d.ts +4 -0
- package/dist/core/ingestion/languages/go/interface-impls.js +72 -0
- package/dist/core/ingestion/languages/go/interpret.d.ts +11 -0
- package/dist/core/ingestion/languages/go/interpret.js +146 -0
- package/dist/core/ingestion/languages/go/merge-bindings.d.ts +2 -0
- package/dist/core/ingestion/languages/go/merge-bindings.js +18 -0
- package/dist/core/ingestion/languages/go/method-owners.d.ts +17 -0
- package/dist/core/ingestion/languages/go/method-owners.js +96 -0
- package/dist/core/ingestion/languages/go/namespace-mirror.d.ts +15 -0
- package/dist/core/ingestion/languages/go/namespace-mirror.js +53 -0
- package/dist/core/ingestion/languages/go/package-siblings.d.ts +11 -0
- package/dist/core/ingestion/languages/go/package-siblings.js +84 -0
- package/dist/core/ingestion/languages/go/query.d.ts +3 -0
- package/dist/core/ingestion/languages/go/query.js +207 -0
- package/dist/core/ingestion/languages/go/range-binding.d.ts +8 -0
- package/dist/core/ingestion/languages/go/range-binding.js +109 -0
- package/dist/core/ingestion/languages/go/receiver-binding.d.ts +3 -0
- package/dist/core/ingestion/languages/go/receiver-binding.js +21 -0
- package/dist/core/ingestion/languages/go/scope-resolver.d.ts +2 -0
- package/dist/core/ingestion/languages/go/scope-resolver.js +33 -0
- package/dist/core/ingestion/languages/go/simple-hooks.d.ts +4 -0
- package/dist/core/ingestion/languages/go/simple-hooks.js +21 -0
- package/dist/core/ingestion/languages/go/type-binding.d.ts +3 -0
- package/dist/core/ingestion/languages/go/type-binding.js +237 -0
- package/dist/core/ingestion/languages/go.d.ts +11 -0
- package/dist/core/ingestion/languages/go.js +94 -0
- package/dist/core/ingestion/languages/index.d.ts +39 -0
- package/dist/core/ingestion/languages/index.js +64 -0
- package/dist/core/ingestion/languages/java/arity-metadata.d.ts +18 -0
- package/dist/core/ingestion/languages/java/arity-metadata.js +40 -0
- package/dist/core/ingestion/languages/java/arity.d.ts +10 -0
- package/dist/core/ingestion/languages/java/arity.js +24 -0
- package/dist/core/ingestion/languages/java/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/java/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/java/captures.d.ts +17 -0
- package/dist/core/ingestion/languages/java/captures.js +187 -0
- package/dist/core/ingestion/languages/java/import-decomposer.d.ts +18 -0
- package/dist/core/ingestion/languages/java/import-decomposer.js +85 -0
- package/dist/core/ingestion/languages/java/import-target.d.ts +17 -0
- package/dist/core/ingestion/languages/java/import-target.js +100 -0
- package/dist/core/ingestion/languages/java/index.d.ts +29 -0
- package/dist/core/ingestion/languages/java/index.js +29 -0
- package/dist/core/ingestion/languages/java/interpret.d.ts +13 -0
- package/dist/core/ingestion/languages/java/interpret.js +131 -0
- package/dist/core/ingestion/languages/java/merge-bindings.d.ts +12 -0
- package/dist/core/ingestion/languages/java/merge-bindings.js +40 -0
- package/dist/core/ingestion/languages/java/query.d.ts +30 -0
- package/dist/core/ingestion/languages/java/query.js +192 -0
- package/dist/core/ingestion/languages/java/receiver-binding.d.ts +11 -0
- package/dist/core/ingestion/languages/java/receiver-binding.js +95 -0
- package/dist/core/ingestion/languages/java/scope-resolver.d.ts +50 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +74 -0
- package/dist/core/ingestion/languages/java/simple-hooks.d.ts +13 -0
- package/dist/core/ingestion/languages/java/simple-hooks.js +34 -0
- package/dist/core/ingestion/languages/java.d.ts +9 -0
- package/dist/core/ingestion/languages/java.js +76 -0
- package/dist/core/ingestion/languages/kotlin.d.ts +9 -0
- package/dist/core/ingestion/languages/kotlin.js +164 -0
- package/dist/core/ingestion/languages/php/arity-metadata.d.ts +28 -0
- package/dist/core/ingestion/languages/php/arity-metadata.js +63 -0
- package/dist/core/ingestion/languages/php/arity.d.ts +25 -0
- package/dist/core/ingestion/languages/php/arity.js +40 -0
- package/dist/core/ingestion/languages/php/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/php/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/php/captures.d.ts +34 -0
- package/dist/core/ingestion/languages/php/captures.js +739 -0
- package/dist/core/ingestion/languages/php/import-decomposer.d.ts +28 -0
- package/dist/core/ingestion/languages/php/import-decomposer.js +265 -0
- package/dist/core/ingestion/languages/php/import-target.d.ts +47 -0
- package/dist/core/ingestion/languages/php/import-target.js +100 -0
- package/dist/core/ingestion/languages/php/index.d.ts +68 -0
- package/dist/core/ingestion/languages/php/index.js +72 -0
- package/dist/core/ingestion/languages/php/interpret.d.ts +36 -0
- package/dist/core/ingestion/languages/php/interpret.js +241 -0
- package/dist/core/ingestion/languages/php/merge-bindings.d.ts +19 -0
- package/dist/core/ingestion/languages/php/merge-bindings.js +47 -0
- package/dist/core/ingestion/languages/php/namespace-siblings.d.ts +51 -0
- package/dist/core/ingestion/languages/php/namespace-siblings.js +288 -0
- package/dist/core/ingestion/languages/php/query.d.ts +32 -0
- package/dist/core/ingestion/languages/php/query.js +326 -0
- package/dist/core/ingestion/languages/php/receiver-binding.d.ts +36 -0
- package/dist/core/ingestion/languages/php/receiver-binding.js +128 -0
- package/dist/core/ingestion/languages/php/scope-resolver.d.ts +23 -0
- package/dist/core/ingestion/languages/php/scope-resolver.js +358 -0
- package/dist/core/ingestion/languages/php/simple-hooks.d.ts +42 -0
- package/dist/core/ingestion/languages/php/simple-hooks.js +111 -0
- package/dist/core/ingestion/languages/php.d.ts +1 -0
- package/dist/core/ingestion/languages/php.js +290 -0
- package/dist/core/ingestion/languages/python/arity-metadata.d.ts +24 -0
- package/dist/core/ingestion/languages/python/arity-metadata.js +45 -0
- package/dist/core/ingestion/languages/python/arity.d.ts +22 -0
- package/dist/core/ingestion/languages/python/arity.js +38 -0
- package/dist/core/ingestion/languages/python/cache-stats.d.ts +17 -0
- package/dist/core/ingestion/languages/python/cache-stats.js +28 -0
- package/dist/core/ingestion/languages/python/captures.d.ts +19 -0
- package/dist/core/ingestion/languages/python/captures.js +130 -0
- package/dist/core/ingestion/languages/python/import-decomposer.d.ts +15 -0
- package/dist/core/ingestion/languages/python/import-decomposer.js +112 -0
- package/dist/core/ingestion/languages/python/import-target.d.ts +21 -0
- package/dist/core/ingestion/languages/python/import-target.js +195 -0
- package/dist/core/ingestion/languages/python/index.d.ts +80 -0
- package/dist/core/ingestion/languages/python/index.js +80 -0
- package/dist/core/ingestion/languages/python/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/python/interpret.js +191 -0
- package/dist/core/ingestion/languages/python/merge-bindings.d.ts +16 -0
- package/dist/core/ingestion/languages/python/merge-bindings.js +44 -0
- package/dist/core/ingestion/languages/python/query.d.ts +9 -0
- package/dist/core/ingestion/languages/python/query.js +267 -0
- package/dist/core/ingestion/languages/python/receiver-binding.d.ts +21 -0
- package/dist/core/ingestion/languages/python/receiver-binding.js +116 -0
- package/dist/core/ingestion/languages/python/scope-resolver.d.ts +16 -0
- package/dist/core/ingestion/languages/python/scope-resolver.js +53 -0
- package/dist/core/ingestion/languages/python/simple-hooks.d.ts +25 -0
- package/dist/core/ingestion/languages/python/simple-hooks.js +43 -0
- package/dist/core/ingestion/languages/python.d.ts +12 -0
- package/dist/core/ingestion/languages/python.js +133 -0
- package/dist/core/ingestion/languages/ruby.d.ts +9 -0
- package/dist/core/ingestion/languages/ruby.js +235 -0
- package/dist/core/ingestion/languages/rust.d.ts +12 -0
- package/dist/core/ingestion/languages/rust.js +167 -0
- package/dist/core/ingestion/languages/swift.d.ts +12 -0
- package/dist/core/ingestion/languages/swift.js +312 -0
- package/dist/core/ingestion/languages/typescript/arity-metadata.d.ts +59 -0
- package/dist/core/ingestion/languages/typescript/arity-metadata.js +103 -0
- package/dist/core/ingestion/languages/typescript/arity.d.ts +37 -0
- package/dist/core/ingestion/languages/typescript/arity.js +54 -0
- package/dist/core/ingestion/languages/typescript/cache-stats.d.ts +17 -0
- package/dist/core/ingestion/languages/typescript/cache-stats.js +28 -0
- package/dist/core/ingestion/languages/typescript/captures.d.ts +28 -0
- package/dist/core/ingestion/languages/typescript/captures.js +474 -0
- package/dist/core/ingestion/languages/typescript/import-decomposer.d.ts +49 -0
- package/dist/core/ingestion/languages/typescript/import-decomposer.js +371 -0
- package/dist/core/ingestion/languages/typescript/import-target.d.ts +50 -0
- package/dist/core/ingestion/languages/typescript/import-target.js +61 -0
- package/dist/core/ingestion/languages/typescript/index.d.ts +94 -0
- package/dist/core/ingestion/languages/typescript/index.js +94 -0
- package/dist/core/ingestion/languages/typescript/interpret.d.ts +35 -0
- package/dist/core/ingestion/languages/typescript/interpret.js +317 -0
- package/dist/core/ingestion/languages/typescript/merge-bindings.d.ts +62 -0
- package/dist/core/ingestion/languages/typescript/merge-bindings.js +158 -0
- package/dist/core/ingestion/languages/typescript/query.d.ts +84 -0
- package/dist/core/ingestion/languages/typescript/query.js +978 -0
- package/dist/core/ingestion/languages/typescript/receiver-binding.d.ts +59 -0
- package/dist/core/ingestion/languages/typescript/receiver-binding.js +171 -0
- package/dist/core/ingestion/languages/typescript/scope-resolver.d.ts +16 -0
- package/dist/core/ingestion/languages/typescript/scope-resolver.js +113 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.d.ts +71 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.js +131 -0
- package/dist/core/ingestion/languages/typescript.d.ts +11 -0
- package/dist/core/ingestion/languages/typescript.js +324 -0
- package/dist/core/ingestion/languages/vue.d.ts +13 -0
- package/dist/core/ingestion/languages/vue.js +79 -0
- package/dist/core/ingestion/markdown-processor.d.ts +17 -0
- package/dist/core/ingestion/markdown-processor.js +124 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.js +387 -0
- package/dist/core/ingestion/method-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/csharp.js +287 -0
- package/dist/core/ingestion/method-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/dart.js +376 -0
- package/dist/core/ingestion/method-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/go.js +176 -0
- package/dist/core/ingestion/method-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/jvm.js +336 -0
- package/dist/core/ingestion/method-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/php.js +304 -0
- package/dist/core/ingestion/method-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/python.js +309 -0
- package/dist/core/ingestion/method-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/ruby.js +286 -0
- package/dist/core/ingestion/method-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/rust.js +195 -0
- package/dist/core/ingestion/method-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/swift.js +276 -0
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.js +338 -0
- package/dist/core/ingestion/method-extractors/generic.d.ts +11 -0
- package/dist/core/ingestion/method-extractors/generic.js +205 -0
- package/dist/core/ingestion/method-types.d.ts +90 -0
- package/dist/core/ingestion/method-types.js +2 -0
- package/dist/core/ingestion/model/field-registry.d.ts +18 -0
- package/dist/core/ingestion/model/field-registry.js +22 -0
- package/dist/core/ingestion/model/heritage-map.d.ts +105 -0
- package/dist/core/ingestion/model/heritage-map.js +260 -0
- package/dist/core/ingestion/model/index.d.ts +20 -0
- package/dist/core/ingestion/model/index.js +43 -0
- package/dist/core/ingestion/model/method-registry.d.ts +71 -0
- package/dist/core/ingestion/model/method-registry.js +134 -0
- package/dist/core/ingestion/model/registration-table.d.ts +138 -0
- package/dist/core/ingestion/model/registration-table.js +224 -0
- package/dist/core/ingestion/model/resolution-context.d.ts +93 -0
- package/dist/core/ingestion/model/resolution-context.js +337 -0
- package/dist/core/ingestion/model/resolve.d.ts +61 -0
- package/dist/core/ingestion/model/resolve.js +401 -0
- package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +72 -0
- package/dist/core/ingestion/model/scope-resolution-indexes.js +42 -0
- package/dist/core/ingestion/model/semantic-model.d.ts +150 -0
- package/dist/core/ingestion/model/semantic-model.js +175 -0
- package/dist/core/ingestion/model/symbol-table.d.ts +200 -0
- package/dist/core/ingestion/model/symbol-table.js +206 -0
- package/dist/core/ingestion/model/type-registry.d.ts +39 -0
- package/dist/core/ingestion/model/type-registry.js +62 -0
- package/dist/core/ingestion/mro-processor.d.ts +46 -0
- package/dist/core/ingestion/mro-processor.js +597 -0
- package/dist/core/ingestion/named-bindings/csharp.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/csharp.js +37 -0
- package/dist/core/ingestion/named-bindings/java.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/java.js +29 -0
- package/dist/core/ingestion/named-bindings/kotlin.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/kotlin.js +36 -0
- package/dist/core/ingestion/named-bindings/php.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/php.js +61 -0
- package/dist/core/ingestion/named-bindings/python.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/python.js +49 -0
- package/dist/core/ingestion/named-bindings/rust.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/rust.js +66 -0
- package/dist/core/ingestion/named-bindings/types.d.ts +16 -0
- package/dist/core/ingestion/named-bindings/types.js +6 -0
- package/dist/core/ingestion/named-bindings/typescript.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/typescript.js +58 -0
- package/dist/core/ingestion/parsing-processor.d.ts +60 -0
- package/dist/core/ingestion/parsing-processor.js +627 -0
- package/dist/core/ingestion/pipeline-phases/cobol.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/cobol.js +46 -0
- package/dist/core/ingestion/pipeline-phases/communities.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/communities.js +63 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +157 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.js +64 -0
- package/dist/core/ingestion/pipeline-phases/index.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/index.js +23 -0
- package/dist/core/ingestion/pipeline-phases/markdown.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/markdown.js +34 -0
- package/dist/core/ingestion/pipeline-phases/mro.d.ts +18 -0
- package/dist/core/ingestion/pipeline-phases/mro.js +37 -0
- package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/orm-extraction.js +92 -0
- package/dist/core/ingestion/pipeline-phases/orm.d.ts +15 -0
- package/dist/core/ingestion/pipeline-phases/orm.js +75 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +63 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +567 -0
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +88 -0
- package/dist/core/ingestion/pipeline-phases/parse.js +33 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/processes.js +149 -0
- package/dist/core/ingestion/pipeline-phases/routes.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/routes.js +244 -0
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/runner.js +204 -0
- package/dist/core/ingestion/pipeline-phases/scan.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/scan.js +46 -0
- package/dist/core/ingestion/pipeline-phases/structure.d.ts +27 -0
- package/dist/core/ingestion/pipeline-phases/structure.js +35 -0
- package/dist/core/ingestion/pipeline-phases/tools.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/tools.js +86 -0
- package/dist/core/ingestion/pipeline-phases/types.d.ts +79 -0
- package/dist/core/ingestion/pipeline-phases/types.js +37 -0
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +70 -0
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +312 -0
- package/dist/core/ingestion/pipeline.d.ts +49 -0
- package/dist/core/ingestion/pipeline.js +89 -0
- package/dist/core/ingestion/process-processor.d.ts +51 -0
- package/dist/core/ingestion/process-processor.js +318 -0
- package/dist/core/ingestion/registry-primary-flag.d.ts +88 -0
- package/dist/core/ingestion/registry-primary-flag.js +117 -0
- package/dist/core/ingestion/resolve-references.d.ts +63 -0
- package/dist/core/ingestion/resolve-references.js +175 -0
- package/dist/core/ingestion/route-extractors/expo.d.ts +1 -0
- package/dist/core/ingestion/route-extractors/expo.js +36 -0
- package/dist/core/ingestion/route-extractors/middleware.d.ts +47 -0
- package/dist/core/ingestion/route-extractors/middleware.js +167 -0
- package/dist/core/ingestion/route-extractors/nextjs.d.ts +3 -0
- package/dist/core/ingestion/route-extractors/nextjs.js +76 -0
- package/dist/core/ingestion/route-extractors/php.d.ts +7 -0
- package/dist/core/ingestion/route-extractors/php.js +22 -0
- package/dist/core/ingestion/route-extractors/response-shapes.d.ts +20 -0
- package/dist/core/ingestion/route-extractors/response-shapes.js +294 -0
- package/dist/core/ingestion/scope-extractor-bridge.d.ts +35 -0
- package/dist/core/ingestion/scope-extractor-bridge.js +49 -0
- package/dist/core/ingestion/scope-extractor.d.ts +86 -0
- package/dist/core/ingestion/scope-extractor.js +772 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +558 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +250 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +43 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +79 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +57 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +142 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.d.ts +17 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.js +46 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.d.ts +19 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.js +40 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.d.ts +37 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +118 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +38 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +73 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +42 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +467 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +53 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +251 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +202 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.d.ts +42 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.js +102 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +30 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +81 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +46 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +377 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +47 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +152 -0
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.d.ts +68 -0
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.js +125 -0
- package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +17 -0
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +31 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +91 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +218 -0
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.d.ts +39 -0
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +65 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.d.ts +36 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.js +58 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +170 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +447 -0
- package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +52 -0
- package/dist/core/ingestion/scope-resolution/workspace-index.js +61 -0
- package/dist/core/ingestion/shadow-harness.d.ts +113 -0
- package/dist/core/ingestion/shadow-harness.js +148 -0
- package/dist/core/ingestion/structure-processor.d.ts +2 -0
- package/dist/core/ingestion/structure-processor.js +36 -0
- package/dist/core/ingestion/tree-sitter-queries.d.ts +16 -0
- package/dist/core/ingestion/tree-sitter-queries.js +1497 -0
- package/dist/core/ingestion/type-env.d.ts +86 -0
- package/dist/core/ingestion/type-env.js +1129 -0
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +7 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +532 -0
- package/dist/core/ingestion/type-extractors/csharp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/csharp.js +583 -0
- package/dist/core/ingestion/type-extractors/dart.d.ts +15 -0
- package/dist/core/ingestion/type-extractors/dart.js +369 -0
- package/dist/core/ingestion/type-extractors/go.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/go.js +513 -0
- package/dist/core/ingestion/type-extractors/jvm.d.ts +3 -0
- package/dist/core/ingestion/type-extractors/jvm.js +856 -0
- package/dist/core/ingestion/type-extractors/php.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/php.js +534 -0
- package/dist/core/ingestion/type-extractors/python.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/python.js +474 -0
- package/dist/core/ingestion/type-extractors/ruby.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/ruby.js +377 -0
- package/dist/core/ingestion/type-extractors/rust.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/rust.js +515 -0
- package/dist/core/ingestion/type-extractors/shared.d.ts +131 -0
- package/dist/core/ingestion/type-extractors/shared.js +796 -0
- package/dist/core/ingestion/type-extractors/swift.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/swift.js +487 -0
- package/dist/core/ingestion/type-extractors/types.d.ts +172 -0
- package/dist/core/ingestion/type-extractors/types.js +1 -0
- package/dist/core/ingestion/type-extractors/typescript.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/typescript.js +661 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +102 -0
- package/dist/core/ingestion/utils/ast-helpers.js +561 -0
- package/dist/core/ingestion/utils/call-analysis.d.ts +75 -0
- package/dist/core/ingestion/utils/call-analysis.js +574 -0
- package/dist/core/ingestion/utils/env.d.ts +20 -0
- package/dist/core/ingestion/utils/env.js +24 -0
- package/dist/core/ingestion/utils/event-loop.d.ts +5 -0
- package/dist/core/ingestion/utils/event-loop.js +5 -0
- package/dist/core/ingestion/utils/graph-sort.d.ts +58 -0
- package/dist/core/ingestion/utils/graph-sort.js +100 -0
- package/dist/core/ingestion/utils/max-file-size.d.ts +20 -0
- package/dist/core/ingestion/utils/max-file-size.js +53 -0
- package/dist/core/ingestion/utils/method-props.d.ts +32 -0
- package/dist/core/ingestion/utils/method-props.js +147 -0
- package/dist/core/ingestion/utils/ruby-self-call.d.ts +52 -0
- package/dist/core/ingestion/utils/ruby-self-call.js +59 -0
- package/dist/core/ingestion/utils/verbose.d.ts +1 -0
- package/dist/core/ingestion/utils/verbose.js +7 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +81 -0
- package/dist/core/ingestion/variable-extractors/configs/csharp.d.ts +9 -0
- package/dist/core/ingestion/variable-extractors/configs/csharp.js +63 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.js +94 -0
- package/dist/core/ingestion/variable-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/go.js +83 -0
- package/dist/core/ingestion/variable-extractors/configs/jvm.d.ts +18 -0
- package/dist/core/ingestion/variable-extractors/configs/jvm.js +115 -0
- package/dist/core/ingestion/variable-extractors/configs/php.d.ts +14 -0
- package/dist/core/ingestion/variable-extractors/configs/php.js +58 -0
- package/dist/core/ingestion/variable-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/python.js +101 -0
- package/dist/core/ingestion/variable-extractors/configs/ruby.d.ts +11 -0
- package/dist/core/ingestion/variable-extractors/configs/ruby.js +52 -0
- package/dist/core/ingestion/variable-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/rust.js +76 -0
- package/dist/core/ingestion/variable-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/swift.js +88 -0
- package/dist/core/ingestion/variable-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/variable-extractors/configs/typescript-javascript.js +83 -0
- package/dist/core/ingestion/variable-extractors/generic.d.ts +5 -0
- package/dist/core/ingestion/variable-extractors/generic.js +80 -0
- package/dist/core/ingestion/variable-types.d.ts +82 -0
- package/dist/core/ingestion/variable-types.js +2 -0
- package/dist/core/ingestion/vue-sfc-extractor.d.ts +44 -0
- package/dist/core/ingestion/vue-sfc-extractor.js +111 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +199 -0
- package/dist/core/ingestion/workers/parse-worker.js +1940 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +23 -0
- package/dist/core/ingestion/workers/worker-pool.js +380 -0
- package/dist/core/lbug/csv-generator.d.ts +33 -0
- package/dist/core/lbug/csv-generator.js +463 -0
- package/dist/core/lbug/extension-loader.d.ts +86 -0
- package/dist/core/lbug/extension-loader.js +186 -0
- package/dist/core/lbug/lbug-adapter.d.ts +243 -0
- package/dist/core/lbug/lbug-adapter.js +1377 -0
- package/dist/core/lbug/lbug-config.d.ts +102 -0
- package/dist/core/lbug/lbug-config.js +303 -0
- package/dist/core/lbug/pool-adapter.d.ts +90 -0
- package/dist/core/lbug/pool-adapter.js +592 -0
- package/dist/core/lbug/schema.d.ts +62 -0
- package/dist/core/lbug/schema.js +495 -0
- package/dist/core/logger.d.ts +125 -0
- package/dist/core/logger.js +323 -0
- package/dist/core/platform/capabilities.d.ts +24 -0
- package/dist/core/platform/capabilities.js +54 -0
- package/dist/core/run-analyze.d.ts +92 -0
- package/dist/core/run-analyze.js +672 -0
- package/dist/core/search/bm25-index.d.ts +29 -0
- package/dist/core/search/bm25-index.js +118 -0
- package/dist/core/search/fts-indexes.d.ts +1 -0
- package/dist/core/search/fts-indexes.js +7 -0
- package/dist/core/search/fts-schema.d.ts +6 -0
- package/dist/core/search/fts-schema.js +7 -0
- package/dist/core/search/hybrid-search.d.ts +53 -0
- package/dist/core/search/hybrid-search.js +136 -0
- package/dist/core/search/phase-timer.d.ts +72 -0
- package/dist/core/search/phase-timer.js +106 -0
- package/dist/core/tree-sitter/parser-loader.d.ts +8 -0
- package/dist/core/tree-sitter/parser-loader.js +189 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +6 -0
- package/dist/core/tree-sitter/safe-parse.js +32 -0
- package/dist/core/wiki/cursor-client.d.ts +31 -0
- package/dist/core/wiki/cursor-client.js +123 -0
- package/dist/core/wiki/generator.d.ts +129 -0
- package/dist/core/wiki/generator.js +899 -0
- package/dist/core/wiki/graph-queries.d.ts +84 -0
- package/dist/core/wiki/graph-queries.js +244 -0
- package/dist/core/wiki/html-viewer.d.ts +10 -0
- package/dist/core/wiki/html-viewer.js +304 -0
- package/dist/core/wiki/llm-client.d.ts +83 -0
- package/dist/core/wiki/llm-client.js +267 -0
- package/dist/core/wiki/mermaid-sanitizer.d.ts +2 -0
- package/dist/core/wiki/mermaid-sanitizer.js +100 -0
- package/dist/core/wiki/prompts.d.ts +53 -0
- package/dist/core/wiki/prompts.js +181 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/mcp/compatible-stdio-transport.d.ts +25 -0
- package/dist/mcp/compatible-stdio-transport.js +206 -0
- package/dist/mcp/core/embedder.d.ts +27 -0
- package/dist/mcp/core/embedder.js +145 -0
- package/dist/mcp/core/lbug-adapter.d.ts +11 -0
- package/dist/mcp/core/lbug-adapter.js +11 -0
- package/dist/mcp/local/local-backend.d.ts +356 -0
- package/dist/mcp/local/local-backend.js +3251 -0
- package/dist/mcp/resources.d.ts +62 -0
- package/dist/mcp/resources.js +512 -0
- package/dist/mcp/server.d.ts +23 -0
- package/dist/mcp/server.js +314 -0
- package/dist/mcp/staleness.d.ts +5 -0
- package/dist/mcp/staleness.js +4 -0
- package/dist/mcp/stdio-capture.d.ts +40 -0
- package/dist/mcp/stdio-capture.js +53 -0
- package/dist/mcp/stdio-context.d.ts +47 -0
- package/dist/mcp/stdio-context.js +145 -0
- package/dist/mcp/tools.d.ts +29 -0
- package/dist/mcp/tools.js +506 -0
- package/dist/server/analyze-job.d.ts +55 -0
- package/dist/server/analyze-job.js +150 -0
- package/dist/server/analyze-worker.d.ts +13 -0
- package/dist/server/analyze-worker.js +59 -0
- package/dist/server/api.d.ts +72 -0
- package/dist/server/api.js +1638 -0
- package/dist/server/git-clone.d.ts +99 -0
- package/dist/server/git-clone.js +397 -0
- package/dist/server/mcp-http.d.ts +13 -0
- package/dist/server/mcp-http.js +101 -0
- package/dist/server/validation.d.ts +98 -0
- package/dist/server/validation.js +142 -0
- package/dist/storage/file-hash.d.ts +47 -0
- package/dist/storage/file-hash.js +86 -0
- package/dist/storage/git.d.ts +148 -0
- package/dist/storage/git.js +346 -0
- package/dist/storage/parse-cache.d.ts +67 -0
- package/dist/storage/parse-cache.js +182 -0
- package/dist/storage/repo-manager.d.ts +467 -0
- package/dist/storage/repo-manager.js +804 -0
- package/dist/types/pipeline.d.ts +18 -0
- package/dist/types/pipeline.js +1 -0
- package/hooks/claude/arc-hook.cjs +334 -0
- package/hooks/claude/hook-lock.cjs +119 -0
- package/hooks/claude/pre-tool-use.sh +79 -0
- package/hooks/claude/session-start.sh +42 -0
- package/package.json +122 -0
- package/scripts/bench-scope-resolution.ts +134 -0
- package/scripts/build-tree-sitter-dart.cjs +53 -0
- package/scripts/build-tree-sitter-proto.cjs +93 -0
- package/scripts/build.js +99 -0
- package/scripts/ci-list-migrated-languages.ts +24 -0
- package/scripts/install-duckdb-extension.mjs +48 -0
- package/skills/arc-cli.md +83 -0
- package/skills/arc-debugging.md +89 -0
- package/skills/arc-exploring.md +78 -0
- package/skills/arc-guide.md +64 -0
- package/skills/arc-impact-analysis.md +97 -0
- package/skills/arc-pr-review.md +163 -0
- package/skills/arc-refactoring.md +121 -0
- package/vendor/leiden/index.cjs +355 -0
- package/vendor/leiden/utils.cjs +392 -0
- package/vendor/tree-sitter-dart/README.md +18 -0
- package/vendor/tree-sitter-dart/binding.gyp +31 -0
- package/vendor/tree-sitter-dart/bindings/node/binding.cc +20 -0
- package/vendor/tree-sitter-dart/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-dart/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-dart/grammar.js +2895 -0
- package/vendor/tree-sitter-dart/package.json +18 -0
- package/vendor/tree-sitter-dart/queries/highlights.scm +246 -0
- package/vendor/tree-sitter-dart/queries/tags.scm +92 -0
- package/vendor/tree-sitter-dart/queries/test.scm +1 -0
- package/vendor/tree-sitter-dart/src/grammar.json +12459 -0
- package/vendor/tree-sitter-dart/src/node-types.json +15055 -0
- package/vendor/tree-sitter-dart/src/parser.c +196127 -0
- package/vendor/tree-sitter-dart/src/scanner.c +130 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/alloc.h +54 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/array.h +290 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/parser.h +265 -0
- package/vendor/tree-sitter-proto/binding.gyp +30 -0
- package/vendor/tree-sitter-proto/bindings/node/binding.cc +20 -0
- package/vendor/tree-sitter-proto/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-proto/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-proto/package.json +12 -0
- package/vendor/tree-sitter-proto/src/node-types.json +1145 -0
- package/vendor/tree-sitter-proto/src/parser.c +10149 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/alloc.h +54 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/array.h +291 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/parser.h +266 -0
- package/vendor/tree-sitter-swift/LICENSE +21 -0
- package/vendor/tree-sitter-swift/README.md +139 -0
- package/vendor/tree-sitter-swift/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-swift/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-swift/package.json +28 -0
- package/vendor/tree-sitter-swift/prebuilds/darwin-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/darwin-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/linux-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/linux-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/win32-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/win32-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/src/node-types.json +30694 -0
- package/web/assets/__vite-browser-external-CLwMvL_q.js +1 -0
- package/web/assets/agent-DaYmiVrk.js +601 -0
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-aGTGQQQG.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-613o-OfM.js +36 -0
- package/web/assets/blockDiagram-7IZFK4PR-BBJRt4vF.js +132 -0
- package/web/assets/c4Diagram-Y2BXMSZH-BhR2CErx.js +10 -0
- package/web/assets/chunk-3SSMPTDK-DWfEAoKy.js +321 -0
- package/web/assets/chunk-6764PJDD-NOXEgi3n.js +1 -0
- package/web/assets/chunk-AZZRMDJM-DVvcxwI7.js +15 -0
- package/web/assets/chunk-JQRUD6KW-CQgkrimK.js +1 -0
- package/web/assets/chunk-KGYTTC2M-DxOdSoAJ.js +161 -0
- package/web/assets/chunk-KRXBNO2N-BlnQTnxv.js +1 -0
- package/web/assets/chunk-LCXTWHL2-Dhf_u-1F.js +231 -0
- package/web/assets/chunk-LII3EMHJ-Cb3HLCZX.js +1 -0
- package/web/assets/chunk-RG4AUYOV-DLCfNede.js +206 -0
- package/web/assets/chunk-T5OCTHI4-B0CGAG7q.js +1 -0
- package/web/assets/chunk-W44A43WB-ZyrAMwtT.js +1 -0
- package/web/assets/chunk-ZXARS5L4-B0TJPmj5.js +1 -0
- package/web/assets/classDiagram-KGZ6W3CR-CvSnsfJD.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-CvSnsfJD.js +1 -0
- package/web/assets/context-builder-BREgwful.js +15 -0
- package/web/assets/cose-bilkent-UX7MHV2Q-BsPIaeag.js +1 -0
- package/web/assets/dagre-ND4H6XIP-CV4l9vOZ.js +4 -0
- package/web/assets/diagram-3NCE3AQN-9kSzEbS8.js +43 -0
- package/web/assets/diagram-GF46GFSD-qRvqbex6.js +24 -0
- package/web/assets/diagram-HNR7UZ2L-Dj_ye4Ua.js +3 -0
- package/web/assets/diagram-QXG6HAR7-COwBV6B0.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-C9xjn5dU.js +10 -0
- package/web/assets/erDiagram-L5TCEMPS-fRp0t1Yd.js +85 -0
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BR0Ygfrw.js +1 -0
- package/web/assets/flowDiagram-H6V6AXG4-Ccr8FDLD.js +162 -0
- package/web/assets/ganttDiagram-JCBTUEKG-DfBPqAGN.js +292 -0
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-CYihBz6Z.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CHvG_UQ0.js +106 -0
- package/web/assets/index-B7cw1L6-.css +2 -0
- package/web/assets/index-CJJQgfSH.js +886 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-BmmoeX4D.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-C7cMy-GP.js +2 -0
- package/web/assets/ishikawaDiagram-BNXS4ZKH-C80yCPYi.js +70 -0
- package/web/assets/journeyDiagram-M6C3CM3L-BHxH1zjE.js +139 -0
- package/web/assets/kanban-definition-75IXJCU3-DNZo1hOE.js +89 -0
- package/web/assets/katex-K3KEBU37-CbyuvTf1.js +261 -0
- package/web/assets/mindmap-definition-2TDM6QVE-Dpgl3Elt.js +96 -0
- package/web/assets/packet-YPE3B663-LP52Z2RK-7JAqDnUy.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-Bv9vE7io.js +1 -0
- package/web/assets/pieDiagram-CU6KROY3-BW0mr0ek.js +30 -0
- package/web/assets/quadrantDiagram-VICAPDV7-C1dCMBbk.js +7 -0
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-dtZpcOZd.js +1 -0
- package/web/assets/requirementDiagram-JXO7QTGE-Dyqqny4j.js +84 -0
- package/web/assets/sankeyDiagram-URQDO5SZ-B3FGr5SL.js +40 -0
- package/web/assets/sequenceDiagram-VS2MUI6T-B4LlGP9C.js +162 -0
- package/web/assets/stateDiagram-7D4R322I-V9F-klBP.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-CKDYYzqR.js +1 -0
- package/web/assets/timeline-definition-O6YCAMPW-CX2WjkZA.js +120 -0
- package/web/assets/treeView-BLDUP644-QA4HXRO3-BQaKTdhr.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-Bqlxdyrq.js +1 -0
- package/web/assets/vennDiagram-MWXL3ELB-BxZPYqOF.js +34 -0
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-dofeprUr.js +1 -0
- package/web/assets/wardleyDiagram-CUQ6CDDI-BLdJJYkV.js +78 -0
- package/web/assets/xychartDiagram-N2JHSOCM-DqDgigLa.js +7 -0
- package/web/index.html +19 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript scope-resolution hooks (RFC #909 Ring 3, RFC §5).
|
|
3
|
+
*
|
|
4
|
+
* Public API barrel. Consumers should import from this file rather
|
|
5
|
+
* than the individual modules.
|
|
6
|
+
*
|
|
7
|
+
* Module layout (each file is a single concern):
|
|
8
|
+
*
|
|
9
|
+
* - `query.ts` — tree-sitter query + lazy parser/query singletons
|
|
10
|
+
* - `captures.ts` — `emitTsScopeCaptures` orchestrator
|
|
11
|
+
* - `import-decomposer.ts` — each import/re-export/dynamic-import →
|
|
12
|
+
* ParsedImport-shaped captures
|
|
13
|
+
* - `interpret.ts` — capture-match → `ParsedImport` /
|
|
14
|
+
* `ParsedTypeBinding`
|
|
15
|
+
* - `simple-hooks.ts` — `bindingScopeFor` (var hoisting + return-
|
|
16
|
+
* type hoisting), `importOwningScope`
|
|
17
|
+
* (module/namespace default), `receiverBinding`
|
|
18
|
+
* (`this` lookup on Function scope)
|
|
19
|
+
* - `receiver-binding.ts` — synthesize `this` type-bindings on
|
|
20
|
+
* instance-method entry (methods, interface
|
|
21
|
+
* signatures, class-field arrow functions)
|
|
22
|
+
* - `merge-bindings.ts` — TypeScript declaration merging
|
|
23
|
+
* (value / type / namespace spaces) + LEGB
|
|
24
|
+
* tier shadowing
|
|
25
|
+
* - `arity.ts` — TypeScript arity compatibility (rest,
|
|
26
|
+
* optional, default params)
|
|
27
|
+
* - `arity-metadata.ts` — synthesize arity metadata from
|
|
28
|
+
* declarations; includes generics + array-
|
|
29
|
+
* suffix stripping on parameter types
|
|
30
|
+
* - `import-target.ts` — `(ParsedImport, WorkspaceIndex) → file path`
|
|
31
|
+
* adapter delegating to the shared standard
|
|
32
|
+
* resolver (tsconfig paths, node_modules,
|
|
33
|
+
* relative/extension suffix matching)
|
|
34
|
+
* - `cache-stats.ts` — PROF_SCOPE_RESOLUTION cache hit/miss
|
|
35
|
+
* counters
|
|
36
|
+
*
|
|
37
|
+
* ## Known limitations
|
|
38
|
+
*
|
|
39
|
+
* The TypeScript registry-primary path intentionally does NOT resolve
|
|
40
|
+
* the following. Each is a conscious trade-off at migration time.
|
|
41
|
+
*
|
|
42
|
+
* 1. **Type-only import / export separation** — `import type { X }`
|
|
43
|
+
* and `import { X }` produce the same `ParsedImport` shape today;
|
|
44
|
+
* `def.type` on the resolved symbol is the only discriminator.
|
|
45
|
+
* Parity with the legacy path is preserved. Tracking in #927.
|
|
46
|
+
* 2. **Declaration merging for imports** — when `import { Foo }`
|
|
47
|
+
* brings in a symbol that is BOTH a class and a namespace in the
|
|
48
|
+
* source module, we currently surface a single binding per the
|
|
49
|
+
* target `def.type`. Downstream type/value-space lookups still
|
|
50
|
+
* work for the primary space; the other space's members resolve
|
|
51
|
+
* via the same target (class statics reachable via dotted access).
|
|
52
|
+
* 3. **Overload narrowing by argument type** — `@reference.parameter-
|
|
53
|
+
* types` carries static literal types inferred from the callsite
|
|
54
|
+
* (`string`, `number`, `Array`, etc.). Identifier / member-access
|
|
55
|
+
* arguments emit empty strings (unknown type); the registry's
|
|
56
|
+
* narrowing treats them as any-match. Full control-flow type
|
|
57
|
+
* narrowing is out of scope.
|
|
58
|
+
* 4. **Computed member access** — `obj[key]()` / `obj['method']()`
|
|
59
|
+
* is classified as an index-access call; member-call resolution
|
|
60
|
+
* falls back to the identifier-indexed branch and matches only
|
|
61
|
+
* when the key is a string literal.
|
|
62
|
+
* 5. **`this` for nested regular functions inside methods** — our
|
|
63
|
+
* scope-chain lookup returns the enclosing method's `this`, which
|
|
64
|
+
* is technically incorrect at runtime (a non-arrow nested function
|
|
65
|
+
* has its own `this` binding). Accepted false-positive; see
|
|
66
|
+
* `simple-hooks.ts` docstring.
|
|
67
|
+
* 6. **`class_expression` receiver types** — `const C = class { }`
|
|
68
|
+
* skips `this` synthesis when the expression is anonymous (no
|
|
69
|
+
* type name to propagate). `const C = class Named { }` works via
|
|
70
|
+
* the class's own `name` field.
|
|
71
|
+
* 7. **JSX element types** — JSX-specific constructs are ignored by
|
|
72
|
+
* the scope query; component references resolve via regular
|
|
73
|
+
* identifier / member-expression paths.
|
|
74
|
+
* 8. **Ambient module declarations** (`declare module '…'`) — parsed
|
|
75
|
+
* but not indexed at this layer; same as today's legacy path.
|
|
76
|
+
* 9. **Intersection types on parameters** (`(a: A & B)`) — treated
|
|
77
|
+
* as opaque (no strip); overload narrowing on intersections
|
|
78
|
+
* won't match.
|
|
79
|
+
* 10. **`instanceof` member-expression narrowing** — only bare
|
|
80
|
+
* identifiers are narrowed (`user instanceof User`). Member paths
|
|
81
|
+
* such as `user.address instanceof Address` remain unresolved.
|
|
82
|
+
*
|
|
83
|
+
* Shadow-harness corpus parity on `test/integration/resolvers/
|
|
84
|
+
* typescript.test.ts` is the authoritative signal for which of these
|
|
85
|
+
* matter in practice. The CI parity gate blocks any PR that regresses
|
|
86
|
+
* either the legacy or registry-primary run.
|
|
87
|
+
*/
|
|
88
|
+
export { emitTsScopeCaptures } from './captures.js';
|
|
89
|
+
export { getTypescriptCaptureCacheStats, resetTypescriptCaptureCacheStats } from './cache-stats.js';
|
|
90
|
+
export { interpretTsImport, interpretTsTypeBinding } from './interpret.js';
|
|
91
|
+
export { typescriptMergeBindings } from './merge-bindings.js';
|
|
92
|
+
export { typescriptArityCompatibility } from './arity.js';
|
|
93
|
+
export { resolveTsImportTarget, resolveTsTarget } from './import-target.js';
|
|
94
|
+
export { tsBindingScopeFor, tsImportOwningScope, tsReceiverBinding } from './simple-hooks.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capture-match → semantic-shape interpreters for TypeScript.
|
|
3
|
+
*
|
|
4
|
+
* Two pure functions, both consumed by the central scope extractor:
|
|
5
|
+
*
|
|
6
|
+
* - `interpretTsImport` → `ParsedImport`
|
|
7
|
+
* - `interpretTsTypeBinding` → `ParsedTypeBinding` (wired in Unit 6)
|
|
8
|
+
*
|
|
9
|
+
* The import matches arrive pre-decomposed by `emitTsScopeCaptures`
|
|
10
|
+
* (one imported name per match, with synthesized
|
|
11
|
+
* `@import.kind/source/name/alias` markers — see `import-decomposer.ts`).
|
|
12
|
+
* The type-binding matches arrive straight from the raw query captures —
|
|
13
|
+
* each `@type-binding.*` anchor carries `@type-binding.name` +
|
|
14
|
+
* `@type-binding.type`.
|
|
15
|
+
*/
|
|
16
|
+
import type { CaptureMatch, ParsedImport, ParsedTypeBinding } from '../../../../_shared/index.js';
|
|
17
|
+
export declare function interpretTsImport(captures: CaptureMatch): ParsedImport | null;
|
|
18
|
+
/**
|
|
19
|
+
* Interpret a `@type-binding.*` capture-match into a `ParsedTypeBinding`.
|
|
20
|
+
*
|
|
21
|
+
* TypeScript-specific strips:
|
|
22
|
+
*
|
|
23
|
+
* - Trailing `?` on optional parameters: `(u?: User)` → `User`
|
|
24
|
+
* - `Promise<User>` / `Array<User>` / `ReadonlyArray<User>` / `Readonly<User>`
|
|
25
|
+
* → `User` (wrappers that are transparent to chain propagation)
|
|
26
|
+
* - Single-arg `List<User>` / `Iterable<User>` / `Iterator<User>` —
|
|
27
|
+
* mirrors Python/C#'s generic-collection strip for for-of loops
|
|
28
|
+
* - Trailing `[]` on array types: `User[]` → `User`
|
|
29
|
+
* - Nullable unions: `User | null` / `User | undefined` / `null | User`
|
|
30
|
+
* → `User`
|
|
31
|
+
* - Dotted qualifiers: `models.User` → `User` (unless the suffix is
|
|
32
|
+
* a known collection accessor we'd want to preserve — none apply
|
|
33
|
+
* to TS today, since TS uses `.values()` / `.keys()` call syntax)
|
|
34
|
+
*/
|
|
35
|
+
export declare function interpretTsTypeBinding(captures: CaptureMatch): ParsedTypeBinding | null;
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capture-match → semantic-shape interpreters for TypeScript.
|
|
3
|
+
*
|
|
4
|
+
* Two pure functions, both consumed by the central scope extractor:
|
|
5
|
+
*
|
|
6
|
+
* - `interpretTsImport` → `ParsedImport`
|
|
7
|
+
* - `interpretTsTypeBinding` → `ParsedTypeBinding` (wired in Unit 6)
|
|
8
|
+
*
|
|
9
|
+
* The import matches arrive pre-decomposed by `emitTsScopeCaptures`
|
|
10
|
+
* (one imported name per match, with synthesized
|
|
11
|
+
* `@import.kind/source/name/alias` markers — see `import-decomposer.ts`).
|
|
12
|
+
* The type-binding matches arrive straight from the raw query captures —
|
|
13
|
+
* each `@type-binding.*` anchor carries `@type-binding.name` +
|
|
14
|
+
* `@type-binding.type`.
|
|
15
|
+
*/
|
|
16
|
+
// ─── interpretImport ──────────────────────────────────────────────────────
|
|
17
|
+
export function interpretTsImport(captures) {
|
|
18
|
+
// Markers attached by `splitImportStatement` (import-decomposer.ts):
|
|
19
|
+
// @import.kind : one of the kinds documented there
|
|
20
|
+
// @import.name : imported name from the source module
|
|
21
|
+
// @import.alias : local alias name (for default / aliased / namespace forms)
|
|
22
|
+
// @import.source : module path (always present except dynamic-unresolved)
|
|
23
|
+
const kindCap = captures['@import.kind'];
|
|
24
|
+
const nameCap = captures['@import.name'];
|
|
25
|
+
const aliasCap = captures['@import.alias'];
|
|
26
|
+
const sourceCap = captures['@import.source'];
|
|
27
|
+
const kind = kindCap?.text;
|
|
28
|
+
if (kind === undefined)
|
|
29
|
+
return null;
|
|
30
|
+
switch (kind) {
|
|
31
|
+
case 'default': {
|
|
32
|
+
// `import D from './m'` — semantically "alias for the module's
|
|
33
|
+
// default export". We map to ParsedImport `alias` with
|
|
34
|
+
// importedName='default' so the finalize algorithm looks up the
|
|
35
|
+
// target module's `default` export for cross-file resolution.
|
|
36
|
+
if (sourceCap === undefined || aliasCap === undefined)
|
|
37
|
+
return null;
|
|
38
|
+
return {
|
|
39
|
+
kind: 'alias',
|
|
40
|
+
localName: aliasCap.text,
|
|
41
|
+
importedName: 'default',
|
|
42
|
+
alias: aliasCap.text,
|
|
43
|
+
targetRaw: sourceCap.text,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
case 'named': {
|
|
47
|
+
// `import { X } from './m'` (plus type-only forms).
|
|
48
|
+
if (sourceCap === undefined || nameCap === undefined)
|
|
49
|
+
return null;
|
|
50
|
+
return {
|
|
51
|
+
kind: 'named',
|
|
52
|
+
localName: nameCap.text,
|
|
53
|
+
importedName: nameCap.text,
|
|
54
|
+
targetRaw: sourceCap.text,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
case 'named-alias': {
|
|
58
|
+
// `import { X as Y } from './m'`.
|
|
59
|
+
if (sourceCap === undefined || nameCap === undefined || aliasCap === undefined) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
kind: 'alias',
|
|
64
|
+
localName: aliasCap.text,
|
|
65
|
+
importedName: nameCap.text,
|
|
66
|
+
alias: aliasCap.text,
|
|
67
|
+
targetRaw: sourceCap.text,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
case 'namespace': {
|
|
71
|
+
// `import * as N from './m'` — `N` binds the whole module.
|
|
72
|
+
if (sourceCap === undefined || aliasCap === undefined)
|
|
73
|
+
return null;
|
|
74
|
+
return {
|
|
75
|
+
kind: 'namespace',
|
|
76
|
+
localName: aliasCap.text,
|
|
77
|
+
importedName: sourceCap.text,
|
|
78
|
+
targetRaw: sourceCap.text,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
case 'reexport': {
|
|
82
|
+
// `export { X } from './m'`.
|
|
83
|
+
if (sourceCap === undefined || nameCap === undefined)
|
|
84
|
+
return null;
|
|
85
|
+
return {
|
|
86
|
+
kind: 'reexport',
|
|
87
|
+
localName: nameCap.text,
|
|
88
|
+
importedName: nameCap.text,
|
|
89
|
+
targetRaw: sourceCap.text,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
case 'reexport-alias': {
|
|
93
|
+
// `export { X as Y } from './m'`.
|
|
94
|
+
if (sourceCap === undefined || nameCap === undefined || aliasCap === undefined) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
kind: 'reexport',
|
|
99
|
+
localName: aliasCap.text,
|
|
100
|
+
importedName: nameCap.text,
|
|
101
|
+
alias: aliasCap.text,
|
|
102
|
+
targetRaw: sourceCap.text,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
case 'reexport-wildcard': {
|
|
106
|
+
// `export * from './m'` — no local name, just a blanket passthrough.
|
|
107
|
+
if (sourceCap === undefined)
|
|
108
|
+
return null;
|
|
109
|
+
return { kind: 'wildcard', targetRaw: sourceCap.text };
|
|
110
|
+
}
|
|
111
|
+
case 'reexport-namespace': {
|
|
112
|
+
// `export * as ns from './m'` — creates a local binding `ns`
|
|
113
|
+
// that exposes the whole module, while also re-exporting it.
|
|
114
|
+
// Closest ParsedImport fit is `namespace`; the re-export side
|
|
115
|
+
// of this edge is tracked by the export detector downstream.
|
|
116
|
+
if (sourceCap === undefined || aliasCap === undefined)
|
|
117
|
+
return null;
|
|
118
|
+
return {
|
|
119
|
+
kind: 'namespace',
|
|
120
|
+
localName: aliasCap.text,
|
|
121
|
+
importedName: sourceCap.text,
|
|
122
|
+
targetRaw: sourceCap.text,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
case 'dynamic': {
|
|
126
|
+
// `import('./m')` / `import(x)`. The decomposer marks literal-
|
|
127
|
+
// string arguments with `@import.literal` so we can promote them
|
|
128
|
+
// to `dynamic-resolved` here — that lets the shared finalizer
|
|
129
|
+
// produce a file-level IMPORTS edge for lazy-loaded modules.
|
|
130
|
+
// Non-literal arguments stay `dynamic-unresolved` (target is
|
|
131
|
+
// runtime-computed and unreachable to the static finalizer).
|
|
132
|
+
const isLiteral = captures['@import.literal'] !== undefined;
|
|
133
|
+
if (isLiteral && sourceCap !== undefined) {
|
|
134
|
+
return { kind: 'dynamic-resolved', targetRaw: sourceCap.text };
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
kind: 'dynamic-unresolved',
|
|
138
|
+
localName: '',
|
|
139
|
+
targetRaw: sourceCap?.text ?? null,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
case 'side-effect': {
|
|
143
|
+
// `import './polyfill'` — bare-source, no local binding. The
|
|
144
|
+
// finalize layer resolves to a target file and emits a
|
|
145
|
+
// file-level IMPORTS edge; no `BindingRef` is materialized.
|
|
146
|
+
if (sourceCap === undefined)
|
|
147
|
+
return null;
|
|
148
|
+
return { kind: 'side-effect', targetRaw: sourceCap.text };
|
|
149
|
+
}
|
|
150
|
+
default:
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// ─── interpretTypeBinding ─────────────────────────────────────────────────
|
|
155
|
+
/**
|
|
156
|
+
* Interpret a `@type-binding.*` capture-match into a `ParsedTypeBinding`.
|
|
157
|
+
*
|
|
158
|
+
* TypeScript-specific strips:
|
|
159
|
+
*
|
|
160
|
+
* - Trailing `?` on optional parameters: `(u?: User)` → `User`
|
|
161
|
+
* - `Promise<User>` / `Array<User>` / `ReadonlyArray<User>` / `Readonly<User>`
|
|
162
|
+
* → `User` (wrappers that are transparent to chain propagation)
|
|
163
|
+
* - Single-arg `List<User>` / `Iterable<User>` / `Iterator<User>` —
|
|
164
|
+
* mirrors Python/C#'s generic-collection strip for for-of loops
|
|
165
|
+
* - Trailing `[]` on array types: `User[]` → `User`
|
|
166
|
+
* - Nullable unions: `User | null` / `User | undefined` / `null | User`
|
|
167
|
+
* → `User`
|
|
168
|
+
* - Dotted qualifiers: `models.User` → `User` (unless the suffix is
|
|
169
|
+
* a known collection accessor we'd want to preserve — none apply
|
|
170
|
+
* to TS today, since TS uses `.values()` / `.keys()` call syntax)
|
|
171
|
+
*/
|
|
172
|
+
export function interpretTsTypeBinding(captures) {
|
|
173
|
+
const nameCap = captures['@type-binding.name'];
|
|
174
|
+
const typeCap = captures['@type-binding.type'];
|
|
175
|
+
if (nameCap === undefined || typeCap === undefined)
|
|
176
|
+
return null;
|
|
177
|
+
// Readonly/array/nullable wrappers can stack; apply passes until a
|
|
178
|
+
// fixed point (bounded by the text length since every strip monotonically
|
|
179
|
+
// shrinks the string).
|
|
180
|
+
let prev = '';
|
|
181
|
+
let rawType = typeCap.text.trim();
|
|
182
|
+
while (prev !== rawType) {
|
|
183
|
+
prev = rawType;
|
|
184
|
+
rawType = stripReadonly(rawType);
|
|
185
|
+
rawType = stripNullableUnion(rawType);
|
|
186
|
+
rawType = stripGeneric(rawType);
|
|
187
|
+
rawType = stripArraySuffix(rawType);
|
|
188
|
+
}
|
|
189
|
+
// Destructuring / member-alias / map-tuple / dotted-call-alias bindings
|
|
190
|
+
// carry receiver paths or sentinel strings that must survive verbatim.
|
|
191
|
+
// Also preserve dotted member-call callee text (`svc.getUser`) for
|
|
192
|
+
// `@type-binding.alias` — stripQualifier would reduce it to `getUser`,
|
|
193
|
+
// breaking compound-receiver's `obj.method()` split.
|
|
194
|
+
const isDestructured = captures['@type-binding.destructured'] !== undefined;
|
|
195
|
+
const isMemberAlias = captures['@type-binding.member-alias'] !== undefined;
|
|
196
|
+
const isMapTupleEntry = captures['@type-binding.map-tuple-entry'] !== undefined;
|
|
197
|
+
const isInstanceofNarrow = captures['@type-binding.instanceof-narrow'] !== undefined;
|
|
198
|
+
const isAlias = captures['@type-binding.alias'] !== undefined;
|
|
199
|
+
const preserveRawTypeName = isDestructured ||
|
|
200
|
+
isMemberAlias ||
|
|
201
|
+
isMapTupleEntry ||
|
|
202
|
+
isInstanceofNarrow ||
|
|
203
|
+
(isAlias && rawType.includes('.'));
|
|
204
|
+
if (!preserveRawTypeName) {
|
|
205
|
+
rawType = stripQualifier(rawType);
|
|
206
|
+
}
|
|
207
|
+
// Drop non-discriminating / wildcard types — `as any` / `as unknown`
|
|
208
|
+
// should not block a more-informative sibling binding (typically the
|
|
209
|
+
// constructor-inferred capture from the inner `new_expression`). By
|
|
210
|
+
// returning null here we let the scope-extractor's tie-break select
|
|
211
|
+
// the next-best binding for the same name.
|
|
212
|
+
if (UNINFORMATIVE_TYPES.has(rawType))
|
|
213
|
+
return null;
|
|
214
|
+
// Anchor captures distinguish the source of the binding. Order
|
|
215
|
+
// matters: more-specific anchors take precedence. `this` is a
|
|
216
|
+
// TypeScript-specific receiver synthesized in `receiver-binding.ts`
|
|
217
|
+
// (Unit 3); treat it as `self` for Registry.lookup parity with
|
|
218
|
+
// Python/C#.
|
|
219
|
+
let source = 'parameter-annotation';
|
|
220
|
+
if (captures['@type-binding.this'] !== undefined)
|
|
221
|
+
source = 'self';
|
|
222
|
+
else if (captures['@type-binding.constructor'] !== undefined)
|
|
223
|
+
source = 'constructor-inferred';
|
|
224
|
+
else if (captures['@type-binding.assertion'] !== undefined)
|
|
225
|
+
source = 'annotation';
|
|
226
|
+
else if (captures['@type-binding.annotation'] !== undefined)
|
|
227
|
+
source = 'annotation';
|
|
228
|
+
else if (captures['@type-binding.member-alias'] !== undefined)
|
|
229
|
+
source = 'assignment-inferred';
|
|
230
|
+
else if (captures['@type-binding.alias'] !== undefined)
|
|
231
|
+
source = 'assignment-inferred';
|
|
232
|
+
else if (captures['@type-binding.return'] !== undefined)
|
|
233
|
+
source = 'return-annotation';
|
|
234
|
+
else if (captures['@type-binding.parameter-property'] !== undefined)
|
|
235
|
+
source = 'annotation';
|
|
236
|
+
else if (captures['@type-binding.destructured'] !== undefined)
|
|
237
|
+
source = 'assignment-inferred';
|
|
238
|
+
else if (captures['@type-binding.map-tuple-entry'] !== undefined)
|
|
239
|
+
source = 'assignment-inferred';
|
|
240
|
+
else if (captures['@type-binding.instanceof-narrow'] !== undefined)
|
|
241
|
+
source = 'annotation';
|
|
242
|
+
return { boundName: nameCap.text, rawTypeName: rawType, source };
|
|
243
|
+
}
|
|
244
|
+
/** Types that carry no discriminating information for chain resolution.
|
|
245
|
+
* `any` / `unknown` / `object` / `never` / `void` match anything, so a
|
|
246
|
+
* sibling capture (e.g. a constructor-inferred type from `new X() as any`)
|
|
247
|
+
* is strictly preferable. Empty string emerges from malformed captures
|
|
248
|
+
* and is also useless. `null` / `undefined` shouldn't survive
|
|
249
|
+
* stripNullableUnion but are listed here for defense-in-depth. */
|
|
250
|
+
const UNINFORMATIVE_TYPES = new Set([
|
|
251
|
+
'',
|
|
252
|
+
'any',
|
|
253
|
+
'unknown',
|
|
254
|
+
'object',
|
|
255
|
+
'never',
|
|
256
|
+
'void',
|
|
257
|
+
'null',
|
|
258
|
+
'undefined',
|
|
259
|
+
]);
|
|
260
|
+
/** `readonly User[]` → `User[]`. Applied before stripArraySuffix so
|
|
261
|
+
* `readonly User[]` reduces through the same pipeline. */
|
|
262
|
+
function stripReadonly(text) {
|
|
263
|
+
if (text.startsWith('readonly '))
|
|
264
|
+
return text.slice('readonly '.length).trim();
|
|
265
|
+
return text;
|
|
266
|
+
}
|
|
267
|
+
/** `User | null` / `User | undefined` / `null | User | undefined` → `User`.
|
|
268
|
+
* Any number of `null` / `undefined` arms may appear; collapse to the
|
|
269
|
+
* single remaining discriminating arm. Preserves multi-arm unions
|
|
270
|
+
* of real types (`User | Admin`) since the concrete receiver type is
|
|
271
|
+
* ambiguous. */
|
|
272
|
+
function stripNullableUnion(text) {
|
|
273
|
+
const parts = text.split('|').map((p) => p.trim());
|
|
274
|
+
if (parts.length < 2)
|
|
275
|
+
return text;
|
|
276
|
+
const NULLS = new Set(['null', 'undefined']);
|
|
277
|
+
const nonNull = parts.filter((p) => !NULLS.has(p));
|
|
278
|
+
if (nonNull.length === 1)
|
|
279
|
+
return nonNull[0];
|
|
280
|
+
return text;
|
|
281
|
+
}
|
|
282
|
+
/** Single-arg generic wrappers transparent to receiver-type chain
|
|
283
|
+
* propagation: `Promise<X>`, `Array<X>`, `ReadonlyArray<X>`,
|
|
284
|
+
* `Readonly<X>`, `Iterable<X>`, `Iterator<X>`, `Set<X>`, `List<X>`,
|
|
285
|
+
* `Map<X>` (single-arg form rare but kept for completeness), etc.
|
|
286
|
+
* Multi-arg generics (`Map<K, V>`, `Record<K, V>`) are left alone —
|
|
287
|
+
* element semantics aren't unambiguous. */
|
|
288
|
+
function stripGeneric(text) {
|
|
289
|
+
const single = text.match(/^(?:[A-Za-z_][A-Za-z0-9_]*\.)?(?:Promise|Array|ReadonlyArray|Readonly|Iterable|Iterator|AsyncIterable|AsyncIterator|AsyncGenerator|Generator|Set|ReadonlySet|List|Awaited)<([^,<>]+)>$/);
|
|
290
|
+
if (single !== null)
|
|
291
|
+
return single[1].trim();
|
|
292
|
+
return text;
|
|
293
|
+
}
|
|
294
|
+
/** `User[]` / `(User)[]` → `User`. Chained `User[][]` unwraps one
|
|
295
|
+
* level at a time per resolve pass. */
|
|
296
|
+
function stripArraySuffix(text) {
|
|
297
|
+
if (text.endsWith('[]')) {
|
|
298
|
+
const inner = text.slice(0, -2).trim();
|
|
299
|
+
// Unwrap a single pair of parentheses introduced for precedence
|
|
300
|
+
// disambiguation: `(User | Admin)[]` — we leave the union intact
|
|
301
|
+
// but drop the parens.
|
|
302
|
+
if (inner.startsWith('(') && inner.endsWith(')')) {
|
|
303
|
+
return inner.slice(1, -1).trim();
|
|
304
|
+
}
|
|
305
|
+
return inner;
|
|
306
|
+
}
|
|
307
|
+
return text;
|
|
308
|
+
}
|
|
309
|
+
/** `models.User` → `User`. TS doesn't carry a qualified-suffix exception
|
|
310
|
+
* list today — `.values()` / `.keys()` use method-call syntax and are
|
|
311
|
+
* resolved via the member-call chain, not via a dotted type. */
|
|
312
|
+
function stripQualifier(text) {
|
|
313
|
+
const lastDot = text.lastIndexOf('.');
|
|
314
|
+
if (lastDot === -1)
|
|
315
|
+
return text;
|
|
316
|
+
return text.slice(lastDot + 1);
|
|
317
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration-merging + LEGB precedence for the `mergeBindings`
|
|
3
|
+
* hook.
|
|
4
|
+
*
|
|
5
|
+
* TypeScript has a unique wrinkle that Python / C# don't: **declaration
|
|
6
|
+
* merging**. The same name can legally coexist in several "declaration
|
|
7
|
+
* spaces" simultaneously:
|
|
8
|
+
*
|
|
9
|
+
* - **value** space — `class X`, `function X`, `const X`, `var X`,
|
|
10
|
+
* `let X`, `enum X`, `namespace X` (adds runtime object)
|
|
11
|
+
* - **type** space — `interface X`, `type X`, `class X`, `enum X`
|
|
12
|
+
* - **namespace** space — `namespace X`, `class X` (static-accessed
|
|
13
|
+
* members are reachable via dotted name)
|
|
14
|
+
*
|
|
15
|
+
* Classes and enums are unique in that each declaration occupies both
|
|
16
|
+
* the value AND type spaces. This lets:
|
|
17
|
+
*
|
|
18
|
+
* class Foo {}
|
|
19
|
+
* interface Foo { bar: number; } // merges additional type members
|
|
20
|
+
* namespace Foo { export const X = 1; } // adds static-like value
|
|
21
|
+
*
|
|
22
|
+
* all coexist for the same name.
|
|
23
|
+
*
|
|
24
|
+
* ## Algorithm
|
|
25
|
+
*
|
|
26
|
+
* For each declaration space independently:
|
|
27
|
+
* 1. Tier bindings by origin (lower wins):
|
|
28
|
+
* 0 — `local`
|
|
29
|
+
* 1 — `import` / `namespace` / `reexport`
|
|
30
|
+
* 2 — `wildcard` (`export * from …`)
|
|
31
|
+
* 2. Keep only bindings at the best (lowest) tier in that space.
|
|
32
|
+
*
|
|
33
|
+
* Then union survivors across spaces and dedupe by `DefId`.
|
|
34
|
+
*
|
|
35
|
+
* ## Shadowing examples
|
|
36
|
+
*
|
|
37
|
+
* - `class Foo {}` + `function Foo() {}` in same scope → COMPILE ERROR
|
|
38
|
+
* in TS source, but if both reach us with distinct DefIds we keep
|
|
39
|
+
* both (value space has two locals at tier 0 — de-dup by nodeId
|
|
40
|
+
* preserves both). No worse than C#-style merge.
|
|
41
|
+
* - `class Foo {}` (local, value+type) + `import type { Foo } from './a'`
|
|
42
|
+
* (tier-1, type-only) → local wins in both type AND value spaces;
|
|
43
|
+
* the import is not kept.
|
|
44
|
+
* - `interface Foo {}` (local, type-only) + `import { Foo } from './a'`
|
|
45
|
+
* (tier-1, value+type) → local wins in type space; import wins in
|
|
46
|
+
* value space (local doesn't occupy it). Both kept.
|
|
47
|
+
* - `namespace Foo {}` (local, namespace+value) + `class Foo {}` (local,
|
|
48
|
+
* value+type) → both at tier 0 in their respective spaces, kept.
|
|
49
|
+
*
|
|
50
|
+
* ## Limitations
|
|
51
|
+
*
|
|
52
|
+
* - We classify imports by their `def.type` just like locals. Without
|
|
53
|
+
* a space-annotation on `ParsedImport`, `import type { Foo }` looks
|
|
54
|
+
* the same as `import { Foo }` at this layer — the parse phase
|
|
55
|
+
* decomposer marks type-only imports so the extractor CAN annotate
|
|
56
|
+
* `def.type = 'Type'` downstream if desired. Today it doesn't, so
|
|
57
|
+
* `import type` imports and value imports fall in the same bucket
|
|
58
|
+
* per their target def's NodeLabel. Parity with legacy behavior
|
|
59
|
+
* (which also doesn't track type-only separately) is preserved.
|
|
60
|
+
*/
|
|
61
|
+
import type { BindingRef } from '../../../../_shared/index.js';
|
|
62
|
+
export declare function typescriptMergeBindings(bindings: readonly BindingRef[]): readonly BindingRef[];
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration-merging + LEGB precedence for the `mergeBindings`
|
|
3
|
+
* hook.
|
|
4
|
+
*
|
|
5
|
+
* TypeScript has a unique wrinkle that Python / C# don't: **declaration
|
|
6
|
+
* merging**. The same name can legally coexist in several "declaration
|
|
7
|
+
* spaces" simultaneously:
|
|
8
|
+
*
|
|
9
|
+
* - **value** space — `class X`, `function X`, `const X`, `var X`,
|
|
10
|
+
* `let X`, `enum X`, `namespace X` (adds runtime object)
|
|
11
|
+
* - **type** space — `interface X`, `type X`, `class X`, `enum X`
|
|
12
|
+
* - **namespace** space — `namespace X`, `class X` (static-accessed
|
|
13
|
+
* members are reachable via dotted name)
|
|
14
|
+
*
|
|
15
|
+
* Classes and enums are unique in that each declaration occupies both
|
|
16
|
+
* the value AND type spaces. This lets:
|
|
17
|
+
*
|
|
18
|
+
* class Foo {}
|
|
19
|
+
* interface Foo { bar: number; } // merges additional type members
|
|
20
|
+
* namespace Foo { export const X = 1; } // adds static-like value
|
|
21
|
+
*
|
|
22
|
+
* all coexist for the same name.
|
|
23
|
+
*
|
|
24
|
+
* ## Algorithm
|
|
25
|
+
*
|
|
26
|
+
* For each declaration space independently:
|
|
27
|
+
* 1. Tier bindings by origin (lower wins):
|
|
28
|
+
* 0 — `local`
|
|
29
|
+
* 1 — `import` / `namespace` / `reexport`
|
|
30
|
+
* 2 — `wildcard` (`export * from …`)
|
|
31
|
+
* 2. Keep only bindings at the best (lowest) tier in that space.
|
|
32
|
+
*
|
|
33
|
+
* Then union survivors across spaces and dedupe by `DefId`.
|
|
34
|
+
*
|
|
35
|
+
* ## Shadowing examples
|
|
36
|
+
*
|
|
37
|
+
* - `class Foo {}` + `function Foo() {}` in same scope → COMPILE ERROR
|
|
38
|
+
* in TS source, but if both reach us with distinct DefIds we keep
|
|
39
|
+
* both (value space has two locals at tier 0 — de-dup by nodeId
|
|
40
|
+
* preserves both). No worse than C#-style merge.
|
|
41
|
+
* - `class Foo {}` (local, value+type) + `import type { Foo } from './a'`
|
|
42
|
+
* (tier-1, type-only) → local wins in both type AND value spaces;
|
|
43
|
+
* the import is not kept.
|
|
44
|
+
* - `interface Foo {}` (local, type-only) + `import { Foo } from './a'`
|
|
45
|
+
* (tier-1, value+type) → local wins in type space; import wins in
|
|
46
|
+
* value space (local doesn't occupy it). Both kept.
|
|
47
|
+
* - `namespace Foo {}` (local, namespace+value) + `class Foo {}` (local,
|
|
48
|
+
* value+type) → both at tier 0 in their respective spaces, kept.
|
|
49
|
+
*
|
|
50
|
+
* ## Limitations
|
|
51
|
+
*
|
|
52
|
+
* - We classify imports by their `def.type` just like locals. Without
|
|
53
|
+
* a space-annotation on `ParsedImport`, `import type { Foo }` looks
|
|
54
|
+
* the same as `import { Foo }` at this layer — the parse phase
|
|
55
|
+
* decomposer marks type-only imports so the extractor CAN annotate
|
|
56
|
+
* `def.type = 'Type'` downstream if desired. Today it doesn't, so
|
|
57
|
+
* `import type` imports and value imports fall in the same bucket
|
|
58
|
+
* per their target def's NodeLabel. Parity with legacy behavior
|
|
59
|
+
* (which also doesn't track type-only separately) is preserved.
|
|
60
|
+
*/
|
|
61
|
+
const TIER_LOCAL = 0;
|
|
62
|
+
const TIER_IMPORT = 1;
|
|
63
|
+
const TIER_WILDCARD = 2;
|
|
64
|
+
const TIER_UNKNOWN = 3;
|
|
65
|
+
function tierOf(b) {
|
|
66
|
+
switch (b.origin) {
|
|
67
|
+
case 'local':
|
|
68
|
+
return TIER_LOCAL;
|
|
69
|
+
case 'reexport':
|
|
70
|
+
case 'import':
|
|
71
|
+
case 'namespace':
|
|
72
|
+
return TIER_IMPORT;
|
|
73
|
+
case 'wildcard':
|
|
74
|
+
return TIER_WILDCARD;
|
|
75
|
+
default:
|
|
76
|
+
return TIER_UNKNOWN;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Map a `SymbolDefinition.type` (`NodeLabel`) to the set of TypeScript
|
|
81
|
+
* declaration spaces the binding occupies.
|
|
82
|
+
*
|
|
83
|
+
* Unknown / unused labels default to `['value']` — the permissive choice,
|
|
84
|
+
* matching legacy behavior where everything lives in a single flat bucket.
|
|
85
|
+
*/
|
|
86
|
+
function spacesOf(type) {
|
|
87
|
+
switch (type) {
|
|
88
|
+
// value-only
|
|
89
|
+
case 'Function':
|
|
90
|
+
case 'Method':
|
|
91
|
+
case 'Variable':
|
|
92
|
+
case 'Const':
|
|
93
|
+
case 'Static':
|
|
94
|
+
case 'Property':
|
|
95
|
+
case 'Constructor':
|
|
96
|
+
case 'Macro':
|
|
97
|
+
return ['value'];
|
|
98
|
+
// type-only
|
|
99
|
+
case 'Interface':
|
|
100
|
+
case 'Type':
|
|
101
|
+
case 'TypeAlias':
|
|
102
|
+
case 'Typedef':
|
|
103
|
+
case 'Trait':
|
|
104
|
+
case 'Annotation':
|
|
105
|
+
case 'Decorator':
|
|
106
|
+
return ['type'];
|
|
107
|
+
// dual: value AND type
|
|
108
|
+
case 'Class':
|
|
109
|
+
case 'Enum':
|
|
110
|
+
case 'Struct':
|
|
111
|
+
case 'Record':
|
|
112
|
+
case 'Union':
|
|
113
|
+
return ['value', 'type'];
|
|
114
|
+
// namespace AND value (namespaces introduce a runtime object AND a
|
|
115
|
+
// named scope for static-style access)
|
|
116
|
+
case 'Namespace':
|
|
117
|
+
case 'Module':
|
|
118
|
+
return ['namespace', 'value'];
|
|
119
|
+
// catch-all — treat as value to match legacy permissive behavior
|
|
120
|
+
default:
|
|
121
|
+
return ['value'];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export function typescriptMergeBindings(bindings) {
|
|
125
|
+
if (bindings.length === 0)
|
|
126
|
+
return bindings;
|
|
127
|
+
// Partition bindings by space. A single binding occupying two spaces
|
|
128
|
+
// (e.g. a class) is duplicated into both partitions; the final dedupe
|
|
129
|
+
// by nodeId collapses it back.
|
|
130
|
+
const perSpace = new Map();
|
|
131
|
+
for (const b of bindings) {
|
|
132
|
+
const spaces = spacesOf(b.def.type);
|
|
133
|
+
for (const s of spaces) {
|
|
134
|
+
const list = perSpace.get(s);
|
|
135
|
+
if (list === undefined)
|
|
136
|
+
perSpace.set(s, [b]);
|
|
137
|
+
else
|
|
138
|
+
list.push(b);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Within each space, keep only the best-tier bindings.
|
|
142
|
+
const survivorsSet = new Set();
|
|
143
|
+
for (const list of perSpace.values()) {
|
|
144
|
+
let bestTier = Number.POSITIVE_INFINITY;
|
|
145
|
+
for (const b of list)
|
|
146
|
+
bestTier = Math.min(bestTier, tierOf(b));
|
|
147
|
+
for (const b of list) {
|
|
148
|
+
if (tierOf(b) === bestTier)
|
|
149
|
+
survivorsSet.add(b);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// Dedupe by def.nodeId. If the same binding survived in multiple
|
|
153
|
+
// spaces (e.g. a class in both value + type) we keep a single entry.
|
|
154
|
+
const seen = new Map();
|
|
155
|
+
for (const b of survivorsSet)
|
|
156
|
+
seen.set(b.def.nodeId, b);
|
|
157
|
+
return [...seen.values()];
|
|
158
|
+
}
|