Versions in this module Expand all Collapse all v1 v1.27.0 Nov 11, 2026 Changes in this version + const AckDirName + const ContextFailedInvocationID + const ContextRunID + const DefaultIndexLimit + const DefaultReadLimit + const MaxChunkBytes + const MaxCompletedRuns + const MaxCursorBytes + const MaxDetailBytes + const MaxGenerationBytes + const MaxIndexLimit + const MaxMetadataBytes + const MaxPageBytes + const MaxProducers + const MaxReadLimit + const MaxRunBytes + const MaxSegmentBytes + const MaxStoreBytes + const ReasonNoSpool + const ReasonRefreshFailed + const ReasonRefreshUnsupported + const ReasonSourceOffline + const RetentionAge + const SchemaVersion + const SpoolDirName + var ErrCapacity = errors.New("storage capacity exhausted") + var ErrDiscoverySealed = errors.New("producer discovery is sealed") + var ErrIdentityConflict = errors.New("workspace identity already bound") + var ErrInvalidCursor = errors.New("invalid cursor") + var ErrInvalidID = errors.New("invalid identifier") + var ErrInvalidRecord = errors.New("invalid record") + var ErrInvalidSelector = errors.New("invalid selector") + var ErrNotFound = errors.New("not found") + var ErrProducerCap = errors.New("producer limit reached") + var ErrSequenceGap = errors.New("sequence gap") + var ErrSourceGap = errors.New("source records are not retained") + var ErrUnsafePath = errors.New("unsafe storage path") + func DeterministicID(parts ...string) string + func FormatUnavailable(reason string) string + func NewID() string + func ParseUnavailable(stderr string) (string, bool) + func PositionCursor(runID string, pos map[string]uint64) (string, error) + func ResolveSpool() (string, error) + func SplitText(text string, maxBytes int) []string + func ValidHook(name string) bool + func ValidID(id string) bool + func ValidateReadSelectors(req ReadRequest) error + func WithRecorder(ctx context.Context, rec *Recorder) context.Context + type AckKey struct + Hop Hop + ProducerID string + RunID string + type AckState struct + Acked uint64 + GapFirst uint64 + GapLast uint64 + Gapped bool + Hop Hop + ProducerID string + RunID string + SchemaVersion int + type AckStore struct + func NewAckStore(dir string) (*AckStore, error) + func (a *AckStore) Advance(key AckKey, acked uint64) error + func (a *AckStore) Load(key AckKey) (AckState, error) + func (a *AckStore) RecordGap(key AckKey, first, last uint64) error + type AppendResult struct + Accepted uint64 + Duplicates int + Elided int + Written int + type Backend interface + AddCondition func(runID string, c Condition) error + Append func(records []Record) (AppendResult, error) + RegisterProducer func(runID string, ref ProducerRef) error + type BatchRequest struct + FirstSequence uint64 + LastSequence uint64 + ProducerID string + Records [][]byte + RunID string + SchemaVersion int + type BatchResult struct + Accepted uint64 + Detail string + GapFirst uint64 + GapLast uint64 + Result MirrorResult + type BoundedBuffer struct + Max int + func (b *BoundedBuffer) String() string + func (b *BoundedBuffer) Write(p []byte) (int, error) + type CaptureState string + const CaptureComplete + const CapturePartial + const CapturePending + const CaptureRecording + const CaptureUnavailable + type CommandState string + const CommandCanceled + const CommandFailed + const CommandPending + const CommandRunning + const CommandSucceeded + const CommandUnknown + type Condition string + const ConditionCapacity + const ConditionInterrupted + const ConditionMalformedRecord + const ConditionProducerCap + const ConditionRetentionGap + const ConditionSourceUnavailable + const ConditionTruncated + const ConditionUnsupportedSource + const ConditionWriteError + type DiagnosticWriter struct + func (w *DiagnosticWriter) Close() error + func (w *DiagnosticWriter) Write(p []byte) (int, error) + type Hop string + const HopInbound + const HopUpstream + type ImportRequest struct + Context string + Response *ReadResponse + RunID string + WorkspaceUID string + type ImportResult struct + Duplicates int + Stalled []string + Written int + type IndexRequest struct + After string + Context string + Limit int + WorkspaceUID string + type IndexResponse struct + HasMore bool + NextCursor string + Runs []RunSummary + SchemaVersion int + type Invocation struct + Duration time.Duration + ExitCode *int + Hook string + ID string + Index *int + Key string + Phase string + Reason string + Signal string + State InvocationState + type InvocationState string + const InvocationCanceled + const InvocationDeferred + const InvocationFailed + const InvocationPending + const InvocationRunning + const InvocationSkipped + const InvocationSucceeded + const InvocationUnknown + type Kind string + const KindCapture + const KindInvocation + const KindOutput + const KindProducer + type Location string + const LocationContainer + const LocationHost + const LocationProviderHost + type MirrorResult string + const MirrorAccepted + const MirrorRejected + const MirrorRetentionGap + type Options struct + Now func() time.Time + Root string + type ProducerRef struct + Location Location + ParentProducerID string + ProducerID string + Sealed bool + State ProducerState + type ProducerState string + const ProducerReserved + const ProducerRunning + const ProducerTerminal + const ProducerUnavailable + type ReadRequest struct + After string + Hook string + InvocationID string + Limit int + MaxBytes int + RunID string + type ReadResponse struct + Availability []SourceAvailability + Complete bool + HasMore bool + NextCursor string + Records []Record + Run RunSummary + SchemaVersion int + func DecodeReadResponse(r io.Reader) (*ReadResponse, error) + func ReadSpoolPage(sel SpoolSelector) (*ReadResponse, error) + type Record struct + Bytes int + ChildProducerID string + Condition Condition + Detail string + DiscoverySealed bool + DroppedBytes int64 + DurationMillis *int64 + Elided bool + ExitCode *int + Hook string + HookIndex *int + HookKey string + InvocationID string + Kind Kind + Location Location + ParentProducerID string + Phase string + ProducerID string + ProducerState ProducerState + Reason string + RunID string + SchemaVersion int + Sequence uint64 + Signal string + State InvocationState + Stream Stream + Text string + Time time.Time + func (r *Record) Validate() error + type Recorder struct + func NewRecorder(opts RecorderOptions) (*Recorder, error) + func RecorderFrom(ctx context.Context) *Recorder + func (r *Recorder) Capture(c Condition, detail string, droppedBytes int64) + func (r *Recorder) Close(state ProducerState, sealDiscovery bool) + func (r *Recorder) Err() error + func (r *Recorder) Invocation(inv Invocation) + func (r *Recorder) MarkChild(id string, state ProducerState, reason string) + func (r *Recorder) ProducerID() string + func (r *Recorder) ReserveChild(location Location) string + func (r *Recorder) RunID() string + func (r *Recorder) SealDiscovery() + func (r *Recorder) Writer(invocationID string, stream Stream) *DiagnosticWriter + func (r *Recorder) WriterRedacting(invocationID string, stream Stream, extra *secrets.Redactor) *DiagnosticWriter + type RecorderOptions struct + Backend Backend + Location Location + Now func() time.Time + ParentProducerID string + ProducerID string + Redactor *secrets.Redactor + Resumed bool + RunID string + type RunManifest struct + CaptureState CaptureState + Command string + CommandState CommandState + Conditions []Condition + Context string + CreatedAt time.Time + DiscoverySealed bool + Producers []ProducerRef + RunID string + SchemaVersion int + TaskID string + UpdatedAt time.Time + WorkspaceIDAtStart string + WorkspaceUID *string + func (m *RunManifest) Active() bool + func (m *RunManifest) Complete() bool + func (m *RunManifest) Summary() RunSummary + type RunSpec struct + Command string + Context string + RunID string + TaskID string + WorkspaceIDAtStart string + WorkspaceUID string + type RunSummary struct + CaptureState CaptureState + Command string + CommandState CommandState + Conditions []Condition + Context string + CreatedAt time.Time + RunID string + TaskID string + WorkspaceIDAtStart string + WorkspaceUID *string + type Session struct + Recorder *Recorder + RunID string + Store *Store + func StartSession(opts SessionOptions) *Session + func StartSessionIn(store *Store, opts SessionOptions) *Session + func (s *Session) BindWorkspace(uid, idAtStart string) + func (s *Session) Context(ctx context.Context) context.Context + func (s *Session) FailureContext() map[string]string + func (s *Session) Finish(err error, sealDiscovery bool) + func (s *Session) ProducerID() string + type SessionOptions struct + Location Location + ParentProducerID string + ProducerID string + Redactor *secrets.Redactor + Resumed bool + Run RunSpec + RunID string + type Sink struct + func NewSink(opts SinkOptions) (*Sink, error) + func (s *Sink) Append(req BatchRequest) (BatchResult, error) + func (s *Sink) RunID() string + type SinkOptions struct + Acks *AckStore + OnAccepted func(producerID string, accepted uint64) + Spec RunSpec + Store *Store + type SourceAvailability struct + Available bool + ProducerID string + Reason string + type SpoolSelector struct + Context string + Read ReadRequest + Root string + WorkspaceUID string + type Store struct + func Open(opts Options) (*Store, error) + func OpenDefault() (*Store, error) + func (s *Store) AddCondition(runID string, c Condition) error + func (s *Store) Append(records []Record) (AppendResult, error) + func (s *Store) BindWorkspace(runID, uid, idAtStart string) error + func (s *Store) CreateRun(spec RunSpec) (*RunManifest, error) + func (s *Store) FailedInvocations(runID string) ([]string, error) + func (s *Store) FailureContext(runID string) map[string]string + func (s *Store) ImportRemote(req ImportRequest) (ImportResult, error) + func (s *Store) ListRuns(req IndexRequest) (*IndexResponse, error) + func (s *Store) LocalPositions(runID string) (map[string]uint64, error) + func (s *Store) Manifest(runID string) (*RunManifest, error) + func (s *Store) Prune() error + func (s *Store) Read(req ReadRequest) (*ReadResponse, error) + func (s *Store) RegisterProducer(runID string, ref ProducerRef) error + func (s *Store) Root() string + func (s *Store) SealDiscovery(runID string) error + func (s *Store) SetCommandState(runID string, state CommandState) error + func (s *Store) SetTaskID(runID, taskID string) error + type StoreSource struct + func NewStoreSource(store *Store) *StoreSource + func (s *StoreSource) ReadAfter(runID, producerID string, after uint64, maxBytes int) ([]Record, error) + type Stream string + const StreamCombined + const StreamStderr + const StreamStdout v1.27.0-beta.10 Nov 11, 2026 v1.27.0-beta.9 Nov 11, 2026 v1.27.0-beta.8 Nov 9, 2026 v1.27.0-beta.7 Nov 7, 2026 v1.27.0-beta.6 Nov 7, 2026 v1.27.0-beta.5 Nov 5, 2026 v1.27.0-beta.4 Nov 5, 2026 v1.27.0-beta.3 Nov 4, 2026 v1.27.0-beta.2 Nov 3, 2026 v1.27.0-beta.1 Nov 2, 2026