spiracha 1.1.2 → 1.3.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 (159) hide show
  1. package/AGENTS.md +57 -14
  2. package/README.md +122 -65
  3. package/apps/ui/AGENTS.md +18 -8
  4. package/apps/ui/README.md +30 -12
  5. package/apps/ui/dist/client/assets/{analytics-CqWZmyV6.js → analytics-B_hYz65v.js} +1 -1
  6. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-qiyygB7e.js +1 -0
  7. package/apps/ui/dist/client/assets/antigravity-conversations._conversationId-z1SQC2Kg.js +1 -0
  8. package/apps/ui/dist/client/assets/antigravity-keychain-panel-dYuRWtCf.js +1 -0
  9. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CliqUr7o.js +1 -0
  10. package/apps/ui/dist/client/assets/antigravity._workspaceKey-CnoBzyX6.js +1 -0
  11. package/apps/ui/dist/client/assets/antigravity.index-CakfZz_E.js +1 -0
  12. package/apps/ui/dist/client/assets/antigravity.index-DY7M1KhG.js +1 -0
  13. package/apps/ui/dist/client/assets/badge-aHE9ETVe.js +1 -0
  14. package/apps/ui/dist/client/assets/checkbox-DN3XnJaA.js +1 -0
  15. package/apps/ui/dist/client/assets/cursor-threads._composerId-BMQyx8qG.js +1 -0
  16. package/apps/ui/dist/client/assets/cursor-threads._composerId-BTlaA-tV.js +1 -0
  17. package/apps/ui/dist/client/assets/cursor._workspaceKey-CrgrfevV.js +1 -0
  18. package/apps/ui/dist/client/assets/cursor._workspaceKey-bYS2syGL.js +1 -0
  19. package/apps/ui/dist/client/assets/cursor.index-CTqZMPYU.js +1 -0
  20. package/apps/ui/dist/client/assets/cursor.index-Clsz4E_e.js +2 -0
  21. package/apps/ui/dist/client/assets/{data-table-DnPYMPCD.js → data-table-Cj-v-uyB.js} +2 -2
  22. package/apps/ui/dist/client/assets/delete-confirm-dialog-DTpzBiNK.js +11 -0
  23. package/apps/ui/dist/client/assets/dist-BNAn99Pu.js +1 -0
  24. package/apps/ui/dist/client/assets/download-P3Rp23Ad.js +1 -0
  25. package/apps/ui/dist/client/assets/dropdown-menu-3qB5j9nt.js +1 -0
  26. package/apps/ui/dist/client/assets/es2015-Dwm_turD.js +41 -0
  27. package/apps/ui/dist/client/assets/export-dialog-CazdrASq.js +1 -0
  28. package/apps/ui/dist/client/assets/formatters-BdnWuM1z.js +1 -0
  29. package/apps/ui/dist/client/assets/index-BVFnfS78.js +22 -0
  30. package/apps/ui/dist/client/assets/json-panel-DLkS30sQ.js +1 -0
  31. package/apps/ui/dist/client/assets/metadata-section-jnIkB7dB.js +1 -0
  32. package/apps/ui/dist/client/assets/{metric-card-9jwBF7rG.js → metric-card-CBZuWLzQ.js} +1 -1
  33. package/apps/ui/dist/client/assets/page-header-CnD21cPn.js +1 -0
  34. package/apps/ui/dist/client/assets/projects._project-BLszwvYL.js +1 -0
  35. package/apps/ui/dist/client/assets/projects._project-DvLxYbvk.js +1 -0
  36. package/apps/ui/dist/client/assets/projects.index-COn8woBR.js +1 -0
  37. package/apps/ui/dist/client/assets/projects.index-DYs98skV.js +3 -0
  38. package/apps/ui/dist/client/assets/refresh-ccw-BDrYXjtD.js +1 -0
  39. package/apps/ui/dist/client/assets/reload-error-panel-DLAg0AW2.js +1 -0
  40. package/apps/ui/dist/client/assets/routes-BtF5-coe.js +1 -0
  41. package/apps/ui/dist/client/assets/scroll-text-CqaFm9by.js +1 -0
  42. package/apps/ui/dist/client/assets/select-DbnpwqL6.js +1 -0
  43. package/apps/ui/dist/client/assets/settings-CGX3VleN.js +1 -0
  44. package/apps/ui/dist/client/assets/styles-Ch0r3kMZ.css +1 -0
  45. package/apps/ui/dist/client/assets/text-document-panel-DPleOmmq.js +1 -0
  46. package/apps/ui/dist/client/assets/text-filter-7M6wRo-t.js +2 -0
  47. package/apps/ui/dist/client/assets/threads._threadId-D5w76IB-.js +7 -0
  48. package/apps/ui/dist/client/assets/{threads._threadId-DT75NiBa.js → threads._threadId-Dx85sI9P.js} +1 -1
  49. package/apps/ui/dist/client/assets/useMutation-MZ3Hr9h9.js +1 -0
  50. package/apps/ui/dist/client/assets/useQuery-Cb4V0AT0.js +1 -0
  51. package/apps/ui/dist/client/icon.svg +28 -0
  52. package/apps/ui/dist/client/manifest.json +6 -16
  53. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-CBbkUXw6.js +227 -0
  54. package/apps/ui/dist/server/assets/{analytics-BMxW_bZL.js → analytics-CBNOYZwJ.js} +2 -2
  55. package/apps/ui/dist/server/assets/antigravity-conversation-state-HgzS302O.js +16 -0
  56. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-B9Rm4EXh.js +212 -0
  57. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-BIdYNy68.js +20 -0
  58. package/apps/ui/dist/server/assets/antigravity-conversations._conversationId-D426O-64.js +11 -0
  59. package/apps/ui/dist/server/assets/antigravity-db-D9gW1D8G.js +576 -0
  60. package/apps/ui/dist/server/assets/antigravity-keychain-DOiuHDwK.js +126 -0
  61. package/apps/ui/dist/server/assets/antigravity-keychain-panel-DcLyBBwd.js +55 -0
  62. package/apps/ui/dist/server/assets/antigravity-queries-CgQhlQ7J.js +37 -0
  63. package/apps/ui/dist/server/assets/antigravity-server-DFUx4Khk.js +114 -0
  64. package/apps/ui/dist/server/assets/antigravity._workspaceKey-3m_MzNFA.js +11 -0
  65. package/apps/ui/dist/server/assets/antigravity._workspaceKey-D42ixtzp.js +210 -0
  66. package/apps/ui/dist/server/assets/antigravity._workspaceKey-DnSlSC-C.js +28 -0
  67. package/apps/ui/dist/server/assets/antigravity.index-DZVT-cac.js +104 -0
  68. package/apps/ui/dist/server/assets/antigravity.index-DudTB3Tq.js +11 -0
  69. package/apps/ui/dist/server/assets/badge-EvdhKK_Z.js +26 -0
  70. package/apps/ui/dist/server/assets/{codex-queries-CAF6HYiG.js → codex-queries-eOJGfHQj.js} +6 -18
  71. package/apps/ui/dist/server/assets/{codex-server-C01sv0JJ.js → codex-server-nrETIF--.js} +166 -226
  72. package/apps/ui/dist/server/assets/createServerRpc-BtXIw2iP.js +12 -0
  73. package/apps/ui/dist/server/assets/createSsrRpc-COf5Zuye.js +16 -0
  74. package/apps/ui/dist/server/assets/cursor-db-B7agkAvM.js +643 -0
  75. package/apps/ui/dist/server/assets/cursor-exporter-types-CI3goo-c.js +34 -0
  76. package/apps/ui/dist/server/assets/cursor-queries-BMhuJeUO.js +65 -0
  77. package/apps/ui/dist/server/assets/cursor-recovery-9bJLs7vG.js +361 -0
  78. package/apps/ui/dist/server/assets/cursor-server-BgylIFgn.js +184 -0
  79. package/apps/ui/dist/server/assets/cursor-threads._composerId-BB0Y_Mao.js +11 -0
  80. package/apps/ui/dist/server/assets/cursor-threads._composerId-BsxFKzoJ.js +218 -0
  81. package/apps/ui/dist/server/assets/cursor-threads._composerId-DXffY_CK.js +18 -0
  82. package/apps/ui/dist/server/assets/cursor-transcript-2iL3KFSK.js +125 -0
  83. package/apps/ui/dist/server/assets/cursor._workspaceKey-BP2J1x_x.js +28 -0
  84. package/apps/ui/dist/server/assets/cursor._workspaceKey-BQd0e-Pd.js +399 -0
  85. package/apps/ui/dist/server/assets/cursor._workspaceKey-nmg3YIOQ.js +11 -0
  86. package/apps/ui/dist/server/assets/cursor.index-CQVxtCm8.js +189 -0
  87. package/apps/ui/dist/server/assets/cursor.index-CcsX7DG0.js +11 -0
  88. package/apps/ui/dist/server/assets/{delete-confirm-dialog-CWqcTXTF.js → delete-confirm-dialog-PCD7S0_M.js} +5 -4
  89. package/apps/ui/dist/server/assets/download-DMmiy1xf.js +92 -0
  90. package/apps/ui/dist/server/assets/{input-B4tEzctc.js → dropdown-menu-Dy_9t6TN.js} +1 -11
  91. package/apps/ui/dist/server/assets/{download-C5rkk_Bo.js → export-dialog-DaPlOGFT.js} +8 -99
  92. package/apps/ui/dist/server/assets/json-panel-RYsxWFae.js +16 -0
  93. package/apps/ui/dist/server/assets/{loading-panel-DbLdvjtR.js → loading-panel-BGFnWseS.js} +1 -1
  94. package/apps/ui/dist/server/assets/metadata-section-D6Lbc7D6.js +54 -0
  95. package/apps/ui/dist/server/assets/page-header-VNSaM3xd.js +29 -0
  96. package/apps/ui/dist/server/assets/projects._project-Bshqk7JA.js +12 -0
  97. package/apps/ui/dist/server/assets/{projects._project-CJ7l0ynC.js → projects._project-DUN3iWfg.js} +4 -4
  98. package/apps/ui/dist/server/assets/{projects._project-CcJLp_A8.js → projects._project-Dim9Y0kD.js} +54 -26
  99. package/apps/ui/dist/server/assets/projects.index-BLXOx5eL.js +12 -0
  100. package/apps/ui/dist/server/assets/{projects.index-srtogpuF.js → projects.index-DjSQK5dm.js} +23 -27
  101. package/apps/ui/dist/server/assets/{projects.index-CaplpeMy.js → reload-error-panel-BJMxY3U1.js} +5 -6
  102. package/apps/ui/dist/server/assets/{router-C_w-haH6.js → router-DrDgc-LD.js} +131 -44
  103. package/apps/ui/dist/server/assets/{routes-CPe-ppmC.js → routes-B-GlEe2C.js} +54 -39
  104. package/apps/ui/dist/server/assets/{routes-BhbxvJE7.js → routes-CNHAUMwo.js} +2 -2
  105. package/apps/ui/dist/server/assets/{settings-MvWDgc1u.js → settings-OayxIYQQ.js} +1 -1
  106. package/apps/ui/dist/server/assets/shared-CPRNYIql.js +134 -0
  107. package/apps/ui/dist/server/assets/text-document-panel-D8JbQWAn.js +23 -0
  108. package/apps/ui/dist/server/assets/text-filter-CGKxMCKt.js +36 -0
  109. package/apps/ui/dist/server/assets/{threads._threadId-Ba7vv6-K.js → threads._threadId-CJzm4KrZ.js} +3 -3
  110. package/apps/ui/dist/server/assets/{threads._threadId-euyNckhj.js → threads._threadId-DODTYddm.js} +69 -76
  111. package/apps/ui/dist/server/server.js +83 -36
  112. package/bin/codex-chats-claude.js +5 -0
  113. package/bin/codex-chats.js +5 -0
  114. package/bin/spiracha.js +5 -0
  115. package/package.json +26 -13
  116. package/src/export-cursor.ts +244 -0
  117. package/src/lib/antigravity-db.ts +936 -0
  118. package/src/lib/antigravity-exporter-types.ts +70 -0
  119. package/src/lib/antigravity-keychain.ts +203 -0
  120. package/src/lib/codex-browser-db.ts +7 -1
  121. package/src/lib/codex-browser-export.ts +2 -2
  122. package/src/lib/codex-browser-types.ts +22 -1
  123. package/src/lib/codex-exporter-cli.ts +9 -9
  124. package/src/lib/codex-exporter-transcript.ts +16 -190
  125. package/src/lib/codex-exporter-types.ts +1 -1
  126. package/src/lib/codex-exporter.ts +0 -1
  127. package/src/lib/codex-thread-recovery.ts +202 -0
  128. package/src/lib/cursor-db.ts +1096 -0
  129. package/src/lib/cursor-exporter-types.ts +190 -0
  130. package/src/lib/cursor-exporter.ts +266 -0
  131. package/src/lib/cursor-recovery.ts +543 -0
  132. package/src/lib/cursor-transcript.ts +183 -0
  133. package/src/lib/interactive-cli.ts +2 -2
  134. package/src/mcp-server.ts +2 -2
  135. package/src/spiracha.ts +16 -3
  136. package/src/ui-cli.ts +2 -2
  137. package/apps/ui/dist/client/assets/checkbox-DXM4lkJq.js +0 -1
  138. package/apps/ui/dist/client/assets/delete-confirm-dialog-CcZaRX33.js +0 -11
  139. package/apps/ui/dist/client/assets/download-DOwxk-cG.js +0 -1
  140. package/apps/ui/dist/client/assets/es2015-Bm0kEzx2.js +0 -41
  141. package/apps/ui/dist/client/assets/formatters-C12LmYaa.js +0 -1
  142. package/apps/ui/dist/client/assets/index-DdJ7ahIt.js +0 -22
  143. package/apps/ui/dist/client/assets/input-CEsI7EpI.js +0 -1
  144. package/apps/ui/dist/client/assets/page-header-Dr_h1CVv.js +0 -1
  145. package/apps/ui/dist/client/assets/projects._project-uyNGnpjH.js +0 -1
  146. package/apps/ui/dist/client/assets/projects._project-zoM8d2nH.js +0 -1
  147. package/apps/ui/dist/client/assets/projects.index-D1CWVN-O.js +0 -1
  148. package/apps/ui/dist/client/assets/projects.index-DukMuny6.js +0 -1
  149. package/apps/ui/dist/client/assets/routes-Gr2Wwh83.js +0 -1
  150. package/apps/ui/dist/client/assets/select-CFim44gT.js +0 -1
  151. package/apps/ui/dist/client/assets/settings-DqhyDxo2.js +0 -1
  152. package/apps/ui/dist/client/assets/styles-CMrP9Jb4.css +0 -1
  153. package/apps/ui/dist/client/assets/threads._threadId-Df5VXIuZ.js +0 -7
  154. package/apps/ui/dist/client/favicon.ico +0 -0
  155. package/apps/ui/dist/client/logo192.png +0 -0
  156. package/apps/ui/dist/client/logo512.png +0 -0
  157. package/apps/ui/dist/server/assets/_tanstack-start-manifest_v-C0V305Nt.js +0 -99
  158. package/apps/ui/dist/server/assets/page-header-CxdZM86z.js +0 -25
  159. package/apps/ui/dist/server/assets/projects._project-CLSohrBp.js +0 -26
