gitnexus 1.6.3-rc.1 → 1.6.3-rc.3
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/dist/_shared/index.d.ts +7 -0
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js +5 -0
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/scope-resolution/evidence-weights.d.ts +69 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.js +84 -0
- package/dist/_shared/scope-resolution/evidence-weights.js.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts +26 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.js +44 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts +14 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.js +21 -0
- package/dist/_shared/scope-resolution/origin-priority.js.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +34 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.js +12 -0
- package/dist/_shared/scope-resolution/symbol-definition.js.map +1 -0
- package/dist/_shared/scope-resolution/types.d.ts +336 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/types.js +17 -0
- package/dist/_shared/scope-resolution/types.js.map +1 -0
- package/dist/core/ingestion/call-processor.d.ts +2 -1
- package/dist/core/ingestion/language-provider.d.ts +172 -1
- package/dist/core/ingestion/model/field-registry.d.ts +1 -1
- package/dist/core/ingestion/model/index.d.ts +1 -1
- package/dist/core/ingestion/model/index.js +2 -0
- package/dist/core/ingestion/model/method-registry.d.ts +1 -1
- package/dist/core/ingestion/model/registration-table.d.ts +1 -2
- package/dist/core/ingestion/model/resolution-context.d.ts +1 -1
- package/dist/core/ingestion/model/resolve.d.ts +1 -1
- package/dist/core/ingestion/model/symbol-table.d.ts +1 -23
- package/dist/core/ingestion/model/type-registry.d.ts +1 -1
- package/dist/mcp/local/local-backend.d.ts +48 -1
- package/dist/mcp/local/local-backend.js +287 -131
- package/dist/mcp/tools.js +19 -1
- package/package.json +1 -1
package/dist/_shared/index.d.ts
CHANGED
|
@@ -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, CaptureMatch, BindingRef, ImportEdge, TypeRef, Scope, ResolutionEvidence, Resolution, Reference, ReferenceIndex, LookupParams, RegistryContributor, ParsedImport, ParsedTypeBinding, WorkspaceIndex, ScopeTree, Callsite, } 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,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"}
|
|
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,6BAA6B,CAAC;AAGrC,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC"}
|
package/dist/_shared/index.js
CHANGED
|
@@ -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;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"}
|
|
@@ -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 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-weights.js","sourceRoot":"","sources":["../../src/scope-resolution/evidence-weights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,6EAA6E;IAC7E,sCAAsC;IACtC,KAAK,EAAE,IAAI;IACX,uCAAuC;IACvC,MAAM,EAAE,IAAI;IACZ,yCAAyC;IACzC,QAAQ,EAAE,GAAG;IACb,0CAA0C;IAC1C,SAAS,EAAE,GAAG;IACd,yCAAyC;IACzC,QAAQ,EAAE,GAAG;IAEb,6EAA6E;IAC7E,uEAAuE;IACvE,kBAAkB,EAAE,CAAC,IAAI;IAEzB,6EAA6E;IAC7E;;;;;OAKG;IACH,qBAAqB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAU;IAE5D,6EAA6E;IAC7E,qEAAqE;IACrE,UAAU,EAAE,GAAG;IACf;uEACmE;IACnE,SAAS,EAAE,GAAG;IAEd,6EAA6E;IAC7E,0DAA0D;IAC1D,oBAAoB,EAAE,GAAG;IACzB,uDAAuD;IACvD,iBAAiB,EAAE,GAAG;IACtB;uEACmE;IACnE,sBAAsB,EAAE,CAAC,IAAI;IAE7B,6EAA6E;IAC7E,oDAAoD;IACpD,eAAe,EAAE,IAAI;IACrB,4EAA4E;IAC5E,UAAU,EAAE,GAAG;IAEf,6EAA6E;IAC7E,kEAAkE;IAClE,uBAAuB,EAAE,IAAI;IAE7B,6EAA6E;IAC7E;;;;;;OAMG;IACH,wBAAwB,EAAE,GAAG;CACrB,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,KAAK,GAAG,eAAe,CAAC,qBAAqB,CAAC;IACpD,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM;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"}
|