@cchistory/lite 0.4.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (542) hide show
  1. package/INSTALL.md +1 -1
  2. package/apps/lite-cli/dist/agent-contract.d.ts +4 -5
  3. package/apps/lite-cli/dist/agent-contract.d.ts.map +1 -1
  4. package/apps/lite-cli/dist/agent-contract.js +32 -25
  5. package/apps/lite-cli/dist/agent-contract.js.map +1 -1
  6. package/apps/lite-cli/dist/bin.js +3 -3
  7. package/apps/lite-cli/dist/bin.js.map +1 -1
  8. package/apps/lite-cli/dist/index.d.ts.map +1 -1
  9. package/apps/lite-cli/dist/index.js +147 -66
  10. package/apps/lite-cli/dist/index.js.map +1 -1
  11. package/apps/lite-cli/dist/index.test.js +76 -60
  12. package/apps/lite-cli/dist/index.test.js.map +1 -1
  13. package/apps/lite-cli/dist/query.d.ts +4 -1
  14. package/apps/lite-cli/dist/query.d.ts.map +1 -1
  15. package/apps/lite-cli/dist/query.js +45 -29
  16. package/apps/lite-cli/dist/query.js.map +1 -1
  17. package/apps/lite-cli/dist/resource-errors.d.ts +3 -0
  18. package/apps/lite-cli/dist/resource-errors.d.ts.map +1 -0
  19. package/apps/lite-cli/dist/resource-errors.js +17 -0
  20. package/apps/lite-cli/dist/resource-errors.js.map +1 -0
  21. package/apps/lite-cli/dist/shell.d.ts +12 -2
  22. package/apps/lite-cli/dist/shell.d.ts.map +1 -1
  23. package/apps/lite-cli/dist/shell.js +129 -57
  24. package/apps/lite-cli/dist/shell.js.map +1 -1
  25. package/apps/lite-cli/dist/sql-query.test.d.ts +2 -0
  26. package/apps/lite-cli/dist/sql-query.test.d.ts.map +1 -0
  27. package/apps/lite-cli/dist/sql-query.test.js +290 -0
  28. package/apps/lite-cli/dist/sql-query.test.js.map +1 -0
  29. package/apps/lite-cli/dist/version.d.ts +1 -1
  30. package/apps/lite-cli/dist/version.js +1 -1
  31. package/apps/lite-tui/dist/bin.js +3 -3
  32. package/apps/lite-tui/dist/bin.js.map +1 -1
  33. package/apps/lite-tui/dist/index.d.ts.map +1 -1
  34. package/apps/lite-tui/dist/index.js +2 -2
  35. package/apps/lite-tui/dist/index.js.map +1 -1
  36. package/apps/lite-tui/dist/index.test.js +5 -3
  37. package/apps/lite-tui/dist/index.test.js.map +1 -1
  38. package/apps/lite-tui/dist/render.d.ts +1 -1
  39. package/apps/lite-tui/dist/version.d.ts +1 -1
  40. package/apps/lite-tui/dist/version.js +1 -1
  41. package/bin/cchistory-lite-tui.mjs +3 -3
  42. package/bin/cchistory-lite.mjs +3 -3
  43. package/docs/guide/for-agents.md +65 -46
  44. package/docs/guide/lite.md +49 -11
  45. package/docs/guide/queries/latest-sessions.sql +4 -0
  46. package/docs/guide/queries/latest-turns.sql +1 -0
  47. package/docs/guide/queries/list-sessions.sql +2 -0
  48. package/docs/guide/query.md +153 -0
  49. package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts +7 -0
  50. package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts.map +1 -1
  51. package/node_modules/@cchistory/canonical/dist/directory-scope.js +11 -0
  52. package/node_modules/@cchistory/canonical/dist/directory-scope.js.map +1 -1
  53. package/node_modules/@cchistory/canonical/dist/index.d.ts +5 -1
  54. package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -1
  55. package/node_modules/@cchistory/canonical/dist/index.js +5 -1
  56. package/node_modules/@cchistory/canonical/dist/index.js.map +1 -1
  57. package/node_modules/@cchistory/canonical/dist/query.d.ts +15 -0
  58. package/node_modules/@cchistory/canonical/dist/query.d.ts.map +1 -0
  59. package/node_modules/@cchistory/canonical/dist/query.js +208 -0
  60. package/node_modules/@cchistory/canonical/dist/query.js.map +1 -0
  61. package/node_modules/@cchistory/canonical/dist/session-family.d.ts +1 -0
  62. package/node_modules/@cchistory/canonical/dist/session-family.d.ts.map +1 -1
  63. package/node_modules/@cchistory/canonical/dist/session-family.js +3 -0
  64. package/node_modules/@cchistory/canonical/dist/session-family.js.map +1 -1
  65. package/node_modules/@cchistory/canonical/dist/session-family.test.js +61 -0
  66. package/node_modules/@cchistory/canonical/dist/session-family.test.js.map +1 -1
  67. package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts +30 -0
  68. package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts.map +1 -0
  69. package/node_modules/@cchistory/canonical/dist/session-interpreter.js +713 -0
  70. package/node_modules/@cchistory/canonical/dist/session-interpreter.js.map +1 -0
  71. package/node_modules/@cchistory/canonical/dist/session-interpreter.test.d.ts +2 -0
  72. package/node_modules/@cchistory/canonical/dist/session-interpreter.test.d.ts.map +1 -0
  73. package/node_modules/@cchistory/canonical/dist/session-interpreter.test.js +56 -0
  74. package/node_modules/@cchistory/canonical/dist/session-interpreter.test.js.map +1 -0
  75. package/node_modules/@cchistory/canonical/package.json +1 -1
  76. package/node_modules/@cchistory/domain/dist/evidence-atoms.d.ts +7 -0
  77. package/node_modules/@cchistory/domain/dist/evidence-atoms.d.ts.map +1 -0
  78. package/node_modules/@cchistory/domain/dist/evidence-atoms.js +36 -0
  79. package/node_modules/@cchistory/domain/dist/evidence-atoms.js.map +1 -0
  80. package/node_modules/@cchistory/domain/dist/evidence-values.d.ts +26 -0
  81. package/node_modules/@cchistory/domain/dist/evidence-values.d.ts.map +1 -0
  82. package/node_modules/@cchistory/domain/dist/evidence-values.js +80 -0
  83. package/node_modules/@cchistory/domain/dist/evidence-values.js.map +1 -0
  84. package/node_modules/@cchistory/domain/dist/index.d.ts +6 -0
  85. package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
  86. package/node_modules/@cchistory/domain/dist/index.js +5 -0
  87. package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
  88. package/node_modules/@cchistory/domain/dist/masks.d.ts +31 -0
  89. package/node_modules/@cchistory/domain/dist/masks.d.ts.map +1 -0
  90. package/node_modules/@cchistory/domain/dist/masks.js +342 -0
  91. package/node_modules/@cchistory/domain/dist/masks.js.map +1 -0
  92. package/node_modules/@cchistory/domain/dist/parsed-session.d.ts +58 -0
  93. package/node_modules/@cchistory/domain/dist/parsed-session.d.ts.map +1 -0
  94. package/node_modules/@cchistory/domain/dist/parsed-session.js +2 -0
  95. package/node_modules/@cchistory/domain/dist/parsed-session.js.map +1 -0
  96. package/node_modules/@cchistory/domain/dist/query.d.ts +67 -0
  97. package/node_modules/@cchistory/domain/dist/query.d.ts.map +1 -0
  98. package/node_modules/@cchistory/domain/dist/query.js +2 -0
  99. package/node_modules/@cchistory/domain/dist/query.js.map +1 -0
  100. package/node_modules/@cchistory/domain/dist/token-evidence.d.ts +14 -0
  101. package/node_modules/@cchistory/domain/dist/token-evidence.d.ts.map +1 -0
  102. package/node_modules/@cchistory/domain/dist/token-evidence.js +247 -0
  103. package/node_modules/@cchistory/domain/dist/token-evidence.js.map +1 -0
  104. package/node_modules/@cchistory/domain/package.json +1 -1
  105. package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts +0 -1
  106. package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts.map +1 -1
  107. package/node_modules/@cchistory/live-runtime/dist/bootstrap.js +0 -1
  108. package/node_modules/@cchistory/live-runtime/dist/bootstrap.js.map +1 -1
  109. package/node_modules/@cchistory/live-runtime/dist/index.d.ts +30 -9
  110. package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
  111. package/node_modules/@cchistory/live-runtime/dist/index.js +263 -142
  112. package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
  113. package/node_modules/@cchistory/live-runtime/dist/index.test.js +177 -20
  114. package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
  115. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.d.ts +16 -0
  116. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.d.ts.map +1 -0
  117. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.js +55 -0
  118. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.js.map +1 -0
  119. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.d.ts +2 -0
  120. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.d.ts.map +1 -0
  121. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.js +192 -0
  122. package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.js.map +1 -0
  123. package/node_modules/@cchistory/live-runtime/dist/scan-guard.d.ts +21 -22
  124. package/node_modules/@cchistory/live-runtime/dist/scan-guard.d.ts.map +1 -1
  125. package/node_modules/@cchistory/live-runtime/dist/scan-guard.js +53 -41
  126. package/node_modules/@cchistory/live-runtime/dist/scan-guard.js.map +1 -1
  127. package/node_modules/@cchistory/live-runtime/dist/scan-guard.test.js +266 -57
  128. package/node_modules/@cchistory/live-runtime/dist/scan-guard.test.js.map +1 -1
  129. package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts +47 -0
  130. package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts.map +1 -0
  131. package/node_modules/@cchistory/live-runtime/dist/selective-query.js +15 -0
  132. package/node_modules/@cchistory/live-runtime/dist/selective-query.js.map +1 -0
  133. package/node_modules/@cchistory/live-runtime/dist/selective-query.test.d.ts +2 -0
  134. package/node_modules/@cchistory/live-runtime/dist/selective-query.test.d.ts.map +1 -0
  135. package/node_modules/@cchistory/live-runtime/dist/selective-query.test.js +166 -0
  136. package/node_modules/@cchistory/live-runtime/dist/selective-query.test.js.map +1 -0
  137. package/node_modules/@cchistory/live-runtime/dist/sql-query.d.ts +37 -0
  138. package/node_modules/@cchistory/live-runtime/dist/sql-query.d.ts.map +1 -0
  139. package/node_modules/@cchistory/live-runtime/dist/sql-query.js +301 -0
  140. package/node_modules/@cchistory/live-runtime/dist/sql-query.js.map +1 -0
  141. package/node_modules/@cchistory/live-runtime/dist/sql-query.test.d.ts +2 -0
  142. package/node_modules/@cchistory/live-runtime/dist/sql-query.test.d.ts.map +1 -0
  143. package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js +67 -0
  144. package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js.map +1 -0
  145. package/node_modules/@cchistory/live-runtime/dist/sql-worker.d.ts +2 -0
  146. package/node_modules/@cchistory/live-runtime/dist/sql-worker.d.ts.map +1 -0
  147. package/node_modules/@cchistory/live-runtime/dist/sql-worker.js +14 -0
  148. package/node_modules/@cchistory/live-runtime/dist/sql-worker.js.map +1 -0
  149. package/node_modules/@cchistory/live-runtime/dist/system-memory.d.ts +13 -10
  150. package/node_modules/@cchistory/live-runtime/dist/system-memory.d.ts.map +1 -1
  151. package/node_modules/@cchistory/live-runtime/dist/system-memory.js +61 -34
  152. package/node_modules/@cchistory/live-runtime/dist/system-memory.js.map +1 -1
  153. package/node_modules/@cchistory/live-runtime/dist/system-memory.test.d.ts +2 -0
  154. package/node_modules/@cchistory/live-runtime/dist/system-memory.test.d.ts.map +1 -0
  155. package/node_modules/@cchistory/live-runtime/dist/system-memory.test.js +76 -0
  156. package/node_modules/@cchistory/live-runtime/dist/system-memory.test.js.map +1 -0
  157. package/node_modules/@cchistory/live-runtime/package.json +1 -1
  158. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js +2 -1
  159. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js.map +1 -1
  160. package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts +2 -4
  161. package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts.map +1 -1
  162. package/node_modules/@cchistory/source-adapters/dist/core/factories.js +1 -23
  163. package/node_modules/@cchistory/source-adapters/dist/core/factories.js.map +1 -1
  164. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.d.ts +25 -0
  165. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.d.ts.map +1 -0
  166. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.js +80 -0
  167. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.js.map +1 -0
  168. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.d.ts +2 -0
  169. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.d.ts.map +1 -0
  170. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.js +122 -0
  171. package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.js.map +1 -0
  172. package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts +1 -1
  173. package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts.map +1 -1
  174. package/node_modules/@cchistory/source-adapters/dist/core/git-project.js +2 -11
  175. package/node_modules/@cchistory/source-adapters/dist/core/git-project.js.map +1 -1
  176. package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +2 -1
  177. package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
  178. package/node_modules/@cchistory/source-adapters/dist/core/parser.js +4 -4
  179. package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -1
  180. package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts +8 -6
  181. package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -1
  182. package/node_modules/@cchistory/source-adapters/dist/core/probe.js +54 -36
  183. package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -1
  184. package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts +2 -28
  185. package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts.map +1 -1
  186. package/node_modules/@cchistory/source-adapters/dist/core/projections.js +2 -695
  187. package/node_modules/@cchistory/source-adapters/dist/core/projections.js.map +1 -1
  188. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js +2 -1
  189. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js.map +1 -1
  190. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts +18 -0
  191. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts.map +1 -0
  192. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js +27 -0
  193. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js.map +1 -0
  194. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.d.ts +2 -0
  195. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.d.ts.map +1 -0
  196. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js +75 -0
  197. package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js.map +1 -0
  198. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts +6 -0
  199. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts.map +1 -1
  200. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js +1 -1
  201. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -1
  202. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js +1 -1
  203. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js.map +1 -1
  204. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts +1 -1
  205. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts.map +1 -1
  206. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js +1 -1
  207. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -1
  208. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts +1 -13
  209. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts.map +1 -1
  210. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js +1 -246
  211. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js.map +1 -1
  212. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js +1 -1
  213. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js.map +1 -1
  214. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts +1 -25
  215. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts.map +1 -1
  216. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js +1 -79
  217. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js.map +1 -1
  218. package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts +6 -35
  219. package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts.map +1 -1
  220. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts +2 -1
  221. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts.map +1 -1
  222. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js +14 -10
  223. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js.map +1 -1
  224. package/node_modules/@cchistory/source-adapters/dist/index.d.ts +6 -0
  225. package/node_modules/@cchistory/source-adapters/dist/index.d.ts.map +1 -1
  226. package/node_modules/@cchistory/source-adapters/dist/index.js +4 -0
  227. package/node_modules/@cchistory/source-adapters/dist/index.js.map +1 -1
  228. package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +2 -0
  229. package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts.map +1 -1
  230. package/node_modules/@cchistory/source-adapters/dist/index.test.js +2 -0
  231. package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -1
  232. package/node_modules/@cchistory/source-adapters/dist/masks.d.ts +1 -30
  233. package/node_modules/@cchistory/source-adapters/dist/masks.d.ts.map +1 -1
  234. package/node_modules/@cchistory/source-adapters/dist/masks.js +1 -341
  235. package/node_modules/@cchistory/source-adapters/dist/masks.js.map +1 -1
  236. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js +1 -1
  237. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js.map +1 -1
  238. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js +1 -1
  239. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js.map +1 -1
  240. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js +2 -1
  241. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js.map +1 -1
  242. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js +1 -1
  243. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js.map +1 -1
  244. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js +1 -1
  245. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js.map +1 -1
  246. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.d.ts +14 -0
  247. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.d.ts.map +1 -0
  248. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.js +103 -0
  249. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.js.map +1 -0
  250. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js +1 -1
  251. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js.map +1 -1
  252. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts +2 -1
  253. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts.map +1 -1
  254. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js +5 -3
  255. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js.map +1 -1
  256. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +2 -1
  257. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -1
  258. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js +2 -1
  259. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js.map +1 -1
  260. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js +1 -1
  261. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js.map +1 -1
  262. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js +2 -1
  263. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js.map +1 -1
  264. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts.map +1 -1
  265. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js +24 -1
  266. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js.map +1 -1
  267. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js +2 -1
  268. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js.map +1 -1
  269. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js +2 -1
  270. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js.map +1 -1
  271. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js +1 -1
  272. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js.map +1 -1
  273. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js +1 -1
  274. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js.map +1 -1
  275. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js +2 -1
  276. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js.map +1 -1
  277. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts +2 -1
  278. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts.map +1 -1
  279. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js +11 -9
  280. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js.map +1 -1
  281. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js +2 -1
  282. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js.map +1 -1
  283. package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.d.ts +8 -0
  284. package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.d.ts.map +1 -0
  285. package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.js +7 -0
  286. package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.js.map +1 -0
  287. package/node_modules/@cchistory/source-adapters/dist/test-helpers.js.map +1 -1
  288. package/node_modules/@cchistory/source-adapters/package.json +1 -1
  289. package/node_modules/commander/LICENSE +22 -0
  290. package/node_modules/commander/Readme.md +428 -0
  291. package/node_modules/commander/index.js +1224 -0
  292. package/node_modules/commander/package.json +38 -0
  293. package/node_modules/commander/typings/index.d.ts +310 -0
  294. package/node_modules/discontinuous-range/.npmignore +28 -0
  295. package/node_modules/discontinuous-range/.travis.yml +4 -0
  296. package/node_modules/discontinuous-range/LICENSE +21 -0
  297. package/node_modules/discontinuous-range/README.md +23 -0
  298. package/node_modules/discontinuous-range/index.js +144 -0
  299. package/node_modules/discontinuous-range/package.json +27 -0
  300. package/node_modules/discontinuous-range/test/main-test.js +96 -0
  301. package/node_modules/moo/LICENSE +29 -0
  302. package/node_modules/moo/README.md +385 -0
  303. package/node_modules/moo/moo.js +645 -0
  304. package/node_modules/moo/package.json +29 -0
  305. package/node_modules/nearley/LICENSE.txt +21 -0
  306. package/node_modules/nearley/README.md +80 -0
  307. package/node_modules/nearley/bin/nearley-railroad.js +121 -0
  308. package/node_modules/nearley/bin/nearley-test.js +64 -0
  309. package/node_modules/nearley/bin/nearley-unparse.js +29 -0
  310. package/node_modules/nearley/bin/nearleyc.js +38 -0
  311. package/node_modules/nearley/builtin/cow.ne +2 -0
  312. package/node_modules/nearley/builtin/number.ne +51 -0
  313. package/node_modules/nearley/builtin/postprocessors.ne +36 -0
  314. package/node_modules/nearley/builtin/string.ne +26 -0
  315. package/node_modules/nearley/builtin/whitespace.ne +5 -0
  316. package/node_modules/nearley/lib/compile.js +307 -0
  317. package/node_modules/nearley/lib/generate.js +244 -0
  318. package/node_modules/nearley/lib/lint.js +28 -0
  319. package/node_modules/nearley/lib/nearley-language-bootstrapped.js +132 -0
  320. package/node_modules/nearley/lib/nearley-language-bootstrapped.ne +126 -0
  321. package/node_modules/nearley/lib/nearley.js +564 -0
  322. package/node_modules/nearley/lib/stream.js +18 -0
  323. package/node_modules/nearley/lib/unparse.js +139 -0
  324. package/node_modules/nearley/package.json +63 -0
  325. package/node_modules/pgsql-ast-parser/ast-mapper.d.ts +237 -0
  326. package/node_modules/pgsql-ast-parser/ast-mapper.d.ts.map +1 -0
  327. package/node_modules/pgsql-ast-parser/ast-mapper.spec.d.ts +3 -0
  328. package/node_modules/pgsql-ast-parser/ast-mapper.spec.d.ts.map +1 -0
  329. package/node_modules/pgsql-ast-parser/ast-visitor.d.ts +33 -0
  330. package/node_modules/pgsql-ast-parser/ast-visitor.d.ts.map +1 -0
  331. package/node_modules/pgsql-ast-parser/ast-visitor.spec.d.ts +3 -0
  332. package/node_modules/pgsql-ast-parser/ast-visitor.spec.d.ts.map +1 -0
  333. package/node_modules/pgsql-ast-parser/index.d.ts +11 -0
  334. package/node_modules/pgsql-ast-parser/index.d.ts.map +1 -0
  335. package/node_modules/pgsql-ast-parser/index.js +6484 -0
  336. package/node_modules/pgsql-ast-parser/index.js.map +1 -0
  337. package/node_modules/pgsql-ast-parser/interfaces.d.ts +1 -0
  338. package/node_modules/pgsql-ast-parser/interfaces.d.ts.map +1 -0
  339. package/node_modules/pgsql-ast-parser/keywords.d.ts +2 -0
  340. package/node_modules/pgsql-ast-parser/keywords.d.ts.map +1 -0
  341. package/node_modules/pgsql-ast-parser/lexer.d.ts +15 -0
  342. package/node_modules/pgsql-ast-parser/lexer.d.ts.map +1 -0
  343. package/node_modules/pgsql-ast-parser/lexer.spec.d.ts +3 -0
  344. package/node_modules/pgsql-ast-parser/lexer.spec.d.ts.map +1 -0
  345. package/node_modules/pgsql-ast-parser/literal-syntaxes/array-lexer.d.ts +3 -0
  346. package/node_modules/pgsql-ast-parser/literal-syntaxes/array-lexer.d.ts.map +1 -0
  347. package/node_modules/pgsql-ast-parser/literal-syntaxes/array.ne.d.ts +29 -0
  348. package/node_modules/pgsql-ast-parser/literal-syntaxes/array.ne.d.ts.map +1 -0
  349. package/node_modules/pgsql-ast-parser/literal-syntaxes/array.spec.d.ts +3 -0
  350. package/node_modules/pgsql-ast-parser/literal-syntaxes/array.spec.d.ts.map +1 -0
  351. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric-lexer.d.ts +3 -0
  352. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric-lexer.d.ts.map +1 -0
  353. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.ne.d.ts +29 -0
  354. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.ne.d.ts.map +1 -0
  355. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.spec.d.ts +3 -0
  356. package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.spec.d.ts.map +1 -0
  357. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-builder.d.ts +10 -0
  358. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-builder.d.ts.map +1 -0
  359. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso-lexer.d.ts +3 -0
  360. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso-lexer.d.ts.map +1 -0
  361. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso.ne.d.ts +29 -0
  362. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso.ne.d.ts.map +1 -0
  363. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-lexer.d.ts +3 -0
  364. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-lexer.d.ts.map +1 -0
  365. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.ne.d.ts +29 -0
  366. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.ne.d.ts.map +1 -0
  367. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.spec.d.ts +3 -0
  368. package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.spec.d.ts.map +1 -0
  369. package/node_modules/pgsql-ast-parser/package.json +69 -0
  370. package/node_modules/pgsql-ast-parser/parser.d.ts +33 -0
  371. package/node_modules/pgsql-ast-parser/parser.d.ts.map +1 -0
  372. package/node_modules/pgsql-ast-parser/pg-escape.d.ts +2 -0
  373. package/node_modules/pgsql-ast-parser/pg-escape.d.ts.map +1 -0
  374. package/node_modules/pgsql-ast-parser/readme.md +255 -0
  375. package/node_modules/pgsql-ast-parser/src/ast-mapper.spec.ts +296 -0
  376. package/node_modules/pgsql-ast-parser/src/ast-mapper.ts +1378 -0
  377. package/node_modules/pgsql-ast-parser/src/ast-visitor.spec.ts +57 -0
  378. package/node_modules/pgsql-ast-parser/src/ast-visitor.ts +101 -0
  379. package/node_modules/pgsql-ast-parser/src/index.ts +10 -0
  380. package/node_modules/pgsql-ast-parser/src/interfaces.ts +0 -0
  381. package/node_modules/pgsql-ast-parser/src/keywords.ts +8 -0
  382. package/node_modules/pgsql-ast-parser/src/lexer.spec.ts +245 -0
  383. package/node_modules/pgsql-ast-parser/src/lexer.ts +267 -0
  384. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array-lexer.ts +27 -0
  385. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array.ne +18 -0
  386. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array.spec.ts +55 -0
  387. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric-lexer.ts +26 -0
  388. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric.ne +88 -0
  389. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric.spec.ts +131 -0
  390. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-builder.ts +148 -0
  391. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-iso-lexer.ts +17 -0
  392. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-iso.ne +53 -0
  393. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-lexer.ts +26 -0
  394. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval.ne +54 -0
  395. package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval.spec.ts +106 -0
  396. package/node_modules/pgsql-ast-parser/src/parser.ts +142 -0
  397. package/node_modules/pgsql-ast-parser/src/pg-escape.ts +14 -0
  398. package/node_modules/pgsql-ast-parser/src/syntax/alter-index.ne +29 -0
  399. package/node_modules/pgsql-ast-parser/src/syntax/alter-index.spec.ts +35 -0
  400. package/node_modules/pgsql-ast-parser/src/syntax/alter-table.ne +123 -0
  401. package/node_modules/pgsql-ast-parser/src/syntax/alter-table.spec.ts +476 -0
  402. package/node_modules/pgsql-ast-parser/src/syntax/alter-type.ne +33 -0
  403. package/node_modules/pgsql-ast-parser/src/syntax/alter-type.spec.ts +29 -0
  404. package/node_modules/pgsql-ast-parser/src/syntax/ast.ts +1150 -0
  405. package/node_modules/pgsql-ast-parser/src/syntax/base.ne +369 -0
  406. package/node_modules/pgsql-ast-parser/src/syntax/create-extension.ne +17 -0
  407. package/node_modules/pgsql-ast-parser/src/syntax/create-extension.spec.ts +37 -0
  408. package/node_modules/pgsql-ast-parser/src/syntax/create-index.ne +62 -0
  409. package/node_modules/pgsql-ast-parser/src/syntax/create-index.spec.ts +245 -0
  410. package/node_modules/pgsql-ast-parser/src/syntax/create-table.ne +174 -0
  411. package/node_modules/pgsql-ast-parser/src/syntax/create-table.spec.ts +761 -0
  412. package/node_modules/pgsql-ast-parser/src/syntax/create-type.ne +40 -0
  413. package/node_modules/pgsql-ast-parser/src/syntax/create-type.spec.ts +32 -0
  414. package/node_modules/pgsql-ast-parser/src/syntax/create-view.ne +68 -0
  415. package/node_modules/pgsql-ast-parser/src/syntax/create-view.spec.ts +187 -0
  416. package/node_modules/pgsql-ast-parser/src/syntax/deallocate.ne +13 -0
  417. package/node_modules/pgsql-ast-parser/src/syntax/deallocate.spec.ts +19 -0
  418. package/node_modules/pgsql-ast-parser/src/syntax/delete.ne +36 -0
  419. package/node_modules/pgsql-ast-parser/src/syntax/delete.spec.ts +71 -0
  420. package/node_modules/pgsql-ast-parser/src/syntax/drop.ne +28 -0
  421. package/node_modules/pgsql-ast-parser/src/syntax/drop.spec.ts +77 -0
  422. package/node_modules/pgsql-ast-parser/src/syntax/edge-cases.spec.ts +41 -0
  423. package/node_modules/pgsql-ast-parser/src/syntax/expr.ne +350 -0
  424. package/node_modules/pgsql-ast-parser/src/syntax/expr.spec.ts +1638 -0
  425. package/node_modules/pgsql-ast-parser/src/syntax/functions.ne +114 -0
  426. package/node_modules/pgsql-ast-parser/src/syntax/functions.spec.ts +235 -0
  427. package/node_modules/pgsql-ast-parser/src/syntax/insert.ne +63 -0
  428. package/node_modules/pgsql-ast-parser/src/syntax/insert.spec.ts +292 -0
  429. package/node_modules/pgsql-ast-parser/src/syntax/main.ne +77 -0
  430. package/node_modules/pgsql-ast-parser/src/syntax/nearley.d.ts +3 -0
  431. package/node_modules/pgsql-ast-parser/src/syntax/prepare.ne +8 -0
  432. package/node_modules/pgsql-ast-parser/src/syntax/prepare.spec.ts +44 -0
  433. package/node_modules/pgsql-ast-parser/src/syntax/refresh-materialized-view.ne +19 -0
  434. package/node_modules/pgsql-ast-parser/src/syntax/refresh-materialized-view.spec.ts +42 -0
  435. package/node_modules/pgsql-ast-parser/src/syntax/select.ne +223 -0
  436. package/node_modules/pgsql-ast-parser/src/syntax/select.spec.ts +1063 -0
  437. package/node_modules/pgsql-ast-parser/src/syntax/sequence.ne +101 -0
  438. package/node_modules/pgsql-ast-parser/src/syntax/sequence.spec.ts +103 -0
  439. package/node_modules/pgsql-ast-parser/src/syntax/simple-statements.ne +168 -0
  440. package/node_modules/pgsql-ast-parser/src/syntax/simple-statements.spec.ts +327 -0
  441. package/node_modules/pgsql-ast-parser/src/syntax/spec-utils.ts +333 -0
  442. package/node_modules/pgsql-ast-parser/src/syntax/union.ne +18 -0
  443. package/node_modules/pgsql-ast-parser/src/syntax/union.spec.ts +125 -0
  444. package/node_modules/pgsql-ast-parser/src/syntax/update.ne +56 -0
  445. package/node_modules/pgsql-ast-parser/src/syntax/update.spec.ts +87 -0
  446. package/node_modules/pgsql-ast-parser/src/syntax/with.ne +41 -0
  447. package/node_modules/pgsql-ast-parser/src/syntax/with.spec.ts +155 -0
  448. package/node_modules/pgsql-ast-parser/src/to-sql.spec.ts +85 -0
  449. package/node_modules/pgsql-ast-parser/src/to-sql.ts +1555 -0
  450. package/node_modules/pgsql-ast-parser/src/utils.ts +47 -0
  451. package/node_modules/pgsql-ast-parser/syntax/alter-index.spec.d.ts +3 -0
  452. package/node_modules/pgsql-ast-parser/syntax/alter-index.spec.d.ts.map +1 -0
  453. package/node_modules/pgsql-ast-parser/syntax/alter-table.spec.d.ts +3 -0
  454. package/node_modules/pgsql-ast-parser/syntax/alter-table.spec.d.ts.map +1 -0
  455. package/node_modules/pgsql-ast-parser/syntax/alter-type.spec.d.ts +3 -0
  456. package/node_modules/pgsql-ast-parser/syntax/alter-type.spec.d.ts.map +1 -0
  457. package/node_modules/pgsql-ast-parser/syntax/ast.d.ts +826 -0
  458. package/node_modules/pgsql-ast-parser/syntax/ast.d.ts.map +1 -0
  459. package/node_modules/pgsql-ast-parser/syntax/create-extension.spec.d.ts +3 -0
  460. package/node_modules/pgsql-ast-parser/syntax/create-extension.spec.d.ts.map +1 -0
  461. package/node_modules/pgsql-ast-parser/syntax/create-index.spec.d.ts +3 -0
  462. package/node_modules/pgsql-ast-parser/syntax/create-index.spec.d.ts.map +1 -0
  463. package/node_modules/pgsql-ast-parser/syntax/create-table.spec.d.ts +3 -0
  464. package/node_modules/pgsql-ast-parser/syntax/create-table.spec.d.ts.map +1 -0
  465. package/node_modules/pgsql-ast-parser/syntax/create-type.spec.d.ts +3 -0
  466. package/node_modules/pgsql-ast-parser/syntax/create-type.spec.d.ts.map +1 -0
  467. package/node_modules/pgsql-ast-parser/syntax/create-view.spec.d.ts +3 -0
  468. package/node_modules/pgsql-ast-parser/syntax/create-view.spec.d.ts.map +1 -0
  469. package/node_modules/pgsql-ast-parser/syntax/deallocate.spec.d.ts +3 -0
  470. package/node_modules/pgsql-ast-parser/syntax/deallocate.spec.d.ts.map +1 -0
  471. package/node_modules/pgsql-ast-parser/syntax/delete.spec.d.ts +3 -0
  472. package/node_modules/pgsql-ast-parser/syntax/delete.spec.d.ts.map +1 -0
  473. package/node_modules/pgsql-ast-parser/syntax/drop.spec.d.ts +3 -0
  474. package/node_modules/pgsql-ast-parser/syntax/drop.spec.d.ts.map +1 -0
  475. package/node_modules/pgsql-ast-parser/syntax/edge-cases.spec.d.ts +3 -0
  476. package/node_modules/pgsql-ast-parser/syntax/edge-cases.spec.d.ts.map +1 -0
  477. package/node_modules/pgsql-ast-parser/syntax/expr.spec.d.ts +3 -0
  478. package/node_modules/pgsql-ast-parser/syntax/expr.spec.d.ts.map +1 -0
  479. package/node_modules/pgsql-ast-parser/syntax/functions.spec.d.ts +3 -0
  480. package/node_modules/pgsql-ast-parser/syntax/functions.spec.d.ts.map +1 -0
  481. package/node_modules/pgsql-ast-parser/syntax/insert.spec.d.ts +3 -0
  482. package/node_modules/pgsql-ast-parser/syntax/insert.spec.d.ts.map +1 -0
  483. package/node_modules/pgsql-ast-parser/syntax/main.ne.d.ts +29 -0
  484. package/node_modules/pgsql-ast-parser/syntax/main.ne.d.ts.map +1 -0
  485. package/node_modules/pgsql-ast-parser/syntax/prepare.spec.d.ts +3 -0
  486. package/node_modules/pgsql-ast-parser/syntax/prepare.spec.d.ts.map +1 -0
  487. package/node_modules/pgsql-ast-parser/syntax/refresh-materialized-view.spec.d.ts +3 -0
  488. package/node_modules/pgsql-ast-parser/syntax/refresh-materialized-view.spec.d.ts.map +1 -0
  489. package/node_modules/pgsql-ast-parser/syntax/select.spec.d.ts +3 -0
  490. package/node_modules/pgsql-ast-parser/syntax/select.spec.d.ts.map +1 -0
  491. package/node_modules/pgsql-ast-parser/syntax/sequence.spec.d.ts +3 -0
  492. package/node_modules/pgsql-ast-parser/syntax/sequence.spec.d.ts.map +1 -0
  493. package/node_modules/pgsql-ast-parser/syntax/simple-statements.spec.d.ts +3 -0
  494. package/node_modules/pgsql-ast-parser/syntax/simple-statements.spec.d.ts.map +1 -0
  495. package/node_modules/pgsql-ast-parser/syntax/spec-utils.d.ts +35 -0
  496. package/node_modules/pgsql-ast-parser/syntax/spec-utils.d.ts.map +1 -0
  497. package/node_modules/pgsql-ast-parser/syntax/union.spec.d.ts +3 -0
  498. package/node_modules/pgsql-ast-parser/syntax/union.spec.d.ts.map +1 -0
  499. package/node_modules/pgsql-ast-parser/syntax/update.spec.d.ts +3 -0
  500. package/node_modules/pgsql-ast-parser/syntax/update.spec.d.ts.map +1 -0
  501. package/node_modules/pgsql-ast-parser/syntax/with.spec.d.ts +3 -0
  502. package/node_modules/pgsql-ast-parser/syntax/with.spec.d.ts.map +1 -0
  503. package/node_modules/pgsql-ast-parser/to-sql.d.ts +7 -0
  504. package/node_modules/pgsql-ast-parser/to-sql.d.ts.map +1 -0
  505. package/node_modules/pgsql-ast-parser/to-sql.spec.d.ts +3 -0
  506. package/node_modules/pgsql-ast-parser/to-sql.spec.d.ts.map +1 -0
  507. package/node_modules/pgsql-ast-parser/utils.d.ts +16 -0
  508. package/node_modules/pgsql-ast-parser/utils.d.ts.map +1 -0
  509. package/node_modules/railroad-diagrams/.gitattributes +22 -0
  510. package/node_modules/railroad-diagrams/.npmignore +163 -0
  511. package/node_modules/railroad-diagrams/README.md +86 -0
  512. package/node_modules/railroad-diagrams/css-example.py-js +183 -0
  513. package/node_modules/railroad-diagrams/example.html +141 -0
  514. package/node_modules/railroad-diagrams/generator.html +59 -0
  515. package/node_modules/railroad-diagrams/package.json +23 -0
  516. package/node_modules/railroad-diagrams/railroad-diagrams.css +23 -0
  517. package/node_modules/railroad-diagrams/railroad-diagrams.js +524 -0
  518. package/node_modules/railroad-diagrams/railroad_diagrams.py +427 -0
  519. package/node_modules/randexp/LICENSE +19 -0
  520. package/node_modules/randexp/README.md +134 -0
  521. package/node_modules/randexp/lib/randexp.js +245 -0
  522. package/node_modules/randexp/package.json +48 -0
  523. package/node_modules/ret/LICENSE +19 -0
  524. package/node_modules/ret/README.md +183 -0
  525. package/node_modules/ret/lib/index.js +282 -0
  526. package/node_modules/ret/lib/positions.js +17 -0
  527. package/node_modules/ret/lib/sets.js +82 -0
  528. package/node_modules/ret/lib/types.js +10 -0
  529. package/node_modules/ret/lib/util.js +111 -0
  530. package/node_modules/ret/package.json +35 -0
  531. package/package.json +22 -6
  532. package/schemas/cchistory-lite-agent-v1.schema.json +6 -7
  533. package/schemas/cchistory-lite-error-v1.schema.json +58 -8
  534. package/schemas/cchistory-lite-query-result-v2.schema.json +66 -11
  535. package/schemas/cchistory-lite-query-result-v3.schema.json +219 -0
  536. package/schemas/cchistory-lite-query-v3.schema.json +57 -0
  537. package/schemas/cchistory-lite-source-inventory-v1.schema.json +72 -0
  538. package/skills/using-cchistory-lite/SKILL.md +125 -55
  539. package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts +0 -8
  540. package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts.map +0 -1
  541. package/node_modules/@cchistory/live-runtime/dist/node-memory.js +0 -110
  542. package/node_modules/@cchistory/live-runtime/dist/node-memory.js.map +0 -1
