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