@colbymchenry/codegraph-win32-arm64 1.4.1 → 1.6.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 +206 -44
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/context/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +101 -25
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +179 -0
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +368 -7
- 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 +25 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +234 -5
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +687 -53
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +16 -3
- 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/directory.d.ts +29 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +52 -0
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +6 -0
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +101 -2
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +138 -3
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +518 -94
- 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 +868 -16
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +47 -20
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +15 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +35 -1
- 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-types.d.ts +2 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +27 -5
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +257 -56
- 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/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/traversal.js +1 -1
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/index.d.ts +36 -2
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +305 -11
- 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 +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +19 -6
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +37 -5
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +22 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +65 -48
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +209 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +5 -5
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +1 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +6 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +54 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +10 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +51 -3
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +9 -6
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +10 -8
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +3 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +45 -3
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +137 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +236 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +24 -0
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +67 -6
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +3 -1
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +6 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +8 -3
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +276 -10
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +2425 -237
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.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 +582 -138
- 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 +287 -167
- 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/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +11 -1
- package/lib/dist/resolution/frameworks/swift.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 +184 -9
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +87 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +731 -134
- 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 +42 -1
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +681 -99
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.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/search/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +57 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +298 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +1 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +13 -3
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +47 -1
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +127 -8
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/types.d.ts +61 -3
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +27 -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 +7 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +18 -5
- package/lib/dist/upgrade/index.js.map +1 -1
- 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
|
@@ -11,7 +11,7 @@ import { Ignore } from 'ignore';
|
|
|
11
11
|
* Progress callback for indexing operations
|
|
12
12
|
*/
|
|
13
13
|
export interface IndexProgress {
|
|
14
|
-
phase: 'scanning' | 'parsing' | 'storing' | 'resolving';
|
|
14
|
+
phase: 'scanning' | 'parsing' | 'storing' | 'resolving' | 'linking';
|
|
15
15
|
current: number;
|
|
16
16
|
total: number;
|
|
17
17
|
currentFile?: string;
|
|
@@ -48,6 +48,20 @@ export interface SyncResult {
|
|
|
48
48
|
nodesUpdated: number;
|
|
49
49
|
durationMs: number;
|
|
50
50
|
changedFilePaths?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Symbol names whose set of definitions this sync CHANGED — names the synced
|
|
53
|
+
* files gained or lost, as the symmetric difference of their `file\0name`
|
|
54
|
+
* definition pairs before and after the store phase (per file, so a name
|
|
55
|
+
* moving between two changed files does not cancel itself out).
|
|
56
|
+
* Resolution picks among all same-named definitions project-wide,
|
|
57
|
+
* so these are exactly the names whose already-resolved edges — in files this
|
|
58
|
+
* sync never touched — may now bind elsewhere and must be re-resolved for the
|
|
59
|
+
* index to stay convergent with a full rebuild (CG-33).
|
|
60
|
+
*
|
|
61
|
+
* A body-only edit leaves this empty, which is the common case and costs
|
|
62
|
+
* nothing downstream.
|
|
63
|
+
*/
|
|
64
|
+
definitionDelta?: string[];
|
|
51
65
|
}
|
|
52
66
|
/**
|
|
53
67
|
* Calculate SHA256 hash of file contents
|
|
@@ -147,6 +161,31 @@ export declare function discoverEmbeddedRepoRoots(rootDir: string): string[];
|
|
|
147
161
|
* on a giant ignored tree.
|
|
148
162
|
*/
|
|
149
163
|
export declare function findUnindexedIgnoredRepos(rootDir: string): string[];
|
|
164
|
+
/**
|
|
165
|
+
* Result of git-based change detection.
|
|
166
|
+
* Returns null when git is unavailable (non-git project or command failure),
|
|
167
|
+
* signaling the caller to fall back to full filesystem scan.
|
|
168
|
+
*/
|
|
169
|
+
interface GitChanges {
|
|
170
|
+
modified: string[];
|
|
171
|
+
added: string[];
|
|
172
|
+
deleted: string[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Use `git status` to detect changed files instead of scanning every file.
|
|
176
|
+
* Returns null on failure so callers fall back to full scan.
|
|
177
|
+
*
|
|
178
|
+
* Recurses into embedded repos — the untracked kind (#193: the parent's status
|
|
179
|
+
* collapses them to an opaque `?? subdir/` entry) always, and the gitignored
|
|
180
|
+
* kind (#514: they never appear in the parent's status at all) only for
|
|
181
|
+
* directories opted in via `codegraph.json` `includeIgnored` (#622, #699) —
|
|
182
|
+
* running `git status` inside each, so changes in a multi-repo workspace sync
|
|
183
|
+
* without a full rescan. By default a gitignored dir is left alone, matching the
|
|
184
|
+
* full-index scan (#970, #976). Deleting an ENTIRE embedded repo dir is the one
|
|
185
|
+
* case this cannot see (the child status that would report the deletions is gone
|
|
186
|
+
* with it); a full `codegraph index` reconciles that.
|
|
187
|
+
*/
|
|
188
|
+
export declare function getGitChangedFiles(rootDir: string): GitChanges | null;
|
|
150
189
|
/**
|
|
151
190
|
* Recursively scan a directory for source files.
|
|
152
191
|
*
|
|
@@ -173,7 +212,28 @@ export declare class ExtractionOrchestrator {
|
|
|
173
212
|
* hasn't run yet so single-file re-index paths can detect on the spot.
|
|
174
213
|
*/
|
|
175
214
|
private detectedFrameworkNames;
|
|
215
|
+
/**
|
|
216
|
+
* Scope matcher for SCOPED syncs, memoized on the mtimes of the two root
|
|
217
|
+
* files it is derived from (`codegraph.json`, `.gitignore`). See
|
|
218
|
+
* {@link scopedSyncMatcher}.
|
|
219
|
+
*/
|
|
220
|
+
private scopedMatcher;
|
|
176
221
|
constructor(rootDir: string, queries: QueryBuilder);
|
|
222
|
+
/**
|
|
223
|
+
* The scope matcher a scoped sync applies to the paths it was handed — the
|
|
224
|
+
* same `buildScopeIgnore` the full scan uses, so an explicitly-passed path
|
|
225
|
+
* that is OUT of scope (a user `exclude` in `codegraph.json`, a `.gitignore`
|
|
226
|
+
* rule, a built-in default) is treated exactly as the full walk would treat
|
|
227
|
+
* it: absent, hence removed if tracked, never parsed (#1590).
|
|
228
|
+
*
|
|
229
|
+
* Memoized on the root config + root `.gitignore` mtimes: building the
|
|
230
|
+
* matcher runs embedded-repo discovery (`git ls-files`), which would defeat
|
|
231
|
+
* the scoped path's whole point (skipping O(repo) work) if paid per sync.
|
|
232
|
+
* Two `stat`s per sync while nothing changed. An embedded repo created
|
|
233
|
+
* between config edits joins the scoped matcher on the next full sync, the
|
|
234
|
+
* same lifecycle the watcher's own matcher already has.
|
|
235
|
+
*/
|
|
236
|
+
private scopedSyncMatcher;
|
|
177
237
|
/**
|
|
178
238
|
* Build a filesystem-backed ResolutionContext sufficient for framework
|
|
179
239
|
* detection. Graph-query methods (getNodesByName etc.) return empty because
|
|
@@ -190,7 +250,10 @@ export declare class ExtractionOrchestrator {
|
|
|
190
250
|
/**
|
|
191
251
|
* Index all files in the project
|
|
192
252
|
*/
|
|
193
|
-
indexAll(onProgress?: (progress: IndexProgress) => void, signal?: AbortSignal, verbose?: boolean, walBackpressure?: () => Promise<void> | null
|
|
253
|
+
indexAll(onProgress?: (progress: IndexProgress) => void, signal?: AbortSignal, verbose?: boolean, walBackpressure?: () => Promise<void> | null, storeWriterOpts?: {
|
|
254
|
+
dbPath: string;
|
|
255
|
+
fastInit: boolean;
|
|
256
|
+
} | null): Promise<IndexResult>;
|
|
194
257
|
/**
|
|
195
258
|
* Index specific files
|
|
196
259
|
*/
|
|
@@ -207,7 +270,69 @@ export declare class ExtractionOrchestrator {
|
|
|
207
270
|
/**
|
|
208
271
|
* Store extraction result in database
|
|
209
272
|
*/
|
|
273
|
+
/**
|
|
274
|
+
* Delete file rows recorded with ZERO nodes so their files re-index.
|
|
275
|
+
*
|
|
276
|
+
* No extraction path stores an empty, error-free result for a
|
|
277
|
+
* symbol-bearing language — even an empty file keeps its file node — so a
|
|
278
|
+
* zero-node row is a wiped one (#1541: an interrupted parse's retry stored
|
|
279
|
+
* an undecoded kernel transport). The wiped row's content hash matches the
|
|
280
|
+
* on-disk bytes, so every hash-based reconcile skips the file forever;
|
|
281
|
+
* deleting the row lets the normal add path repair it. File-level-only
|
|
282
|
+
* languages (yaml, twig, properties) are left alone. Deleting a zero-node
|
|
283
|
+
* row cascades nothing: it has no nodes, so no edges or refs either.
|
|
284
|
+
*/
|
|
285
|
+
private healZeroNodeRows;
|
|
210
286
|
private storeExtractionResult;
|
|
287
|
+
/**
|
|
288
|
+
* Build one file's store bundle for the FRESH-DB path: no existing-file
|
|
289
|
+
* check, no cross-file edge snapshot (both are re-index concerns — a fresh
|
|
290
|
+
* database has neither). Filters mirror storeExtractionResult exactly.
|
|
291
|
+
*/
|
|
292
|
+
/** The FileRecord for a fresh-index store (nodeCount is the PRE-filter count). */
|
|
293
|
+
private buildFileRecord;
|
|
294
|
+
private buildFreshStoreBundle;
|
|
295
|
+
/**
|
|
296
|
+
* Re-attach cross-file incoming edges snapshotted before a re-index delete
|
|
297
|
+
* (#899): re-resolve each edge's target to the re-indexed node's new id by
|
|
298
|
+
* (kind, name); targets that vanished are resurrected as their original
|
|
299
|
+
* unresolved ref (#1240's removal-side counterpart) when the edge carries
|
|
300
|
+
* its refName stamp.
|
|
301
|
+
*/
|
|
302
|
+
private reattachCrossFileEdges;
|
|
303
|
+
/**
|
|
304
|
+
* Re-open, for re-resolution, every resolution edge whose answer this sync
|
|
305
|
+
* may have changed — the fix for index drift (CG-33).
|
|
306
|
+
*
|
|
307
|
+
* Incremental sync re-resolves only the references IN the changed files, but
|
|
308
|
+
* resolution's answer is a function of the WHOLE graph: a reference binds to
|
|
309
|
+
* one of the same-named definitions project-wide, so adding or removing a
|
|
310
|
+
* definition of `pct` can change which `pct` every other file's `pct(...)`
|
|
311
|
+
* should bind to. Those other files are never revisited, and their references
|
|
312
|
+
* resolved successfully once and were deleted from `unresolved_refs`, so
|
|
313
|
+
* nothing existed to revisit them with — the index kept an answer that was
|
|
314
|
+
* correct against an older graph. Measured on codegraph's own long-lived
|
|
315
|
+
* index: 4.3% of distinct edges differed from a clean rebuild, in BOTH
|
|
316
|
+
* directions, overwhelmingly `calls`. See docs/benchmarks/index-drift-cg33.md.
|
|
317
|
+
*
|
|
318
|
+
* This deletes each affected edge and re-inserts it as the reference that
|
|
319
|
+
* created it (the refName/refKind stamp), status='pending', for the sync's
|
|
320
|
+
* resolution sweep to bind against the post-sync graph — the same input a
|
|
321
|
+
* full rebuild resolves from, which is what makes the two converge.
|
|
322
|
+
*
|
|
323
|
+
* Deliberately conservative in three ways, because a wrong deletion is a
|
|
324
|
+
* permanent edge loss while a missed rebind is only residual drift:
|
|
325
|
+
* - an edge with no refName stamp (synthesized, or built by an engine older
|
|
326
|
+
* than the stamp) is left ALONE rather than reconstructed from the target's
|
|
327
|
+
* plain name, same rule as `resurrectRefFromDroppedEdge`;
|
|
328
|
+
* - edges whose source is in a file this sync already re-extracted are
|
|
329
|
+
* skipped — their references were re-resolved from scratch moments ago;
|
|
330
|
+
* - very common names are skipped by the per-name ceiling in
|
|
331
|
+
* `getResolutionEdgesByTargetName`.
|
|
332
|
+
*
|
|
333
|
+
* Returns the number of references resurrected.
|
|
334
|
+
*/
|
|
335
|
+
resurrectStaleResolutionEdges(definitionDelta: string[], changedFilePaths: string[]): number;
|
|
211
336
|
/**
|
|
212
337
|
* Sync the index with the current file state.
|
|
213
338
|
*
|
|
@@ -216,7 +341,17 @@ export declare class ExtractionOrchestrator {
|
|
|
216
341
|
* changes. This works in non-git projects and catches committed changes from
|
|
217
342
|
* `git pull`/`checkout`/`merge`/`rebase` that `git status` cannot see.
|
|
218
343
|
*/
|
|
219
|
-
sync(onProgress?: (progress: IndexProgress) => void
|
|
344
|
+
sync(onProgress?: (progress: IndexProgress) => void,
|
|
345
|
+
/**
|
|
346
|
+
* Watcher fast path: the exact project-relative paths the OS reported as
|
|
347
|
+
* changed. When provided, reconciliation runs over ONLY these paths —
|
|
348
|
+
* per-path logic identical to the full walk (stat pre-filter, hash
|
|
349
|
+
* confirm, the #1240 removal/resurrection flow) — skipping the O(repo)
|
|
350
|
+
* scan and tracked-load. Callers must pass undefined whenever the change
|
|
351
|
+
* set is not exactly known (directory removals, event overflow): the full
|
|
352
|
+
* scan-diff remains the ground truth those cases need (#1285).
|
|
353
|
+
*/
|
|
354
|
+
scopedPaths?: string[]): Promise<SyncResult>;
|
|
220
355
|
/**
|
|
221
356
|
* Get files that have changed since last index.
|
|
222
357
|
* Uses git status as a fast path when available, falling back to full scan.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extraction/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAMzB,OAAO,EAGL,gBAAgB,EAChB,eAAe,
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