@veewo/gitnexus 1.3.8 → 1.3.9

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 (108) hide show
  1. package/README.md +5 -0
  2. package/dist/benchmark/runner.test.js +1 -1
  3. package/dist/benchmark/u2-e2e/analyze-parser.d.ts +22 -0
  4. package/dist/benchmark/u2-e2e/analyze-parser.js +89 -0
  5. package/dist/benchmark/u2-e2e/analyze-parser.test.d.ts +1 -0
  6. package/dist/benchmark/u2-e2e/analyze-parser.test.js +13 -0
  7. package/dist/benchmark/u2-e2e/characterlist-assetref.d.ts +19 -0
  8. package/dist/benchmark/u2-e2e/characterlist-assetref.js +80 -0
  9. package/dist/benchmark/u2-e2e/characterlist-assetref.test.d.ts +1 -0
  10. package/dist/benchmark/u2-e2e/characterlist-assetref.test.js +108 -0
  11. package/dist/benchmark/u2-e2e/config.d.ts +25 -0
  12. package/dist/benchmark/u2-e2e/config.js +86 -0
  13. package/dist/benchmark/u2-e2e/config.test.d.ts +1 -0
  14. package/dist/benchmark/u2-e2e/config.test.js +29 -0
  15. package/dist/benchmark/u2-e2e/metrics.d.ts +20 -0
  16. package/dist/benchmark/u2-e2e/metrics.js +34 -0
  17. package/dist/benchmark/u2-e2e/metrics.test.d.ts +1 -0
  18. package/dist/benchmark/u2-e2e/metrics.test.js +13 -0
  19. package/dist/benchmark/u2-e2e/neonspark-full-e2e.d.ts +33 -0
  20. package/dist/benchmark/u2-e2e/neonspark-full-e2e.js +439 -0
  21. package/dist/benchmark/u2-e2e/neonspark-full-e2e.test.d.ts +1 -0
  22. package/dist/benchmark/u2-e2e/neonspark-full-e2e.test.js +40 -0
  23. package/dist/benchmark/u2-e2e/report.d.ts +58 -0
  24. package/dist/benchmark/u2-e2e/report.js +130 -0
  25. package/dist/benchmark/u2-e2e/report.test.d.ts +1 -0
  26. package/dist/benchmark/u2-e2e/report.test.js +58 -0
  27. package/dist/benchmark/u2-e2e/retrieval-runner.d.ts +21 -0
  28. package/dist/benchmark/u2-e2e/retrieval-runner.js +166 -0
  29. package/dist/benchmark/u2-e2e/retrieval-runner.test.d.ts +1 -0
  30. package/dist/benchmark/u2-e2e/retrieval-runner.test.js +145 -0
  31. package/dist/benchmark/u2-performance-sampler.d.ts +33 -0
  32. package/dist/benchmark/u2-performance-sampler.js +178 -0
  33. package/dist/benchmark/u2-performance-sampler.test.d.ts +1 -0
  34. package/dist/benchmark/u2-performance-sampler.test.js +34 -0
  35. package/dist/cli/analyze-multi-scope-regression.test.js +10 -0
  36. package/dist/cli/analyze-summary.d.ts +7 -0
  37. package/dist/cli/analyze-summary.js +37 -0
  38. package/dist/cli/analyze-summary.test.d.ts +1 -0
  39. package/dist/cli/analyze-summary.test.js +58 -0
  40. package/dist/cli/analyze.js +11 -6
  41. package/dist/cli/benchmark-u2-e2e.d.ts +9 -0
  42. package/dist/cli/benchmark-u2-e2e.js +35 -0
  43. package/dist/cli/benchmark-u2-e2e.test.d.ts +1 -0
  44. package/dist/cli/benchmark-u2-e2e.test.js +7 -0
  45. package/dist/cli/index.js +20 -0
  46. package/dist/cli/tool.d.ts +3 -0
  47. package/dist/cli/tool.js +2 -0
  48. package/dist/cli/unity-bindings.d.ts +8 -0
  49. package/dist/cli/unity-bindings.js +33 -0
  50. package/dist/cli/unity-bindings.test.d.ts +1 -0
  51. package/dist/cli/unity-bindings.test.js +24 -0
  52. package/dist/core/graph/types.d.ts +1 -1
  53. package/dist/core/ingestion/pipeline.d.ts +2 -4
  54. package/dist/core/ingestion/pipeline.js +12 -0
  55. package/dist/core/ingestion/unity-resource-processor.d.ts +26 -0
  56. package/dist/core/ingestion/unity-resource-processor.js +363 -0
  57. package/dist/core/ingestion/unity-resource-processor.test.d.ts +1 -0
  58. package/dist/core/ingestion/unity-resource-processor.test.js +599 -0
  59. package/dist/core/kuzu/kuzu-adapter.d.ts +6 -0
  60. package/dist/core/kuzu/kuzu-adapter.js +18 -7
  61. package/dist/core/kuzu/schema.d.ts +2 -2
  62. package/dist/core/kuzu/schema.js +22 -1
  63. package/dist/core/kuzu/schema.test.d.ts +1 -0
  64. package/dist/core/kuzu/schema.test.js +17 -0
  65. package/dist/core/unity/meta-index.d.ts +5 -0
  66. package/dist/core/unity/meta-index.js +113 -0
  67. package/dist/core/unity/meta-index.test.d.ts +1 -0
  68. package/dist/core/unity/meta-index.test.js +11 -0
  69. package/dist/core/unity/options.d.ts +2 -0
  70. package/dist/core/unity/options.js +9 -0
  71. package/dist/core/unity/options.test.d.ts +1 -0
  72. package/dist/core/unity/options.test.js +10 -0
  73. package/dist/core/unity/override-merger.d.ts +27 -0
  74. package/dist/core/unity/override-merger.js +35 -0
  75. package/dist/core/unity/override-merger.test.d.ts +1 -0
  76. package/dist/core/unity/override-merger.test.js +47 -0
  77. package/dist/core/unity/resolver.d.ts +79 -0
  78. package/dist/core/unity/resolver.js +384 -0
  79. package/dist/core/unity/resolver.test.d.ts +1 -0
  80. package/dist/core/unity/resolver.test.js +244 -0
  81. package/dist/core/unity/resource-hit-scanner.d.ts +10 -0
  82. package/dist/core/unity/resource-hit-scanner.js +60 -0
  83. package/dist/core/unity/resource-hit-scanner.test.d.ts +1 -0
  84. package/dist/core/unity/resource-hit-scanner.test.js +20 -0
  85. package/dist/core/unity/scan-context.d.ts +23 -0
  86. package/dist/core/unity/scan-context.js +318 -0
  87. package/dist/core/unity/scan-context.test.d.ts +1 -0
  88. package/dist/core/unity/scan-context.test.js +118 -0
  89. package/dist/core/unity/serialized-type-index.d.ts +10 -0
  90. package/dist/core/unity/serialized-type-index.js +105 -0
  91. package/dist/core/unity/serialized-type-index.test.d.ts +1 -0
  92. package/dist/core/unity/serialized-type-index.test.js +34 -0
  93. package/dist/core/unity/u2-thresholds.test.d.ts +1 -0
  94. package/dist/core/unity/u2-thresholds.test.js +71 -0
  95. package/dist/core/unity/yaml-object-graph.d.ts +9 -0
  96. package/dist/core/unity/yaml-object-graph.js +92 -0
  97. package/dist/core/unity/yaml-object-graph.test.d.ts +1 -0
  98. package/dist/core/unity/yaml-object-graph.test.js +49 -0
  99. package/dist/mcp/local/local-backend.js +12 -1
  100. package/dist/mcp/local/unity-enrichment.d.ts +6 -0
  101. package/dist/mcp/local/unity-enrichment.js +91 -0
  102. package/dist/mcp/local/unity-enrichment.test.d.ts +1 -0
  103. package/dist/mcp/local/unity-enrichment.test.js +130 -0
  104. package/dist/mcp/tools.js +12 -0
  105. package/dist/types/pipeline.d.ts +7 -0
  106. package/dist/types/pipeline.js +2 -0
  107. package/hooks/check-release-path-hygiene.mjs +108 -0
  108. package/package.json +14 -7
