Versions in this module Expand all Collapse all v1 v1.138.2 Sep 30, 2026 v1.138.1 Sep 29, 2026 v1.138.0 Sep 29, 2026 Changes in this version + const KindDraft + const KindRun + const MaxBytes + var ErrNotFound = errors.New("no such recording") + func DescribeCall(tool string, args map[string]any) string + func ExportKey(req scriptrun.ExportRequest) string + func PublishKey(req scriptrun.PublishRequest) string + func SourceHash(source string) string + func ToolKey(tool string, args map[string]any) string + type Answerer interface + Answer func(tool string, args map[string]any) (out map[string]any, errText string, ok bool) + type Call struct + Args map[string]any + Error string + Key string + Out map[string]any + Output *scriptrun.ExportResult + Tool string + type Header struct + FireTime time.Time + MaxRows int + Params map[string]any + Preview bool + RunID string + RunURL string + State map[string]any + V int + type Made struct + Args map[string]any + Declared bool + Error string + Out map[string]any + Tool string + type Meta struct + Bytes int + CreatedAt time.Time + Kept bool + Kind string + Reason string + RecordedBy string + RunID string + ScriptID string + ScriptName string + SourceSHA256 string + Succeeded bool + Version int + func (m Meta) Replayable() bool + type MissingError struct + Call string + Held int + func (e *MissingError) Error() string + type Recorder struct + func NewRecorder(h Header) *Recorder + func (r *Recorder) Exporter(inner scriptrun.Exporter) scriptrun.Exporter + func (r *Recorder) Finish() (data []byte, reason string) + func (r *Recorder) OnCall(tool string, args, out map[string]any, err error) + func (r *Recorder) SaveTo(ctx context.Context, store Store, m Meta) bool + type Recording struct + Calls []Call + func Decode(data []byte) (*Recording, error) + type Replay struct + func NewReplay(rec *Recording) *Replay + func (r *Replay) CallTool(_ context.Context, name string, args map[string]any) (map[string]any, error) + func (r *Replay) Exporter() scriptrun.Exporter + func (r *Replay) Header() Header + func (r *Replay) Lenient() *Replay + func (r *Replay) Made() []Made + func (r *Replay) WithAnswers(a Answerer) *Replay + type Store interface + Get func(ctx context.Context, runID string) (*Stored, error) + Keep func(ctx context.Context, scriptID, author string, runIDs []string) error + Purge func(ctx context.Context, retention time.Duration) (int64, error) + Recent func(ctx context.Context, scriptID string, limit int) ([]Stored, error) + Save func(ctx context.Context, rec Stored) error + type Stored struct + Data []byte