@colbymchenry/codegraph-darwin-arm64 1.3.1 → 1.4.1

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 (86) hide show
  1. package/lib/dist/bin/codegraph.js +45 -4
  2. package/lib/dist/bin/codegraph.js.map +1 -1
  3. package/lib/dist/bin/command-supervision.d.ts +38 -1
  4. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  5. package/lib/dist/bin/command-supervision.js +8 -2
  6. package/lib/dist/bin/command-supervision.js.map +1 -1
  7. package/lib/dist/db/index.d.ts +47 -0
  8. package/lib/dist/db/index.d.ts.map +1 -1
  9. package/lib/dist/db/index.js +114 -12
  10. package/lib/dist/db/index.js.map +1 -1
  11. package/lib/dist/db/migrations.d.ts +1 -1
  12. package/lib/dist/db/migrations.d.ts.map +1 -1
  13. package/lib/dist/db/migrations.js +31 -1
  14. package/lib/dist/db/migrations.js.map +1 -1
  15. package/lib/dist/db/queries.d.ts +40 -3
  16. package/lib/dist/db/queries.d.ts.map +1 -1
  17. package/lib/dist/db/queries.js +114 -7
  18. package/lib/dist/db/queries.js.map +1 -1
  19. package/lib/dist/db/schema.sql +13 -1
  20. package/lib/dist/db/wal-valve.d.ts +106 -0
  21. package/lib/dist/db/wal-valve.d.ts.map +1 -0
  22. package/lib/dist/db/wal-valve.js +208 -0
  23. package/lib/dist/db/wal-valve.js.map +1 -0
  24. package/lib/dist/extraction/grammars.d.ts +16 -1
  25. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  26. package/lib/dist/extraction/grammars.js +85 -43
  27. package/lib/dist/extraction/grammars.js.map +1 -1
  28. package/lib/dist/extraction/index.d.ts +1 -1
  29. package/lib/dist/extraction/index.d.ts.map +1 -1
  30. package/lib/dist/extraction/index.js +97 -10
  31. package/lib/dist/extraction/index.js.map +1 -1
  32. package/lib/dist/extraction/parse-pool.d.ts +27 -1
  33. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  34. package/lib/dist/extraction/parse-pool.js +75 -7
  35. package/lib/dist/extraction/parse-pool.js.map +1 -1
  36. package/lib/dist/extraction/parse-worker.js +9 -2
  37. package/lib/dist/extraction/parse-worker.js.map +1 -1
  38. package/lib/dist/index.d.ts +5 -4
  39. package/lib/dist/index.d.ts.map +1 -1
  40. package/lib/dist/index.js +94 -8
  41. package/lib/dist/index.js.map +1 -1
  42. package/lib/dist/installer/index.d.ts +42 -0
  43. package/lib/dist/installer/index.d.ts.map +1 -1
  44. package/lib/dist/installer/index.js +94 -1
  45. package/lib/dist/installer/index.js.map +1 -1
  46. package/lib/dist/mcp/index.d.ts.map +1 -1
  47. package/lib/dist/mcp/index.js +8 -0
  48. package/lib/dist/mcp/index.js.map +1 -1
  49. package/lib/dist/mcp/liveness-watchdog.d.ts +18 -1
  50. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  51. package/lib/dist/mcp/liveness-watchdog.js +73 -13
  52. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  53. package/lib/dist/mcp/proxy.js +1 -1
  54. package/lib/dist/mcp/proxy.js.map +1 -1
  55. package/lib/dist/mcp/session.d.ts +14 -0
  56. package/lib/dist/mcp/session.d.ts.map +1 -1
  57. package/lib/dist/mcp/session.js +22 -1
  58. package/lib/dist/mcp/session.js.map +1 -1
  59. package/lib/dist/mcp/tools.d.ts.map +1 -1
  60. package/lib/dist/mcp/tools.js +49 -1
  61. package/lib/dist/mcp/tools.js.map +1 -1
  62. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  63. package/lib/dist/resolution/callback-synthesizer.js +59 -8
  64. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  65. package/lib/dist/resolution/index.d.ts +10 -0
  66. package/lib/dist/resolution/index.d.ts.map +1 -1
  67. package/lib/dist/resolution/index.js +95 -22
  68. package/lib/dist/resolution/index.js.map +1 -1
  69. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  70. package/lib/dist/resolution/name-matcher.js +130 -1
  71. package/lib/dist/resolution/name-matcher.js.map +1 -1
  72. package/lib/dist/upgrade/index.d.ts +32 -0
  73. package/lib/dist/upgrade/index.d.ts.map +1 -1
  74. package/lib/dist/upgrade/index.js +162 -14
  75. package/lib/dist/upgrade/index.js.map +1 -1
  76. package/lib/dist/upgrade/remove-binary.d.ts +87 -0
  77. package/lib/dist/upgrade/remove-binary.d.ts.map +1 -0
  78. package/lib/dist/upgrade/remove-binary.js +289 -0
  79. package/lib/dist/upgrade/remove-binary.js.map +1 -0
  80. package/lib/dist/upgrade/update-check.d.ts +92 -0
  81. package/lib/dist/upgrade/update-check.d.ts.map +1 -0
  82. package/lib/dist/upgrade/update-check.js +258 -0
  83. package/lib/dist/upgrade/update-check.js.map +1 -0
  84. package/lib/node_modules/.package-lock.json +1 -1
  85. package/lib/package.json +1 -1
  86. package/package.json +1 -1
