cursor

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "cursor"

Variables

This section is empty.

Functions

func DecodeProjectPath

func DecodeProjectPath(sourceKey string) string

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

func DecodeProjectPathFromSourceKey(sourceKey string) string

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.

type ToolUse

type ToolUse = toolUse

ToolUse aliases toolUse for hook integration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL