sessioncapture

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

Bridge wraps the trace CLI for Git-native session capture.

func NewBridge

func NewBridge() *Bridge

NewBridge locates the trace binary and returns a bridge. Returns a no-op bridge if trace is not installed, logging a warning on first use.

func (*Bridge) Disable

func (b *Bridge) Disable(ctx context.Context, dir string) error

Disable runs `trace disable` in the given directory.

func (*Bridge) Enable

func (b *Bridge) Enable(ctx context.Context, dir string) error

Enable runs `trace enable` in the given directory.

func (*Bridge) GetStatus

func (b *Bridge) GetStatus(ctx context.Context, dir string) (*Status, error)

GetStatus returns the current trace session status.

func (*Bridge) ListCheckpoints

func (b *Bridge) ListCheckpoints(ctx context.Context, dir string) ([]Checkpoint, error)

ListCheckpoints returns available checkpoints for the current session.

func (*Bridge) Ready

func (b *Bridge) Ready() bool

Ready reports whether the trace CLI is available.

func (*Bridge) Rewind

func (b *Bridge) Rewind(ctx context.Context, dir string, checkpointID string) error

Rewind restores files to a given checkpoint ID.

type Checkpoint

type Checkpoint struct {
	ID        string `json:"id"`
	SessionID string `json:"session_id"`
	Prompt    string `json:"prompt,omitempty"`
	CreatedAt string `json:"created_at"`
}

Checkpoint represents a rewind point.

type Status

type Status struct {
	Enabled   bool   `json:"enabled"`
	SessionID string `json:"session_id,omitempty"`
	Agent     string `json:"agent,omitempty"`
	Phase     string `json:"phase,omitempty"`
}

Status holds the parsed output of `trace status --json`.

Jump to

Keyboard shortcuts

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