gitnexus 1.6.3-rc.1 → 1.6.3-rc.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.
Files changed (38) hide show
  1. package/dist/_shared/index.d.ts +7 -0
  2. package/dist/_shared/index.d.ts.map +1 -1
  3. package/dist/_shared/index.js +5 -0
  4. package/dist/_shared/index.js.map +1 -1
  5. package/dist/_shared/scope-resolution/evidence-weights.d.ts +69 -0
  6. package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -0
  7. package/dist/_shared/scope-resolution/evidence-weights.js +84 -0
  8. package/dist/_shared/scope-resolution/evidence-weights.js.map +1 -0
  9. package/dist/_shared/scope-resolution/language-classification.d.ts +26 -0
  10. package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -0
  11. package/dist/_shared/scope-resolution/language-classification.js +44 -0
  12. package/dist/_shared/scope-resolution/language-classification.js.map +1 -0
  13. package/dist/_shared/scope-resolution/origin-priority.d.ts +14 -0
  14. package/dist/_shared/scope-resolution/origin-priority.d.ts.map +1 -0
  15. package/dist/_shared/scope-resolution/origin-priority.js +21 -0
  16. package/dist/_shared/scope-resolution/origin-priority.js.map +1 -0
  17. package/dist/_shared/scope-resolution/symbol-definition.d.ts +34 -0
  18. package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -0
  19. package/dist/_shared/scope-resolution/symbol-definition.js +12 -0
  20. package/dist/_shared/scope-resolution/symbol-definition.js.map +1 -0
  21. package/dist/_shared/scope-resolution/types.d.ts +200 -0
  22. package/dist/_shared/scope-resolution/types.d.ts.map +1 -0
  23. package/dist/_shared/scope-resolution/types.js +17 -0
  24. package/dist/_shared/scope-resolution/types.js.map +1 -0
  25. package/dist/core/ingestion/call-processor.d.ts +2 -1
  26. package/dist/core/ingestion/model/field-registry.d.ts +1 -1
  27. package/dist/core/ingestion/model/index.d.ts +1 -1
  28. package/dist/core/ingestion/model/index.js +2 -0
  29. package/dist/core/ingestion/model/method-registry.d.ts +1 -1
  30. package/dist/core/ingestion/model/registration-table.d.ts +1 -2
  31. package/dist/core/ingestion/model/resolution-context.d.ts +1 -1
  32. package/dist/core/ingestion/model/resolve.d.ts +1 -1
  33. package/dist/core/ingestion/model/symbol-table.d.ts +1 -23
  34. package/dist/core/ingestion/model/type-registry.d.ts +1 -1
  35. package/dist/mcp/local/local-backend.d.ts +48 -1
  36. package/dist/mcp/local/local-backend.js +287 -131
  37. package/dist/mcp/tools.js +19 -1
  38. package/package.json +1 -1
@@ -5,4 +5,11 @@ export { SupportedLanguages } from './languages.js';
5
5
  export { getLanguageFromFilename, getSyntaxLanguageFromFilename } from './language-detection.js';
6
6
  export type { MroStrategy } from './mro-strategy.js';
7
7
  export type { PipelinePhase, PipelineProgress } from './pipeline.js';
8
+ export type { SymbolDefinition } from './scope-resolution/symbol-definition.js';
9
+ export type { ScopeId, DefId, ScopeKind, Range, Capture, BindingRef, ImportEdge, TypeRef, Scope, ResolutionEvidence, Resolution, Reference, ReferenceIndex, LookupParams, RegistryContributor, } from './scope-resolution/types.js';
10
+ export { EvidenceWeights, typeBindingWeightAtDepth } from './scope-resolution/evidence-weights.js';
11
+ export { ORIGIN_PRIORITY } from './scope-resolution/origin-priority.js';
12
+ export type { OriginForTieBreak } from './scope-resolution/origin-priority.js';
13
+ export { LanguageClassifications, isProductionLanguage, } from './scope-resolution/language-classification.js';
14
+ export type { LanguageClassification } from './scope-resolution/language-classification.js';
8
15
  //# sourceMappingURL=index.d.ts.map
@@ -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,4B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/E,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC"}
@@ -3,4 +3,9 @@ export { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME, } from '.
3
3
  // Language support
4
4
  export { SupportedLanguages } from './languages.js';
5
5
  export { getLanguageFromFilename, getSyntaxLanguageFromFilename } from './language-detection.js';
