gitnexus 1.6.3-rc.6 → 1.6.3-rc.8

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.
@@ -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, ScopeTree, 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, } 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';
@@ -22,6 +22,14 @@ export { resolveTypeRef } from './scope-resolution/resolve-type-ref.js';
22
22
  export type { ResolveTypeRefContext, ScopeLookup } from './scope-resolution/resolve-type-ref.js';
23
23
  export { buildMethodDispatchIndex } from './scope-resolution/method-dispatch-index.js';
24
24
  export type { MethodDispatchIndex, MethodDispatchInput, } from './scope-resolution/method-dispatch-index.js';
25
+ export { finalize } from './scope-resolution/finalize-algorithm.js';
26
+ export type { FinalizeInput, FinalizeFile, FinalizeHooks, FinalizeOutput, FinalizedScc, FinalizeStats, } from './scope-resolution/finalize-algorithm.js';
27
+ export { makeScopeId, clearScopeIdInternPool } from './scope-resolution/scope-id.js';
28
+ export type { ScopeIdInput } from './scope-resolution/scope-id.js';
29
+ export { buildScopeTree, ScopeTreeInvariantError } from './scope-resolution/scope-tree.js';
30
+ export type { ScopeTree } from './scope-resolution/scope-tree.js';
31
+ export { buildPositionIndex } from './scope-resolution/position-index.js';
32
+ export type { PositionIndex } from './scope-resolution/position-index.js';
25
33
  export { diffResolutions } from './scope-resolution/shadow/diff.js';
26
34
  export type { ShadowAgreement, ShadowCallsite, ShadowDiff, } from './scope-resolution/shadow/diff.js';
27
35
  export { aggregateDiffs } from './scope-resolution/shadow/aggregate.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,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,YAAY,EACV,OAAO,EACP,KAAK,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,QAAQ,GACT,MAAM,6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AAgB,EAAE,MAAM,0CAA0C,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAGjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,YAAY,EACV,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACrF,YAAY,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3F,YAAY,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,YAAY,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,YAAY,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"}
@@ -16,6 +16,12 @@ export { buildQualifiedNameIndex } from './scope-resolution/qualified-name-index
16
16
  export { resolveTypeRef } from './scope-resolution/resolve-type-ref.js';
17
17
  // Method-dispatch materialized view over HeritageMap (RFC §3.1; Ring 2 SHARED #914)
18
18
  export { buildMethodDispatchIndex } from './scope-resolution/method-dispatch-index.js';
19
+ // SCC-aware cross-file finalize (RFC §3.2 Phase 2; Ring 2 SHARED #915)
20
+ export { finalize } from './scope-resolution/finalize-algorithm.js';
21
+ // Scope tree spine + position lookup (RFC §2.2 + §3.1; Ring 2 SHARED #912)
22
+ export { makeScopeId, clearScopeIdInternPool } from './scope-resolution/scope-id.js';
23
+ export { buildScopeTree, ScopeTreeInvariantError } from './scope-resolution/scope-tree.js';
24
+ export { buildPositionIndex } from './scope-resolution/position-index.js';
19
25
  // Shadow-mode diff + aggregation (RFC §6.3; Ring 2 SHARED #918)
20
26
  export { diffResolutions } from './scope-resolution/shadow/diff.js';
21
27
  export { aggregateDiffs } from './scope-resolution/shadow/aggregate.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;AAiCjG,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,yDAAyD;AACzD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AAGvD,sEAAsE;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAGrF,gEAAgE;A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AAE,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"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * `finalize` — cross-file finalize algorithm for the SemanticModel
