@cchistory/lite 0.4.2

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 (533) hide show
  1. package/INSTALL.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +16 -0
  4. package/apps/lite-cli/dist/bin.d.ts +3 -0
  5. package/apps/lite-cli/dist/bin.d.ts.map +1 -0
  6. package/apps/lite-cli/dist/bin.js +7 -0
  7. package/apps/lite-cli/dist/bin.js.map +1 -0
  8. package/apps/lite-cli/dist/index.d.ts +21 -0
  9. package/apps/lite-cli/dist/index.d.ts.map +1 -0
  10. package/apps/lite-cli/dist/index.js +1812 -0
  11. package/apps/lite-cli/dist/index.js.map +1 -0
  12. package/apps/lite-cli/dist/index.test.d.ts +2 -0
  13. package/apps/lite-cli/dist/index.test.d.ts.map +1 -0
  14. package/apps/lite-cli/dist/index.test.js +1290 -0
  15. package/apps/lite-cli/dist/index.test.js.map +1 -0
  16. package/apps/lite-cli/dist/json-v2.d.ts +17 -0
  17. package/apps/lite-cli/dist/json-v2.d.ts.map +1 -0
  18. package/apps/lite-cli/dist/json-v2.js +352 -0
  19. package/apps/lite-cli/dist/json-v2.js.map +1 -0
  20. package/apps/lite-cli/dist/query.d.ts +50 -0
  21. package/apps/lite-cli/dist/query.d.ts.map +1 -0
  22. package/apps/lite-cli/dist/query.js +297 -0
  23. package/apps/lite-cli/dist/query.js.map +1 -0
  24. package/apps/lite-cli/dist/shell.d.ts +18 -0
  25. package/apps/lite-cli/dist/shell.d.ts.map +1 -0
  26. package/apps/lite-cli/dist/shell.js +276 -0
  27. package/apps/lite-cli/dist/shell.js.map +1 -0
  28. package/apps/lite-tui/dist/bin.d.ts +3 -0
  29. package/apps/lite-tui/dist/bin.d.ts.map +1 -0
  30. package/apps/lite-tui/dist/bin.js +7 -0
  31. package/apps/lite-tui/dist/bin.js.map +1 -0
  32. package/apps/lite-tui/dist/colors.d.ts +49 -0
  33. package/apps/lite-tui/dist/colors.d.ts.map +1 -0
  34. package/apps/lite-tui/dist/colors.js +70 -0
  35. package/apps/lite-tui/dist/colors.js.map +1 -0
  36. package/apps/lite-tui/dist/index.d.ts +23 -0
  37. package/apps/lite-tui/dist/index.d.ts.map +1 -0
  38. package/apps/lite-tui/dist/index.js +519 -0
  39. package/apps/lite-tui/dist/index.js.map +1 -0
  40. package/apps/lite-tui/dist/index.test.d.ts +2 -0
  41. package/apps/lite-tui/dist/index.test.d.ts.map +1 -0
  42. package/apps/lite-tui/dist/index.test.js +487 -0
  43. package/apps/lite-tui/dist/index.test.js.map +1 -0
  44. package/apps/lite-tui/dist/input.d.ts +23 -0
  45. package/apps/lite-tui/dist/input.d.ts.map +1 -0
  46. package/apps/lite-tui/dist/input.js +98 -0
  47. package/apps/lite-tui/dist/input.js.map +1 -0
  48. package/apps/lite-tui/dist/keys.d.ts +32 -0
  49. package/apps/lite-tui/dist/keys.d.ts.map +1 -0
  50. package/apps/lite-tui/dist/keys.js +136 -0
  51. package/apps/lite-tui/dist/keys.js.map +1 -0
  52. package/apps/lite-tui/dist/keys.test.d.ts +2 -0
  53. package/apps/lite-tui/dist/keys.test.d.ts.map +1 -0
  54. package/apps/lite-tui/dist/keys.test.js +67 -0
  55. package/apps/lite-tui/dist/keys.test.js.map +1 -0
  56. package/apps/lite-tui/dist/model.d.ts +88 -0
  57. package/apps/lite-tui/dist/model.d.ts.map +1 -0
  58. package/apps/lite-tui/dist/model.js +146 -0
  59. package/apps/lite-tui/dist/model.js.map +1 -0
  60. package/apps/lite-tui/dist/render.d.ts +46 -0
  61. package/apps/lite-tui/dist/render.d.ts.map +1 -0
  62. package/apps/lite-tui/dist/render.js +706 -0
  63. package/apps/lite-tui/dist/render.js.map +1 -0
  64. package/apps/lite-tui/dist/render.test.d.ts +2 -0
  65. package/apps/lite-tui/dist/render.test.d.ts.map +1 -0
  66. package/apps/lite-tui/dist/render.test.js +594 -0
  67. package/apps/lite-tui/dist/render.test.js.map +1 -0
  68. package/apps/lite-tui/dist/state.d.ts +127 -0
  69. package/apps/lite-tui/dist/state.d.ts.map +1 -0
  70. package/apps/lite-tui/dist/state.js +391 -0
  71. package/apps/lite-tui/dist/state.js.map +1 -0
  72. package/apps/lite-tui/dist/state.test.d.ts +2 -0
  73. package/apps/lite-tui/dist/state.test.d.ts.map +1 -0
  74. package/apps/lite-tui/dist/state.test.js +331 -0
  75. package/apps/lite-tui/dist/state.test.js.map +1 -0
  76. package/apps/lite-tui/dist/text.d.ts +38 -0
  77. package/apps/lite-tui/dist/text.d.ts.map +1 -0
  78. package/apps/lite-tui/dist/text.js +246 -0
  79. package/apps/lite-tui/dist/text.js.map +1 -0
  80. package/apps/lite-tui/dist/version.d.ts +10 -0
  81. package/apps/lite-tui/dist/version.d.ts.map +1 -0
  82. package/apps/lite-tui/dist/version.js +10 -0
  83. package/apps/lite-tui/dist/version.js.map +1 -0
  84. package/apps/lite-tui/dist/view-model.d.ts +26 -0
  85. package/apps/lite-tui/dist/view-model.d.ts.map +1 -0
  86. package/apps/lite-tui/dist/view-model.js +87 -0
  87. package/apps/lite-tui/dist/view-model.js.map +1 -0
  88. package/bin/cchistory-lite +3 -0
  89. package/bin/cchistory-lite-tui +3 -0
  90. package/bin/cchistory-lite-tui.cmd +3 -0
  91. package/bin/cchistory-lite-tui.mjs +7 -0
  92. package/bin/cchistory-lite.cmd +3 -0
  93. package/bin/cchistory-lite.mjs +11 -0
  94. package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts +33 -0
  95. package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts.map +1 -0
  96. package/node_modules/@cchistory/canonical/dist/directory-scope.js +95 -0
  97. package/node_modules/@cchistory/canonical/dist/directory-scope.js.map +1 -0
  98. package/node_modules/@cchistory/canonical/dist/fallback-projects.d.ts +14 -0
  99. package/node_modules/@cchistory/canonical/dist/fallback-projects.d.ts.map +1 -0
  100. package/node_modules/@cchistory/canonical/dist/fallback-projects.js +120 -0
  101. package/node_modules/@cchistory/canonical/dist/fallback-projects.js.map +1 -0
  102. package/node_modules/@cchistory/canonical/dist/index.d.ts +12 -0
  103. package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -0
  104. package/node_modules/@cchistory/canonical/dist/index.js +12 -0
  105. package/node_modules/@cchistory/canonical/dist/index.js.map +1 -0
  106. package/node_modules/@cchistory/canonical/dist/index.test.d.ts +2 -0
  107. package/node_modules/@cchistory/canonical/dist/index.test.d.ts.map +1 -0
  108. package/node_modules/@cchistory/canonical/dist/index.test.js +901 -0
  109. package/node_modules/@cchistory/canonical/dist/index.test.js.map +1 -0
  110. package/node_modules/@cchistory/canonical/dist/project-linker.d.ts +30 -0
  111. package/node_modules/@cchistory/canonical/dist/project-linker.d.ts.map +1 -0
  112. package/node_modules/@cchistory/canonical/dist/project-linker.js +720 -0
  113. package/node_modules/@cchistory/canonical/dist/project-linker.js.map +1 -0
  114. package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts +23 -0
  115. package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts.map +1 -0
  116. package/node_modules/@cchistory/canonical/dist/projection-audit.js +192 -0
  117. package/node_modules/@cchistory/canonical/dist/projection-audit.js.map +1 -0
  118. package/node_modules/@cchistory/canonical/dist/read-order.d.ts +19 -0
  119. package/node_modules/@cchistory/canonical/dist/read-order.d.ts.map +1 -0
  120. package/node_modules/@cchistory/canonical/dist/read-order.js +73 -0
  121. package/node_modules/@cchistory/canonical/dist/read-order.js.map +1 -0
  122. package/node_modules/@cchistory/canonical/dist/related-work.d.ts +4 -0
  123. package/node_modules/@cchistory/canonical/dist/related-work.d.ts.map +1 -0
  124. package/node_modules/@cchistory/canonical/dist/related-work.js +232 -0
  125. package/node_modules/@cchistory/canonical/dist/related-work.js.map +1 -0
  126. package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.d.ts +10 -0
  127. package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.d.ts.map +1 -0
  128. package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.js +34 -0
  129. package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.js.map +1 -0
  130. package/node_modules/@cchistory/canonical/dist/search.d.ts +69 -0
  131. package/node_modules/@cchistory/canonical/dist/search.d.ts.map +1 -0
  132. package/node_modules/@cchistory/canonical/dist/search.js +337 -0
  133. package/node_modules/@cchistory/canonical/dist/search.js.map +1 -0
  134. package/node_modules/@cchistory/canonical/dist/session-collections.d.ts +8 -0
  135. package/node_modules/@cchistory/canonical/dist/session-collections.d.ts.map +1 -0
  136. package/node_modules/@cchistory/canonical/dist/session-collections.js +21 -0
  137. package/node_modules/@cchistory/canonical/dist/session-collections.js.map +1 -0
  138. package/node_modules/@cchistory/canonical/dist/session-family.d.ts +23 -0
  139. package/node_modules/@cchistory/canonical/dist/session-family.d.ts.map +1 -0
  140. package/node_modules/@cchistory/canonical/dist/session-family.js +808 -0
  141. package/node_modules/@cchistory/canonical/dist/session-family.js.map +1 -0
  142. package/node_modules/@cchistory/canonical/dist/session-family.test.d.ts +2 -0
  143. package/node_modules/@cchistory/canonical/dist/session-family.test.d.ts.map +1 -0
  144. package/node_modules/@cchistory/canonical/dist/session-family.test.js +650 -0
  145. package/node_modules/@cchistory/canonical/dist/session-family.test.js.map +1 -0
  146. package/node_modules/@cchistory/canonical/dist/usage.d.ts +79 -0
  147. package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -0
  148. package/node_modules/@cchistory/canonical/dist/usage.js +232 -0
  149. package/node_modules/@cchistory/canonical/dist/usage.js.map +1 -0
  150. package/node_modules/@cchistory/canonical/dist/utils.d.ts +5 -0
  151. package/node_modules/@cchistory/canonical/dist/utils.d.ts.map +1 -0
  152. package/node_modules/@cchistory/canonical/dist/utils.js +18 -0
  153. package/node_modules/@cchistory/canonical/dist/utils.js.map +1 -0
  154. package/node_modules/@cchistory/canonical/package.json +14 -0
  155. package/node_modules/@cchistory/domain/dist/index.d.ts +943 -0
  156. package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -0
  157. package/node_modules/@cchistory/domain/dist/index.js +238 -0
  158. package/node_modules/@cchistory/domain/dist/index.js.map +1 -0
  159. package/node_modules/@cchistory/domain/dist/index.test.d.ts +2 -0
  160. package/node_modules/@cchistory/domain/dist/index.test.d.ts.map +1 -0
  161. package/node_modules/@cchistory/domain/dist/index.test.js +423 -0
  162. package/node_modules/@cchistory/domain/dist/index.test.js.map +1 -0
  163. package/node_modules/@cchistory/domain/package.json +14 -0
  164. package/node_modules/@cchistory/live-runtime/dist/async-pool.d.ts +3 -0
  165. package/node_modules/@cchistory/live-runtime/dist/async-pool.d.ts.map +1 -0
  166. package/node_modules/@cchistory/live-runtime/dist/async-pool.js +19 -0
  167. package/node_modules/@cchistory/live-runtime/dist/async-pool.js.map +1 -0
  168. package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts +3 -0
  169. package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts.map +1 -0
  170. package/node_modules/@cchistory/live-runtime/dist/bootstrap.js +22 -0
  171. package/node_modules/@cchistory/live-runtime/dist/bootstrap.js.map +1 -0
  172. package/node_modules/@cchistory/live-runtime/dist/index.d.ts +149 -0
  173. package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -0
  174. package/node_modules/@cchistory/live-runtime/dist/index.js +1180 -0
  175. package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -0
  176. package/node_modules/@cchistory/live-runtime/dist/index.test.d.ts +2 -0
  177. package/node_modules/@cchistory/live-runtime/dist/index.test.d.ts.map +1 -0
  178. package/node_modules/@cchistory/live-runtime/dist/index.test.js +1819 -0
  179. package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -0
  180. package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts +5 -0
  181. package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts.map +1 -0
  182. package/node_modules/@cchistory/live-runtime/dist/node-memory.js +83 -0
  183. package/node_modules/@cchistory/live-runtime/dist/node-memory.js.map +1 -0
  184. package/node_modules/@cchistory/live-runtime/package.json +18 -0
  185. package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.d.ts +8 -0
  186. package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.d.ts.map +1 -0
  187. package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.js +115 -0
  188. package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.js.map +1 -0
  189. package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.d.ts +9 -0
  190. package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.d.ts.map +1 -0
  191. package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.js +223 -0
  192. package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.js.map +1 -0
  193. package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.d.ts +2 -0
  194. package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.d.ts.map +1 -0
  195. package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.js +318 -0
  196. package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.js.map +1 -0
  197. package/node_modules/@cchistory/source-adapters/dist/core/atomizer.d.ts +11 -0
  198. package/node_modules/@cchistory/source-adapters/dist/core/atomizer.d.ts.map +1 -0
  199. package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js +206 -0
  200. package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js.map +1 -0
  201. package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts +62 -0
  202. package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts.map +1 -0
  203. package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js +224 -0
  204. package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js.map +1 -0
  205. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.d.ts +15 -0
  206. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.d.ts.map +1 -0
  207. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.js +96 -0
  208. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.js.map +1 -0
  209. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.d.ts +2 -0
  210. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.d.ts.map +1 -0
  211. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.js +97 -0
  212. package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.js.map +1 -0
  213. package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts +11 -0
  214. package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts.map +1 -0
  215. package/node_modules/@cchistory/source-adapters/dist/core/discovery.js +412 -0
  216. package/node_modules/@cchistory/source-adapters/dist/core/discovery.js.map +1 -0
  217. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.d.ts +2 -0
  218. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.d.ts.map +1 -0
  219. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js +552 -0
  220. package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js.map +1 -0
  221. package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts +10 -0
  222. package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts.map +1 -0
  223. package/node_modules/@cchistory/source-adapters/dist/core/factories.js +83 -0
  224. package/node_modules/@cchistory/source-adapters/dist/core/factories.js.map +1 -0
  225. package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts +5 -0
  226. package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts.map +1 -0
  227. package/node_modules/@cchistory/source-adapters/dist/core/git-project.js +86 -0
  228. package/node_modules/@cchistory/source-adapters/dist/core/git-project.js.map +1 -0
  229. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts +31 -0
  230. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts.map +1 -0
  231. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js +216 -0
  232. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js.map +1 -0
  233. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.d.ts +2 -0
  234. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.d.ts.map +1 -0
  235. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js +367 -0
  236. package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js.map +1 -0
  237. package/node_modules/@cchistory/source-adapters/dist/core/legacy.d.ts +10 -0
  238. package/node_modules/@cchistory/source-adapters/dist/core/legacy.d.ts.map +1 -0
  239. package/node_modules/@cchistory/source-adapters/dist/core/legacy.js +10 -0
  240. package/node_modules/@cchistory/source-adapters/dist/core/legacy.js.map +1 -0
  241. package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +70 -0
  242. package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -0
  243. package/node_modules/@cchistory/source-adapters/dist/core/parser.js +1389 -0
  244. package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -0
  245. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.d.ts +15 -0
  246. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.d.ts.map +1 -0
  247. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.js +76 -0
  248. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.js.map +1 -0
  249. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.d.ts +2 -0
  250. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.d.ts.map +1 -0
  251. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.js +33 -0
  252. package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.js.map +1 -0
  253. package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts +24 -0
  254. package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -0
  255. package/node_modules/@cchistory/source-adapters/dist/core/probe.js +1829 -0
  256. package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -0
  257. package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts +39 -0
  258. package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts.map +1 -0
  259. package/node_modules/@cchistory/source-adapters/dist/core/projections.js +873 -0
  260. package/node_modules/@cchistory/source-adapters/dist/core/projections.js.map +1 -0
  261. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.d.ts +2 -0
  262. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.d.ts.map +1 -0
  263. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js +165 -0
  264. package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js.map +1 -0
  265. package/node_modules/@cchistory/source-adapters/dist/core/registry.test.d.ts +2 -0
  266. package/node_modules/@cchistory/source-adapters/dist/core/registry.test.d.ts.map +1 -0
  267. package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js +87 -0
  268. package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js.map +1 -0
  269. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.d.ts +2 -0
  270. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.d.ts.map +1 -0
  271. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.js +10 -0
  272. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.js.map +1 -0
  273. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts +29 -0
  274. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts.map +1 -0
  275. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js +455 -0
  276. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -0
  277. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.d.ts +2 -0
  278. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.d.ts.map +1 -0
  279. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js +357 -0
  280. package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js.map +1 -0
  281. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts +25 -0
  282. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts.map +1 -0
  283. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js +144 -0
  284. package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -0
  285. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts +14 -0
  286. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts.map +1 -0
  287. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js +247 -0
  288. package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js.map +1 -0
  289. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.d.ts +2 -0
  290. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.d.ts.map +1 -0
  291. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js +323 -0
  292. package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js.map +1 -0
  293. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts +26 -0
  294. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts.map +1 -0
  295. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js +80 -0
  296. package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js.map +1 -0
  297. package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts +226 -0
  298. package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts.map +1 -0
  299. package/node_modules/@cchistory/source-adapters/dist/core/types.js +2 -0
  300. package/node_modules/@cchistory/source-adapters/dist/core/types.js.map +1 -0
  301. package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts +29 -0
  302. package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts.map +1 -0
  303. package/node_modules/@cchistory/source-adapters/dist/core/user-text.js +327 -0
  304. package/node_modules/@cchistory/source-adapters/dist/core/user-text.js.map +1 -0
  305. package/node_modules/@cchistory/source-adapters/dist/core/utils.d.ts +11 -0
  306. package/node_modules/@cchistory/source-adapters/dist/core/utils.d.ts.map +1 -0
  307. package/node_modules/@cchistory/source-adapters/dist/core/utils.js +19 -0
  308. package/node_modules/@cchistory/source-adapters/dist/core/utils.js.map +1 -0
  309. package/node_modules/@cchistory/source-adapters/dist/core/utils.test.d.ts +2 -0
  310. package/node_modules/@cchistory/source-adapters/dist/core/utils.test.d.ts.map +1 -0
  311. package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js +289 -0
  312. package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js.map +1 -0
  313. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts +43 -0
  314. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts.map +1 -0
  315. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js +520 -0
  316. package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js.map +1 -0
  317. package/node_modules/@cchistory/source-adapters/dist/index.d.ts +13 -0
  318. package/node_modules/@cchistory/source-adapters/dist/index.d.ts.map +1 -0
  319. package/node_modules/@cchistory/source-adapters/dist/index.js +8 -0
  320. package/node_modules/@cchistory/source-adapters/dist/index.js.map +1 -0
  321. package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +31 -0
  322. package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts.map +1 -0
  323. package/node_modules/@cchistory/source-adapters/dist/index.test.js +31 -0
  324. package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -0
  325. package/node_modules/@cchistory/source-adapters/dist/masks.d.ts +31 -0
  326. package/node_modules/@cchistory/source-adapters/dist/masks.d.ts.map +1 -0
  327. package/node_modules/@cchistory/source-adapters/dist/masks.js +342 -0
  328. package/node_modules/@cchistory/source-adapters/dist/masks.js.map +1 -0
  329. package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.d.ts +31 -0
  330. package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.d.ts.map +1 -0
  331. package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.js +161 -0
  332. package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.js.map +1 -0
  333. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.d.ts +3 -0
  334. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.d.ts.map +1 -0
  335. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.js +107 -0
  336. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.js.map +1 -0
  337. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.d.ts +2 -0
  338. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.d.ts.map +1 -0
  339. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js +202 -0
  340. package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js.map +1 -0
  341. package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.d.ts +4 -0
  342. package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.d.ts.map +1 -0
  343. package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.js +85 -0
  344. package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.js.map +1 -0
  345. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.d.ts +3 -0
  346. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.d.ts.map +1 -0
  347. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.js +10 -0
  348. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.js.map +1 -0
  349. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.d.ts +2 -0
  350. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.d.ts.map +1 -0
  351. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js +105 -0
  352. package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js.map +1 -0
  353. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts +45 -0
  354. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts.map +1 -0
  355. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js +609 -0
  356. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js.map +1 -0
  357. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.d.ts +16 -0
  358. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.d.ts.map +1 -0
  359. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.js +534 -0
  360. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.js.map +1 -0
  361. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts +12 -0
  362. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts.map +1 -0
  363. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js +105 -0
  364. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js.map +1 -0
  365. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.d.ts +2 -0
  366. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.d.ts.map +1 -0
  367. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js +820 -0
  368. package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js.map +1 -0
  369. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.d.ts +4 -0
  370. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.d.ts.map +1 -0
  371. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js +130 -0
  372. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js.map +1 -0
  373. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.d.ts +3 -0
  374. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.d.ts.map +1 -0
  375. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.js +10 -0
  376. package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.js.map +1 -0
  377. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.d.ts +2 -0
  378. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.d.ts.map +1 -0
  379. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js +357 -0
  380. package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js.map +1 -0
  381. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.d.ts +4 -0
  382. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.d.ts.map +1 -0
  383. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.js +27 -0
  384. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.js.map +1 -0
  385. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.d.ts +2 -0
  386. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.d.ts.map +1 -0
  387. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js +49 -0
  388. package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js.map +1 -0
  389. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.d.ts +4 -0
  390. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.d.ts.map +1 -0
  391. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js +555 -0
  392. package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js.map +1 -0
  393. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.d.ts +3 -0
  394. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.d.ts.map +1 -0
  395. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.js +15 -0
  396. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.js.map +1 -0
  397. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.d.ts +2 -0
  398. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.d.ts.map +1 -0
  399. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js +893 -0
  400. package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js.map +1 -0
  401. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts +70 -0
  402. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts.map +1 -0
  403. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js +786 -0
  404. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js.map +1 -0
  405. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.d.ts +4 -0
  406. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.d.ts.map +1 -0
  407. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.js +14 -0
  408. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.js.map +1 -0
  409. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.d.ts +2 -0
  410. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.d.ts.map +1 -0
  411. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +154 -0
  412. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -0
  413. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.d.ts +4 -0
  414. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.d.ts.map +1 -0
  415. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.js +151 -0
  416. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.js.map +1 -0
  417. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.d.ts +2 -0
  418. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.d.ts.map +1 -0
  419. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js +1486 -0
  420. package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js.map +1 -0
  421. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.d.ts +4 -0
  422. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.d.ts.map +1 -0
  423. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.js +229 -0
  424. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.js.map +1 -0
  425. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.d.ts +3 -0
  426. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.d.ts.map +1 -0
  427. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.js +10 -0
  428. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.js.map +1 -0
  429. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.d.ts +2 -0
  430. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.d.ts.map +1 -0
  431. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js +222 -0
  432. package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js.map +1 -0
  433. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.d.ts +7 -0
  434. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.d.ts.map +1 -0
  435. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.js +65 -0
  436. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.js.map +1 -0
  437. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.d.ts +2 -0
  438. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.d.ts.map +1 -0
  439. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js +220 -0
  440. package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js.map +1 -0
  441. package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts +20 -0
  442. package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts.map +1 -0
  443. package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js +365 -0
  444. package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js.map +1 -0
  445. package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.d.ts +17 -0
  446. package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.d.ts.map +1 -0
  447. package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.js +498 -0
  448. package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.js.map +1 -0
  449. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts +36 -0
  450. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts.map +1 -0
  451. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js +261 -0
  452. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js.map +1 -0
  453. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.d.ts +2 -0
  454. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.d.ts.map +1 -0
  455. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js +565 -0
  456. package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js.map +1 -0
  457. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.d.ts +4 -0
  458. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.d.ts.map +1 -0
  459. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.js +193 -0
  460. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.js.map +1 -0
  461. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.d.ts +7 -0
  462. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.d.ts.map +1 -0
  463. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.js +55 -0
  464. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.js.map +1 -0
  465. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.d.ts +2 -0
  466. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.d.ts.map +1 -0
  467. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js +163 -0
  468. package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js.map +1 -0
  469. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.d.ts +3 -0
  470. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.d.ts.map +1 -0
  471. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.js +10 -0
  472. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.js.map +1 -0
  473. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.d.ts +2 -0
  474. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.d.ts.map +1 -0
  475. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js +179 -0
  476. package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js.map +1 -0
  477. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.d.ts +4 -0
  478. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.d.ts.map +1 -0
  479. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.js +44 -0
  480. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.js.map +1 -0
  481. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.d.ts +3 -0
  482. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.d.ts.map +1 -0
  483. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.js +60 -0
  484. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.js.map +1 -0
  485. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.d.ts +2 -0
  486. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.d.ts.map +1 -0
  487. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js +39 -0
  488. package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js.map +1 -0
  489. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts +3 -0
  490. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts.map +1 -0
  491. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js +45 -0
  492. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js.map +1 -0
  493. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.d.ts +2 -0
  494. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.d.ts.map +1 -0
  495. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js +170 -0
  496. package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js.map +1 -0
  497. package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts +7 -0
  498. package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts.map +1 -0
  499. package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js +52 -0
  500. package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js.map +1 -0
  501. package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.d.ts +104 -0
  502. package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.d.ts.map +1 -0
  503. package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.js +2 -0
  504. package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.js.map +1 -0
  505. package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts +38 -0
  506. package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts.map +1 -0
  507. package/node_modules/@cchistory/source-adapters/dist/platforms/types.js +19 -0
  508. package/node_modules/@cchistory/source-adapters/dist/platforms/types.js.map +1 -0
  509. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts +14 -0
  510. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts.map +1 -0
  511. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js +283 -0
  512. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js.map +1 -0
  513. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.d.ts +3 -0
  514. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.d.ts.map +1 -0
  515. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.js +26 -0
  516. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.js.map +1 -0
  517. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.d.ts +2 -0
  518. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.d.ts.map +1 -0
  519. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js +411 -0
  520. package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js.map +1 -0
  521. package/node_modules/@cchistory/source-adapters/dist/test-helpers.d.ts +85 -0
  522. package/node_modules/@cchistory/source-adapters/dist/test-helpers.d.ts.map +1 -0
  523. package/node_modules/@cchistory/source-adapters/dist/test-helpers.js +2106 -0
  524. package/node_modules/@cchistory/source-adapters/dist/test-helpers.js.map +1 -0
  525. package/node_modules/@cchistory/source-adapters/package.json +14 -0
  526. package/package.json +38 -0
  527. package/schemas/cchistory-lite-canonical-v1.schema.json +13 -0
  528. package/schemas/cchistory-lite-error-v1.schema.json +30 -0
  529. package/schemas/cchistory-lite-query-result-v1.schema.json +29 -0
  530. package/schemas/cchistory-lite-query-result-v2.schema.json +29 -0
  531. package/schemas/cchistory-lite-query-v1.schema.json +62 -0
  532. package/schemas/cchistory-lite-query-v2.schema.json +82 -0
  533. package/schemas/cchistory-lite-v2.schema.json +176 -0
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Key press → intent mapping for the Lite TUI.
3
+ *
4
+ * Deliberately the same keymap as the Full TUI (`apps/tui/src/input.ts`) so
5
+ * muscle memory transfers between the two terminal surfaces. `r` (refresh) is
6
+ * the only Lite-specific binding, because only Lite can rescan from disk.
7
+ */
8
+ export function resolveLiteInputEffect(state, key) {
9
+ if (key.ctrl && (key.input === "c" || key.input === "d"))
10
+ return { type: "exit" };
11
+ if (key.name === "escape") {
12
+ if (state.overlay !== "none")
13
+ return action({ type: "close-overlay" });
14
+ return action({ type: "retreat" });
15
+ }
16
+ const editingSearch = state.mode === "search" && state.focusPane === "projects" && state.overlay === "none";
17
+ if (editingSearch) {
18
+ if (key.name === "backspace" || key.name === "delete")
19
+ return action({ type: "backspace-search" });
20
+ if (key.name === "return")
21
+ return action({ type: "commit-search" });
22
+ if (isPrintable(key))
23
+ return action({ type: "append-search-char", value: key.input });
24
+ // Navigation keys fall through so the search list stays keyboard-drivable.
25
+ }
26
+ if (!editingSearch) {
27
+ switch (key.input) {
28
+ case "q":
29
+ return { type: "exit" };
30
+ case "?":
31
+ return action({ type: "toggle-help" });
32
+ case "/":
33
+ return action({ type: "enter-search-mode" });
34
+ case "s":
35
+ return action({ type: "toggle-sources" });
36
+ case "i":
37
+ return action({ type: "toggle-stats" });
38
+ case "r":
39
+ return { type: "refresh" };
40
+ case "p":
41
+ return action({ type: "set-browse-scope", scope: "projects" });
42
+ case "S":
43
+ return action({ type: "set-browse-scope", scope: "sessions" });
44
+ case "t":
45
+ return action({ type: "focus-turns" });
46
+ case "d":
47
+ return action({ type: "focus-detail" });
48
+ case "g":
49
+ return action({ type: key.shift ? "jump-last" : "jump-first" });
50
+ case "G":
51
+ return action({ type: "jump-last" });
52
+ default:
53
+ break;
54
+ }
55
+ }
56
+ if (state.overlay === "stats" && key.name === "tab" && !key.shift) {
57
+ return action({ type: "cycle-stats-dimension" });
58
+ }
59
+ if (key.name === "tab") {
60
+ return action({ type: key.shift ? "focus-previous" : "focus-next" });
61
+ }
62
+ if (key.name === "right" && !editingSearch)
63
+ return action({ type: "focus-next" });
64
+ if (key.name === "left" && !editingSearch)
65
+ return action({ type: "focus-previous" });
66
+ if (key.name === "pageup")
67
+ return action({ type: "page-up" });
68
+ if (key.name === "pagedown")
69
+ return action({ type: "page-down" });
70
+ if (key.name === "home")
71
+ return action({ type: "jump-first" });
72
+ if (key.name === "end")
73
+ return action({ type: "jump-last" });
74
+ if (key.name === "down" || key.input === "j")
75
+ return action({ type: "move-down" });
76
+ if (key.name === "up" || key.input === "k")
77
+ return action({ type: "move-up" });
78
+ if (key.name === "return") {
79
+ // Entering the conversation view needs the session's full context, which a
80
+ // context-light snapshot does not carry yet.
81
+ if (state.focusPane === "detail" && state.overlay === "none")
82
+ return { type: "load-context" };
83
+ return action({ type: "drill" });
84
+ }
85
+ return { type: "none" };
86
+ }
87
+ function action(value) {
88
+ return { type: "action", action: value };
89
+ }
90
+ function isPrintable(key) {
91
+ if (key.input.length === 0 || key.ctrl || key.name !== undefined)
92
+ return false;
93
+ // Multi-byte input from a CJK IME arrives as one composed string. A control
94
+ // byte (a stray ESC, etc.) is never text to type into the query.
95
+ return !CONTROL_CHARACTER.test(key.input);
96
+ }
97
+ const CONTROL_CHARACTER = /[\x00-\x1f\x7f]/u;
98
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,MAAM,UAAU,sBAAsB,CAAC,KAAuB,EAAE,GAAY;IAC1E,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAElF,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC1B,IAAI,KAAK,CAAC,OAAO,KAAK,MAAM;YAAE,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC;IAC5G,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,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,32 @@
1
+ /**
2
+ * Zero-dependency raw-mode key decoder.
3
+ *
4
+ * Node's `readline` keypress emitter is line-oriented and pulls in interface
5
+ * state the Lite TUI does not want; a full-screen app only needs bytes in and
6
+ * key events out. The decoder is a pure state machine over a byte buffer so
7
+ * keybinding behavior is testable without a TTY.
8
+ */
9
+ export interface LiteKey {
10
+ /** Printable text for this key press; empty for pure control keys. */
11
+ input: string;
12
+ name?: "up" | "down" | "left" | "right" | "pageup" | "pagedown" | "home" | "end" | "return" | "tab" | "backspace" | "delete" | "escape";
13
+ ctrl?: boolean;
14
+ shift?: boolean;
15
+ }
16
+ export declare class KeyDecoder {
17
+ private buffer;
18
+ /** Feed raw stdin text and drain every complete key press it contains. */
19
+ push(chunk: string): LiteKey[];
20
+ /**
21
+ * Flush a trailing lone `ESC`.
22
+ *
23
+ * A bare Escape and the start of a cursor sequence are the same first byte,
24
+ * so the decoder holds it until it knows which it is. Callers resolve the
25
+ * ambiguity on an idle tick.
26
+ */
27
+ flushPendingEscape(): LiteKey | undefined;
28
+ get pending(): string;
29
+ private readOne;
30
+ private readEscapeSequence;
31
+ }
32
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,OAAO;IACtB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EACD,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,MAAM,GACN,KAAK,GACL,QAAQ,GACR,KAAK,GACL,WAAW,GACX,QAAQ,GACR,QAAQ,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAMD,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAM;IAEpB,0EAA0E;IAC1E,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE;IAY9B;;;;;;OAMG;IACH,kBAAkB,IAAI,OAAO,GAAG,SAAS;IAMzC,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,OAAO,CAAC,OAAO;IAwBf,OAAO,CAAC,kBAAkB;CA4B3B"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Zero-dependency raw-mode key decoder.
3
+ *
4
+ * Node's `readline` keypress emitter is line-oriented and pulls in interface
5
+ * state the Lite TUI does not want; a full-screen app only needs bytes in and
6
+ * key events out. The decoder is a pure state machine over a byte buffer so
7
+ * keybinding behavior is testable without a TTY.
8
+ */
9
+ const CSI_FINAL = /[A-Za-z~]/u;
10
+ /** An escape sequence longer than this is treated as noise, not a pending key. */
11
+ const MAX_SEQUENCE_LENGTH = 16;
12
+ export class KeyDecoder {
13
+ buffer = "";
14
+ /** Feed raw stdin text and drain every complete key press it contains. */
15
+ push(chunk) {
16
+ this.buffer += chunk;
17
+ const keys = [];
18
+ while (this.buffer.length > 0) {
19
+ const next = this.readOne();
20
+ if (!next)
21
+ break;
22
+ this.buffer = this.buffer.slice(next.consumed);
23
+ if (next.key)
24
+ keys.push(next.key);
25
+ }
26
+ return keys;
27
+ }
28
+ /**
29
+ * Flush a trailing lone `ESC`.
30
+ *
31
+ * A bare Escape and the start of a cursor sequence are the same first byte,
32
+ * so the decoder holds it until it knows which it is. Callers resolve the
33
+ * ambiguity on an idle tick.
34
+ */
35
+ flushPendingEscape() {
36
+ if (this.buffer !== "\x1b")
37
+ return undefined;
38
+ this.buffer = "";
39
+ return { input: "", name: "escape" };
40
+ }
41
+ get pending() {
42
+ return this.buffer;
43
+ }
44
+ readOne() {
45
+ const buffer = this.buffer;
46
+ const first = buffer[0];
47
+ if (first === "\x1b") {
48
+ return this.readEscapeSequence(buffer);
49
+ }
50
+ if (first === "\r" || first === "\n")
51
+ return { consumed: 1, key: { input: "", name: "return" } };
52
+ if (first === "\t")
53
+ return { consumed: 1, key: { input: "", name: "tab" } };
54
+ if (first === "\x7f" || first === "\b")
55
+ return { consumed: 1, key: { input: "", name: "backspace" } };
56
+ // Read from the buffer, not from `first`: an astral character's first UTF-16
57
+ // unit is a lone surrogate and would decode to a replacement character.
58
+ const code = buffer.codePointAt(0) ?? 0;
59
+ if (code < 0x20) {
60
+ // Ctrl+<letter>: 0x01 is Ctrl+A, 0x1a is Ctrl+Z.
61
+ const letter = String.fromCharCode(code + 96);
62
+ return { consumed: 1, key: { input: letter, ctrl: true } };
63
+ }
64
+ const character = String.fromCodePoint(code);
65
+ return { consumed: character.length, key: { input: character } };
66
+ }
67
+ readEscapeSequence(buffer) {
68
+ if (buffer.length === 1)
69
+ return undefined; // wait for more bytes
70
+ const second = buffer[1];
71
+ // A second ESC is another Escape press, not an Alt-modified character.
72
+ // Emit the first Escape now and leave the second byte pending so it is
73
+ // resolved on its own (flushed as Escape or continued into a sequence).
74
+ // Otherwise a double-tap of Escape merges into one stray { input: "\x1b" }
75
+ // key with no name, which matches no binding and can corrupt a search query.
76
+ if (second === "\x1b") {
77
+ return { consumed: 1, key: { input: "", name: "escape" } };
78
+ }
79
+ if (second !== "[" && second !== "O") {
80
+ // ESC followed by a printable character: Alt+<key>. Ignore the modifier
81
+ // rather than guessing; the Lite TUI binds no Alt chords.
82
+ return { consumed: 2, key: { input: second } };
83
+ }
84
+ let index = 2;
85
+ while (index < buffer.length && !CSI_FINAL.test(buffer[index]))
86
+ index += 1;
87
+ if (index >= buffer.length) {
88
+ if (buffer.length > MAX_SEQUENCE_LENGTH)
89
+ return { consumed: buffer.length };
90
+ return undefined; // incomplete sequence, wait for more bytes
91
+ }
92
+ const sequence = buffer.slice(0, index + 1);
93
+ return { consumed: sequence.length, key: decodeSequence(sequence) };
94
+ }
95
+ }
96
+ function decodeSequence(sequence) {
97
+ const body = sequence.slice(2);
98
+ switch (body) {
99
+ case "A":
100
+ return { input: "", name: "up" };
101
+ case "B":
102
+ return { input: "", name: "down" };
103
+ case "C":
104
+ return { input: "", name: "right" };
105
+ case "D":
106
+ return { input: "", name: "left" };
107
+ case "H":
108
+ case "1~":
109
+ case "7~":
110
+ return { input: "", name: "home" };
111
+ case "F":
112
+ case "4~":
113
+ case "8~":
114
+ return { input: "", name: "end" };
115
+ case "5~":
116
+ return { input: "", name: "pageup" };
117
+ case "6~":
118
+ return { input: "", name: "pagedown" };
119
+ case "3~":
120
+ return { input: "", name: "delete" };
121
+ case "Z":
122
+ return { input: "", name: "tab", shift: true };
123
+ default:
124
+ break;
125
+ }
126
+ // Modified arrows arrive as CSI 1;<mod><letter> (e.g. Shift+Up = `[1;2A`).
127
+ const modified = /^1;(\d+)([A-D])$/u.exec(body);
128
+ if (modified) {
129
+ const letter = modified[2];
130
+ const shift = ((Number(modified[1]) - 1) & 1) === 1;
131
+ const name = letter === "A" ? "up" : letter === "B" ? "down" : letter === "C" ? "right" : "left";
132
+ return { input: "", name, shift };
133
+ }
134
+ return undefined;
135
+ }
136
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAuBH,MAAM,SAAS,GAAG,YAAY,CAAC;AAC/B,kFAAkF;AAClF,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,MAAM,OAAO,UAAU;IACb,MAAM,GAAG,EAAE,CAAC;IAEpB,0EAA0E;IAC1E,IAAI,CAAC,KAAa;QAChB,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC;QACrB,MAAM,IAAI,GAAc,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI;gBAAE,MAAM;YACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;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1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+ import { KeyDecoder } from "./keys.js";
4
+ test("decodes printable characters, control chords, and Enter", () => {
5
+ const decoder = new KeyDecoder();
6
+ assert.deepEqual(decoder.push("jk"), [{ input: "j" }, { input: "k" }]);
7
+ assert.deepEqual(decoder.push("\r"), [{ input: "", name: "return" }]);
8
+ assert.deepEqual(decoder.push("\n"), [{ input: "", name: "return" }]);
9
+ assert.deepEqual(decoder.push("\t"), [{ input: "", name: "tab" }]);
10
+ assert.deepEqual(decoder.push("\x7f"), [{ input: "", name: "backspace" }]);
11
+ assert.deepEqual(decoder.push("\x03"), [{ input: "c", ctrl: true }]);
12
+ });
13
+ test("decodes cursor, paging, and shift-tab sequences", () => {
14
+ const decoder = new KeyDecoder();
15
+ assert.deepEqual(decoder.push("\x1b[A\x1b[B\x1b[C\x1b[D"), [
16
+ { input: "", name: "up" },
17
+ { input: "", name: "down" },
18
+ { input: "", name: "right" },
19
+ { input: "", name: "left" },
20
+ ]);
21
+ assert.deepEqual(decoder.push("\x1b[5~\x1b[6~"), [
22
+ { input: "", name: "pageup" },
23
+ { input: "", name: "pagedown" },
24
+ ]);
25
+ assert.deepEqual(decoder.push("\x1b[Z"), [{ input: "", name: "tab", shift: true }]);
26
+ assert.deepEqual(decoder.push("\x1b[1;2A"), [{ input: "", name: "up", shift: true }]);
27
+ assert.deepEqual(decoder.push("\x1bOA"), [{ input: "", name: "up" }]);
28
+ });
29
+ test("reassembles escape sequences split across reads", () => {
30
+ const decoder = new KeyDecoder();
31
+ assert.deepEqual(decoder.push("\x1b"), []);
32
+ assert.deepEqual(decoder.push("["), []);
33
+ assert.deepEqual(decoder.push("B"), [{ input: "", name: "down" }]);
34
+ });
35
+ test("holds a lone escape until it is flushed, then reports it once", () => {
36
+ const decoder = new KeyDecoder();
37
+ assert.deepEqual(decoder.push("\x1b"), []);
38
+ assert.equal(decoder.pending, "\x1b");
39
+ assert.deepEqual(decoder.flushPendingEscape(), { input: "", name: "escape" });
40
+ assert.equal(decoder.pending, "");
41
+ assert.equal(decoder.flushPendingEscape(), undefined);
42
+ });
43
+ test("a double-tap of Escape yields two escapes, not one stray byte", () => {
44
+ const decoder = new KeyDecoder();
45
+ // The first ESC resolves immediately (it cannot be the start of a CSI
46
+ // sequence); the second stays pending for the idle flush.
47
+ assert.deepEqual(decoder.push("\x1b\x1b"), [{ input: "", name: "escape" }]);
48
+ assert.equal(decoder.pending, "\x1b");
49
+ assert.deepEqual(decoder.flushPendingEscape(), { input: "", name: "escape" });
50
+ assert.equal(decoder.pending, "");
51
+ });
52
+ test("ESC followed by a printable is still Alt (modifier ignored)", () => {
53
+ const decoder = new KeyDecoder();
54
+ assert.deepEqual(decoder.push("\x1bq"), [{ input: "q" }]);
55
+ assert.equal(decoder.pending, "");
56
+ });
57
+ test("keeps multi-byte code points intact", () => {
58
+ const decoder = new KeyDecoder();
59
+ assert.deepEqual(decoder.push("解"), [{ input: "解" }]);
60
+ assert.deepEqual(decoder.push("🙂"), [{ input: "🙂" }]);
61
+ });
62
+ test("drops an over-long unterminated escape sequence instead of stalling input", () => {
63
+ const decoder = new KeyDecoder();
64
+ assert.deepEqual(decoder.push(`\x1b[${"0".repeat(20)}`), []);
65
+ assert.equal(decoder.pending, "");
66
+ });
67
+ //# sourceMappingURL=keys.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.test.js","sourceRoot":"","sources":["../src/keys.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,IAAI,CAAC,yDAAyD,EAAE,GAAG,EAAE;IACnE,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;IACjC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,E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,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC/C,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;IACjC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,2EAA2E,EAAE,GAAG,EAAE;IACrF,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;IACjC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Read model for the Lite TUI.
3
+ *
4
+ * Wraps one ephemeral {@link LiveHistorySnapshot} in the project-first shape
5
+ * the browser panes need. It derives nothing new: ordering, linkage, search,
6
+ * and usage all come from the shared canonical pipeline, so Lite and Full
7
+ * answer the same question the same way.
8
+ */
9
+ import type { ProjectIdentity, SessionProjection, SessionRelatedWorkProjection, SourceStatus, TurnContextProjection, TurnSearchResult, UsageStatsDimension, UsageStatsOverview, UsageStatsRollup, UserTurnProjection } from "@cchistory/domain";
10
+ import type { LiveHistorySnapshot } from "@cchistory/live-runtime";
11
+ export declare const UNLINKED_PROJECT_KEY = "__unlinked__";
12
+ export interface LiteTurnEntry {
13
+ turn: UserTurnProjection;
14
+ session?: SessionProjection;
15
+ }
16
+ export interface LiteProjectEntry {
17
+ key: string;
18
+ displayName: string;
19
+ /** Absent for the synthetic unlinked bucket. */
20
+ project?: ProjectIdentity;
21
+ linkageState: string;
22
+ workspacePath?: string;
23
+ sessionCount: number;
24
+ turnCount: number;
25
+ lastActivityAt?: string;
26
+ turns: LiteTurnEntry[];
27
+ }
28
+ export interface LiteSessionEntry {
29
+ session: SessionProjection;
30
+ sourceName: string;
31
+ turns: LiteTurnEntry[];
32
+ relatedWorkCount: number;
33
+ }
34
+ export interface LiteSourceHealth {
35
+ counts: {
36
+ healthy: number;
37
+ stale: number;
38
+ error: number;
39
+ };
40
+ sources: SourceStatus[];
41
+ }
42
+ export interface LiteCounts {
43
+ sources: number;
44
+ projects: number;
45
+ sessions: number;
46
+ turns: number;
47
+ }
48
+ export interface LiteSearchPage {
49
+ results: TurnSearchResult[];
50
+ total: number;
51
+ }
52
+ export declare class LiteBrowserModel {
53
+ readonly snapshot: LiveHistorySnapshot;
54
+ readonly projects: LiteProjectEntry[];
55
+ /** Top-level sessions plus any explicitly requested session detail. */
56
+ readonly sessions: LiteSessionEntry[];
57
+ readonly counts: LiteCounts;
58
+ readonly sourceHealth: LiteSourceHealth;
59
+ private readonly sessionsById;
60
+ /** Additive cache for contexts fetched on demand after the initial scan. */
61
+ private readonly contextOverlay;
62
+ private readonly searchCache;
63
+ constructor(snapshot: LiveHistorySnapshot, options?: {
64
+ includeSessionRefs?: readonly string[];
65
+ });
66
+ getSession(sessionId: string): SessionProjection | undefined;
67
+ /** All turns of one session, chronologically, as browser entries. */
68
+ listSessionTurns(sessionId: string): LiteTurnEntry[];
69
+ getSessionRelatedWork(sessionId: string): SessionRelatedWorkProjection[];
70
+ getTurnContext(turnId: string): TurnContextProjection | undefined;
71
+ /**
72
+ * Record contexts fetched by a targeted rescan. Purely additive: an overlay
73
+ * never replaces or hides context that the base snapshot already carries.
74
+ */
75
+ putContexts(contexts: readonly TurnContextProjection[]): void;
76
+ hasContext(turnId: string): boolean;
77
+ /**
78
+ * Every ranked match for `query`.
79
+ *
80
+ * The snapshot ranks the whole corpus once and memoizes it, so asking for
81
+ * all rows costs one array slice. The TUI needs the full set to group hits
82
+ * by project the way the Full TUI does.
83
+ */
84
+ searchAll(query: string): LiteSearchPage;
85
+ getUsageOverview(): UsageStatsOverview;
86
+ getUsageRollup(dimension: UsageStatsDimension): UsageStatsRollup;
87
+ }
88
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,4BAA4B,EAC5B,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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G,SAAS;IAI5D,qEAAqE;IACrE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAMpD,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,4BAA4B,EAAE;IAIxE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAIjE;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,SAAS,qBAAqB,EAAE,GAAG,IAAI;IAQ7D,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAInC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IAQxC,gBAAgB,IAAI,kBAAkB;IAItC,cAAc,CAAC,SAAS,EAAE,mBAAmB,GAAG,gBAAgB;CAGjE"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Read model for the Lite TUI.
3
+ *
4
+ * Wraps one ephemeral {@link LiveHistorySnapshot} in the project-first shape
5
+ * the browser panes need. It derives nothing new: ordering, linkage, search,
6
+ * and usage all come from the shared canonical pipeline, so Lite and Full
7
+ * answer the same question the same way.
8
+ */
9
+ export const UNLINKED_PROJECT_KEY = "__unlinked__";
10
+ export class LiteBrowserModel {
11
+ snapshot;
12
+ projects;
13
+ /** Top-level sessions plus any explicitly requested session detail. */
14
+ sessions;
15
+ counts;
16
+ sourceHealth;
17
+ sessionsById;
18
+ /** Additive cache for contexts fetched on demand after the initial scan. */
19
+ contextOverlay = new Map();
20
+ searchCache = new Map();
21
+ constructor(snapshot, options = {}) {
22
+ this.snapshot = snapshot;
23
+ const resolvedSessions = snapshot.listResolvedSessions();
24
+ const sessions = snapshot.listTopLevelSessions();
25
+ const includedIds = new Set(sessions.map((session) => session.id));
26
+ for (const ref of options.includeSessionRefs ?? []) {
27
+ const session = snapshot.getSession(ref);
28
+ if (session && !includedIds.has(session.id)) {
29
+ sessions.push(session);
30
+ includedIds.add(session.id);
31
+ }
32
+ }
33
+ this.sessionsById = new Map(resolvedSessions.map((session) => [session.id, session]));
34
+ this.projects = buildProjectEntries(snapshot, this.sessionsById);
35
+ const sourceNames = new Map(snapshot.listSources().map((source) => [source.id, source.display_name]));
36
+ this.sessions = sessions.map((session) => ({
37
+ session,
38
+ sourceName: sourceNames.get(session.source_id) ?? session.source_platform,
39
+ turns: snapshot.listSessionTurns(session.id).map((turn) => ({ turn, session })),
40
+ relatedWorkCount: snapshot.listSessionRelatedWork(session.id).length,
41
+ }));
42
+ this.counts = {
43
+ sources: snapshot.listSources().length,
44
+ projects: this.projects.filter((entry) => entry.project).length,
45
+ sessions: sessions.length,
46
+ turns: snapshot.listResolvedTurns().length,
47
+ };
48
+ this.sourceHealth = buildSourceHealth(snapshot.listSources());
49
+ }
50
+ getSession(sessionId) {
51
+ return this.sessionsById.get(sessionId);
52
+ }
53
+ /** All turns of one session, chronologically, as browser entries. */
54
+ listSessionTurns(sessionId) {
55
+ return this.snapshot
56
+ .listSessionTurns(sessionId)
57
+ .map((turn) => ({ turn, session: this.sessionsById.get(turn.session_id) }));
58
+ }
59
+ getSessionRelatedWork(sessionId) {
60
+ return this.snapshot.listSessionRelatedWork(sessionId);
61
+ }
62
+ getTurnContext(turnId) {
63
+ return this.contextOverlay.get(turnId) ?? this.snapshot.getTurnContext(turnId);
64
+ }
65
+ /**
66
+ * Record contexts fetched by a targeted rescan. Purely additive: an overlay
67
+ * never replaces or hides context that the base snapshot already carries.
68
+ */
69
+ putContexts(contexts) {
70
+ for (const context of contexts) {
71
+ if (!this.contextOverlay.has(context.turn_id)) {
72
+ this.contextOverlay.set(context.turn_id, context);
73
+ }
74
+ }
75
+ }
76
+ hasContext(turnId) {
77
+ return this.getTurnContext(turnId) !== undefined;
78
+ }
79
+ /**
80
+ * Every ranked match for `query`.
81
+ *
82
+ * The snapshot ranks the whole corpus once and memoizes it, so asking for
83
+ * all rows costs one array slice. The TUI needs the full set to group hits
84
+ * by project the way the Full TUI does.
85
+ */
86
+ searchAll(query) {
87
+ const cached = this.searchCache.get(query);
88
+ if (cached)
89
+ return cached;
90
+ const page = this.snapshot.search({ query, limit: Number.MAX_SAFE_INTEGER, offset: 0 });
91
+ this.searchCache.set(query, page);
92
+ return page;
93
+ }
94
+ getUsageOverview() {
95
+ return this.snapshot.getUsageOverview();
96
+ }
97
+ getUsageRollup(dimension) {
98
+ return this.snapshot.getUsageRollup(dimension);
99
+ }
100
+ }
101
+ function buildProjectEntries(snapshot, sessionsById) {
102
+ const entries = [];
103
+ const linkedTurnIds = new Set();
104
+ for (const project of snapshot.listProjects()) {
105
+ const turns = snapshot.listProjectTurns(project.project_id);
106
+ for (const turn of turns)
107
+ linkedTurnIds.add(turn.id);
108
+ entries.push({
109
+ key: project.project_id,
110
+ displayName: project.display_name,
111
+ project,
112
+ linkageState: project.linkage_state,
113
+ workspacePath: project.primary_workspace_path ?? project.repo_root,
114
+ sessionCount: new Set(turns.map((turn) => turn.session_id)).size,
115
+ turnCount: turns.length,
116
+ lastActivityAt: project.project_last_activity_at ?? project.updated_at,
117
+ turns: turns.map((turn) => ({ turn, session: sessionsById.get(turn.session_id) })),
118
+ });
119
+ }
120
+ const unlinkedTurns = snapshot.listResolvedTurns().filter((turn) => !linkedTurnIds.has(turn.id));
121
+ if (unlinkedTurns.length > 0) {
122
+ entries.push({
123
+ key: UNLINKED_PROJECT_KEY,
124
+ displayName: "Unlinked / candidate-only",
125
+ linkageState: "unlinked",
126
+ sessionCount: new Set(unlinkedTurns.map((turn) => turn.session_id)).size,
127
+ turnCount: unlinkedTurns.length,
128
+ lastActivityAt: unlinkedTurns.at(-1)?.last_context_activity_at,
129
+ turns: unlinkedTurns.map((turn) => ({ turn, session: sessionsById.get(turn.session_id) })),
130
+ });
131
+ }
132
+ return entries;
133
+ }
134
+ function buildSourceHealth(sources) {
135
+ const counts = { healthy: 0, stale: 0, error: 0 };
136
+ for (const source of sources) {
137
+ if (source.sync_status === "healthy")
138
+ counts.healthy += 1;
139
+ else if (source.sync_status === "stale")
140
+ counts.stale += 1;
141
+ else
142
+ counts.error += 1;
143
+ }
144
+ return { counts, sources };
145
+ }
146
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgBH,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AA4CnD,MAAM,OAAO,gBAAgB;IAClB,QAAQ,CAAsB;IAC9B,QAAQ,CAAqB;IACtC,uEAAuE;IAC9D,QAAQ,CAAqB;IAC7B,MAAM,CAAa;IACnB,YAAY,CAAmB;IAEvB,YAAY,CAAiC;IAC9D,4EAA4E;IAC3D,cAAc,GAAG,IAAI,GAAG,EAAiC,CAAC;IAC1D,WAAW,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEjE,YAAY,QAA6B,EAAE,UAAsD,EAAE;QACjG,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,oBAAoB,EAAE,CAAC;QACzD,MAAM,QAAQ,GAAG,QAAQ,CAAC,oBAAoB,EAAE,CAAC;QACjD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACnE,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;YACnD,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACzC,IAAI,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC5C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACvB,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,G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