Versions in this module Expand all Collapse all v0 v0.2.3 Apr 3, 2026 v0.2.2 Apr 3, 2026 v0.2.1 Apr 3, 2026 v0.2.0 Apr 3, 2026 Changes in this version + const MaxTerminalChunkSize + var ErrStreamClosed = errors.New("rpc stream closed") + type AgentEventEnvelope struct + Event agent.AgentEvent + SessionID string + type AgentEventReceiver interface + Close func() error + Recv func() (*AgentEventEnvelope, error) + func NewAgentEventReceiver(ch <-chan *AgentEventEnvelope, closeFn func() error) AgentEventReceiver + type AgentEventSender interface + Close func() error + Send func(*AgentEventEnvelope) error + type AgentEventService interface + StreamAgentEvents func(ctx context.Context, req *StreamAgentEventsRequest) (AgentEventReceiver, error) + type Capabilities struct + Pause bool + Rollback bool + Snapshots bool + StreamingProgress bool + TierRouting bool + type ContentBlock struct + ImageData string + ImageMimeType string + Redacted bool + Text string + TextSignature string + Thinking string + ThinkingSignature string + ThoughtSignature string + ToolCallArguments map[string]any + ToolCallID string + ToolCallName string + Type string + type CreateSessionRequest struct + BaseSnapshot string + Labels map[string]string + Quota int64 + SessionID string + type CreateSessionResponse struct + ServerCapabilities Capabilities + Session *Session + type CreateSnapshotRequest struct + Name string + SessionID string + type CreateSnapshotResponse struct + SnapshotID string + SpaceUsed int64 + TurnNumber int + type DestroySessionRequest struct + SessionID string + type DestroySessionResponse struct + type ExecuteToolRequest struct + Params map[string]any + Resources *ResourceSpec + SessionID string + ToolCallID string + ToolName string + type ExecuteToolResponse struct + Content string + ContentBlocks []ContentBlock + Duration time.Duration + ExitCode *int + SessionID string + SnapshotID string + Tier int + ToolCallID string + ToolName string + type ExecuteToolStreamMessage struct + Progress *ToolProgress + Response *ExecuteToolResponse + type ExecuteToolStreamReceiver interface + Close func() error + Recv func() (*ExecuteToolStreamMessage, error) + func NewExecuteToolStream(messages ...*ExecuteToolStreamMessage) ExecuteToolStreamReceiver + func NewExecuteToolStreamChannel(ch <-chan *ExecuteToolStreamMessage, closeFn func() error) ExecuteToolStreamReceiver + func NewExecuteToolStreamChannelWithErr(ch <-chan *ExecuteToolStreamMessage, errCh <-chan error, closeFn func() error) ExecuteToolStreamReceiver + type GetProcessStatusRequest struct + ProcessID string + SessionID string + type GetProcessStatusResponse struct + ExitCode *int + Status ProcessStatus + type GetSessionRequest struct + SessionID string + type GetSessionResponse struct + Session *Session + type HealthCheckRequest struct + type HealthCheckResponse struct + ActiveTools int + Errors []string + PoolState string + SessionCount int + Status string + Uptime time.Duration + type KillProcessRequest struct + ProcessID string + SessionID string + Signal int + type KillProcessResponse struct + type LaunchProcessRequest struct + Args []string + Binary string + Env map[string]string + ExposePort int + SessionID string + type LaunchProcessResponse struct + Address string + ProcessID string + Status ProcessStatus + type ListSnapshotsRequest struct + SessionID string + type ListSnapshotsResponse struct + Snapshots []Snapshot + type PauseSessionRequest struct + SessionID string + type PauseSessionResponse struct + type ProcessStatus string + const ProcessStatusExited + const ProcessStatusRunning + const ProcessStatusStarting + type ResourceSpec struct + CPUs float64 + MemMB int + type ResumeSessionRequest struct + SessionID string + type ResumeSessionResponse struct + type RollbackSessionRequest struct + SessionID string + SnapshotID string + type RollbackSessionResponse struct + type SandboxService interface + CreateSession func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) + CreateSnapshot func(ctx context.Context, req *CreateSnapshotRequest) (*CreateSnapshotResponse, error) + DestroySession func(ctx context.Context, req *DestroySessionRequest) (*DestroySessionResponse, error) + ExecuteTool func(ctx context.Context, req *ExecuteToolRequest) (*ExecuteToolResponse, error) + ExecuteToolStream func(ctx context.Context, req *ExecuteToolRequest) (ExecuteToolStreamReceiver, error) + GetProcessStatus func(ctx context.Context, req *GetProcessStatusRequest) (*GetProcessStatusResponse, error) + GetSession func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) + HealthCheck func(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error) + KillProcess func(ctx context.Context, req *KillProcessRequest) (*KillProcessResponse, error) + LaunchProcess func(ctx context.Context, req *LaunchProcessRequest) (*LaunchProcessResponse, error) + ListSnapshots func(ctx context.Context, req *ListSnapshotsRequest) (*ListSnapshotsResponse, error) + PauseSession func(ctx context.Context, req *PauseSessionRequest) (*PauseSessionResponse, error) + ResumeSession func(ctx context.Context, req *ResumeSessionRequest) (*ResumeSessionResponse, error) + RollbackSession func(ctx context.Context, req *RollbackSessionRequest) (*RollbackSessionResponse, error) + TurnComplete func(ctx context.Context, req *TurnCompleteRequest) (*TurnCompleteResponse, error) + type Session struct + Created time.Time + ID string + Labels map[string]string + Mountpoint string + SnapCount int + SpaceUsed int64 + State string + TurnCount int + type Snapshot struct + CreatedAt time.Time + Dataset string + Holds int + Name string + Refer int64 + Used int64 + type StreamAgentEventsRequest struct + SessionID string + type StreamTerminalRequest struct + SessionID string + type TerminalAttached struct + Cols int + Rows int + Scrollback []byte + type TerminalClientMessage struct + Input *TerminalInput + Resize *TerminalResize + type TerminalDetached struct + Reason string + type TerminalInput struct + Data []byte + type TerminalOutput struct + Data []byte + type TerminalResize struct + Cols int + Rows int + type TerminalServerMessage struct + Attached *TerminalAttached + Detached *TerminalDetached + Output *TerminalOutput + type TerminalService interface + StreamTerminal func(ctx context.Context, req *StreamTerminalRequest) (TerminalStreamHandle, error) + type TerminalStreamHandle interface + Close func() error + Recv func() (*TerminalServerMessage, error) + Send func(*TerminalClientMessage) error + func NewTerminalStreamHandle(toClient <-chan *TerminalServerMessage, ...) TerminalStreamHandle + type ToolProgress struct + Content string + IsError bool + type TurnCompleteRequest struct + SessionID string + type TurnCompleteResponse struct + SnapshotID string + SpaceUsed int64 + TurnNumber int