spiracha 1.4.0 → 2.0.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 (319) hide show
  1. package/AGENTS.md +116 -164
  2. package/README.md +92 -237
  3. package/apps/ui/AGENTS.md +36 -7
  4. package/apps/ui/README.md +79 -6
  5. package/apps/ui/components.json +21 -0
  6. package/apps/ui/package.json +65 -0
  7. package/apps/ui/{dist/client → public}/icon.svg +2 -1
  8. package/apps/ui/src/components/antigravity-conversations-table.tsx +206 -0
  9. package/apps/ui/src/components/antigravity-keychain-panel.tsx +76 -0
  10. package/apps/ui/src/components/antigravity-workspaces-table.tsx +63 -0
  11. package/apps/ui/src/components/app-shell.tsx +124 -0
  12. package/apps/ui/src/components/breadcrumbs.tsx +53 -0
  13. package/apps/ui/src/components/claude-code-sessions-table.tsx +114 -0
  14. package/apps/ui/src/components/claude-code-workspaces-table.tsx +55 -0
  15. package/apps/ui/src/components/cursor-threads-table.tsx +189 -0
  16. package/apps/ui/src/components/cursor-workspaces-table.tsx +140 -0
  17. package/apps/ui/src/components/data-table.tsx +241 -0
  18. package/apps/ui/src/components/delete-confirm-dialog.tsx +88 -0
  19. package/apps/ui/src/components/export-dialog.tsx +184 -0
  20. package/apps/ui/src/components/json-panel.tsx +17 -0
  21. package/apps/ui/src/components/kiro-sessions-table.tsx +112 -0
  22. package/apps/ui/src/components/kiro-workspaces-table.tsx +53 -0
  23. package/apps/ui/src/components/list-search-input.tsx +18 -0
  24. package/apps/ui/src/components/loading-panel.tsx +23 -0
  25. package/apps/ui/src/components/metadata-section.tsx +31 -0
  26. package/apps/ui/src/components/metric-card.tsx +19 -0
  27. package/apps/ui/src/components/opencode-sessions-table.tsx +128 -0
  28. package/apps/ui/src/components/opencode-workspaces-table.tsx +57 -0
  29. package/apps/ui/src/components/page-header.tsx +33 -0
  30. package/apps/ui/src/components/projects-loading-state.tsx +74 -0
  31. package/apps/ui/src/components/projects-table.tsx +108 -0
  32. package/apps/ui/src/components/qoder-sessions-table.tsx +112 -0
  33. package/apps/ui/src/components/qoder-workspaces-table.tsx +53 -0
  34. package/apps/ui/src/components/recent-threads-list.tsx +52 -0
  35. package/apps/ui/src/components/reload-error-panel.tsx +20 -0
  36. package/apps/ui/src/components/text-document-panel.tsx +19 -0
  37. package/apps/ui/src/components/theme-toggle.tsx +48 -0
  38. package/apps/ui/src/components/threads-table.tsx +202 -0
  39. package/apps/ui/src/components/transcript-view.tsx +552 -0
  40. package/apps/ui/src/components/ui/alert-dialog.tsx +160 -0
  41. package/apps/ui/src/components/ui/badge.tsx +45 -0
  42. package/apps/ui/src/components/ui/button.tsx +62 -0
  43. package/apps/ui/src/components/ui/checkbox.tsx +29 -0
  44. package/apps/ui/src/components/ui/dialog.tsx +137 -0
  45. package/apps/ui/src/components/ui/dropdown-menu.tsx +217 -0
  46. package/apps/ui/src/components/ui/input.tsx +21 -0
  47. package/apps/ui/src/components/ui/scroll-area.tsx +46 -0
  48. package/apps/ui/src/components/ui/select.tsx +163 -0
  49. package/apps/ui/src/components/ui/separator.tsx +28 -0
  50. package/apps/ui/src/components/ui/sheet.tsx +107 -0
  51. package/apps/ui/src/components/ui/skeleton.tsx +7 -0
  52. package/apps/ui/src/components/ui/table.tsx +76 -0
  53. package/apps/ui/src/components/ui/tabs.tsx +71 -0
  54. package/apps/ui/src/components/ui/tooltip.tsx +44 -0
  55. package/apps/ui/src/integrations/tanstack-query/devtools.tsx +6 -0
  56. package/apps/ui/src/integrations/tanstack-query/root-provider.tsx +10 -0
  57. package/apps/ui/src/lib/antigravity-conversation-state.ts +28 -0
  58. package/apps/ui/src/lib/antigravity-queries.ts +33 -0
  59. package/apps/ui/src/lib/antigravity-server.ts +128 -0
  60. package/apps/ui/src/lib/antigravity-transcript-events.ts +335 -0
  61. package/apps/ui/src/lib/claude-code-queries.ts +26 -0
  62. package/apps/ui/src/lib/claude-code-server.ts +75 -0
  63. package/apps/ui/src/lib/claude-code-transcript-events.ts +154 -0
  64. package/apps/ui/src/lib/codex-queries.ts +66 -0
  65. package/apps/ui/src/lib/codex-server.ts +209 -0
  66. package/apps/ui/src/lib/cursor-queries.ts +37 -0
  67. package/apps/ui/src/lib/cursor-server.ts +272 -0
  68. package/apps/ui/src/lib/cursor-transcript-events.ts +229 -0
  69. package/apps/ui/src/lib/download.ts +166 -0
  70. package/apps/ui/src/lib/formatters.ts +149 -0
  71. package/apps/ui/src/lib/kiro-queries.ts +22 -0
  72. package/apps/ui/src/lib/kiro-server.ts +73 -0
  73. package/apps/ui/src/lib/kiro-transcript-events.ts +113 -0
  74. package/apps/ui/src/lib/opencode-queries.ts +37 -0
  75. package/apps/ui/src/lib/opencode-server.ts +73 -0
  76. package/apps/ui/src/lib/opencode-transcript-events.ts +221 -0
  77. package/apps/ui/src/lib/package-metadata.ts +16 -0
  78. package/apps/ui/src/lib/path-utils.ts +13 -0
  79. package/apps/ui/src/lib/qoder-queries.ts +22 -0
  80. package/apps/ui/src/lib/qoder-server.ts +79 -0
  81. package/apps/ui/src/lib/qoder-transcript-events.ts +139 -0
  82. package/apps/ui/src/lib/route-search.ts +68 -0
  83. package/apps/ui/src/lib/settings-store.tsx +59 -0
  84. package/apps/ui/src/lib/source-session-export-server.ts +56 -0
  85. package/apps/ui/src/lib/text-filter.ts +22 -0
  86. package/apps/ui/src/lib/thread-id.ts +3 -0
  87. package/apps/ui/src/lib/thread-transcript-stats.ts +57 -0
  88. package/apps/ui/src/lib/utils.ts +7 -0
  89. package/apps/ui/src/routeTree.gen.ts +730 -0
  90. package/apps/ui/src/router.tsx +20 -0
  91. package/apps/ui/src/routes/$threadId.tsx +22 -0
  92. package/apps/ui/src/routes/__root.tsx +127 -0
  93. package/apps/ui/src/routes/analytics.tsx +143 -0
  94. package/apps/ui/src/routes/antigravity-conversations.$conversationId.tsx +438 -0
  95. package/apps/ui/src/routes/antigravity.$workspaceKey.tsx +127 -0
  96. package/apps/ui/src/routes/antigravity.index.tsx +51 -0
  97. package/apps/ui/src/routes/api.v1.conversation-query.ts +12 -0
  98. package/apps/ui/src/routes/api.v1.conversations.$source.$id.export.ts +12 -0
  99. package/apps/ui/src/routes/api.v1.conversations.$source.$id.ts +12 -0
  100. package/apps/ui/src/routes/api.v1.conversations.ts +12 -0
  101. package/apps/ui/src/routes/api.v1.resolve.ts +12 -0
  102. package/apps/ui/src/routes/api.v1.sources.ts +12 -0
  103. package/apps/ui/src/routes/claude-code-sessions.$sessionId.tsx +342 -0
  104. package/apps/ui/src/routes/claude-code.$workspaceKey.tsx +135 -0
  105. package/apps/ui/src/routes/claude-code.index.tsx +48 -0
  106. package/apps/ui/src/routes/codex.$project.tsx +390 -0
  107. package/apps/ui/src/routes/codex.index.tsx +116 -0
  108. package/apps/ui/src/routes/cursor-threads.$composerId.tsx +435 -0
  109. package/apps/ui/src/routes/cursor.$workspaceKey.tsx +416 -0
  110. package/apps/ui/src/routes/cursor.index.tsx +120 -0
  111. package/apps/ui/src/routes/index.tsx +124 -0
  112. package/apps/ui/src/routes/kiro-sessions.$sessionId.tsx +345 -0
  113. package/apps/ui/src/routes/kiro.$workspaceKey.tsx +136 -0
  114. package/apps/ui/src/routes/kiro.index.tsx +48 -0
  115. package/apps/ui/src/routes/opencode-sessions.$sessionId.tsx +334 -0
  116. package/apps/ui/src/routes/opencode.$workspaceKey.tsx +135 -0
  117. package/apps/ui/src/routes/opencode.index.tsx +48 -0
  118. package/apps/ui/src/routes/qoder-sessions.$sessionId.tsx +341 -0
  119. package/apps/ui/src/routes/qoder.$workspaceKey.tsx +139 -0
  120. package/apps/ui/src/routes/qoder.index.tsx +48 -0
  121. package/apps/ui/src/routes/settings.tsx +91 -0
  122. package/apps/ui/src/routes/threads.$threadId.tsx +619 -0
  123. package/apps/ui/src/styles.css +122 -0
  124. package/apps/ui/tsconfig.json +29 -0
  125. package/apps/ui/vite.config.ts +84 -0
  126. package/bin/spiracha.ts +32 -0
  127. package/package.json +50 -60
  128. package/src/client.ts +290 -0
  129. package/src/lib/antigravity-db.ts +213 -19
  130. package/src/lib/antigravity-exporter-types.ts +1 -0
  131. package/src/lib/claude-code-db.ts +655 -0
  132. package/src/lib/claude-code-exporter-types.ts +110 -0
  133. package/src/lib/claude-code-transcript-phase.ts +25 -0
  134. package/src/lib/claude-code-transcript.ts +180 -0
  135. package/src/lib/codex-analytics.ts +1 -1
  136. package/src/lib/codex-browser-db.ts +856 -61
  137. package/src/lib/codex-browser-export.ts +24 -16
  138. package/src/lib/codex-browser-types.ts +1 -1
  139. package/src/lib/codex-thread-cache.ts +17 -1
  140. package/src/lib/{codex-exporter-types.ts → codex-thread-types.ts} +2 -30
  141. package/src/lib/{codex-exporter-transcript.ts → codex-transcript-renderer.ts} +64 -28
  142. package/src/lib/concurrency.ts +25 -0
  143. package/src/lib/conversation-api.ts +792 -0
  144. package/src/lib/conversation-data/adapter-helpers.ts +110 -0
  145. package/src/lib/conversation-data/antigravity-adapter.ts +148 -0
  146. package/src/lib/conversation-data/claude-code-adapter.ts +175 -0
  147. package/src/lib/conversation-data/codex-adapter.ts +245 -0
  148. package/src/lib/conversation-data/cursor-adapter.ts +171 -0
  149. package/src/lib/conversation-data/index.ts +311 -0
  150. package/src/lib/conversation-data/kiro-adapter.ts +140 -0
  151. package/src/lib/conversation-data/message-selector.ts +37 -0
  152. package/src/lib/conversation-data/opencode-adapter.ts +180 -0
  153. package/src/lib/conversation-data/path-match.ts +79 -0
  154. package/src/lib/conversation-data/qoder-adapter.ts +230 -0
  155. package/src/lib/conversation-data/types.ts +116 -0
  156. package/src/lib/cursor-db.ts +67 -21
  157. package/src/lib/cursor-exporter-types.ts +0 -19
  158. package/src/lib/kiro-db.ts +949 -0
  159. package/src/lib/kiro-exporter-types.ts +100 -0
  160. package/src/lib/kiro-transcript-phase.ts +41 -0
  161. package/src/lib/kiro-transcript.ts +115 -0
  162. package/src/lib/opencode-db.ts +610 -0
  163. package/src/lib/opencode-exporter-types.ts +129 -0
  164. package/src/lib/opencode-think-tags.ts +126 -0
  165. package/src/lib/opencode-transcript-phase.ts +50 -0
  166. package/src/lib/opencode-transcript.ts +194 -0
  167. package/src/lib/qoder-acp-client.ts +268 -0
  168. package/src/lib/qoder-db.ts +1601 -0
  169. package/src/lib/qoder-exporter-types.ts +114 -0
  170. package/src/lib/qoder-transcript-phase.ts +41 -0
  171. package/src/lib/qoder-transcript.ts +112 -0
  172. package/src/lib/shared.ts +25 -0
  173. package/src/lib/ui-export-archive.ts +61 -0
  174. package/apps/ui/dist/client/assets/_threadId-CAIeH5mq.js +0 -1
  175. package/apps/ui/dist/client/assets/analytics-DK2jdvmI.js +0 -1
  176. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-DmD0sN8X.js +0 -7
  177. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-KAcXtNxI.js +0 -1
  178. package/apps/ui/dist/client/assets/antigravity-keychain-panel-BRHVjFAM.js +0 -1
  179. package/apps/ui/dist/client/assets/antigravity._workspaceKey-ByitGWki.js +0 -1
  180. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CGV7amas.js +0 -1
  181. package/apps/ui/dist/client/assets/antigravity.index-DEEkjlZa.js +0 -1
  182. package/apps/ui/dist/client/assets/antigravity.index-DgW25FEV.js +0 -1
  183. package/apps/ui/dist/client/assets/badge-DfWvPfKF.js +0 -1
  184. package/apps/ui/dist/client/assets/checkbox-CdHitXWQ.js +0 -1
  185. package/apps/ui/dist/client/assets/createServerFn-CgRRVpBH.js +0 -3
  186. package/apps/ui/dist/client/assets/cursor-threads._composerId-CmBFclK8.js +0 -1
  187. package/apps/ui/dist/client/assets/cursor-threads._composerId-Ti2gTm63.js +0 -1
  188. package/apps/ui/dist/client/assets/cursor._workspaceKey-CaAZjGmm.js +0 -1
  189. package/apps/ui/dist/client/assets/cursor._workspaceKey-DzD_c6j9.js +0 -1
  190. package/apps/ui/dist/client/assets/cursor.index-CrnMwDCi.js +0 -1
  191. package/apps/ui/dist/client/assets/cursor.index-PkCFVcl4.js +0 -2
  192. package/apps/ui/dist/client/assets/data-table-Br78_dk3.js +0 -4
  193. package/apps/ui/dist/client/assets/delete-confirm-dialog-BHRmyLHr.js +0 -11
  194. package/apps/ui/dist/client/assets/dist-B9pyYCVU.js +0 -1
  195. package/apps/ui/dist/client/assets/dist-BhZOxAPP.js +0 -1
  196. package/apps/ui/dist/client/assets/dist-DvMS2965.js +0 -1
  197. package/apps/ui/dist/client/assets/download-Bf0QJKD3.js +0 -1
  198. package/apps/ui/dist/client/assets/dropdown-menu-Dy5cLzTy.js +0 -1
  199. package/apps/ui/dist/client/assets/es2015-BkCWttyM.js +0 -41
  200. package/apps/ui/dist/client/assets/export-dialog-C86SYHJn.js +0 -1
  201. package/apps/ui/dist/client/assets/formatters-BM9kB7ed.js +0 -1
  202. package/apps/ui/dist/client/assets/index-CPvAP-jk.js +0 -149
  203. package/apps/ui/dist/client/assets/jsx-runtime-DGeXAQPT.js +0 -1
  204. package/apps/ui/dist/client/assets/metric-card-Dplm0ZiM.js +0 -1
  205. package/apps/ui/dist/client/assets/page-header-Cwa3p6Tl.js +0 -1
  206. package/apps/ui/dist/client/assets/projects._project-Ckf6muWZ.js +0 -1
  207. package/apps/ui/dist/client/assets/projects._project-DSDwH4NF.js +0 -1
  208. package/apps/ui/dist/client/assets/projects.index-DEfhWqa8.js +0 -1
  209. package/apps/ui/dist/client/assets/projects.index-V5ibNZII.js +0 -3
  210. package/apps/ui/dist/client/assets/react-dom-DL96Jor4.js +0 -1
  211. package/apps/ui/dist/client/assets/refresh-ccw-BgKjOiA6.js +0 -1
  212. package/apps/ui/dist/client/assets/reload-error-panel-AHqu0akK.js +0 -1
  213. package/apps/ui/dist/client/assets/routes-Df2tgpyd.js +0 -1
  214. package/apps/ui/dist/client/assets/scroll-text-fM0sMOB3.js +0 -1
  215. package/apps/ui/dist/client/assets/select-Bf2GwfPR.js +0 -1
  216. package/apps/ui/dist/client/assets/settings-5VQIzME0.js +0 -1
  217. package/apps/ui/dist/client/assets/sqlite-error-B6uZjUe8.js +0 -1
  218. package/apps/ui/dist/client/assets/styles-BhRkXgwB.css +0 -1
  219. package/apps/ui/dist/client/assets/tabs-OO4VU5KR.js +0 -7
  220. package/apps/ui/dist/client/assets/text-filter-DVAZySUS.js +0 -2
  221. package/apps/ui/dist/client/assets/threads._threadId-BB9tTsV4.js +0 -1
  222. package/apps/ui/dist/client/assets/threads._threadId-BgDhFj2I.js +0 -1
  223. package/apps/ui/dist/client/assets/useMutation-CC_B7uy5.js +0 -1
  224. package/apps/ui/dist/client/assets/useQuery-C5By6WKU.js +0 -1
  225. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CRW2kqj0.js +0 -232
  226. package/apps/ui/dist/server/assets/_threadId-B6SrBR9E.js +0 -6
  227. package/apps/ui/dist/server/assets/analytics-CYP_LT5Y.js +0 -16
  228. package/apps/ui/dist/server/assets/analytics-CtpOMVMO.js +0 -146
  229. package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +0 -16
  230. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BtexWY-K.js +0 -613
  231. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +0 -11
  232. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-zMrR6v6R.js +0 -20
  233. package/apps/ui/dist/server/assets/antigravity-db-Bh8_U9uw.js +0 -580
  234. package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +0 -126
  235. package/apps/ui/dist/server/assets/antigravity-keychain-panel-CC7FLmAK.js +0 -55
  236. package/apps/ui/dist/server/assets/antigravity-queries-CGrJO9Vr.js +0 -37
  237. package/apps/ui/dist/server/assets/antigravity-server-CHRjVFqN.js +0 -114
  238. package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +0 -11
  239. package/apps/ui/dist/server/assets/antigravity._workspaceKey-B0QeYUOh.js +0 -28
  240. package/apps/ui/dist/server/assets/antigravity._workspaceKey-C3kP-qyN.js +0 -210
  241. package/apps/ui/dist/server/assets/antigravity.index-CPCYkqCi.js +0 -104
  242. package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +0 -11
  243. package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +0 -26
  244. package/apps/ui/dist/server/assets/button-CmTDnzOn.js +0 -46
  245. package/apps/ui/dist/server/assets/checkbox-C0hovF41.js +0 -19
  246. package/apps/ui/dist/server/assets/codex-queries-CtgeZ7VL.js +0 -99
  247. package/apps/ui/dist/server/assets/codex-server-CNXSJuc2.js +0 -2004
  248. package/apps/ui/dist/server/assets/concurrency-VXtYvlGh.js +0 -18
  249. package/apps/ui/dist/server/assets/createServerRpc-CF_DEwnm.js +0 -12
  250. package/apps/ui/dist/server/assets/createSsrRpc-C754NPki.js +0 -16
  251. package/apps/ui/dist/server/assets/cursor-db-cYZEU3WQ.js +0 -830
  252. package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +0 -34
  253. package/apps/ui/dist/server/assets/cursor-queries-NCIM0Nat.js +0 -67
  254. package/apps/ui/dist/server/assets/cursor-recovery-nq-kR62j.js +0 -361
  255. package/apps/ui/dist/server/assets/cursor-server-C3q7hrp-.js +0 -213
  256. package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +0 -11
  257. package/apps/ui/dist/server/assets/cursor-threads._composerId-BPJFWfJj.js +0 -18
  258. package/apps/ui/dist/server/assets/cursor-threads._composerId-BkMMTQ3v.js +0 -582
  259. package/apps/ui/dist/server/assets/cursor-transcript-2iL3KFSK.js +0 -125
  260. package/apps/ui/dist/server/assets/cursor._workspaceKey-C5PdTaKB.js +0 -28
  261. package/apps/ui/dist/server/assets/cursor._workspaceKey-Ckj7apKI.js +0 -401
  262. package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +0 -11
  263. package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +0 -11
  264. package/apps/ui/dist/server/assets/cursor.index-DkWT-mxw.js +0 -189
  265. package/apps/ui/dist/server/assets/data-table-Cdct823O.js +0 -189
  266. package/apps/ui/dist/server/assets/delete-confirm-dialog-BcBNCxWB.js +0 -144
  267. package/apps/ui/dist/server/assets/download-DMmiy1xf.js +0 -92
  268. package/apps/ui/dist/server/assets/dropdown-menu-Dy_9t6TN.js +0 -36
  269. package/apps/ui/dist/server/assets/empty-plugin-adapters-B3lHh1La.js +0 -5
  270. package/apps/ui/dist/server/assets/export-dialog-BItjWgkZ.js +0 -240
  271. package/apps/ui/dist/server/assets/formatters-FJaGZgJk.js +0 -91
  272. package/apps/ui/dist/server/assets/loading-panel-BGFnWseS.js +0 -27
  273. package/apps/ui/dist/server/assets/metric-card-ByEeLu0r.js +0 -23
  274. package/apps/ui/dist/server/assets/model-label-B1NWGc65.js +0 -13
  275. package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +0 -29
  276. package/apps/ui/dist/server/assets/path-transforms-DL2IwtYd.js +0 -31
  277. package/apps/ui/dist/server/assets/projects._project-Bpbc3C-L.js +0 -20
  278. package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +0 -12
  279. package/apps/ui/dist/server/assets/projects._project-CvZho6EQ.js +0 -395
  280. package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +0 -12
  281. package/apps/ui/dist/server/assets/projects.index-BkLiF2FF.js +0 -182
  282. package/apps/ui/dist/server/assets/projects.index-DesYXwfi.js +0 -14
  283. package/apps/ui/dist/server/assets/reload-error-panel-BJMxY3U1.js +0 -25
  284. package/apps/ui/dist/server/assets/route-search-ts4W9MJ9.js +0 -38
  285. package/apps/ui/dist/server/assets/router-6m-ihwqA.js +0 -410
  286. package/apps/ui/dist/server/assets/routes-Bsact1uB.js +0 -184
  287. package/apps/ui/dist/server/assets/routes-BzkJgq4W.js +0 -34
  288. package/apps/ui/dist/server/assets/select-GW76p-ld.js +0 -76
  289. package/apps/ui/dist/server/assets/settings-OayxIYQQ.js +0 -100
  290. package/apps/ui/dist/server/assets/settings-store-DpEJEQ7M.js +0 -52
  291. package/apps/ui/dist/server/assets/shared-CPRNYIql.js +0 -134
  292. package/apps/ui/dist/server/assets/sqlite-error-LZDrnxdd.js +0 -13
  293. package/apps/ui/dist/server/assets/start-CI_0bSiY.js +0 -4
  294. package/apps/ui/dist/server/assets/tabs-CGA13IZM.js +0 -502
  295. package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +0 -36
  296. package/apps/ui/dist/server/assets/threads._threadId-BSSK4nkI.js +0 -26
  297. package/apps/ui/dist/server/assets/threads._threadId-Bs0yuqO9.js +0 -18
  298. package/apps/ui/dist/server/assets/threads._threadId-D2GYkVn6.js +0 -639
  299. package/apps/ui/dist/server/assets/ui-export-files-BHLX9bhN.js +0 -83
  300. package/apps/ui/dist/server/assets/utils-C_uf36nf.js +0 -8
  301. package/apps/ui/dist/server/server.js +0 -5847
  302. package/bin/codex-chats-claude.js +0 -5
  303. package/bin/codex-chats.js +0 -5
  304. package/bin/spiracha.js +0 -5
  305. package/src/export-chats.ts +0 -120
  306. package/src/export-claude.ts +0 -36
  307. package/src/export-cursor.ts +0 -244
  308. package/src/lib/claude-exporter.ts +0 -864
  309. package/src/lib/codex-exporter-cli.ts +0 -277
  310. package/src/lib/codex-exporter-db.ts +0 -319
  311. package/src/lib/codex-exporter.ts +0 -115
  312. package/src/lib/cursor-exporter.ts +0 -266
  313. package/src/lib/interactive-cli.ts +0 -433
  314. package/src/lib/native-open.ts +0 -54
  315. package/src/mcp-server.ts +0 -137
  316. package/src/spiracha.ts +0 -116
  317. package/src/ui-cli.ts +0 -310
  318. /package/apps/ui/{dist/client → public}/manifest.json +0 -0
  319. /package/apps/ui/{dist/client → public}/robots.txt +0 -0
