@saluzi/codegraph 0.1.0 → 0.2.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.
Files changed (246) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +885 -0
  3. package/package.json +42 -10
  4. package/scripts/add-lang/bench.sh +60 -0
  5. package/scripts/add-lang/check-grammar.mjs +75 -0
  6. package/scripts/add-lang/dump-ast.mjs +103 -0
  7. package/scripts/add-lang/verify-extraction.mjs +70 -0
  8. package/scripts/agent-eval/ab-adoption.sh +91 -0
  9. package/scripts/agent-eval/ab-hook.sh +86 -0
  10. package/scripts/agent-eval/ab-impl.sh +78 -0
  11. package/scripts/agent-eval/ab-new-vs-baseline.sh +102 -0
  12. package/scripts/agent-eval/ab-sufficiency.sh +78 -0
  13. package/scripts/agent-eval/arms-F.sh +21 -0
  14. package/scripts/agent-eval/arms-matrix.sh +37 -0
  15. package/scripts/agent-eval/audit.sh +68 -0
  16. package/scripts/agent-eval/bench-readme.sh +28 -0
  17. package/scripts/agent-eval/bench-why-repo.sh +22 -0
  18. package/scripts/agent-eval/block-read-hook.sh +19 -0
  19. package/scripts/agent-eval/hook-settings.json +15 -0
  20. package/scripts/agent-eval/itrun.sh +120 -0
  21. package/scripts/agent-eval/offload-eval-3arm.sh +72 -0
  22. package/scripts/agent-eval/offload-eval-cost.mjs +133 -0
  23. package/scripts/agent-eval/offload-eval-effort.mjs +108 -0
  24. package/scripts/agent-eval/offload-eval-frontload-matrix.sh +25 -0
  25. package/scripts/agent-eval/offload-eval-frontload.sh +47 -0
  26. package/scripts/agent-eval/offload-eval-ground-truth.json +18 -0
  27. package/scripts/agent-eval/offload-eval-hook.mjs +84 -0
  28. package/scripts/agent-eval/offload-eval-judge.mjs +103 -0
  29. package/scripts/agent-eval/offload-eval-matrix.sh +20 -0
  30. package/scripts/agent-eval/offload-eval-metrics.mjs +94 -0
  31. package/scripts/agent-eval/offload-eval-refs1.sh +50 -0
  32. package/scripts/agent-eval/offload-eval-setup.sh +24 -0
  33. package/scripts/agent-eval/offload-eval-styles.sh +72 -0
  34. package/scripts/agent-eval/offload-eval-summarize.mjs +68 -0
  35. package/scripts/agent-eval/offload-eval.md +76 -0
  36. package/scripts/agent-eval/parse-arms.mjs +116 -0
  37. package/scripts/agent-eval/parse-bench-readme.mjs +84 -0
  38. package/scripts/agent-eval/parse-run.mjs +45 -0
  39. package/scripts/agent-eval/parse-session.mjs +93 -0
  40. package/scripts/agent-eval/probe-context.mjs +21 -0
  41. package/scripts/agent-eval/probe-explore.mjs +40 -0
  42. package/scripts/agent-eval/probe-node.mjs +20 -0
  43. package/scripts/agent-eval/probe-sweep.mjs +119 -0
  44. package/scripts/agent-eval/probe-trace.mjs +20 -0
  45. package/scripts/agent-eval/redirect-read-hook.sh +38 -0
  46. package/scripts/agent-eval/repro-concurrent-explore.mjs +119 -0
  47. package/scripts/agent-eval/repro-daemon-clients.mjs +125 -0
  48. package/scripts/agent-eval/run-agent.sh +34 -0
  49. package/scripts/agent-eval/run-all.sh +75 -0
  50. package/scripts/agent-eval/run-arms.sh +56 -0
  51. package/scripts/agent-eval/seq-matrix.mjs +137 -0
  52. package/scripts/build-bundle.sh +123 -0
  53. package/scripts/extract-release-notes.mjs +130 -0
  54. package/scripts/local-install.sh +41 -0
  55. package/scripts/npm-sdk.js +75 -0
  56. package/scripts/npm-shim.js +275 -0
  57. package/scripts/pack-npm.sh +119 -0
  58. package/scripts/prepare-release.mjs +270 -0
  59. package/dist/bin/codegraph.d.ts +0 -25
  60. package/dist/bin/node-version-check.d.ts +0 -37
  61. package/dist/bin/uninstall.d.ts +0 -14
  62. package/dist/context/formatter.d.ts +0 -33
  63. package/dist/context/formatter.js +0 -244
  64. package/dist/context/index.d.ts +0 -117
  65. package/dist/context/index.js +0 -1050
  66. package/dist/db/index.d.ts +0 -101
  67. package/dist/db/index.js +0 -250
  68. package/dist/db/migrations.d.ts +0 -47
  69. package/dist/db/migrations.js +0 -131
  70. package/dist/db/queries.d.ts +0 -291
  71. package/dist/db/queries.js +0 -1349
  72. package/dist/db/schema.sql +0 -151
  73. package/dist/db/sqlite-adapter.d.ts +0 -49
  74. package/dist/db/sqlite-adapter.js +0 -141
  75. package/dist/directory.d.ts +0 -62
  76. package/dist/directory.js +0 -264
  77. package/dist/errors.d.ts +0 -149
  78. package/dist/errors.js +0 -219
  79. package/dist/extraction/dfm-extractor.d.ts +0 -31
  80. package/dist/extraction/dfm-extractor.js +0 -151
  81. package/dist/extraction/grammars.d.ts +0 -94
  82. package/dist/extraction/grammars.js +0 -357
  83. package/dist/extraction/index.d.ts +0 -148
  84. package/dist/extraction/index.js +0 -1286
  85. package/dist/extraction/languages/c-cpp.d.ts +0 -4
  86. package/dist/extraction/languages/c-cpp.js +0 -126
  87. package/dist/extraction/languages/csharp.d.ts +0 -3
  88. package/dist/extraction/languages/csharp.js +0 -72
  89. package/dist/extraction/languages/dart.d.ts +0 -3
  90. package/dist/extraction/languages/dart.js +0 -192
  91. package/dist/extraction/languages/go.d.ts +0 -3
  92. package/dist/extraction/languages/go.js +0 -58
  93. package/dist/extraction/languages/index.d.ts +0 -10
  94. package/dist/extraction/languages/index.js +0 -49
  95. package/dist/extraction/languages/java.d.ts +0 -3
  96. package/dist/extraction/languages/java.js +0 -64
  97. package/dist/extraction/languages/javascript.d.ts +0 -3
  98. package/dist/extraction/languages/javascript.js +0 -90
  99. package/dist/extraction/languages/kotlin.d.ts +0 -3
  100. package/dist/extraction/languages/kotlin.js +0 -253
  101. package/dist/extraction/languages/lua.d.ts +0 -3
  102. package/dist/extraction/languages/lua.js +0 -150
  103. package/dist/extraction/languages/luau.d.ts +0 -3
  104. package/dist/extraction/languages/luau.js +0 -37
  105. package/dist/extraction/languages/pascal.d.ts +0 -3
  106. package/dist/extraction/languages/pascal.js +0 -66
  107. package/dist/extraction/languages/php.d.ts +0 -3
  108. package/dist/extraction/languages/php.js +0 -107
  109. package/dist/extraction/languages/python.d.ts +0 -3
  110. package/dist/extraction/languages/python.js +0 -56
  111. package/dist/extraction/languages/ruby.d.ts +0 -3
  112. package/dist/extraction/languages/ruby.js +0 -114
  113. package/dist/extraction/languages/rust.d.ts +0 -3
  114. package/dist/extraction/languages/rust.js +0 -109
  115. package/dist/extraction/languages/scala.d.ts +0 -3
  116. package/dist/extraction/languages/scala.js +0 -139
  117. package/dist/extraction/languages/swift.d.ts +0 -3
  118. package/dist/extraction/languages/swift.js +0 -91
  119. package/dist/extraction/languages/typescript.d.ts +0 -3
  120. package/dist/extraction/languages/typescript.js +0 -129
  121. package/dist/extraction/liquid-extractor.d.ts +0 -52
  122. package/dist/extraction/liquid-extractor.js +0 -313
  123. package/dist/extraction/parse-worker.d.ts +0 -8
  124. package/dist/extraction/parse-worker.js +0 -94
  125. package/dist/extraction/svelte-extractor.d.ts +0 -56
  126. package/dist/extraction/svelte-extractor.js +0 -272
  127. package/dist/extraction/tree-sitter-helpers.d.ts +0 -39
  128. package/dist/extraction/tree-sitter-helpers.js +0 -103
  129. package/dist/extraction/tree-sitter-types.d.ts +0 -191
  130. package/dist/extraction/tree-sitter-types.js +0 -10
  131. package/dist/extraction/tree-sitter.d.ts +0 -238
  132. package/dist/extraction/tree-sitter.js +0 -2430
  133. package/dist/extraction/vue-extractor.d.ts +0 -36
  134. package/dist/extraction/vue-extractor.js +0 -163
  135. package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  136. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  137. package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  138. package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  139. package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  140. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  141. package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  142. package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  143. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  144. package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  145. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  146. package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  147. package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  148. package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  149. package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  150. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  151. package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  152. package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  153. package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  154. package/dist/extraction/wasm-runtime-flags.d.ts +0 -46
  155. package/dist/extraction/wasm-runtime-flags.js +0 -105
  156. package/dist/graph/index.d.ts +0 -8
  157. package/dist/graph/index.js +0 -13
  158. package/dist/graph/queries.d.ts +0 -109
  159. package/dist/graph/queries.js +0 -366
  160. package/dist/graph/traversal.d.ts +0 -137
  161. package/dist/graph/traversal.js +0 -528
  162. package/dist/index.d.ts +0 -509
  163. package/dist/index.js +0 -800
  164. package/dist/installer/claude-md-template.d.ts +0 -19
  165. package/dist/installer/config-writer.d.ts +0 -29
  166. package/dist/installer/index.d.ts +0 -140
  167. package/dist/installer/instructions-template.d.ts +0 -30
  168. package/dist/installer/targets/claude.d.ts +0 -55
  169. package/dist/installer/targets/codex.d.ts +0 -18
  170. package/dist/installer/targets/cursor.d.ts +0 -35
  171. package/dist/installer/targets/hermes.d.ts +0 -18
  172. package/dist/installer/targets/opencode.d.ts +0 -30
  173. package/dist/installer/targets/registry.d.ts +0 -38
  174. package/dist/installer/targets/shared.d.ts +0 -92
  175. package/dist/installer/targets/toml.d.ts +0 -64
  176. package/dist/installer/targets/types.d.ts +0 -122
  177. package/dist/mcp/index.d.ts +0 -98
  178. package/dist/mcp/server-instructions.d.ts +0 -20
  179. package/dist/mcp/tools.d.ts +0 -269
  180. package/dist/mcp/transport.d.ts +0 -117
  181. package/dist/resolution/frameworks/cargo-workspace.d.ts +0 -20
  182. package/dist/resolution/frameworks/cargo-workspace.js +0 -225
  183. package/dist/resolution/frameworks/csharp.d.ts +0 -8
  184. package/dist/resolution/frameworks/csharp.js +0 -213
  185. package/dist/resolution/frameworks/drupal.d.ts +0 -51
  186. package/dist/resolution/frameworks/drupal.js +0 -335
  187. package/dist/resolution/frameworks/express.d.ts +0 -8
  188. package/dist/resolution/frameworks/express.js +0 -225
  189. package/dist/resolution/frameworks/go.d.ts +0 -8
  190. package/dist/resolution/frameworks/go.js +0 -158
  191. package/dist/resolution/frameworks/index.d.ts +0 -52
  192. package/dist/resolution/frameworks/index.js +0 -137
  193. package/dist/resolution/frameworks/java.d.ts +0 -8
  194. package/dist/resolution/frameworks/java.js +0 -177
  195. package/dist/resolution/frameworks/laravel.d.ts +0 -13
  196. package/dist/resolution/frameworks/laravel.js +0 -248
  197. package/dist/resolution/frameworks/nestjs.d.ts +0 -26
  198. package/dist/resolution/frameworks/nestjs.js +0 -374
  199. package/dist/resolution/frameworks/python.d.ts +0 -10
  200. package/dist/resolution/frameworks/python.js +0 -278
  201. package/dist/resolution/frameworks/react.d.ts +0 -8
  202. package/dist/resolution/frameworks/react.js +0 -272
  203. package/dist/resolution/frameworks/ruby.d.ts +0 -8
  204. package/dist/resolution/frameworks/ruby.js +0 -198
  205. package/dist/resolution/frameworks/rust.d.ts +0 -8
  206. package/dist/resolution/frameworks/rust.js +0 -207
  207. package/dist/resolution/frameworks/svelte.d.ts +0 -9
  208. package/dist/resolution/frameworks/svelte.js +0 -249
  209. package/dist/resolution/frameworks/swift.d.ts +0 -10
  210. package/dist/resolution/frameworks/swift.js +0 -376
  211. package/dist/resolution/frameworks/vue.d.ts +0 -9
  212. package/dist/resolution/frameworks/vue.js +0 -306
  213. package/dist/resolution/import-resolver.d.ts +0 -61
  214. package/dist/resolution/import-resolver.js +0 -663
  215. package/dist/resolution/index.d.ts +0 -118
  216. package/dist/resolution/index.js +0 -744
  217. package/dist/resolution/lru-cache.d.ts +0 -24
  218. package/dist/resolution/lru-cache.js +0 -62
  219. package/dist/resolution/name-matcher.d.ts +0 -50
  220. package/dist/resolution/name-matcher.js +0 -384
  221. package/dist/resolution/path-aliases.d.ts +0 -72
  222. package/dist/resolution/path-aliases.js +0 -238
  223. package/dist/resolution/strip-comments.d.ts +0 -40
  224. package/dist/resolution/strip-comments.js +0 -441
  225. package/dist/resolution/types.d.ts +0 -181
  226. package/dist/resolution/types.js +0 -8
  227. package/dist/search/query-parser.d.ts +0 -61
  228. package/dist/search/query-parser.js +0 -177
  229. package/dist/search/query-utils.d.ts +0 -59
  230. package/dist/search/query-utils.js +0 -383
  231. package/dist/sync/git-hooks.d.ts +0 -54
  232. package/dist/sync/git-hooks.js +0 -223
  233. package/dist/sync/index.d.ts +0 -25
  234. package/dist/sync/index.js +0 -28
  235. package/dist/sync/watch-policy.d.ts +0 -51
  236. package/dist/sync/watch-policy.js +0 -124
  237. package/dist/sync/watcher.d.ts +0 -83
  238. package/dist/sync/watcher.js +0 -192
  239. package/dist/types.d.ts +0 -433
  240. package/dist/types.js +0 -75
  241. package/dist/ui/glyphs.d.ts +0 -42
  242. package/dist/ui/shimmer-progress.d.ts +0 -11
  243. package/dist/ui/shimmer-worker.d.ts +0 -2
  244. package/dist/ui/types.d.ts +0 -20
  245. package/dist/utils.d.ts +0 -231
  246. package/dist/utils.js +0 -549
