gitnexus 1.5.1 → 1.5.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.
Files changed (82) hide show
  1. package/dist/cli/wiki.js +15 -44
  2. package/dist/config/supported-languages.d.ts +1 -1
  3. package/dist/config/supported-languages.js +1 -1
  4. package/dist/core/graph/types.d.ts +2 -2
  5. package/dist/core/ingestion/call-processor.js +1 -1
  6. package/dist/core/ingestion/cobol-processor.js +1 -1
  7. package/dist/core/ingestion/entry-point-scoring.d.ts +1 -1
  8. package/dist/core/ingestion/entry-point-scoring.js +1 -1
  9. package/dist/core/ingestion/field-extractor.d.ts +1 -1
  10. package/dist/core/ingestion/field-extractors/configs/c-cpp.js +1 -1
  11. package/dist/core/ingestion/field-extractors/configs/csharp.js +1 -1
  12. package/dist/core/ingestion/field-extractors/configs/dart.js +1 -1
  13. package/dist/core/ingestion/field-extractors/configs/go.js +1 -1
  14. package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +5 -1
  15. package/dist/core/ingestion/field-extractors/configs/helpers.js +13 -3
  16. package/dist/core/ingestion/field-extractors/configs/jvm.js +1 -1
  17. package/dist/core/ingestion/field-extractors/configs/php.js +1 -1
  18. package/dist/core/ingestion/field-extractors/configs/python.js +1 -1
  19. package/dist/core/ingestion/field-extractors/configs/ruby.js +1 -1
  20. package/dist/core/ingestion/field-extractors/configs/rust.js +1 -1
  21. package/dist/core/ingestion/field-extractors/configs/swift.js +1 -1
  22. package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +1 -1
  23. package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
  24. package/dist/core/ingestion/field-extractors/typescript.d.ts +1 -1
  25. package/dist/core/ingestion/field-extractors/typescript.js +1 -1
  26. package/dist/core/ingestion/field-types.d.ts +1 -1
  27. package/dist/core/ingestion/framework-detection.d.ts +1 -1
  28. package/dist/core/ingestion/framework-detection.js +1 -1
  29. package/dist/core/ingestion/heritage-processor.d.ts +1 -1
  30. package/dist/core/ingestion/heritage-processor.js +1 -1
  31. package/dist/core/ingestion/import-processor.js +1 -1
  32. package/dist/core/ingestion/import-resolvers/csharp.js +1 -1
  33. package/dist/core/ingestion/import-resolvers/dart.js +1 -1
  34. package/dist/core/ingestion/import-resolvers/go.js +1 -1
  35. package/dist/core/ingestion/import-resolvers/jvm.js +1 -1
  36. package/dist/core/ingestion/import-resolvers/python.js +1 -1
  37. package/dist/core/ingestion/import-resolvers/rust.js +1 -1
  38. package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
  39. package/dist/core/ingestion/import-resolvers/standard.js +1 -1
  40. package/dist/core/ingestion/language-provider.d.ts +2 -2
  41. package/dist/core/ingestion/languages/c-cpp.js +1 -1
  42. package/dist/core/ingestion/languages/cobol.js +1 -1
  43. package/dist/core/ingestion/languages/csharp.js +1 -1
  44. package/dist/core/ingestion/languages/dart.js +1 -1
  45. package/dist/core/ingestion/languages/go.js +1 -1
  46. package/dist/core/ingestion/languages/index.d.ts +1 -1
  47. package/dist/core/ingestion/languages/index.js +1 -1
  48. package/dist/core/ingestion/languages/java.js +1 -1
  49. package/dist/core/ingestion/languages/kotlin.js +1 -1
  50. package/dist/core/ingestion/languages/php.js +1 -1
  51. package/dist/core/ingestion/languages/python.js +1 -1
  52. package/dist/core/ingestion/languages/ruby.js +1 -1
  53. package/dist/core/ingestion/languages/rust.js +1 -1
  54. package/dist/core/ingestion/languages/swift.js +1 -1
  55. package/dist/core/ingestion/languages/typescript.js +5 -1
  56. package/dist/core/ingestion/method-extractors/configs/csharp.js +1 -1
  57. package/dist/core/ingestion/method-extractors/configs/jvm.js +1 -1
  58. package/dist/core/ingestion/method-extractors/configs/typescript-javascript.d.ts +3 -0
  59. package/dist/core/ingestion/method-extractors/configs/typescript-javascript.js +261 -0
  60. package/dist/core/ingestion/method-types.d.ts +1 -1
  61. package/dist/core/ingestion/mro-processor.d.ts +1 -1
  62. package/dist/core/ingestion/parsing-processor.js +1 -1
  63. package/dist/core/ingestion/pipeline.d.ts +1 -1
  64. package/dist/core/ingestion/pipeline.js +1 -1
  65. package/dist/core/ingestion/process-processor.js +1 -1
  66. package/dist/core/ingestion/symbol-table.d.ts +1 -1
  67. package/dist/core/ingestion/tree-sitter-queries.d.ts +3 -3
  68. package/dist/core/ingestion/tree-sitter-queries.js +17 -1
  69. package/dist/core/ingestion/type-env.d.ts +2 -2
  70. package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -1
  71. package/dist/core/ingestion/utils/ast-helpers.js +7 -0
  72. package/dist/core/ingestion/workers/parse-worker.d.ts +2 -2
  73. package/dist/core/ingestion/workers/parse-worker.js +2 -2
  74. package/dist/core/lbug/schema.d.ts +2 -2
  75. package/dist/core/lbug/schema.js +1 -1
  76. package/dist/core/tree-sitter/parser-loader.d.ts +1 -1
  77. package/dist/core/tree-sitter/parser-loader.js +1 -1
  78. package/dist/core/wiki/html-viewer.js +6 -4
  79. package/dist/core/wiki/llm-client.js +4 -6
  80. package/dist/server/api.js +1 -1
  81. package/package.json +3 -3
  82. package/scripts/build.js +4 -0
