gitnexus 1.6.3-rc.9 → 1.6.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -5
- package/dist/_shared/graph/types.d.ts +16 -0
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +4 -2
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js +2 -0
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/scope-resolution/def-index.js +2 -2
- package/dist/_shared/scope-resolution/def-index.js.map +1 -1
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts +8 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/method-dispatch-index.js +2 -2
- package/dist/_shared/scope-resolution/method-dispatch-index.js.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.d.ts +8 -0
- package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/module-scope-index.js +10 -2
- package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
- 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 +12 -0
- package/dist/_shared/scope-resolution/position-index.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/position-index.js +2 -2
- package/dist/_shared/scope-resolution/position-index.js.map +1 -1
- package/dist/_shared/scope-resolution/qualified-name-index.js +2 -2
- package/dist/_shared/scope-resolution/qualified-name-index.js.map +1 -1
- 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/evidence.js +5 -0
- package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/lookup-core.js +21 -5
- package/dist/_shared/scope-resolution/registries/lookup-core.js.map +1 -1
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts +1 -10
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/resolve-type-ref.js +6 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.js.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.d.ts +4 -4
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.js +3 -2
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +6 -2
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/shadow/aggregate.js +5 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.js.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +11 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.js +35 -4
- package/dist/cli/analyze.d.ts +27 -0
- package/dist/cli/analyze.js +31 -1
- package/dist/cli/clean.js +19 -1
- package/dist/cli/group.js +73 -0
- package/dist/cli/index-repo.js +8 -1
- package/dist/cli/index.js +26 -1
- package/dist/cli/list.js +11 -1
- package/dist/cli/remove.d.ts +30 -0
- package/dist/cli/remove.js +99 -0
- package/dist/cli/setup.js +185 -57
- package/dist/cli/tool.d.ts +5 -0
- package/dist/cli/tool.js +42 -0
- package/dist/config/ignore-service.d.ts +9 -0
- package/dist/config/ignore-service.js +80 -13
- package/dist/core/embedding-mode.d.ts +30 -0
- package/dist/core/embedding-mode.js +30 -0
- package/dist/core/embeddings/ast-utils.js +22 -22
- package/dist/core/embeddings/chunker.js +30 -25
- package/dist/core/embeddings/embedding-pipeline.d.ts +6 -0
- package/dist/core/embeddings/embedding-pipeline.js +15 -6
- package/dist/core/embeddings/text-generator.d.ts +1 -1
- package/dist/core/embeddings/text-generator.js +33 -24
- package/dist/core/embeddings/types.d.ts +43 -1
- package/dist/core/embeddings/types.js +101 -29
- package/dist/core/git-staleness.d.ts +18 -0
- package/dist/core/git-staleness.js +108 -0
- package/dist/core/graph/graph.js +115 -20
- package/dist/core/graph/types.d.ts +12 -1
- package/dist/core/group/config-parser.d.ts +4 -0
- package/dist/core/group/config-parser.js +18 -1
- package/dist/core/group/cross-impact.d.ts +41 -0
- package/dist/core/group/cross-impact.js +441 -0
- package/dist/core/group/extractors/http-patterns/php.js +126 -18
- 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/resolve-at-member.d.ts +10 -0
- package/dist/core/group/resolve-at-member.js +31 -0
- package/dist/core/group/service.d.ts +9 -0
- package/dist/core/group/service.js +259 -25
- package/dist/core/group/types.d.ts +30 -0
- package/dist/core/ingestion/ast-cache.d.ts +16 -1
- package/dist/core/ingestion/ast-cache.js +14 -2
- package/dist/core/ingestion/call-processor.js +9 -0
- package/dist/core/ingestion/emit-references.d.ts +88 -0
- package/dist/core/ingestion/emit-references.js +229 -0
- package/dist/core/ingestion/filesystem-walker.js +6 -4
- 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.js +6 -2
- package/dist/core/ingestion/import-processor.js +4 -0
- package/dist/core/ingestion/import-resolvers/python.js +9 -6
- 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-provider.d.ts +36 -33
- 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.js +14 -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.js +14 -0
- package/dist/core/ingestion/model/method-registry.d.ts +9 -0
- package/dist/core/ingestion/model/method-registry.js +4 -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 +64 -0
- package/dist/core/ingestion/model/semantic-model.js +55 -0
- package/dist/core/ingestion/mro-processor.js +38 -22
- package/dist/core/ingestion/parsing-processor.d.ts +18 -1
- package/dist/core/ingestion/parsing-processor.js +45 -11
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +10 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +17 -2
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +18 -0
- package/dist/core/ingestion/pipeline.js +2 -1
- 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/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/utils/ast-helpers.d.ts +19 -1
- package/dist/core/ingestion/utils/ast-helpers.js +70 -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/workers/parse-worker.d.ts +9 -0
- package/dist/core/ingestion/workers/parse-worker.js +57 -21
- package/dist/core/lbug/lbug-adapter.d.ts +22 -2
- package/dist/core/lbug/lbug-adapter.js +58 -14
- package/dist/core/lbug/pool-adapter.d.ts +17 -0
- package/dist/core/lbug/pool-adapter.js +24 -14
- package/dist/core/run-analyze.d.ts +32 -0
- package/dist/core/run-analyze.js +74 -19
- package/dist/core/search/bm25-index.d.ts +18 -0
- package/dist/core/search/bm25-index.js +125 -12
- package/dist/core/tree-sitter/parser-loader.js +6 -1
- package/dist/mcp/local/local-backend.d.ts +67 -3
- package/dist/mcp/local/local-backend.js +296 -34
- package/dist/mcp/resources.d.ts +31 -0
- package/dist/mcp/resources.js +100 -17
- package/dist/mcp/tools.d.ts +4 -1
- package/dist/mcp/tools.js +75 -54
- package/dist/server/api.js +6 -2
- package/dist/storage/git.d.ts +49 -0
- package/dist/storage/git.js +111 -0
- package/dist/storage/repo-manager.d.ts +246 -1
- package/dist/storage/repo-manager.js +391 -9
- package/package.json +7 -6
- package/scripts/bench-scope-resolution.ts +134 -0
- package/scripts/ci-list-migrated-languages.ts +24 -0
- package/skills/gitnexus-cli.md +1 -0
package/README.md
CHANGED
|
@@ -155,6 +155,7 @@ gitnexus analyze --force # Force full re-index
|
|
|
155
155
|
gitnexus analyze --embeddings # Enable embedding generation (slower, better search)
|
|
156
156
|
gitnexus analyze --skip-agents-md # Preserve custom AGENTS.md/CLAUDE.md gitnexus section edits
|
|
157
157
|
gitnexus analyze --verbose # Log skipped files when parsers are unavailable
|
|
158
|
+
gitnexus analyze --max-file-size 1024 # Skip files larger than N KB (default: 512, cap: 32768)
|
|
158
159
|
gitnexus mcp # Start MCP server (stdio) — serves all indexed repos
|
|
159
160
|
gitnexus serve # Start local HTTP server (multi-repo) for web UI
|
|
160
161
|
gitnexus index # Register an existing .gitnexus/ folder into the global registry
|
|
@@ -166,11 +167,11 @@ gitnexus wiki [path] # Generate LLM-powered docs from knowledge grap
|
|
|
166
167
|
gitnexus wiki --model <model> # Wiki with custom LLM model (default: gpt-4o-mini)
|
|
167
168
|
|
|
168
169
|
# Repository groups (multi-repo / monorepo service tracking)
|
|
169
|
-
gitnexus group create <name>
|
|
170
|
-
gitnexus group add <
|
|
171
|
-
gitnexus group remove <
|
|
172
|
-
gitnexus group list [name]
|
|
173
|
-
gitnexus group sync <name>
|
|
170
|
+
gitnexus group create <name> # Create a repository group
|
|
171
|
+
gitnexus group add <group> <groupPath> <registryName> # Add a repo to a group. <groupPath> is a hierarchy path (e.g. hr/hiring/backend); <registryName> is the repo's name from the registry (see `gitnexus list`)
|
|
172
|
+
gitnexus group remove <group> <groupPath> # Remove a repo from a group by its hierarchy path
|
|
173
|
+
gitnexus group list [name] # List groups, or show one group's config
|
|
174
|
+
gitnexus group sync <name> # Extract contracts and match across repos/services
|
|
174
175
|
gitnexus group contracts <name> # Inspect extracted contracts and cross-links
|
|
175
176
|
gitnexus group query <name> <q> # Search execution flows across all repos in a group
|
|
176
177
|
gitnexus group status <name> # Check staleness of repos in a group
|
|
@@ -307,6 +308,21 @@ echo "vendor/" >> .gitnexusignore
|
|
|
307
308
|
echo "dist/" >> .gitnexusignore
|
|
308
309
|
```
|
|
309
310
|
|
|
311
|
+
### Large files are being skipped
|
|
312
|
+
|
|
313
|
+
By default the walker skips files larger than **512 KB** (see log line `Skipped N large files (>512KB)`). Raise the threshold via either the CLI flag or the environment variable — both accept a value in **KB**:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# CLI flag (takes precedence over the env var)
|
|
317
|
+
npx gitnexus analyze --max-file-size 2048 # skip only files > 2 MB
|
|
318
|
+
|
|
319
|
+
# Environment variable (persists across commands)
|
|
320
|
+
export GITNEXUS_MAX_FILE_SIZE=2048
|
|
321
|
+
npx gitnexus analyze
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Values above **32768 KB (32 MB)** are clamped to the tree-sitter parser ceiling; invalid values fall back to the 512 KB default with a one-time warning. When an override is active, `analyze` prints the effective threshold in its startup banner (e.g. `GITNEXUS_MAX_FILE_SIZE: effective threshold 2048KB (default 512KB)`).
|
|
325
|
+
|
|
310
326
|
## Privacy
|
|
311
327
|
|
|
312
328
|
- All processing happens locally on your machine
|
|
@@ -61,5 +61,21 @@ export interface GraphRelationship {
|
|
|
61
61
|
confidence: number;
|
|
62
62
|
reason: string;
|
|
63
63
|
step?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Per-signal evidence trace for edges emitted by the scope-based
|
|
66
|
+
* resolution pipeline (RFC #909 Ring 2 PKG #925). Populated by
|
|
67
|
+
* `emit-references.ts` when draining `ReferenceIndex` into the graph
|
|
68
|
+
* so downstream query / audit tools can inspect *why* a given edge
|
|
69
|
+
* was emitted with its confidence value.
|
|
70
|
+
*
|
|
71
|
+
* Optional and additive — every existing edge emitter ignores this
|
|
72
|
+
* field, and every existing query continues to work whether or not
|
|
73
|
+
* an edge carries it.
|
|
74
|
+
*/
|
|
75
|
+
evidence?: readonly {
|
|
76
|
+
readonly kind: string;
|
|
77
|
+
readonly weight: number;
|
|
78
|
+
readonly note?: string;
|
|
79
|
+
}[];
|
|
64
80
|
}
|
|
65
81
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,WAAW,GACX,MAAM,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EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,SAAS;QAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL"}
|
package/dist/_shared/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { getLanguageFromFilename, getSyntaxLanguageFromFilename } from './langua
|
|
|
6
6
|
export type { MroStrategy } from './mro-strategy.js';
|
|
7
7
|
export type { PipelinePhase, PipelineProgress } from './pipeline.js';
|
|
8
8
|
export type { SymbolDefinition } from './scope-resolution/symbol-definition.js';
|
|
9
|
-
export type { ScopeId, DefId, ScopeKind, Range, Capture, CaptureMatch, BindingRef, ImportEdge, TypeRef, Scope, ResolutionEvidence, Resolution, Reference, ReferenceIndex, LookupParams, RegistryContributor, ParsedImport, ParsedTypeBinding, WorkspaceIndex, Callsite, } from './scope-resolution/types.js';
|
|
9
|
+
export type { ScopeId, DefId, ScopeKind, Range, Capture, CaptureMatch, BindingRef, ImportEdge, TypeRef, Scope, ResolutionEvidence, Resolution, Reference, ReferenceIndex, LookupParams, RegistryContributor, ParsedImport, ParsedTypeBinding, WorkspaceIndex, Callsite, ScopeLookup, } from './scope-resolution/types.js';
|
|
10
10
|
export { EvidenceWeights, typeBindingWeightAtDepth } from './scope-resolution/evidence-weights.js';
|
|
11
11
|
export { ORIGIN_PRIORITY } from './scope-resolution/origin-priority.js';
|
|
12
12
|
export type { OriginForTieBreak } from './scope-resolution/origin-priority.js';
|
|
@@ -19,7 +19,9 @@ export type { ModuleScopeIndex, ModuleScopeEntry } from './scope-resolution/modu
|
|
|
19
19
|
export { buildQualifiedNameIndex } from './scope-resolution/qualified-name-index.js';
|
|
20
20
|
export type { QualifiedNameIndex } from './scope-resolution/qualified-name-index.js';
|
|
21
21
|
export { resolveTypeRef } from './scope-resolution/resolve-type-ref.js';
|
|
22
|
-
export type { ResolveTypeRefContext
|
|
22
|
+
export type { ResolveTypeRefContext } from './scope-resolution/resolve-type-ref.js';
|
|
23
|
+
export type { ParsedFile } from './scope-resolution/parsed-file.js';
|
|
24
|
+
export type { ReferenceSite, ReferenceKind, CallForm } from './scope-resolution/reference-site.js';
|
|
23
25
|
export { buildMethodDispatchIndex } from './scope-resolution/method-dispatch-index.js';
|
|
24
26
|
export type { MethodDispatchIndex, MethodDispatchInput, } from './scope-resolution/method-dispatch-index.js';
|
|
25
27
|
export { finalize } from './scope-resolution/finalize-algorithm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACjG,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,YAAY,EAAE,aAAa,EAAE,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EACV,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/_shared/index.js
CHANGED
|
@@ -13,6 +13,8 @@ export { buildDefIndex } from './scope-resolution/def-index.js';
|
|
|
13
13
|
export { buildModuleScopeIndex } from './scope-resolution/module-scope-index.js';
|
|
14
14
|
export { buildQualifiedNameIndex } from './scope-resolution/qualified-name-index.js';
|
|
15
15
|
// Strict type-reference resolver (RFC §4.6; Ring 2 SHARED #916)
|
|
16
|
+
// `ScopeLookup` is defined in `./scope-resolution/types.js` and exported
|
|
17
|
+
// from the type-export block above — not from this module.
|
|
16
18
|
export { resolveTypeRef } from './scope-resolution/resolve-type-ref.js';
|
|
17
19
|
// Method-dispatch materialized view over HeritageMap (RFC §3.1; Ring 2 SHARED #914)
|
|
18
20
|
export { buildMethodDispatchIndex } from './scope-resolution/method-dispatch-index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,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MAAM,gCAAgC,CAAC;AAErF,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,gEAAgE;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -31,10 +31,10 @@ export function buildDefIndex(defs) {
|
|
|
31
31
|
continue; // first-write-wins
|
|
32
32
|
byId.set(def.nodeId, def);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return wrapIndex(byId);
|
|
35
35
|
}
|
|
36
36
|
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
37
|
-
function
|
|
37
|
+
function wrapIndex(byId) {
|
|
38
38
|
return {
|
|
39
39
|
byId,
|
|
40
40
|
get size() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"def-index.js","sourceRoot":"","sources":["../../src/scope-resolution/def-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,IAAiC;IAC7D,MAAM,IAAI,GAAG,IAAI,GAAG,EAA2B,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,SAAS,CAAC,mBAAmB;QACvD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,
|
|
1
|
+
{"version":3,"file":"def-index.js","sourceRoot":"","sources":["../../src/scope-resolution/def-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,IAAiC;IAC7D,MAAM,IAAI,GAAG,IAAI,GAAG,EAA2B,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,SAAS,CAAC,mBAAmB;QACvD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,+EAA+E;AAE/E,SAAS,SAAS,CAAC,IAAkC;IACnD,OAAO;QACL,IAAI;QACJ,IAAI,IAAI;YACN,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QACD,GAAG,CAAC,EAAS;YACX,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC;QACD,GAAG,CAAC,EAAS;YACX,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -65,6 +65,14 @@ export interface MethodDispatchInput {
|
|
|
65
65
|
* returned.
|
|
66
66
|
*
|
|
67
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.
|
|
68
76
|
*/
|
|
69
77
|
readonly implementsOf: (ownerDefId: DefId) => readonly DefId[];
|
|
70
78
|
}
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -60,11 +60,11 @@ export function buildMethodDispatchIndex(input) {
|
|
|
60
60
|
for (const [ifaceId, owners] of implsBuilding) {
|
|
61
61
|
implsByInterfaceDefId.set(ifaceId, Object.freeze(owners.slice()));
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return wrapIndex(mroByOwnerDefId, implsByInterfaceDefId);
|
|
64
64
|
}
|
|
65
65
|
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
66
66
|
const EMPTY = Object.freeze([]);
|
|
67
|
-
function
|
|
67
|
+
function wrapIndex(mroByOwnerDefId, implsByInterfaceDefId) {
|
|
68
68
|
return {
|
|
69
69
|
mroByOwnerDefId,
|
|
70
70
|
implsByInterfaceDefId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-dispatch-index.js","sourceRoot":"","sources":["../../src/scope-resolution/method-dispatch-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"method-dispatch-index.js","sourceRoot":"","sources":["../../src/scope-resolution/method-dispatch-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;A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;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"}
|
|
@@ -32,6 +32,14 @@ export interface ModuleScopeEntry {
|
|
|
32
32
|
* entry preserves the first-stable id the rest of the pipeline may already
|
|
33
33
|
* have registered against.
|
|
34
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
|
+
*
|
|
35
43
|
* Pure function — safe to call repeatedly; no side effects.
|
|
36
44
|
*/
|
|
37
45
|
export declare function buildModuleScopeIndex(entries: readonly ModuleScopeEntry[]): ModuleScopeIndex;
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
* entry preserves the first-stable id the rest of the pipeline may already
|
|
22
22
|
* have registered against.
|
|
23
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
|
+
*
|
|
24
32
|
* Pure function — safe to call repeatedly; no side effects.
|
|
25
33
|
*/
|
|
26
34
|
export function buildModuleScopeIndex(entries) {
|
|
@@ -30,10 +38,10 @@ export function buildModuleScopeIndex(entries) {
|
|
|
30
38
|
continue; // first-write-wins
|
|
31
39
|
byFilePath.set(filePath, moduleScopeId);
|
|
32
40
|
}
|
|
33
|
-
return
|
|
41
|
+
return wrapIndex(byFilePath);
|
|
34
42
|
}
|
|
35
43
|
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
36
|
-
function
|
|
44
|
+
function wrapIndex(byFilePath) {
|
|
37
45
|
return {
|
|
38
46
|
byFilePath,
|
|
39
47
|
get size() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-scope-index.js","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAgBH
|
|
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,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 (`gitnexus/src/core/ingestion/` outside `scope-resolution/`) and
|
|
45
|
+
* the scope-resolution pipeline (`gitnexus/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 (`gitnexus/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 (`gitnexus/src/core/ingestion/` outside `scope-resolution/`) and
|
|
45
|
+
* the scope-resolution pipeline (`gitnexus/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 (`gitnexus/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"}
|
|
@@ -35,6 +35,18 @@ export interface PositionIndex {
|
|
|
35
35
|
* Innermost scope containing `(line, col)` in `filePath`, or `undefined`
|
|
36
36
|
* when nothing contains it (position before file start, after file end,
|
|
37
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.
|
|
38
50
|
*/
|
|
39
51
|
atPosition(filePath: string, line: number, col: number): ScopeId | undefined;
|
|
40
52
|
}
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -52,7 +52,7 @@ export function buildPositionIndex(scopes) {
|
|
|
52
52
|
for (const bucket of entriesByFile.values()) {
|
|
53
53
|
bucket.sort(compareEntry);
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return wrapIndex(entriesByFile, seen.size);
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Sort by start position ASC, breaking ties by end position DESC so that
|
|
@@ -107,7 +107,7 @@ function findLastStartLteIndex(arr, line, col) {
|
|
|
107
107
|
}
|
|
108
108
|
return lo - 1;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function wrapIndex(entriesByFile, size) {
|
|
111
111
|
return {
|
|
112
112
|
get size() {
|
|
113
113
|
return size;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position-index.js","sourceRoot":"","sources":["../../src/scope-resolution/position-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+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.freeze(v.slice()));
|
|
56
56
|
}
|
|
57
|
-
return
|
|
57
|
+
return wrapIndex(frozen);
|
|
58
58
|
}
|
|
59
59
|
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
60
60
|
const EMPTY = Object.freeze([]);
|
|
61
|
-
function
|
|
61
|
+
function wrapIndex(byQualifiedName) {
|
|
62
62
|
return {
|
|
63
63
|
byQualifiedName,
|
|
64
64
|
get size() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualified-name-index.js","sourceRoot":"","sources":["../../src/scope-resolution/qualified-name-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAiC;IACvE,MAAM,eAAe,GAAG,IAAI,GAAG,EAAmB,CAAC;IACnD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IAEpC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC;QAChC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAExD,MAAM,OAAO,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC;QAC1C,IAAI,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,SAAS;QACrC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEvB,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,eAAe,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;IACH,CAA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;IAC5D,MAAM,MAAM,GAAG,IAAI,GAAG,EAA4B,CAAC;IACnD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,+EAA+E;AAE/E,MAAM,KAAK,GAAqB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAElD,SAAS,SAAS,CAAC,eAA8C;IAC/D,OAAO;QACL,eAAe;QACf,IAAI,IAAI;YACN,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B,CAAC;QACD,GAAG,CAAC,aAAqB;YACvB,OAAO,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC;QACrD,CAAC;QACD,GAAG,CAAC,aAAqB;YACvB,OAAO,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ReferenceSite` — a pre-resolution usage fact collected by `ScopeExtractor`
|
|
3
|
+
* (RFC §3.2 Phase 1; Ring 2 PKG #919).
|
|
4
|
+
*
|
|
5
|
+
* One record per `@reference.*` capture. The extractor records:
|
|
6
|
+
* - the name being referenced (method/field/class name),
|
|
7
|
+
* - the source range,
|
|
8
|
+
* - the innermost lexical scope containing the reference,
|
|
9
|
+
* - the reference kind (call, read, write, inherits, etc.),
|
|
10
|
+
* - optional call-form classification from `provider.classifyCallForm`,
|
|
11
|
+
* - optional explicit-receiver hint for dotted calls (`user.save()`),
|
|
12
|
+
* - optional arity for call sites.
|
|
13
|
+
*
|
|
14
|
+
* Reference sites are consumed by the resolution phase (RFC §3.2 Phase 4)
|
|
15
|
+
* which routes each through `Registry.lookup` / `resolveTypeRef` and
|
|
16
|
+
* emits the final `Reference` record into `ReferenceIndex`.
|
|
17
|
+
*
|
|
18
|
+
* **Pre-resolution only.** `ReferenceSite` intentionally carries no
|
|
19
|
+
* `toDef`, `confidence`, or `evidence`. Those are populated by the
|
|
20
|
+
* resolution step that reads this record and produces a `Reference`
|
|
21
|
+
* (defined in `./types.ts`).
|
|
22
|
+
*/
|
|
23
|
+
import type { Range, ScopeId } from './types.js';
|
|
24
|
+
/**
|
|
25
|
+
* What kind of usage this reference represents — the graph-edge kind
|
|
26
|
+
* emitted after resolution (`CALLS`, `READS`, `WRITES`, etc.).
|
|
27
|
+
*
|
|
28
|
+
* Matches the `kind` field on `Reference` in `./types.ts` so the
|
|
29
|
+
* resolution phase can pass it through without re-classification.
|
|
30
|
+
*/
|
|
31
|
+
export type ReferenceKind = 'call' | 'read' | 'write' | 'type-reference' | 'inherits' | 'import-use';
|
|
32
|
+
/**
|
|
33
|
+
* How a call site binds its target. Informs `Registry.lookup` Step 2
|
|
34
|
+
* (type-binding path):
|
|
35
|
+
* - `'free'` — bare call (no receiver); resolution via lexical chain.
|
|
36
|
+
* - `'member'` — dotted call (`x.foo()`); resolution via receiver type.
|
|
37
|
+
* - `'constructor'` — `new Foo()`; receiver is the class itself.
|
|
38
|
+
* - `'index'` — index expression (`arr[0]`); rare as a dispatch site.
|
|
39
|
+
*
|
|
40
|
+
* Only meaningful for `kind === 'call'`; ignored for reads/writes.
|
|
41
|
+
*/
|
|
42
|
+
export type CallForm = 'free' | 'member' | 'constructor' | 'index';
|
|
43
|
+
export interface ReferenceSite {
|
|
44
|
+
/** The name being referenced (e.g., `'save'`, `'User'`, `'count'`). */
|
|
45
|
+
readonly name: string;
|
|
46
|
+
/** Source-text range of this reference. */
|
|
47
|
+
readonly atRange: Range;
|
|
48
|
+
/**
|
|
49
|
+
* Innermost lexical scope that contains `atRange`. Resolved by the
|
|
50
|
+
* extractor via position lookup and frozen here so the resolution
|
|
51
|
+
* phase doesn't re-compute it per call.
|
|
52
|
+
*/
|
|
53
|
+
readonly inScope: ScopeId;
|
|
54
|
+
readonly kind: ReferenceKind;
|
|
55
|
+
/** Set when `kind === 'call'`. */
|
|
56
|
+
readonly callForm?: CallForm;
|
|
57
|
+
/**
|
|
58
|
+
* Explicit receiver for dotted calls (`user.save()` → `{ name: 'user' }`).
|
|
59
|
+
* Passed through to `Registry.lookup.explicitReceiver`.
|
|
60
|
+
*/
|
|
61
|
+
readonly explicitReceiver?: {
|
|
62
|
+
readonly name: string;
|
|
63
|
+
};
|
|
64
|
+
/** Argument count at the call site; used by `provider.arityCompatibility`. */
|
|
65
|
+
readonly arity?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Inferred argument types at the call site, one per argument. An
|
|
68
|
+
* empty-string entry means "unknown" — consumers narrowing overload
|
|
69
|
+
* candidates treat unknown as any-match. Populated by languages
|
|
70
|
+
* that can derive types from literals / constructor expressions
|
|
71
|
+
* (C#: `42` → `'int'`, `"alice"` → `'string'`).
|
|
72
|
+
*/
|
|
73
|
+
readonly argumentTypes?: readonly string[];
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=reference-site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-site.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/reference-site.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,YAAY,CAAC;AAEjB;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ReferenceSite` — a pre-resolution usage fact collected by `ScopeExtractor`
|
|
3
|
+
* (RFC §3.2 Phase 1; Ring 2 PKG #919).
|
|
4
|
+
*
|
|
5
|
+
* One record per `@reference.*` capture. The extractor records:
|
|
6
|
+
* - the name being referenced (method/field/class name),
|
|
7
|
+
* - the source range,
|
|
8
|
+
* - the innermost lexical scope containing the reference,
|
|
9
|
+
* - the reference kind (call, read, write, inherits, etc.),
|
|
10
|
+
* - optional call-form classification from `provider.classifyCallForm`,
|
|
11
|
+
* - optional explicit-receiver hint for dotted calls (`user.save()`),
|
|
12
|
+
* - optional arity for call sites.
|
|
13
|
+
*
|
|
14
|
+
* Reference sites are consumed by the resolution phase (RFC §3.2 Phase 4)
|
|
15
|
+
* which routes each through `Registry.lookup` / `resolveTypeRef` and
|
|
16
|
+
* emits the final `Reference` record into `ReferenceIndex`.
|
|
17
|
+
*
|
|
18
|
+
* **Pre-resolution only.** `ReferenceSite` intentionally carries no
|
|
19
|
+
* `toDef`, `confidence`, or `evidence`. Those are populated by the
|
|
20
|
+
* resolution step that reads this record and produces a `Reference`
|
|
21
|
+
* (defined in `./types.ts`).
|
|
22
|
+
*/
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=reference-site.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-site.js","sourceRoot":"","sources":["../../src/scope-resolution/reference-site.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|