@codragraph/cli 1.6.2
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 +341 -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 +55 -0
- package/dist/_shared/index.d.ts.map +1 -0
- package/dist/_shared/index.js +39 -0
- package/dist/_shared/index.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 +139 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js +479 -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 +80 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.js +79 -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 +332 -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 +61 -0
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/scope-tree.js +186 -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 +356 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/types.js +17 -0
- package/dist/_shared/scope-resolution/types.js.map +1 -0
- package/dist/cli/ai-context.d.ts +27 -0
- package/dist/cli/ai-context.js +270 -0
- package/dist/cli/analyze.d.ts +43 -0
- package/dist/cli/analyze.js +312 -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 +78 -0
- package/dist/cli/config.d.ts +27 -0
- package/dist/cli/config.js +106 -0
- package/dist/cli/eval-server.d.ts +37 -0
- package/dist/cli/eval-server.js +398 -0
- package/dist/cli/graphstore.d.ts +40 -0
- package/dist/cli/graphstore.js +639 -0
- package/dist/cli/group.d.ts +2 -0
- package/dist/cli/group.js +306 -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 +236 -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 +8 -0
- package/dist/cli/mcp.js +36 -0
- package/dist/cli/remove.d.ts +30 -0
- package/dist/cli/remove.js +99 -0
- package/dist/cli/serve.d.ts +4 -0
- package/dist/cli/serve.js +37 -0
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +543 -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 +168 -0
- package/dist/cli/wiki.d.ts +21 -0
- package/dist/cli/wiki.js +579 -0
- package/dist/config/ignore-service.d.ts +35 -0
- package/dist/config/ignore-service.js +436 -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 +252 -0
- package/dist/core/embeddings/ast-utils.d.ts +22 -0
- package/dist/core/embeddings/ast-utils.js +105 -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/embedder.d.ts +65 -0
- package/dist/core/embeddings/embedder.js +320 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +62 -0
- package/dist/core/embeddings/embedding-pipeline.js +486 -0
- package/dist/core/embeddings/http-client.d.ts +31 -0
- package/dist/core/embeddings/http-client.js +179 -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 +207 -0
- package/dist/core/embeddings/types.js +200 -0
- package/dist/core/git-staleness.d.ts +31 -0
- package/dist/core/git-staleness.js +137 -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/graphstore/index.d.ts +46 -0
- package/dist/core/graphstore/index.js +80 -0
- package/dist/core/graphstore/lbug-row-source.d.ts +19 -0
- package/dist/core/graphstore/lbug-row-source.js +141 -0
- package/dist/core/group/bridge-db.d.ts +82 -0
- package/dist/core/group/bridge-db.js +460 -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 +100 -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 +41 -0
- package/dist/core/group/cross-impact.js +441 -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/grpc-extractor.d.ts +25 -0
- package/dist/core/group/extractors/grpc-extractor.js +401 -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 +133 -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 +421 -0
- package/dist/core/group/extractors/manifest-extractor.d.ts +54 -0
- package/dist/core/group/extractors/manifest-extractor.js +292 -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 +94 -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 +198 -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 +55 -0
- package/dist/core/group/service.js +394 -0
- package/dist/core/group/storage.d.ts +9 -0
- package/dist/core/group/storage.js +91 -0
- package/dist/core/group/sync.d.ts +21 -0
- package/dist/core/group/sync.js +196 -0
- package/dist/core/group/types.d.ts +160 -0
- package/dist/core/group/types.js +1 -0
- package/dist/core/ingestion/ast-cache.d.ts +26 -0
- package/dist/core/ingestion/ast-cache.js +47 -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 +2639 -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 +168 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.d.ts +57 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.js +392 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +210 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1715 -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 +318 -0
- package/dist/core/ingestion/constants.d.ts +16 -0
- package/dist/core/ingestion/constants.js +16 -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 +58 -0
- package/dist/core/ingestion/entry-point-scoring.js +380 -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 +116 -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 +91 -0
- package/dist/core/ingestion/finalize-orchestrator.d.ts +63 -0
- package/dist/core/ingestion/finalize-orchestrator.js +139 -0
- package/dist/core/ingestion/framework-detection.d.ts +150 -0
- package/dist/core/ingestion/framework-detection.js +786 -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 +360 -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 +373 -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 +30 -0
- package/dist/core/ingestion/import-resolvers/standard.js +142 -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 +149 -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 +181 -0
- package/dist/core/ingestion/language-provider.d.ts +410 -0
- package/dist/core/ingestion/language-provider.js +24 -0
- package/dist/core/ingestion/languages/c-cpp.d.ts +12 -0
- package/dist/core/ingestion/languages/c-cpp.js +329 -0
- package/dist/core/ingestion/languages/cobol.d.ts +1 -0
- package/dist/core/ingestion/languages/cobol.js +26 -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 +249 -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 +50 -0
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +374 -0
- package/dist/core/ingestion/languages/csharp/query.d.ts +35 -0
- package/dist/core/ingestion/languages/csharp/query.js +515 -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 +152 -0
- package/dist/core/ingestion/languages/dart.d.ts +12 -0
- package/dist/core/ingestion/languages/dart.js +102 -0
- package/dist/core/ingestion/languages/go.d.ts +11 -0
- package/dist/core/ingestion/languages/go.js +44 -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.d.ts +9 -0
- package/dist/core/ingestion/languages/java.js +44 -0
- package/dist/core/ingestion/languages/kotlin.d.ts +9 -0
- package/dist/core/ingestion/languages/kotlin.js +123 -0
- package/dist/core/ingestion/languages/php.d.ts +8 -0
- package/dist/core/ingestion/languages/php.js +240 -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 +106 -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 +99 -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 +23 -0
- package/dist/core/ingestion/languages/python/simple-hooks.js +35 -0
- package/dist/core/ingestion/languages/python.d.ts +12 -0
- package/dist/core/ingestion/languages/python.js +91 -0
- package/dist/core/ingestion/languages/ruby.d.ts +9 -0
- package/dist/core/ingestion/languages/ruby.js +210 -0
- package/dist/core/ingestion/languages/rust.d.ts +12 -0
- package/dist/core/ingestion/languages/rust.js +132 -0
- package/dist/core/ingestion/languages/swift.d.ts +12 -0
- package/dist/core/ingestion/languages/swift.js +244 -0
- package/dist/core/ingestion/languages/typescript.d.ts +11 -0
- package/dist/core/ingestion/languages/typescript.js +184 -0
- package/dist/core/ingestion/languages/vue.d.ts +13 -0
- package/dist/core/ingestion/languages/vue.js +77 -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 +277 -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 +204 -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 +381 -0
- package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +59 -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 +40 -0
- package/dist/core/ingestion/parsing-processor.js +576 -0
- package/dist/core/ingestion/pipeline-phases/cobol.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/cobol.js +45 -0
- package/dist/core/ingestion/pipeline-phases/communities.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/communities.js +62 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +156 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.js +63 -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 +33 -0
- package/dist/core/ingestion/pipeline-phases/mro.d.ts +18 -0
- package/dist/core/ingestion/pipeline-phases/mro.js +36 -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 +74 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +58 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +458 -0
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +74 -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 +143 -0
- package/dist/core/ingestion/pipeline-phases/routes.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/routes.js +243 -0
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/runner.js +203 -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 +20 -0
- package/dist/core/ingestion/pipeline-phases/tools.js +79 -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 +36 -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 +317 -0
- package/dist/core/ingestion/registry-primary-flag.d.ts +86 -0
- package/dist/core/ingestion/registry-primary-flag.js +111 -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 +32 -0
- package/dist/core/ingestion/scope-extractor-bridge.js +44 -0
- package/dist/core/ingestion/scope-extractor.d.ts +86 -0
- package/dist/core/ingestion/scope-extractor.js +758 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +372 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +212 -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 +112 -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 +30 -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 +113 -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 +198 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +27 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +131 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.d.ts +48 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +130 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.d.ts +42 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.js +99 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +26 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +61 -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 +327 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +47 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +130 -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 +21 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +66 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +157 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.d.ts +36 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.js +52 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +127 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +349 -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 +1338 -0
- package/dist/core/ingestion/type-env.d.ts +86 -0
- package/dist/core/ingestion/type-env.js +1128 -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 +484 -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 +89 -0
- package/dist/core/ingestion/utils/ast-helpers.js +535 -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 +10 -0
- package/dist/core/ingestion/utils/env.js +10 -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 +52 -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 +94 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +198 -0
- package/dist/core/ingestion/workers/parse-worker.js +1928 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +16 -0
- package/dist/core/ingestion/workers/worker-pool.js +126 -0
- package/dist/core/lbug/csv-generator.d.ts +33 -0
- package/dist/core/lbug/csv-generator.js +459 -0
- package/dist/core/lbug/lbug-adapter.d.ts +173 -0
- package/dist/core/lbug/lbug-adapter.js +1188 -0
- package/dist/core/lbug/pool-adapter.d.ts +93 -0
- package/dist/core/lbug/pool-adapter.js +543 -0
- package/dist/core/lbug/schema.d.ts +62 -0
- package/dist/core/lbug/schema.js +484 -0
- package/dist/core/run-analyze.d.ts +72 -0
- package/dist/core/run-analyze.js +315 -0
- package/dist/core/search/bm25-index.d.ts +41 -0
- package/dist/core/search/bm25-index.js +209 -0
- package/dist/core/search/hybrid-search.d.ts +49 -0
- package/dist/core/search/hybrid-search.js +118 -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 +84 -0
- package/dist/core/wiki/cursor-client.d.ts +31 -0
- package/dist/core/wiki/cursor-client.js +122 -0
- package/dist/core/wiki/generator.d.ts +129 -0
- package/dist/core/wiki/generator.js +898 -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 +303 -0
- package/dist/core/wiki/llm-client.d.ts +63 -0
- package/dist/core/wiki/llm-client.js +234 -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 +200 -0
- package/dist/mcp/core/embedder.d.ts +27 -0
- package/dist/mcp/core/embedder.js +122 -0
- package/dist/mcp/core/lbug-adapter.d.ts +5 -0
- package/dist/mcp/core/lbug-adapter.js +5 -0
- package/dist/mcp/local/graphstore-handler.d.ts +214 -0
- package/dist/mcp/local/graphstore-handler.js +272 -0
- package/dist/mcp/local/local-backend.d.ts +347 -0
- package/dist/mcp/local/local-backend.js +3218 -0
- package/dist/mcp/resources.d.ts +62 -0
- package/dist/mcp/resources.js +696 -0
- package/dist/mcp/server.d.ts +23 -0
- package/dist/mcp/server.js +533 -0
- package/dist/mcp/staleness.d.ts +5 -0
- package/dist/mcp/staleness.js +4 -0
- package/dist/mcp/tools.d.ts +27 -0
- package/dist/mcp/tools.js +823 -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 +47 -0
- package/dist/server/api.js +1727 -0
- package/dist/server/git-clone.d.ts +26 -0
- package/dist/server/git-clone.js +184 -0
- package/dist/server/mcp-http.d.ts +13 -0
- package/dist/server/mcp-http.js +100 -0
- package/dist/storage/git.d.ts +80 -0
- package/dist/storage/git.js +190 -0
- package/dist/storage/repo-manager.d.ts +458 -0
- package/dist/storage/repo-manager.js +766 -0
- package/dist/types/pipeline.d.ts +18 -0
- package/dist/types/pipeline.js +1 -0
- package/hooks/claude/codragraph-hook.cjs +268 -0
- package/hooks/claude/pre-tool-use.sh +79 -0
- package/hooks/claude/session-start.sh +42 -0
- package/package.json +127 -0
- package/scripts/bench-scope-resolution.ts +134 -0
- package/scripts/build-tree-sitter-proto.cjs +82 -0
- package/scripts/build.js +90 -0
- package/scripts/ci-list-migrated-languages.ts +24 -0
- package/scripts/patch-tree-sitter-swift.cjs +78 -0
- package/skills/codragraph-cli.md +82 -0
- package/skills/codragraph-debugging.md +89 -0
- package/skills/codragraph-exploring.md +78 -0
- package/skills/codragraph-guide.md +64 -0
- package/skills/codragraph-impact-analysis.md +97 -0
- package/skills/codragraph-pr-review.md +163 -0
- package/skills/codragraph-refactoring.md +121 -0
- package/vendor/leiden/index.cjs +355 -0
- package/vendor/leiden/utils.cjs +392 -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `LanguageClassification` — RFC §6.1 Ring 3 / Ring 4 governance.
|
|
3
|
+
*
|
|
4
|
+
* Classifies each `SupportedLanguages` member for the rollout. Ring 4 (DAG
|
|
5
|
+
* retirement) is gated on *all production languages* being registry-primary
|
|
6
|
+
* and stable for one release cycle; `experimental` and `quarantined`
|
|
7
|
+
* languages do not block.
|
|
8
|
+
*
|
|
9
|
+
* Initial classification (locked in Ring 1 #910):
|
|
10
|
+
* - production: javascript, typescript, python, java, c, cpp, csharp, go,
|
|
11
|
+
* ruby, rust, php, kotlin, swift, dart
|
|
12
|
+
* - experimental: vue (embedded-language / SFC complexity),
|
|
13
|
+
* cobol (regex-provider path)
|
|
14
|
+
* - quarantined: (none)
|
|
15
|
+
*/
|
|
16
|
+
import { SupportedLanguages } from '../languages.js';
|
|
17
|
+
export type LanguageClassification = 'production' | 'experimental' | 'quarantined';
|
|
18
|
+
/**
|
|
19
|
+
* The canonical classification for each supported language. Governance
|
|
20
|
+
* changes (promote `experimental` → `production`, quarantine a language, …)
|
|
21
|
+
* update this map in a dedicated PR.
|
|
22
|
+
*/
|
|
23
|
+
export declare const LanguageClassifications: Readonly<Record<SupportedLanguages, LanguageClassification>>;
|
|
24
|
+
/** Convenience predicate: is this language gating Ring 4 retirement? */
|
|
25
|
+
export declare function isProductionLanguage(lang: SupportedLanguages): boolean;
|
|
26
|
+
//# sourceMappingURL=language-classification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-classification.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/language-classification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,cAAc,GAAG,aAAa,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,CAkB9F,CAAC;AAEJ,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEtE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `LanguageClassification` — RFC §6.1 Ring 3 / Ring 4 governance.
|
|
3
|
+
*
|
|
4
|
+
* Classifies each `SupportedLanguages` member for the rollout. Ring 4 (DAG
|
|
5
|
+
* retirement) is gated on *all production languages* being registry-primary
|
|
6
|
+
* and stable for one release cycle; `experimental` and `quarantined`
|
|
7
|
+
* languages do not block.
|
|
8
|
+
*
|
|
9
|
+
* Initial classification (locked in Ring 1 #910):
|
|
10
|
+
* - production: javascript, typescript, python, java, c, cpp, csharp, go,
|
|
11
|
+
* ruby, rust, php, kotlin, swift, dart
|
|
12
|
+
* - experimental: vue (embedded-language / SFC complexity),
|
|
13
|
+
* cobol (regex-provider path)
|
|
14
|
+
* - quarantined: (none)
|
|
15
|
+
*/
|
|
16
|
+
import { SupportedLanguages } from '../languages.js';
|
|
17
|
+
/**
|
|
18
|
+
* The canonical classification for each supported language. Governance
|
|
19
|
+
* changes (promote `experimental` → `production`, quarantine a language, …)
|
|
20
|
+
* update this map in a dedicated PR.
|
|
21
|
+
*/
|
|
22
|
+
export const LanguageClassifications = {
|
|
23
|
+
[SupportedLanguages.JavaScript]: 'production',
|
|
24
|
+
[SupportedLanguages.TypeScript]: 'production',
|
|
25
|
+
[SupportedLanguages.Python]: 'production',
|
|
26
|
+
[SupportedLanguages.Java]: 'production',
|
|
27
|
+
[SupportedLanguages.C]: 'production',
|
|
28
|
+
[SupportedLanguages.CPlusPlus]: 'production',
|
|
29
|
+
[SupportedLanguages.CSharp]: 'production',
|
|
30
|
+
[SupportedLanguages.Go]: 'production',
|
|
31
|
+
[SupportedLanguages.Ruby]: 'production',
|
|
32
|
+
[SupportedLanguages.Rust]: 'production',
|
|
33
|
+
[SupportedLanguages.PHP]: 'production',
|
|
34
|
+
[SupportedLanguages.Kotlin]: 'production',
|
|
35
|
+
[SupportedLanguages.Swift]: 'production',
|
|
36
|
+
[SupportedLanguages.Dart]: 'production',
|
|
37
|
+
[SupportedLanguages.Vue]: 'experimental',
|
|
38
|
+
[SupportedLanguages.Cobol]: 'experimental',
|
|
39
|
+
};
|
|
40
|
+
/** Convenience predicate: is this language gating Ring 4 retirement? */
|
|
41
|
+
export function isProductionLanguage(lang) {
|
|
42
|
+
return LanguageClassifications[lang] === 'production';
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=language-classification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-classification.js","sourceRoot":"","sources":["../../src/scope-resolution/language-classification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAClC;IACE,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,YAAY;IAC7C,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,YAAY;IAC7C,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,YAAY;IACzC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,YAAY;IACvC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,YAAY;IACpC,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,YAAY;IAC5C,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,YAAY;IACzC,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,YAAY;IACrC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,YAAY;IACvC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,YAAY;IACvC,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,YAAY;IACtC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,YAAY;IACzC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;IACxC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,YAAY;IACvC,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,cAAc;IACxC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,cAAc;CAC3C,CAAC;AAEJ,wEAAwE;AACxE,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `MethodDispatchIndex` — materialized view of class hierarchies keyed by
|
|
3
|
+
* `DefId` (RFC §3.1; Ring 2 SHARED #914).
|
|
4
|
+
*
|
|
5
|
+
* Two O(1)-access maps used by `Registry.lookupMethod` and interface-
|
|
6
|
+
* dispatch callers:
|
|
7
|
+
*
|
|
8
|
+
* - `mroByOwnerDefId` : owner class → full MRO ancestor chain
|
|
9
|
+
* (excludes the owner itself, in per-language
|
|
10
|
+
* strategy order).
|
|
11
|
+
* - `implsByInterfaceDefId` : interface/trait → classes that implement it.
|
|
12
|
+
*
|
|
13
|
+
* **Not an MRO implementation.** The build function is a pure aggregator: it
|
|
14
|
+
* asks the caller (via `computeMro` and `implementsOf` callbacks) for the
|
|
15
|
+
* per-language answers and materializes the two-way index. MRO strategies
|
|
16
|
+
* live where they already do today (`model/resolve.ts § c3Linearize`,
|
|
17
|
+
* `languages/ruby.ts § selectDispatch`, etc.) — this index does not
|
|
18
|
+
* reimplement them.
|
|
19
|
+
*
|
|
20
|
+
* Why callbacks and not a shared strategy registry: the five strategies
|
|
21
|
+
* (Python C3, Ruby kind-aware, Java/Kotlin linear, Rust qualified-syntax,
|
|
22
|
+
* COBOL none) already exist in the CLI package and depend on the CLI's
|
|
23
|
+
* `HeritageMap` + `SemanticModel`. Pulling them into `@codragraph/shared` would
|
|
24
|
+
* require migrating both — out of scope for #914. Callbacks let the shared
|
|
25
|
+
* build stay pure while honoring existing strategies verbatim.
|
|
26
|
+
*
|
|
27
|
+
* Consumed by: #917 (`Registry.lookupMethod` MRO fast path, interface
|
|
28
|
+
* dispatch resolver).
|
|
29
|
+
*/
|
|
30
|
+
import type { DefId } from './types.js';
|
|
31
|
+
export interface MethodDispatchIndex {
|
|
32
|
+
/**
|
|
33
|
+
* Full MRO ancestor chain per owner class (excludes the owner itself).
|
|
34
|
+
* Order reflects the per-language strategy used by `computeMro`.
|
|
35
|
+
*/
|
|
36
|
+
readonly mroByOwnerDefId: ReadonlyMap<DefId, readonly DefId[]>;
|
|
37
|
+
/** Interfaces / traits → classes that implement them. */
|
|
38
|
+
readonly implsByInterfaceDefId: ReadonlyMap<DefId, readonly DefId[]>;
|
|
39
|
+
/** `mroByOwnerDefId.get`, with an empty frozen array on miss. */
|
|
40
|
+
mroFor(ownerDefId: DefId): readonly DefId[];
|
|
41
|
+
/** `implsByInterfaceDefId.get`, with an empty frozen array on miss. */
|
|
42
|
+
implementorsOf(interfaceDefId: DefId): readonly DefId[];
|
|
43
|
+
}
|
|
44
|
+
export interface MethodDispatchInput {
|
|
45
|
+
/**
|
|
46
|
+
* Owner defs to index (classes, structs, traits, interfaces — any kind
|
|
47
|
+
* that can appear on the owner side of a method-dispatch graph).
|
|
48
|
+
*/
|
|
49
|
+
readonly owners: readonly DefId[];
|
|
50
|
+
/**
|
|
51
|
+
* Return the full MRO ancestor chain for `ownerDefId`, **excluding the
|
|
52
|
+
* owner itself**, in the order dictated by the owner's language-specific
|
|
53
|
+
* MRO strategy.
|
|
54
|
+
*
|
|
55
|
+
* Contract:
|
|
56
|
+
* - Pure (no side effects).
|
|
57
|
+
* - Deterministic per input.
|
|
58
|
+
* - `undefined` not allowed — return `[]` when the owner has no parents.
|
|
59
|
+
*/
|
|
60
|
+
readonly computeMro: (ownerDefId: DefId) => readonly DefId[];
|
|
61
|
+
/**
|
|
62
|
+
* Return the set of interface/trait defs that `ownerDefId` implements.
|
|
63
|
+
* Transitive inclusion (e.g., `implements` on a parent class) is the
|
|
64
|
+
* caller's choice — the build function simply inverts whatever is
|
|
65
|
+
* returned.
|
|
66
|
+
*
|
|
67
|
+
* Repeated IDs in the output are deduplicated automatically.
|
|
68
|
+
*
|
|
69
|
+
* **Call-count contract.** `implementsOf` is invoked **once per
|
|
70
|
+
* occurrence** of an owner in `input.owners`, not once per unique
|
|
71
|
+
* owner. Duplicate owners therefore re-invoke it; dedup happens at
|
|
72
|
+
* the bucket layer (after the callback returns). Callers with
|
|
73
|
+
* expensive `implementsOf` implementations should pass a deduplicated
|
|
74
|
+
* `owners` list. `computeMro`, by contrast, is memoized by the first-
|
|
75
|
+
* write-wins policy and fires at most once per unique owner.
|
|
76
|
+
*/
|
|
77
|
+
readonly implementsOf: (ownerDefId: DefId) => readonly DefId[];
|
|
78
|
+
}
|
|
79
|
+
export declare function buildMethodDispatchIndex(input: MethodDispatchInput): MethodDispatchIndex;
|
|
80
|
+
//# sourceMappingURL=method-dispatch-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-dispatch-index.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/method-dispatch-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC;IAC/D,yDAAyD;IACzD,QAAQ,CAAC,qBAAqB,EAAE,WAAW,CAAC,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC;IAErE,iEAAiE;IACjE,MAAM,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS,KAAK,EAAE,CAAC;IAC5C,uEAAuE;IACvE,cAAc,CAAC,cAAc,EAAE,KAAK,GAAG,SAAS,KAAK,EAAE,CAAC;CACzD;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,KAAK,KAAK,SAAS,KAAK,EAAE,CAAC;IAC7D;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,KAAK,KAAK,SAAS,KAAK,EAAE,CAAC;CAChE;AAID,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,mBAAmB,CAqCxF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `MethodDispatchIndex` — materialized view of class hierarchies keyed by
|
|
3
|
+
* `DefId` (RFC §3.1; Ring 2 SHARED #914).
|
|
4
|
+
*
|
|
5
|
+
* Two O(1)-access maps used by `Registry.lookupMethod` and interface-
|
|
6
|
+
* dispatch callers:
|
|
7
|
+
*
|
|
8
|
+
* - `mroByOwnerDefId` : owner class → full MRO ancestor chain
|
|
9
|
+
* (excludes the owner itself, in per-language
|
|
10
|
+
* strategy order).
|
|
11
|
+
* - `implsByInterfaceDefId` : interface/trait → classes that implement it.
|
|
12
|
+
*
|
|
13
|
+
* **Not an MRO implementation.** The build function is a pure aggregator: it
|
|
14
|
+
* asks the caller (via `computeMro` and `implementsOf` callbacks) for the
|
|
15
|
+
* per-language answers and materializes the two-way index. MRO strategies
|
|
16
|
+
* live where they already do today (`model/resolve.ts § c3Linearize`,
|
|
17
|
+
* `languages/ruby.ts § selectDispatch`, etc.) — this index does not
|
|
18
|
+
* reimplement them.
|
|
19
|
+
*
|
|
20
|
+
* Why callbacks and not a shared strategy registry: the five strategies
|
|
21
|
+
* (Python C3, Ruby kind-aware, Java/Kotlin linear, Rust qualified-syntax,
|
|
22
|
+
* COBOL none) already exist in the CLI package and depend on the CLI's
|
|
23
|
+
* `HeritageMap` + `SemanticModel`. Pulling them into `@codragraph/shared` would
|
|
24
|
+
* require migrating both — out of scope for #914. Callbacks let the shared
|
|
25
|
+
* build stay pure while honoring existing strategies verbatim.
|
|
26
|
+
*
|
|
27
|
+
* Consumed by: #917 (`Registry.lookupMethod` MRO fast path, interface
|
|
28
|
+
* dispatch resolver).
|
|
29
|
+
*/
|
|
30
|
+
// ─── Builder ────────────────────────────────────────────────────────────────
|
|
31
|
+
export function buildMethodDispatchIndex(input) {
|
|
32
|
+
const mroByOwnerDefId = new Map();
|
|
33
|
+
const implsBuilding = new Map();
|
|
34
|
+
const implsSeen = new Map();
|
|
35
|
+
for (const ownerId of input.owners) {
|
|
36
|
+
// First-write-wins on duplicate owner ids: a stable policy consistent
|
|
37
|
+
// with sibling indexes (#913 DefIndex / ModuleScopeIndex).
|
|
38
|
+
if (!mroByOwnerDefId.has(ownerId)) {
|
|
39
|
+
const chain = input.computeMro(ownerId);
|
|
40
|
+
mroByOwnerDefId.set(ownerId, Object.freeze(chain.slice()));
|
|
41
|
+
}
|
|
42
|
+
for (const ifaceId of input.implementsOf(ownerId)) {
|
|
43
|
+
let seen = implsSeen.get(ifaceId);
|
|
44
|
+
if (seen === undefined) {
|
|
45
|
+
seen = new Set();
|
|
46
|
+
implsSeen.set(ifaceId, seen);
|
|
47
|
+
}
|
|
48
|
+
if (seen.has(ownerId))
|
|
49
|
+
continue;
|
|
50
|
+
seen.add(ownerId);
|
|
51
|
+
let bucket = implsBuilding.get(ifaceId);
|
|
52
|
+
if (bucket === undefined) {
|
|
53
|
+
bucket = [];
|
|
54
|
+
implsBuilding.set(ifaceId, bucket);
|
|
55
|
+
}
|
|
56
|
+
bucket.push(ownerId);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const implsByInterfaceDefId = new Map();
|
|
60
|
+
for (const [ifaceId, owners] of implsBuilding) {
|
|
61
|
+
implsByInterfaceDefId.set(ifaceId, Object.freeze(owners.slice()));
|
|
62
|
+
}
|
|
63
|
+
return wrapIndex(mroByOwnerDefId, implsByInterfaceDefId);
|
|
64
|
+
}
|
|
65
|
+
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
66
|
+
const EMPTY = Object.freeze([]);
|
|
67
|
+
function wrapIndex(mroByOwnerDefId, implsByInterfaceDefId) {
|
|
68
|
+
return {
|
|
69
|
+
mroByOwnerDefId,
|
|
70
|
+
implsByInterfaceDefId,
|
|
71
|
+
mroFor(ownerDefId) {
|
|
72
|
+
return mroByOwnerDefId.get(ownerDefId) ?? EMPTY;
|
|
73
|
+
},
|
|
74
|
+
implementorsOf(interfaceDefId) {
|
|
75
|
+
return implsByInterfaceDefId.get(interfaceDefId) ?? EMPTY;
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=method-dispatch-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-dispatch-index.js","sourceRoot":"","sources":["../../src/scope-resolution/method-dispatch-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAyDH,+EAA+E;AAE/E,MAAM,UAAU,wBAAwB,CAAC,KAA0B;IACjE,MAAM,eAAe,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC3D,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAChD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqB,CAAC;IAE/C,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACnC,sEAAsE;QACtE,2DAA2D;QAC3D,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAClC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACxC,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7D,CAAC;QAED,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;YAClD,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAClC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,IAAI,GAAG,IAAI,GAAG,EAAS,CAAC;gBACxB,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC;YACD,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;gBAAE,SAAS;YAChC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAElB,IAAI,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACxC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,GAAG,EAAE,CAAC;gBACZ,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACrC,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAA2B,CAAC;IACjE,KAAK,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QAC9C,qBAAqB,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,SAAS,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;AAC3D,CAAC;AAED,+EAA+E;AAE/E,MAAM,KAAK,GAAqB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAElD,SAAS,SAAS,CAChB,eAA6C,EAC7C,qBAAmD;IAEnD,OAAO;QACL,eAAe;QACf,qBAAqB;QACrB,MAAM,CAAC,UAAiB;YACtB,OAAO,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;QAClD,CAAC;QACD,cAAc,CAAC,cAAqB;YAClC,OAAO,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,KAAK,CAAC;QAC5D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ModuleScopeIndex` — O(1) `filePath → moduleScopeId` lookup.
|
|
3
|
+
*
|
|
4
|
+
* Every file parsed produces exactly one `Module` scope at its root. The
|
|
5
|
+
* finalize algorithm needs to resolve `ImportEdge.targetFile` to a concrete
|
|
6
|
+
* module scope id in constant time during the link pass; this index is that
|
|
7
|
+
* mapping.
|
|
8
|
+
*
|
|
9
|
+
* Part of RFC #909 Ring 2 SHARED — #913.
|
|
10
|
+
*
|
|
11
|
+
* Consumed by: #915 (SCC finalize link pass), #923 (shadow harness when
|
|
12
|
+
* resolving callsite file → enclosing module).
|
|
13
|
+
*/
|
|
14
|
+
import type { ScopeId } from './types.js';
|
|
15
|
+
export interface ModuleScopeIndex {
|
|
16
|
+
readonly byFilePath: ReadonlyMap<string, ScopeId>;
|
|
17
|
+
readonly size: number;
|
|
18
|
+
get(filePath: string): ScopeId | undefined;
|
|
19
|
+
has(filePath: string): boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ModuleScopeEntry {
|
|
22
|
+
readonly filePath: string;
|
|
23
|
+
readonly moduleScopeId: ScopeId;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build a `ModuleScopeIndex` from a flat list of `{ filePath, moduleScopeId }`
|
|
27
|
+
* pairs.
|
|
28
|
+
*
|
|
29
|
+
* **Collision policy: first-write-wins.** A file should appear exactly once
|
|
30
|
+
* in a single ingestion run; collisions indicate the same file was parsed
|
|
31
|
+
* twice or a `filePath` normalization bug upstream. Dropping the later
|
|
32
|
+
* entry preserves the first-stable id the rest of the pipeline may already
|
|
33
|
+
* have registered against.
|
|
34
|
+
*
|
|
35
|
+
* **Caller contract: filePath keys must be pre-normalized.** This index
|
|
36
|
+
* keys on the raw `filePath` string and does NOT canonicalize separators,
|
|
37
|
+
* case, or trailing slashes. Callers upstream of this function must agree
|
|
38
|
+
* on a canonical form (typically repo-root-relative, POSIX separators,
|
|
39
|
+
* no trailing slash) before constructing entries — otherwise `C:\foo\bar.ts`,
|
|
40
|
+
* `C:/foo/bar.ts`, and `foo/bar.ts` will all hash to distinct buckets and
|
|
41
|
+
* `get()` will miss.
|
|
42
|
+
*
|
|
43
|
+
* Pure function — safe to call repeatedly; no side effects.
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildModuleScopeIndex(entries: readonly ModuleScopeEntry[]): ModuleScopeIndex;
|
|
46
|
+
//# sourceMappingURL=module-scope-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-scope-index.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,gBAAgB,CAO5F"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ModuleScopeIndex` — O(1) `filePath → moduleScopeId` lookup.
|
|
3
|
+
*
|
|
4
|
+
* Every file parsed produces exactly one `Module` scope at its root. The
|
|
5
|
+
* finalize algorithm needs to resolve `ImportEdge.targetFile` to a concrete
|
|
6
|
+
* module scope id in constant time during the link pass; this index is that
|
|
7
|
+
* mapping.
|
|
8
|
+
*
|
|
9
|
+
* Part of RFC #909 Ring 2 SHARED — #913.
|
|
10
|
+
*
|
|
11
|
+
* Consumed by: #915 (SCC finalize link pass), #923 (shadow harness when
|
|
12
|
+
* resolving callsite file → enclosing module).
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Build a `ModuleScopeIndex` from a flat list of `{ filePath, moduleScopeId }`
|
|
16
|
+
* pairs.
|
|
17
|
+
*
|
|
18
|
+
* **Collision policy: first-write-wins.** A file should appear exactly once
|
|
19
|
+
* in a single ingestion run; collisions indicate the same file was parsed
|
|
20
|
+
* twice or a `filePath` normalization bug upstream. Dropping the later
|
|
21
|
+
* entry preserves the first-stable id the rest of the pipeline may already
|
|
22
|
+
* have registered against.
|
|
23
|
+
*
|
|
24
|
+
* **Caller contract: filePath keys must be pre-normalized.** This index
|
|
25
|
+
* keys on the raw `filePath` string and does NOT canonicalize separators,
|
|
26
|
+
* case, or trailing slashes. Callers upstream of this function must agree
|
|
27
|
+
* on a canonical form (typically repo-root-relative, POSIX separators,
|
|
28
|
+
* no trailing slash) before constructing entries — otherwise `C:\foo\bar.ts`,
|
|
29
|
+
* `C:/foo/bar.ts`, and `foo/bar.ts` will all hash to distinct buckets and
|
|
30
|
+
* `get()` will miss.
|
|
31
|
+
*
|
|
32
|
+
* Pure function — safe to call repeatedly; no side effects.
|
|
33
|
+
*/
|
|
34
|
+
export function buildModuleScopeIndex(entries) {
|
|
35
|
+
const byFilePath = new Map();
|
|
36
|
+
for (const { filePath, moduleScopeId } of entries) {
|
|
37
|
+
if (byFilePath.has(filePath))
|
|
38
|
+
continue; // first-write-wins
|
|
39
|
+
byFilePath.set(filePath, moduleScopeId);
|
|
40
|
+
}
|
|
41
|
+
return wrapIndex(byFilePath);
|
|
42
|
+
}
|
|
43
|
+
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
44
|
+
function wrapIndex(byFilePath) {
|
|
45
|
+
return {
|
|
46
|
+
byFilePath,
|
|
47
|
+
get size() {
|
|
48
|
+
return byFilePath.size;
|
|
49
|
+
},
|
|
50
|
+
get(filePath) {
|
|
51
|
+
return byFilePath.get(filePath);
|
|
52
|
+
},
|
|
53
|
+
has(filePath) {
|
|
54
|
+
return byFilePath.has(filePath);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=module-scope-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-scope-index.js","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAgBH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAoC;IACxE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC9C,KAAK,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,OAAO,EAAE,CAAC;QAClD,IAAI,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS,CAAC,mBAAmB;QAC3D,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAED,+EAA+E;AAE/E,SAAS,SAAS,CAAC,UAAgC;IACjD,OAAO;QACL,UAAU;QACV,IAAI,IAAI;YACN,OAAO,UAAU,CAAC,IAAI,CAAC;QACzB,CAAC;QACD,GAAG,CAAC,QAAgB;YAClB,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QACD,GAAG,CAAC,QAAgB;YAClB,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ORIGIN_PRIORITY` — RFC Appendix B (authoritative values).
|
|
3
|
+
*
|
|
4
|
+
* Tie-break ordering applied inside `Registry.lookup` Step 7 when
|
|
5
|
+
* `|Δconfidence| < 0.001` between two `Resolution` candidates. Lower number
|
|
6
|
+
* = stronger (wins the tie).
|
|
7
|
+
*
|
|
8
|
+
* Full tie-break order (§4.2 Step 7):
|
|
9
|
+
* confidence DESC → scope depth ASC → MRO depth ASC → ORIGIN_PRIORITY ASC
|
|
10
|
+
* → DefId.localeCompare
|
|
11
|
+
*/
|
|
12
|
+
export type OriginForTieBreak = 'local' | 'import' | 'reexport' | 'namespace' | 'wildcard' | 'global-qualified' | 'global-name';
|
|
13
|
+
export declare const ORIGIN_PRIORITY: Readonly<Record<OriginForTieBreak, number>>;
|
|
14
|
+
//# sourceMappingURL=origin-priority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin-priority.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/origin-priority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,WAAW,GACX,UAAU,GACV,kBAAkB,GAClB,aAAa,CAAC;AAElB,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAQvE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ORIGIN_PRIORITY` — RFC Appendix B (authoritative values).
|
|
3
|
+
*
|
|
4
|
+
* Tie-break ordering applied inside `Registry.lookup` Step 7 when
|
|
5
|
+
* `|Δconfidence| < 0.001` between two `Resolution` candidates. Lower number
|
|
6
|
+
* = stronger (wins the tie).
|
|
7
|
+
*
|
|
8
|
+
* Full tie-break order (§4.2 Step 7):
|
|
9
|
+
* confidence DESC → scope depth ASC → MRO depth ASC → ORIGIN_PRIORITY ASC
|
|
10
|
+
* → DefId.localeCompare
|
|
11
|
+
*/
|
|
12
|
+
export const ORIGIN_PRIORITY = {
|
|
13
|
+
local: 0,
|
|
14
|
+
import: 1,
|
|
15
|
+
reexport: 2,
|
|
16
|
+
namespace: 3,
|
|
17
|
+
wildcard: 4,
|
|
18
|
+
'global-qualified': 5,
|
|
19
|
+
'global-name': 6,
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=origin-priority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin-priority.js","sourceRoot":"","sources":["../../src/scope-resolution/origin-priority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,MAAM,CAAC,MAAM,eAAe,GAAgD;IAC1E,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,CAAC;IACX,kBAAkB,EAAE,CAAC;IACrB,aAAa,EAAE,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ParsedFile` — the per-file artifact produced by `ScopeExtractor`
|
|
3
|
+
* (RFC §3.2 Phase 1; Ring 2 PKG #919).
|
|
4
|
+
*
|
|
5
|
+
* The boundary between Phase 1 (extraction, per-file, parallelizable) and
|
|
6
|
+
* Phase 2 (finalize, cross-file). One `ParsedFile` is emitted per source
|
|
7
|
+
* file; the finalize orchestrator (#921) collects them into a workspace-
|
|
8
|
+
* wide set and feeds them to the shared `finalize` algorithm (#915).
|
|
9
|
+
*
|
|
10
|
+
* ## Shape
|
|
11
|
+
*
|
|
12
|
+
* - `scopes` — every `Scope` created for this file, in tree-
|
|
13
|
+
* topological order (module first, then children).
|
|
14
|
+
* `Scope.bindings` carry **local-only** bindings at
|
|
15
|
+
* this stage; finalize merges imports/wildcards on top.
|
|
16
|
+
* - `parsedImports` — raw `ParsedImport[]` for this file; finalize
|
|
17
|
+
* resolves each to a concrete `ImportEdge`.
|
|
18
|
+
* - `localDefs` — defs structurally declared in this file. A
|
|
19
|
+
* superset of every `Scope.ownedDefs` union.
|
|
20
|
+
* Listed separately so `finalize` can dedup-index
|
|
21
|
+
* without re-walking scopes.
|
|
22
|
+
* - `referenceSites` — pre-resolution usage facts; populated by the
|
|
23
|
+
* resolution phase into `ReferenceIndex`.
|
|
24
|
+
*
|
|
25
|
+
* ## What `ParsedFile` deliberately does NOT carry
|
|
26
|
+
*
|
|
27
|
+
* - Linked `ImportEdge`s. Those are finalize output.
|
|
28
|
+
* - A `ScopeTree` instance. Callers build one from `scopes` (cheap —
|
|
29
|
+
* `buildScopeTree(parsedFile.scopes)`). Keeping the ParsedFile flat
|
|
30
|
+
* makes IPC serialization from worker threads straightforward.
|
|
31
|
+
* - Merged module-scope bindings. Finalize owns that materialization.
|
|
32
|
+
*
|
|
33
|
+
* ## Compatibility with `FinalizeFile`
|
|
34
|
+
*
|
|
35
|
+
* `FinalizeFile` (defined in `./finalize-algorithm.ts`) is a structural
|
|
36
|
+
* subset of `ParsedFile` — `filePath`, `moduleScope`, `parsedImports`,
|
|
37
|
+
* `localDefs`. A `ParsedFile` is trivially convertible to a `FinalizeFile`
|
|
38
|
+
* by picking those four fields, so the finalize orchestrator threads
|
|
39
|
+
* ParsedFile through to the shared algorithm without shape-shifting.
|
|
40
|
+
*
|
|
41
|
+
* ## Source-of-truth invariant
|
|
42
|
+
*
|
|
43
|
+
* `ParsedFile` is the single semantic model consumed by both the legacy
|
|
44
|
+
* DAG (`@codragraph/cli/src/core/ingestion/` outside `scope-resolution/`) and
|
|
45
|
+
* the scope-resolution pipeline (`@codragraph/cli/src/core/ingestion/scope-resolution/`).
|
|
46
|
+
* Downstream passes MUST NOT build a parallel parse representation; if
|
|
47
|
+
* a pass needs AST-level facts that `ParsedFile` doesn't expose, it
|
|
48
|
+
* should reuse the orchestrator's `treeCache` rather than re-invoke
|
|
49
|
+
* `parser.parse(...)` on its own. See the
|
|
50
|
+
* `ScopeResolver` contract (`@codragraph/cli/src/core/ingestion/scope-resolution/contract/scope-resolver.ts`)
|
|
51
|
+
* for the full list of invariants downstream consumers rely on.
|
|
52
|
+
*/
|
|
53
|
+
import type { Scope, ScopeId } from './types.js';
|
|
54
|
+
import type { ParsedImport } from './types.js';
|
|
55
|
+
import type { SymbolDefinition } from './symbol-definition.js';
|
|
56
|
+
import type { ReferenceSite } from './reference-site.js';
|
|
57
|
+
export interface ParsedFile {
|
|
58
|
+
readonly filePath: string;
|
|
59
|
+
/** `Scope.id` of the file's root `Module` scope. */
|
|
60
|
+
readonly moduleScope: ScopeId;
|
|
61
|
+
/**
|
|
62
|
+
* All scopes in this file, typically emitted in tree-topological order.
|
|
63
|
+
* Caller reconstructs a `ScopeTree` via `buildScopeTree(scopes)` when
|
|
64
|
+
* navigation or invariant re-validation is needed.
|
|
65
|
+
*/
|
|
66
|
+
readonly scopes: readonly Scope[];
|
|
67
|
+
readonly parsedImports: readonly ParsedImport[];
|
|
68
|
+
/**
|
|
69
|
+
* All defs structurally declared in this file (classes, methods, fields,
|
|
70
|
+
* variables). Mirrors the union of `Scope.ownedDefs` across `scopes`,
|
|
71
|
+
* pre-flattened for O(N) consumption by finalize.
|
|
72
|
+
*/
|
|
73
|
+
readonly localDefs: readonly SymbolDefinition[];
|
|
74
|
+
readonly referenceSites: readonly ReferenceSite[];
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=parsed-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsed-file.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/parsed-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAChD,QAAQ,CAAC,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;CACnD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ParsedFile` — the per-file artifact produced by `ScopeExtractor`
|
|
3
|
+
* (RFC §3.2 Phase 1; Ring 2 PKG #919).
|
|
4
|
+
*
|
|
5
|
+
* The boundary between Phase 1 (extraction, per-file, parallelizable) and
|
|
6
|
+
* Phase 2 (finalize, cross-file). One `ParsedFile` is emitted per source
|
|
7
|
+
* file; the finalize orchestrator (#921) collects them into a workspace-
|
|
8
|
+
* wide set and feeds them to the shared `finalize` algorithm (#915).
|
|
9
|
+
*
|
|
10
|
+
* ## Shape
|
|
11
|
+
*
|
|
12
|
+
* - `scopes` — every `Scope` created for this file, in tree-
|
|
13
|
+
* topological order (module first, then children).
|
|
14
|
+
* `Scope.bindings` carry **local-only** bindings at
|
|
15
|
+
* this stage; finalize merges imports/wildcards on top.
|
|
16
|
+
* - `parsedImports` — raw `ParsedImport[]` for this file; finalize
|
|
17
|
+
* resolves each to a concrete `ImportEdge`.
|
|
18
|
+
* - `localDefs` — defs structurally declared in this file. A
|
|
19
|
+
* superset of every `Scope.ownedDefs` union.
|
|
20
|
+
* Listed separately so `finalize` can dedup-index
|
|
21
|
+
* without re-walking scopes.
|
|
22
|
+
* - `referenceSites` — pre-resolution usage facts; populated by the
|
|
23
|
+
* resolution phase into `ReferenceIndex`.
|
|
24
|
+
*
|
|
25
|
+
* ## What `ParsedFile` deliberately does NOT carry
|
|
26
|
+
*
|
|
27
|
+
* - Linked `ImportEdge`s. Those are finalize output.
|
|
28
|
+
* - A `ScopeTree` instance. Callers build one from `scopes` (cheap —
|
|
29
|
+
* `buildScopeTree(parsedFile.scopes)`). Keeping the ParsedFile flat
|
|
30
|
+
* makes IPC serialization from worker threads straightforward.
|
|
31
|
+
* - Merged module-scope bindings. Finalize owns that materialization.
|
|
32
|
+
*
|
|
33
|
+
* ## Compatibility with `FinalizeFile`
|
|
34
|
+
*
|
|
35
|
+
* `FinalizeFile` (defined in `./finalize-algorithm.ts`) is a structural
|
|
36
|
+
* subset of `ParsedFile` — `filePath`, `moduleScope`, `parsedImports`,
|
|
37
|
+
* `localDefs`. A `ParsedFile` is trivially convertible to a `FinalizeFile`
|
|
38
|
+
* by picking those four fields, so the finalize orchestrator threads
|
|
39
|
+
* ParsedFile through to the shared algorithm without shape-shifting.
|
|
40
|
+
*
|
|
41
|
+
* ## Source-of-truth invariant
|
|
42
|
+
*
|
|
43
|
+
* `ParsedFile` is the single semantic model consumed by both the legacy
|
|
44
|
+
* DAG (`@codragraph/cli/src/core/ingestion/` outside `scope-resolution/`) and
|
|
45
|
+
* the scope-resolution pipeline (`@codragraph/cli/src/core/ingestion/scope-resolution/`).
|
|
46
|
+
* Downstream passes MUST NOT build a parallel parse representation; if
|
|
47
|
+
* a pass needs AST-level facts that `ParsedFile` doesn't expose, it
|
|
48
|
+
* should reuse the orchestrator's `treeCache` rather than re-invoke
|
|
49
|
+
* `parser.parse(...)` on its own. See the
|
|
50
|
+
* `ScopeResolver` contract (`@codragraph/cli/src/core/ingestion/scope-resolution/contract/scope-resolver.ts`)
|
|
51
|
+
* for the full list of invariants downstream consumers rely on.
|
|
52
|
+
*/
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=parsed-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsed-file.js","sourceRoot":"","sources":["../../src/scope-resolution/parsed-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PositionIndex` — O(log N_file) scope-at-position lookup
|
|
3
|
+
* (RFC §3.1; Ring 2 SHARED #912).
|
|
4
|
+
*
|
|
5
|
+
* Per-file sorted array of `(range, scopeId)` entries, sorted by start
|
|
6
|
+
* position ASC (`startLine`, then `startCol`). `atPosition(filePath, line,
|
|
7
|
+
* col)` binary-searches for the last entry whose start ≤ (line, col), then
|
|
8
|
+
* scans backward through the sorted prefix and returns the first entry
|
|
9
|
+
* whose range contains the query position.
|
|
10
|
+
*
|
|
11
|
+
* **Why this works.** `ScopeTree`'s invariants (parent strictly contains
|
|
12
|
+
* child; siblings don't overlap) guarantee that the scopes containing a
|
|
13
|
+
* given point form an **ancestor chain**. When scanning backward through
|
|
14
|
+
* entries sorted by start position ASC, the first scope we find that
|
|
15
|
+
* contains the query is the innermost one — any deeper-starting scope
|
|
16
|
+
* that also contained the query would appear *later* in the sorted array,
|
|
17
|
+
* but we're only scanning entries with start ≤ query, so anything later
|
|
18
|
+
* necessarily starts after the query and can't contain it.
|
|
19
|
+
*
|
|
20
|
+
* Expected complexity: `O(log N_file + D)` where `D` is the lexical depth
|
|
21
|
+
* at the query position (typically ≤ 10). Worst-case degrades to `O(N_file)`
|
|
22
|
+
* only under pathological inputs (many scopes starting at the same line).
|
|
23
|
+
*
|
|
24
|
+
* **Line/column conventions.** Matches `Range` in `types.ts`: lines are
|
|
25
|
+
* 1-based, columns are 0-based. Ranges are **inclusive on both ends** —
|
|
26
|
+
* a scope whose `endLine:endCol` equals the query position still contains
|
|
27
|
+
* it. That matches how tree-sitter captures bodies (closing brace
|
|
28
|
+
* included) and how closed PR #902's `enclosingFunctions` behaved.
|
|
29
|
+
*/
|
|
30
|
+
import type { Scope, ScopeId } from './types.js';
|
|
31
|
+
export interface PositionIndex {
|
|
32
|
+
/** Total scope entries indexed across all files. */
|
|
33
|
+
readonly size: number;
|
|
34
|
+
/**
|
|
35
|
+
* Innermost scope containing `(line, col)` in `filePath`, or `undefined`
|
|
36
|
+
* when nothing contains it (position before file start, after file end,
|
|
37
|
+
* or filePath not indexed).
|
|
38
|
+
*
|
|
39
|
+
* **Touching-boundary semantics.** Ranges are inclusive on both ends.
|
|
40
|
+
* When two sibling scopes share a boundary point — e.g.
|
|
41
|
+
* `[5:0, 10:0]` and `[10:0, 15:0]`, which is legal under `ScopeTree`'s
|
|
42
|
+
* non-overlap invariant — a query at the shared point `(10, 0)` is
|
|
43
|
+
* contained by **both**. The innermost-wins tie-break rule applies as
|
|
44
|
+
* usual: since neither is nested inside the other, the one that
|
|
45
|
+
* **starts latest** wins, i.e. the **right** sibling. The mechanism
|
|
46
|
+
* is the backward scan through the start-position-sorted array (see
|
|
47
|
+
* `findLastStartLteIndex` below) — both siblings land before the
|
|
48
|
+
* upper-bound cursor, and the right sibling is scanned first. Queries at non-boundary positions between them naturally
|
|
49
|
+
* fall to the unique containing scope.
|
|
50
|
+
*/
|
|
51
|
+
atPosition(filePath: string, line: number, col: number): ScopeId | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build a `PositionIndex` from a flat list of `Scope` records.
|
|
55
|
+
*
|
|
56
|
+
* Duplicate `id`s are tolerated and deduplicated — the caller's
|
|
57
|
+
* `ScopeTree.buildScopeTree` is the authoritative validator of scope
|
|
58
|
+
* identity, and the position index does not need to re-check that
|
|
59
|
+
* invariant.
|
|
60
|
+
*/
|
|
61
|
+
export declare function buildPositionIndex(scopes: readonly Scope[]): PositionIndex;
|
|
62
|
+
//# sourceMappingURL=position-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-index.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/position-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAS,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC9E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,aAAa,CAqB1E"}
|