Expand description
Implementation of toolpath-convo traits for Cursor sessions.
Cursor’s bubble store is already linear (one bubble per UI message,
ordered by fullConversationHeadersOnly), so the mapping per turn
is direct:
- User bubble (
type: 1) →Turnwithrole: User,textfrombubble.text. - Assistant text/thinking/tool bubble (
type: 2) →Turnwithrole: Assistant. The bubble’stext,allThinkingBlocks, andtoolFormerDatapopulatetext,thinking, and a singletool_uses[0]respectively (Cursor stores at most one tool call per bubble in observed data; multi-tool turns fan out to multiple bubbles with the samerequestId).
File mutations are resolved at view-build time: when a tool bubble
carries edit_file_v2 with beforeContentId/afterContentId, the
provider looks the content blobs up from
CursorSession::content_blobs and emits a FileMutation with
before, after, and a unified diff computed via
toolpath_convo::unified_diff.
Provider-specific UI metadata (Cursor’s per-bubble checkpointId,
requestId, richText, capability flags, the
anysphere.cursor-commits checkpoint store, …) is not smuggled
through the IR. The IR has no Turn.extra; round-tripping a Cursor
session through ConversationView drops those fields by design.
The bubble store on disk is the source of truth for anything that
needs them.
Structs§
- Cursor
Convo - Provider for Cursor sessions.
Constants§
- PROVIDER_
ID - The dispatch family used in
path.meta.sourceandConversationView.provider_id.
Functions§
- session_
to_ view - Convert a Cursor
CursorSessioninto the provider-agnosticConversationView. - tool_
category - Map a Cursor tool to toolpath’s category ontology.
toolis the numeric id fromtoolFormerData.tool;nameis the internal tool name. Both are needed because Anysphere has historically renamed tools while keeping ids stable and vice versa. Classify a Cursor tool intoToolCategory.