Versions in this module Expand all Collapse all v0 v0.31.0 Oct 25, 2026 Changes in this version type Record + CaptureEpoch string + CaptureEpochObservedAt *time.Time type StatusView + CaptureEpoch string + CaptureEpochObservedAt *time.Time type Supervisor + func (s *Supervisor) ReadCaptureEpoch() (string, error) v0.30.0 Oct 23, 2026 v0.29.1 Oct 21, 2026 v0.29.0 Oct 21, 2026 Changes in this version + const CallbackAbandoned + const CallbackAcked + const CallbackRejected + const CallbackSkipped + const CredentialHeld + const CredentialMissing + const CredentialNone + const DefaultMaxRuntime + const EndAbandoned + const EndAcked + const EndRejected + const EndSkipped + const LabelDigest + const LabelGeneration + const LabelInstall + const LabelPod + const LabelPodNS + const LabelRole + const LabelRunID + const LabelRunKey + const LabelTemplate + const LabelTemplateID + const ProofCllamaAck + const ProofProxyStopped + const ProtocolVersion + const ReasonAuthorityExpired + const ReasonContainerMissing + const ReasonDuplicate + const ReasonExitNonZero + const ReasonMismatch + const ReasonResultMissing + const ReasonSpawnError + const ReasonTimeout + const RevocationDirName + const RoleRunWorker + const SocketName + const StateDirName + var ErrAuthority = errors.New("orchestrator authority rejected") + var ErrPodLocked = errors.New("pod run lock is held by another process") + func CheckSocketDir(dir string, uid uint32) error + func EnsurePrivateDir(path string) error + func HasLiveRuns(podDir string) (bool, error) + func ListTemplates(podDir string) ([]string, error) + func LoadTemplate(podDir, name string) (*Template, *ContextTemplate, error) + func PodNamespace(podDir string) string + func RunPath(k Key, suffix string) string + func TemplateDir(podDir string) string + func WriteTemplates(podDir string, templates []*Template, contexts map[string]*ContextTemplate) error + type APIError struct + Code string + Message string + Status int + func (e *APIError) Error() string + type Callbacks struct + End string + LastHeartbeat *time.Time + Start string + type Client struct + func Dial(dir string, serverUID uint32) (*Client, error) + func (c *Client) Do(ctx context.Context, method, path string, body any, out any) error + type CllamaRevoker struct + Client *http.Client + PodDir string + func (r *CllamaRevoker) Revoke(ctx context.Context, agentID string, generation uint64) error + type Config struct + Executor Executor + HeartbeatInterval time.Duration + Logf func(format string, args ...any) + Notifier Notifier + Now func() time.Time + PodDir string + Revoker Revoker + type Container struct + ExitCode int + Exited bool + ID string + ImageID string + Labels map[string]string + Running bool + type ContextTemplate struct + Input cllama.AgentContextInput + type DockerExecutor struct + Hold *os.File + Logf func(format string, args ...any) + func NewDockerExecutor() (*DockerExecutor, error) + func (d *DockerExecutor) Close() error + func (d *DockerExecutor) Containers(ctx context.Context, keyHash string) ([]Container, error) + func (d *DockerExecutor) Down(ctx context.Context, project, file string) error + func (d *DockerExecutor) RunWorkers(ctx context.Context, podNS string) ([]Container, error) + func (d *DockerExecutor) Stdout(ctx context.Context, containerID string, limit int) ([]byte, bool, error) + func (d *DockerExecutor) Up(ctx context.Context, project, file string, env map[string]string) error + type Executor interface + Containers func(ctx context.Context, keyHash string) ([]Container, error) + Down func(ctx context.Context, project, file string) error + Stdout func(ctx context.Context, containerID string, limit int) ([]byte, bool, error) + Up func(ctx context.Context, project, file string, env map[string]string) error + type ExitInfo struct + At time.Time + Code int + type HTTPNotifier struct + Client *http.Client + MaxSummary int + Origin *url.URL + PathTemplate string + func NewHTTPNotifier(origin, pathTemplate string) (*HTTPNotifier, error) + func (n *HTTPNotifier) Ended(ctx context.Context, rec *Record, credential, outcome, reason string, ...) error + func (n *HTTPNotifier) Heartbeat(ctx context.Context, rec *Record, credential string) error + func (n *HTTPNotifier) Started(ctx context.Context, rec *Record, credential string) error + type Key struct + Installation string + RunID string + func (k Key) Hash() string + func (k Key) RunKey(podNS string) string + func (k Key) Validate() error + type LaunchRequest struct + AuthorityExpiresAt time.Time + Credential string + Generation uint64 + Key Key + Spec json.RawMessage + SpecDigest string + type Ledger struct + func OpenLedger(podDir string) (*Ledger, error) + func (l *Ledger) All() ([]*Record, error) + func (l *Ledger) DeleteSecret(k Key, kind string) error + func (l *Ledger) Get(k Key) (*Record, error) + func (l *Ledger) Put(rec *Record) error + func (l *Ledger) PutSecret(k Key, kind, value string) error + func (l *Ledger) PutTombstone(k Key, generation uint64) error + func (l *Ledger) Secret(k Key, kind string) (string, bool, error) + func (l *Ledger) Tombstone(k Key) (uint64, bool, error) + type Limits struct + MaxAuthoritySeconds int64 + MaxResultBytes int + MaxRuntimeSeconds int64 + MaxTaskBytes int + Memory string + Pids int + func (l Limits) MaxAuthority() time.Duration + func (l Limits) MaxRuntime() time.Duration + type Notifier interface + Ended func(ctx context.Context, rec *Record, credential string, outcome, reason string, ...) error + Heartbeat func(ctx context.Context, rec *Record, credential string) error + Started func(ctx context.Context, rec *Record, credential string) error + type PodLock struct + func AcquirePodLock(podDir string) (*PodLock, error) + func (l *PodLock) File() *os.File + func (l *PodLock) Release() error + type Record struct + AuthorityExpiresAt time.Time + Callbacks Callbacks + Cancelled bool + Credential string + Deadline *time.Time + Exit *ExitInfo + Failure string + Generation uint64 + ImageID string + Key Key + LastError string + Project string + Result *ResultInfo + RevocationProof string + Revoked bool + RunAgentID string + RunKey string + SpawnAttempted bool + Spec *Spec + SpecDigest string + State State + TemplateID string + Timestamps Timestamps + Version int + type ResultInfo struct + Bytes int + Truncated bool + type Revoker interface + Revoke func(ctx context.Context, agentID string, generation uint64) error + type Server struct + AllowedUID []uint32 + Logf func(string, ...any) + Pod string + Sup *Supervisor + func (srv *Server) Handler() http.Handler + func (srv *Server) Listen(ctx context.Context, dir string) error + type Spec struct + MaxRuntimeSeconds int64 + Task string + Template string + Tools []string + func CanonicalSpec(raw json.RawMessage) ([]byte, *Spec, string, error) + type State string + const StateAccepted + const StateFailed + const StateRevoked + const StateRevoking + const StateRunning + const StateStopped + func (s State) Terminal() bool + type StatusView struct + AuthorityExpiresAt *time.Time + Callbacks Callbacks + Cancelled bool + Credential string + Deadline *time.Time + ExitCode *int + Failure string + Generation uint64 + Installation string + Pending string + Result *ResultInfo + RevocationProof string + Revoked bool + RunAgentID string + RunID string + SpecDigest string + State State + Template string + Timestamps Timestamps + type Supervisor struct + func NewSupervisor(cfg Config) (*Supervisor, error) + func (s *Supervisor) Advance(ctx context.Context, k Key) + func (s *Supervisor) AdvanceAll(ctx context.Context) + func (s *Supervisor) Cancel(ctx context.Context, k Key, generation uint64) (*Record, error) + func (s *Supervisor) CheckRevocationSupport(ctx context.Context) error + func (s *Supervisor) FinalizeWithoutProxy(ctx context.Context, k Key, proxyGone func(context.Context) (bool, error)) error + func (s *Supervisor) Get(k Key) (*Record, error) + func (s *Supervisor) Launch(ctx context.Context, req LaunchRequest) (*Record, bool, error) + func (s *Supervisor) LiveKeys() ([]Key, error) + func (s *Supervisor) Orphans(ctx context.Context) ([]Container, error) + func (s *Supervisor) RemoveOrphan(ctx context.Context, c Container) error + func (s *Supervisor) ReplaceCredential(ctx context.Context, k Key, generation uint64, credential string, ...) (*Record, error) + func (s *Supervisor) Result(k Key) ([]byte, *Record, error) + func (s *Supervisor) Run(ctx context.Context, interval time.Duration) + func (s *Supervisor) Wait(ctx context.Context, k Key) + type Template struct + ClawType string + CllamaAPIURL string + CllamaURL string + ContextDigest string + ID string + ImageID string + ImageRef string + Limits Limits + Name string + Pod string + RunNetwork string + ToolsGrant []string + Version int + Worker driver.RunWorkerSpec + type Timestamps struct + Accepted *time.Time + Revoked *time.Time + Running *time.Time + Stopped *time.Time + type WorkerLister interface + RunWorkers func(ctx context.Context, podNS string) ([]Container, error)