@@ -0,0 +1,108 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const scriptDir = path.dirname(fileURLToPath(import.meta.url));
6
+ const repoRoot = path.resolve(scriptDir, '..', '..');
7
+
8
+ const FORBIDDEN_ABSOLUTE_PATTERNS = [
9
+ /\/Volumes\/[^"'`\s]*unity-projects\/neonspark/g,
10
+ /\/Users\/[^"'`\s]*unity-projects\/neonspark/g,
11
+ ];
12
+
13
+ const RELEASE_FILES = [
14
+ 'gitnexus/package.json',
15
+ 'benchmarks/u2-e2e/neonspark-full-u2-e2e.config.json',
16
+ ];
17
+
18
+ const RELEASE_DIR_RULES = [
19
+ { root: '.github/workflows', exts: new Set(['.yml', '.yaml']) },
20
+ { root: 'gitnexus/src', exts: new Set(['.ts']) },
21
+ ];
22
+
23
+ function shouldScan(relPath) {
24
+ if (RELEASE_FILES.includes(relPath)) {
25
+ return true;
26
+ }
27
+
28
+ for (const rule of RELEASE_DIR_RULES) {
29
+ if (!relPath.startsWith(`${rule.root}/`)) continue;
30
+ if (relPath.endsWith('.test.ts')) return false;
31
+ if (rule.exts.has(path.extname(relPath))) return true;
32
+ }
33
+
34
+ return false;
35
+ }
36
+
37
+ async function walk(dir) {
38
+ const entries = await fs.readdir(dir, { withFileTypes: true });
39
+ const out = [];
40
+ for (const entry of entries) {
41
+ const fullPath = path.join(dir, entry.name);
42
+ if (entry.isDirectory()) {
43
+ out.push(...(await walk(fullPath)));
44
+ } else if (entry.isFile()) {
45
+ out.push(fullPath);
46
+ }
47
+ }
48
+ return out;
49
+ }
50
+
51
+ async function collectReleaseFiles() {
52
+ const roots = ['.github/workflows', 'gitnexus/src'];
53
+ const fullPaths = [];
54
+ for (const root of roots) {
55
+ const abs = path.join(repoRoot, root);
56
+ try {
57
+ fullPaths.push(...(await walk(abs)));
58
+ } catch (error) {
59
+ const code = error && typeof error === 'object' ? error.code : undefined;
60
+ if (code !== 'ENOENT') throw error;
61
+ }
62
+ }
63
+
64
+ for (const rel of RELEASE_FILES) {
65
+ fullPaths.push(path.join(repoRoot, rel));
66
+ }
67
+
68
+ const dedup = new Map();
69
+ for (const full of fullPaths) {
70
+ const rel = path.relative(repoRoot, full).split(path.sep).join('/');
71
+ if (!shouldScan(rel)) continue;
72
+ dedup.set(rel, full);
73
+ }
74
+ return [...dedup.entries()];
75
+ }
76
+
77
+ async function main() {
78
+ const files = await collectReleaseFiles();
79
+ const hits = [];
80
+
81
+ for (const [relPath, absPath] of files) {
82
+ const content = await fs.readFile(absPath, 'utf-8');
83
+ for (const pattern of FORBIDDEN_ABSOLUTE_PATTERNS) {
84
+ const matched = content.match(pattern);
85
+ if (matched && matched.length > 0) {
86
+ hits.push({ relPath, matched: matched[0], pattern: String(pattern) });
87
+ }
88
+ }
89
+ }
90
+
91
+ if (hits.length > 0) {
92
+ process.stderr.write('Release path hygiene check failed.\n');
93
+ for (const hit of hits) {
94
+ process.stderr.write(
95
+ `- ${hit.relPath}: contains "${hit.matched}" (pattern: ${hit.pattern})\n`,
96
+ );
97
+ }
98
+ process.exitCode = 1;
99
+ return;
100
+ }
101
+
102
+ process.stdout.write('Release path hygiene check passed.\n');
103
+ }
104
+
105
+ main().catch((error) => {
106
+ process.stderr.write(`${error instanceof Error ? error.stack || error.message : String(error)}\n`);
107
+ process.exitCode = 1;
108
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veewo/gitnexus",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
@@ -39,15 +39,22 @@
39
39
  "build": "tsc",
40
40
  "dev": "tsx watch src/cli/index.ts",
41
41
  "prepare": "npm run build",
42
+ "check:release-paths": "node hooks/check-release-path-hygiene.mjs",
43
+ "check:neonspark-target": "node -e \"const p=(process.env.GITNEXUS_NEONSPARK_TARGET_PATH||'').trim();if(!p){console.error('Missing env: GITNEXUS_NEONSPARK_TARGET_PATH');process.exit(1);}\"",
44
+ "check:u2-e2e-target": "node -e \"const p=(process.env.GITNEXUS_U2_E2E_TARGET_PATH||'').trim();if(!p){console.error('Missing env: GITNEXUS_U2_E2E_TARGET_PATH');process.exit(1);}\"",
45
+ "test:unity": "npm run build && node --test dist/core/unity/*.test.js",
46
+ "test:u3:gates": "npm run check:release-paths && npm run build && node --test dist/benchmark/u2-e2e/*.test.js dist/mcp/local/unity-enrichment.test.js dist/core/ingestion/unity-resource-processor.test.js",
42
47
  "test:benchmark": "npm run build && node --test dist/benchmark/*.test.js dist/cli/*.test.js",
43
48
  "benchmark:quick": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/v1 --profile quick --target-path ../benchmarks/fixtures/unity-mini",
44
49
  "benchmark:full": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/v1 --profile full --target-path ../benchmarks/fixtures/unity-mini",
45
- "benchmark:neonspark:full": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v1 --profile full --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v1/sync-manifest.txt",
46
- "benchmark:neonspark:quick": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v1 --profile quick --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v1/sync-manifest.txt",
47
- "benchmark:neonspark:v2:full": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v2 --profile full --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
48
- "benchmark:neonspark:v2:quick": "npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v2 --profile quick --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
49
- "benchmark:agent-context:quick": "npm run build && node dist/cli/index.js benchmark-agent-context ../benchmarks/agent-context/neonspark-refactor-v1 --profile quick --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
50
- "benchmark:agent-context:full": "npm run build && node dist/cli/index.js benchmark-agent-context ../benchmarks/agent-context/neonspark-refactor-v1 --profile full --target-path /Volumes/Shuttle/unity-projects/neonspark --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt"
50
+ "benchmark:neonspark:full": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v1 --profile full --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v1/sync-manifest.txt",
51
+ "benchmark:neonspark:quick": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v1 --profile quick --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v1/sync-manifest.txt",
52
+ "benchmark:neonspark:v2:full": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v2 --profile full --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
53
+ "benchmark:neonspark:v2:quick": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-unity ../benchmarks/unity-baseline/neonspark-v2 --profile quick --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
54
+ "benchmark:agent-context:quick": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-agent-context ../benchmarks/agent-context/neonspark-refactor-v1 --profile quick --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
55
+ "benchmark:agent-context:full": "npm run check:neonspark-target && npm run build && node dist/cli/index.js benchmark-agent-context ../benchmarks/agent-context/neonspark-refactor-v1 --profile full --target-path \"$GITNEXUS_NEONSPARK_TARGET_PATH\" --repo-alias neonspark-v1-subset --scope-manifest ../benchmarks/unity-baseline/neonspark-v2/sync-manifest.txt",
56
+ "benchmark:u2:sample": "npm run build && node dist/benchmark/u2-performance-sampler.js",
57
+ "benchmark:u2:e2e": "npm run check:u2-e2e-target && npm run build && node dist/cli/index.js benchmark-u2-e2e --config ../benchmarks/u2-e2e/neonspark-full-u2-e2e.config.json"
51
58
  },
52
59
  "dependencies": {
53
60
  "@huggingface/transformers": "^3.0.0",