package/AGENTS.md CHANGED
@@ -2,136 +2,140 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- This repo exports local Codex chats, Claude Code transcripts, and Cursor Agent/Composer threads to Markdown or plain text, and the UI also browses local Antigravity conversation history.
5
+ This repo is a Bun-first local app for browsing, exporting, and exposing agent conversation history from Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode.
6
+
7
+ The command-line exporter, MCP server, and Codex plugin were removed in the 2.0 hard cut. Do not add bridge commands, compatibility aliases, or deprecated entrypoints back. New client workflows should use the stable HTTP API exposed by the UI server or the stable `spiracha/client` package export.
6
8
 
7
9
  Main entrypoints:
8
- - `rtk bun start ...` for Codex chat export
9
- - `rtk bun start` for interactive export mode
10
- - `rtk bun run export:claude -- ...` for Claude transcript export
11
- - `rtk bun run ./src/export-cursor.ts ...` (or `rtk spiracha cursor ...`) for Cursor thread export, recovery, and prune
12
- - `rtk bun run mcp` for the MCP server used by the local Codex plugin
13
- - `rtk bun run ui:dev` for the local browser UI across Codex, Cursor, and Antigravity data
14
- - published package entrypoints:
15
- - `rtk bunx spiracha`
16
- - `rtk bunx spiracha ui`
17
- - `rtk bunx spiracha claude ...`
18
- - legacy aliases retained:
19
- - `rtk bunx codex-chats`
20
- - `rtk bunx codex-chats-claude`
10
+ - `bunx spiracha` for running the packaged UI app
11
+ - `rtk bun start` for local development
12
+ - `rtk bun run ui:preview` after a UI build
13
+ - `rtk bun test`, `rtk bun run lint`, and `rtk bun run typecheck` for verification
21
14
 