@@ -26,6 +26,7 @@ const fs_1 = require("fs");
26
26
  const utils_1 = require("../utils");
27
27
  const generated_detection_1 = require("../extraction/generated-detection");
28
28
  const dynamic_boundaries_1 = require("./dynamic-boundaries");
29
+ const update_check_1 = require("../upgrade/update-check");
29
30
  /**
30
31
  * An expected, recoverable "codegraph can't serve this" condition — most
31
32
  * importantly a project with no index. The dispatch catch converts these to
@@ -2510,6 +2511,38 @@ class ToolHandler {
2510
2511
  const lc = ct.toLowerCase();
2511
2512
  return n.filePath.toLowerCase().includes(lc) || n.qualifiedName.toLowerCase().includes(lc);
2512
2513
  });
2514
+ // NL-stopword guard: this seeding treats every token as "a symbol the
2515
+ // agent named", but explore also takes natural-language questions, whose
2516
+ // ordinary English words collide with real callables — "…check the latest
2517
+ // version…" exact-matched a lone `check()` method, which then earned the
2518
+ // named-FIRST sort tier and displaced the corroborated answer files from
2519
+ // the whole render budget (the agent fell back to Read). A shape-precise
2520
+ // token (camelCase, PascalCase, snake_case, qualified) is an unambiguous
2521
+ // symbol reference and seeds unconditionally; a BARE lowercase word seeds
2522
+ // only where the query corroborates the file — another query token is
2523
+ // itself a symbol defined in that same file (the "check drain fire"
2524
+ // sibling-bag case), which an incidental English-word collision never is.
2525
+ const lcTokens = new Set(tokens.map((x) => x.toLowerCase()));
2526
+ const isPreciseToken = (x) => /[._$]|::|\//.test(x) || /[a-z][A-Z]/.test(x) || /^[A-Z]/.test(x);
2527
+ const fileNameSets = new Map();
2528
+ const coNamedInFile = (t, fp) => {
2529
+ let names = fileNameSets.get(fp);
2530
+ if (!names) {
2531
+ names = new Set();
2532
+ try {
2533
+ for (const n of cg.getNodesInFile(fp))
2534
+ names.add(n.name.toLowerCase());
2535
+ }
2536
+ catch { /* unreadable file entry — treat as uncorroborated */ }
2537
+ fileNameSets.set(fp, names);
2538
+ }
2539
+ const self = t.toLowerCase();
2540
+ for (const o of lcTokens) {
2541
+ if (o !== self && names.has(o))
2542
+ return true;
2543
+ }
2544
+ return false;
2545
+ };
2513
2546
  for (const t of tokens) {
2514
2547
  // Enumerate ALL defs of a bare token via the direct index, not FTS — a
2515
2548
  // 50+-overload name (tokio `poll`) ranks the wanted def (`Harness::poll`)
@@ -2518,9 +2551,17 @@ class ToolHandler {
2518
2551
  // codegraph_node's findSymbolMatches.) Qualified tokens keep findAllSymbols.
2519
2552
  const isQual = /[.\/]|::/.test(t);
2520
2553
  const raw = isQual ? this.findAllSymbols(cg, t).nodes : cg.getNodesByName(t);
2521
- const cands = raw
2554
+ let cands = raw
2522
2555
  .filter((n) => CALLABLE.has(n.kind) && !isTestPath(n.filePath))
2523
2556
  .sort((a, b) => (bodyLines(b) > 1 ? 1 : 0) - (bodyLines(a) > 1 ? 1 : 0) || bodyLines(b) - bodyLines(a));
2557
+ // Bare lowercase words only seed defs their query-siblings corroborate
2558
+ // (see the NL-stopword guard above). Filtering CANDS (not picks) applies
2559
+ // the guard uniformly to both branches below, including the >3-def
2560
+ // single-pick fallback — an uncorroborated bare `run` must not tier its
2561
+ // most-substantive namesake any more than a 1-def `check` may.
2562
+ if (!isPreciseToken(t)) {
2563
+ cands = cands.filter((n) => coNamedInFile(t, n.filePath));
2564
+ }
2524
2565
  // A specific name (<=3 defs) injects all its defs. An overloaded name
2525
2566
  // (`validate` = 10, `request` = 44) would flood the subgraph, so inject
2526
2567
  // only: the overloads whose file/class the query ALSO names (the agent
@@ -3914,6 +3955,13 @@ class ToolHandler {
3914
3955
  lines.push(`**Journal mode:** ⚠ ${journalMode || 'unknown'} — WAL not active, so reads ` +
3915
3956
  `can block on a concurrent write (WAL appears unsupported on this filesystem)`);
3916
3957
  }
3958
+ // A newer release exists (#1243) — status is where users and agents look
3959
+ // when something seems off, so surface the drift here too. Cheap memoized
3960
+ // cache read; absent entirely when up to date or opted out.
3961
+ const updateNotice = (0, update_check_1.getUpdateNotice)();
3962
+ if (updateNotice) {
3963
+ lines.push(`**Update available:** ${updateNotice}`);
3964
+ }
3917
3965
  // Non-zero at rest means a resolution pass was interrupted mid-run, so
3918
3966
  // some files' call/impact edges are missing until the next sync sweeps
3919
3967
  // the leftovers (#1187). Surface it — an agent trusting an incomplete