capture

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OriginClaudeCode = "claude_code"
	OriginCodexCLI   = "codex_cli"
	OriginOpenCode   = "opencode"
	OriginPi         = "pi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssistantResponse

type AssistantResponse struct {
	SessionMetadata
	TurnID               string
	LastAssistantMessage string
}

type Recorder

type Recorder struct {
	Store *store.Store
	Index *index.DB
	CWD   string
}

func Open

func Open(cwd string) (*Recorder, bool, error)

func (*Recorder) ArchiveTranscript

func (r *Recorder) ArchiveTranscript(sessionID, transcriptPath string) error

func (*Recorder) Close

func (r *Recorder) Close() error

func (*Recorder) RecordAssistantAndFinalize

func (r *Recorder) RecordAssistantAndFinalize(event AssistantResponse) error

func (*Recorder) RecordToolUse

func (r *Recorder) RecordToolUse(event ToolUse) error

func (*Recorder) RecordUserPrompt

func (r *Recorder) RecordUserPrompt(event UserPrompt) error

func (*Recorder) UpsertSession

func (r *Recorder) UpsertSession(meta SessionMetadata) error

type SessionMetadata

type SessionMetadata struct {
	SessionID      string
	Origin         string
	Model          string
	PermissionMode string
	TranscriptPath string
	// contains filtered or unexported fields
}

type ToolUse

type ToolUse struct {
	SessionMetadata
	TurnID       string
	ToolName     string
	ToolUseID    string
	ToolInput    json.RawMessage
	ToolResponse json.RawMessage
}

type UserPrompt

type UserPrompt struct {
	SessionMetadata
	TurnID string
	Prompt string
}

Jump to

Keyboard shortcuts

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