22
15
  ## Conventions and Rules
23
16
 
24
- - Always use `bun` and `bunx`, HARD BAN on: `npm` unless absolutely necessary.
17
+ - Use `rtk` as the default wrapper for shell commands that produce meaningful stdout or stderr.
18
+ - Always use `bun` and `bunx`; do not use `npm` unless absolutely necessary.
25
19
  - Prefer `Bun.file()` instead of `fs` whenever possible.
26
- - Kill any browser instance you start or stray `bun`, `node` processes after you are done. Never leave it running.
27
- - Prefer arrow functions to classical functions, and `type` over `interface` in TS.
28
- - Fixes are made using TDD approach.
29
- - `bun format` and `bun typecheck` should always be ran at the end of your completion, if you introduced any warnings or errors clean them up yourself before you complete.
30
- - NEVER disable a biome rule or TS rule without explicit permission from the user.
31
- - If you believe the code you are changing requires some clarification for future AI agents to understand why the change was made, add a brief comment.
32
- - Do NOT use decorative section headers made of repeated characters (e.g. `// -----`, `// =====`, etc.).
20
+ - Kill any browser instance or stray `bun`/`node` process you start.
21
+ - Prefer arrow functions to classical functions and `type` over `interface` in TypeScript.
22
+ - Make fixes using a TDD approach.
23
+ - Run `bun run lint`, `bun run typecheck`, and `bun test` before completion after meaningful code changes.
24
+ - Never disable a Biome or TypeScript rule without explicit permission.
25
+ - Add brief comments only when future agents need context that is not obvious from the code.
26
+ - Do not use decorative repeated-character section headers.
33
27
  - Use `it('should...')` style tests.
