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/README.md CHANGED
@@ -4,296 +4,151 @@
4
4
  <img src="apps/ui/public/icon.svg" alt="Spiracha icon" width="96" height="100">
5
5
  </p>
6
6
 
7
- [![npm version](https://img.shields.io/npm/v/spiracha?label=npm)](https://www.npmjs.com/package/spiracha)
8
- [![downloads](https://img.shields.io/npm/dm/spiracha?label=downloads)](https://www.npmjs.com/package/spiracha)
9
7
  [![license](https://img.shields.io/npm/l/spiracha)](LICENSE.md)
10
8
  [![runtime](https://img.shields.io/badge/runtime-Bun-000000?logo=bun)](https://bun.sh)
11
- [![wakatime](https://wakatime.com/badge/user/a0b906ce-b8e7-4463-8bce-383238df6d4b/project/f035d5e2-fa44-4383-913b-53c2c326d8a7.svg)](https://wakatime.com/badge/user/a0b906ce-b8e7-4463-8bce-383238df6d4b/project/f035d5e2-fa44-4383-913b-53c2c326d8a7)
12
9
 
13
- Export local Codex, Claude Code, and Cursor transcripts to Markdown or plain text, and inspect Codex, Cursor, and Antigravity history through a browser UI.
10
+ Spiracha is a local TanStack Start app for browsing and exporting agent conversation history from Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode.
11
+
12
+ The legacy CLI, MCP server, and Codex plugin surfaces have been removed in the 2.0 hard cut. Spiracha now exposes the UI and a stable local data API; client-specific workflows such as review collection belong in the client that calls the API.
14
13
 
15
14
  ## Quick Start
16
15
 
17
- For repo-local development:
16
+ To run the packaged app:
18
17
 
19
18
  ```bash
20
- rtk bun start
21
- rtk bun run ui:dev
19
+ bunx spiracha
22
20
  ```
23
21
 
24
- Published package usage, once the package is available on npm:
25
-
26
- ```bash
27
- rtk bunx spiracha
28
- rtk bunx spiracha ui
29
- rtk bunx spiracha claude /path/to/session-export.jsonl --output-format txt
30
- rtk bunx spiracha cursor list
31
- ```
22
+ Spiracha asks Vite for port 3000 and automatically uses the next available port when 3000 is occupied.
32
23
 
33
- ## Features
34
-
35
- - Export Codex session transcripts from local `.codex` history
36
- - Export Cursor Agent/Composer threads from local Cursor storage
37
- - Browse Codex, Cursor, and Antigravity history in a TanStack Start UI
38
- - Inspect Codex thread timelines, tool calls, thread metadata, and raw event context
39
- - Inspect Cursor workspace inventories, dedicated thread detail pages, recover split storage buckets, and export or delete workspace threads
40
- - Inspect Antigravity workspaces, dedicated conversation detail pages, unlock transcript export through macOS Keychain, and export conversation transcripts or generated artifacts
41
- - Delete threads or derived projects from the Codex SQLite database after confirmation
42
- - Download thread exports directly from the UI as Markdown or plain text, with optional metadata, commentary, and tool-call inclusion
43
- - View dashboard and analytics summaries, including token totals and tool-call frequency
44
- - Filter Codex exports by:
45
- - exact `cwd`
46
- - project basename via `--project`
47
- - specific thread deeplinks like `codex://threads/<id>`
48
- - Include command logs with `--tools`
49
- - Write Markdown or real plain-text output with `--output-format md|txt`
50
- - Export Claude Code transcript `.jsonl` files or export directories
51
- - Export, recover, and prune Cursor chat history from the CLI
52
- - Run the same export flows through an MCP server and a local Codex plugin
53
-
54
- ## Install
24
+ For repository development:
55
25
 
56
26
  ```bash
57
27
  rtk bun install
28
+ rtk bun start
58
29
  ```
59
30
 
60
- For package use after publish, no local install is required:
31
+ Open the local URL printed by Vite.
61
32
 
62
- ```bash
63
- rtk bunx spiracha --help
64
- rtk bunx spiracha ui --help
65
- ```
33
+ ## What It Does
66
34
 
67
- ## Usage
35
+ - Browse local conversations across Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode.
36
+ - Inspect source-specific detail pages with transcript, tool, reasoning, metadata, raw event, export, and delete flows where supported by the source.
37
+ - Export transcripts from the UI as Markdown, text, or zip bundles with source-specific commentary/final-answer filtering.
38
+ - Expose a stable API for local clients that need normalized conversation metadata and message payloads.
39
+ - Resolve Spiracha UI links and native source links into normalized `{ source, id }` references for cross-thread context lookup.
68
40
 
69
- ### Codex exports
41
+ ## Stable Data API
70
42
 
71
- Package entrypoint:
43
+ The API is served by the local UI server under `/api/v1`.
72
44
 
73
45
  ```bash
74
- rtk bunx spiracha [options] [codex://threads/<id> ...]
75
- rtk bunx spiracha codex [options] [codex://threads/<id> ...]
46
+ bunx spiracha
76
47
  ```
77
48
 
78
- With no arguments, `spiracha` starts in interactive mode and asks what you want to export.
49
+ Common read endpoints:
79
50
 
80
- Examples:
81
-
82
- ```bash
83
- rtk bunx spiracha
84
- rtk bunx spiracha --interactive
85
- rtk bunx spiracha --project summer
86
- rtk bunx spiracha --tools --project summer
87
- rtk bunx spiracha codex://threads/019da28f-ee5b-7881-afe0-68b3d3bd2c77
88
- rtk bunx spiracha codex://threads/019da28f-ee5b-7881-afe0-68b3d3bd2c77 --output-format txt
89
- rtk bunx spiracha --cwd ~/workspace/reversed/summer --flat
90
- rtk bunx spiracha codex://threads/<thread-id> --no-metadata
51
+ ```text
52
+ GET /api/v1/sources
53
+ GET /api/v1/conversations?cwd=/absolute/project&include_messages=true
54
+ POST /api/v1/conversation-query
55
+ GET /api/v1/conversations/:source/:id
56
+ GET /api/v1/conversations/:source/:id/export
57
+ GET /api/v1/resolve?ref=<url-or-deeplink>
91
58
  ```
92
59
 
93
- Important flags:
94
- - no args: start interactive mode
95
- - `--interactive`: force the interactive prompt flow
96
- - `--project <name>`: matches the final `cwd` path segment for both POSIX and Windows-style paths
97
- - `--cwd <path>`: exact cwd match
98
- - `--tools`: include `exec_command` call logs and summaries
99
- - `--no-metadata`: omit the metadata section from the top of each export
100
- - `--flat`: write files into a single output folder
101
- - `--output-format md|txt`: output as Markdown or plain text
60
+ The default list selector is `last_final_answer`, which keeps `fgh --collect` style clients fast and small. Use `message_selector=all` when a client needs the full normalized thread.
102
61
 
103
- ### Browser UI
62
+ Example:
104
63
 
105
64
  ```bash
106
- rtk bunx spiracha ui
65
+ curl 'http://localhost:3000/api/v1/conversations?cwd=/Users/me/workspace/fgh&include_messages=true'
107
66
  ```
108
67
 
109
- This launches the packaged production UI server, opens your browser by default, and keeps running in the foreground.
110
- Large download bundles are written to a Spiracha-managed directory under your OS temp folder and served directly by the UI server, so packaged `rtk bunx spiracha ui` exports do not depend on your current working directory.
111
-
112
- Useful flags:
113
- - `--port <port>`: bind a specific port, default `3000`
114
- - `--host <host>`: bind a specific host, default `127.0.0.1`
115
- - `--db <path>`: override the Codex SQLite path used by the UI
116
- - `--no-open`: do not open the browser automatically
117
-
118
- The UI currently includes:
119
- - a Codex inventory and derived-project detail flow
120
- - a Cursor workspace inventory, workspace-thread listing, and standalone thread detail flow
121
- - an Antigravity workspace inventory, conversation listing, and standalone conversation detail flow
122
- - a Codex dashboard, Codex thread detail view, and Codex analytics page
123
-
124
- Codex inventory search and analytics project filters are stored in route search params, so filtered views can be bookmarked or reloaded. `/projects` and `/projects/$project` use `q`, and `/analytics` uses `project`.
125
-
126
- Analytics cache keys are derived from Codex DB row metadata instead of statting every rollout file. This avoids large per-rollout stat storms on big histories and lets cached analytics resolve without touching transcript files. The hard tradeoff is that manual JSONL edits outside Codex do not invalidate analytics unless the corresponding DB row metadata changes or the temp UI cache is cleared. Transcript analytics parsing uses a bounded worker pool; tune it with `SPIRACHA_ANALYTICS_TRANSCRIPT_CONCURRENCY` when benchmarking large datasets.
127
-
128
- The thread detail page also supports a direct UUID shortcut route. Pasting `http://localhost:3000/<thread-id>` redirects to `/threads/<thread-id>`.
129
-
130
- Notable UI routes:
131
- - `/projects` and `/projects/$project` for Codex inventory and project threads
132
- - `/threads/$threadId` for Codex thread detail
133
- - `/cursor` and `/cursor/$workspaceKey` for Cursor workspace inventory and thread lists
134
- - `/cursor-threads/$composerId` for Cursor thread detail
135
- - `/antigravity` and `/antigravity/$workspaceKey` for Antigravity workspace inventory and conversation lists
136
- - `/antigravity-conversations/$conversationId` for Antigravity conversation detail
68
+ Response envelope:
137
69
 
138
- Examples:
139
-
140
- ```bash
141
- rtk bunx spiracha ui
142
- rtk bunx spiracha ui --port 43123 --no-open
143
- rtk bunx spiracha ui --db ~/.codex/state_5.sqlite
70
+ ```json
71
+ {
72
+ "data": [
73
+ {
74
+ "source": "codex",
75
+ "id": "019ecbfc-8a84-7421-ab3b-35653feb7896",
76
+ "title": "Review thread",
77
+ "workspacePath": "/Users/me/workspace/fgh",
78
+ "messages": [
79
+ {
80
+ "role": "assistant",
81
+ "phase": "final_answer",
82
+ "text": "Final review result..."
83
+ }
84
+ ],
85
+ "deepLinks": {
86
+ "ui": "/threads/019ecbfc-8a84-7421-ab3b-35653feb7896",
87
+ "native": "codex://threads/019ecbfc-8a84-7421-ab3b-35653feb7896",
88
+ "spiracha": "spiracha://conversation/codex/019ecbfc-8a84-7421-ab3b-35653feb7896"
89
+ }
90
+ }
91
+ ],
92
+ "meta": {
93
+ "hasNext": false,
94
+ "next_cursor": null
95
+ }
96
+ }
144
97
  ```
145
98
 
146
- Stop the UI with `Ctrl+C`.
99
+ For serverless access from Bun, use the public client export:
147
100
 
148
- ### Claude exports
101
+ ```ts
102
+ import { createConversationClient } from "spiracha/client";
149
103
 
150
- ```bash
151
- rtk bunx spiracha claude <input-path> [options]
104
+ const client = createConversationClient({ mode: "local" });
105
+ const page = await client.listConversations({
106
+ cwd: process.cwd(),
107
+ includeMessages: true,
108
+ messageSelector: "last_final_answer",
109
+ });
152
110
  ```
153
111
 
154
- Examples:
112
+ ## Source Locations
155
113
 
156
- ```bash
157
- rtk bunx spiracha claude /path/to/session.jsonl
158
- rtk bunx spiracha claude /path/to/export-dir --tools
159
- rtk bunx spiracha claude /path/to/export-dir --output-format txt
160
- ```
114
+ | Source | Default location | Primary override |
115
+ | --- | --- | --- |
116
+ | Codex | shared Codex DB probe list | `SPIRACHA_CODEX_DB` |
117
+ | Claude Code | `~/.claude/projects` | `SPIRACHA_CLAUDE_CODE_PROJECTS_DIR` |
118
+ | Kiro | `~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent/workspace-sessions` | `SPIRACHA_KIRO_WORKSPACE_SESSIONS_DIR` |
119
+ | Qoder | `~/Library/Application Support/Qoder/User/globalStorage/state.vscdb` and `~/Library/Application Support/Qoder/User/workspaceStorage` | `SPIRACHA_QODER_GLOBAL_STATE_DB`, `SPIRACHA_QODER_WORKSPACE_STORAGE_DIR` |
120
+ | Cursor | `~/Library/Application Support/Cursor/User` on macOS | `SPIRACHA_CURSOR_USER_DIR`, `SPIRACHA_CURSOR_PROJECTS_DIR` |
121
+ | Antigravity | `~/.gemini/antigravity-ide` and `~/.gemini/antigravity` | `SPIRACHA_ANTIGRAVITY_DIRS`, `SPIRACHA_ANTIGRAVITY_DIR` |
122
+ | OpenCode | `${XDG_DATA_HOME:-~/.local/share}/opencode/opencode.db` | `SPIRACHA_OPENCODE_DB` |
123
+ | UI exports | OS temp directory under `spiracha-ui-exports` | `SPIRACHA_UI_EXPORT_DIR` |
161
124
 
162
- Repo-local equivalents remain available during development:
125
+ ## UI Routes
163
126
 
164
- ```bash
165
- rtk bun start
166
- rtk bun start --interactive
167
- rtk bun start ...
168
- rtk bun run export:claude -- ...
169
- ```
170
-
171
- Legacy aliases remain available for compatibility:
172
-
173
- ```bash
174
- rtk bunx codex-chats
175
- rtk bunx codex-chats-claude
176
- ```
177
-
178
- ### Cursor exports
179
-
180
- ```bash
181
- rtk bunx spiracha cursor <subcommand> [options]
182
- ```
183
-
184
- Examples:
185
-
186
- ```bash
187
- rtk bunx spiracha cursor list
188
- rtk bunx spiracha cursor list --query summer
189
- rtk bunx spiracha cursor export --workspace summer --output-dir ./cursor-exports
190
- rtk bunx spiracha cursor export --thread <composer-id> --output-format txt
191
- rtk bunx spiracha cursor recover --workspace summer --apply
192
- rtk bunx spiracha cursor prune --workspace summer --apply
193
- ```
194
-
195
- Repo-local equivalent during development:
196
-
197
- ```bash
198
- rtk bun run ./src/export-cursor.ts --help
199
- ```
200
-
201
- Antigravity conversation browsing and export currently live in the browser UI rather than a standalone CLI subcommand.
202
-
203
- ## MCP server
204
-
205
- Run the MCP server with:
206
-
207
- ```bash
208
- rtk bun run mcp
209
- ```
210
-
211
- Exposed tools:
212
- - `export_codex_chats`
213
- - `export_claude_transcript`
214
-
215
- The local plugin lives in [plugins/codex-chats-export](plugins/codex-chats-export) and is registered through [plugins/codex-chats-export/.mcp.json](plugins/codex-chats-export/.mcp.json).
127
+ - `/codex` and `/codex/$project` for Codex inventory and project threads.
128
+ - `/threads/$threadId` for Codex thread detail.
129
+ - `/claude-code`, `/kiro`, `/qoder`, `/cursor`, `/antigravity`, and `/opencode` for source inventories.
130
+ - Source detail routes include `/claude-code-sessions/$sessionId`, `/kiro-sessions/$sessionId`, `/qoder-sessions/$sessionId`, `/cursor-threads/$composerId`, `/antigravity-conversations/$conversationId`, and `/opencode-sessions/$sessionId`.
131
+ - `/analytics` for Codex token and tool-call analytics.
216
132
 
217
133
  ## Development
218
134
 
219
- Useful commands:
220
-
221
135
  ```bash
222
136
  rtk bun test
223
137
  rtk bun run lint
224
138
  rtk bun run typecheck
225
139
  rtk bun run build
226
140
  rtk bun run coverage
227
- rtk bun run ui:dev
228
- rtk bun run --cwd apps/ui test
229
- rtk bun run test:perf
230
141
  rtk bun start
231
- rtk bun start --interactive
232
- rtk bun start -- --help
233
- rtk bun run export:claude -- --help
234
- rtk bun run mcp
235
- ```
236
-
237
- Packed-tarball smoke test before publishing:
238
-
239
- ```bash
240
- rtk bun pm pack
241
- package_tgz="$PWD/spiracha-<version>.tgz"
242
- tmp_dir=$(mktemp -d)
243
- cd "$tmp_dir"
244
- printf '{"name":"codex-chats-smoke","private":true}\n' > package.json
245
- rtk bun add "$package_tgz"
246
- rtk bunx --package "$package_tgz" spiracha --help
247
- rtk bunx --package "$package_tgz" spiracha ui --help
248
- rtk bunx --package "$package_tgz" spiracha claude --help
249
- rtk bunx --package "$package_tgz" codex-chats --help
250
- rtk bunx --package "$package_tgz" codex-chats-claude --help
142
+ rtk bun run --cwd apps/ui test
251
143
  ```
252
144
 
253
- For the exact packaged UI launch path, run:
254
-
255
- ```bash
256
- rtk bun run smoke:package-ui
257
- ```
145
+ The UI package runs Vite through `bun --bun` because server functions import Bun-only modules such as `bun:sqlite`.
258
146
 
259
- This builds the app, packs a fresh tarball in a clean temp directory, launches `rtk bunx --package <tgz> spiracha ui --no-open`, probes the running UI for real SSR HTML, rejects Bun fallback responses, and shuts it down. The same packaged-path smoke is also covered by `src/package-ui-smoke.test.ts`.
260
-
261
- ## Project Layout
262
-
263
- - `apps/ui/`: TanStack Start browser app for Codex, Cursor, and Antigravity browsing plus export and delete flows
264
- - `src/export-chats.ts`: Codex CLI wrapper
265
- - `src/export-claude.ts`: Claude CLI wrapper
266
- - `src/export-cursor.ts`: Cursor CLI wrapper
267
- - `src/mcp-server.ts`: MCP server entrypoint
268
- - `src/lib/antigravity-*.ts`: Antigravity workspace discovery, transcript rendering, and Keychain helpers
269
- - `src/lib/codex-exporter-*.ts`: Codex exporter modules
270
- - `src/lib/codex-browser-*.ts`: shared browser/UI data, analytics, and export helpers
271
- - `src/lib/codex-thread-*.ts`: structured transcript parsing and caching helpers
272
- - `src/lib/concurrency.ts`: shared bounded-concurrency helper for large transcript and DB workloads
273
- - `src/lib/claude-exporter.ts`: Claude exporter implementation
274
- - `src/lib/cursor-*.ts`: Cursor discovery, transcript rendering, recovery, and CLI helpers
275
- - `plugins/codex-chats-export/`: local Codex plugin bundle
276
-
277
- ## Testing
278
-
279
- The test suite includes:
280
- - Codex exporter end-to-end coverage
281
- - Claude exporter end-to-end coverage
282
- - Cursor exporter and recovery coverage
283
- - Antigravity discovery and export coverage
284
- - Codex CLI helper tests
285
- - transcript rendering helper tests
286
- - route search parsing and bounded concurrency tests
287
- - MCP stdio protocol round-trip tests
288
- - local packaging should be smoke-tested with a packed tarball before publishing
289
-
290
- Coverage enforcement:
291
- - `rtk bun run coverage:root` checks the root Bun unit-test surface at a minimum of 90% line coverage.
292
- - `rtk bun run coverage:ui` checks the UI unit-test surface at a minimum of 90% line coverage.
293
- - `rtk bun run coverage` runs both checks.
294
-
295
- Run:
147
+ ## Breaking Consequences
296
148
 
297
- ```bash
298
- rtk bun test
299
- ```
149
+ - The only published `bin` entry is `spiracha`, and it only launches the local UI server.
150
+ - No `codex-chats`, `codex-chats-claude`, or legacy export command remains.
151
+ - No repo-local CLI export flow remains.
152
+ - No standalone Claude or Cursor export CLI remains.
153
+ - No MCP server or local Codex plugin remains.
154
+ - Programmatic consumers should call the stable local HTTP API or import `spiracha/client` from Bun.
package/apps/ui/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- This package is the local browser UI for Spiracha. It reads Codex, Cursor, and Antigravity local data through TanStack Start server functions and shared root-package helpers.
5
+ This package is the local browser UI for Spiracha. It reads Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode local data through TanStack Start server functions and shared root-package helpers.
6
6
 
7
7
  ## Commands
8
8
 
@@ -17,19 +17,24 @@ rtk bun run coverage
17
17
  Important:
18
18
 
19
19
  - `dev`, `build`, and `preview` run through `bun --bun ...` on purpose. Do not switch them back to plain `vite` or Node execution, because the server functions import Bun-only modules such as `bun:sqlite`.
20
- - Keep TanStack/React runtime dependency versions aligned with the root package when both manifests list the same package. Version drift can break packaged server-function manifests in production.
20
+ - The root package mirrors UI runtime dependencies needed by the packaged `bunx spiracha` launcher. Keep `apps/ui/package.json` and the root `dependencies` aligned when browser/runtime dependencies change.
21
21
 
22
22
  ## Routing
23
23
 
24
24
  - This package uses TanStack Start with file-based routes in `src/routes/`.
25
25
  - `src/routeTree.gen.ts` is generated. Do not edit it manually.
26
26
  - If route typing behaves strangely, delete `src/routeTree.gen.ts` and rebuild with `rtk bun run build` to regenerate it cleanly.
27
+ - Stable API routes live in `src/routes/api.v1.*.ts` and should stay thin wrappers around `@spiracha/lib/conversation-api`.
27
28
  - The UI supports both `/threads/$threadId` and a root shortcut route `/$threadId` that redirects straight to the thread detail page.
28
- - Codex project inventory and project-thread search use route search params. `/projects` and `/projects/$project` use `q`.
29
+ - Codex project inventory and project-thread search use route search params. `/codex` and `/codex/$project` use `q`.
29
30
  - Codex analytics uses the `project` route search param so filtered analytics links can be bookmarked and reloaded.
31
+ - Claude Code session detail lives at `/claude-code-sessions/$sessionId`.
32
+ - Kiro session detail lives at `/kiro-sessions/$sessionId`.
33
+ - Qoder session detail lives at `/qoder-sessions/$sessionId`.
30
34
  - Cursor thread detail lives at `/cursor-threads/$composerId`.
31
35
  - Antigravity conversation detail lives at `/antigravity-conversations/$conversationId`.
32
- - Keep the Codex, Cursor, and Antigravity list/detail pages aligned around the same table-driven index/detail pattern when adding new source integrations.
36
+ - OpenCode session detail lives at `/opencode-sessions/$sessionId`.
37
+ - Keep the Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode list/detail pages aligned around the same table-driven index/detail pattern when adding new source integrations.
33
38
 
34
39
  ## Shared Data Layer
35
40
 
@@ -40,25 +45,48 @@ The UI depends on root-package helpers via `@spiracha/*` path aliases:
40
45
  - `@spiracha/lib/codex-thread-cache`
41
46
  - `@spiracha/lib/codex-analytics`
42
47
  - `@spiracha/lib/concurrency`
48
+ - `@spiracha/lib/claude-code-db`
49
+ - `@spiracha/lib/claude-code-transcript-phase`
50
+ - `@spiracha/lib/claude-code-transcript`
51
+ - `@spiracha/lib/kiro-db`
52
+ - `@spiracha/lib/kiro-transcript-phase`
53
+ - `@spiracha/lib/kiro-transcript`
54
+ - `@spiracha/lib/qoder-db`
55
+ - `@spiracha/lib/qoder-transcript-phase`
56
+ - `@spiracha/lib/qoder-transcript`
43
57
  - `@spiracha/lib/cursor-db`
44
58
  - `@spiracha/lib/cursor-recovery`
45
59
  - `@spiracha/lib/cursor-transcript`
46
60
  - `@spiracha/lib/antigravity-db`
47
61
  - `@spiracha/lib/antigravity-keychain`
62
+ - `@spiracha/lib/opencode-db`
63
+ - `@spiracha/lib/opencode-transcript-phase`
64
+ - `@spiracha/lib/opencode-think-tags`
65
+ - `@spiracha/lib/opencode-transcript`
66
+ - `@spiracha/lib/conversation-api`
67
+ - `@spiracha/lib/conversation-data`
48
68
 
49
69
  Keep server-only imports inside server functions or route loaders. Do not import Bun-only modules into purely client-side components.
70
+ The `*-transcript-phase` helpers are intentionally browser-safe and may be imported by client adapters.
50
71
 
51
72
  ## Data Access Patterns
52
73
 
53
74
  Use the existing layers consistently:
54
75
 
55
- - TanStack Start server functions in `src/lib/codex-server.ts`, `src/lib/cursor-server.ts`, and `src/lib/antigravity-server.ts`
76
+ - TanStack Start server functions in `src/lib/codex-server.ts`, `src/lib/claude-code-server.ts`, `src/lib/kiro-server.ts`, `src/lib/qoder-server.ts`, `src/lib/cursor-server.ts`, `src/lib/antigravity-server.ts`, and `src/lib/opencode-server.ts`
56
77
  - Use for any browser-triggered read/write that needs Bun-only modules, DB access, filesystem access, Keychain access, or shared root-package helpers.
57
78
  - Use `.validator(...)` for input validation. Do not add new `.inputValidator(...)` calls.
58
- - TanStack Query query options in `src/lib/codex-queries.ts`, `src/lib/cursor-queries.ts`, and `src/lib/antigravity-queries.ts`
79
+ - TanStack Query query options in `src/lib/codex-queries.ts`, `src/lib/claude-code-queries.ts`, `src/lib/kiro-queries.ts`, `src/lib/qoder-queries.ts`, `src/lib/cursor-queries.ts`, `src/lib/antigravity-queries.ts`, and `src/lib/opencode-queries.ts`
59
80
  - Use for client-side fetching, caching, retries, and invalidation of server-function results.
60
81
  - Shared root-package helpers under `@spiracha/lib/*`
61
- - Extend these when the behavior should stay shared between the UI, CLI, and packaged launcher.
82
+ - Extend these when the behavior should stay shared between the UI and the stable data API.
83
+ - Use the shared source-specific phase helpers for assistant commentary/final-answer rules instead of duplicating that logic in UI adapters.
84
+ - Keep OpenCode think-tag handling in `@spiracha/lib/opencode-think-tags` so UI display and exports strip MiniMax reasoning tags consistently.
85
+ - Stable API route handlers in `src/routes/api.v1.*.ts`
86
+ - Use route-level `server.handlers`.
87
+ - Delegate to `@spiracha/lib/conversation-api` instead of duplicating parsing or response-envelope logic.
88
+ - `src/lib/source-session-export-server.ts`
89
+ - Use for single-session source exports that may return either inline content or a temporary zip download URL.
62
90
  - `settings-store.tsx`
63
91
  - Use only for browser-local UI preferences. Do not put server-derived source data here.
64
92
 
@@ -73,6 +101,7 @@ For URL-backed route state, use `src/lib/route-search.ts` instead of ad hoc pars
73
101
  ## Testing
74
102
 
75
103
  - UI component tests live under `src/**/*.vitest.tsx`.
104
+ - Source-specific transcript adapter tests live next to their adapter files under `src/lib/*.vitest.ts`.
76
105
  - Route search parsing tests live next to the helper in `src/lib/route-search.vitest.ts`.
77
106
  - The root package wraps this Vitest suite from `src/ui-package.test.ts` so `rtk bun test` at the repo root exercises both the Bun suite and the UI suite.
78
107
 
package/apps/ui/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Spiracha UI
2
2
 
3
- The browser UI for browsing local Codex, Cursor, and Antigravity history, inspecting transcript details, exporting chats, and analyzing Codex usage patterns.
3
+ The browser UI for browsing local Codex, Claude Code, Kiro, Qoder, Cursor, Antigravity, and OpenCode history, inspecting transcript details, exporting chats, and analyzing Codex usage patterns.
4
4
 
5
5
  ## Stack
6
6
 
@@ -18,15 +18,24 @@ The browser UI for browsing local Codex, Cursor, and Antigravity history, inspec
18
18
  - lists derived Codex projects from the Codex SQLite database
19
19
  - lists Codex threads within a project in chronological order
20
20
  - shows Codex thread timelines, tool calls, metadata, and raw event context
21
- - exports Codex threads as Markdown or plain text with optional metadata, commentary, and tool-call inclusion
21
+ - exports Codex, Claude Code, Kiro, Qoder, Cursor, and OpenCode sessions or threads as Markdown, plain text, or optional zip archives with optional metadata, commentary, and tool-call inclusion
22
+ - lists Claude Code workspaces and sessions from local `~/.claude/projects` JSONL files
23
+ - shows dedicated Claude Code session detail pages with reasoning, tool calls, token metadata, and export actions
24
+ - lists Kiro workspaces and sessions from local Kiro workspace session files
25
+ - shows dedicated Kiro session detail pages with image attachments, prompt logs, execution-derived tool calls, metadata, and export actions
26
+ - lists Qoder workspaces and sessions from local Qoder history and checkpoint storage
27
+ - shows dedicated Qoder session detail pages with prompts, checkpoint file operations, metadata, and export actions
22
28
  - lists Cursor workspaces and workspace threads with the same table-based index/detail flow as Codex
23
29
  - shows dedicated Cursor thread detail pages with breadcrumbs back to the workspace and source
24
30
  - recovers split Cursor storage buckets, exports Cursor threads, and deletes Cursor workspaces or threads
25
31
  - lists Antigravity workspaces and conversations, including transcript/artifact availability
26
32
  - shows dedicated Antigravity conversation detail pages with shared metadata and export actions
27
33
  - unlocks Antigravity transcript export through macOS Keychain and exports conversations or artifacts as Markdown
34
+ - lists OpenCode workspaces and sessions from the local OpenCode SQLite database
35
+ - shows dedicated OpenCode session detail pages with reasoning, tool parts, MiniMax `<think>` blocks, token metadata, and export actions
28
36
  - shows dashboard and analytics summaries, including Codex token totals and tool-call frequency
29
37
  - keeps Codex inventory search and analytics project filters in URL search params for reloadable and shareable views
38
+ - keeps source-specific commentary hidden by default while preserving final answers, with matching export filtering for Claude Code, Kiro, Qoder, and OpenCode
30
39
 
31
40
  ## Commands
32
41
 
@@ -58,19 +67,76 @@ Runtime configuration is intentionally small:
58
67
  - `SPIRACHA_ANALYTICS_TRANSCRIPT_CONCURRENCY`
59
68
  - Optional positive integer for Codex analytics transcript parsing concurrency.
60
69
  - Defaults to `8`.
61
-
62
- Export artifacts are served through the UI as attachment downloads from `/__exports/*`. The packaged `spiracha ui` launcher and the local dev server both use the same export-directory contract.
70
+ - `SPIRACHA_CLAUDE_CODE_PROJECTS_DIR`
71
+ - Optional absolute path to the Claude Code projects directory.
72
+ - If unset, Spiracha reads `${SPIRACHA_CLAUDE_CODE_DATA_DIR:-~/.claude}/projects`. `SPIRACHA_CLAUDE_CODE_DIR` and `SPIRACHA_CLAUDE_HOME` are also accepted aliases for the Claude Code data directory.
73
+ - `SPIRACHA_KIRO_WORKSPACE_SESSIONS_DIR`
74
+ - Optional absolute path to the Kiro workspace sessions directory.
75
+ - If unset, Spiracha reads `${SPIRACHA_KIRO_DATA_DIR:-~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent}/workspace-sessions`. `SPIRACHA_KIRO_AGENT_DIR` and `SPIRACHA_KIRO_DIR` are also accepted aliases for the Kiro data directory.
76
+ - `SPIRACHA_QODER_GLOBAL_STATE_DB`
77
+ - Optional absolute path to Qoder's global `state.vscdb`.
78
+ - If unset, Spiracha reads `${SPIRACHA_QODER_USER_DIR:-~/Library/Application Support/Qoder/User}/globalStorage/state.vscdb`. `SPIRACHA_QODER_DATA_DIR` and `SPIRACHA_QODER_DIR` are also accepted aliases for the Qoder user directory.
79
+ - `SPIRACHA_QODER_WORKSPACE_STORAGE_DIR`
80
+ - Optional absolute path to Qoder's `workspaceStorage` directory.
81
+ - If unset, Spiracha reads `${SPIRACHA_QODER_USER_DIR:-~/Library/Application Support/Qoder/User}/workspaceStorage`.
82
+ - `SPIRACHA_OPENCODE_DB`
83
+ - Optional absolute path to the OpenCode SQLite database.
84
+ - If unset, Spiracha reads `${SPIRACHA_OPENCODE_DATA_DIR:-${XDG_DATA_HOME:-~/.local/share}/opencode}/opencode.db`. `SPIRACHA_OPENCODE_DIR` is also accepted as an OpenCode data-directory alias.
85
+ - `SPIRACHA_CURSOR_USER_DIR`
86
+ - Optional absolute path to Cursor's `User` directory.
87
+ - If unset, Spiracha reads the platform default Cursor user-data directory.
88
+ - `SPIRACHA_CURSOR_PROJECTS_DIR`
89
+ - Optional absolute path to Cursor's project transcript directory.
90
+ - If unset, Spiracha infers `.cursor/projects` from the Cursor user directory when possible.
91
+ - `SPIRACHA_ANTIGRAVITY_DIRS`
92
+ - Optional path-list of Antigravity roots.
93
+ - If unset, Spiracha reads `~/.gemini/antigravity-ide` and `~/.gemini/antigravity`. `SPIRACHA_ANTIGRAVITY_DIR` is accepted as a single-root alias.
94
+
95
+ Export artifacts are served through the UI as attachment downloads from `/__exports/*`. The local dev and preview servers use the same export-directory contract.
96
+
97
+ Default source locations:
98
+
99
+ | Source | Default location | Primary override |
100
+ | --- | --- | --- |
101
+ | Codex | shared Codex DB probe list | `SPIRACHA_CODEX_DB` |
102
+ | Claude Code | `~/.claude/projects` | `SPIRACHA_CLAUDE_CODE_PROJECTS_DIR` |
103
+ | Kiro | `~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent/workspace-sessions` | `SPIRACHA_KIRO_WORKSPACE_SESSIONS_DIR` |
104
+ | Qoder | `~/Library/Application Support/Qoder/User/globalStorage/state.vscdb` + `~/Library/Application Support/Qoder/User/workspaceStorage` | `SPIRACHA_QODER_GLOBAL_STATE_DB`, `SPIRACHA_QODER_WORKSPACE_STORAGE_DIR` |
105
+ | Cursor | `~/Library/Application Support/Cursor/User` on macOS | `SPIRACHA_CURSOR_USER_DIR`, `SPIRACHA_CURSOR_PROJECTS_DIR` |
106
+ | Antigravity | `~/.gemini/antigravity-ide` + `~/.gemini/antigravity` | `SPIRACHA_ANTIGRAVITY_DIRS`, `SPIRACHA_ANTIGRAVITY_DIR` |
107
+ | OpenCode | `${XDG_DATA_HOME:-~/.local/share}/opencode/opencode.db` | `SPIRACHA_OPENCODE_DB` |
108
+ | Export downloads | OS temp directory under `spiracha-ui-exports` | `SPIRACHA_UI_EXPORT_DIR` |
63
109
 
64
110
  Codex analytics cache keys are based on Codex DB row metadata instead of statting every rollout file before cache hits. That keeps large histories responsive. The tradeoff is that manual JSONL edits outside Codex do not invalidate analytics unless DB row metadata changes or the temporary UI cache is cleared.
65
111
 
112
+ Transcript detail pages expose the same display controls across sources: user messages, commentary, tool calls, extra events, and raw JSON. Claude Code assistant lead-ins are classified from `stop_reason`, Kiro assistant phases are classified per user turn from session and execution files, Qoder shows local prompt history plus checkpoint file operations, and OpenCode assistant phases are classified per assistant run after stripping MiniMax `<think>` blocks into commentary. OpenCode think-tag extraction preserves literal `<think>` examples inside Markdown code spans and fenced code blocks.
113
+
66
114
  ## Routes
67
115
 
68
116
  - `/`
69
117
  - dashboard
70
- - `/projects`
118
+ - `/codex`
71
119
  - Codex inventory and search, with `q` as the route search param
72
- - `/projects/$project`
120
+ - `/codex/$project`
73
121
  - Codex project thread listing, with `q` as the route search param
122
+ - `/claude-code`
123
+ - Claude Code workspace inventory and search
124
+ - `/claude-code/$workspaceKey`
125
+ - Claude Code workspace session listing
126
+ - `/claude-code-sessions/$sessionId`
127
+ - Claude Code session detail and export
128
+ - `/kiro`
129
+ - Kiro workspace inventory and search
130
+ - `/kiro/$workspaceKey`
131
+ - Kiro workspace session listing
132
+ - `/kiro-sessions/$sessionId`
133
+ - Kiro session detail and export
134
+ - `/qoder`
135
+ - Qoder workspace inventory and search
136
+ - `/qoder/$workspaceKey`
137
+ - Qoder workspace session listing
138
+ - `/qoder-sessions/$sessionId`
139
+ - Qoder session detail and export
74
140
  - `/cursor`
75
141
  - Cursor workspace inventory and search
76
142
  - `/cursor/$workspaceKey`
@@ -83,6 +149,12 @@ Codex analytics cache keys are based on Codex DB row metadata instead of stattin
83
149
  - Antigravity workspace conversation listing
84
150
  - `/antigravity-conversations/$conversationId`
85
151
  - Antigravity conversation detail, export, and artifact inspection
152
+ - `/opencode`
153
+ - OpenCode workspace inventory and search
154
+ - `/opencode/$workspaceKey`
155
+ - OpenCode workspace session listing
156
+ - `/opencode-sessions/$sessionId`
157
+ - OpenCode session detail and export
86
158
  - `/threads/$threadId`
87
159
  - Codex thread detail, transcript, export, and delete
88
160
  - `/$threadId`
@@ -93,5 +165,6 @@ Codex analytics cache keys are based on Codex DB row metadata instead of stattin
93
165
  ## Testing
94
166
 
95
167
  - UI component tests live under `src/**/*.vitest.tsx`.
168
+ - Source-specific transcript event adapter tests live under `src/lib/*.vitest.ts`.
96
169
  - Route search parsing tests live in `src/lib/route-search.vitest.ts`.
97
170
  - The repo root wraps this Vitest suite from `src/ui-package.test.ts`, so `rtk bun test` at the root covers both the Bun tests and the UI tests.
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "aliases": {
4
+ "components": "#/components",
5
+ "hooks": "#/hooks",
6
+ "lib": "#/lib",
7
+ "ui": "#/components/ui",
8
+ "utils": "#/lib/utils"
9
+ },
10
+ "iconLibrary": "lucide",
11
+ "rsc": false,
12
+ "style": "new-york",
13
+ "tailwind": {
14
+ "baseColor": "zinc",
15
+ "config": "",
16
+ "css": "src/styles.css",
17
+ "cssVariables": true,
18
+ "prefix": ""
19
+ },
20
+ "tsx": true
21
+ }