6
+ // Evidence + tie-break constants (RFC Appendix A, Appendix B)
7
+ export { EvidenceWeights, typeBindingWeightAtDepth } from './scope-resolution/evidence-weights.js';
8
+ export { ORIGIN_PRIORITY } from './scope-resolution/origin-priority.js';
9
+ // Language classification (RFC §6.1 Ring 3/4 governance)
10
+ export { LanguageClassifications, isProductionLanguage, } from './scope-resolution/language-classification.js';
6
11
  //# sourceMappingURL=index.js.map
@@ -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,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AA2BjG,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"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * `EvidenceWeights` — RFC Appendix A (authoritative values).
3
+ *
4
+ * Starting calibration for scope-based resolution. Shadow-first rollout
5
+ * tunes these against legacy DAG parity. Every `ResolutionEvidence.weight`
6
+ * value in the codebase MUST reference this map; inline magic numbers are a
7
+ * lint violation. Extends issue #429 (centralize hardcoded confidence values).
8
+ *
9
+ * Evidence composes additively inside `composeEvidence`; the sum is capped
10
+ * at 1.0 in `Resolution.confidence`.
11
+ */
12
+ /**
13
+ * Authoritative weight map. Keys are a mix of `ResolutionEvidence.kind`
14
+ * values and special modifiers (scope-chain depth, MRO depth decay,
15
+ * unlinked-import multiplicative cap).
16
+ */
17
+ export declare const EvidenceWeights: {
18
+ /** `BindingRef.origin === 'local'` */
19
+ readonly local: 0.55;
20
+ /** `BindingRef.origin === 'import'` */
21
+ readonly import: 0.45;
22
+ /** `BindingRef.origin === 'reexport'` */
23
+ readonly reexport: 0.4;
24
+ /** `BindingRef.origin === 'namespace'` */
25
+ readonly namespace: 0.4;
26
+ /** `BindingRef.origin === 'wildcard'` */
27
+ readonly wildcard: 0.3;
28
+ /** Deducted per parent-hop taken (depth-0 = 0, depth-1 = −0.02, …). */
29
+ readonly scopeChainPerDepth: -0.02;
30
+ /**
31
+ * Weight applied when the receiver's type binding resolves to a class that
32
+ * declares the candidate as a method/field. Decays by MRO depth: direct
33
+ * class = index 0; 1 parent hop = index 1; etc. Falls back to the last
34
+ * value for depths beyond the table.
35
+ */
36
+ readonly typeBindingByMroDepth: readonly [0.5, 0.42, 0.36, 0.32, 0.3];
37
+ /** `def.ownerId === resolvedReceiver.def.id` (exact owner match). */
38
+ readonly ownerMatch: 0.2;
39
+ /** Explanatory only — retained for debuggability. Never discriminates
40
+ * because surviving candidates already passed `acceptedKinds`. */
41
+ readonly kindMatch: 0;
42
+ /** `provider.arityCompatibility(...) === 'compatible'` */
43
+ readonly arityMatchCompatible: 0.1;
44
+ /** `provider.arityCompatibility(...) === 'unknown'` */
45
+ readonly arityMatchUnknown: 0;
46
+ /** `provider.arityCompatibility(...) === 'incompatible'` — penalizes;
47
+ * candidates filtered only when a compatible candidate exists. */
48
+ readonly arityMatchIncompatible: -0.15;
49
+ /** Hit via `QualifiedNameIndex.byQualifiedName`. */
50
+ readonly globalQualified: 0.35;
51
+ /** Fallback hit in a `byName` index (and nothing was lexically visible). */
52
+ readonly globalName: 0.1;
53
+ /** Call/reference flowing through a `dynamic-unresolved` edge. */
54
+ readonly dynamicImportUnresolved: 0.02;
55
+ /**
56
+ * Multiplicative cap on the edge-derived evidence signal
57
+ * (`import`/`wildcard`/`reexport`/`namespace`) when
58
+ * `ImportEdge.linkStatus === 'unresolved'`. Independent corroborating
59
+ * signals on the same candidate (`owner-match`, `arity-match`,
60
+ * `type-binding`) are NOT penalized.
61
+ */
62
+ readonly unlinkedImportMultiplier: 0.5;
63
+ };
64
+ /**
65
+ * Look up the `type-binding` signal weight for a given MRO depth, falling
66
+ * back to the last tabulated value for depths beyond the table.
67
+ */
68
+ export declare function typeBindingWeightAtDepth(mroDepth: number): number;
69
+ //# sourceMappingURL=evidence-weights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-weights.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/evidence-weights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAE1B,sCAAsC;;IAEtC,uCAAuC;;IAEvC,yCAAyC;;IAEzC,0CAA0C;;IAE1C,yCAAyC;;IAIzC,uEAAuE;;IAIvE;;;;;OAKG;;IAIH,qEAAqE;;IAErE;uEACmE;;IAInE,0DAA0D;;IAE1D,uDAAuD;;IAEvD;uEACmE;;IAInE,oDAAoD;;IAEpD,4EAA4E;;IAI5E,kEAAkE;;IAIlE;;;;;;OAMG;;CAEK,CAAC;AAEX;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjE"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * `EvidenceWeights` — RFC Appendix A (authoritative values).
3
+ *
4
+ * Starting calibration for scope-based resolution. Shadow-first rollout
5
+ * tunes these against legacy DAG parity. Every `ResolutionEvidence.weight`
6
+ * value in the codebase MUST reference this map; inline magic numbers are a
7
+ * lint violation. Extends issue #429 (centralize hardcoded confidence values).
8
+ *
9
+ * Evidence composes additively inside `composeEvidence`; the sum is capped
10
+ * at 1.0 in `Resolution.confidence`.
11
+ */
12
+ /**
13
+ * Authoritative weight map. Keys are a mix of `ResolutionEvidence.kind`
14
+ * values and special modifiers (scope-chain depth, MRO depth decay,
15
+ * unlinked-import multiplicative cap).
16
+ */
17
+ export const EvidenceWeights = {
18
+ // ─── Where-found signals (visibility) ─────────────────────────────────────
19
+ /** `BindingRef.origin === 'local'` */
20
+ local: 0.55,
21
+ /** `BindingRef.origin === 'import'` */
22
+ import: 0.45,
23
+ /** `BindingRef.origin === 'reexport'` */
24
+ reexport: 0.4,
25
+ /** `BindingRef.origin === 'namespace'` */
26
+ namespace: 0.4,
27
+ /** `BindingRef.origin === 'wildcard'` */
28
+ wildcard: 0.3,
29
+ // ─── Scope-chain deduction (per-hop) ──────────────────────────────────────
30
+ /** Deducted per parent-hop taken (depth-0 = 0, depth-1 = −0.02, …). */
31
+ scopeChainPerDepth: -0.02,
32
+ // ─── Receiver-type-binding signal (decays by MRO depth) ───────────────────
33
+ /**
34
+ * Weight applied when the receiver's type binding resolves to a class that
35
+ * declares the candidate as a method/field. Decays by MRO depth: direct
36
+ * class = index 0; 1 parent hop = index 1; etc. Falls back to the last
37
+ * value for depths beyond the table.
38
+ */
39
+ typeBindingByMroDepth: [0.5, 0.42, 0.36, 0.32, 0.3],
40
+ // ─── Corroborating signals ────────────────────────────────────────────────
41
+ /** `def.ownerId === resolvedReceiver.def.id` (exact owner match). */
42
+ ownerMatch: 0.2,
43
+ /** Explanatory only — retained for debuggability. Never discriminates
44
+ * because surviving candidates already passed `acceptedKinds`. */
45
+ kindMatch: 0.0,
46
+ // ─── Arity compatibility (from `provider.arityCompatibility`) ─────────────
47
+ /** `provider.arityCompatibility(...) === 'compatible'` */
48
+ arityMatchCompatible: 0.1,
49
+ /** `provider.arityCompatibility(...) === 'unknown'` */
50
+ arityMatchUnknown: 0.0,
51
+ /** `provider.arityCompatibility(...) === 'incompatible'` — penalizes;
52
+ * candidates filtered only when a compatible candidate exists. */
53
+ arityMatchIncompatible: -0.15,
54
+ // ─── Global fallback (only when nothing lexically visible) ────────────────
55
+ /** Hit via `QualifiedNameIndex.byQualifiedName`. */
56
+ globalQualified: 0.35,
57
+ /** Fallback hit in a `byName` index (and nothing was lexically visible). */
58
+ globalName: 0.1,
59
+ // ─── Degraded signals ─────────────────────────────────────────────────────
60
+ /** Call/reference flowing through a `dynamic-unresolved` edge. */
61
+ dynamicImportUnresolved: 0.02,
62
+ // ─── Unresolved-import cap (multiplicative, applied per-signal) ───────────
63
+ /**
64
+ * Multiplicative cap on the edge-derived evidence signal
65
+ * (`import`/`wildcard`/`reexport`/`namespace`) when
66
+ * `ImportEdge.linkStatus === 'unresolved'`. Independent corroborating
67
+ * signals on the same candidate (`owner-match`, `arity-match`,
68
+ * `type-binding`) are NOT penalized.
69
+ */
70
+ unlinkedImportMultiplier: 0.5,
71
+ };
72
+ /**
73
+ * Look up the `type-binding` signal weight for a given MRO depth, falling
74
+ * back to the last tabulated value for depths beyond the table.
75
+ */
76
+ export function typeBindingWeightAtDepth(mroDepth) {
77
+ const table = EvidenceWeights.typeBindingByMroDepth;
78
+ if (mroDepth < 0)
79
+ return table[0];
80
+ if (mroDepth >= table.length)
81
+ return table[table.length - 1];
82
+ return table[mroDepth];
83
+ }
84
+ //# sourceMappingURL=evidence-weights.js.map
@@ -0,0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AM;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7D,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC"}
@@ -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,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,34 @@
1
+ /**
2
+ * `SymbolDefinition` — the canonical shape of an indexed symbol record.
3
+ *
4
+ * Historically defined in `gitnexus/src/core/ingestion/model/symbol-table.ts`;
5
+ * moved into `gitnexus-shared` as part of RFC #909 Ring 1 (#910) so the
6
+ * scope-resolution types that reference it can live in the shared package
7
+ * alongside their consumers (`gitnexus/` and `gitnexus-web/`).
8
+ *
9
+ * Shape is unchanged from the prior local definition.
10
+ */
11
+ import type { NodeLabel } from '../graph/types.js';
12
+ export interface SymbolDefinition {
13
+ nodeId: string;
14
+ filePath: string;
15
+ type: NodeLabel;
16
+ /** Canonical dot-separated qualified type name for class-like symbols
17
+ * (e.g. `App.Models.User`). Falls back to the simple symbol name when no
18
+ * package/namespace/module scope exists or no explicit qualified metadata is provided. */
19
+ qualifiedName?: string;
20
+ parameterCount?: number;
21
+ /** Number of required (non-optional, non-default) parameters.
22
+ * Enables range-based arity filtering: argCount >= requiredParameterCount && argCount <= parameterCount. */
23
+ requiredParameterCount?: number;
24
+ /** Per-parameter type names for overload disambiguation (e.g. ['int', 'String']).
25
+ * Populated when parameter types are resolvable from AST (any typed language). */
26
+ parameterTypes?: string[];
27
+ /** Raw return type text extracted from AST (e.g. 'User', 'Promise<User>') */
28
+ returnType?: string;
29
+ /** Declared type for non-callable symbols — fields/properties (e.g. 'Address', 'List<User>') */
30
+ declaredType?: string;
31
+ /** Links Method/Constructor/Property to owning Class/Struct/Trait nodeId */
32
+ ownerId?: string;
33
+ }
34
+ //# sourceMappingURL=symbol-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol-definition.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/symbol-definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB;;+FAE2F;IAC3F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;iHAC6G;IAC7G,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;uFACmF;IACnF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `SymbolDefinition` — the canonical shape of an indexed symbol record.
3
+ *
4
+ * Historically defined in `gitnexus/src/core/ingestion/model/symbol-table.ts`;
5
+ * moved into `gitnexus-shared` as part of RFC #909 Ring 1 (#910) so the
6
+ * scope-resolution types that reference it can live in the shared package
7
+ * alongside their consumers (`gitnexus/` and `gitnexus-web/`).
8
+ *
9
+ * Shape is unchanged from the prior local definition.
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=symbol-definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol-definition.js","sourceRoot":"","sources":["../../src/scope-resolution/symbol-definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Scope-resolution type definitions — RFC §2 data model (authoritative source).
3
+ *
4
+ * See: https://www.notion.so/346dc50b6ed281cfaacbe480bf231d50
5
+ *
6
+ * Anti-drift rule: every type, interface, and enum defined here is the single
7
+ * source of truth. Later code that references these names must import them
8
+ * from `gitnexus-shared`; it must not re-define them locally.
9
+ *
10
+ * Lifecycle contract (RFC §2.8): scopes are **constructed during extraction,
11
+ * linked during finalize, immutable after finalize**. All fields are
12
+ * `readonly` at the type level; `Object.freeze` is applied at runtime in dev
13
+ * builds. `ReferenceIndex` is the sole structure populated after freeze — by
14
+ * resolution, before emission.
15
+ */
16
+ import type { NodeLabel } from '../graph/types.js';
17
+ import type { SymbolDefinition } from './symbol-definition.js';
18
+ /** Stable per-(file, range, kind) scope identifier; interned for identity-fast equality. */
19
+ export type ScopeId = string;
20
+ /** Stable symbol-definition identifier (graph nodeId). */
21
+ export type DefId = string;
22
+ /** Kinds of lexical scope a `Scope` node can represent. */
23
+ export type ScopeKind = 'Module' | 'Namespace' | 'Class' | 'Function' | 'Block' | 'Expression';
24
+ /** Source-text range. 1-based `startLine`/`endLine`; 0-based `startCol`/`endCol`. */
25
+ export interface Range {
26
+ readonly startLine: number;
27
+ readonly startCol: number;
28
+ readonly endLine: number;
29
+ readonly endCol: number;
30
+ }
31
+ /**
32
+ * Tagged capture emitted by a LanguageProvider's `emitScopeCaptures` hook.
33
+ *
34
+ * Parser-agnostic: tree-sitter queries and COBOL's regex tagger both produce
35
+ * `Capture[]`. The central `ScopeExtractor` consumes captures without
36
+ * knowing which parser produced them.
37
+ */
38
+ export interface Capture {
39
+ /** Capture name, including leading `@` (e.g., `'@scope.module'`, `'@declaration.class'`). */
40
+ readonly name: string;
41
+ readonly range: Range;
42
+ /** The captured source text. */
43
+ readonly text: string;
44
+ }
45
+ /**
46
+ * A cross-file import edge attached to a module/namespace scope.
47
+ *
48
+ * Raw (unlinked) edges are emitted during parse (Phase 1); `targetModuleScope`
49
+ * and `targetDefId` are filled in during finalize (Phase 2) via SCC-aware
50
+ * bounded-fixpoint linking (RFC §3.2).
51
+ */
52
+ export interface ImportEdge {
53
+ /** How this scope sees the imported name (after alias). */
54
+ readonly localName: string;
55
+ /** Exporting file; `null` only when `kind === 'dynamic-unresolved'`. */
56
+ readonly targetFile: string | null;
57
+ /** The name under which the target exports this symbol. */
58
+ readonly targetExportedName: string;
59
+ /** Pre-resolved at finalize: the module scope of the exporting file. */
60
+ readonly targetModuleScope?: ScopeId;
61
+ /** Pre-resolved at finalize: the exported symbol's `DefId`. */
62
+ readonly targetDefId?: DefId;
63
+ readonly kind: 'named' | 'alias' | 'namespace' | 'wildcard-expanded' | 'reexport' | 'dynamic-unresolved';
64
+ /** Re-export chain, for provenance (e.g., `['./y']` when re-exported via `./y`). */
65
+ readonly transitiveVia?: readonly string[];
66
+ /** Set to `'unresolved'` when the SCC fixpoint could not link this edge. */
67
+ readonly linkStatus?: 'unresolved';
68
+ }
69
+ /**
70
+ * A name binding visible at a scope, with provenance.
71
+ *
72
+ * Provenance stays at the visibility layer — a name being visible because it
73
+ * is local vs imported vs wildcard-expanded vs re-exported is a property of
74
+ * the binding itself. This keeps evidence emission and `import-use` reference
75
+ * stamping first-class instead of reconstructing provenance from a side table.
76
+ */
77
+ export interface BindingRef {
78
+ readonly def: SymbolDefinition;
79
+ readonly origin: 'local' | 'import' | 'namespace' | 'wildcard' | 'reexport';
80
+ /** Non-null for non-local origins; carries the `ImportEdge` that brought the name into this scope. */
81
+ readonly via?: ImportEdge;
82
+ }
83
+ /**
84
+ * A reference to a named type, anchored at its declaration site.
85
+ *
86
+ * Design choice: raw name + declaration-site scope, resolved at lookup time.
87
+ * Pre-resolution would invert the extraction/resolution wall. Deferred thunks
88
+ * add no capability. Structured type systems are months of work per language.
89
+ * This shape keeps V1 tractable while preserving correctness for aliases,
90
+ * re-exports, and nested modules. Generics deferred to V2 via `typeArgs`.
91
+ */
92
+ export interface TypeRef {
93
+ /** The name as written in source (e.g., `'User'`, `'models.User'`, `'List'`). */
94
+ readonly rawName: string;
95
+ /** Anchor for resolving `rawName` — the scope where the annotation/inference was written. */
96
+ readonly declaredAtScope: ScopeId;
97
+ readonly source: 'annotation' | 'parameter-annotation' | 'return-annotation' | 'self' | 'assignment-inferred' | 'constructor-inferred' | 'receiver-propagated';
98
+ /** Reserved for V2+: generic type arguments (`List<User>` → `[TypeRef('User')]`). V1 ignores. */
99
+ readonly typeArgs?: readonly TypeRef[];
100
+ }
101
+ /**
102
+ * The canonical lexical-scope node. Forms the spine of the SemanticModel.
103
+ *
104
+ * ScopeId shape (RFC §2.2): `scope:{filePath}#{startLine}:{startCol}-{endLine}:{endCol}:{kind}`
105
+ * — deterministic, stable across reparses of the same source, interned.
106
+ */
107
+ export interface Scope {
108
+ readonly id: ScopeId;
109
+ readonly parent: ScopeId | null;
110
+ readonly kind: ScopeKind;
111
+ readonly range: Range;
112
+ readonly filePath: string;
113
+ /** Names visible from this scope. Provenance preserved via `BindingRef.origin`. */
114
+ readonly bindings: ReadonlyMap<string, readonly BindingRef[]>;
115
+ /** Defs structurally owned by this scope (e.g., methods owned by a class body scope). */
116
+ readonly ownedDefs: readonly SymbolDefinition[];
117
+ /** Import edges attached to this scope. Mostly module/namespace scopes, but some
118
+ * languages allow local imports (Python `def f(): from x import Y`, Rust
119
+ * fn-local `use`, TS dynamic `import()`). */
120
+ readonly imports: readonly ImportEdge[];
121
+ /** Local type facts visible from this scope (parameter annotations, `self` binding, etc.). */
122
+ readonly typeBindings: ReadonlyMap<string, TypeRef>;
123
+ }
124
+ /**
125
+ * One piece of evidence for a `Resolution`. Multiple signals corroborate a
126
+ * single match; their weights compose additively to produce `confidence`.
127
+ *
128
+ * Weights come from `EvidenceWeights` (see `./evidence-weights.ts`).
129
+ */
130
+ export interface ResolutionEvidence {
131
+ readonly kind: 'local' | 'scope-chain' | 'import' | 'type-binding' | 'owner-match' | 'kind-match' | 'arity-match' | 'global-name' | 'global-qualified' | 'dynamic-import-unresolved';
132
+ /** Signal weight, sourced from `EvidenceWeights`. Additive; sum capped at 1.0. */
133
+ readonly weight: number;
134
+ /** Optional debug annotation (e.g., `'matched via self: User'`). */
135
+ readonly note?: string;
136
+ }
137
+ /**
138
+ * A ranked resolution candidate returned by `ClassRegistry.lookup` /
139
+ * `MethodRegistry.lookup` / `FieldRegistry.lookup`. Evidence composes
140
+ * additively; callers read `[0]` for the one-shot answer or inspect the
141
+ * evidence trace for debugging.
142
+ */
143
+ export interface Resolution {
144
+ readonly def: SymbolDefinition;
145
+ /** Σ of `evidence[].weight`, capped at 1.0. */
146
+ readonly confidence: number;
147
+ readonly evidence: readonly ResolutionEvidence[];
148
+ /** Optional debug trace: scopes walked to reach `def`. */
149
+ readonly path?: readonly ScopeId[];
150
+ }
151
+ /**
152
+ * A post-resolution usage fact: some code at `atRange` inside `fromScope`
153
+ * references `toDef` with the given confidence/evidence. Materialized by the
154
+ * resolution phase; emitted as graph edges (`CALLS`/`READS`/`WRITES`/etc.)
155
+ * during the emit phase.
156
+ */
157
+ export interface Reference {
158
+ /** Innermost lexical scope containing `atRange`. */
159
+ readonly fromScope: ScopeId;
160
+ readonly toDef: DefId;
161
+ /** Location of the reference in source. */
162
+ readonly atRange: Range;
163
+ readonly kind: 'call' | 'read' | 'write' | 'type-reference' | 'inherits' | 'import-use';
164
+ readonly confidence: number;
165
+ readonly evidence: readonly ResolutionEvidence[];
166
+ }
167
+ /**
168
+ * Two-way index over `Reference` records, populated during the resolution
169
+ * phase. Scopes stay immutable after finalize; references accumulate here.
170
+ */
171
+ export interface ReferenceIndex {
172
+ readonly bySourceScope: ReadonlyMap<ScopeId, readonly Reference[]>;
173
+ readonly byTargetDef: ReadonlyMap<DefId, readonly Reference[]>;
174
+ }
175
+ /**
176
+ * Opaque placeholder for the per-kind registry passed as the owner-scoped
177
+ * contributor. Typed concretely in Ring 2 SHARED (#917); kept as `unknown`
178
+ * here so Ring 1 can ship without pulling in the registry implementation.
179
+ */
180
+ export type RegistryContributor = unknown;
181
+ /**
182
+ * Parameters accepted by `Registry.lookup`. Three registries (Class/Method/
183
+ * Field) run the same 7-step algorithm with different parameter tuples; see
184
+ * RFC §4.4 for per-registry specializations.
185
+ */
186
+ export interface LookupParams {
187
+ readonly acceptedKinds: readonly NodeLabel[];
188
+ /** Class lookups: false. Method/Field lookups: true. */
189
+ readonly useReceiverTypeBinding: boolean;
190
+ readonly ownerScopedContributor: RegistryContributor | null;
191
+ /** Optional arity hint fed to `provider.arityCompatibility`. */
192
+ readonly arityHint?: number;
193
+ /** Explicit receiver name (e.g., `'user'` in `user.save()`). When present,
194
+ * the receiver's type binding at the callsite scope is used; otherwise
195
+ * the enclosing method's implicit `self`/`this` is consulted. See §4.1. */
196
+ readonly explicitReceiver?: {
197
+ readonly name: string;
198
+ };
199
+ }
200
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D,4FAA4F;AAC5F,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,0DAA0D;AAC1D,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,2DAA2D;AAC3D,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,WAAW,GACX,OAAO,GACP,UAAU,GACV,OAAO,GACP,YAAY,CAAC;AAIjB,qFAAqF;AACrF,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,OAAO;IACtB,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,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scope-resolution type definitions — RFC §2 data model (authoritative source).
3
+ *
4
+ * See: https://www.notion.so/346dc50b6ed281cfaacbe480bf231d50
5
+ *
6
+ * Anti-drift rule: every type, interface, and enum defined here is the single
7
+ * source of truth. Later code that references these names must import them
8
+ * from `gitnexus-shared`; it must not re-define them locally.
9
+ *
10
+ * Lifecycle contract (RFC §2.8): scopes are **constructed during extraction,
11
+ * linked during finalize, immutable after finalize**. All fields are
12
+ * `readonly` at the type level; `Object.freeze` is applied at runtime in dev
13
+ * builds. `ReferenceIndex` is the sole structure populated after freeze — by
14
+ * resolution, before emission.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/scope-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
@@ -1,6 +1,7 @@
1
1
  import { KnowledgeGraph } from '../graph/types.js';
2
2
  import { ASTCache } from './ast-cache.js';
3
- import type { SymbolDefinition, SymbolTableReader, HeritageMap, ExtractedHeritage } from './model/index.js';
3
+ import type { SymbolDefinition } from '../../_shared/index.js';
4
+ import type { SymbolTableReader, HeritageMap, ExtractedHeritage } from './model/index.js';
4
5
  import type { ResolutionContext } from './model/resolution-context.js';
5
6
  import type { TieredCandidates } from './model/resolution-context.js';
6
7
  import type { TypeEnvironment } from './type-env.js';
@@ -4,7 +4,7 @@
4
4
  * Owner-scoped field/property index extracted from SymbolTable.
5
5
  * Stores Property symbols keyed by `ownerNodeId\0fieldName` for O(1) lookup.
6
6
  */
7
- import type { SymbolDefinition } from './symbol-table.js';
7
+ import type { SymbolDefinition } from '../../../_shared/index.js';
8
8
  export interface FieldRegistry {
9
9
  /** Look up a field/property by its owning class nodeId and field name. */
10
10
  lookupFieldByOwner(ownerNodeId: string, fieldName: string): SymbolDefinition | undefined;