package/dist/cli/wiki.js CHANGED
@@ -197,47 +197,23 @@ export const wikiCommand = async (inputPath, options) => {
197
197
  llmConfig = { ...llmConfig, provider: 'cursor', model, apiKey: '', baseUrl: '' };
198
198
  }
199
199
  else if (choice === '3') {
200
- // Azure OpenAI guided setup
201
- console.log('\n Azure OpenAI setup.');
202
- console.log(' You need: your resource name, deployment name, and API key from the Azure portal.\n');
203
- const resourceName = (await prompt(' Azure resource name (e.g. my-openai-resource): ')).trim();
204
- if (!resourceName) {
205
- console.log('\n No resource name provided. Aborting.\n');
200
+ // Azure OpenAI guided setup — minimal prompts
201
+ console.log('\n Azure OpenAI setup.\n');
202
+ const endpoint = (await prompt(' Endpoint URL (e.g. https://my-resource.openai.azure.com): '))
203
+ .trim()
204
+ .replace(/\/+$/, '');
205
+ if (!endpoint) {
206
+ console.log('\n No endpoint provided. Aborting.\n');
206
207
  process.exitCode = 1;
207
208
  return;
208
209
  }
209
- const deploymentName = (await prompt(' Deployment name (the name you gave your model deployment): ')).trim();
210
+ const deploymentName = (await prompt(' Deployment name: ')).trim();
210
211
  if (!deploymentName) {
211
212
  console.log('\n No deployment name provided. Aborting.\n');
212
213
  process.exitCode = 1;
213
214
  return;
214
215
  }
215
- // Offer v1 or legacy URL
216
- console.log('\n API format:');
217
- console.log(' [1] v1 API — recommended (no api-version needed)');
218
- console.log(' [2] Legacy — uses api-version query param\n');
219
- const apiFormat = await prompt(' Select format (1/2, default: 1): ');
220
- let azureApiVersion;
221
- let azureBaseUrl;
222
- if (apiFormat === '2') {
223
- const versionInput = await prompt(' api-version (default: 2024-10-21): ');
224
- azureApiVersion = versionInput || '2024-10-21';
225
- azureBaseUrl = `https://${resourceName}.openai.azure.com/openai/deployments/${deploymentName}`;
226
- }
227
- else {
228
- azureBaseUrl = `https://${resourceName}.openai.azure.com/openai/v1`;
229
- azureApiVersion = undefined;
230
- }
231
- defaultModel = deploymentName;
232
- // Ask if this is a reasoning model deployment
233
- const reasoningAnswer = await prompt(' Is this a reasoning model (o1, o3, o4-mini)? (y/N): ');
234
- const isReasoningModelDeployment = ['y', 'yes'].includes(reasoningAnswer.toLowerCase());
235
- if (isReasoningModelDeployment) {
236
- console.log(' Note: temperature and max_tokens will be omitted for this deployment (Azure reasoning model requirement).\n');
237
- }
238
- const modelInput = await prompt(` Model / deployment name (default: ${defaultModel}): `);
239
- const model = modelInput || defaultModel;
240
- // API key
216
+ // API key use env var if available
241
217
  const envKey = process.env.GITNEXUS_API_KEY || process.env.OPENAI_API_KEY || '';
242
218
  let azureKey;
243
219
  if (envKey) {
@@ -258,26 +234,21 @@ export const wikiCommand = async (inputPath, options) => {
258
234
  process.exitCode = 1;
259
235
  return;
260
236
  }
261
- // Save Azure config including optional apiVersion and isReasoningModel
262
- const azureConfig = {
237
+ // Always use v1 API format no need for api-version
238
+ const azureBaseUrl = `${endpoint}/openai/v1`;
239
+ await saveCLIConfig({
263
240
  apiKey: azureKey,
264
241
  baseUrl: azureBaseUrl,
265
- model,
242
+ model: deploymentName,
266
243
  provider: 'azure',
267
- isReasoningModel: isReasoningModelDeployment,
268
- };
269
- if (azureApiVersion)
270
- azureConfig.apiVersion = azureApiVersion;
271
- await saveCLIConfig(azureConfig);
244
+ });
272
245
  console.log(' Config saved to ~/.gitnexus/config.json\n');
273
246
  llmConfig = {
274
247
  ...llmConfig,
275
248
  apiKey: azureKey,
276
249
  baseUrl: azureBaseUrl,
277
- model,
250
+ model: deploymentName,
278
251
  provider: 'azure',
279
- apiVersion: azureApiVersion,
280
- isReasoningModel: isReasoningModelDeployment,
281
252
  };
282
253
  }
283
254
  else {
@@ -10,4 +10,4 @@
10
10
  * 5. Add file extension mapping in utils.ts getLanguageFromFilename()
11
11
  * 6. Run full test suite
12
12
  */
13
- export { SupportedLanguages } from 'gitnexus-shared';
13
+ export { SupportedLanguages } from '../_shared/index.js';
@@ -10,4 +10,4 @@
10
10
  * 5. Add file extension mapping in utils.ts getLanguageFromFilename()
11
11
  * 6. Run full test suite
12
12
  */
13
- export { SupportedLanguages } from 'gitnexus-shared';
13
+ export { SupportedLanguages } from '../_shared/index.js';
@@ -2,11 +2,11 @@
2
2
  * CLI-specific graph types.
3
3
  *
4
4
  * Shared types (NodeLabel, GraphNode, etc.) should be imported
5
- * directly from 'gitnexus-shared' at call sites.
5
+ * directly from '../../_shared/index.js' at call sites.
6
6
  *
7
7
  * This file only defines the CLI's KnowledgeGraph with mutation methods.
8
8
  */
9
- import type { GraphNode, GraphRelationship } from 'gitnexus-shared';
9
+ import type { GraphNode, GraphRelationship } from '../../_shared/index.js';
10
10
  export interface KnowledgeGraph {
11
11
  nodes: GraphNode[];
12
12
  relationships: GraphRelationship[];
@@ -3,7 +3,7 @@ import { TIER_CONFIDENCE } from './resolution-context.js';
3
3
  import { isLanguageAvailable, loadParser, loadLanguage } from '../tree-sitter/parser-loader.js';
4
4
  import { getProvider } from './languages/index.js';
5
5
  import { generateId } from '../../lib/utils.js';
6
- import { getLanguageFromFilename } from 'gitnexus-shared';
6
+ import { getLanguageFromFilename } from '../../_shared/index.js';
7
7
  import { isVerboseIngestionEnabled } from './utils/verbose.js';
8
8
  import { yieldToEventLoop } from './utils/event-loop.js';
9
9
  import { FUNCTION_NODE_TYPES, extractFunctionName, findEnclosingClassId, } from './utils/ast-helpers.js';
@@ -14,7 +14,7 @@
14
14
  */
15
15
  import path from 'node:path';
16
16
  import { generateId } from '../../lib/utils.js';
17
- import { SupportedLanguages } from 'gitnexus-shared';
17
+ import { SupportedLanguages } from '../../_shared/index.js';
18
18
  import { preprocessCobolSource, extractCobolSymbolsWithRegex, } from './cobol/cobol-preprocessor.js';
19
19
  import { expandCopies } from './cobol/cobol-copy-expander.js';
20
20
  import { processJclFiles } from './cobol/jcl-processor.js';
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * This module is language-agnostic - language-specific patterns are defined per language.
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../_shared/index.js';
13
13
  export declare const ENTRY_POINT_PATTERNS: {
14
14
  javascript: RegExp[];
15
15
  typescript: RegExp[];
@@ -10,7 +10,7 @@
10
10
  * This module is language-agnostic - language-specific patterns are defined per language.
11
11
  */
12
12
  import { detectFrameworkFromPath } from './framework-detection.js';
13
- import { SupportedLanguages } from 'gitnexus-shared';
13
+ import { SupportedLanguages } from '../../_shared/index.js';
14
14
  // ============================================================================
15
15
  // NAME PATTERNS - All 13 supported languages
16
16
  // ============================================================================
@@ -1,5 +1,5 @@
1
1
  import type { SyntaxNode } from './utils/ast-helpers.js';
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../_shared/index.js';
3
3
  import type { FieldExtractorContext, ExtractedFields, FieldVisibility } from './field-types.js';
4
4
  /**
5
5
  * Language-specific field extractor
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/c-cpp.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { hasKeyword } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/csharp.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { findVisibility, hasKeyword, hasModifier, collectModifierTexts } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  const CSHARP_VIS = new Set(['public', 'private', 'protected', 'internal']);
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/dart.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { hasKeyword } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/go.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
4
4
  /**
5
5
  * Go field extraction config.
@@ -6,7 +6,10 @@ import type { SyntaxNode } from '../../utils/ast-helpers.js';
6
6
  import type { FieldVisibility } from '../../field-types.js';
7
7
  /**
8
8
  * Check whether any child of `node` (named or unnamed) has .text matching
9
- * one of the given `keywords`.
9
+ * the given `keyword`.
10
+ *
11
+ * Skips the `name` field child to avoid false positives when a method is
12
+ * named after a contextual keyword (e.g. `abstract()` in TypeScript).
10
13
  */
11
14
  export declare function hasKeyword(node: SyntaxNode, keyword: string): boolean;
12
15
  /**
@@ -18,6 +21,7 @@ export declare function hasModifier(node: SyntaxNode, modifierType: string, keyw
18
21
  /**
19
22
  * Return the first matching visibility keyword found either as a direct keyword
20
23
  * child or inside a modifier wrapper node.
24
+ * Skips the `name` field child (same rationale as hasKeyword).
21
25
  */
22
26
  export declare function findVisibility(node: SyntaxNode, keywords: ReadonlySet<FieldVisibility>, defaultVis: FieldVisibility, modifierNodeType?: string): FieldVisibility;
23
27
  /**
@@ -5,12 +5,18 @@ import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  // ---------------------------------------------------------------------------
6
6
  /**
7
7
  * Check whether any child of `node` (named or unnamed) has .text matching
8
- * one of the given `keywords`.
8
+ * the given `keyword`.
9
+ *
10
+ * Skips the `name` field child to avoid false positives when a method is
11
+ * named after a contextual keyword (e.g. `abstract()` in TypeScript).
9
12
  */
10
13
  export function hasKeyword(node, keyword) {
14
+ const nameNode = node.childForFieldName('name');
11
15
  for (let i = 0; i < node.childCount; i++) {
12
16
  const child = node.child(i);
13
- if (child && child.text.trim() === keyword)
17
+ if (!child || child === nameNode)
18
+ continue;
19
+ if (child.text.trim() === keyword)
14
20
  return true;
15
21
  }
16
22
  return false;
@@ -36,12 +42,16 @@ export function hasModifier(node, modifierType, keyword) {
36
42
  /**
37
43
  * Return the first matching visibility keyword found either as a direct keyword
38
44
  * child or inside a modifier wrapper node.
45
+ * Skips the `name` field child (same rationale as hasKeyword).
39
46
  */
40
47
  export function findVisibility(node, keywords, defaultVis, modifierNodeType) {
48
+ const nameNode = node.childForFieldName('name');
41
49
  // Direct keyword children
42
50
  for (let i = 0; i < node.childCount; i++) {
43
51
  const child = node.child(i);
44
- const text = child?.text.trim();
52
+ if (!child || child === nameNode)
53
+ continue;
54
+ const text = child.text.trim();
45
55
  if (text && keywords.has(text))
46
56
  return text;
47
57
  }
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/jvm.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { findVisibility, hasKeyword, hasModifier, typeFromField } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  // ---------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/php.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { findVisibility, hasKeyword } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  const PHP_VIS = new Set(['public', 'private', 'protected']);
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/python.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
4
4
  /**
5
5
  * Python field extraction config.
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/ruby.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  /**
4
4
  * Collect all field names declared by an `attr_accessor`, `attr_reader`, or
5
5
  * `attr_writer` call node. A single call may list multiple symbols:
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/rust.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
4
4
  import { hasKeyword } from './helpers.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/swift.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { hasKeyword, findVisibility } from './helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  const SWIFT_VIS = new Set([
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/configs/typescript-javascript.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { hasKeyword, findVisibility, typeFromAnnotation } from './helpers.js';
4
4
  const VISIBILITY_KEYWORDS = new Set(['public', 'private', 'protected']);
5
5
  const shared = {
@@ -6,7 +6,7 @@
6
6
  * BaseFieldExtractor whose behaviour is entirely driven by FieldExtractionConfig.
7
7
  */
8
8
  import type { SyntaxNode } from '../utils/ast-helpers.js';
9
- import { SupportedLanguages } from 'gitnexus-shared';
9
+ import { SupportedLanguages } from '../../../_shared/index.js';
10
10
  import type { FieldExtractor } from '../field-extractor.js';
11
11
  import type { FieldExtractorContext, FieldInfo, FieldVisibility } from '../field-types.js';
12
12
  export interface FieldExtractionConfig {
@@ -1,5 +1,5 @@
1
1
  import type { SyntaxNode } from '../utils/ast-helpers.js';
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../_shared/index.js';
3
3
  import { BaseFieldExtractor } from '../field-extractor.js';
4
4
  import type { FieldExtractorContext, ExtractedFields, FieldVisibility } from '../field-types.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/field-extractors/typescript.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../_shared/index.js';
3
3
  import { BaseFieldExtractor } from '../field-extractor.js';
4
4
  /**
5
5
  * Hand-written TypeScript field extractor.
@@ -1,6 +1,6 @@
1
1
  import type { TypeEnvironment } from './type-env.js';
2
2
  import type { SymbolTable } from './symbol-table.js';
3
- import { SupportedLanguages } from 'gitnexus-shared';
3
+ import { SupportedLanguages } from '../../_shared/index.js';
4
4
  /**
5
5
  * Visibility levels used across all supported languages.
6
6
  * - public / private / protected: universal modifiers
@@ -9,7 +9,7 @@
9
9
  * DESIGN: Returns null for unknown frameworks, which causes a 1.0 multiplier
10
10
  * (no bonus, no penalty) - same behavior as before this feature.
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../_shared/index.js';
13
13
  export interface FrameworkHint {
14
14
  framework: string;
15
15
  entryPointMultiplier: number;
@@ -9,7 +9,7 @@
9
9
  * DESIGN: Returns null for unknown frameworks, which causes a 1.0 multiplier
10
10
  * (no bonus, no penalty) - same behavior as before this feature.
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../_shared/index.js';
13
13
  // ============================================================================
14
14
  // PATH-BASED FRAMEWORK DETECTION
15
15
  // ============================================================================
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { KnowledgeGraph } from '../graph/types.js';
17
17
  import { ASTCache } from './ast-cache.js';
18
- import { SupportedLanguages } from 'gitnexus-shared';
18
+ import { SupportedLanguages } from '../../_shared/index.js';
19
19
  import type { ExtractedHeritage } from './workers/parse-worker.js';
20
20
  import type { ResolutionContext } from './resolution-context.js';
21
21
  /**
@@ -16,7 +16,7 @@
16
16
  import Parser from 'tree-sitter';
17
17
  import { isLanguageAvailable, loadParser, loadLanguage } from '../tree-sitter/parser-loader.js';
18
18
  import { generateId } from '../../lib/utils.js';
19
- import { getLanguageFromFilename } from 'gitnexus-shared';
19
+ import { getLanguageFromFilename } from '../../_shared/index.js';
20
20
  import { isVerboseIngestionEnabled } from './utils/verbose.js';
21
21
  import { yieldToEventLoop } from './utils/event-loop.js';
22
22
  import { getProvider } from './languages/index.js';
@@ -2,7 +2,7 @@ import Parser from 'tree-sitter';
2
2
  import { isLanguageAvailable, loadParser, loadLanguage } from '../tree-sitter/parser-loader.js';
3
3
  import { getProvider, getProviderForFile, providersWithImplicitWiring } from './languages/index.js';
4
4
  import { generateId } from '../../lib/utils.js';
5
- import { getLanguageFromFilename } from 'gitnexus-shared';
5
+ import { getLanguageFromFilename } from '../../_shared/index.js';
6
6
  import { isVerboseIngestionEnabled } from './utils/verbose.js';
7
7
  import { yieldToEventLoop } from './utils/event-loop.js';
8
8
  import { getTreeSitterBufferSize } from './constants.js';
@@ -3,7 +3,7 @@
3
3
  * Handles using-directive resolution via .csproj root namespace stripping.
4
4
  */
5
5
  import { suffixResolve } from './utils.js';
6
- import { SupportedLanguages } from 'gitnexus-shared';
6
+ import { SupportedLanguages } from '../../../_shared/index.js';
7
7
  import { resolveStandard } from './standard.js';
8
8
  /**
9
9
  * Resolve a C# using-directive import path to matching .cs files (low-level helper).
@@ -4,7 +4,7 @@
4
4
  * SDK imports (dart:*) and external packages are skipped.
5
5
  */
6
6
  import { resolveStandard } from './standard.js';
7
- import { SupportedLanguages } from 'gitnexus-shared';
7
+ import { SupportedLanguages } from '../../../_shared/index.js';
8
8
  export function resolveDartImport(rawImportPath, filePath, ctx) {
9
9
  // Strip surrounding quotes from configurable_uri capture
10
10
  const stripped = rawImportPath.replace(/^['"]|['"]$/g, '');
@@ -2,7 +2,7 @@
2
2
  * Go package import resolution.
3
3
  * Handles Go module path-based package imports.
4
4
  */
5
- import { SupportedLanguages } from 'gitnexus-shared';
5
+ import { SupportedLanguages } from '../../../_shared/index.js';
6
6
  import { resolveStandard } from './standard.js';
7
7
  /**
8
8
  * Extract the package directory suffix from a Go import path.
@@ -2,7 +2,7 @@
2
2
  * JVM import resolution (Java + Kotlin).
3
3
  * Handles wildcard imports, member/static imports, and Kotlin-specific patterns.
4
4
  */
5
- import { SupportedLanguages } from 'gitnexus-shared';
5
+ import { SupportedLanguages } from '../../../_shared/index.js';
6
6
  import { resolveStandard } from './standard.js';
7
7
  /** Kotlin file extensions for JVM resolver reuse */
8
8
  export const KOTLIN_EXTENSIONS = ['.kt', '.kts'];
@@ -3,7 +3,7 @@
3
3
  * Import system spec: PEP 302 (original), PEP 451 (current).
4
4
  */
5
5
  import { tryResolveWithExtensions } from './utils.js';
6
- import { SupportedLanguages } from 'gitnexus-shared';
6
+ import { SupportedLanguages } from '../../../_shared/index.js';
7
7
  import { resolveStandard } from './standard.js';
8
8
  /**
9
9
  * Resolve a Python import to a file path (low-level helper).
@@ -2,7 +2,7 @@
2
2
  * Rust module import resolution.
3
3
  * Handles crate::, super::, self:: prefix paths and :: separators.
4
4
  */
5
- import { SupportedLanguages } from 'gitnexus-shared';
5
+ import { SupportedLanguages } from '../../../_shared/index.js';
6
6
  import { resolveStandard } from './standard.js';
7
7
  /**
8
8
  * Resolve Rust use-path to a file (low-level helper).
@@ -4,7 +4,7 @@
4
4
  * Used as the fallback when language-specific resolvers don't match.
5
5
  */
6
6
  import type { SuffixIndex } from './utils.js';
7
- import { SupportedLanguages } from 'gitnexus-shared';
7
+ import { SupportedLanguages } from '../../../_shared/index.js';
8
8
  import type { ImportResult, ImportResolverFn, ResolveCtx } from './types.js';
9
9
  import type { TsconfigPaths } from '../language-config.js';
10
10
  /** Max entries in the resolve cache. Beyond this, entries are evicted.
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { tryResolveWithExtensions, suffixResolve } from './utils.js';
7
7
  import { resolveRustImportInternal } from './rust.js';
8
- import { SupportedLanguages } from 'gitnexus-shared';
8
+ import { SupportedLanguages } from '../../../_shared/index.js';
9
9
  /** Max entries in the resolve cache. Beyond this, entries are evicted.
10
10
  * 100K entries ≈ 15MB — covers the most common import patterns. */
11
11
  export const RESOLVE_CACHE_CAP = 100_000;
@@ -8,7 +8,7 @@
8
8
  * The providers table in `languages/index.ts` uses `satisfies Record<SupportedLanguages, LanguageProvider>`
9
9
  * so adding a language to the enum without creating a provider is a compiler error.
10
10
  */
11
- import type { SupportedLanguages } from 'gitnexus-shared';
11
+ import type { SupportedLanguages } from '../../_shared/index.js';
12
12
  import type { LanguageTypeConfig } from './type-extractors/types.js';
13
13
  import type { CallRouter } from './call-routing.js';
14
14
  import type { ExportChecker } from './export-detection.js';
@@ -17,7 +17,7 @@ import type { MethodExtractor } from './method-types.js';
17
17
  import type { ImportResolverFn } from './import-resolvers/types.js';
18
18
  import type { NamedBindingExtractorFn } from './named-bindings/types.js';
19
19
  import type { SyntaxNode } from './utils/ast-helpers.js';
20
- import type { NodeLabel } from 'gitnexus-shared';
20
+ import type { NodeLabel } from '../../_shared/index.js';
21
21
  /** Tree-sitter query captures: capture name → AST node (or undefined if not captured). */
22
22
  export type CaptureMap = Record<string, SyntaxNode | undefined>;
23
23
  /** MRO strategy for multiple inheritance resolution. */
@@ -7,7 +7,7 @@
7
7
  * C uses 'first-wins' MRO (no inheritance). C++ uses 'leftmost-base' MRO
8
8
  * for its left-to-right multiple inheritance resolution order.
9
9
  */
10
- import { SupportedLanguages } from 'gitnexus-shared';
10
+ import { SupportedLanguages } from '../../../_shared/index.js';
11
11
  import { defineLanguage } from '../language-provider.js';
12
12
  import { typeConfig as cCppConfig } from '../type-extractors/c-cpp.js';
13
13
  import { cCppExportChecker } from '../export-detection.js';
@@ -9,7 +9,7 @@
9
9
  * This provider exists to satisfy the SupportedLanguages exhaustiveness
10
10
  * checks and to declare parseStrategy: 'standalone'.
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../../_shared/index.js';
13
13
  import { defineLanguage } from '../language-provider.js';
14
14
  export const cobolProvider = defineLanguage({
15
15
  id: SupportedLanguages.Cobol,
@@ -5,7 +5,7 @@
5
5
  * and an implements-split MRO strategy for multiple interface implementation.
6
6
  * Interface names follow the I-prefix convention (e.g., IDisposable).
7
7
  */
8
- import { SupportedLanguages } from 'gitnexus-shared';
8
+ import { SupportedLanguages } from '../../../_shared/index.js';
9
9
  import { defineLanguage } from '../language-provider.js';
10
10
  import { typeConfig as csharpConfig } from '../type-extractors/csharp.js';
11
11
  import { csharpExportChecker } from '../export-detection.js';
@@ -10,7 +10,7 @@
10
10
  * The hook resolves the enclosing function by inspecting the previous sibling.
11
11
  */
12
12
  import { FUNCTION_NODE_TYPES, extractFunctionName } from '../utils/ast-helpers.js';
13
- import { SupportedLanguages } from 'gitnexus-shared';
13
+ import { SupportedLanguages } from '../../../_shared/index.js';
14
14
  import { defineLanguage } from '../language-provider.js';
15
15
  import { typeConfig as dartConfig } from '../type-extractors/dart.js';
16
16
  import { dartExportChecker } from '../export-detection.js';
@@ -8,7 +8,7 @@
8
8
  * - importSemantics: 'wildcard' (Go imports entire packages)
9
9
  * - callRouter: present (Go method calls may need routing)
10
10
  */
11
- import { SupportedLanguages } from 'gitnexus-shared';
11
+ import { SupportedLanguages } from '../../../_shared/index.js';
12
12
  import { defineLanguage } from '../language-provider.js';
13
13
  import { typeConfig as goConfig } from '../type-extractors/go.js';
14
14
  import { goExportChecker } from '../export-detection.js';
@@ -7,7 +7,7 @@
7
7
  * 3. Add one line to the `providers` table below
8
8
  * 4. Run `tsc --noEmit` to verify
9
9
  */
10
- import { SupportedLanguages } from 'gitnexus-shared';
10
+ import { SupportedLanguages } from '../../../_shared/index.js';
11
11
  import type { LanguageProvider } from '../language-provider.js';
12
12
  export declare const providers: {
13
13
  javascript: LanguageProvider;
@@ -7,7 +7,7 @@
7
7
  * 3. Add one line to the `providers` table below
8
8
  * 4. Run `tsc --noEmit` to verify
9
9
  */
10
- import { SupportedLanguages } from 'gitnexus-shared';
10
+ import { SupportedLanguages } from '../../../_shared/index.js';
11
11
  import { typescriptProvider, javascriptProvider } from './typescript.js';
12
12
  import { pythonProvider } from './python.js';
13
13
  import { javaProvider } from './java.js';
@@ -6,7 +6,7 @@
6
6
  * EXTENDS by default with implements-split MRO for multiple
7
7
  * interface implementation.
8
8
  */
9
- import { SupportedLanguages } from 'gitnexus-shared';
9
+ import { SupportedLanguages } from '../../../_shared/index.js';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { javaTypeConfig } from '../type-extractors/jvm.js';
12
12
  import { javaExportChecker } from '../export-detection.js';
@@ -6,7 +6,7 @@
6
6
  * Heritage uses EXTENDS by default with implements-split MRO for
7
7
  * multiple interface implementation.
8
8
  */
9
- import { SupportedLanguages } from 'gitnexus-shared';
9
+ import { SupportedLanguages } from '../../../_shared/index.js';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { kotlinTypeConfig } from '../type-extractors/jvm.js';
12
12
  import { kotlinExportChecker } from '../export-detection.js';
@@ -5,7 +5,7 @@
5
5
  * and standard export/import resolution. PHP files can use a variety of
6
6
  * extensions from legacy versions through modern PHP 8.
7
7
  */
8
- import { SupportedLanguages } from 'gitnexus-shared';
8
+ import { SupportedLanguages } from '../../../_shared/index.js';
9
9
  import { defineLanguage } from '../language-provider.js';
10
10
  import { typeConfig as phpConfig } from '../type-extractors/php.js';
11
11
  import { phpExportChecker } from '../export-detection.js';