34
- - Unit-tests always live in the same folder as their implementation, never in the `test` folder.
35
-
36
- ## Working Rules
37
-
38
- - Use `rtk` as the default wrapper for shell commands that produce meaningful stdout or stderr.
39
- - Prefer `bun test` for verification. Run it after non-trivial changes.
40
- - Run `bun run lint` in addition to `bun test` and `bun run typecheck` before completion.
41
- - When changing package/distribution behavior, also run a local packed-tarball smoke test.
42
- - When changing the interactive flow, validate it in a real TTY session; piped stdin is not a reliable substitute.
43
- - When changing the UI package, validate it in a browser after the build or dev server is up.
44
- - Use `apply_patch` for manual edits.
45
- - Keep output compatibility stable. The exported transcript format is user-facing.
46
- - Preserve the behavior of existing flags unless the task explicitly changes CLI semantics.
28
+ - Unit tests live next to their implementation.
29
+ - `apps/ui/src/routeTree.gen.ts` is generated and must not be manually edited.
47
30
 
48
31
  ## Architecture
49
32
 
50
- Codex exporter modules:
51
- - `src/lib/codex-exporter.ts`
52
- - top-level orchestration and public barrel exports
53
- - `src/lib/codex-exporter-cli.ts`
54
- - CLI parsing, help text, deeplink parsing, default output-dir resolution
55
- - `src/lib/codex-exporter-db.ts`
56
- - SQLite queries, fallback session discovery, filter matching, export target construction
57
- - `src/lib/codex-exporter-transcript.ts`
58
- - JSONL transcript parsing, metadata extraction, message/tool rendering
59
- - `src/lib/codex-exporter-types.ts`
60
- - shared Codex exporter types and default path constants
61
-
62
- Cursor exporter modules:
63
- - `src/export-cursor.ts`
64
- - CLI runner with `list`, `export`, `recover`, and `prune` subcommands
65
- - `src/lib/cursor-exporter.ts`
66
- - export orchestration, CLI parsing, and help text
67
- - `src/lib/cursor-db.ts`
68
- - workspace storage bucket discovery, grouping, thread/bubble reads from the global store
69
- - `src/lib/cursor-recovery.ts`
70
- - re-links lost threads into the active workspace bucket and prunes threads (destructive)
71
- - `src/lib/cursor-transcript.ts`
72
- - renders Cursor bubbles (user, assistant, reasoning, tool calls) to Markdown or TXT
73
- - `src/lib/cursor-exporter-types.ts`
74
- - shared Cursor types and macOS Cursor data-dir path resolution (`SPIRACHA_CURSOR_USER_DIR` override)
75
-
76
- Antigravity browser/export modules:
77
- - `src/lib/antigravity-db.ts`
78
- - Antigravity workspace discovery, summary-index parsing, transcript lookup, and Markdown rendering
79
- - `src/lib/antigravity-exporter-types.ts`
80
- - shared Antigravity workspace and conversation types plus default data-dir resolution
81
- - `src/lib/antigravity-keychain.ts`
82
- - macOS Keychain access and safe-storage decryption helpers for Antigravity transcript export
83
-
84
- Other important files:
85
- - `src/lib/claude-exporter.ts`
86
- - Claude transcript export pipeline
33
+ Stable conversation API:
34
+ - `src/client.ts`
35
+ - public Bun client export for local serverless access and HTTP access to the same normalized conversation DTOs
36
+ - `src/lib/conversation-api.ts`
37
+ - HTTP request handler shared by TanStack API routes and root tests
38
+ - owns response envelopes, validation errors, route dispatch, and default selector behavior
39
+ - `src/lib/conversation-data/index.ts`
40
+ - source registry, pagination, path-scoped collection, reference resolution, and normalized Markdown rendering
41
+ - `src/lib/conversation-data/types.ts`
42
+ - shared source, message, detail, paging, location, and adapter contracts
43
+ - `src/lib/conversation-data/path-match.ts`
44
+ - exact and descendant cwd matching
45
+ - `src/lib/conversation-data/message-selector.ts`
46
+ - `all`, `last_assistant`, and `last_final_answer` message selection
47
+ - `src/lib/conversation-data/*-adapter.ts`
48
+ - source-specific mapping into normalized conversation shapes
49
+
50
+ Codex browser/export modules:
87
51
  - `src/lib/codex-browser-db.ts`