3
+ * (RFC §3.2 Phase 2; Ring 2 SHARED #915).
4
+ *
5
+ * Pure logic that takes per-file parse output (`ParsedImport[]` +
6
+ * `SymbolDefinition[]`) and returns:
7
+ *
8
+ * - Linked `ImportEdge[]` per module scope, with `targetModuleScope` and
9
+ * `targetDefId` filled where resolvable; edges that could not be
10
+ * resolved within the hard fixpoint cap are marked
11
+ * `linkStatus: 'unresolved'`.
12
+ * - Materialized `bindings` per module scope — local defs merged with
13
+ * imported / wildcard-expanded / re-exported names via the provider's
14
+ * `mergeBindings` precedence.
15
+ * - The SCC condensation of the import graph, exposed so disjoint SCCs
16
+ * can be processed in parallel by callers that want that.
17
+ *
18
+ * The algorithm is **SCC-aware**: it runs Tarjan SCC over the file-level
19
+ * import graph, processes SCCs in reverse-topological order (leaves
20
+ * first), and within each SCC runs a bounded fixpoint link pass capped at
21
+ * `N = |edges in SCC|`. Cyclic imports finalize without hanging; malformed
22
+ * inputs are bounded by the cap.
23
+ *
24
+ * **No language-specific logic.** Target resolution, wildcard expansion,
25
+ * and binding precedence all go through caller-supplied hooks
26
+ * (`resolveImportTarget`, `expandsWildcardTo`, `mergeBindings`) that
27
+ * match the LanguageProvider surface from #911.
28
+ *
29
+ * **Dynamic imports rule.** `kind === 'dynamic-unresolved'` passes through
30
+ * as an `ImportEdge { kind: 'dynamic-unresolved', targetFile: null }`
31
+ * with no `BindingRef`. They are parse-time signals, not linkable targets.
32
+ */
33
+ import type { SymbolDefinition } from './symbol-definition.js';
34
+ import type { BindingRef, ImportEdge, ParsedImport, ScopeId, WorkspaceIndex } from './types.js';
35
+ /** Per-file input for the finalize pass. */
36
+ export interface FinalizeFile {
37
+ readonly filePath: string;
38
+ /** The module scope id for this file; owns the finalized imports + bindings. */
39
+ readonly moduleScope: ScopeId;
40
+ readonly parsedImports: readonly ParsedImport[];
41
+ /**
42
+ * Defs exported from this file — the "what other files can import by name"
43
+ * surface. Typically those with `isExported: true` (the module's own
44
+ * declarations) plus, for multi-hop re-export chains, the re-exported
45
+ * names the parser chose to surface here.
46
+ *
47
+ * **Multi-hop re-export contract.** `finalize` resolves an edge
48
+ * `A → B (importedName: 'X')` by looking up `X` in `B.localDefs`. If B
49
+ * only has `export { X } from './C'` and the parser *does not* include
50
+ * `X` in `B.localDefs`, A's edge hits the fixpoint cap and is marked
51
+ * `linkStatus: 'unresolved'`. The fixpoint does NOT mutate `localDefs`
52
+ * across iterations — it is static input.
53
+ *
54
+ * Parsers that want multi-hop re-export chains to settle end-to-end must
55
+ * include re-exported names in the intermediate file's `localDefs` (with
56
+ * the original `DefId` of the source symbol). This keeps the algorithm
57
+ * O(1) per lookup and avoids graph-crawl during finalize.
58
+ */
59
+ readonly localDefs: readonly SymbolDefinition[];
60
+ }
61
+ /** Input to `finalize`. */
62
+ export interface FinalizeInput {
63
+ readonly files: readonly FinalizeFile[];
64
+ /** Opaque workspace context forwarded to provider hooks. */
65
+ readonly workspaceIndex: WorkspaceIndex;
66
+ }
67
+ /**
68
+ * Provider-supplied hooks. Mirror the optional LanguageProvider scope-
69
+ * resolution hooks declared in #911; `finalize` calls them pure-ly and
70
+ * expects pure answers.
71
+ */
72
+ export interface FinalizeHooks {
73
+ /**
74
+ * Resolve a raw import target to the concrete file path that owns it.
75
+ * Return `null` when no target file is resolvable (e.g., `np.foo` when
76
+ * `numpy` is external to the workspace).
77
+ */
78
+ resolveImportTarget(targetRaw: string, fromFile: string, workspaceIndex: WorkspaceIndex): string | null;
79
+ /**
80
+ * For a wildcard `import * from M`, return the names visible in the
81
+ * exporting module scope `M`. The finalize pass looks each name up in
82
+ * `M`'s local defs to produce a concrete `BindingRef`; names with no
83
+ * matching export are dropped.
84
+ */
85
+ expandsWildcardTo(targetModuleScope: ScopeId, workspaceIndex: WorkspaceIndex): readonly string[];
86
+ /**
87
+ * Merge `incoming` bindings into `existing` for a given name. Called
88
+ * once per name at each scope. Typical rules:
89
+ * - Python: local > imported > wildcard (last-write-wins within tier).
90
+ * - Rust: explicit `use` > glob; `pub use` overrides.
91
+ * Return value replaces the bucket entirely — no implicit append.
92
+ */
93
+ mergeBindings(existing: readonly BindingRef[], incoming: readonly BindingRef[], scope: ScopeId): readonly BindingRef[];
94
+ }
95
+ /** One SCC in the file-level import graph. */
96
+ export interface FinalizedScc {
97
+ readonly files: readonly string[];
98
+ /** True iff this SCC has ≥ 2 files OR a single file that self-imports. */
99
+ readonly isCycle: boolean;
100
+ }
101
+ /**
102
+ * Counters reported by `finalize`.
103
+ *
104
+ * **Counting granularity** — all edge counters are **per-`ParsedImport`**,
105
+ * not per-materialized-`ImportEdge`. A single `wildcard` ParsedImport that
106
+ * expands to N exports counts as one linked edge in these stats; the
107
+ * materialized output (`FinalizeOutput.imports`) will have N edges for
108
+ * that input. `dynamic-unresolved` ParsedImports count as linked (they
109
+ * pass through with no `linkStatus`), so `linkedEdges` ≠ "has a
110
+ * BindingRef" — use the `bindings` map for that.
111
+ *
112
+ * In other words: `totalEdges === input.parsedImports.length` summed
113
+ * across files, and `linkedEdges + unresolvedEdges === totalEdges`.
114
+ */
115
+ export interface FinalizeStats {
116
+ readonly totalFiles: number;
117
+ /** Total `ParsedImport` records seen across all files. */
118
+ readonly totalEdges: number;
119
+ /**
120
+ * `ParsedImport`s whose finalized edge does NOT carry
121
+ * `linkStatus: 'unresolved'`. Includes `dynamic-unresolved` pass-throughs.
122
+ */
123
+ readonly linkedEdges: number;
124
+ /** `ParsedImport`s whose finalized edge carries `linkStatus: 'unresolved'`. */
125
+ readonly unresolvedEdges: number;
126
+ readonly sccCount: number;
127
+ readonly largestSccSize: number;
128
+ }
129
+ export interface FinalizeOutput {
130
+ /** Linked `ImportEdge[]` per module scope, in original input order. */
131
+ readonly imports: ReadonlyMap<ScopeId, readonly ImportEdge[]>;
132
+ /** Materialized bindings per module scope. */
133
+ readonly bindings: ReadonlyMap<ScopeId, ReadonlyMap<string, readonly BindingRef[]>>;
134
+ /** SCCs in reverse-topological order (leaves first). */
135
+ readonly sccs: readonly FinalizedScc[];
136
+ readonly stats: FinalizeStats;
137
+ }
138
+ export declare function finalize(input: FinalizeInput, hooks: FinalizeHooks): FinalizeOutput;
139
+ //# sourceMappingURL=finalize-algorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finalize-algorithm.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/finalize-algorithm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIhG,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAC;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACjD;AAED,2BAA2B;AAC3B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,mBAAmB,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