@aroman22/codegraph-vba-darwin-arm64 1.5.2 → 1.6.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 (335) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/bin/codegraph.d.ts +1 -1
  3. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  4. package/lib/dist/bin/codegraph.js +307 -81
  5. package/lib/dist/bin/codegraph.js.map +1 -1
  6. package/lib/dist/bin/command-supervision.d.ts +38 -1
  7. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  8. package/lib/dist/bin/command-supervision.js +22 -3
  9. package/lib/dist/bin/command-supervision.js.map +1 -1
  10. package/lib/dist/db/index.d.ts +84 -5
  11. package/lib/dist/db/index.d.ts.map +1 -1
  12. package/lib/dist/db/index.js +209 -12
  13. package/lib/dist/db/index.js.map +1 -1
  14. package/lib/dist/db/migrations.d.ts +1 -1
  15. package/lib/dist/db/migrations.d.ts.map +1 -1
  16. package/lib/dist/db/migrations.js +80 -3
  17. package/lib/dist/db/migrations.js.map +1 -1
  18. package/lib/dist/db/queries.d.ts +116 -4
  19. package/lib/dist/db/queries.d.ts.map +1 -1
  20. package/lib/dist/db/queries.js +294 -7
  21. package/lib/dist/db/queries.js.map +1 -1
  22. package/lib/dist/db/schema.sql +43 -1
  23. package/lib/dist/db/wal-valve.d.ts +106 -0
  24. package/lib/dist/db/wal-valve.d.ts.map +1 -0
  25. package/lib/dist/db/wal-valve.js +208 -0
  26. package/lib/dist/db/wal-valve.js.map +1 -0
  27. package/lib/dist/directory.d.ts +9 -5
  28. package/lib/dist/directory.d.ts.map +1 -1
  29. package/lib/dist/directory.js +210 -19
  30. package/lib/dist/directory.js.map +1 -1
  31. package/lib/dist/extraction/cfml-extractor.d.ts +107 -0
  32. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -0
  33. package/lib/dist/extraction/cfml-extractor.js +494 -0
  34. package/lib/dist/extraction/cfml-extractor.js.map +1 -0
  35. package/lib/dist/extraction/grammars.d.ts +25 -1
  36. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  37. package/lib/dist/extraction/grammars.js +177 -23
  38. package/lib/dist/extraction/grammars.js.map +1 -1
  39. package/lib/dist/extraction/index.d.ts +47 -2
  40. package/lib/dist/extraction/index.d.ts.map +1 -1
  41. package/lib/dist/extraction/index.js +568 -51
  42. package/lib/dist/extraction/index.js.map +1 -1
  43. package/lib/dist/extraction/languages/arkts.d.ts +3 -0
  44. package/lib/dist/extraction/languages/arkts.d.ts.map +1 -0
  45. package/lib/dist/extraction/languages/arkts.js +127 -0
  46. package/lib/dist/extraction/languages/arkts.js.map +1 -0
  47. package/lib/dist/extraction/languages/c-cpp.d.ts +98 -0
  48. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  49. package/lib/dist/extraction/languages/c-cpp.js +563 -1
  50. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  51. package/lib/dist/extraction/languages/cfquery.d.ts +12 -0
  52. package/lib/dist/extraction/languages/cfquery.d.ts.map +1 -0
  53. package/lib/dist/extraction/languages/cfquery.js +28 -0
  54. package/lib/dist/extraction/languages/cfquery.js.map +1 -0
  55. package/lib/dist/extraction/languages/cfscript.d.ts +3 -0
  56. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -0
  57. package/lib/dist/extraction/languages/cfscript.js +73 -0
  58. package/lib/dist/extraction/languages/cfscript.js.map +1 -0
  59. package/lib/dist/extraction/languages/cobol.d.ts +33 -0
  60. package/lib/dist/extraction/languages/cobol.d.ts.map +1 -0
  61. package/lib/dist/extraction/languages/cobol.js +499 -0
  62. package/lib/dist/extraction/languages/cobol.js.map +1 -0
  63. package/lib/dist/extraction/languages/erlang.d.ts +3 -0
  64. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -0
  65. package/lib/dist/extraction/languages/erlang.js +350 -0
  66. package/lib/dist/extraction/languages/erlang.js.map +1 -0
  67. package/lib/dist/extraction/languages/index.d.ts.map +1 -1
  68. package/lib/dist/extraction/languages/index.js +18 -0
  69. package/lib/dist/extraction/languages/index.js.map +1 -1
  70. package/lib/dist/extraction/languages/nix.d.ts +3 -0
  71. package/lib/dist/extraction/languages/nix.d.ts.map +1 -0
  72. package/lib/dist/extraction/languages/nix.js +294 -0
  73. package/lib/dist/extraction/languages/nix.js.map +1 -0
  74. package/lib/dist/extraction/languages/solidity.d.ts +3 -0
  75. package/lib/dist/extraction/languages/solidity.d.ts.map +1 -0
  76. package/lib/dist/extraction/languages/solidity.js +293 -0
  77. package/lib/dist/extraction/languages/solidity.js.map +1 -0
  78. package/lib/dist/extraction/languages/terraform.d.ts +3 -0
  79. package/lib/dist/extraction/languages/terraform.d.ts.map +1 -0
  80. package/lib/dist/extraction/languages/terraform.js +641 -0
  81. package/lib/dist/extraction/languages/terraform.js.map +1 -0
  82. package/lib/dist/extraction/languages/vbnet.d.ts +11 -0
  83. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -0
  84. package/lib/dist/extraction/languages/vbnet.js +141 -0
  85. package/lib/dist/extraction/languages/vbnet.js.map +1 -0
  86. package/lib/dist/extraction/mybatis-extractor.d.ts +30 -10
  87. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  88. package/lib/dist/extraction/mybatis-extractor.js +140 -38
  89. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  90. package/lib/dist/extraction/parse-pool.d.ts +28 -1
  91. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  92. package/lib/dist/extraction/parse-pool.js +76 -7
  93. package/lib/dist/extraction/parse-pool.js.map +1 -1
  94. package/lib/dist/extraction/parse-worker.js +11 -4
  95. package/lib/dist/extraction/parse-worker.js.map +1 -1
  96. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  97. package/lib/dist/extraction/tree-sitter-helpers.js +1 -0
  98. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  99. package/lib/dist/extraction/tree-sitter-types.d.ts +20 -1
  100. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  101. package/lib/dist/extraction/tree-sitter.d.ts +60 -1
  102. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  103. package/lib/dist/extraction/tree-sitter.js +905 -20
  104. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  105. package/lib/dist/extraction/vba/call-sweep.d.ts +3 -0
  106. package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -0
  107. package/lib/dist/extraction/vba/call-sweep.js +206 -0
  108. package/lib/dist/extraction/vba/call-sweep.js.map +1 -0
  109. package/lib/dist/extraction/vba/calls.d.ts +55 -0
  110. package/lib/dist/extraction/vba/calls.d.ts.map +1 -0
  111. package/lib/dist/extraction/vba/calls.js +439 -0
  112. package/lib/dist/extraction/vba/calls.js.map +1 -0
  113. package/lib/dist/extraction/vba/constants.d.ts +42 -0
  114. package/lib/dist/extraction/vba/constants.d.ts.map +1 -0
  115. package/lib/dist/extraction/vba/constants.js +112 -0
  116. package/lib/dist/extraction/vba/constants.js.map +1 -0
  117. package/lib/dist/extraction/vba/context.d.ts +175 -0
  118. package/lib/dist/extraction/vba/context.d.ts.map +1 -0
  119. package/lib/dist/extraction/vba/context.js +268 -0
  120. package/lib/dist/extraction/vba/context.js.map +1 -0
  121. package/lib/dist/extraction/vba/controls.d.ts +24 -0
  122. package/lib/dist/extraction/vba/controls.d.ts.map +1 -0
  123. package/lib/dist/extraction/vba/controls.js +89 -0
  124. package/lib/dist/extraction/vba/controls.js.map +1 -0
  125. package/lib/dist/extraction/vba/declarations.d.ts +3 -0
  126. package/lib/dist/extraction/vba/declarations.d.ts.map +1 -0
  127. package/lib/dist/extraction/vba/declarations.js +154 -0
  128. package/lib/dist/extraction/vba/declarations.js.map +1 -0
  129. package/lib/dist/extraction/vba/dims.d.ts +3 -0
  130. package/lib/dist/extraction/vba/dims.d.ts.map +1 -0
  131. package/lib/dist/extraction/vba/dims.js +186 -0
  132. package/lib/dist/extraction/vba/dims.js.map +1 -0
  133. package/lib/dist/extraction/vba/docmd.d.ts +16 -0
  134. package/lib/dist/extraction/vba/docmd.d.ts.map +1 -0
  135. package/lib/dist/extraction/vba/docmd.js +179 -0
  136. package/lib/dist/extraction/vba/docmd.js.map +1 -0
  137. package/lib/dist/extraction/vba/enums-consts.d.ts +15 -0
  138. package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -0
  139. package/lib/dist/extraction/vba/enums-consts.js +178 -0
  140. package/lib/dist/extraction/vba/enums-consts.js.map +1 -0
  141. package/lib/dist/extraction/vba/implements.d.ts +3 -0
  142. package/lib/dist/extraction/vba/implements.d.ts.map +1 -0
  143. package/lib/dist/extraction/vba/implements.js +52 -0
  144. package/lib/dist/extraction/vba/implements.js.map +1 -0
  145. package/lib/dist/extraction/vba/procedures.d.ts +3 -0
  146. package/lib/dist/extraction/vba/procedures.d.ts.map +1 -0
  147. package/lib/dist/extraction/vba/procedures.js +239 -0
  148. package/lib/dist/extraction/vba/procedures.js.map +1 -0
  149. package/lib/dist/extraction/vba/sql-wrapper.d.ts +17 -0
  150. package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -0
  151. package/lib/dist/extraction/vba/sql-wrapper.js +212 -0
  152. package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -0
  153. package/lib/dist/extraction/vba/tempvars.d.ts +10 -0
  154. package/lib/dist/extraction/vba/tempvars.d.ts.map +1 -0
  155. package/lib/dist/extraction/vba/tempvars.js +138 -0
  156. package/lib/dist/extraction/vba/tempvars.js.map +1 -0
  157. package/lib/dist/extraction/vba/text-utils.d.ts +73 -0
  158. package/lib/dist/extraction/vba/text-utils.d.ts.map +1 -0
  159. package/lib/dist/extraction/vba/text-utils.js +195 -0
  160. package/lib/dist/extraction/vba/text-utils.js.map +1 -0
  161. package/lib/dist/extraction/vba-extractor.d.ts +3 -951
  162. package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
  163. package/lib/dist/extraction/vba-extractor.js +46 -2934
  164. package/lib/dist/extraction/vba-extractor.js.map +1 -1
  165. package/lib/dist/extraction/vba-preprocess.d.ts +1 -1
  166. package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
  167. package/lib/dist/extraction/vba-preprocess.js +300 -88
  168. package/lib/dist/extraction/vba-preprocess.js.map +1 -1
  169. package/lib/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
  170. package/lib/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  171. package/lib/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  172. package/lib/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  173. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  174. package/lib/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  175. package/lib/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  176. package/lib/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
  177. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  178. package/lib/dist/graph/traversal.d.ts.map +1 -1
  179. package/lib/dist/graph/traversal.js +76 -17
  180. package/lib/dist/graph/traversal.js.map +1 -1
  181. package/lib/dist/index.d.ts +81 -1
  182. package/lib/dist/index.d.ts.map +1 -1
  183. package/lib/dist/index.js +460 -10
  184. package/lib/dist/index.js.map +1 -1
  185. package/lib/dist/installer/index.d.ts +42 -0
  186. package/lib/dist/installer/index.d.ts.map +1 -1
  187. package/lib/dist/installer/index.js +97 -2
  188. package/lib/dist/installer/index.js.map +1 -1
  189. package/lib/dist/mcp/daemon.d.ts +35 -3
  190. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  191. package/lib/dist/mcp/daemon.js +101 -9
  192. package/lib/dist/mcp/daemon.js.map +1 -1
  193. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  194. package/lib/dist/mcp/dynamic-boundaries.js +2 -1
  195. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  196. package/lib/dist/mcp/early-ppid.d.ts +26 -0
  197. package/lib/dist/mcp/early-ppid.d.ts.map +1 -0
  198. package/lib/dist/mcp/early-ppid.js +29 -0
  199. package/lib/dist/mcp/early-ppid.js.map +1 -0
  200. package/lib/dist/mcp/index.d.ts.map +1 -1
  201. package/lib/dist/mcp/index.js +29 -4
  202. package/lib/dist/mcp/index.js.map +1 -1
  203. package/lib/dist/mcp/liveness-watchdog.d.ts +18 -1
  204. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  205. package/lib/dist/mcp/liveness-watchdog.js +73 -13
  206. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  207. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  208. package/lib/dist/mcp/proxy.js +30 -4
  209. package/lib/dist/mcp/proxy.js.map +1 -1
  210. package/lib/dist/mcp/query-pool.d.ts +14 -0
  211. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  212. package/lib/dist/mcp/query-pool.js +18 -0
  213. package/lib/dist/mcp/query-pool.js.map +1 -1
  214. package/lib/dist/mcp/session.d.ts +14 -0
  215. package/lib/dist/mcp/session.d.ts.map +1 -1
  216. package/lib/dist/mcp/session.js +28 -1
  217. package/lib/dist/mcp/session.js.map +1 -1
  218. package/lib/dist/mcp/startup-handshake.d.ts +44 -0
  219. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -0
  220. package/lib/dist/mcp/startup-handshake.js +73 -0
  221. package/lib/dist/mcp/startup-handshake.js.map +1 -0
  222. package/lib/dist/mcp/tools.d.ts +22 -0
  223. package/lib/dist/mcp/tools.d.ts.map +1 -1
  224. package/lib/dist/mcp/tools.js +289 -23
  225. package/lib/dist/mcp/tools.js.map +1 -1
  226. package/lib/dist/mcp/transport.d.ts.map +1 -1
  227. package/lib/dist/mcp/transport.js +18 -0
  228. package/lib/dist/mcp/transport.js.map +1 -1
  229. package/lib/dist/project-config.d.ts +44 -0
  230. package/lib/dist/project-config.d.ts.map +1 -1
  231. package/lib/dist/project-config.js +151 -2
  232. package/lib/dist/project-config.js.map +1 -1
  233. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +2 -1
  234. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  235. package/lib/dist/resolution/c-fnptr-synthesizer.js +170 -146
  236. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  237. package/lib/dist/resolution/callback-synthesizer.d.ts +1 -1
  238. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  239. package/lib/dist/resolution/callback-synthesizer.js +1109 -97
  240. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  241. package/lib/dist/resolution/cooperative-yield.d.ts +32 -0
  242. package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -0
  243. package/lib/dist/resolution/cooperative-yield.js +42 -0
  244. package/lib/dist/resolution/cooperative-yield.js.map +1 -0
  245. package/lib/dist/resolution/frameworks/cics.d.ts +20 -0
  246. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -0
  247. package/lib/dist/resolution/frameworks/cics.js +90 -0
  248. package/lib/dist/resolution/frameworks/cics.js.map +1 -0
  249. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  250. package/lib/dist/resolution/frameworks/index.js +6 -0
  251. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  252. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  253. package/lib/dist/resolution/frameworks/java.js +14 -6
  254. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  255. package/lib/dist/resolution/frameworks/terraform.d.ts +38 -0
  256. package/lib/dist/resolution/frameworks/terraform.d.ts.map +1 -0
  257. package/lib/dist/resolution/frameworks/terraform.js +277 -0
  258. package/lib/dist/resolution/frameworks/terraform.js.map +1 -0
  259. package/lib/dist/resolution/goframe-synthesizer.d.ts +2 -1
  260. package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -1
  261. package/lib/dist/resolution/goframe-synthesizer.js +8 -3
  262. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
  263. package/lib/dist/resolution/import-resolver.d.ts +7 -0
  264. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  265. package/lib/dist/resolution/import-resolver.js +129 -4
  266. package/lib/dist/resolution/import-resolver.js.map +1 -1
  267. package/lib/dist/resolution/index.d.ts +64 -2
  268. package/lib/dist/resolution/index.d.ts.map +1 -1
  269. package/lib/dist/resolution/index.js +476 -58
  270. package/lib/dist/resolution/index.js.map +1 -1
  271. package/lib/dist/resolution/name-matcher.d.ts +22 -3
  272. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  273. package/lib/dist/resolution/name-matcher.js +613 -39
  274. package/lib/dist/resolution/name-matcher.js.map +1 -1
  275. package/lib/dist/resolution/strip-comments.d.ts +1 -1
  276. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  277. package/lib/dist/resolution/strip-comments.js +49 -0
  278. package/lib/dist/resolution/strip-comments.js.map +1 -1
  279. package/lib/dist/resolution/types.d.ts +29 -0
  280. package/lib/dist/resolution/types.d.ts.map +1 -1
  281. package/lib/dist/resolution/workspace-packages.d.ts +10 -0
  282. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  283. package/lib/dist/resolution/workspace-packages.js +142 -4
  284. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  285. package/lib/dist/search/identifier-segments.d.ts +60 -0
  286. package/lib/dist/search/identifier-segments.d.ts.map +1 -0
  287. package/lib/dist/search/identifier-segments.js +176 -0
  288. package/lib/dist/search/identifier-segments.js.map +1 -0
  289. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  290. package/lib/dist/sync/git-hooks.js +2 -0
  291. package/lib/dist/sync/git-hooks.js.map +1 -1
  292. package/lib/dist/sync/watcher.d.ts +10 -5
  293. package/lib/dist/sync/watcher.d.ts.map +1 -1
  294. package/lib/dist/sync/watcher.js +51 -14
  295. package/lib/dist/sync/watcher.js.map +1 -1
  296. package/lib/dist/sync/worktree.d.ts +9 -0
  297. package/lib/dist/sync/worktree.d.ts.map +1 -1
  298. package/lib/dist/sync/worktree.js +45 -0
  299. package/lib/dist/sync/worktree.js.map +1 -1
  300. package/lib/dist/types.d.ts +25 -2
  301. package/lib/dist/types.d.ts.map +1 -1
  302. package/lib/dist/types.js +10 -0
  303. package/lib/dist/types.js.map +1 -1
  304. package/lib/dist/upgrade/index.d.ts +34 -2
  305. package/lib/dist/upgrade/index.d.ts.map +1 -1
  306. package/lib/dist/upgrade/index.js +164 -15
  307. package/lib/dist/upgrade/index.js.map +1 -1
  308. package/lib/dist/upgrade/remove-binary.d.ts +87 -0
  309. package/lib/dist/upgrade/remove-binary.d.ts.map +1 -0
  310. package/lib/dist/upgrade/remove-binary.js +289 -0
  311. package/lib/dist/upgrade/remove-binary.js.map +1 -0
  312. package/lib/dist/upgrade/update-check.d.ts +92 -0
  313. package/lib/dist/upgrade/update-check.d.ts.map +1 -0
  314. package/lib/dist/upgrade/update-check.js +258 -0
  315. package/lib/dist/upgrade/update-check.js.map +1 -0
  316. package/lib/node_modules/.modules.yaml +1 -1
  317. package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
  318. package/lib/package.json +1 -1
  319. package/package.json +1 -1
  320. package/lib/dist/reasoning/config.d.ts +0 -45
  321. package/lib/dist/reasoning/config.d.ts.map +0 -1
  322. package/lib/dist/reasoning/config.js +0 -171
  323. package/lib/dist/reasoning/config.js.map +0 -1
  324. package/lib/dist/reasoning/credentials.d.ts +0 -5
  325. package/lib/dist/reasoning/credentials.d.ts.map +0 -1
  326. package/lib/dist/reasoning/credentials.js +0 -83
  327. package/lib/dist/reasoning/credentials.js.map +0 -1
  328. package/lib/dist/reasoning/login.d.ts +0 -21
  329. package/lib/dist/reasoning/login.d.ts.map +0 -1
  330. package/lib/dist/reasoning/login.js +0 -85
  331. package/lib/dist/reasoning/login.js.map +0 -1
  332. package/lib/dist/reasoning/reasoner.d.ts +0 -43
  333. package/lib/dist/reasoning/reasoner.d.ts.map +0 -1
  334. package/lib/dist/reasoning/reasoner.js +0 -308
  335. package/lib/dist/reasoning/reasoner.js.map +0 -1
