Add agent run supervisor worker
Poll-based supervisor that claims PENDING agent runs with FOR UPDATE SKIP LOCKED, runs them with lease-based heartbeat, and handles graceful shutdown. On infrastructure stop the row stays RUNNING so stale recovery resets it to PENDING on restart; Restore picks up from the last checkpoint. Heartbeat loss cancels execution without committing a terminal status. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -35,7 +35,7 @@ type (
|
||||
// Approval-interrupted checkpoints carry pending tool calls.
|
||||
PendingToolCalls []llm.ToolCall `json:"pending_tool_calls,omitempty"`
|
||||
PendingApprovals []llm.ToolCall `json:"pending_approvals,omitempty"`
|
||||
ApprovalInput map[string]ApprovalResult `json:"approval_input,omitempty"`
|
||||
ApprovalInput map[string]ApprovalResult `json:"approval_input,omitempty"` // keyed by tool call ID
|
||||
|
||||
// Nested agent-as-tool suspension: one entry per suspended inner agent.
|
||||
AllToolCalls []llm.ToolCall `json:"all_tool_calls,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user