@neuralsea/workspace-indexer 0.3.2 → 0.3.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.
@@ -3362,8 +3362,8 @@ var Neo4jGraphStore = class {
3362
3362
  const stmts = [
3363
3363
  `CREATE CONSTRAINT ${Repo}_repo_id IF NOT EXISTS FOR (r:${Repo}) REQUIRE r.repo_id IS UNIQUE`,
3364
3364
  `CREATE CONSTRAINT ${Symbol}_id IF NOT EXISTS FOR (s:${Symbol}) REQUIRE s.id IS UNIQUE`,
3365
- `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE (e.repo_id, e.kind, e.value) IS NODE KEY`,
3366
- `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE (f.repo_id, f.path) IS NODE KEY`
3365
+ `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE e.key IS UNIQUE`,
3366
+ `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE f.key IS UNIQUE`
3367
3367
  ];
3368
3368
  for (const q of stmts) {
3369
3369
  try {
@@ -3489,10 +3489,18 @@ var Neo4jGraphStore = class {
3489
3489
  await s.run(
3490
3490
  `MERGE (r:${Repo} {repo_id:$repoId})
3491
3491
  SET r.repo_root=$repoRoot, r.commit=$commit, r.branch=$branch, r.updated_at=timestamp()
3492
- MERGE (f:${File} {repo_id:$repoId, path:$path})
3493
- SET f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
3492
+ MERGE (f:${File} {key:$fileKey})
3493
+ SET f.repo_id=$repoId, f.path=$path, f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
3494
3494
  MERGE (r)-[:HAS_FILE]->(f)`,
3495
- { repoId: update.repoId, repoRoot: update.repoRoot, commit: update.commit, branch: update.branch, path: update.path, language: update.language }
3495
+ {
3496
+ repoId: update.repoId,
3497
+ repoRoot: update.repoRoot,
3498
+ commit: update.commit,
3499
+ branch: update.branch,
3500
+ path: update.path,
3501
+ language: update.language,
3502
+ fileKey: `${update.repoId}:${update.path}`
3503
+ }
3496
3504
  );
3497
3505
  const fileEdges = [
3498
3506
  ...update.imports.map((v) => ({ kind: "import", value: v })),
@@ -3502,9 +3510,14 @@ var Neo4jGraphStore = class {
3502
3510
  await s.run(
3503
3511
  `MATCH (f:${File} {repo_id:$repoId, path:$path})
3504
3512
  UNWIND $edges AS e
3505
- MERGE (x:${External} {repo_id:$repoId, kind:e.kind, value:e.value})
3513
+ MERGE (x:${External} {key:e.key})
3514
+ SET x.repo_id=$repoId, x.kind=e.kind, x.value=e.value
3506
3515
  MERGE (f)-[:FILE_EDGE {kind:e.kind}]->(x)`,
3507
- { repoId: update.repoId, path: update.path, edges: fileEdges }
3516
+ {
3517
+ repoId: update.repoId,
3518
+ path: update.path,
3519
+ edges: fileEdges.map((e) => ({ ...e, key: `${update.repoId}:${e.kind}:${e.value}` }))
3520
+ }
3508
3521
  ).catch(() => void 0);
3509
3522
  await s.run(
3510
3523
  `MATCH (f:${File} {repo_id:$repoId, path:$path})-[r:FILE_EDGE]->(x:${External})
package/dist/cli.cjs CHANGED
@@ -3375,8 +3375,8 @@ var Neo4jGraphStore = class {
3375
3375
  const stmts = [
3376
3376
  `CREATE CONSTRAINT ${Repo}_repo_id IF NOT EXISTS FOR (r:${Repo}) REQUIRE r.repo_id IS UNIQUE`,
3377
3377
  `CREATE CONSTRAINT ${Symbol2}_id IF NOT EXISTS FOR (s:${Symbol2}) REQUIRE s.id IS UNIQUE`,
3378
- `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE (e.repo_id, e.kind, e.value) IS NODE KEY`,
3379
- `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE (f.repo_id, f.path) IS NODE KEY`
3378
+ `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE e.key IS UNIQUE`,
3379
+ `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE f.key IS UNIQUE`
3380
3380
  ];
3381
3381
  for (const q of stmts) {
3382
3382
  try {
@@ -3502,10 +3502,18 @@ var Neo4jGraphStore = class {
3502
3502
  await s.run(
3503
3503
  `MERGE (r:${Repo} {repo_id:$repoId})
3504
3504
  SET r.repo_root=$repoRoot, r.commit=$commit, r.branch=$branch, r.updated_at=timestamp()
3505
- MERGE (f:${File} {repo_id:$repoId, path:$path})
3506
- SET f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
3505
+ MERGE (f:${File} {key:$fileKey})
3506
+ SET f.repo_id=$repoId, f.path=$path, f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
3507
3507
  MERGE (r)-[:HAS_FILE]->(f)`,
3508
- { repoId: update.repoId, repoRoot: update.repoRoot, commit: update.commit, branch: update.branch, path: update.path, language: update.language }
3508
+ {
3509
+ repoId: update.repoId,
3510
+ repoRoot: update.repoRoot,
3511
+ commit: update.commit,
3512
+ branch: update.branch,
3513
+ path: update.path,
3514
+ language: update.language,
3515
+ fileKey: `${update.repoId}:${update.path}`
3516
+ }
3509
3517
  );
3510
3518
  const fileEdges = [
3511
3519
  ...update.imports.map((v) => ({ kind: "import", value: v })),
@@ -3515,9 +3523,14 @@ var Neo4jGraphStore = class {
3515
3523
  await s.run(
3516
3524
  `MATCH (f:${File} {repo_id:$repoId, path:$path})
3517
3525
  UNWIND $edges AS e
3518
- MERGE (x:${External} {repo_id:$repoId, kind:e.kind, value:e.value})
3526
+ MERGE (x:${External} {key:e.key})
3527
+ SET x.repo_id=$repoId, x.kind=e.kind, x.value=e.value
3519
3528
  MERGE (f)-[:FILE_EDGE {kind:e.kind}]->(x)`,
3520
- { repoId: update.repoId, path: update.path, edges: fileEdges }
3529
+ {
3530
+ repoId: update.repoId,
3531
+ path: update.path,
3532
+ edges: fileEdges.map((e) => ({ ...e, key: `${update.repoId}:${e.kind}:${e.value}` }))
3533
+ }
3521
3534
  ).catch(() => void 0);
3522
3535
  await s.run(
3523
3536
  `MATCH (f:${File} {repo_id:$repoId, path:$path})-[r:FILE_EDGE]->(x:${External})
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  OpenAIEmbeddingsProvider,
6
6
  WorkspaceIndexer,
7
7
  loadConfigFile
8
- } from "./chunk-GGL3XTMV.js";
8
+ } from "./chunk-IXKSW7IX.js";
9
9
 
10
10
  // src/cli.ts
11
11
  import yargs from "yargs";
package/dist/index.cjs CHANGED
@@ -2325,8 +2325,8 @@ var Neo4jGraphStore = class {
2325
2325
  const stmts = [
2326
2326
  `CREATE CONSTRAINT ${Repo}_repo_id IF NOT EXISTS FOR (r:${Repo}) REQUIRE r.repo_id IS UNIQUE`,
2327
2327
  `CREATE CONSTRAINT ${Symbol2}_id IF NOT EXISTS FOR (s:${Symbol2}) REQUIRE s.id IS UNIQUE`,
2328
- `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE (e.repo_id, e.kind, e.value) IS NODE KEY`,
2329
- `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE (f.repo_id, f.path) IS NODE KEY`
2328
+ `CREATE CONSTRAINT ${External}_key IF NOT EXISTS FOR (e:${External}) REQUIRE e.key IS UNIQUE`,
2329
+ `CREATE CONSTRAINT ${File}_key IF NOT EXISTS FOR (f:${File}) REQUIRE f.key IS UNIQUE`
2330
2330
  ];
2331
2331
  for (const q of stmts) {
2332
2332
  try {
@@ -2452,10 +2452,18 @@ var Neo4jGraphStore = class {
2452
2452
  await s.run(
2453
2453
  `MERGE (r:${Repo} {repo_id:$repoId})
2454
2454
  SET r.repo_root=$repoRoot, r.commit=$commit, r.branch=$branch, r.updated_at=timestamp()
2455
- MERGE (f:${File} {repo_id:$repoId, path:$path})
2456
- SET f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
2455
+ MERGE (f:${File} {key:$fileKey})
2456
+ SET f.repo_id=$repoId, f.path=$path, f.repo_root=$repoRoot, f.language=$language, f.updated_at=timestamp()
2457
2457
  MERGE (r)-[:HAS_FILE]->(f)`,
2458
- { repoId: update.repoId, repoRoot: update.repoRoot, commit: update.commit, branch: update.branch, path: update.path, language: update.language }
2458
+ {
2459
+ repoId: update.repoId,
2460
+ repoRoot: update.repoRoot,
2461
+ commit: update.commit,
2462
+ branch: update.branch,
2463
+ path: update.path,
2464
+ language: update.language,
2465
+ fileKey: `${update.repoId}:${update.path}`
2466
+ }
2459
2467
  );
2460
2468
  const fileEdges = [
2461
2469
  ...update.imports.map((v) => ({ kind: "import", value: v })),
@@ -2465,9 +2473,14 @@ var Neo4jGraphStore = class {
2465
2473
  await s.run(
2466
2474
  `MATCH (f:${File} {repo_id:$repoId, path:$path})
2467
2475
  UNWIND $edges AS e
2468
- MERGE (x:${External} {repo_id:$repoId, kind:e.kind, value:e.value})
2476
+ MERGE (x:${External} {key:e.key})
2477
+ SET x.repo_id=$repoId, x.kind=e.kind, x.value=e.value
2469
2478
  MERGE (f)-[:FILE_EDGE {kind:e.kind}]->(x)`,
2470
- { repoId: update.repoId, path: update.path, edges: fileEdges }
2479
+ {
2480
+ repoId: update.repoId,
2481
+ path: update.path,
2482
+ edges: fileEdges.map((e) => ({ ...e, key: `${update.repoId}:${e.kind}:${e.value}` }))
2483
+ }
2471
2484
  ).catch(() => void 0);
2472
2485
  await s.run(
2473
2486
  `MATCH (f:${File} {repo_id:$repoId, path:$path})-[r:FILE_EDGE]->(x:${External})
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  mergeIndexerConfig,
28
28
  pickRepoOverride,
29
29
  stableSymbolId
30
- } from "./chunk-GGL3XTMV.js";
30
+ } from "./chunk-IXKSW7IX.js";
31
31
 
32
32
  // src/symbolGraph/vscodeProvider.ts
33
33
  import path2 from "path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralsea/workspace-indexer",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Local-first multi-repo workspace indexer (semantic embeddings + git-aware incremental updates + hybrid retrieval profiles) for AI agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",