88
52
  - project/thread browsing queries, delete flows, dashboard summaries, DB path resolution
89
53
  - `src/lib/codex-browser-export.ts`
90
- - UI-facing thread export download rendering
54
+ - UI-facing thread download rendering
55
+ - `src/lib/codex-thread-types.ts`
56
+ - Codex DB row and transcript rendering types
57
+ - `src/lib/codex-transcript-renderer.ts`
58
+ - Markdown/plain text rendering for Codex session files
91
59
  - `src/lib/codex-thread-parser.ts`
92
60
  - structured Codex event parsing used by analytics and the UI
93
61
  - `src/lib/codex-analytics.ts`
94
- - token/tool analytics derived from thread rows plus bounded transcript parsing and DB-row metadata cache keys
62
+ - token/tool analytics derived from thread rows plus bounded transcript parsing and cache keys
63
+ - `src/lib/codex-thread-cache.ts`
64
+ - thread-detail cache helpers
65
+ - `src/lib/codex-thread-recovery.ts`
66
+ - Codex project recovery helpers
67
+
68
+ Source-specific browser/export modules:
69
+ - `src/lib/claude-code-db.ts`, `src/lib/claude-code-transcript-phase.ts`, `src/lib/claude-code-transcript.ts`
70
+ - `src/lib/kiro-db.ts`, `src/lib/kiro-transcript-phase.ts`, `src/lib/kiro-transcript.ts`
71
+ - `src/lib/qoder-db.ts`, `src/lib/qoder-transcript-phase.ts`, `src/lib/qoder-transcript.ts`
72
+ - `src/lib/cursor-db.ts`, `src/lib/cursor-recovery.ts`, `src/lib/cursor-transcript.ts`
73
+ - `src/lib/antigravity-db.ts`, `src/lib/antigravity-keychain.ts`
74
+ - `src/lib/opencode-db.ts`, `src/lib/opencode-transcript-phase.ts`, `src/lib/opencode-think-tags.ts`, `src/lib/opencode-transcript.ts`
75
+
76
+ Shared utilities:
95
77
  - `src/lib/concurrency.ts`
