@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.
Files changed (314) hide show
  1. package/bin/codegraph.cmd +1 -1
  2. package/lib/dist/bin/codegraph.js +206 -44
  3. package/lib/dist/bin/codegraph.js.map +1 -1
  4. package/lib/dist/context/formatter.d.ts +7 -1
  5. package/lib/dist/context/formatter.d.ts.map +1 -1
  6. package/lib/dist/context/formatter.js +12 -6
  7. package/lib/dist/context/formatter.js.map +1 -1
  8. package/lib/dist/context/index.d.ts +12 -0
  9. package/lib/dist/context/index.d.ts.map +1 -1
  10. package/lib/dist/context/index.js +101 -25
  11. package/lib/dist/context/index.js.map +1 -1
  12. package/lib/dist/db/index.d.ts +179 -0
  13. package/lib/dist/db/index.d.ts.map +1 -1
  14. package/lib/dist/db/index.js +368 -7
  15. package/lib/dist/db/index.js.map +1 -1
  16. package/lib/dist/db/migrations.d.ts +1 -1
  17. package/lib/dist/db/migrations.d.ts.map +1 -1
  18. package/lib/dist/db/migrations.js +25 -1
  19. package/lib/dist/db/migrations.js.map +1 -1
  20. package/lib/dist/db/queries.d.ts +234 -5
  21. package/lib/dist/db/queries.d.ts.map +1 -1
  22. package/lib/dist/db/queries.js +687 -53
  23. package/lib/dist/db/queries.js.map +1 -1
  24. package/lib/dist/db/schema.sql +16 -3
  25. package/lib/dist/db/sqlite-adapter.d.ts +3 -1
  26. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  27. package/lib/dist/db/sqlite-adapter.js +22 -4
  28. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  29. package/lib/dist/db/wal-valve.d.ts +15 -2
  30. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  31. package/lib/dist/db/wal-valve.js +88 -6
  32. package/lib/dist/db/wal-valve.js.map +1 -1
  33. package/lib/dist/directory.d.ts +29 -0
  34. package/lib/dist/directory.d.ts.map +1 -1
  35. package/lib/dist/directory.js +52 -0
  36. package/lib/dist/directory.js.map +1 -1
  37. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  38. package/lib/dist/extraction/extraction-version.js +1 -1
  39. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  40. package/lib/dist/extraction/function-ref.js +6 -0
  41. package/lib/dist/extraction/function-ref.js.map +1 -1
  42. package/lib/dist/extraction/generated-detection.d.ts +48 -12
  43. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  44. package/lib/dist/extraction/generated-detection.js +176 -11
  45. package/lib/dist/extraction/generated-detection.js.map +1 -1
  46. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  47. package/lib/dist/extraction/grammars.js +101 -2
  48. package/lib/dist/extraction/grammars.js.map +1 -1
  49. package/lib/dist/extraction/index.d.ts +138 -3
  50. package/lib/dist/extraction/index.d.ts.map +1 -1
  51. package/lib/dist/extraction/index.js +518 -94
  52. package/lib/dist/extraction/index.js.map +1 -1
  53. package/lib/dist/extraction/kernel/decode.d.ts +9 -0
  54. package/lib/dist/extraction/kernel/decode.d.ts.map +1 -0
  55. package/lib/dist/extraction/kernel/decode.js +162 -0
  56. package/lib/dist/extraction/kernel/decode.js.map +1 -0
  57. package/lib/dist/extraction/kernel/index.d.ts +64 -0
  58. package/lib/dist/extraction/kernel/index.d.ts.map +1 -0
  59. package/lib/dist/extraction/kernel/index.js +279 -0
  60. package/lib/dist/extraction/kernel/index.js.map +1 -0
  61. package/lib/dist/extraction/kernel/layout.d.ts +101 -0
  62. package/lib/dist/extraction/kernel/layout.d.ts.map +1 -0
  63. package/lib/dist/extraction/kernel/layout.js +104 -0
  64. package/lib/dist/extraction/kernel/layout.js.map +1 -0
  65. package/lib/dist/extraction/kernel/loader.d.ts +103 -0
  66. package/lib/dist/extraction/kernel/loader.d.ts.map +1 -0
  67. package/lib/dist/extraction/kernel/loader.js +146 -0
  68. package/lib/dist/extraction/kernel/loader.js.map +1 -0
  69. package/lib/dist/extraction/languages/c-cpp.d.ts +14 -0
  70. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  71. package/lib/dist/extraction/languages/c-cpp.js +868 -16
  72. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  73. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  74. package/lib/dist/extraction/languages/erlang.js +58 -22
  75. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  76. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  77. package/lib/dist/extraction/languages/objc.js +4 -0
  78. package/lib/dist/extraction/languages/objc.js.map +1 -1
  79. package/lib/dist/extraction/languages/rust.d.ts +20 -0
  80. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  81. package/lib/dist/extraction/languages/rust.js +47 -20
  82. package/lib/dist/extraction/languages/rust.js.map +1 -1
  83. package/lib/dist/extraction/parse-pool.d.ts +15 -0
  84. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  85. package/lib/dist/extraction/parse-pool.js +35 -1
  86. package/lib/dist/extraction/parse-pool.js.map +1 -1
  87. package/lib/dist/extraction/parse-worker.js +35 -1
  88. package/lib/dist/extraction/parse-worker.js.map +1 -1
  89. package/lib/dist/extraction/store-worker.d.ts +24 -0
  90. package/lib/dist/extraction/store-worker.d.ts.map +1 -0
  91. package/lib/dist/extraction/store-worker.js +139 -0
  92. package/lib/dist/extraction/store-worker.js.map +1 -0
  93. package/lib/dist/extraction/store-writer.d.ts +63 -0
  94. package/lib/dist/extraction/store-writer.d.ts.map +1 -0
  95. package/lib/dist/extraction/store-writer.js +174 -0
  96. package/lib/dist/extraction/store-writer.js.map +1 -0
  97. package/lib/dist/extraction/tree-sitter-types.d.ts +2 -0
  98. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  99. package/lib/dist/extraction/tree-sitter.d.ts +27 -5
  100. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  101. package/lib/dist/extraction/tree-sitter.js +257 -56
  102. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  103. package/lib/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  104. package/lib/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  105. package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  106. package/lib/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  107. package/lib/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  108. package/lib/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  109. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  110. package/lib/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  111. package/lib/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  112. package/lib/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  113. package/lib/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  114. package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  115. package/lib/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  116. package/lib/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  117. package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
  118. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  119. package/lib/dist/extraction/wasm-runtime-flags.js +27 -3
  120. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  121. package/lib/dist/graph/queries.d.ts.map +1 -1
  122. package/lib/dist/graph/queries.js +2 -0
  123. package/lib/dist/graph/queries.js.map +1 -1
  124. package/lib/dist/graph/traversal.js +1 -1
  125. package/lib/dist/graph/traversal.js.map +1 -1
  126. package/lib/dist/index.d.ts +36 -2
  127. package/lib/dist/index.d.ts.map +1 -1
  128. package/lib/dist/index.js +305 -11
  129. package/lib/dist/index.js.map +1 -1
  130. package/lib/dist/installer/beta-signup.d.ts +54 -0
  131. package/lib/dist/installer/beta-signup.d.ts.map +1 -0
  132. package/lib/dist/installer/beta-signup.js +178 -0
  133. package/lib/dist/installer/beta-signup.js.map +1 -0
  134. package/lib/dist/installer/index.d.ts +4 -3
  135. package/lib/dist/installer/index.d.ts.map +1 -1
  136. package/lib/dist/installer/index.js +19 -6
  137. package/lib/dist/installer/index.js.map +1 -1
  138. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  139. package/lib/dist/installer/targets/claude.js +37 -5
  140. package/lib/dist/installer/targets/claude.js.map +1 -1
  141. package/lib/dist/installer/targets/codex.d.ts +22 -8
  142. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  143. package/lib/dist/installer/targets/codex.js +65 -48
  144. package/lib/dist/installer/targets/codex.js.map +1 -1
  145. package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
  146. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  147. package/lib/dist/installer/targets/copilot-cli.js +209 -0
  148. package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
  149. package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  150. package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  151. package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
  152. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  153. package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
  154. package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  155. package/lib/dist/installer/targets/copilot-vscode.js +219 -0
  156. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
  157. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  158. package/lib/dist/installer/targets/registry.js +6 -0
  159. package/lib/dist/installer/targets/registry.js.map +1 -1
  160. package/lib/dist/installer/targets/toml.d.ts +6 -5
  161. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  162. package/lib/dist/installer/targets/toml.js +99 -20
  163. package/lib/dist/installer/targets/toml.js.map +1 -1
  164. package/lib/dist/installer/targets/types.d.ts +5 -5
  165. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  166. package/lib/dist/mcp/daemon-manager.d.ts +1 -1
  167. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  168. package/lib/dist/mcp/daemon-manager.js +1 -1
  169. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  170. package/lib/dist/mcp/daemon-paths.d.ts +6 -0
  171. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  172. package/lib/dist/mcp/daemon-paths.js +54 -0
  173. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  174. package/lib/dist/mcp/daemon-registry.d.ts +10 -0
  175. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  176. package/lib/dist/mcp/daemon-registry.js +51 -3
  177. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  178. package/lib/dist/mcp/daemon.d.ts +9 -6
  179. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  180. package/lib/dist/mcp/daemon.js +10 -8
  181. package/lib/dist/mcp/daemon.js.map +1 -1
  182. package/lib/dist/mcp/engine.d.ts +3 -0
  183. package/lib/dist/mcp/engine.d.ts.map +1 -1
  184. package/lib/dist/mcp/engine.js +45 -3
  185. package/lib/dist/mcp/engine.js.map +1 -1
  186. package/lib/dist/mcp/explore-dedup.d.ts +137 -0
  187. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
  188. package/lib/dist/mcp/explore-dedup.js +236 -0
  189. package/lib/dist/mcp/explore-dedup.js.map +1 -0
  190. package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
  191. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  192. package/lib/dist/mcp/explore-diagnostics.js +558 -0
  193. package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
  194. package/lib/dist/mcp/explore-session-state.d.ts +217 -0
  195. package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
  196. package/lib/dist/mcp/explore-session-state.js +322 -0
  197. package/lib/dist/mcp/explore-session-state.js.map +1 -0
  198. package/lib/dist/mcp/index.d.ts +24 -0
  199. package/lib/dist/mcp/index.d.ts.map +1 -1
  200. package/lib/dist/mcp/index.js +67 -6
  201. package/lib/dist/mcp/index.js.map +1 -1
  202. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  203. package/lib/dist/mcp/liveness-watchdog.js +3 -1
  204. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  205. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  206. package/lib/dist/mcp/proxy.js +6 -1
  207. package/lib/dist/mcp/proxy.js.map +1 -1
  208. package/lib/dist/mcp/server-instructions.d.ts +2 -2
  209. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  210. package/lib/dist/mcp/server-instructions.js +8 -3
  211. package/lib/dist/mcp/server-instructions.js.map +1 -1
  212. package/lib/dist/mcp/session.d.ts +16 -0
  213. package/lib/dist/mcp/session.d.ts.map +1 -1
  214. package/lib/dist/mcp/session.js +36 -13
  215. package/lib/dist/mcp/session.js.map +1 -1
  216. package/lib/dist/mcp/tools.d.ts +276 -10
  217. package/lib/dist/mcp/tools.d.ts.map +1 -1
  218. package/lib/dist/mcp/tools.js +2425 -237
  219. package/lib/dist/mcp/tools.js.map +1 -1
  220. package/lib/dist/project-config.d.ts +23 -0
  221. package/lib/dist/project-config.d.ts.map +1 -1
  222. package/lib/dist/project-config.js +39 -2
  223. package/lib/dist/project-config.js.map +1 -1
  224. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +1 -1
  225. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  226. package/lib/dist/resolution/c-fnptr-synthesizer.js +582 -138
  227. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  228. package/lib/dist/resolution/callback-synthesizer.d.ts +54 -10
  229. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  230. package/lib/dist/resolution/callback-synthesizer.js +287 -167
  231. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  232. package/lib/dist/resolution/cooperative-yield.d.ts +10 -2
  233. package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -1
  234. package/lib/dist/resolution/cooperative-yield.js +6 -4
  235. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  236. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  237. package/lib/dist/resolution/frameworks/go.js +29 -6
  238. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  239. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  240. package/lib/dist/resolution/frameworks/swift.js +11 -1
  241. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  242. package/lib/dist/resolution/import-resolver.d.ts +2 -3
  243. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  244. package/lib/dist/resolution/import-resolver.js +184 -9
  245. package/lib/dist/resolution/import-resolver.js.map +1 -1
  246. package/lib/dist/resolution/index.d.ts +87 -2
  247. package/lib/dist/resolution/index.d.ts.map +1 -1
  248. package/lib/dist/resolution/index.js +731 -134
  249. package/lib/dist/resolution/index.js.map +1 -1
  250. package/lib/dist/resolution/memory-budget.d.ts +48 -0
  251. package/lib/dist/resolution/memory-budget.d.ts.map +1 -0
  252. package/lib/dist/resolution/memory-budget.js +162 -0
  253. package/lib/dist/resolution/memory-budget.js.map +1 -0
  254. package/lib/dist/resolution/name-matcher.d.ts +42 -1
  255. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  256. package/lib/dist/resolution/name-matcher.js +681 -99
  257. package/lib/dist/resolution/name-matcher.js.map +1 -1
  258. package/lib/dist/resolution/path-aliases.d.ts +6 -4
  259. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  260. package/lib/dist/resolution/path-aliases.js +125 -17
  261. package/lib/dist/resolution/path-aliases.js.map +1 -1
  262. package/lib/dist/resolution/resolver-pool.d.ts +106 -0
  263. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -0
  264. package/lib/dist/resolution/resolver-pool.js +344 -0
  265. package/lib/dist/resolution/resolver-pool.js.map +1 -0
  266. package/lib/dist/resolution/resolver-worker.d.ts +17 -0
  267. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -0
  268. package/lib/dist/resolution/resolver-worker.js +141 -0
  269. package/lib/dist/resolution/resolver-worker.js.map +1 -0
  270. package/lib/dist/resolution/types.d.ts +3 -0
  271. package/lib/dist/resolution/types.d.ts.map +1 -1
  272. package/lib/dist/search/identifier-segments.d.ts +10 -0
  273. package/lib/dist/search/identifier-segments.d.ts.map +1 -1
  274. package/lib/dist/search/identifier-segments.js +29 -0
  275. package/lib/dist/search/identifier-segments.js.map +1 -1
  276. package/lib/dist/search/query-paths.d.ts +57 -0
  277. package/lib/dist/search/query-paths.d.ts.map +1 -0
  278. package/lib/dist/search/query-paths.js +298 -0
  279. package/lib/dist/search/query-paths.js.map +1 -0
  280. package/lib/dist/search/query-utils.d.ts +1 -1
  281. package/lib/dist/search/query-utils.d.ts.map +1 -1
  282. package/lib/dist/search/query-utils.js +13 -3
  283. package/lib/dist/search/query-utils.js.map +1 -1
  284. package/lib/dist/sync/watcher.d.ts +47 -1
  285. package/lib/dist/sync/watcher.d.ts.map +1 -1
  286. package/lib/dist/sync/watcher.js +127 -8
  287. package/lib/dist/sync/watcher.js.map +1 -1
  288. package/lib/dist/types.d.ts +61 -3
  289. package/lib/dist/types.d.ts.map +1 -1
  290. package/lib/dist/types.js +27 -1
  291. package/lib/dist/types.js.map +1 -1
  292. package/lib/dist/ui/color.d.ts +21 -0
  293. package/lib/dist/ui/color.d.ts.map +1 -0
  294. package/lib/dist/ui/color.js +42 -0
  295. package/lib/dist/ui/color.js.map +1 -0
  296. package/lib/dist/ui/glyphs.d.ts +35 -10
  297. package/lib/dist/ui/glyphs.d.ts.map +1 -1
  298. package/lib/dist/ui/glyphs.js +59 -12
  299. package/lib/dist/ui/glyphs.js.map +1 -1
  300. package/lib/dist/ui/shimmer-progress.d.ts.map +1 -1
  301. package/lib/dist/ui/shimmer-progress.js +78 -4
  302. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  303. package/lib/dist/ui/shimmer-worker.js +25 -17
  304. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  305. package/lib/dist/ui/types.d.ts +0 -2
  306. package/lib/dist/ui/types.d.ts.map +1 -1
  307. package/lib/dist/upgrade/index.d.ts +7 -0
  308. package/lib/dist/upgrade/index.d.ts.map +1 -1
  309. package/lib/dist/upgrade/index.js +18 -5
  310. package/lib/dist/upgrade/index.js.map +1 -1
  311. package/lib/kernel/codegraph-kernel.node +0 -0
  312. package/lib/node_modules/.package-lock.json +1 -1
  313. package/lib/package.json +6 -1
  314. package/package.json +6 -2
