history

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(taskName string, ev Event) error

func AppendLocked

func AppendLocked(taskName string, ev Event) error

AppendLocked appends an event to history.jsonl. The caller must hold the task lock.

func NewRunID

func NewRunID() (string, error)

func WriteAll

func WriteAll(taskName string, events []Event) error

Types

type Event

type Event struct {
	TS      time.Time       `json:"ts"`
	Type    string          `json:"type"`
	Role    string          `json:"role,omitempty"`
	Content string          `json:"content,omitempty"`
	Data    json.RawMessage `json:"data,omitempty"`
}

func Read

func Read(taskName string, opts ReadOptions) ([]Event, error)

type ReadOptions

type ReadOptions struct {
	Since          time.Time
	MessagesOnly   bool
	EventsOnly     bool
	MaxEvents      int
	IncludeInvalid bool
}

type TailInfo

type TailInfo struct {
	LastTS           time.Time
	TaskStatus       task.TaskStatus
	Stage            string
	LastMergedCommit string
	BaseBranch       string
	BaseCommit       string

	LastRunDurationMS int
	LastRunToolCalls  int
	LastRunOutcome    string

	RunningSince time.Time
	RunningRunID string
}

func Tail

func Tail(taskName string) (TailInfo, error)

func TailPath

func TailPath(path string) (TailInfo, error)

Jump to

Keyboard shortcuts

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