feat(cursor): Cursor sessions as the third index source - #48
Merged
Conversation
Format captured from a LIVE Cursor 3.14.7 install before it was removed (the install existed for exactly this): one SQLite database User/globalStorage/state.vscdb — composerHeaders as the session catalog, composerData:<id> for bubble order + ISO timestamps, bubbleId:* rows typed 1=user / 2=assistant, thinking as empty-text bubbles. The surface rule stays the project invariant: non-empty text only. No file per session, so incremental indexing keys on virtual paths cursor:<composerId> with lastUpdatedAt in the signature; reconciliation compares Cursor's catalog against indexed_files instead of the disk, and prune_deleted skips the virtual prefix. The live db is snapshotted (WAL) before reading. Subagent sessions are skipped like Claude sidechains. Workspace→folder mapping follows the VS Code workspace.json convention; empty-window sessions index with an empty project. Also fixes a reuse-cache hole this work surfaced, in both cursor and metadocs indexing: embeddings_by_hash reuse is now gated on the OLD signature carrying the current embed fingerprint — vectors never cross embedding spaces via the by-hash cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
«надо cursor добавить» — done. The format was captured from a live Cursor 3.14.7 install (Maxim installed it for exactly this experiment): SQLite
state.vscdb,composerHeaderscatalog (incl.isSubagent— skipped like Claude sidechains),composerData:<id>bubble order + ISO timestamps,bubbleId:*messages typed 1=user/2=assistant with thinking as empty-text bubbles.Design points:
cursor:<composerId>,lastUpdatedAtin the signature; reconciliation follows Cursor's catalog, not the disk (prune_deletedskips the virtual prefix — asserted).workspace.jsonconvention;empty-window→ empty project.--source cursoracross index/search/recent/grep/prune + MCP validation.Synthetic-fixture tests reproduce the captured shape end-to-end (surface extraction incl. thinking bubbles, workspace mapping, incremental re-index on appended bubble, catalog reconciliation, silent absence, fp-gated reuse). Live proof will come from the first machine with Cursor present — the format itself was read from a real install, not imagined.
Suite 334 passed.
🤖 Generated with Claude Code