Versions in this module Expand all Collapse all v0 v0.12.0 Aug 25, 2026 v0.11.0 Aug 14, 2026 Changes in this version + const ArtifactEncodingBase64 + const DefaultGracefulShutdownPeriod + const DefaultMaxAggregateInMemoryBytes + const DefaultMaxAggregateSpoolBytes + const DefaultMaxInlineResultBytes + const DefaultMaxPendingInputBytes + const DefaultMaxPendingWaiters + const DefaultMaxProcessInMemoryBytes + const DefaultMaxProcessSpoolBytes + const DefaultMaxRetainedCompletedProcessesPerSession + const DefaultMaxRunningProcessesPerLoop + const DefaultMaxRunningProcessesPerSession + const HandleEntropyBytes + const SupervisorResourceKey + var ErrSpoolClosed = errors.New("process: spool is closed") + func NewSupervisorResource(dir string) (tool.SessionResource, error) + type AccessMode string + const AccessBroadWrite + const AccessReadOnly + const AccessScopedWrite + func (a AccessMode) Valid() bool + type Artifact struct + Encoding string + EndCursor int64 + ProcessID Handle + StartCursor int64 + func NewArtifact(handle Handle, startCursor, endCursor int64) Artifact + type Base64Result struct + Data string + Gap bool + NextCursor int64 + StartCursor int64 + func RenderBase64(r Reader, cursor int64, maxBytes int) (Base64Result, error) + type Buffer struct + func NewBuffer(capacity int64) *Buffer + func (b *Buffer) Append(chunk []byte) (int64, error) + func (b *Buffer) Capacity() int64 + func (b *Buffer) Read(cursor int64, maxBytes int) (data []byte, nextCursor int64, gap bool, err error) + func (b *Buffer) RetainedFrom() int64 + func (b *Buffer) TotalBytes() int64 + type Code string + const CodeCursorAhead + const CodeCursorGap + const CodeInputBackpressure + const CodeInterrupted + const CodeInvalidArguments + const CodeInvalidSettings + const CodeKilled + const CodeLifetimeEnforcementUnavailable + const CodeLostOnRestore + const CodeManifestCorrupt + const CodeNotFound + const CodeOutputQuotaExceeded + const CodePTYUnavailable + const CodeProcessNotificationsUnsupported + const CodeProcessQuotaExceeded + const CodeProcessSetupFailed + const CodeSpawnFailed + const CodeSpoolCorrupt + const CodeStdinClosed + const CodeSupervisorShuttingDown + const CodeTeardownFailed + const CodeTerminated + const CodeTimedOut + func (c Code) Valid() bool + type CollisionError struct + Attempts int + func (e *CollisionError) Error() string + type CommandMetadata struct + Command string + WorkDir string + type Config struct + GracefulShutdownPeriod time.Duration + MaxAggregateInMemoryBytes int64 + MaxAggregateSpoolBytes int64 + MaxInlineResultBytes int64 + MaxPendingInputBytes int64 + MaxPendingWaiters int + MaxProcessInMemoryBytes int64 + MaxProcessSpoolBytes int64 + MaxRetainedCompletedProcessesPerSession int + MaxRunningProcessesPerLoop int + MaxRunningProcessesPerSession int + func (c Config) Normalize() (Config, error) + func (c Config) Validate() error + type Error struct + Cause error + Code Code + func New(code Code) *Error + func Wrap(code Code, cause error) *Error + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type GenerateError struct + Err error + func (e *GenerateError) Error() string + func (e *GenerateError) Unwrap() error + type Handle string + func NewHandle(exists HandleExists) (Handle, error) + func (h Handle) Valid() bool + type HandleExists func(Handle) bool + type Identity struct + Handle Handle + Origin Origin + Owner Owner + type ImmutableIdentityChangedError struct + Handle Handle + func (e *ImmutableIdentityChangedError) Error() string + type Lease interface + Release func() error + type LifecycleEventIDChangedError struct + Field string + Got uuid.UUID + Had uuid.UUID + Handle Handle + func (e *LifecycleEventIDChangedError) Error() string + type LifecycleEventIDs struct + Backgrounded uuid.UUID + CommandID uuid.UUID + Completed uuid.UUID + Lost uuid.UUID + Started uuid.UUID + type Manifest struct + Access AccessMode + Command CommandMetadata + CompletionPublished int64 + CreatedAt time.Time + Cursors SpoolCursors + Deadline *time.Time + Events LifecycleEventIDs + FinishedAt *time.Time + Result Result + StartedAt *time.Time + State State + TTY bool + func NewManifest(id Identity, cmd CommandMetadata, access AccessMode, tty bool, ...) Manifest + func (m Manifest) Validate() error + type ManifestStore struct + func NewManifestStore(root string) *ManifestStore + func (s *ManifestStore) Delete(h Handle) error + func (s *ManifestStore) Load(h Handle) (Manifest, error) + func (s *ManifestStore) Save(m Manifest) error + type NonMonotonicUpdateError struct + Field string + Got int64 + Had int64 + Handle Handle + func (e *NonMonotonicUpdateError) Error() string + type Origin struct + ToolExecutionID uuid.UUID + type Owner struct + LoopID uuid.UUID + SessionID uuid.UUID + func (o Owner) Equal(other Owner) bool + func (o Owner) IsZero() bool + type ProcessInputTool struct + func NewProcessInput(supervisor *Supervisor, owner Owner) *ProcessInputTool + func (t *ProcessInputTool) Info(context.Context) (*tool.ToolInfo, error) + func (t *ProcessInputTool) InvokableRun(ctx context.Context, _ string) (*tool.ToolResult, error) + func (t *ProcessInputTool) PrepareCall(_ context.Context, _ uuid.UUID, argsJSON string) (tool.Request, tool.PreparedArtifact, error) + type ProcessOutputTool struct + func NewProcessOutput(supervisor *Supervisor, owner Owner) *ProcessOutputTool + func (t *ProcessOutputTool) Info(context.Context) (*tool.ToolInfo, error) + func (t *ProcessOutputTool) InvokableRun(ctx context.Context, _ string) (*tool.ToolResult, error) + func (t *ProcessOutputTool) PrepareCall(_ context.Context, _ uuid.UUID, argsJSON string) (tool.Request, tool.PreparedArtifact, error) + type ProcessStopTool struct + func NewProcessStop(supervisor *Supervisor, owner Owner) *ProcessStopTool + func (t *ProcessStopTool) Info(context.Context) (*tool.ToolInfo, error) + func (t *ProcessStopTool) InvokableRun(ctx context.Context, _ string) (*tool.ToolResult, error) + func (t *ProcessStopTool) PrepareCall(_ context.Context, _ uuid.UUID, argsJSON string) (tool.Request, tool.PreparedArtifact, error) + type Reader interface + Read func(cursor int64, maxBytes int) (data []byte, nextCursor int64, gap bool, err error) + type RestoreError struct + Err error + Handle Handle + func (e *RestoreError) Error() string + func (e *RestoreError) Unwrap() error + type RestoreReport struct + Errors []RestoreError + Reconciled []Handle + type Result struct + ExitCode *int + Reason string + func (r Result) Equal(other Result) bool + type SafeTextResult struct + Artifact Artifact + Binary bool + Gap bool + NextCursor int64 + Normalized bool + Output string + StartCursor int64 + func RenderSafeText(r Reader, handle Handle, cursor int64, maxBytes int, capBytes int64) (SafeTextResult, error) + type Spool struct + func OpenSpool(root string, h Handle, ceiling int64) (*Spool, error) + func (s *Spool) Append(data []byte) (int64, error) + func (s *Spool) Close() error + func (s *Spool) Read(cursor int64, maxBytes int) (data []byte, nextCursor int64, gap bool, err error) + func (s *Spool) Remove() error + func (s *Spool) RetainedFrom() int64 + func (s *Spool) TotalBytes() int64 + type SpoolCursors struct + RetainedFrom int64 + TotalBytes int64 + type State string + const StateExited + const StateFailed + const StateInterrupted + const StateKilled + const StateLostOnRestore + const StateRunning + const StateStarting + const StateTerminated + const StateTimedOut + func (s State) Terminal() bool + func (s State) Valid() bool + type StorageCeiling struct + InMemoryBytes int64 + SpoolBytes int64 + type Supervisor struct + func NewSupervisor(cfg Config, manifests *ManifestStore, spoolRoot string, ...) (*Supervisor, error) + func (s *Supervisor) Restore(ctx context.Context) (RestoreReport, error) + func (s *Supervisor) Shutdown(ctx context.Context) error + func (s *Supervisor) Start(ctx context.Context, owner Owner, origin Origin, prepared tool.PreparedProcess, ...) (Handle, error) + func (s *Supervisor) Wait(ctx context.Context, owner Owner, kind WaitKind, targets []WaitTarget) ([]WaitStatus, error) + type SupervisorResource struct + Manifests *ManifestStore + Supervisor *Supervisor + func (r *SupervisorResource) Activate(ctx context.Context, services tool.SessionResourceServices) error + func (r *SupervisorResource) Shutdown(ctx context.Context) error + type TerminalResultChangedError struct + Got Result + Had Result + Handle Handle + State State + func (e *TerminalResultChangedError) Error() string + type TransitionError struct + From State + To State + func (e *TransitionError) Error() string + type WaitKind string + const WaitAll + const WaitAny + const WaitPoll + func (k WaitKind) Valid() bool + type WaitStatus struct + Found bool + Generation uint64 + Handle Handle + Terminal bool + type WaitTarget struct + Generation uint64 + Handle Handle + type YieldSettings struct + Yield bool v0.10.2 Aug 12, 2026 v0.10.1 Aug 11, 2026 v0.10.0 Aug 11, 2026 v0.9.2 Aug 11, 2026 v0.9.1 Aug 11, 2026 v0.9.0 Aug 10, 2026 v0.8.0 Aug 7, 2026