claude

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "claude_code"

Variables

This section is empty.

Functions

func DecodeProjectPath

func DecodeProjectPath(sourceKey string) string

DecodeProjectPath decodes the project path from a Claude source key. Claude stores projects under ~/.claude/projects/<encoded-path>/, where the encoded path replaces "/" with "-".

func DecodeProjectPathFromSourceKey

func DecodeProjectPathFromSourceKey(sourceKey string) string

DecodeProjectPathFromSourceKey decodes the project path from a Claude source key.

func ExtractBasename

func ExtractBasename(sourceKey string) string

ExtractBasename returns the filename without extension.

func ExtractParentSessionID

func ExtractParentSessionID(sourceKey string) string

ExtractParentSessionID extracts the parent session UUID from a subagent path.

func ExtractSessionIDFromPath

func ExtractSessionIDFromPath(sourceKey string) string

ExtractSessionIDFromPath extracts the UUID session ID from a JSONL filename.

func HasOnlyReadToolUses

func HasOnlyReadToolUses(tus []ToolUse) bool

HasOnlyReadToolUses reports whether every extracted tool_use is Read.

func SerializeToolUses

func SerializeToolUses(tus []ToolUse, contentTypes []string) sql.NullString

SerializeToolUses returns tool uses and content types as a JSON NullString.

Types

type ExtractedFields

type ExtractedFields = extractedFields

ExtractedFields aliases extractedFields for hook integration.

func ExtractFields

func ExtractFields(line string) ExtractedFields

ExtractFields parses a single Claude JSONL line and returns structured fields.

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