96
- - shared bounded-concurrency helper for large file/database workloads
78
+ - `src/lib/model-label.ts`
79
+ - `src/lib/path-transforms.ts`
80
+ - `src/lib/shared.ts`
81
+ - `src/lib/sqlite-error.ts`
82
+ - `src/lib/sqlite-retry.ts`
97
83
  - `src/lib/ui-cache.ts`
98
- - temporary cache under `os.tmpdir()` for transcript and analytics lookups
99
- - `src/mcp-server.ts`
100
- - MCP server exposing `export_codex_chats` and `export_claude_transcript`
101
- - `plugins/codex-chats-export/`
102
- - local Codex plugin manifest, skill, and MCP wiring
84
+ - `src/lib/ui-export-archive.ts`
85
+ - `src/lib/ui-export-files.ts`
86
+
87
+ UI package:
103
88
  - `apps/ui/`
104
- - TanStack Start browser UI package for Codex, Cursor, and Antigravity
105
- - source-specific index/detail routes include `/threads/$threadId`, `/cursor-threads/$composerId`, and `/antigravity-conversations/$conversationId`
89
+ - TanStack Start browser UI
90
+ - API routes live under `apps/ui/src/routes/api.v1.*.ts`
91
+ - source routes include `/threads/$threadId`, `/claude-code-sessions/$sessionId`, `/kiro-sessions/$sessionId`, `/qoder-sessions/$sessionId`, `/cursor-threads/$composerId`, `/antigravity-conversations/$conversationId`, and `/opencode-sessions/$sessionId`
92
+
93
+ ## Stable API Contract
94
+
95
+ The package exposes:
96
+ - `spiracha/client`
97
+ - `createConversationClient({ mode: 'local' })` for serverless local access
98
+ - `createConversationClient({ mode: 'http', baseUrl })` for a running UI server
99
+ - `spiracha/types`
100
+ - normalized conversation DTO types
101
+
102
+ The local UI server exposes:
103
+ - `GET /api/v1/sources`
104
+ - `GET /api/v1/conversations?cwd=<absolute-path>&include_messages=true`
105
+ - `POST /api/v1/conversation-query`
106
+ - `GET /api/v1/conversations/:source/:id`
107
+ - `GET /api/v1/conversations/:source/:id/export`
108
+ - `GET /api/v1/resolve?ref=<url-or-deeplink>`
109
+
110
+ Defaults:
111
+ - list endpoints default to `message_selector=last_final_answer`
112
+ - detail endpoints default to `message_selector=all`
113
+ - `source=codex,claude-code,...` may scope collection
114
+ - omitted source means all installed/available integrations
115
+ - all-source collection should tolerate missing optional integrations
116
+ - explicit source requests should surface source-specific failures
117
+
118
+ Do not bake review semantics into Spiracha. A client such as `fgh --collect` decides that a selected assistant message is a review and chooses where to save it.
106
119
 