@@ -1,291 +0,0 @@
1
- /**
2
- * Database Queries
3
- *
4
- * Prepared statements for CRUD operations on the knowledge graph.
5
- */
6
- import { SqliteDatabase } from './sqlite-adapter'
7
- import {
8
- Node,
9
- Edge,
10
- FileRecord,
11
- UnresolvedReference,
12
- NodeKind,
13
- EdgeKind,
14
- GraphStats,
15
- SearchOptions,
16
- SearchResult,
17
- } from '../types'
18
- /**
19
- * Query builder for the knowledge graph database
20
- */
21
- export declare class QueryBuilder {
22
- private db
23
- private nodeCache
24
- private readonly maxCacheSize
25
- private stmts
26
- constructor(db: SqliteDatabase)
27
- /**
28
- * Insert a new node
29
- */
30
- insertNode(node: Node): void
31
- /**
32
- * Insert multiple nodes in a transaction
33
- */
34
- insertNodes(nodes: Node[]): void
35
- /**
36
- * Update an existing node
37
- */
38
- updateNode(node: Node): void
39
- /**
40
- * Delete a node by ID
41
- */
42
- deleteNode(id: string): void
43
- /**
44
- * Delete all nodes for a file
45
- */
46
- deleteNodesByFile(filePath: string): void
47
- /**
48
- * Get a node by ID
49
- */
50
- getNodeById(id: string): Node | null
51
- /**
52
- * Batch lookup: fetch many nodes by ID in a single SQL round-trip.
53
- *
54
- * Replaces the N+1 pattern in graph traversal where every edge would
55
- * trigger its own `getNodeById` call. For a function with 50 callers
56
- * this collapses 50 point reads into one IN-list query (~10-50x
57
- * faster end-to-end).
58
- *
59
- * Returns a Map keyed by id so callers can preserve their own ordering
60
- * (typically the order edges were returned from the graph). Missing IDs
61
- * are simply absent from the map.
62
- *
63
- * Cache-aware: ids already in the LRU cache are served from memory and
64
- * the SQL query only touches the misses.
65
- */
66
- getNodesByIds(ids: readonly string[]): Map<string, Node>
67
- /**
68
- * Add a node to the cache, evicting oldest if needed
69
- */
70
- private cacheNode
71
- /**
72
- * Clear the node cache
73
- */
74
- clearCache(): void
75
- /**
76
- * Get all nodes in a file
77
- */
78
- getNodesByFile(filePath: string): Node[]
79
- /**
80
- * Get all nodes of a specific kind
81
- */
82
- getNodesByKind(kind: NodeKind): Node[]
83
- /**
84
- * Get all nodes in the database
85
- */
86
- getAllNodes(): Node[]
87
- /**
88
- * Get nodes by exact name match (uses idx_nodes_name index)
89
- */
90
- getNodesByName(name: string): Node[]
91
- /**
92
- * Get nodes by exact qualified name match (uses idx_nodes_qualified_name index)
93
- */
94
- getNodesByQualifiedNameExact(qualifiedName: string): Node[]
95
- /**
96
- * Get nodes by lowercase name match (uses idx_nodes_lower_name expression index)
97
- */
98
- getNodesByLowerName(lowerName: string): Node[]
99
- /**
100
- * Search nodes by name using FTS with fallback to LIKE for better matching
101
- *
102
- * Search strategy:
103
- * 1. Try FTS5 prefix match (query*) for word-start matching
104
- * 2. If no results, try LIKE for substring matching (e.g., "signIn" finds "signInWithGoogle")
105
- * 3. Score results based on match quality
106
- */
107
- searchNodes(query: string, options?: SearchOptions): SearchResult[]
108
- /**
109
- * Match-everything path used when the user supplied only field
110
- * filters (`kind:function lang:typescript`) with no text. Returns
111
- * candidates ordered by name; the caller's filter pass narrows to
112
- * what was asked for.
113
- */
114
- private searchAllByFilters
115
- /**
116
- * Fuzzy fallback: when zero FTS/LIKE hits, try an edit-distance
117
- * sweep over the distinct symbol-name set. Caps `maxDist` at 2 so
118
- * `getUssr` finds `getUser` but `process` doesn't match `prosody`.
119
- * Bounded edit distance keeps each comparison cheap; the per-query
120
- * scan is O(distinct-name-count) which is far smaller than total
121
- * node count on any real codebase.
122
- */
123
- private searchNodesFuzzy
124
- /**
125
- * FTS5 search with prefix matching
126
- */
127
- private searchNodesFTS
128
- /**
129
- * LIKE-based substring search for cases where FTS doesn't match
130
- * Useful for camelCase matching (e.g., "signIn" finds "signInWithGoogle")
131
- */
132
- private searchNodesLike
133
- /**
134
- * Find nodes by exact name match
135
- *
136
- * Used for hybrid search - looks up symbols by exact name or case-insensitive match.
137
- * Returns high-confidence matches for known symbol names extracted from query.
138
- *
139
- * @param names - Array of symbol names to look up
140
- * @param options - Search options (kinds, languages, limit)
141
- * @returns SearchResult array with exact matches scored at 1.0
142
- */
143
- findNodesByExactName(names: string[], options?: SearchOptions): SearchResult[]
144
- /**
145
- * Find nodes whose name contains a substring (LIKE-based).
146
- * Useful for CamelCase-part matching where FTS fails because
147
- * e.g. "TransportSearchAction" is one FTS token, not matchable by "Search"*.
148
- *
149
- * Results are ordered by name length (shorter = more likely to be the core type).
150
- */
151
- findNodesByNameSubstring(
152
- substring: string,
153
- options?: SearchOptions & {
154
- excludePrefix?: boolean
155
- },
156
- ): SearchResult[]
157
- /**
158
- * Insert a new edge
159
- */
160
- insertEdge(edge: Edge): void
161
- /**
162
- * Insert multiple edges in a transaction
163
- */
164
- insertEdges(edges: Edge[]): void
165
- /**
166
- * Delete all edges from a source node
167
- */
168
- deleteEdgesBySource(sourceId: string): void
169
- /**
170
- * Get outgoing edges from a node
171
- */
172
- getOutgoingEdges(
173
- sourceId: string,
174
- kinds?: EdgeKind[],
175
- provenance?: string,
176
- ): Edge[]
177
- /**
178
- * Get incoming edges to a node
179
- */
180
- getIncomingEdges(targetId: string, kinds?: EdgeKind[]): Edge[]
181
- /**
182
- * Find all edges where both source and target are in the given node set.
183
- * Useful for recovering inter-node connectivity after BFS.
184
- */
185
- findEdgesBetweenNodes(nodeIds: string[], kinds?: EdgeKind[]): Edge[]
186
- /**
187
- * Insert or update a file record
188
- */
189
- upsertFile(file: FileRecord): void
190
- /**
191
- * Delete a file record and its nodes
192
- */
193
- deleteFile(filePath: string): void
194
- /**
195
- * Get a file record by path
196
- */
197
- getFileByPath(filePath: string): FileRecord | null
198
- /**
199
- * Get all tracked files
200
- */
201
- getAllFiles(): FileRecord[]
202
- /**
203
- * Get files that need re-indexing (hash changed)
204
- */
205
- getStaleFiles(currentHashes: Map<string, string>): FileRecord[]
206
- /**
207
- * Insert an unresolved reference
208
- */
209
- insertUnresolvedRef(ref: UnresolvedReference): void
210
- /**
211
- * Insert multiple unresolved references in a transaction
212
- */
213
- insertUnresolvedRefsBatch(refs: UnresolvedReference[]): void
214
- /**
215
- * Delete unresolved references from a node
216
- */
217
- deleteUnresolvedByNode(nodeId: string): void
218
- /**
219
- * Get unresolved references by name (for resolution)
220
- */
221
- getUnresolvedByName(name: string): UnresolvedReference[]
222
- /**
223
- * Get all unresolved references
224
- */
225
- getUnresolvedReferences(): UnresolvedReference[]
226
- /**
227
- * Get the count of unresolved references without loading them into memory
228
- */
229
- getUnresolvedReferencesCount(): number
230
- /**
231
- * Get a batch of unresolved references using LIMIT/OFFSET pagination.
232
- * Used to process references in bounded memory chunks.
233
- */
234
- getUnresolvedReferencesBatch(
235
- offset: number,
236
- limit: number,
237
- ): UnresolvedReference[]
238
- /**
239
- * Get all tracked file paths (lightweight — no full FileRecord objects)
240
- */
241
- getAllFilePaths(): string[]
242
- /**
243
- * Get all distinct node names (lightweight — just name strings for pre-filtering)
244
- */
245
- getAllNodeNames(): string[]
246
- /**
247
- * Get unresolved references scoped to specific file paths.
248
- * Uses the idx_unresolved_file_path index for efficient lookup.
249
- */
250
- getUnresolvedReferencesByFiles(filePaths: string[]): UnresolvedReference[]
251
- /**
252
- * Delete all unresolved references (after resolution)
253
- */
254
- clearUnresolvedReferences(): void
255
- /**
256
- * Delete resolved references by their IDs
257
- */
258
- deleteResolvedReferences(fromNodeIds: string[]): void
259
- /**
260
- * Delete specific resolved references by (fromNodeId, referenceName, referenceKind) tuples.
261
- * More precise than deleteResolvedReferences — only removes refs that were actually resolved.
262
- */
263
- deleteSpecificResolvedReferences(
264
- refs: Array<{
265
- fromNodeId: string
266
- referenceName: string
267
- referenceKind: string
268
- }>,
269
- ): void
270
- /**
271
- * Get graph statistics
272
- */
273
- getStats(): GraphStats
274
- /**
275
- * Get a metadata value by key
276
- */
277
- getMetadata(key: string): string | null
278
- /**
279
- * Set a metadata key-value pair (upsert)
280
- */
281
- setMetadata(key: string, value: string): void
282
- /**
283
- * Get all metadata as a key-value record
284
- */
285
- getAllMetadata(): Record<string, string>
286
- /**
287
- * Clear all data from the database
288
- */
289
- clear(): void
290
- }
291
- //# sourceMappingURL=queries.d.ts.map