@@ -0,0 +1,342 @@
1
+ export const LITERAL_PROMPT_MASK_TEMPLATE_IDS = [
2
+ "mask-agents-md-instructions",
3
+ "mask-standalone-instructions-block",
4
+ "mask-environment-context-block",
5
+ "mask-system-reminder-block",
6
+ "mask-codex-skills-catalog",
7
+ "mask-skills-instructions-block",
8
+ "mask-permissions-instructions-block",
9
+ "mask-collaboration-mode-block",
10
+ "mask-recommended-plugins-block",
11
+ ];
12
+ const BUILTIN_MASK_TEMPLATES = [
13
+ {
14
+ id: "mask-agents-md-instructions",
15
+ name: "AGENTS.md Instructions",
16
+ description: "Collapses injected AGENTS.md scaffolding while preserving the original evidence for expansion.",
17
+ match_type: "regex",
18
+ match_pattern: "# AGENTS\\.md instructions[^\\n]*\\n\\n<INSTRUCTIONS>[\\s\\S]*?</INSTRUCTIONS>",
19
+ action: "collapse",
20
+ collapse_label: "Agent Instructions",
21
+ priority: 0,
22
+ applies_to: ["user_message", "system_message"],
23
+ is_builtin: true,
24
+ is_active: true,
25
+ created_at: "2026-03-12T00:00:00.000Z",
26
+ updated_at: "2026-03-12T00:00:00.000Z",
27
+ },
28
+ {
29
+ id: "mask-standalone-instructions-block",
30
+ name: "Standalone Instructions Block",
31
+ description: "Collapses injected instruction envelopes that arrive without an AGENTS.md heading.",
32
+ match_type: "regex",
33
+ match_pattern: "<INSTRUCTIONS>[\\s\\S]*?</INSTRUCTIONS>",
34
+ action: "collapse",
35
+ collapse_label: "Instructions",
36
+ priority: 1,
37
+ applies_to: ["user_message", "system_message"],
38
+ is_builtin: true,
39
+ is_active: true,
40
+ created_at: "2026-03-12T00:00:00.000Z",
41
+ updated_at: "2026-03-12T00:00:00.000Z",
42
+ },
43
+ {
44
+ id: "mask-environment-context-block",
45
+ name: "Environment Context",
46
+ description: "Collapses injected execution environment envelopes while preserving expandable evidence.",
47
+ match_type: "regex",
48
+ match_pattern: "<environment_context>[\\s\\S]*?</environment_context>",
49
+ action: "collapse",
50
+ collapse_label: "Environment Context",
51
+ priority: 2,
52
+ applies_to: ["user_message", "system_message"],
53
+ is_builtin: true,
54
+ is_active: true,
55
+ created_at: "2026-03-12T00:00:00.000Z",
56
+ updated_at: "2026-03-12T00:00:00.000Z",
57
+ },
58
+ {
59
+ id: "mask-system-reminder-block",
60
+ name: "System Reminder",
61
+ description: "Collapses injected reminder envelopes in captured user-shaped text.",
62
+ match_type: "regex",
63
+ match_pattern: "<system-reminder>[\\s\\S]*?</system-reminder>",
64
+ action: "collapse",
65
+ collapse_label: "System Reminder",
66
+ priority: 3,
67
+ applies_to: ["user_message", "system_message"],
68
+ is_builtin: true,
69
+ is_active: true,
70
+ created_at: "2026-03-12T00:00:00.000Z",
71
+ updated_at: "2026-03-12T00:00:00.000Z",
72
+ },
73
+ {
74
+ id: "mask-codex-skills-catalog",
75
+ name: "Codex Skills Catalog",
76
+ description: "Collapses the injected Codex skills catalog that precedes a user request.",
77
+ match_type: "regex",
78
+ match_pattern: "## Skills\\nA skill is a set of local instructions[\\s\\S]*?</INSTRUCTIONS>",
79
+ action: "collapse",
80
+ collapse_label: "Skills Instructions",
81
+ priority: 4,
82
+ applies_to: ["user_message", "system_message"],
83
+ is_builtin: true,
84
+ is_active: true,
85
+ created_at: "2026-08-11T00:00:00.000Z",
86
+ updated_at: "2026-08-11T00:00:00.000Z",
87
+ },
88
+ {
89
+ id: "mask-skills-instructions-block",
90
+ name: "Skills Instructions Block",
91
+ description: "Collapses structured injected skills instructions.",
92
+ match_type: "regex",
93
+ match_pattern: "<skills_instructions>[\\s\\S]*?</skills_instructions>",
94
+ action: "collapse",
95
+ collapse_label: "Skills Instructions",
96
+ priority: 5,
97
+ applies_to: ["user_message", "system_message"],
98
+ is_builtin: true,
99
+ is_active: true,
100
+ created_at: "2026-08-11T00:00:00.000Z",
101
+ updated_at: "2026-08-11T00:00:00.000Z",
102
+ },
103
+ {
104
+ id: "mask-permissions-instructions-block",
105
+ name: "Permissions Instructions Block",
106
+ description: "Collapses structured injected permission instructions.",
107
+ match_type: "regex",
108
+ match_pattern: "<permissions instructions>[\\s\\S]*?</permissions instructions>",
109
+ action: "collapse",
110
+ collapse_label: "Permissions Instructions",
111
+ priority: 6,
112
+ applies_to: ["user_message", "system_message"],
113
+ is_builtin: true,
114
+ is_active: true,
115
+ created_at: "2026-08-11T00:00:00.000Z",
116
+ updated_at: "2026-08-11T00:00:00.000Z",
117
+ },
118
+ {
119
+ id: "mask-collaboration-mode-block",
120
+ name: "Collaboration Mode Block",
121
+ description: "Collapses structured injected collaboration-mode instructions.",
122
+ match_type: "regex",
123
+ match_pattern: "<collaboration_mode>[\\s\\S]*?</collaboration_mode>",
124
+ action: "collapse",
125
+ collapse_label: "Collaboration Mode",
126
+ priority: 7,
127
+ applies_to: ["user_message", "system_message"],
128
+ is_builtin: true,
129
+ is_active: true,
130
+ created_at: "2026-08-11T00:00:00.000Z",
131
+ updated_at: "2026-08-11T00:00:00.000Z",
132
+ },
133
+ {
134
+ id: "mask-recommended-plugins-block",
135
+ name: "Recommended Plugins Catalog",
136
+ description: "Collapses the injected Codex plugin catalog that precedes a user request.",
137
+ match_type: "regex",
138
+ match_pattern: "<recommended_plugins>[\\s\\S]*?</recommended_plugins>",
139
+ action: "collapse",
140
+ collapse_label: "Recommended Plugins",
141
+ priority: 8,
142
+ applies_to: ["user_message", "system_message"],
143
+ is_builtin: true,
144
+ is_active: true,
145
+ created_at: "2026-08-30T00:00:00.000Z",
146
+ updated_at: "2026-08-30T00:00:00.000Z",
147
+ },
148
+ {
149
+ id: "mask-system-prompt-prefix",
150
+ name: "System Prompt Prefix",
151
+ description: "Collapses assistant or system prompt prefixes that start with common agent instructions.",
152
+ match_type: "prefix",
153
+ match_pattern: "You are",
154
+ action: "collapse",
155
+ collapse_label: "System Prompt",
156
+ priority: 8,
157
+ applies_to: ["system_message", "assistant_reply"],
158
+ is_builtin: true,
159
+ is_active: true,
160
+ created_at: "2026-03-09T00:00:00.000Z",
161
+ updated_at: "2026-03-09T00:00:00.000Z",
162
+ },
163
+ {
164
+ id: "mask-openai-key",
165
+ name: "OpenAI API Key",
166
+ description: "Collapses OpenAI-style API keys.",
167
+ match_type: "regex",
168
+ match_pattern: "sk-[A-Za-z0-9]{20,}",
169
+ action: "collapse",
170
+ collapse_label: "API Key",
171
+ priority: 9,
172
+ applies_to: ["user_message", "system_message", "assistant_reply", "tool_input", "tool_output"],
173
+ is_builtin: true,
174
+ is_active: true,
175
+ created_at: "2026-03-09T00:00:00.000Z",
176
+ updated_at: "2026-03-09T00:00:00.000Z",
177
+ },
178
+ {
179
+ id: "mask-private-key",
180
+ name: "Private Key Block",
181
+ description: "Collapses PEM and SSH private key blocks.",
182
+ match_type: "regex",
183
+ match_pattern: "-----BEGIN [A-Z ]*PRIVATE KEY-----[\\s\\S]*?-----END [A-Z ]*PRIVATE KEY-----",
184
+ action: "collapse",
185
+ collapse_label: "Private Key",
186
+ priority: 10,
187
+ applies_to: ["user_message", "system_message", "assistant_reply", "tool_input", "tool_output"],
188
+ is_builtin: true,
189
+ is_active: true,
190
+ created_at: "2026-03-09T00:00:00.000Z",
191
+ updated_at: "2026-03-09T00:00:00.000Z",
192
+ },
193
+ {
194
+ id: "mask-bearer-token",
195
+ name: "Bearer Token",
196
+ description: "Collapses bearer tokens in tool payloads and messages.",
197
+ match_type: "regex",
198
+ match_pattern: "Bearer\\s+[A-Za-z0-9._\\-]{16,}",
199
+ action: "collapse",
200
+ collapse_label: "Bearer Token",
201
+ priority: 11,
202
+ applies_to: ["user_message", "system_message", "assistant_reply", "tool_input", "tool_output"],
203
+ is_builtin: true,
204
+ is_active: true,
205
+ created_at: "2026-03-09T00:00:00.000Z",
206
+ updated_at: "2026-03-09T00:00:00.000Z",
207
+ },
208
+ ];
209
+ export function getBuiltinMaskTemplates() {
210
+ return BUILTIN_MASK_TEMPLATES.map((template) => ({ ...template, applies_to: [...template.applies_to] }));
211
+ }
212
+ export function applyMaskTemplates(rawText, context, options = {}) {
213
+ if (rawText.length === 0) {
214
+ return { display_segments: [{ type: options.injected ? "injected" : "text", content: "" }], canonical_text: "" };
215
+ }
216
+ const excludedTemplateIds = new Set(options.exclude_template_ids ?? []);
217
+ const templates = getBuiltinMaskTemplates()
218
+ .filter((template) => template.is_active &&
219
+ template.applies_to.includes(context) &&
220
+ !excludedTemplateIds.has(template.id))
221
+ .sort((left, right) => left.priority - right.priority);
222
+ const regions = [];
223
+ for (const template of templates) {
224
+ for (const region of findMatches(rawText, template)) {
225
+ if (regions.some((existing) => overlaps(region, existing))) {
226
+ continue;
227
+ }
228
+ regions.push(region);
229
+ }
230
+ }
231
+ regions.sort((left, right) => left.start - right.start);
232
+ const displaySegments = [];
233
+ let cursor = 0;
234
+ for (const region of regions) {
235
+ if (region.start > cursor) {
236
+ displaySegments.push({
237
+ type: options.injected ? "injected" : "text",
238
+ content: rawText.slice(cursor, region.start),
239
+ });
240
+ }
241
+ displaySegments.push({
242
+ type: "masked",
243
+ content: `[MASKED: ${region.template.collapse_label}]`,
244
+ mask_label: region.template.collapse_label,
245
+ mask_char_count: region.content.length,
246
+ mask_template_id: region.template.id,
247
+ original_content: region.content,
248
+ is_expanded: false,
249
+ });
250
+ cursor = region.end;
251
+ }
252
+ if (cursor < rawText.length) {
253
+ displaySegments.push({
254
+ type: options.injected ? "injected" : "text",
255
+ content: rawText.slice(cursor),
256
+ });
257
+ }
258
+ const canonicalText = extractCanonicalText(displaySegments);
259
+ return {
260
+ display_segments: displaySegments.length > 0 ? displaySegments : [{ type: options.injected ? "injected" : "text", content: rawText }],
261
+ canonical_text: canonicalText,
262
+ };
263
+ }
264
+ export function extractCanonicalText(segments) {
265
+ return segments
266
+ .map((segment) => {
267
+ if (segment.type === "masked" || segment.type === "injected") {
268
+ return "";
269
+ }
270
+ return segment.content;
271
+ })
272
+ .join("")
273
+ .replace(/[ \t]+\n/g, "\n")
274
+ .replace(/\n{3,}/g, "\n\n")
275
+ .trim();
276
+ }
277
+ function findMatches(rawText, template) {
278
+ if (template.match_type === "prefix") {
279
+ if (!rawText.startsWith(template.match_pattern)) {
280
+ return [];
281
+ }
282
+ return [
283
+ {
284
+ start: 0,
285
+ end: findPrefixEnd(rawText),
286
+ content: rawText.slice(0, findPrefixEnd(rawText)),
287
+ template,
288
+ },
289
+ ];
290
+ }
291
+ if (template.match_type === "contains") {
292
+ const regions = [];
293
+ let cursor = 0;
294
+ while (cursor < rawText.length) {
295
+ const foundAt = rawText.indexOf(template.match_pattern, cursor);
296
+ if (foundAt < 0) {
297
+ break;
298
+ }
299
+ regions.push({
300
+ start: foundAt,
301
+ end: foundAt + template.match_pattern.length,
302
+ content: rawText.slice(foundAt, foundAt + template.match_pattern.length),
303
+ template,
304
+ });
305
+ cursor = foundAt + template.match_pattern.length;
306
+ }
307
+ return regions;
308
+ }
309
+ try {
310
+ const regex = new RegExp(template.match_pattern, "g");
311
+ const regions = [];
312
+ for (let match = regex.exec(rawText); match; match = regex.exec(rawText)) {
313
+ regions.push({
314
+ start: match.index,
315
+ end: match.index + match[0].length,
316
+ content: match[0],
317
+ template,
318
+ });
319
+ if (match[0].length === 0) {
320
+ regex.lastIndex += 1;
321
+ }
322
+ }
323
+ return regions;
324
+ }
325
+ catch {
326
+ return [];
327
+ }
328
+ }
329
+ function findPrefixEnd(rawText) {
330
+ const separatorCandidates = ["\n\n====", "\n\n---", "\n\nUser:", "\n\nHuman:", "\n\n# "];
331
+ for (const separator of separatorCandidates) {
332
+ const index = rawText.indexOf(separator);
333
+ if (index >= 0) {
334
+ return index;
335
+ }
336
+ }
337
+ return Math.min(rawText.length, 4000);
338
+ }
339
+ function overlaps(left, right) {
340
+ return left.start < right.end && right.start < left.end;
341
+ }
342
+ //# sourceMappingURL=masks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masks.js","sourceRoot":"","sources":["../src/masks.ts"],"names":[],"mappings":"AAuCA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,6BAA6B;IAC7B,oCAAoC;IACpC,gCAAgC;IAChC,4BAA4B;IAC5B,2BAA2B;IAC3B,gCAAgC;IAChC,qCAAqC;IACrC,+BAA+B;IAC/B,gCAAgC;CACxB,CAAC;AAEX,MAAM,sBAAsB,GAAmC;IAC7D;QACE,EAAE,EAAE,6BAA6B;QACjC,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,gGAAgG;QAC7G,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,gFAAgF;QAC/F,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE,oBAAoB;QACpC,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;QAC9C,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,0BAA0B;QACtC,UAAU,EAAE,0BAA0B;KACvC;IACD;QACE,EAAE,EAAE,oCAAoC;QACxC,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,oFAAoF;QACjG,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,yCAAyC;QACxD,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;QAC9C,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,0BAA0B;QACtC,UAAU,EAAE,0BAA0B;KAC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CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { AtomEdge, CapturedBlob, ConversationAtom, DerivedCandidate, RawRecord, SessionProjection, SourceFragment, SourcePlatform, TurnContextProjection, UserTurnProjection } from "./index.js";
2
+ /** Source metadata after native fragments have been reconciled. No snapshot or I/O owner. */
3
+ export interface ParsedSessionMetadata {
4
+ id: string;
5
+ source_session_id?: string;
6
+ source_id: string;
7
+ source_platform: SourcePlatform;
8
+ host_id: string;
9
+ title?: string;
10
+ canonical_title?: string;
11
+ created_at?: string;
12
+ updated_at?: string;
13
+ model?: string;
14
+ working_directory?: string;
15
+ source_native_project_ref?: string;
16
+ resume_command?: string;
17
+ resume_working_directory?: string;
18
+ resume_command_confidence?: number;
19
+ delegated_parent_session_id?: string;
20
+ delegated_history_start_ordinal?: number;
21
+ delegated_agent_key?: string;
22
+ }
23
+ export interface GitProjectEvidence {
24
+ repoRoot?: string;
25
+ repoRemote?: string;
26
+ repoFingerprint?: string;
27
+ }
28
+ export interface TokenUsageMetrics {
29
+ input_tokens?: number;
30
+ cache_read_input_tokens?: number;
31
+ cache_creation_input_tokens?: number;
32
+ cached_input_tokens?: number;
33
+ output_tokens?: number;
34
+ reasoning_output_tokens?: number;
35
+ total_tokens?: number;
36
+ model?: string;
37
+ }
38
+ export type AssistantStopReason = "end_turn" | "tool_use" | "max_tokens" | "error";
39
+ /** Borrowed evidence for one reconciled session. Interpreters must not mutate it. */
40
+ export interface ParsedSessionEvidence {
41
+ readonly draft: Readonly<ParsedSessionMetadata>;
42
+ readonly blobs: readonly CapturedBlob[];
43
+ readonly records: readonly RawRecord[];
44
+ readonly fragments: readonly SourceFragment[];
45
+ readonly atoms: readonly ConversationAtom[];
46
+ readonly edges: readonly AtomEdge[];
47
+ readonly gitProjectEvidence?: Readonly<GitProjectEvidence>;
48
+ }
49
+ /** Complete interpretation for the current eager path; absence of a session is explicit. */
50
+ export interface SessionInterpretation {
51
+ session?: SessionProjection;
52
+ candidates: DerivedCandidate[];
53
+ turns: UserTurnProjection[];
54
+ contexts: TurnContextProjection[];
55
+ edges: AtomEdge[];
56
+ }
57
+ export type InterpretParsedSession = (evidence: ParsedSessionEvidence) => SessionInterpretation;
58
+ //# sourceMappingURL=parsed-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsed-session.d.ts","sourceRoot":"","sources":["../src/parsed-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EACrE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAC7F,MAAM,YAAY,CAAC;AAEpB,6FAA6F;AAC7F,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAA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M,sBAAsB,GAAG,CAAC,QAAQ,EAAE,qBAAqB,KAAK,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parsed-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsed-session.js","sourceRoot":"","sources":["../src/parsed-session.ts"],"names":[],"mappings":""}
@@ -0,0 +1,67 @@
1
+ export type QueryCollection = "sessions" | "turns";
2
+ export type QueryValue = string | number | boolean | null;
3
+ export type QueryValueType = "string" | "number" | "boolean" | "timestamp";
4
+ export interface QueryColumn {
5
+ name: string;
6
+ type: QueryValueType;
7
+ nullable: boolean;
8
+ }
9
+ export type QueryPredicate = {
10
+ kind: "and";
11
+ left: QueryPredicate;
12
+ right: QueryPredicate;
13
+ } | {
14
+ kind: "or";
15
+ left: QueryPredicate;
16
+ right: QueryPredicate;
17
+ } | {
18
+ kind: "not";
19
+ operand: QueryPredicate;
20
+ } | {
21
+ kind: "null";
22
+ field: string;
23
+ negate: boolean;
24
+ } | {
25
+ kind: "compare";
26
+ field: string;
27
+ op: "=" | "!=" | "<" | "<=" | ">" | ">=";
28
+ value: QueryValue;
29
+ } | {
30
+ kind: "in";
31
+ field: string;
32
+ values: QueryValue[];
33
+ negate: boolean;
34
+ } | {
35
+ kind: "like";
36
+ field: string;
37
+ pattern: string | null;
38
+ negate: boolean;
39
+ };
40
+ export interface LogicalQuery {
41
+ collection: QueryCollection;
42
+ columns: string[];
43
+ predicate?: QueryPredicate;
44
+ order: {
45
+ field: string;
46
+ direction: "ASC" | "DESC";
47
+ nulls: "FIRST" | "LAST";
48
+ }[];
49
+ limit: number;
50
+ offset: number;
51
+ complete: boolean;
52
+ }
53
+ export interface CanonicalQueryResult {
54
+ ids: string[];
55
+ columns: QueryColumn[];
56
+ rows: Record<string, QueryValue>[];
57
+ total: number | null;
58
+ shown: number;
59
+ limit: number;
60
+ offset: number;
61
+ coverage: {
62
+ execution: "complete" | "selective";
63
+ rows: "exact";
64
+ diagnostics: "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E,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAC7E,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,SAAS,EAAE,UAAU,GAAG,WAAW,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAA;KAAE,CAAC;CACxG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { AssistantStopReason, TokenUsageMetrics } from "./parsed-session.js";
2
+ export declare function accumulateTokenUsageMetrics(target: TokenUsageMetrics, source: TokenUsageMetrics): void;
3
+ export declare function mergeTokenUsageMetrics(left: TokenUsageMetrics | undefined, right: TokenUsageMetrics | undefined): TokenUsageMetrics | undefined;
4
+ export declare function buildTokenUsageCheckpointBaselineKey(cumulative: TokenUsageMetrics | undefined, checkpoint: TokenUsageMetrics | undefined): string | undefined;
5
+ export declare function mergeMaxTokenUsageMetrics(left: TokenUsageMetrics | undefined, right: TokenUsageMetrics): TokenUsageMetrics;
6
+ export declare function extractTokenUsage(value: unknown, depth?: number): TokenUsageMetrics | undefined;
7
+ export declare function extractCumulativeTokenUsage(value: unknown, depth?: number): TokenUsageMetrics | undefined;
8
+ export declare function normalizeTokenUsageObject(value: Record<string, unknown>): TokenUsageMetrics | undefined;
9
+ export declare function extractTokenUsageFromPayload(payload: Record<string, unknown>): TokenUsageMetrics | undefined;
10
+ export declare function extractTokenCountFromPayload(payload: Record<string, unknown>): number | undefined;
11
+ export declare function extractStopReasonFromPayload(payload: Record<string, unknown>): AssistantStopReason | undefined;
12
+ export declare function normalizeStopReason(value: unknown): AssistantStopReason | undefined;
13
+ export declare function diffTokenUsageMetrics(current: TokenUsageMetrics, previous: TokenUsageMetrics | undefined): TokenUsageMetrics;
14
+ //# sourceMappingURL=token-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-evidence.d.ts","sourceRoot":"","sources":["../src/token-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAalF,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CAuBN;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,iBAAiB,GAAG,SAAS,EACnC,KAAK,EAAE,iBAAiB,GAAG,SAAS,GACnC,iBAAiB,GAAG,SAAS,CAU/B;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,iBAAiB,GAAG,SAAS,EACzC,UAAU,EAAE,iBAAiB,GAAG,SAAS,GAC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