package/AGENTS.md CHANGED
@@ -2,18 +2,22 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- This repo exports local Codex chats and Claude Code transcripts to Markdown or plain text.
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.
6
6
 
7
7
  Main entrypoints:
8
- - `bun start ...` for Codex chat export
9
- - `bun start` for interactive export mode
10
- - `bun run export:claude -- ...` for Claude transcript export
11
- - `bun run mcp` for the MCP server used by the local Codex plugin
12
- - `bun run ui:dev` for the local browser UI
13
- - published package goal:
14
- - `bunx codex-chats`
15
- - `bunx codex-chats ...`
16
- - `bunx codex-chats-claude ...`
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`
17
21
 
18
22
  ## Conventions and Rules
19
23
 
@@ -55,6 +59,28 @@ Codex exporter modules:
55
59
  - `src/lib/codex-exporter-types.ts`
56
60
  - shared Codex exporter types and default path constants
57
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
+
58
84
  Other important files:
59
85
  - `src/lib/claude-exporter.ts`
60
86
  - Claude transcript export pipeline
@@ -73,12 +99,15 @@ Other important files:
73
99
  - `plugins/codex-chats-export/`
74
100
  - local Codex plugin manifest, skill, and MCP wiring
75
101
  - `apps/ui/`
76
- - TanStack Start browser UI package
102
+ - TanStack Start browser UI package for Codex, Cursor, and Antigravity
103
+ - source-specific index/detail routes include `/threads/$threadId`, `/cursor-threads/$composerId`, and `/antigravity-conversations/$conversationId`
77
104
 
78
105
  ## Test Strategy
79
106
 
80
107
  Current tests cover:
81
108
  - exporter end-to-end behavior for Codex and Claude
109
+ - Cursor export, recovery, and pruning behavior
110
+ - Antigravity discovery, transcript parsing, and artifact export rendering
82
111
  - structured Codex transcript parsing
83
112
  - project/thread browsing and destructive DB flows
84
113
  - analytics aggregation
@@ -113,6 +142,7 @@ rtk bun start
113
142
  rtk bun start -- --help
114
143
  rtk bun start --interactive
115
144
  rtk bun run export:claude -- --help
145
+ rtk bun run ./src/export-cursor.ts -- --help
116
146
  rtk bun run mcp
117
147
  rtk bun run ui:dev
118
148
  ```
