Documentation
¶
Index ¶
Constants ¶
const ProviderName = "cursor"
Variables ¶
This section is empty.
Functions ¶
func DecodeProjectPath ¶
DecodeProjectPath decodes the project path from a Cursor transcript path. Cursor stores project data under ~/.cursor/projects/<encoded-path>/, where the encoded path replaces "/" with "-". Unlike Claude (which uses a leading "-" to encode the root "/"), Cursor omits the leading separator, so the result needs a "/" prefix. Example: tmp-demo-project -> /tmp/demo/project
Returns "" when sourceKey is not actually under the projects base.
Cursor does not escape dashes inside path segments, so this decoded path can be ambiguous. Do not use it for routing, filesystem access, or authorization until the decoder is disambiguated.
func DecodeProjectPathFromSourceKey ¶
DecodeProjectPathFromSourceKey decodes the project path from a Cursor source key.
func SerializeToolUses ¶
func SerializeToolUses(tus []ToolUse, contentTypes []string) sql.NullString
SerializeToolUses returns tool uses and content types as a JSON NullString.
Types ¶
type BubbleData ¶
type BubbleData = bubbleData
BubbleData aliases bubbleData for hook integration.
func ParseCursorJSONLLine ¶
func ParseCursorJSONLLine(line string) BubbleData
ParseCursorJSONLLine parses a Cursor agent-transcripts JSONL line.