Versions in this module Expand all Collapse all v1 v1.0.5 Aug 22, 2026 v1.0.4 Aug 22, 2026 Changes in this version + const BodyActiveKeyEnvironment + const BodyKeysEnvironment + func BodyKeyRingFromEnvironment(getenv func(string) string) (securebody.KeyRing, error) + func SupavisorTransactionConfig(databaseURL string) (*pgxpool.Config, error) + type SharedPool struct + func NewSharedPool(pool *pgxpool.Pool) (*SharedPool, error) + func NewSharedPoolWithKeyRing(pool *pgxpool.Pool, ring securebody.KeyRing) (*SharedPool, error) + func OpenSharedPool(ctx context.Context, databaseURL string) (*SharedPool, error) + func OpenSharedPoolWithKeyRing(ctx context.Context, databaseURL string, ring securebody.KeyRing) (*SharedPool, error) + func (pool *SharedPool) AcceptAgentRebind(ctx context.Context, command ledger.AcceptAgentRebindCommand) (ledger.AgentBindingAdvanceResult, error) + func (pool *SharedPool) AcknowledgeWorkerCancellation(ctx context.Context, command controlapi.WorkerCancellationAckCommand) (controlapi.WorkerCancellationAck, error) + func (pool *SharedPool) AdvanceRoutineRun(ctx context.Context, command ledger.AdvanceRoutineRunCommand) (ledger.RoutineRunRecord, error) + func (pool *SharedPool) AppendAgentBehavior(ctx context.Context, command ledger.AppendAgentBehaviorCommand) (ledger.AgentBindingAdvanceResult, error) + func (pool *SharedPool) AppendAgentProfile(ctx context.Context, command ledger.AppendAgentProfileCommand) (ledger.AgentRecord, error) + func (pool *SharedPool) AppendWorkerArtifactChunk(ctx context.Context, command controlapi.WorkerArtifactChunkCommand) (controlapi.WorkerArtifactChunk, error) + func (pool *SharedPool) CancelAgentTarget(ctx context.Context, command ledger.CancelAgentTargetCommand) (ledger.AgentConversationTarget, error) + func (pool *SharedPool) CancelHandoff(ctx context.Context, command ledger.CancelHandoffCommand) (ledger.HandoffRecord, error) + func (pool *SharedPool) Claim(ctx context.Context, accountID, keyID, nonce string, expiresAt time.Time) (bool, error) + func (pool *SharedPool) ClaimNextWorkerTarget(ctx context.Context, command controlapi.WorkerClaimNextCommand) (controlapi.WorkerAssignment, error) + func (pool *SharedPool) ClaimWorkerTarget(ctx context.Context, command controlapi.WorkerClaimCommand) (controlapi.WorkerAssignment, error) + func (pool *SharedPool) Close() error + func (pool *SharedPool) CommitWorkerTerminal(ctx context.Context, command controlapi.WorkerTerminalCommand) (controlapi.WorkerTerminalResult, error) + func (pool *SharedPool) CreateAgent(ctx context.Context, command ledger.CreateAgentCommand) (ledger.AgentRecord, error) + func (pool *SharedPool) CreateGroup(ctx context.Context, command ledger.CreateGroupCommand) (ledger.GroupRecord, error) + func (pool *SharedPool) CreateHumanHandoff(ctx context.Context, command ledger.CreateHumanHandoffCommand) (ledger.HandoffRecord, error) + func (pool *SharedPool) CreateRoutine(ctx context.Context, command ledger.CreateRoutineCommand) (ledger.RoutineRecord, error) + func (pool *SharedPool) CreateSecondaryConversation(ctx context.Context, command ledger.CreateSecondaryConversationCommand) (ledger.AgentConversationRecord, error) + func (pool *SharedPool) CreateWorkerArtifact(ctx context.Context, command controlapi.WorkerArtifactCreateCommand) (controlapi.WorkerArtifact, error) + func (pool *SharedPool) EnqueueRoutineOccurrence(ctx context.Context, command ledger.EnqueueRoutineOccurrenceCommand) (ledger.RoutineRunRecord, error) + func (pool *SharedPool) FinalizeWorkerArtifact(ctx context.Context, command controlapi.WorkerArtifactFinalizeCommand) (controlapi.WorkerArtifact, error) + func (pool *SharedPool) ForAccount(accountID string) (*Store, error) + func (pool *SharedPool) GetAgent(ctx context.Context, accountID, agentID string) (ledger.AgentRecord, error) + func (pool *SharedPool) GetGroup(ctx context.Context, accountID, groupID string) (ledger.GroupRecord, error) + func (pool *SharedPool) GetHandoff(ctx context.Context, accountID, handoffID string) (ledger.HandoffRecord, error) + func (pool *SharedPool) GetRoutine(ctx context.Context, accountID, routineID string) (ledger.RoutineRecord, error) + func (pool *SharedPool) GetRoutineRun(ctx context.Context, accountID, runID string) (ledger.RoutineRunRecord, error) + func (pool *SharedPool) GetWorkerArtifactStatus(ctx context.Context, command controlapi.WorkerArtifactStatusCommand) (controlapi.WorkerArtifact, error) + func (pool *SharedPool) HeartbeatWorkerLease(ctx context.Context, command controlapi.WorkerLeaseHeartbeatCommand) (controlapi.WorkerLeaseHeartbeatResult, error) + func (pool *SharedPool) ImportSourceRoutine(ctx context.Context, command ledger.ImportRoutineCommand) (ledger.RoutineRecord, error) + func (pool *SharedPool) ListAgentConversations(ctx context.Context, accountID, agentID string) ([]ledger.AgentConversationRecord, error) + func (pool *SharedPool) ListAgents(ctx context.Context, accountID string, state conversation.AgentState) ([]ledger.AgentRecord, error) + func (pool *SharedPool) ListGroupMessages(ctx context.Context, accountID, groupID string) ([]ledger.AgentConversationMessage, error) + func (pool *SharedPool) ListGroupTurns(ctx context.Context, accountID, groupID string) ([]ledger.GroupTurnRecord, error) + func (pool *SharedPool) ListGroups(ctx context.Context, accountID string, state conversation.ConversationState) ([]ledger.GroupRecord, error) + func (pool *SharedPool) ListHandoffs(ctx context.Context, accountID string) ([]ledger.HandoffRecord, error) + func (pool *SharedPool) ListRoutineRuns(ctx context.Context, accountID, routineID string) ([]ledger.RoutineRunRecord, error) + func (pool *SharedPool) ListRoutines(ctx context.Context, accountID, agentID string) ([]ledger.RoutineRecord, error) + func (pool *SharedPool) ListSourceRoutineProjections(ctx context.Context, accountID, executionSourceID string) ([]ledger.SourceRoutineProjection, error) + func (pool *SharedPool) MachineCredential(ctx context.Context, accountID, workerID, machineID string) (controlapi.MachineCredential, error) + func (pool *SharedPool) PreviewAgentRebind(ctx context.Context, command ledger.PreviewAgentRebindCommand) (ledger.AgentRebindPreview, error) + func (pool *SharedPool) ReadAgentConversation(ctx context.Context, accountID, agentID, conversationID string) (ledger.AgentConversationProjection, error) + func (pool *SharedPool) ReadCursorPage(ctx context.Context, accountID, afterCursor string) (controlapi.CursorPage, error) + func (pool *SharedPool) ReadWorkerContextPage(ctx context.Context, command controlapi.WorkerContextPageCommand) (controlapi.WorkerContextPage, error) + func (pool *SharedPool) RecordSourceRoutineProjection(ctx context.Context, projection ledger.SourceRoutineProjection) (ledger.SourceRoutineProjection, error) + func (pool *SharedPool) RecordWorkerReadiness(ctx context.Context, command controlapi.WorkerReadinessCommand) (controlapi.WorkerReadinessResult, error) + func (pool *SharedPool) RenameAgentConversation(ctx context.Context, command ledger.RenameAgentConversationCommand) (ledger.AgentConversationRecord, error) + func (pool *SharedPool) RenameGroup(ctx context.Context, command ledger.RenameGroupCommand) (ledger.GroupRecord, error) + func (pool *SharedPool) ReplaceGroupMembers(ctx context.Context, command ledger.ReplaceGroupMembersCommand) (ledger.GroupRecord, error) + func (pool *SharedPool) RetryAgentTarget(ctx context.Context, command ledger.RetryAgentTargetCommand) (ledger.AgentConversationTarget, error) + func (pool *SharedPool) RevalidateRoutine(ctx context.Context, command ledger.RevalidateRoutineCommand) (ledger.RoutineRecord, error) + func (pool *SharedPool) SendAgentTurn(ctx context.Context, command ledger.SendAgentTurnCommand) (ledger.AgentTurnDispatch, error) + func (pool *SharedPool) SendGroupTurn(ctx context.Context, command ledger.SendGroupTurnCommand) (ledger.GroupTurnRecord, error) + func (pool *SharedPool) SetAgentConversationPin(ctx context.Context, command ledger.SetAgentConversationPinCommand) (ledger.AgentConversationRecord, error) + func (pool *SharedPool) SetAgentConversationState(ctx context.Context, command ledger.SetAgentConversationStateCommand) (ledger.AgentConversationRecord, error) + func (pool *SharedPool) SetGroupState(ctx context.Context, command ledger.SetGroupStateCommand) (ledger.GroupRecord, error) + func (pool *SharedPool) WithScheduleTick(ctx context.Context, accountID, schedulerID string, ...) (bool, error) + type Store struct + func New(pool *pgxpool.Pool, accountID string) (*Store, error) + func NewWithKeyRing(pool *pgxpool.Pool, accountID string, ring securebody.KeyRing) (*Store, error) + func Open(ctx context.Context, databaseURL, accountID string) (*Store, error) + func OpenWithKeyRing(ctx context.Context, databaseURL, accountID string, ring securebody.KeyRing) (*Store, error) + func (store *Store) AcceptAgentRebind(ctx context.Context, command ledger.AcceptAgentRebindCommand) (ledger.AgentBindingAdvanceResult, error) + func (store *Store) AcceptHandoff(ctx context.Context, command ledger.AcceptHandoffCommand) (ledger.HandoffRecord, error) + func (store *Store) AcknowledgeWorkerCancellation(ctx context.Context, command controlapi.WorkerCancellationAckCommand) (controlapi.WorkerCancellationAck, error) + func (store *Store) AdvanceRoutineRun(ctx context.Context, command ledger.AdvanceRoutineRunCommand) (ledger.RoutineRunRecord, error) + func (store *Store) AppendAgentBehavior(ctx context.Context, command ledger.AppendAgentBehaviorCommand) (ledger.AgentBindingAdvanceResult, error) + func (store *Store) AppendAgentProfile(ctx context.Context, command ledger.AppendAgentProfileCommand) (ledger.AgentRecord, error) + func (store *Store) AppendWorkerArtifactChunk(ctx context.Context, command controlapi.WorkerArtifactChunkCommand) (controlapi.WorkerArtifactChunk, error) + func (store *Store) CancelAgentTarget(ctx context.Context, command ledger.CancelAgentTargetCommand) (ledger.AgentConversationTarget, error) + func (store *Store) CancelHandoff(ctx context.Context, command ledger.CancelHandoffCommand) (ledger.HandoffRecord, error) + func (store *Store) Claim(ctx context.Context, accountID, keyID, nonce string, expiresAt time.Time) (bool, error) + func (store *Store) ClaimNextWorkerTarget(ctx context.Context, next controlapi.WorkerClaimNextCommand) (controlapi.WorkerAssignment, error) + func (store *Store) ClaimWorkerTarget(ctx context.Context, command controlapi.WorkerClaimCommand) (controlapi.WorkerAssignment, error) + func (store *Store) Close() error + func (store *Store) CommitWorkerTerminal(ctx context.Context, command controlapi.WorkerTerminalCommand) (controlapi.WorkerTerminalResult, error) + func (store *Store) CompleteHandoff(ctx context.Context, command ledger.CompleteHandoffCommand) (ledger.HandoffRecord, error) + func (store *Store) CreateAgent(ctx context.Context, command ledger.CreateAgentCommand) (ledger.AgentRecord, error) + func (store *Store) CreateGroup(ctx context.Context, command ledger.CreateGroupCommand) (ledger.GroupRecord, error) + func (store *Store) CreateHumanHandoff(ctx context.Context, command ledger.CreateHumanHandoffCommand) (ledger.HandoffRecord, error) + func (store *Store) CreateRoutine(ctx context.Context, command ledger.CreateRoutineCommand) (ledger.RoutineRecord, error) + func (store *Store) CreateSecondaryConversation(ctx context.Context, command ledger.CreateSecondaryConversationCommand) (ledger.AgentConversationRecord, error) + func (store *Store) CreateWorkerArtifact(ctx context.Context, command controlapi.WorkerArtifactCreateCommand) (controlapi.WorkerArtifact, error) + func (store *Store) EnqueueRoutineOccurrence(ctx context.Context, command ledger.EnqueueRoutineOccurrenceCommand) (ledger.RoutineRunRecord, error) + func (store *Store) FinalizeWorkerArtifact(ctx context.Context, command controlapi.WorkerArtifactFinalizeCommand) (controlapi.WorkerArtifact, error) + func (store *Store) GetAgent(ctx context.Context, accountID, agentID string) (ledger.AgentRecord, error) + func (store *Store) GetGroup(ctx context.Context, accountID, groupID string) (ledger.GroupRecord, error) + func (store *Store) GetHandoff(ctx context.Context, accountID, handoffID string) (ledger.HandoffRecord, error) + func (store *Store) GetRoutine(ctx context.Context, accountID, routineID string) (ledger.RoutineRecord, error) + func (store *Store) GetRoutineRun(ctx context.Context, accountID, runID string) (ledger.RoutineRunRecord, error) + func (store *Store) GetWorkerArtifactStatus(ctx context.Context, command controlapi.WorkerArtifactStatusCommand) (controlapi.WorkerArtifact, error) + func (store *Store) HeartbeatWorkerLease(ctx context.Context, command controlapi.WorkerLeaseHeartbeatCommand) (controlapi.WorkerLeaseHeartbeatResult, error) + func (store *Store) ImportSourceRoutine(ctx context.Context, command ledger.ImportRoutineCommand) (ledger.RoutineRecord, error) + func (store *Store) LatestExecutionSourceConfigObservation(ctx context.Context, accountID, executionSourceID string) (ledger.ExecutionSourceConfigObservation, error) + func (store *Store) ListAgentConversations(ctx context.Context, accountID, agentID string) ([]ledger.AgentConversationRecord, error) + func (store *Store) ListAgents(ctx context.Context, accountID string, state conversation.AgentState) ([]ledger.AgentRecord, error) + func (store *Store) ListGroupMessages(ctx context.Context, accountID, groupID string) ([]ledger.AgentConversationMessage, error) + func (store *Store) ListGroupTurns(ctx context.Context, accountID, groupID string) ([]ledger.GroupTurnRecord, error) + func (store *Store) ListGroups(ctx context.Context, accountID string, state conversation.ConversationState) ([]ledger.GroupRecord, error) + func (store *Store) ListHandoffs(ctx context.Context, accountID string) ([]ledger.HandoffRecord, error) + func (store *Store) ListRoutineRuns(ctx context.Context, accountID, routineID string) ([]ledger.RoutineRunRecord, error) + func (store *Store) ListRoutines(ctx context.Context, accountID, agentID string) ([]ledger.RoutineRecord, error) + func (store *Store) ListSourceRoutineProjections(ctx context.Context, accountID, executionSourceID string) ([]ledger.SourceRoutineProjection, error) + func (store *Store) MachineCredential(ctx context.Context, accountID, workerID, machineID string) (controlapi.MachineCredential, error) + func (store *Store) ObserveExecutionSourceConfig(ctx context.Context, command ledger.ObserveExecutionSourceConfigCommand) (ledger.ExecutionSourceConfigObservation, error) + func (store *Store) PreviewAgentRebind(ctx context.Context, command ledger.PreviewAgentRebindCommand) (ledger.AgentRebindPreview, error) + func (store *Store) ReadAgentConversation(ctx context.Context, accountID, agentID, conversationID string) (ledger.AgentConversationProjection, error) + func (store *Store) ReadCursorPage(ctx context.Context, accountID, afterCursor string) (controlapi.CursorPage, error) + func (store *Store) ReadWorkerContextPage(ctx context.Context, command controlapi.WorkerContextPageCommand) (controlapi.WorkerContextPage, error) + func (store *Store) RecordSourceRoutineProjection(ctx context.Context, projection ledger.SourceRoutineProjection) (ledger.SourceRoutineProjection, error) + func (store *Store) RecordWorkerReadiness(ctx context.Context, command controlapi.WorkerReadinessCommand) (controlapi.WorkerReadinessResult, error) + func (store *Store) RenameAgentConversation(ctx context.Context, command ledger.RenameAgentConversationCommand) (ledger.AgentConversationRecord, error) + func (store *Store) RenameGroup(ctx context.Context, command ledger.RenameGroupCommand) (ledger.GroupRecord, error) + func (store *Store) ReplaceGroupMembers(ctx context.Context, command ledger.ReplaceGroupMembersCommand) (ledger.GroupRecord, error) + func (store *Store) RetryAgentTarget(ctx context.Context, command ledger.RetryAgentTargetCommand) (ledger.AgentConversationTarget, error) + func (store *Store) RevalidateRoutine(ctx context.Context, command ledger.RevalidateRoutineCommand) (ledger.RoutineRecord, error) + func (store *Store) SendAgentTurn(ctx context.Context, command ledger.SendAgentTurnCommand) (ledger.AgentTurnDispatch, error) + func (store *Store) SendGroupTurn(ctx context.Context, command ledger.SendGroupTurnCommand) (ledger.GroupTurnRecord, error) + func (store *Store) SetAgentConversationPin(ctx context.Context, command ledger.SetAgentConversationPinCommand) (ledger.AgentConversationRecord, error) + func (store *Store) SetAgentConversationState(ctx context.Context, command ledger.SetAgentConversationStateCommand) (ledger.AgentConversationRecord, error) + func (store *Store) SetGroupState(ctx context.Context, command ledger.SetGroupStateCommand) (ledger.GroupRecord, error) + func (store *Store) StartHandoff(ctx context.Context, command ledger.StartHandoffCommand) (ledger.HandoffRecord, error) + func (store *Store) WithScheduleTick(ctx context.Context, accountID, schedulerID string, ...) (bool, error)