@@ -68,7 +68,15 @@ CREATE TABLE IF NOT EXISTS files (
68
68
  errors TEXT -- JSON array
69
69
  );
70
70
 
71
- -- Unresolved References: References that need resolution after full indexing
71
+ -- Unresolved References: References that need resolution after full indexing.
72
+ -- status lifecycle: rows are inserted 'pending' by extraction; a completed
73
+ -- resolution pass either deletes a row (resolved) or marks it 'failed'
74
+ -- (attempted, no match — kept so a later sync can retry it when a changed
75
+ -- file introduces a symbol that could satisfy it, #1240). name_tail is the
76
+ -- last segment of reference_name ('util.greet' → 'greet'), written when a
77
+ -- row is marked failed, so the retry lookup matches new node names against
78
+ -- dotted refs too. Rows follow their from_node via ON DELETE CASCADE, so
79
+ -- re-extracting or deleting a file clears its stale rows in any status.
72
80
  CREATE TABLE IF NOT EXISTS unresolved_refs (
73
81
  id INTEGER PRIMARY KEY AUTOINCREMENT,
74
82
  from_node_id TEXT NOT NULL,
@@ -79,6 +87,8 @@ CREATE TABLE IF NOT EXISTS unresolved_refs (
79
87
  candidates TEXT, -- JSON array
80
88
  file_path TEXT NOT NULL DEFAULT '',
81
89
  language TEXT NOT NULL DEFAULT 'unknown',
90
+ status TEXT NOT NULL DEFAULT 'pending',
91
+ name_tail TEXT NOT NULL DEFAULT '',
82
92
  FOREIGN KEY (from_node_id) REFERENCES nodes(id) ON DELETE CASCADE
83
93
  );
84
94
 
@@ -124,6 +134,25 @@ CREATE TRIGGER IF NOT EXISTS nodes_au AFTER UPDATE ON nodes BEGIN
124
134
  VALUES (NEW.rowid, NEW.id, NEW.name, NEW.qualified_name, NEW.docstring, NEW.signature);
125
135
  END;
126
136
 
137
+ -- Prose-word → symbol-name lookup for the prompt hook's graph-derived gate.
138
+ -- One row per (segment, name): segment is a lowercased word of a symbol name
139
+ -- ("OrderStateMachine" → order, state, machine — see identifier-segments.ts),
140
+ -- which lets natural-language prompt words be verified against the graph in
141
+ -- any language whose technical nouns are Latin script. File nodes are
142
+ -- excluded — a file's basename duplicates the symbols inside it and skews the
143
+ -- singleton-vs-cluster rarity statistics. FTS can't serve this lookup (its
144
+ -- tokenizer keeps camelCase names as single tokens), so segments are
145
+ -- materialized on the node write path.
146
+ -- Deletions leave orphan rows ON PURPOSE: rows are PROPOSALS, always
147
+ -- re-verified against nodes before being surfaced (CodeGraph.getSegmentMatches),
148
+ -- and a full index clears the table at its start. Populated lazily on old
149
+ -- databases (empty until the next index/sync heals it).
150
+ CREATE TABLE IF NOT EXISTS name_segment_vocab (
151
+ segment TEXT NOT NULL,
152
+ name TEXT NOT NULL,
153
+ PRIMARY KEY (segment, name)
154
+ ) WITHOUT ROWID;
155
+
127
156
  -- Edge indexes.
128
157
  -- idx_edges_source / idx_edges_target are intentionally omitted —
129
158
  -- the (source, kind) and (target, kind) composites below cover the
@@ -134,6 +163,17 @@ CREATE INDEX IF NOT EXISTS idx_edges_kind ON edges(kind);
134
163
  CREATE INDEX IF NOT EXISTS idx_edges_source_kind ON edges(source, kind);
135
164
  CREATE INDEX IF NOT EXISTS idx_edges_target_kind ON edges(target, kind);
136
165
 
166
+ -- Edge identity uniqueness. An edge IS uniquely (source, target, kind, line,
167
+ -- col); insertEdge uses `INSERT OR IGNORE`, but without something UNIQUE to
168
+ -- conflict on it behaved like a plain INSERT, so two passes emitting the same
169
+ -- edge produced byte-identical duplicate rows that inflated counts and flowed
170
+ -- into callers/impact (#1034). IFNULL folds the nullable line/col so
171
+ -- coordinate-less edges (synthesized / file-level) dedup too — SQLite treats
172
+ -- each NULL as distinct otherwise. Migration v6 dedups existing rows + adds
173
+ -- this on older databases.
174
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_edges_identity
175
+ ON edges(source, target, kind, IFNULL(line, -1), IFNULL(col, -1));
176
+
137
177
  -- File indexes
138
178
  CREATE INDEX IF NOT EXISTS idx_files_language ON files(language);
139
179
  CREATE INDEX IF NOT EXISTS idx_files_modified_at ON files(modified_at);
@@ -143,6 +183,8 @@ CREATE INDEX IF NOT EXISTS idx_unresolved_from_node ON unresolved_refs(from_node
143
183
  CREATE INDEX IF NOT EXISTS idx_unresolved_name ON unresolved_refs(reference_name);
144
184
  CREATE INDEX IF NOT EXISTS idx_unresolved_file_path ON unresolved_refs(file_path);
145
185
  CREATE INDEX IF NOT EXISTS idx_unresolved_from_name ON unresolved_refs(from_node_id, reference_name);
186
+ CREATE INDEX IF NOT EXISTS idx_unresolved_status ON unresolved_refs(status);
187
+ CREATE INDEX IF NOT EXISTS idx_unresolved_failed_tail ON unresolved_refs(name_tail) WHERE status = 'failed';
146
188
  CREATE INDEX IF NOT EXISTS idx_edges_provenance ON edges(provenance);
147
189
 
148
190
  -- Project metadata for version/provenance tracking
@@ -0,0 +1,106 @@
1
+ /**
2
+ * WAL checkpoint valve — bounds WAL growth while auto-checkpointing is
3
+ * deferred during a bulk index (#1231).
4
+ *
5
+ * Why deferral: SQLite's default `wal_autocheckpoint` (1000 pages) re-writes
6
+ * hot B-tree/FTS pages into the main DB file over and over during a bulk
7
+ * index — measured at ~95% of ALL disk I/O, and the difference between 45s
8
+ * and 19+ minutes on HDD-class storage (150 random IOPS). Deferring
9
+ * checkpoints turns the store into pure sequential WAL appends; each backfill
10
+ * pass writes distinct pages once, in page order (≈ sequential).
11
+ *
12
+ * Why a valve: unbounded deferral is its own failure mode, both measured in
13
+ * the #1231 repro. The WAL duplicates hot pages per COMMIT, so it grows far
14
+ * faster than the DB (5.9GB WAL for a ~340MB DB on a 3.3k-file index) —
15
+ * filling the disk, and poisoning every subsequent read that must page
16
+ * through it (the first resolution-phase read blocked the main thread >60s
17
+ * and the #850 liveness watchdog killed the healthy index). The valve
18
+ * watches WAL growth on a timer and, past a soft threshold, backfills with
19
+ * `PRAGMA wal_checkpoint(PASSIVE)` on a worker-thread connection — PASSIVE
20
+ * never blocks the writer, and off-thread means the main thread (and the
21
+ * watchdog heartbeat) keep turning regardless of how long a backfill takes.
22
+ *
23
+ * The load-bearing subtlety: a WAL file's SIZE never shrinks. After a full
24
+ * backfill, the writer's next commit RESTARTS the WAL from the top and the
25
+ * frames recycle inside the same file — so raw size says nothing about the
26
+ * un-backfilled backlog, and a size-triggered valve degenerates into firing
27
+ * (and pausing the writer) forever once the file passes its threshold
28
+ * (measured: guava crawled at ~9min per 160 files). Instead the valve
29
+ * tracks `sizeAtLastFullBackfill` — refreshed whenever a checkpoint reports
30
+ * `log === checkpointed` (everything backfilled) — and triggers on GROWTH
31
+ * beyond that baseline, which only happens when genuinely un-backfilled
32
+ * frames push past the file's high-water mark.
33
+ *
34
+ * Backpressure: if the writer outruns the checkpointer past a hard cap of
35
+ * growth (2× soft), {@link backpressure} pauses the writer (at a safe,
36
+ * between-transactions boundary) until a FULL backfill lands. One in-flight
37
+ * pass is not enough: on a disk saturated by the writer, every concurrent
38
+ * PASSIVE pass is already stale by the time it finishes (the writer appended
39
+ * past its snapshot), so neither SQLite's WAL wrap nor the baseline ever
40
+ * trigger and the WAL grows without bound (measured: 5.9GB on guava at 150
41
+ * IOPS, then a >60s read stall and a watchdog kill). With the writer parked,
42
+ * the next pass covers everything, the WAL wraps on the following commit,
43
+ * and the pause is the disk's honest catch-up cost — the correct terminal
44
+ * mode when hardware genuinely can't keep up with the append rate.
45
+ */
46
+ import type { DatabaseConnection } from './index';
47
+ /**
48
+ * Resolve the valve's soft threshold from the `CODEGRAPH_WAL_VALVE_MB`
49
+ * override; non-numeric / non-positive values fall back to the default.
50
+ */
51
+ export declare function resolveWalValveMb(envVal: string | undefined): number;
52
+ export declare class WalCheckpointValve {
53
+ private readonly db;
54
+ private readonly intervalMs;
55
+ private readonly log;
56
+ private timer;
57
+ private inflight;
58
+ /** Writer pause in progress (hard cap breached): passes loop until a full backfill. */
59
+ private pause;
60
+ /**
61
+ * WAL file size observed when a checkpoint last reported the ENTIRE WAL
62
+ * backfilled. Growth is measured against this baseline — see the header
63
+ * comment for why absolute size cannot be used.
64
+ */
65
+ private sizeAtLastFullBackfill;
66
+ private readonly softBytes;
67
+ private readonly hardBytes;
68
+ constructor(db: DatabaseConnection, softMb?: number, intervalMs?: number, log?: (msg: string) => void);
69
+ private mb;
70
+ /** Un-backfilled growth estimate: bytes the WAL has grown past the last full backfill. */
71
+ private growthBytes;
72
+ /** Begin watching the WAL. Idempotent; the timer never holds the loop open. */
73
+ start(): void;
74
+ /** Stop watching. Any in-flight checkpoint keeps running — await drain(). */
75
+ stop(): void;
76
+ /** One poll: fire an off-thread passive checkpoint when growth passes the soft threshold. */
77
+ check(): void;
78
+ /**
79
+ * Writer-side backstop, called at a between-transactions boundary. Returns
80
+ * null (no wait) while growth is under the hard cap; past it, returns a
81
+ * promise that resolves only once a FULL backfill has landed — see the
82
+ * header comment for why a single pass is not enough on a saturated disk.
83
+ */
84
+ backpressure(): Promise<void> | null;
85
+ /** Await any in-flight checkpoint and writer pause. */
86
+ drain(): Promise<void>;
87
+ /**
88
+ * Phase-boundary fold: backfill the ENTIRE WAL now (off-thread, awaited).
89
+ * Called between bulk phases — e.g. after parsing, before resolution's
90
+ * first reads — so the next phase never pages a bulk-write-sized WAL on
91
+ * the main thread (the post-parse read against a multi-GB WAL is what
92
+ * blew the #850 watchdog's 60s window in the #1231 repro). The await
93
+ * keeps the event loop (and the watchdog heartbeat) turning.
94
+ */
95
+ foldNow(): Promise<void>;
96
+ /**
97
+ * With the writer parked on the returned promise, loop passive passes until
98
+ * one reports the entire WAL backfilled (typically the second: the first
99
+ * drains the pass that was already running against a stale snapshot). Gives
100
+ * up after a bounded number of passes — e.g. a reader pinning the WAL —
101
+ * because unbounded WAL growth degrades; a wedged writer never recovers.
102
+ */
103
+ private backfillFully;
104
+ private fire;
105
+ }
106
+ //# sourceMappingURL=wal-valve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wal-valve.d.ts","sourceRoot":"","sources":["../../src/db/wal-valve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAWlD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMpE;AAED,qBAAa,kBAAkB;IAe3B,OAAO,CAAC,QAAQ,CAAC,EAAE;IAEnB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAjBtB,OAAO,CAAC,KAAK,CAA+C;IAC5D,OAAO,CAAC,QAAQ,CAA8B;IAC9C,uFAAuF;IACvF,OAAO,CAAC,KAAK,CAA8B;IAC3C;;;;OAIG;IACH,OAAO,CAAC,sBAAsB,CAAK;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAGhB,EAAE,EAAE,kBAAkB,EACvC,MAAM,GAAE,MAA8D,EACrD,UAAU,GAAE,MAA0B,EACtC,GAAG,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAe;IAMxD,OAAO,CAAC,EAAE;IAIV,0FAA0F;IAC1F,OAAO,CAAC,WAAW;IAInB,+EAA+E;IAC/E,KAAK,IAAI,IAAI;IAMb,6EAA6E;IAC7E,IAAI,IAAI,IAAI;IAOZ,6FAA6F;IAC7F,KAAK,IAAI,IAAI;IAIb;;;;;OAKG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAYpC,uDAAuD;IACjD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B;;;;;;;OAOG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ9B;;;;;;OAMG;YACW,aAAa;IAc3B,OAAO,CAAC,IAAI;CAoBb"}
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ /**
3
+ * WAL checkpoint valve — bounds WAL growth while auto-checkpointing is
4
+ * deferred during a bulk index (#1231).
5
+ *
6
+ * Why deferral: SQLite's default `wal_autocheckpoint` (1000 pages) re-writes
7
+ * hot B-tree/FTS pages into the main DB file over and over during a bulk
8
+ * index — measured at ~95% of ALL disk I/O, and the difference between 45s
9
+ * and 19+ minutes on HDD-class storage (150 random IOPS). Deferring
10
+ * checkpoints turns the store into pure sequential WAL appends; each backfill
11
+ * pass writes distinct pages once, in page order (≈ sequential).
12
+ *
13
+ * Why a valve: unbounded deferral is its own failure mode, both measured in
14
+ * the #1231 repro. The WAL duplicates hot pages per COMMIT, so it grows far
15
+ * faster than the DB (5.9GB WAL for a ~340MB DB on a 3.3k-file index) —
16
+ * filling the disk, and poisoning every subsequent read that must page
17
+ * through it (the first resolution-phase read blocked the main thread >60s
18
+ * and the #850 liveness watchdog killed the healthy index). The valve
19
+ * watches WAL growth on a timer and, past a soft threshold, backfills with
20
+ * `PRAGMA wal_checkpoint(PASSIVE)` on a worker-thread connection — PASSIVE
21
+ * never blocks the writer, and off-thread means the main thread (and the
22
+ * watchdog heartbeat) keep turning regardless of how long a backfill takes.
23
+ *
24
+ * The load-bearing subtlety: a WAL file's SIZE never shrinks. After a full
25
+ * backfill, the writer's next commit RESTARTS the WAL from the top and the
26
+ * frames recycle inside the same file — so raw size says nothing about the
27
+ * un-backfilled backlog, and a size-triggered valve degenerates into firing
28
+ * (and pausing the writer) forever once the file passes its threshold
29
+ * (measured: guava crawled at ~9min per 160 files). Instead the valve
30
+ * tracks `sizeAtLastFullBackfill` — refreshed whenever a checkpoint reports
31
+ * `log === checkpointed` (everything backfilled) — and triggers on GROWTH
32
+ * beyond that baseline, which only happens when genuinely un-backfilled
33
+ * frames push past the file's high-water mark.
34
+ *
35
+ * Backpressure: if the writer outruns the checkpointer past a hard cap of
36
+ * growth (2× soft), {@link backpressure} pauses the writer (at a safe,
37
+ * between-transactions boundary) until a FULL backfill lands. One in-flight
38
+ * pass is not enough: on a disk saturated by the writer, every concurrent
39
+ * PASSIVE pass is already stale by the time it finishes (the writer appended
40
+ * past its snapshot), so neither SQLite's WAL wrap nor the baseline ever
41
+ * trigger and the WAL grows without bound (measured: 5.9GB on guava at 150
42
+ * IOPS, then a >60s read stall and a watchdog kill). With the writer parked,
43
+ * the next pass covers everything, the WAL wraps on the following commit,
44
+ * and the pause is the disk's honest catch-up cost — the correct terminal
45
+ * mode when hardware genuinely can't keep up with the append rate.
46
+ */
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.WalCheckpointValve = void 0;
49
+ exports.resolveWalValveMb = resolveWalValveMb;
50
+ /** Soft WAL-growth threshold (MB) that triggers an off-thread passive checkpoint. */
51
+ const DEFAULT_WAL_VALVE_MB = 256;
52
+ /** Hard cap = this × soft threshold; past it the writer pauses for a full backfill. */
53
+ const HARD_CAP_MULTIPLIER = 2;
54
+ /** Passes attempted per writer pause before giving up (a pinned reader could stall forever). */
55
+ const MAX_PAUSED_BACKFILL_PASSES = 20;
56
+ /** How often the timer looks at the WAL file size. */
57
+ const CHECK_INTERVAL_MS = 2000;
58
+ /**
59
+ * Resolve the valve's soft threshold from the `CODEGRAPH_WAL_VALVE_MB`
60
+ * override; non-numeric / non-positive values fall back to the default.
61
+ */
62
+ function resolveWalValveMb(envVal) {
63
+ if (envVal !== undefined && envVal !== '') {
64
+ const n = Number(envVal);
65
+ if (Number.isFinite(n) && n > 0)
66
+ return Math.floor(n);
67
+ }
68
+ return DEFAULT_WAL_VALVE_MB;
69
+ }
70
+ class WalCheckpointValve {
71
+ db;
72
+ intervalMs;
73
+ log;
74
+ timer = null;
75
+ inflight = null;
76
+ /** Writer pause in progress (hard cap breached): passes loop until a full backfill. */
77
+ pause = null;
78
+ /**
79
+ * WAL file size observed when a checkpoint last reported the ENTIRE WAL
80
+ * backfilled. Growth is measured against this baseline — see the header
81
+ * comment for why absolute size cannot be used.
82
+ */
83
+ sizeAtLastFullBackfill = 0;
84
+ softBytes;
85
+ hardBytes;
86
+ constructor(db, softMb = resolveWalValveMb(process.env.CODEGRAPH_WAL_VALVE_MB), intervalMs = CHECK_INTERVAL_MS, log = () => { }) {
87
+ this.db = db;
88
+ this.intervalMs = intervalMs;
89
+ this.log = log;
90
+ this.softBytes = softMb * 1024 * 1024;
91
+ this.hardBytes = this.softBytes * HARD_CAP_MULTIPLIER;
92
+ }
93
+ mb(n) {
94
+ return `${Math.round(n / 1024 / 1024)}MB`;
95
+ }
96
+ /** Un-backfilled growth estimate: bytes the WAL has grown past the last full backfill. */
97
+ growthBytes() {
98
+ return this.db.getWalSizeBytes() - this.sizeAtLastFullBackfill;
99
+ }
100
+ /** Begin watching the WAL. Idempotent; the timer never holds the loop open. */
101
+ start() {
102
+ if (this.timer)
103
+ return;
104
+ this.timer = setInterval(() => this.check(), this.intervalMs);
105
+ this.timer.unref?.();
106
+ }
107
+ /** Stop watching. Any in-flight checkpoint keeps running — await drain(). */
108
+ stop() {
109
+ if (this.timer) {
110
+ clearInterval(this.timer);
111
+ this.timer = null;
112
+ }
113
+ }
114
+ /** One poll: fire an off-thread passive checkpoint when growth passes the soft threshold. */
115
+ check() {
116
+ if (!this.pause && !this.inflight && this.growthBytes() > this.softBytes)
117
+ this.fire();
118
+ }
119
+ /**
120
+ * Writer-side backstop, called at a between-transactions boundary. Returns
121
+ * null (no wait) while growth is under the hard cap; past it, returns a
122
+ * promise that resolves only once a FULL backfill has landed — see the
123
+ * header comment for why a single pass is not enough on a saturated disk.
124
+ */
125
+ backpressure() {
126
+ if (this.pause)
127
+ return this.pause;
128
+ if (this.growthBytes() <= this.hardBytes)
129
+ return null;
130
+ this.log(`backpressure: wal=${this.mb(this.db.getWalSizeBytes())} baseline=${this.mb(this.sizeAtLastFullBackfill)} — pausing writer for full backfill`);
131
+ const t0 = Date.now();
132
+ this.pause = this.backfillFully().finally(() => {
133
+ this.pause = null;
134
+ this.log(`backpressure released after ${Date.now() - t0}ms: wal=${this.mb(this.db.getWalSizeBytes())} baseline=${this.mb(this.sizeAtLastFullBackfill)}`);
135
+ });
136
+ return this.pause;
137
+ }
138
+ /** Await any in-flight checkpoint and writer pause. */
139
+ async drain() {
140
+ while (this.pause || this.inflight) {
141
+ if (this.pause)
142
+ await this.pause;
143
+ if (this.inflight)
144
+ await this.inflight;
145
+ }
146
+ }
147
+ /**
148
+ * Phase-boundary fold: backfill the ENTIRE WAL now (off-thread, awaited).
149
+ * Called between bulk phases — e.g. after parsing, before resolution's
150
+ * first reads — so the next phase never pages a bulk-write-sized WAL on
151
+ * the main thread (the post-parse read against a multi-GB WAL is what
152
+ * blew the #850 watchdog's 60s window in the #1231 repro). The await
153
+ * keeps the event loop (and the watchdog heartbeat) turning.
154
+ */
155
+ async foldNow() {
156
+ await this.drain();
157
+ if (this.growthBytes() <= 0)
158
+ return;
159
+ this.log(`foldNow: wal=${this.mb(this.db.getWalSizeBytes())} baseline=${this.mb(this.sizeAtLastFullBackfill)}`);
160
+ this.pause = this.backfillFully().finally(() => { this.pause = null; });
161
+ await this.pause;
162
+ }
163
+ /**
164
+ * With the writer parked on the returned promise, loop passive passes until
165
+ * one reports the entire WAL backfilled (typically the second: the first
166
+ * drains the pass that was already running against a stale snapshot). Gives
167
+ * up after a bounded number of passes — e.g. a reader pinning the WAL —
168
+ * because unbounded WAL growth degrades; a wedged writer never recovers.
169
+ */
170
+ async backfillFully() {
171
+ for (let i = 0; i < MAX_PAUSED_BACKFILL_PASSES; i++) {
172
+ if (this.inflight)
173
+ await this.inflight; // fold in the stale in-flight pass first
174
+ const res = await this.db.checkpointWalPassive();
175
+ if (!res)
176
+ return; // checkpoint machinery unavailable — don't spin
177
+ this.log(`backfill pass ${i + 1}: busy=${res.busy} log=${res.log} checkpointed=${res.checkpointed} wal=${this.mb(this.db.getWalSizeBytes())}`);
178
+ if (res.busy === 0 && res.log === res.checkpointed) {
179
+ this.sizeAtLastFullBackfill = this.db.getWalSizeBytes();
180
+ return;
181
+ }
182
+ }
183
+ this.log(`backfill gave up after ${MAX_PAUSED_BACKFILL_PASSES} passes — WAL stays unbounded this cycle`);
184
+ }
185
+ fire() {
186
+ const p = this.db
187
+ .checkpointWalPassive()
188
+ .then((res) => {
189
+ // Full backfill (busy 0, every log frame checkpointed) ⇒ the writer's
190
+ // next commit wraps the WAL; the file's current size becomes the new
191
+ // growth baseline. A partial pass (writer appended during it, or a
192
+ // read transaction pinned frames) leaves the baseline alone, so the
193
+ // next tick fires again and copies the remainder. In non-WAL mode
194
+ // SQLite reports log = checkpointed = -1, which is harmless here.
195
+ if (res && res.busy === 0 && res.log === res.checkpointed) {
196
+ this.sizeAtLastFullBackfill = this.db.getWalSizeBytes();
197
+ }
198
+ })
199
+ .catch(() => { })
200
+ .finally(() => {
201
+ if (this.inflight === p)
202
+ this.inflight = null;
203
+ });
204
+ this.inflight = p;
205
+ }
206
+ }
207
+ exports.WalCheckpointValve = WalCheckpointValve;
208
+ //# sourceMappingURL=wal-valve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wal-valve.js","sourceRoot":"","sources":["../../src/db/wal-valve.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;;;AAiBH,8CAMC;AAnBD,qFAAqF;AACrF,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,uFAAuF;AACvF,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,gGAAgG;AAChG,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,sDAAsD;AACtD,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,MAA0B;IAC1D,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,MAAa,kBAAkB;IAeV;IAEA;IACA;IAjBX,KAAK,GAA0C,IAAI,CA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,CAAC,YAAY,EAAE,CAAC;gBACnD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC;gBACxD,OAAO;YACT,CAAC;QACH,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,0BAA0B,0BAA0B,0CAA0C,CAAC,CAAC;IAC3G,CAAC;IAEO,IAAI;QACV,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE;aACd,oBAAoB,EAAE;aACtB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,sEAAsE;YACtE,qEAAqE;YACrE,mEAAmE;YACnE,oEAAoE;YACpE,kEAAkE;YAClE,kEAAkE;YAClE,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,YAAY,EAAE,CAAC;gBAC1D,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC;YAC1D,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,GAAqB,CAAC,CAAC;aAClC,OAAO,CAAC,GAAG,EAAE;YACZ,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;gBAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAChD,CAAC,CAAC,CAAC;QACL,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;CACF;AAxID,gDAwIC"}
@@ -86,10 +86,14 @@ export declare function findIndexedSubprojectRoots(root: string, opts?: {
86
86
  max?: number;
87
87
  }): string[];
88
88
  /**
89
- * Does `prompt` contain an explicit structural keyword (English or CJK)? A
90
- * keyword is a strong, self-contained signal, so the front-load hook fires on it
91
- * directly — no graph check needed. (A *code-token* match, by contrast, is only
92
- * a candidate the hook verifies against the graph first; see {@link extractCodeTokens}.)
89
+ * Does `prompt` contain an explicit structural keyword? A keyword is a strong,
90
+ * self-contained signal, so the front-load hook fires on it directly — no graph
91
+ * check needed. (A *code-token* match, by contrast, is only a candidate the
92
+ * hook verifies against the graph first; see {@link extractCodeTokens}.)
93
+ * Coverage is multilingual (#994, #1126): the ~29 languages with the largest
94
+ * developer populations, across Latin, Cyrillic, Greek, CJK, Hangul, Arabic,
95
+ * Hebrew, Thai, and Devanagari scripts. Languages beyond the keyword table
96
+ * still fire through the language-agnostic code-token path.
93
97
  */
94
98
  export declare function hasStructuralKeyword(prompt: string): boolean;
95
99
  /**
@@ -110,7 +114,7 @@ export declare function extractCodeTokens(prompt: string): string[];
110
114
  /**
111
115
  * Cheap, graph-free candidate gate for the front-load hook: could `prompt` be a
112
116
  * structural / flow / impact / "where-how" question worth front-loading context
113
- * for? True on an explicit keyword (English or CJK, issue #994) OR an
117
+ * for? True on an explicit keyword in any covered language (#994, #1126) OR an
114
118
  * identifier-shaped token. A keyword is sufficient to fire on its own; a
115
119
  * token-only match is only a candidate the hook then verifies against the graph
116
120
  * (a brand name like `JavaScript` is token-shaped but isn't a symbol). Every
@@ -1 +1 @@
1
- {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAqBzC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;;;;;;GAQG;AACH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA8BxE;AAED,wBAAgB,wBAAwB,CAAC,SAA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