@colbymchenry/codegraph-win32-arm64 1.4.0 → 1.5.0
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/bin/codegraph.cmd +1 -1
- package/lib/dist/bin/codegraph.js +106 -19
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +38 -1
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +8 -2
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +41 -11
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +142 -0
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +267 -6
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +31 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +113 -4
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +398 -24
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +13 -1
- package/lib/dist/db/sqlite-adapter.d.ts +3 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +22 -4
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/wal-valve.d.ts +15 -2
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +88 -6
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +63 -0
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +32 -3
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +313 -56
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.d.ts +9 -0
- package/lib/dist/extraction/kernel/decode.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/decode.js +162 -0
- package/lib/dist/extraction/kernel/decode.js.map +1 -0
- package/lib/dist/extraction/kernel/index.d.ts +64 -0
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/index.js +279 -0
- package/lib/dist/extraction/kernel/index.js.map +1 -0
- package/lib/dist/extraction/kernel/layout.d.ts +101 -0
- package/lib/dist/extraction/kernel/layout.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/layout.js +104 -0
- package/lib/dist/extraction/kernel/layout.js.map +1 -0
- package/lib/dist/extraction/kernel/loader.d.ts +103 -0
- package/lib/dist/extraction/kernel/loader.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/loader.js +146 -0
- package/lib/dist/extraction/kernel/loader.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +14 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +849 -12
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +8 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +15 -0
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +35 -1
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +24 -0
- package/lib/dist/extraction/store-worker.d.ts.map +1 -0
- package/lib/dist/extraction/store-worker.js +139 -0
- package/lib/dist/extraction/store-worker.js.map +1 -0
- package/lib/dist/extraction/store-writer.d.ts +63 -0
- package/lib/dist/extraction/store-writer.d.ts.map +1 -0
- package/lib/dist/extraction/store-writer.js +174 -0
- package/lib/dist/extraction/store-writer.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +22 -4
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +151 -6
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +27 -3
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/index.d.ts +19 -6
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +233 -17
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.d.ts +54 -0
- package/lib/dist/installer/beta-signup.d.ts.map +1 -0
- package/lib/dist/installer/beta-signup.js +178 -0
- package/lib/dist/installer/beta-signup.js.map +1 -0
- package/lib/dist/installer/index.d.ts +42 -0
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +105 -1
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +8 -0
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +18 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +73 -13
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/proxy.js +1 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +14 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +22 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +76 -1
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +574 -132
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +54 -10
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +249 -157
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cooperative-yield.d.ts +10 -2
- package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -1
- package/lib/dist/resolution/cooperative-yield.js +6 -4
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +29 -6
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +2 -3
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +166 -7
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +97 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +783 -124
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/memory-budget.d.ts +48 -0
- package/lib/dist/resolution/memory-budget.d.ts.map +1 -0
- package/lib/dist/resolution/memory-budget.js +162 -0
- package/lib/dist/resolution/memory-budget.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +12 -1
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +517 -96
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +106 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -0
- package/lib/dist/resolution/resolver-pool.js +344 -0
- package/lib/dist/resolution/resolver-pool.js.map +1 -0
- package/lib/dist/resolution/resolver-worker.d.ts +17 -0
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -0
- package/lib/dist/resolution/resolver-worker.js +141 -0
- package/lib/dist/resolution/resolver-worker.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +3 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/sync/watcher.d.ts +25 -1
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +76 -3
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/types.d.ts +41 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +26 -1
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.d.ts +21 -0
- package/lib/dist/ui/color.d.ts.map +1 -0
- package/lib/dist/ui/color.js +42 -0
- package/lib/dist/ui/color.js.map +1 -0
- package/lib/dist/ui/glyphs.d.ts +35 -10
- package/lib/dist/ui/glyphs.d.ts.map +1 -1
- package/lib/dist/ui/glyphs.js +59 -12
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.d.ts.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +78 -4
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +25 -17
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui/types.d.ts +0 -2
- package/lib/dist/ui/types.d.ts.map +1 -1
- package/lib/dist/upgrade/index.d.ts +39 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +180 -19
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.d.ts +87 -0
- package/lib/dist/upgrade/remove-binary.d.ts.map +1 -0
- package/lib/dist/upgrade/remove-binary.js +289 -0
- package/lib/dist/upgrade/remove-binary.js.map +1 -0
- package/lib/dist/upgrade/update-check.d.ts +92 -0
- package/lib/dist/upgrade/update-check.d.ts.map +1 -0
- package/lib/dist/upgrade/update-check.js +258 -0
- package/lib/dist/upgrade/update-check.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +0 -0
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +6 -1
- package/package.json +6 -2
package/lib/dist/mcp/tools.js
CHANGED
|
@@ -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,44 @@ 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
|
-
|
|
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
|
+
// Field-name seeding fallback (#1196): a camelCase token that names NO
|
|
2558
|
+
// definition of its own is usually an object-literal key / API field
|
|
2559
|
+
// (`profileInfo`) — no node exists, so it contributed zero seeds and
|
|
2560
|
+
// the files that DEFINE it (`getProfileInfoV2` in profileController)
|
|
2561
|
+
// never surfaced. Seed its camel-infix definers instead: callables
|
|
2562
|
+
// whose name contains the token at a hump boundary or as a prefix.
|
|
2563
|
+
// Exact-empty + camel-shaped only (bare words keep the NL-stopword
|
|
2564
|
+
// guard below), shortest-first, capped so a hot infix can't flood.
|
|
2565
|
+
if (cands.length === 0 && !isQual && /[a-z][A-Z]/.test(t)) {
|
|
2566
|
+
const lcToken = t.toLowerCase();
|
|
2567
|
+
cands = cg
|
|
2568
|
+
.getNodesByNameSubstring(t, {
|
|
2569
|
+
kinds: ['function', 'method', 'component'],
|
|
2570
|
+
limit: 60,
|
|
2571
|
+
})
|
|
2572
|
+
.filter((n) => CALLABLE.has(n.kind) && !isTestPath(n.filePath))
|
|
2573
|
+
.filter((n) => {
|
|
2574
|
+
const idx = n.name.toLowerCase().indexOf(lcToken);
|
|
2575
|
+
if (idx < 0)
|
|
2576
|
+
return false;
|
|
2577
|
+
if (idx === 0)
|
|
2578
|
+
return n.name.length > t.length; // prefix definer
|
|
2579
|
+
return /[A-Z]/.test(n.name.charAt(idx)); // camel-hump boundary
|
|
2580
|
+
})
|
|
2581
|
+
.sort((a, b) => a.name.length - b.name.length)
|
|
2582
|
+
.slice(0, 3);
|
|
2583
|
+
}
|
|
2584
|
+
// Bare lowercase words only seed defs their query-siblings corroborate
|
|
2585
|
+
// (see the NL-stopword guard above). Filtering CANDS (not picks) applies
|
|
2586
|
+
// the guard uniformly to both branches below, including the >3-def
|
|
2587
|
+
// single-pick fallback — an uncorroborated bare `run` must not tier its
|
|
2588
|
+
// most-substantive namesake any more than a 1-def `check` may.
|
|
2589
|
+
if (!isPreciseToken(t)) {
|
|
2590
|
+
cands = cands.filter((n) => coNamedInFile(t, n.filePath));
|
|
2591
|
+
}
|
|
2524
2592
|
// A specific name (<=3 defs) injects all its defs. An overloaded name
|
|
2525
2593
|
// (`validate` = 10, `request` = 44) would flood the subgraph, so inject
|
|
2526
2594
|
// only: the overloads whose file/class the query ALSO names (the agent
|
|
@@ -3914,6 +3982,13 @@ class ToolHandler {
|
|
|
3914
3982
|
lines.push(`**Journal mode:** ⚠ ${journalMode || 'unknown'} — WAL not active, so reads ` +
|
|
3915
3983
|
`can block on a concurrent write (WAL appears unsupported on this filesystem)`);
|
|
3916
3984
|
}
|
|
3985
|
+
// A newer release exists (#1243) — status is where users and agents look
|
|
3986
|
+
// when something seems off, so surface the drift here too. Cheap memoized
|
|
3987
|
+
// cache read; absent entirely when up to date or opted out.
|
|
3988
|
+
const updateNotice = (0, update_check_1.getUpdateNotice)();
|
|
3989
|
+
if (updateNotice) {
|
|
3990
|
+
lines.push(`**Update available:** ${updateNotice}`);
|
|
3991
|
+
}
|
|
3917
3992
|
// Non-zero at rest means a resolution pass was interrupted mid-run, so
|
|
3918
3993
|
// some files' call/impact edges are missing until the next sync sweeps
|
|
3919
3994
|
// the leftovers (#1187). Surface it — an agent trusting an incomplete
|