@@ -126,6 +156,9 @@ tmp_dir=$(mktemp -d)
126
156
  cd "$tmp_dir"
127
157
  printf '{"name":"codex-chats-smoke","private":true}\n' > package.json
128
158
  rtk bun add "$package_tgz"
159
+ rtk bunx spiracha --help
160
+ rtk bunx spiracha ui --help
161
+ rtk bunx spiracha claude --help
129
162
  rtk bunx codex-chats --help
130
163
  rtk bunx codex-chats-claude --help
131
164
  rtk bun run smoke:package-ui
@@ -134,8 +167,8 @@ rtk bun run smoke:package-ui
134
167
  Example Codex export:
135
168
 
136
169
  ```bash
137
- rtk bunx codex-chats
138
- rtk bunx codex-chats codex://threads/<thread-id> --optimized
170
+ rtk bunx spiracha
171
+ rtk bunx spiracha codex://threads/<thread-id> --no-metadata
139
172
  rtk bun start --tools --project summer
140
173
  rtk bun start codex://threads/<thread-id> --output-format txt
141
174
  ```
@@ -143,15 +176,25 @@ rtk bun start codex://threads/<thread-id> --output-format txt
143
176
  Example Claude export:
144
177
 
145
178
  ```bash
146
- rtk bunx codex-chats-claude /path/to/transcript --output-format txt
179
+ rtk bunx spiracha claude /path/to/transcript --output-format txt
147
180
  rtk bun run export:claude -- /path/to/export-dir --output-format txt
148
181
  ```
149
182
 
183
+ Example Cursor export:
184
+
185
+ ```bash
186
+ rtk bunx spiracha cursor list
187
+ rtk bunx spiracha cursor export --workspace summer
188
+ rtk bunx spiracha cursor export --thread <composer-id> --output-format txt
189
+ rtk bunx spiracha cursor recover --workspace summer --apply
190
+ ```
191
+
150
192
  ## Notes
151
193
 
152
194
  - `--project` matches the final `cwd` path segment for both POSIX and Windows-style paths, not the full path.
153
195
  - Running `codex-chats` or `bun start` with no args enters interactive mode.
154
196
  - Codex MCP exports must be scoped by at least one of `deeplinks`, `project`, or `cwd`.
197
+ - Antigravity browsing/export currently ships through the browser UI rather than a standalone CLI command.
155
198
  - `txt` output is intentionally real plain text, not Markdown with a `.txt` extension.
156
199
  - The published package is Bun-first. `bin` entrypoints target Bun shebang execution.
157
200
  - The UI package runs `vite` through `bun --bun ...` because its server functions depend on Bun-only modules like `bun:sqlite`.
package/README.md CHANGED
@@ -1,36 +1,45 @@
1
1
  # spiracha
2
2
 