107
120
  ## Test Strategy
108
121
 
109
122
  Current tests cover:
110
- - exporter end-to-end behavior for Codex and Claude
111
- - Cursor export, recovery, and pruning behavior
112
- - Antigravity discovery, transcript parsing, and artifact export rendering
113
- - structured Codex transcript parsing
114
- - project/thread browsing and destructive DB flows
115
- - analytics aggregation
116
- - bounded concurrency helpers and analytics cache-key behavior
117
- - browser-export rendering helpers
118
- - Codex CLI parsing helpers
119
- - interactive-mode inference helpers
120
- - transcript formatting helpers
121
- - MCP stdio protocol round-trips using the real server process
122
- - wrapped UI Vitest suite via `src/ui-package.test.ts`
123
- - packaged UI `bunx --package` launch path via `src/package-ui-smoke.test.ts`
124
- - type-checking via `bun run typecheck`
123
+ - stable conversation API envelopes, validation, source listing, path-scoped collection, message selectors, reference resolution, and Codex adapter mapping
124
+ - source-specific discovery, transcript parsing, phase classification, and export rendering
125
+ - Codex project/thread browsing, delete semantics, analytics, cache keys, and recovery helpers
126
+ - Cursor recovery/prune behavior
127
+ - Antigravity discovery, transcript parsing, Keychain state, and artifact export rendering
128
+ - OpenCode MiniMax `<think>` tag extraction, including code-literal preservation
129
+ - UI component and adapter behavior through the Vitest suite wrapped by `src/ui-package.test.ts`
130
+ - package manifest hard-cut guarantees through `src/package-manifest.test.ts`
125
131
 