@@ -0,0 +1,558 @@
1
+ "use strict";
2
+ /**
3
+ * Per-file allocation diagnostic for `codegraph_explore` (CG-4).
4
+ *
5
+ * The explore response is a fixed byte envelope (`budget.maxOutputChars`, hard-
6
+ * capped at 25K so the host never externalizes the result). WHICH files fill it,
7
+ * and in what proportion, is decided by a long chain of gates, tiers and caps
8
+ * spread across `handleExplore`. That chain is currently unobservable: you can
9
+ * read the output and guess, but you cannot say "this file took 16% of the
10
+ * envelope and that one took 21%" without hand-counting.
11
+ *
12
+ * This module is the instrument. Enabled by `CODEGRAPH_EXPLORE_DEBUG`, it
13
+ * records, for one explore call:
14
+ * - per candidate file: relevance score, graph (RWR) mass, distinct query-term
15
+ * hits, ranking flags, render mode, bytes of source actually emitted, that
16
+ * file's share of the final envelope, whether it was clipped, whether it
17
+ * carries a flow-spine symbol — and for the ones that didn't render, why;
18
+ * - totals: envelope vs `maxOutputChars` vs the hard ceiling, source bytes vs
19
+ * meta-text overhead, files considered at each filter stage, and the score
20
+ * floor / relevance-gate thresholds that were applied.
21
+ *
22
+ * HARD CONSTRAINT — this ships in the product binary: when the env var is unset
23
+ * the diagnostic must not exist. `start()` returns `null`, every call site is a
24
+ * `diag?.` no-op, and the agent-facing response is byte-identical. The
25
+ * diagnostic never mutates render state, and every method is wrapped so a bug in
26
+ * here can never fail an explore call.
27
+ *
28
+ * Sinks (value of `CODEGRAPH_EXPLORE_DEBUG`):
29
+ * `1` / `true` / `on` / `yes` / `stderr` → human-readable table on stderr
30
+ * `json` → one JSON object on stderr
31
+ * anything else → treated as a path; one JSON object
32
+ * per line appended (JSONL sidecar)
33
+ */
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.ExploreDiagnostics = void 0;
36
+ exports.attributeSourceBytes = attributeSourceBytes;
37
+ exports.renderTable = renderTable;
38
+ const fs_1 = require("fs");
39
+ const OFF = new Set(['', '0', 'false', 'off', 'no']);
40
+ const STDERR_TABLE = new Set(['1', 'true', 'on', 'yes', 'stderr']);
41
+ /**
42
+ * Resolve the sink from the environment. `null` means the diagnostic is off —
43
+ * read per call (not memoized) so a test can toggle it between invocations.
44
+ */
45
+ function resolveSink() {
46
+ const raw = process.env.CODEGRAPH_EXPLORE_DEBUG;
47
+ if (raw === undefined)
48
+ return null;
49
+ const value = raw.trim();
50
+ const lower = value.toLowerCase();
51
+ if (OFF.has(lower))
52
+ return null;
53
+ if (STDERR_TABLE.has(lower))
54
+ return { kind: 'stderr', json: false };
55
+ if (lower === 'json')
56
+ return { kind: 'stderr', json: true };
57
+ return { kind: 'file', path: value };
58
+ }
59
+ const num = (n) => Math.round(n).toLocaleString('en-US');
60
+ const pct = (f) => `${(f * 100).toFixed(1)}%`;
61
+ class ExploreDiagnostics {
62
+ sink;
63
+ query;
64
+ projectRoot;
65
+ budget;
66
+ maxFiles;
67
+ indexedFileCount;
68
+ files = new Map();
69
+ stages = {
70
+ grouped: 0, pastScoreFloor: 0, pastLowValueFilter: 0, pastRelevanceGate: 0,
71
+ };
72
+ scoreFloor = 0;
73
+ maxGraph = 0;
74
+ graphGateThreshold = 0;
75
+ graphGateApplied = false;
76
+ note = '';
77
+ session;
78
+ allocPool = 0;
79
+ allocCliffAt = 0;
80
+ allocCliffed = [];
81
+ constructor(sink, query, projectRoot, budget, maxFiles, indexedFileCount) {
82
+ this.sink = sink;
83
+ this.query = query;
84
+ this.projectRoot = projectRoot;
85
+ this.budget = budget;
86
+ this.maxFiles = maxFiles;
87
+ this.indexedFileCount = indexedFileCount;
88
+ }
89
+ /**
90
+ * Returns `null` when `CODEGRAPH_EXPLORE_DEBUG` is unset/off — the whole
91
+ * instrument then costs one env read per explore call and nothing else.
92
+ */
93
+ static start(query, projectRoot, budget, maxFiles, indexedFileCount) {
94
+ try {
95
+ const sink = resolveSink();
96
+ if (!sink)
97
+ return null;
98
+ return new ExploreDiagnostics(sink, query, projectRoot, budget, maxFiles, indexedFileCount);
99
+ }
100
+ catch {
101
+ return null;
102
+ }
103
+ }
104
+ /**
105
+ * Candidate count after the test/spec/icon/i18n hard-exclude — the FIRST
106
+ * selection stage, ahead of the score floor.
107
+ */
108
+ setLowValueFiltered(grouped, kept) {
109
+ this.stages.grouped = grouped;
110
+ this.stages.pastLowValueFilter = kept;
111
+ this.stages.pastScoreFloor = kept;
112
+ this.stages.pastRelevanceGate = kept;
113
+ }
114
+ /**
115
+ * Record what this session had already been served for this project (CG-17),
116
+ * so the report says which call in the session it is and what the earlier ones
117
+ * cost. Read-only for now: nothing in the render loop consults it, which is
118
+ * what keeps the response byte-identical at this stage.
119
+ *
120
+ * Files are listed most-recent call first and de-duplicated by path — the same
121
+ * file re-served across calls is the pattern this instrument exists to make
122
+ * visible, and its ranges are unioned so a glance shows what of it the agent
123
+ * already holds.
124
+ */
125
+ noteSession(prior) {
126
+ if (!prior)
127
+ return;
128
+ const byPath = new Map();
129
+ for (const call of [...prior.calls].reverse()) {
130
+ for (const file of call.files) {
131
+ const existing = byPath.get(file.path);
132
+ const spans = file.ranges.map((r) => [r.start, r.end]);
133
+ if (existing) {
134
+ existing.ranges.push(...spans);
135
+ existing.bytes += file.bytes;
136
+ }
137
+ else {
138
+ byPath.set(file.path, { path: file.path, ranges: spans, bytes: file.bytes });
139
+ }
140
+ }
141
+ }
142
+ this.session = {
143
+ callIndex: prior.callCount + 1,
144
+ priorCalls: prior.callCount,
145
+ priorResponseChars: prior.responseBytes,
146
+ priorFiles: [...byPath.values()],
147
+ };
148
+ }
149
+ /** Candidate count after the `group.score >= floor` filter. */
150
+ setScoreFloor(floor, kept) {
151
+ this.scoreFloor = floor;
152
+ this.stages.pastScoreFloor = kept;
153
+ this.stages.pastRelevanceGate = kept;
154
+ }
155
+ /** Graph-relevance gate: threshold, whether it actually pruned, what survived. */
156
+ setRelevanceGate(maxGraph, threshold, applied, kept) {
157
+ this.maxGraph = maxGraph;
158
+ this.graphGateThreshold = threshold;
159
+ this.graphGateApplied = applied;
160
+ this.stages.pastRelevanceGate = kept;
161
+ }
162
+ /** Record one ranked candidate's scoring inputs, in final sort order. */
163
+ noteCandidate(path, meta) {
164
+ this.files.set(path, {
165
+ path, ...meta, allowance: null, spendable: null, funded: null,
166
+ dedupSavedChars: 0, dedupCovered: [],
167
+ emittedChars: 0, finalChars: 0, share: 0, allocatedShare: 0, clipped: false,
168
+ });
169
+ }
170
+ /**
171
+ * Record the proportional split (CG-12), taken right after ranking and before
172
+ * a single byte renders. Called once per explore.
173
+ */
174
+ setAllocation(allowances, cliffed, cliffAt, pool) {
175
+ this.allocPool = pool;
176
+ this.allocCliffAt = cliffAt;
177
+ this.allocCliffed = [...cliffed];
178
+ for (const [path, chars] of allowances) {
179
+ const rec = this.files.get(path);
180
+ if (rec)
181
+ rec.allowance = chars;
182
+ }
183
+ for (const path of cliffed) {
184
+ const rec = this.files.get(path);
185
+ if (rec)
186
+ rec.allowance = 0;
187
+ }
188
+ }
189
+ /**
190
+ * What the render loop will let this file spend — reservation plus inherited
191
+ * slack. Called once per file, before any of its render paths run.
192
+ */
193
+ recordSpendable(path, chars) {
194
+ const rec = this.files.get(path);
195
+ if (rec)
196
+ rec.spendable = chars;
197
+ }
198
+ /**
199
+ * What the render loop will let this file spend once the reservations still
200
+ * owed BELOW it are held back (CG-31). Called alongside `recordSpendable`.
201
+ */
202
+ recordFunded(path, chars) {
203
+ const rec = this.files.get(path);
204
+ if (rec)
205
+ rec.funded = chars;
206
+ }
207
+ /** A candidate rendered source into the response. */
208
+ recordRender(path, render, sourceChars, clipped) {
209
+ const rec = this.files.get(path);
210
+ if (!rec)
211
+ return;
212
+ rec.render = render;
213
+ rec.emittedChars = sourceChars;
214
+ rec.clipped = clipped;
215
+ rec.skipped = undefined;
216
+ }
217
+ /**
218
+ * Source this call withheld because the session already holds it (CG-18).
219
+ * Called with `(path, 0, [])` to clear a record — the anti-abandonment restore
220
+ * puts a suppressed file's source back, and a diagnostic still claiming the
221
+ * saving would misreport where the envelope went.
222
+ */
223
+ recordDedup(path, savedChars, covered) {
224
+ const rec = this.files.get(path);
225
+ if (!rec)
226
+ return;
227
+ rec.dedupSavedChars = savedChars;
228
+ rec.dedupCovered = covered.map((r) => [r.start, r.end]);
229
+ }
230
+ /**
231
+ * A candidate was passed over before rendering. First reason wins — the
232
+ * blanket `max-files` sweep must not overwrite a file's specific reason.
233
+ */
234
+ recordSkip(path, reason) {
235
+ const rec = this.files.get(path);
236
+ if (!rec || rec.render || rec.skipped)
237
+ return;
238
+ rec.skipped = reason;
239
+ }
240
+ /** Explore returned early (no subgraph). Emits a minimal record. */
241
+ finishEmpty(reason) {
242
+ this.note = reason;
243
+ this.emit(this.buildReport('', 0, 0, 0));
244
+ }
245
+ /**
246
+ * Final pass: attribute the FINAL text's bytes back to files (so the hard
247
+ * ceiling's truncation is reflected in what each file actually delivered),
248
+ * then emit.
249
+ *
250
+ * `allocatedChars` is the pre-truncation length — the size the render loop
251
+ * *chose*. Reporting both is the point: the allocator's decision and the
252
+ * agent's delivered payload diverge exactly when the ceiling cuts, and
253
+ * conflating them is how a dropped trailing file goes unnoticed.
254
+ */
255
+ finish(finalText, allocatedChars, hardCeiling, filesIncluded) {
256
+ try {
257
+ const perFile = attributeSourceBytes(finalText);
258
+ const envelope = finalText.length;
259
+ for (const rec of this.files.values()) {
260
+ rec.finalChars = perFile.get(rec.path) ?? 0;
261
+ rec.share = envelope > 0 ? rec.finalChars / envelope : 0;
262
+ rec.allocatedShare = allocatedChars > 0 ? rec.emittedChars / allocatedChars : 0;
263
+ // Rendered into `lines` but absent from the final text → the hard
264
+ // ceiling dropped its whole section. A back-referenced file has no
265
+ // fenced source BY DESIGN (CG-18), so it is never "dropped".
266
+ if (rec.render && rec.render !== 'stale-omitted' && rec.render !== 'backref'
267
+ && rec.finalChars === 0) {
268
+ rec.render = 'dropped';
269
+ rec.clipped = true;
270
+ }
271
+ }
272
+ this.emit(this.buildReport(finalText, allocatedChars, hardCeiling, filesIncluded));
273
+ }
274
+ catch {
275
+ // A diagnostic must never fail an explore call.
276
+ }
277
+ }
278
+ buildReport(finalText, allocatedChars, hardCeiling, filesIncluded) {
279
+ const envelope = finalText.length;
280
+ const records = [...this.files.values()];
281
+ const rendered = records.filter((r) => r.finalChars > 0);
282
+ const sourceChars = rendered.reduce((s, r) => s + r.finalChars, 0);
283
+ return {
284
+ tool: 'codegraph_explore',
285
+ query: this.query,
286
+ projectRoot: this.projectRoot,
287
+ indexedFileCount: this.indexedFileCount,
288
+ note: this.note || undefined,
289
+ session: this.session,
290
+ budget: {
291
+ maxOutputChars: this.budget.maxOutputChars,
292
+ maxCharsPerFile: this.budget.maxCharsPerFile,
293
+ maxFiles: this.maxFiles,
294
+ hardCeiling,
295
+ },
296
+ envelope: {
297
+ chars: envelope,
298
+ allocatedChars,
299
+ overBudget: allocatedChars > this.budget.maxOutputChars,
300
+ truncated: allocatedChars > hardCeiling,
301
+ sourceChars,
302
+ sourceShare: envelope > 0 ? sourceChars / envelope : 0,
303
+ metaChars: envelope - sourceChars,
304
+ metaShare: envelope > 0 ? (envelope - sourceChars) / envelope : 0,
305
+ },
306
+ selection: {
307
+ scoreFloor: this.scoreFloor,
308
+ maxGraph: this.maxGraph,
309
+ graphGateThreshold: this.graphGateThreshold,
310
+ graphGateApplied: this.graphGateApplied,
311
+ filesGrouped: this.stages.grouped,
312
+ filesPastLowValueFilter: this.stages.pastLowValueFilter,
313
+ filesPastScoreFloor: this.stages.pastScoreFloor,
314
+ filesRanked: this.stages.pastRelevanceGate,
315
+ filesRenderedByLoop: filesIncluded,
316
+ filesInFinalOutput: rendered.length,
317
+ },
318
+ dedup: {
319
+ savedChars: records.reduce((s, r) => s + r.dedupSavedChars, 0),
320
+ backReferenced: records.filter((r) => r.dedupSavedChars > 0).map((r) => r.path),
321
+ fullyBackReferenced: records.filter((r) => r.render === 'backref').map((r) => r.path),
322
+ },
323
+ allocation: {
324
+ pool: this.allocPool,
325
+ cliffAt: round6(this.allocCliffAt),
326
+ cliffed: [...this.allocCliffed],
327
+ reserved: records.reduce((s, r) => s + (r.allowance ?? 0), 0),
328
+ },
329
+ files: records
330
+ .slice()
331
+ .sort((a, b) => b.emittedChars - a.emittedChars || b.finalChars - a.finalChars || a.rank - b.rank)
332
+ .map((r) => ({
333
+ path: r.path,
334
+ rank: r.rank,
335
+ score: r.score,
336
+ graphScore: round6(r.graphScore),
337
+ termHits: r.termHits,
338
+ nodes: r.nodes,
339
+ pinned: r.pinned ?? false,
340
+ named: r.named,
341
+ central: r.central,
342
+ entry: r.entry,
343
+ spine: r.spine,
344
+ lowValue: r.lowValue,
345
+ generated: r.generated,
346
+ ambientDeclaration: r.ambientDeclaration,
347
+ penalty: round6(r.penalty),
348
+ kinds: r.kinds,
349
+ allowance: r.allowance,
350
+ spendable: r.spendable,
351
+ funded: r.funded,
352
+ render: r.render ?? null,
353
+ skipped: r.skipped ?? null,
354
+ clipped: r.clipped,
355
+ dedupSavedChars: r.dedupSavedChars,
356
+ dedupCovered: r.dedupCovered.map((s) => [...s]),
357
+ emittedChars: r.emittedChars,
358
+ finalChars: r.finalChars,
359
+ share: round6(r.share),
360
+ allocatedShare: round6(r.allocatedShare),
361
+ })),
362
+ };
363
+ }
364
+ emit(report) {
365
+ try {
366
+ if (this.sink.kind === 'file') {
367
+ (0, fs_1.appendFileSync)(this.sink.path, JSON.stringify(report) + '\n', 'utf-8');
368
+ return;
369
+ }
370
+ if (this.sink.json) {
371
+ process.stderr.write(JSON.stringify(report, null, 2) + '\n');
372
+ return;
373
+ }
374
+ process.stderr.write(renderTable(report) + '\n');
375
+ }
376
+ catch {
377
+ // Unwritable sidecar / closed stderr must not fail the explore call.
378
+ }
379
+ }
380
+ }
381
+ exports.ExploreDiagnostics = ExploreDiagnostics;
382
+ const round6 = (n) => Math.round(n * 1e6) / 1e6;
383
+ /**
384
+ * Attribute the final response's source bytes back to files by walking the
385
+ * rendered markdown: a ``**`path`**`` section header followed by a fenced code
386
+ * block. Reading the FINAL text (rather than trusting the render loop's running
387
+ * total) is what makes the numbers truthful — it accounts for the hard-ceiling
388
+ * truncation that can drop whole trailing sections after they were "emitted".
389
+ *
390
+ * Line numbering is on by default, so a source line that is itself a ``` fence
391
+ * arrives as `42\t```` and cannot close the block early.
392
+ */
393
+ function attributeSourceBytes(finalText) {
394
+ const out = new Map();
395
+ if (!finalText)
396
+ return out;
397
+ const lines = finalText.split('\n');
398
+ let current = null;
399
+ let inFence = false;
400
+ let acc = [];
401
+ const flush = () => {
402
+ if (current && acc.length > 0) {
403
+ out.set(current, (out.get(current) ?? 0) + acc.join('\n').length);
404
+ }
405
+ acc = [];
406
+ };
407
+ for (const line of lines) {
408
+ if (!inFence) {
409
+ const header = /^\*\*`([^`]+)`\*\*/.exec(line);
410
+ if (header) {
411
+ current = header[1];
412
+ continue;
413
+ }
414
+ if (current && line.startsWith('```')) {
415
+ inFence = true;
416
+ continue;
417
+ }
418
+ continue;
419
+ }
420
+ if (line === '```') {
421
+ inFence = false;
422
+ flush();
423
+ continue;
424
+ }
425
+ acc.push(line);
426
+ }
427
+ // Unterminated fence (final-ceiling truncation cut mid-block): count it.
428
+ if (inFence)
429
+ flush();
430
+ return out;
431
+ }
432
+ /** Human-readable stderr rendering of the JSON report. */
433
+ function renderTable(report) {
434
+ const { budget, envelope: env, selection: sel, files } = report;
435
+ const out = [];
436
+ out.push('');
437
+ out.push(`codegraph explore diagnostic — "${report.query}"`);
438
+ out.push(` project ${report.projectRoot} · ${num(report.indexedFileCount)} files indexed`);
439
+ if (report.note)
440
+ out.push(` note: ${report.note}`);
441
+ if (report.session) {
442
+ const s = report.session;
443
+ out.push(` session call #${s.callIndex} for this project` +
444
+ ` · ${num(s.priorCalls)} prior call${s.priorCalls === 1 ? '' : 's'}` +
445
+ ` · ${num(s.priorResponseChars)} chars already served`);
446
+ for (const f of s.priorFiles.slice(0, 12)) {
447
+ const spans = f.ranges.slice(0, 6).map(([a, b]) => (a === b ? `${a}` : `${a}-${b}`)).join(',');
448
+ const more = f.ranges.length > 6 ? `,+${f.ranges.length - 6}` : '';
449
+ out.push(` already served ${f.path} · ${num(f.bytes)} chars · L${spans}${more}`);
450
+ }
451
+ if (s.priorFiles.length > 12)
452
+ out.push(` … +${s.priorFiles.length - 12} more already-served file(s)`);
453
+ }
454
+ out.push(` envelope ${num(env.chars)} chars delivered · ${num(env.allocatedChars)} allocated` +
455
+ ` of ${num(budget.maxOutputChars)} budget (hard ceiling ${num(budget.hardCeiling)})` +
456
+ `${env.overBudget ? ' [over budget]' : ''}${env.truncated ? ' [TRUNCATED]' : ''}`);
457
+ out.push(` source ${num(env.sourceChars)} (${pct(env.sourceShare)})` +
458
+ ` · meta ${num(env.metaChars)} (${pct(env.metaShare)})` +
459
+ ` · per-file cap ${num(budget.maxCharsPerFile)}`);
460
+ out.push(` files ${num(sel.filesGrouped)} grouped` +
461
+ ` → ${num(sel.filesPastLowValueFilter)} past low-value filter` +
462
+ ` → ${num(sel.filesPastScoreFloor)} past score floor (>=${sel.scoreFloor.toFixed(1)})` +
463
+ ` → ${num(sel.filesRanked)} past relevance gate` +
464
+ ` → ${num(sel.filesInFinalOutput)} in output (maxFiles ${num(budget.maxFiles)})`);
465
+ out.push(` relevance gate ${sel.graphGateApplied ? 'applied' : 'not applied'}` +
466
+ ` at graph >= ${sel.graphGateThreshold.toFixed(5)} (6% of max ${sel.maxGraph.toFixed(5)})`);
467
+ const dedup = report.dedup;
468
+ if (dedup && dedup.savedChars > 0) {
469
+ out.push(` dedup ${num(dedup.savedChars)} chars not re-sent` +
470
+ ` · ${dedup.fullyBackReferenced.length} file(s) fully back-referenced` +
471
+ ` (each also freed a maxFiles slot)` +
472
+ (dedup.backReferenced.length > 0 ? `: ${dedup.backReferenced.join(', ')}` : ''));
473
+ }
474
+ const alloc = report.allocation;
475
+ out.push(` allocation ${num(alloc.reserved)} reserved of ${num(alloc.pool)} pool` +
476
+ ` · cliff at weight ${alloc.cliffAt.toFixed(2)}` +
477
+ (alloc.cliffed.length > 0
478
+ ? ` · ${alloc.cliffed.length} cliffed to pointers: ${alloc.cliffed.join(', ')}`
479
+ : ' · nothing cliffed'));
480
+ out.push('');
481
+ // Allocated (not delivered) is the allocator's own decision — the number the
482
+ // budget work is about. Delivered is what the agent got. They differ only
483
+ // when the ceiling truncated; showing both makes that divergence obvious.
484
+ const shown = files.filter((f) => f.emittedChars > 0 || f.finalChars > 0 || f.render === 'backref');
485
+ if (shown.length > 0) {
486
+ out.push(' # alloc% deliv% bytes reserved score graph hits pen flags render file');
487
+ for (const f of shown) {
488
+ out.push(' ' +
489
+ String(f.rank).padStart(2) + ' ' +
490
+ pct(f.allocatedShare).padStart(6) + ' ' +
491
+ pct(f.share).padStart(6) + ' ' +
492
+ num(f.emittedChars).padStart(7) + ' ' +
493
+ (f.allowance === null ? '-' : num(f.allowance)).padStart(8) + ' ' +
494
+ f.score.toFixed(1).padStart(5) + ' ' +
495
+ f.graphScore.toFixed(5).padStart(7) + ' ' +
496
+ String(f.termHits).padStart(4) + ' ' +
497
+ f.penalty.toFixed(2).padStart(4) + ' ' +
498
+ flagString(f).padEnd(19) + ' ' +
499
+ ((f.render ?? '-') + (f.clipped ? '*' : '')).padEnd(9) + ' ' +
500
+ f.path);
501
+ out.push(' kinds: ' + (f.kinds || '-'));
502
+ // Only when it differs: a file that spent over `reserved` but inside
503
+ // `spendable` took inherited slack, not a budget bug.
504
+ if (f.spendable !== null && f.allowance !== null && f.spendable !== f.allowance) {
505
+ out.push(` spendable: ${num(f.spendable)} (reservation + inherited slack)`);
506
+ }
507
+ // Only when the displacement guard actually bit: the gap is the overshoot
508
+ // this file was refused so the files below it could still be paid.
509
+ if (f.funded !== null && f.spendable !== null && f.funded < Math.round(f.spendable * 1.5)) {
510
+ out.push(` funded: ${num(f.funded)} (held to this so the files below keep their reservations)`);
511
+ }
512
+ if (f.dedupSavedChars > 0) {
513
+ const spans = f.dedupCovered.slice(0, 6).map(([a, b]) => (a === b ? `${a}` : `${a}-${b}`)).join(',');
514
+ const more = f.dedupCovered.length > 6 ? `,+${f.dedupCovered.length - 6}` : '';
515
+ out.push(` dedup: ${num(f.dedupSavedChars)} chars already sent this session · L${spans}${more}`);
516
+ }
517
+ }
518
+ out.push(' (bytes = source allocated by the render loop; deliv% = 0 means the hard ceiling dropped the section)');
519
+ out.push(' (* = clipped: some source in this file was elided, windowed, or its section dropped)');
520
+ }
521
+ else {
522
+ out.push(' (no file source in the final output)');
523
+ }
524
+ const skipped = files.filter((f) => f.emittedChars === 0 && f.finalChars === 0);
525
+ if (skipped.length > 0) {
526
+ out.push('');
527
+ out.push(' ranked but never rendered:');
528
+ for (const f of skipped.slice(0, 15)) {
529
+ out.push(` #${String(f.rank).padStart(2)} ${f.path} — ${f.skipped ?? f.render ?? 'not reached'}` +
530
+ ` (score ${f.score.toFixed(1)}, graph ${f.graphScore.toFixed(5)}, hits ${f.termHits},` +
531
+ ` pen ${f.penalty.toFixed(2)}, ${flagString(f) || 'no flags'}, ${f.kinds || '-'})`);
532
+ }
533
+ if (skipped.length > 15)
534
+ out.push(` … and ${skipped.length - 15} more`);
535
+ }
536
+ return out.join('\n');
537
+ }
538
+ function flagString(f) {
539
+ const flags = [];
540
+ if (f.pinned)
541
+ flags.push('pinned');
542
+ if (f.named)
543
+ flags.push('named');
544
+ if (f.entry)
545
+ flags.push('entry');
546
+ if (f.central)
547
+ flags.push('central');
548
+ if (f.spine)
549
+ flags.push('spine');
550
+ if (f.lowValue)
551
+ flags.push('low-value');
552
+ if (f.generated)
553
+ flags.push('generated');
554
+ if (f.ambientDeclaration)
555
+ flags.push('ambient-decl');
556
+ return flags.join(' ') || '-';
557
+ }
558
+ //# sourceMapp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