3
+ <p align="center">
4
+ <img src="apps/ui/public/icon.svg" alt="Spiracha icon" width="96" height="100">
5
+ </p>
6
+
3
7
  [![npm version](https://img.shields.io/npm/v/spiracha?label=npm)](https://www.npmjs.com/package/spiracha)
4
8
  [![downloads](https://img.shields.io/npm/dm/spiracha?label=downloads)](https://www.npmjs.com/package/spiracha)
5
9
  [![license](https://img.shields.io/npm/l/spiracha)](LICENSE.md)
6
10
  [![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)
7
12
 
8
- Export local Codex chats and Claude Code transcripts to Markdown or plain text, and inspect local Codex history through a browser UI.
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.
9
14
 
10
15
  ## Quick Start
11
16
 
12
17
  For repo-local development:
13
18
 
14
19
  ```bash
15
- bun start
16
- bun run ui:dev
20
+ rtk bun start
21
+ rtk bun run ui:dev
17
22
  ```
18
23
 
19
24
  Published package usage, once the package is available on npm:
20
25
 
21
26
  ```bash
22
- bunx spiracha
23
- bunx spiracha ui
24
- bunx spiracha claude /path/to/session-export.jsonl --output-format txt
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
25
31
  ```
26
32
 
27
33
  ## Features
28
34
 
29
35
  - Export Codex session transcripts from local `.codex` history
30
- - Browse local Codex projects and threads in a TanStack Start UI
31
- - Inspect transcript timelines, tool calls, thread metadata, and raw Codex event context
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
32
41
  - Delete threads or derived projects from the Codex SQLite database after confirmation
33
- - Download thread exports directly from the UI as Markdown or plain text, with optional optimized mode and tool-call inclusion
42
+ - Download thread exports directly from the UI as Markdown or plain text, with optional metadata, commentary, and tool-call inclusion
34
43
  - View dashboard and analytics summaries, including token totals and tool-call frequency
35
44
  - Filter Codex exports by:
36
45
  - exact `cwd`
@@ -39,19 +48,20 @@ bunx spiracha claude /path/to/session-export.jsonl --output-format txt
39
48
  - Include command logs with `--tools`
40
49
  - Write Markdown or real plain-text output with `--output-format md|txt`
41
50
  - Export Claude Code transcript `.jsonl` files or export directories
51
+ - Export, recover, and prune Cursor chat history from the CLI
42
52
  - Run the same export flows through an MCP server and a local Codex plugin
43
53
 
44
54
  ## Install
45
55
 
46
56
  ```bash
47
- bun install
57
+ rtk bun install
48
58
  ```
49
59
 
50
60
  For package use after publish, no local install is required:
51
61
 
52
62
  ```bash
53
- bunx spiracha --help
54
- bunx spiracha ui --help
63
+ rtk bunx spiracha --help
64
+ rtk bunx spiracha ui --help
55
65
  ```
56
66
 
57
67
  ## Usage
@@ -61,8 +71,8 @@ bunx spiracha ui --help
61
71
  Package entrypoint:
62
72
 
63
73
  ```bash
64
- bunx spiracha [options] [codex://threads/<id> ...]
65
- bunx spiracha codex [options] [codex://threads/<id> ...]
74
+ rtk bunx spiracha [options] [codex://threads/<id> ...]
75
+ rtk bunx spiracha codex [options] [codex://threads/<id> ...]
66
76
  ```
67
77
 
68
78
  With no arguments, `spiracha` starts in interactive mode and asks what you want to export.
@@ -70,13 +80,14 @@ With no arguments, `spiracha` starts in interactive mode and asks what you want
70
80
  Examples:
71
81
 
72
82
  ```bash
73
- bunx spiracha
74
- bunx spiracha --interactive
75
- bunx spiracha --project summer
76
- bunx spiracha --tools --project summer
77
- bunx spiracha codex://threads/019da28f-ee5b-7881-afe0-68b3d3bd2c77
78
- bunx spiracha codex://threads/019da28f-ee5b-7881-afe0-68b3d3bd2c77 --output-format txt
79
- bunx spiracha --cwd ~/workspace/reversed/summer --flat
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
80
91
  ```
81
92
 
82
93
  Important flags:
@@ -85,18 +96,18 @@ Important flags:
85
96
  - `--project <name>`: matches the final `cwd` path segment for both POSIX and Windows-style paths
86
97
  - `--cwd <path>`: exact cwd match
87
98
  - `--tools`: include `exec_command` call logs and summaries
88
- - `--optimized`: compact transcript output
99
+ - `--no-metadata`: omit the metadata section from the top of each export
89
100
  - `--flat`: write files into a single output folder
90
101
  - `--output-format md|txt`: output as Markdown or plain text
91
102
 
92
103
  ### Browser UI
93
104
 
94
105
  ```bash
95
- bunx spiracha ui
106
+ rtk bunx spiracha ui
96
107
  ```
97
108
 
98
109
  This launches the packaged production UI server, opens your browser by default, and keeps running in the foreground.
99
- Large download bundles are written to a Spiracha-managed directory under your OS temp folder and served directly by the UI server, so packaged `bunx spiracha ui` exports do not depend on your current working directory.
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.
100
111
 
101
112
  Useful flags:
102
113
  - `--port <port>`: bind a specific port, default `3000`
@@ -104,12 +115,28 @@ Useful flags:
104
115
  - `--db <path>`: override the Codex SQLite path used by the UI
105
116
  - `--no-open`: do not open the browser automatically
106
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
+ The thread detail page also supports a direct UUID shortcut route. Pasting `http://localhost:3000/<thread-id>` redirects to `/threads/<thread-id>`.
125
+
126
+ Notable UI routes:
127
+ - `/projects` and `/projects/$project` for Codex inventory and project threads
128
+ - `/threads/$threadId` for Codex thread detail
129
+ - `/cursor` and `/cursor/$workspaceKey` for Cursor workspace inventory and thread lists
130
+ - `/cursor-threads/$composerId` for Cursor thread detail
131
+ - `/antigravity` and `/antigravity/$workspaceKey` for Antigravity workspace inventory and conversation lists
132
+ - `/antigravity-conversations/$conversationId` for Antigravity conversation detail
133
+
107
134
  Examples:
108
135
 
109
136
  ```bash
110
- bunx spiracha ui
111
- bunx spiracha ui --port 43123 --no-open
112
- bunx spiracha ui --db ~/.codex/state_5.sqlite
137
+ rtk bunx spiracha ui
138
+ rtk bunx spiracha ui --port 43123 --no-open
139
+ rtk bunx spiracha ui --db ~/.codex/state_5.sqlite
113
140
  ```
114
141
 
115
142
  Stop the UI with `Ctrl+C`.
@@ -117,39 +144,64 @@ Stop the UI with `Ctrl+C`.
117
144
  ### Claude exports
118
145
 
119
146
  ```bash
120
- bunx spiracha claude <input-path> [options]
147
+ rtk bunx spiracha claude <input-path> [options]
121
148
  ```
122
149
 
123
150
  Examples:
124
151
 
125
152
  ```bash
126
- bunx spiracha claude /path/to/session.jsonl
127
- bunx spiracha claude /path/to/export-dir --tools
128
- bunx spiracha claude /path/to/export-dir --output-format txt
153
+ rtk bunx spiracha claude /path/to/session.jsonl
154
+ rtk bunx spiracha claude /path/to/export-dir --tools
155
+ rtk bunx spiracha claude /path/to/export-dir --output-format txt
129
156
  ```
130
157
 
131
158
  Repo-local equivalents remain available during development:
132
159
 
133
160
  ```bash
134
- bun start
135
- bun start --interactive
136
- bun start ...
137
- bun run export:claude -- ...
161
+ rtk bun start
162
+ rtk bun start --interactive
163
+ rtk bun start ...
164
+ rtk bun run export:claude -- ...
138
165
  ```
139
166
 
140
167
  Legacy aliases remain available for compatibility:
141
168
 
142
169
  ```bash
143
- bunx codex-chats
144
- bunx codex-chats-claude
170
+ rtk bunx codex-chats
171
+ rtk bunx codex-chats-claude
172
+ ```
173
+
174
+ ### Cursor exports
175
+
176
+ ```bash
177
+ rtk bunx spiracha cursor <subcommand> [options]
178
+ ```
179
+
180
+ Examples:
181
+
182
+ ```bash
183
+ rtk bunx spiracha cursor list
184
+ rtk bunx spiracha cursor list --query summer
185
+ rtk bunx spiracha cursor export --workspace summer --output-dir ./cursor-exports
186
+ rtk bunx spiracha cursor export --thread <composer-id> --output-format txt
187
+ rtk bunx spiracha cursor recover --workspace summer --apply
188
+ rtk bunx spiracha cursor prune --workspace summer --apply
145
189
  ```
146
190
 
191
+ Repo-local equivalent during development:
192
+
193
+ ```bash
194
+ rtk bun run ./src/export-cursor.ts --help
195
+ ```
196
+
197
+ Antigravity conversation browsing and export currently live in the browser UI rather than a standalone CLI subcommand.
198
+
147
199
  ## MCP server
148
200
 
149
201
  Run the MCP server with:
150
202
 
151
203
  ```bash
152
- bun run mcp
204
+ rtk bun run mcp
153
205
  ```
154
206
 
155
207
  Exposed tools:
@@ -163,55 +215,58 @@ The local plugin lives in [plugins/codex-chats-export](plugins/codex-chats-expor
163
215
  Useful commands:
164
216
 
165
217
  ```bash
166
- bun test
167
- bun run lint
168
- bun run typecheck
169
- bun run build
170
- bun run coverage
171
- bun run ui:dev
172
- cd apps/ui && bun run test
173
- bun run test:perf
174
- bun start
175
- bun start --interactive
176
- bun start -- --help
177
- bun run export:claude -- --help
178
- bun run mcp
218
+ rtk bun test
219
+ rtk bun run lint
220
+ rtk bun run typecheck
221
+ rtk bun run build
222
+ rtk bun run coverage
223
+ rtk bun run ui:dev
224
+ rtk bun run --cwd apps/ui test
225
+ rtk bun run test:perf
226
+ rtk bun start
227
+ rtk bun start --interactive
228
+ rtk bun start -- --help
229
+ rtk bun run export:claude -- --help
230
+ rtk bun run mcp
179
231
  ```
180
232
 
181
233
  Packed-tarball smoke test before publishing:
182
234
 
183
235
  ```bash
184
- bun pm pack
236
+ rtk bun pm pack
185
237
  package_tgz="$PWD/spiracha-<version>.tgz"
186
238
  tmp_dir=$(mktemp -d)
187
239
  cd "$tmp_dir"
188
240
  printf '{"name":"codex-chats-smoke","private":true}\n' > package.json
189
- bun add "$package_tgz"
190
- bunx --package "$package_tgz" spiracha --help
191
- bunx --package "$package_tgz" spiracha ui --help
192
- bunx --package "$package_tgz" spiracha claude --help
193
- bunx --package "$package_tgz" codex-chats --help
194
- bunx --package "$package_tgz" codex-chats-claude --help
241
+ rtk bun add "$package_tgz"
242
+ rtk bunx --package "$package_tgz" spiracha --help
243
+ rtk bunx --package "$package_tgz" spiracha ui --help
244
+ rtk bunx --package "$package_tgz" spiracha claude --help
245
+ rtk bunx --package "$package_tgz" codex-chats --help
246
+ rtk bunx --package "$package_tgz" codex-chats-claude --help
195
247
  ```
196
248
 
197
249
  For the exact packaged UI launch path, run:
198
250
 
199
251
  ```bash
200
- bun run smoke:package-ui
252
+ rtk bun run smoke:package-ui
201
253
  ```
202
254
 
203
- This builds the app, packs the tarball, launches `bunx --package <tgz> spiracha ui --no-open` from a clean temp directory, probes the running UI over HTTP, and shuts it down.
255
+ This builds the app, packs the tarball, launches `rtk bunx --package <tgz> spiracha ui --no-open` from a clean temp directory, probes the running UI over HTTP, and shuts it down.
204
256
 
205
257
  ## Project Layout
206
258
 
207
- - `apps/ui/`: TanStack Start browser app for browsing, analytics, export, and delete flows
259
+ - `apps/ui/`: TanStack Start browser app for Codex, Cursor, and Antigravity browsing plus export and delete flows
208
260
  - `src/export-chats.ts`: Codex CLI wrapper
209
261
  - `src/export-claude.ts`: Claude CLI wrapper
262
+ - `src/export-cursor.ts`: Cursor CLI wrapper
210
263
  - `src/mcp-server.ts`: MCP server entrypoint
264
+ - `src/lib/antigravity-*.ts`: Antigravity workspace discovery, transcript rendering, and Keychain helpers
211
265
  - `src/lib/codex-exporter-*.ts`: Codex exporter modules
212
266
  - `src/lib/codex-browser-*.ts`: shared browser/UI data, analytics, and export helpers
213
267
  - `src/lib/codex-thread-*.ts`: structured transcript parsing and caching helpers
214
268
  - `src/lib/claude-exporter.ts`: Claude exporter implementation
269
+ - `src/lib/cursor-*.ts`: Cursor discovery, transcript rendering, recovery, and CLI helpers
215
270
  - `plugins/codex-chats-export/`: local Codex plugin bundle
216
271
 
217
272
  ## Testing
@@ -219,18 +274,20 @@ This builds the app, packs the tarball, launches `bunx --package <tgz> spiracha
219
274
  The test suite includes:
220
275
  - Codex exporter end-to-end coverage
221
276
  - Claude exporter end-to-end coverage
277
+ - Cursor exporter and recovery coverage
278
+ - Antigravity discovery and export coverage
222
279
  - Codex CLI helper tests
223
280
  - transcript rendering helper tests
224
281
  - MCP stdio protocol round-trip tests
225
282
  - local packaging should be smoke-tested with a packed tarball before publishing
226
283
 
227
284
  Coverage enforcement:
228
- - `bun run coverage:root` checks the root Bun unit-test surface at a minimum of 90% line coverage.
229
- - `bun run coverage:ui` checks the UI unit-test surface at a minimum of 90% line coverage.
230
- - `bun run coverage` runs both checks.
285
+ - `rtk bun run coverage:root` checks the root Bun unit-test surface at a minimum of 90% line coverage.
286
+ - `rtk bun run coverage:ui` checks the UI unit-test surface at a minimum of 90% line coverage.
287
+ - `rtk bun run coverage` runs both checks.
231
288
 
232
289
  Run:
233
290
 
234
291
  ```bash
235
- bun test
292
+ rtk bun test
236
293
  ```
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 the Codex SQLite database and rollout JSONL files through TanStack Start server functions and shared root-package helpers.
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.
6
6
 
7
7
  ## Commands
8
8
 
@@ -11,6 +11,7 @@ rtk bun run dev
11
11
  rtk bun run build
12
12
  rtk bun run test
13
13
  rtk bun run typecheck
14
+ rtk bun run coverage
14
15
  ```
15
16
 
16
17
  Important:
@@ -22,6 +23,10 @@ Important:
22
23
  - This package uses TanStack Start with file-based routes in `src/routes/`.
23
24
  - `src/routeTree.gen.ts` is generated. Do not edit it manually.
24
25
  - If route typing behaves strangely, delete `src/routeTree.gen.ts` and rebuild with `rtk bun run build` to regenerate it cleanly.
26
+ - The UI supports both `/threads/$threadId` and a root shortcut route `/$threadId` that redirects straight to the thread detail page.
27
+ - Cursor thread detail lives at `/cursor-threads/$composerId`.
28
+ - Antigravity conversation detail lives at `/antigravity-conversations/$conversationId`.
29
+ - Keep the Codex, Cursor, and Antigravity list/detail pages aligned around the same table-driven index/detail pattern when adding new source integrations.
25
30
 
26
31
  ## Shared Data Layer
27
32
 
@@ -31,6 +36,11 @@ The UI depends on root-package helpers via `@spiracha/*` path aliases:
31
36
  - `@spiracha/lib/codex-browser-export`
32
37
  - `@spiracha/lib/codex-thread-cache`
33
38
  - `@spiracha/lib/codex-analytics`
39
+ - `@spiracha/lib/cursor-db`
40
+ - `@spiracha/lib/cursor-recovery`
41
+ - `@spiracha/lib/cursor-transcript`
42
+ - `@spiracha/lib/antigravity-db`
43
+ - `@spiracha/lib/antigravity-keychain`
34
44
 
35
45
  Keep server-only imports inside server functions or route loaders. Do not import Bun-only modules into purely client-side components.
36
46
 
@@ -38,19 +48,19 @@ Keep server-only imports inside server functions or route loaders. Do not import
38
48
 
39
49
  Use the existing layers consistently:
40
50
 
41
- - TanStack Start server functions in `src/lib/codex-server.ts`
42
- - Use for any browser-triggered read/write that needs Bun-only modules, DB access, filesystem access, or shared root-package helpers.
43
- - TanStack Query query options in `src/lib/codex-queries.ts`
51
+ - TanStack Start server functions in `src/lib/codex-server.ts`, `src/lib/cursor-server.ts`, and `src/lib/antigravity-server.ts`
52
+ - Use for any browser-triggered read/write that needs Bun-only modules, DB access, filesystem access, Keychain access, or shared root-package helpers.
53
+ - TanStack Query query options in `src/lib/codex-queries.ts`, `src/lib/cursor-queries.ts`, and `src/lib/antigravity-queries.ts`
44
54
  - Use for client-side fetching, caching, retries, and invalidation of server-function results.
45
55
  - Shared root-package helpers under `@spiracha/lib/*`
46
56
  - Extend these when the behavior should stay shared between the UI, CLI, and packaged launcher.
47
57
  - `settings-store.tsx`
48
- - Use only for browser-local UI preferences. Do not put server-derived Codex data here.
58
+ - Use only for browser-local UI preferences. Do not put server-derived source data here.
49
59
 
50
- If a feature needs new Codex data, prefer:
60
+ If a feature needs new source data, prefer:
51
61
  1. shared root-package helper changes
52
- 2. server-function exposure in `codex-server.ts`
53
- 3. TanStack Query wiring in `codex-queries.ts`
62
+ 2. server-function exposure in the matching `*-server.ts`
63
+ 3. TanStack Query wiring in the matching `*-queries.ts`
54
64
  4. client component consumption
55
65
 
56
66
  ## Testing
package/apps/ui/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Spiracha UI
2
2
 
3
- The browser UI for browsing local Codex history, inspecting thread details, exporting chats, and analyzing usage patterns.
3
+ The browser UI for browsing local Codex, Cursor, and Antigravity history, inspecting transcript details, exporting chats, and analyzing Codex usage patterns.
4
4
 
5
5
  ## Stack
6
6
 
@@ -15,13 +15,17 @@ The browser UI for browsing local Codex history, inspecting thread details, expo
15
15
 
16
16
  ## What It Does
17
17
 
18
- - lists derived projects from the Codex SQLite database
19
- - lists threads within a project in chronological order
20
- - shows thread timelines, tool calls, metadata, and raw event context
21
- - exports a single thread as Markdown or plain text
22
- - supports optimized transcript downloads and optional tool-call inclusion
23
- - deletes a thread or all threads in a derived project from the Codex DB after confirmation
24
- - shows dashboard and analytics summaries, including token totals and tool-call frequency
18
+ - lists derived Codex projects from the Codex SQLite database
19
+ - lists Codex threads within a project in chronological order
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
22
+ - lists Cursor workspaces and workspace threads with the same table-based index/detail flow as Codex
23
+ - shows dedicated Cursor thread detail pages with breadcrumbs back to the workspace and source
24
+ - recovers split Cursor storage buckets, exports Cursor threads, and deletes Cursor workspaces or threads
25
+ - lists Antigravity workspaces and conversations, including transcript/artifact availability
26
+ - shows dedicated Antigravity conversation detail pages with shared metadata and export actions
27
+ - unlocks Antigravity transcript export through macOS Keychain and exports conversations or artifacts as Markdown
28
+ - shows dashboard and analytics summaries, including Codex token totals and tool-call frequency
25
29
 
26
30
  ## Commands
27
31
 
@@ -58,13 +62,27 @@ Export artifacts are served through the UI as attachment downloads from `/__expo
58
62
  - `/`
59
63
  - dashboard
60
64
  - `/projects`
61
- - project inventory and search
65
+ - Codex inventory and search
62
66
  - `/projects/$project`
63
- - project thread listing
67
+ - Codex project thread listing
68
+ - `/cursor`
69
+ - Cursor workspace inventory and search
70
+ - `/cursor/$workspaceKey`
71
+ - Cursor workspace thread listing
72
+ - `/cursor-threads/$composerId`
73
+ - Cursor thread detail, export, and delete
74
+ - `/antigravity`
75
+ - Antigravity workspace inventory and search
76
+ - `/antigravity/$workspaceKey`
77
+ - Antigravity workspace conversation listing
78
+ - `/antigravity-conversations/$conversationId`
79
+ - Antigravity conversation detail, export, and artifact inspection
64
80
  - `/threads/$threadId`
65
- - thread detail, transcript, export, and delete
81
+ - Codex thread detail, transcript, export, and delete
82
+ - `/$threadId`
83
+ - shortcut redirect to the thread detail page for pasted Codex thread UUIDs
66
84
  - `/analytics`
67
- - token and tool-call analytics with project filter
85
+ - Codex token and tool-call analytics with project filter
68
86
 
69
87
  ## Testing
70
88
 
@@ -1 +1 @@
1
- import{c as e,o as t,s as n}from"./formatters-C12LmYaa.js";import{n as r,t as i}from"./data-table-DnPYMPCD.js";import{a,i as o,n as s,r as c,t as l}from"./select-CFim44gT.js";import{dt as u,i as d,mt as f,pt as p,s as m}from"./index-DdJ7ahIt.js";import{t as h}from"./metric-card-9jwBF7rG.js";import{t as g}from"./page-header-Dr_h1CVv.js";var _=f(p()),v=u(),y=r(),b=[y.accessor(`name`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Tool`}),y.accessor(`count`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:t(e.getValue())}),header:`Calls`})],x=r(),S=[x.accessor(`model`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Model`}),x.accessor(`threadCount`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:t(e.getValue())}),header:`Threads`}),x.accessor(`totalTokens`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:n(e.getValue())}),header:`Tokens`})];function C(){let r=e(m()).data,[u,f]=(0,_.useState)(null),p=e(d(u)).data;return(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(g,{actions:(0,v.jsxs)(l,{value:u??`__all__`,onValueChange:e=>{(0,_.startTransition)(()=>{f(e===`__all__`?null:e)})},children:[(0,v.jsx)(o,{className:`h-10 w-full rounded-full border-[var(--border)] bg-[var(--panel)] sm:w-[15rem]`,children:(0,v.jsx)(a,{placeholder:`Filter by project`})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(c,{value:`__all__`,children:`All projects`}),r.map(e=>(0,v.jsx)(c,{value:e.name,children:e.name},e.name))]})]}),eyebrow:`Analytics`,subtitle:`Inspect token load, tool-call distribution, and project-scoped usage patterns to understand where Codex is spending effort.`,title:`Analytics`}),(0,v.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:[(0,v.jsx)(h,{label:`Threads`,value:t(p.summary.totalThreads)}),(0,v.jsx)(h,{label:`Projects`,value:t(p.summary.totalProjects)}),(0,v.jsx)(h,{label:`Tokens`,value:n(p.summary.totalTokens)}),(0,v.jsx)(h,{label:`Average per thread`,value:n(Math.round(p.summary.averageTokensPerThread))}),(0,v.jsx)(h,{label:`Web search threads`,value:t(p.summary.threadsWithWebSearch)})]}),(0,v.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,v.jsxs)(`section`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Most frequent tool calls`}),(0,v.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Useful for future prompt and tool optimization work.`})]}),(0,v.jsx)(i,{columns:b,data:p.toolUsage,emptyMessage:`No tool calls recorded.`})]}),(0,v.jsxs)(`section`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Model token breakdown`}),(0,v.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Compare model usage and token concentration within the current project scope.`})]}),(0,v.jsx)(i,{columns:S,data:p.modelsByTokens,emptyMessage:`No model usage recorded.`})]})]})]})}export{C as component};
1
+ import{c as e,o as t,s as n}from"./formatters-BdnWuM1z.js";import{n as r,t as i}from"./data-table-Cj-v-uyB.js";import{a,i as o,n as s,r as c,t as l}from"./select-DbnpwqL6.js";import{Bt as u,Lt as d,M as f,k as p,zt as m}from"./index-BVFnfS78.js";import{t as h}from"./metric-card-CBZuWLzQ.js";import{t as g}from"./page-header-CnD21cPn.js";var _=u(m()),v=d(),y=r(),b=[y.accessor(`name`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Tool`}),y.accessor(`count`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:t(e.getValue())}),header:`Calls`})],x=r(),S=[x.accessor(`model`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:e.getValue()}),header:`Model`}),x.accessor(`threadCount`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:t(e.getValue())}),header:`Threads`}),x.accessor(`totalTokens`,{cell:e=>(0,v.jsx)(`span`,{className:`font-mono text-sm`,children:n(e.getValue())}),header:`Tokens`})];function C(){let r=e(f()).data,[u,d]=(0,_.useState)(null),m=e(p(u)).data;return(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(g,{actions:(0,v.jsxs)(l,{value:u??`__all__`,onValueChange:e=>{(0,_.startTransition)(()=>{d(e===`__all__`?null:e)})},children:[(0,v.jsx)(o,{className:`h-10 w-full rounded-full border-[var(--border)] bg-[var(--panel)] sm:w-[15rem]`,children:(0,v.jsx)(a,{placeholder:`Filter by project`})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(c,{value:`__all__`,children:`All projects`}),r.map(e=>(0,v.jsx)(c,{value:e.name,children:e.name},e.name))]})]}),eyebrow:`Analytics`,subtitle:`Inspect token load, tool-call distribution, and project-scoped usage patterns to understand where Codex is spending effort.`,title:`Analytics`}),(0,v.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:[(0,v.jsx)(h,{label:`Threads`,value:t(m.summary.totalThreads)}),(0,v.jsx)(h,{label:`Projects`,value:t(m.summary.totalProjects)}),(0,v.jsx)(h,{label:`Tokens`,value:n(m.summary.totalTokens)}),(0,v.jsx)(h,{label:`Average per thread`,value:n(Math.round(m.summary.averageTokensPerThread))}),(0,v.jsx)(h,{label:`Web search threads`,value:t(m.summary.threadsWithWebSearch)})]}),(0,v.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,v.jsxs)(`section`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Most frequent tool calls`}),(0,v.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Useful for future prompt and tool optimization work.`})]}),(0,v.jsx)(i,{columns:b,data:m.toolUsage,emptyMessage:`No tool calls recorded.`})]}),(0,v.jsxs)(`section`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h3`,{className:`font-semibold text-sm`,children:`Model token breakdown`}),(0,v.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-sm`,children:`Compare model usage and token concentration within the current project scope.`})]}),(0,v.jsx)(i,{columns:S,data:m.modelsByTokens,emptyMessage:`No model usage recorded.`})]})]})]})}export{C as component};
@@ -0,0 +1 @@
1
+ import{Lt as e}from"./index-BVFnfS78.js";import{t}from"./reload-error-panel-DLAg0AW2.js";var n=e();function r({error:e}){return(0,n.jsx)(t,{description:e.message,title:`Failed to load Antigravity conversation`})}export{r as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as e,n as t,o as n,r}from"./formatters-BdnWuM1z.js";import{t as i}from"./useMutation-MZ3Hr9h9.js";import{n as a,t as o}from"./metadata-section-jnIkB7dB.js";import{r as s,t as c}from"./download-P3Rp23Ad.js";import{t as l}from"./antigravity-keychain-panel-dYuRWtCf.js";import{t as u}from"./scroll-text-CqaFm9by.js";import{Ft as d,H as f,Lt as p,d as m,g as h,l as g,m as _,p as v,t as y}from"./index-BVFnfS78.js";import{t as b}from"./metric-card-CBZuWLzQ.js";import{t as x}from"./page-header-CnD21cPn.js";import{t as S}from"./text-document-panel-DPleOmmq.js";var C=p(),w=e=>[{label:`Conversation ID`,value:(0,C.jsx)(`span`,{"data-mono":`true`,children:e.conversation.conversationId})},{label:`Workspace`,value:(0,C.jsx)(d,{className:`text-[var(--accent)]`,params:{workspaceKey:e.conversation.workspaceKey},to:`/antigravity/$workspaceKey`,children:e.conversation.workspaceLabel})},{label:`Created`,value:(0,C.jsx)(`span`,{suppressHydrationWarning:!0,children:r(e.conversation.createdAtMs)})},{label:`Updated`,value:(0,C.jsx)(`span`,{suppressHydrationWarning:!0,children:r(e.conversation.lastUpdatedAtMs)})},{label:`Transcript source`,value:e.conversation.transcriptSource??`n/a`},{label:`Conversation path`,value:e.conversation.conversationPath??`n/a`},{label:`Transcript path`,value:e.conversation.transcriptPath??`n/a`},{label:`Summary path`,value:e.conversation.summaryPath??`n/a`},{label:`Source root`,value:e.conversation.sourceRoot??`n/a`}];function T({canExportArtifacts:e,canExportConversation:t,exportArtifactsPending:n,exportConversationPending:r,showConversationExport:i,onExportArtifacts:a,onExportConversation:o}){return(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[i?(0,C.jsxs)(f,{className:`rounded-full`,disabled:!t||r,type:`button`,variant:`outline`,onClick:o,children:[(0,C.jsx)(s,{className:`mr-2 size-4`}),`Export conversation`]}):null,e?(0,C.jsxs)(f,{className:`rounded-full`,disabled:n,type:`button`,variant:`outline`,onClick:a,children:[(0,C.jsx)(u,{className:`mr-2 size-4`}),`Export artifacts`]}):null]})}function E({detail:e}){return(0,C.jsxs)(`div`,{className:`space-y-4`,children:[e.transcriptLocked?(0,C.jsxs)(`section`,{className:`rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]`,children:[(0,C.jsx)(`h3`,{className:`font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]`,children:`Transcript`}),(0,C.jsx)(`p`,{className:`mt-4 text-[var(--muted-foreground)] text-sm`,children:`Unlock Antigravity transcript export to inspect the rendered conversation content here.`})]}):e.conversationMarkdown?(0,C.jsx)(S,{content:e.conversationMarkdown,description:`Rendered from the available Antigravity transcript or decrypted safe-storage payload.`,title:`Conversation transcript`}):(0,C.jsxs)(`section`,{className:`rounded-[1.6rem] border border-[var(--border)] bg-[var(--panel)] p-5 shadow-[var(--panel-shadow)]`,children:[(0,C.jsx)(`h3`,{className:`font-semibold text-[var(--muted-foreground)] text-sm uppercase tracking-[0.18em]`,children:`Transcript`}),(0,C.jsx)(`p`,{className:`mt-4 text-[var(--muted-foreground)] text-sm`,children:e.artifactsMarkdown?`No transcript preview is available for this conversation. Generated artifacts are available below.`:`No transcript preview is available for this conversation.`})]}),e.artifactsMarkdown?(0,C.jsx)(S,{content:e.artifactsMarkdown,description:`Markdown artifacts generated for this conversation.`,title:`Artifacts`}):null]})}function D(){let r=e(m()).data,s=e(g(y.useParams().conversationId)).data,u=h(s.conversation,!!r?.isUnlocked),d=s.artifactsMarkdown!==null,f=u||s.transcriptLocked,p=i({mutationFn:()=>_({data:{conversationId:s.conversation.conversationId}}),onSuccess:e=>{c(e.filename,e.content,`text/markdown; charset=utf-8`)}}),S=i({mutationFn:()=>v({data:{conversationId:s.conversation.conversationId}}),onSuccess:e=>{c(e.filename,e.content,`text/markdown; charset=utf-8`)}});return(0,C.jsxs)(`div`,{className:`space-y-6`,children:[(0,C.jsx)(x,{actions:(0,C.jsx)(T,{canExportArtifacts:d,canExportConversation:u,exportArtifactsPending:S.isPending,exportConversationPending:p.isPending,showConversationExport:f,onExportArtifacts:()=>S.mutate(),onExportConversation:()=>p.mutate()}),breadcrumb:(0,C.jsx)(a,{items:[{label:`Antigravity`,to:`/antigravity`},{label:s.conversation.workspaceLabel,params:{workspaceKey:s.conversation.workspaceKey},to:`/antigravity/$workspaceKey`},{label:s.conversation.title}]}),eyebrow:`Antigravity conversation`,subtitle:`Conversation detail for the selected Antigravity workspace session.`,title:s.conversation.title}),(0,C.jsx)(l,{}),(0,C.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-4`,children:[(0,C.jsx)(b,{label:`Transcript entries`,value:n(s.conversation.transcriptEntryCount)}),(0,C.jsx)(b,{label:`Artifacts`,value:n(s.conversation.artifactCount)}),(0,C.jsx)(b,{label:`Size`,value:t(s.conversation.conversationBytes)}),(0,C.jsx)(b,{helper:s.conversation.transcriptSource??`summary`,label:`Indexed items`,value:n(s.conversation.indexedItemCount??0)})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.95fr_1.05fr]`,children:[(0,C.jsx)(o,{items:w(s),title:`Conversation metadata`}),(0,C.jsx)(E,{detail:s})]}),p.isError?(0,C.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:p.error instanceof Error?p.error.message:`Conversation export failed`}):null,S.isError?(0,C.jsx)(`p`,{className:`text-[var(--destructive)] text-sm`,children:S.error instanceof Error?S.error.message:`Artifact export failed`}):null]})}export{D as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./useMutation-MZ3Hr9h9.js";import{t}from"./useQuery-Cb4V0AT0.js";import{H as n,Lt as r,_t as i,d as a,gt as o,h as s,mt as c}from"./index-BVFnfS78.js";var l=o(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),u=o(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),d=o(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),f=o(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),p=r();function m(){let r=i(),o=t(a()).data??null,m=e({mutationFn:()=>s(),onSuccess:e=>{r.setQueryData(a().queryKey,e),Promise.all([r.invalidateQueries({queryKey:a().queryKey}),r.invalidateQueries({queryKey:[`antigravity-conversation`]})])}});if(!o||o.status===`unsupported`)return null;let h=o.isUnlocked,g=m.error?.message??o.error;return(0,p.jsxs)(`div`,{className:c(`flex flex-col gap-3 rounded-xl border px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,h?`border-emerald-500/30 bg-emerald-500/10`:`border-[var(--border)] bg-[var(--panel)]`),children:[(0,p.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,p.jsx)(`div`,{className:c(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md`,h?`bg-emerald-500/15 text-emerald-600`:`bg-[var(--panel-secondary)]`),children:h?(0,p.jsx)(d,{className:`size-4`}):(0,p.jsx)(u,{className:`size-4`})}),(0,p.jsxs)(`div`,{className:`min-w-0`,children:[(0,p.jsx)(`p`,{className:`font-medium text-sm`,children:h?`Keychain access enabled`:`Unlock Antigravity transcript export`}),(0,p.jsx)(`p`,{className:`mt-1 text-[var(--muted-foreground)] text-xs`,children:h?`The Antigravity key is cached in this server process only. Transcript exports are available for local logs and safe-storage payloads.`:`Spiracha needs one-time access to ${o.keychainService} to decrypt Antigravity transcript data. macOS will ask for approval after you click unlock.`}),g?(0,p.jsxs)(`p`,{className:`mt-2 flex items-center gap-1 text-[var(--destructive)] text-xs`,children:[(0,p.jsx)(f,{className:`size-3`}),g]}):null]})]}),h?null:(0,p.jsxs)(n,{className:`shrink-0`,disabled:!o.canRequestAccess||m.isPending,type:`button`,onClick:()=>m.mutate(),children:[(0,p.jsx)(l,{className:`size-4`}),m.isPending?`Waiting...`:`Unlock`]})]})}export{u as n,m as t};