126
132
  When changing risky areas:
127
- - CLI changes: update/add tests in `src/lib/codex-exporter-cli.test.ts`
128
- - transcript parsing/rendering: update/add tests in `src/lib/codex-exporter-transcript.test.ts`
129
- - structured transcript parsing/UI event extraction: update/add tests in `src/lib/codex-thread-parser.test.ts`
130
- - DB/filter/target logic: prefer focused unit tests against `src/lib/codex-exporter-db.ts`
131
- - project/thread browsing, delete semantics, and analytics: update/add tests in `src/lib/codex-browser-db.test.ts` and `src/lib/codex-analytics.test.ts`
132
- - shared concurrency behavior: update/add tests in `src/lib/concurrency.test.ts`
133
- - MCP contract changes: update `src/mcp-server.test.ts`
134
- - UI component behavior: update/add Vitest files under `apps/ui/src/**/*.vitest.tsx`
133
+ - Stable API changes: update `src/lib/conversation-api.test.ts` and focused tests under `src/lib/conversation-data/`.
134
+ - Source adapter changes: update the matching `src/lib/conversation-data/*-adapter.ts` tests or add one next to the adapter.
135
+ - Transcript parsing/rendering: update the matching source transcript tests.
136
+ - Codex browsing/delete/analytics: update `src/lib/codex-browser-db.test.ts` and `src/lib/codex-analytics.test.ts`.
137
+ - UI behavior: update/add Vitest files under `apps/ui/src/**/*.vitest.tsx`.
138
+ - API route behavior: add a real UI server/browser smoke when route registration or SSR behavior changes.
135
139
 
136
140
  ## Common Commands
137
141
 
@@ -141,68 +145,16 @@ rtk bun run lint
141
145
  rtk bun run typecheck
142
146
  rtk bun run build
143
147
  rtk bun run coverage
144
- rtk bun run smoke:package-ui
145
- rtk bun run test:perf
146
148
  rtk bun start
147
- rtk bun start -- --help
148
- rtk bun start --interactive
149
- rtk bun run export:claude -- --help
150
- rtk bun run ./src/export-cursor.ts -- --help
151
- rtk bun run mcp
152
- rtk bun run ui:dev
153
- ```
154
-
155
- Packed tarball smoke test:
156
-
157
- ```bash
158
- rtk bun pm pack
159
- package_tgz="$PWD/spiracha-<version>.tgz"
160
- tmp_dir=$(mktemp -d)
161
- cd "$tmp_dir"
162
- printf '{"name":"codex-chats-smoke","private":true}\n' > package.json
163
- rtk bun add "$package_tgz"
164
- rtk bunx spiracha --help
165
- rtk bunx spiracha ui --help
166
- rtk bunx spiracha claude --help
167
- rtk bunx codex-chats --help
168
- rtk bunx codex-chats-claude --help
169
- rtk bun run smoke:package-ui
170
- ```
171
-
172
- Example Codex export:
173
-
174
- ```bash
175
- rtk bunx spiracha
176
- rtk bunx spiracha codex://threads/<thread-id> --no-metadata
177
- rtk bun start --tools --project summer
178
- rtk bun start codex://threads/<thread-id> --output-format txt
179
- ```
180
-
181
- Example Claude export:
182
-
183
- ```bash
184
- rtk bunx spiracha claude /path/to/transcript --output-format txt
185
- rtk bun run export:claude -- /path/to/export-dir --output-format txt
186
- ```
187
-
188
- Example Cursor export:
189
-
190
- ```bash
191
- rtk bunx spiracha cursor list
192
- rtk bunx spiracha cursor export --workspace summer
193
- rtk bunx spiracha cursor export --thread <composer-id> --output-format txt
194
- rtk bunx spiracha cursor recover --workspace summer --apply
149
+ rtk bun run ui:preview
150
+ rtk bun run --cwd apps/ui test
195
151
  ```
196
152
 
197
153
  ## Notes
198
154
 
199
- - `--project` matches the final `cwd` path segment for both POSIX and Windows-style paths, not the full path.
200
- - Running `codex-chats` or `bun start` with no args enters interactive mode.
201
- - Codex MCP exports must be scoped by at least one of `deeplinks`, `project`, or `cwd`.
202
- - Antigravity browsing/export currently ships through the browser UI rather than a standalone CLI command.
203
- - `txt` output is intentionally real plain text, not Markdown with a `.txt` extension.
204
- - The published package is Bun-first. `bin` entrypoints target Bun shebang execution.
205
- - The UI package runs `vite` through `bun --bun ...` because its server functions depend on Bun-only modules like `bun:sqlite`.
206
- - Keep UI runtime dependency versions aligned with the root package when both package manifests list the same TanStack/React runtime package; mismatched server-function manifests have broken packaged production builds.
155
+ - Keep root-package source modules imported by the UI available through `@spiracha/lib/*`.
156
+ - The UI package runs Vite through `bun --bun` because server functions depend on Bun-only modules like `bun:sqlite`.
207
157
  - TanStack Start server functions should use `.validator(...)`, not deprecated `.inputValidator(...)`.
208
- - `apps/ui/src/routeTree.gen.ts` is generated and should not be manually edited or lint-formatted.
158
+ - API routes should use route-level `server.handlers`.
159
+ - Keep `*-transcript-phase.ts` modules browser-safe; UI client adapters import them directly.
160
+ - Keep source-specific phase and filtering rules centralized so the UI export flow and stable API select messages consistently.