Files
Assistant/modules/work/ports/worker.go
m 284ea88553
CI / test (push) Failing after 33s
CI / test (pull_request) Failing after 42s
feat(work): make agent execution recovery durable
2026-08-23 13:10:18 +03:00

21 lines
624 B
Go

package ports
import (
"context"
"errors"
"time"
"git.cin.su/m/Assistant/contracts/work"
)
var ErrAgentExecutorUnavailable = errors.New("agent executor unavailable")
type WorkerStore interface {
ExecutionStore
LoadDispatchIntent(context.Context, string) (work.AgentDispatchIntent, error)
ClaimNextDispatch(context.Context, string, int64) (work.AgentDispatchQueueItem, error)
CompleteDispatch(context.Context, string, string, work.AgentDispatchQueueState, int64) error
RetryDispatch(context.Context, string, string, int64, time.Duration) error
RecoverStaleClaims(context.Context, int64, int64) (int64, error)
}