Repository navigation
v0.3.0: queue hardening
Queue hardening for overload and queued-not-started runs. Go module github.com/eadwinCode/agentic-kit/packages/go-agentenkit@v0.3.0, npm agentenkit@0.3.0 and use-agentenkit@0.3.0.
Breaking changes
ports.QueuegainedCancel,FindandStats; custom queue adapters must implement them (ErrUnsupportedis allowed forFindandStats).ports.KvgainedSetIfValue,DelIfValueandIncrWithExpiry; custom kv adapters must implement them.- A run is now
QUEUEDbetween enqueue and pickup. Anything that treatedRUNNINGas "accepted" (state filters, activity checks, UI labels) must includeQUEUED. The React hook and the TS types carry it. SettledAtis stamped only when the settle hook succeeded; a failed settle is retried bySettleLate.
Queue
- Depth cap (
MaxDepth,ErrQueueFull) on fresh dispatches only; payload, age, attempts and run-time limits; backoff between attempts; a drain onClose. - Namespace per deployment, fair claim across partition keys, priority, dedupe keys, job kinds, a logger.
- Dead letters with
DeadHandler,ListDead,Redrive,PurgeDead,Purge,Delete,Pause,Resume. - The Postgres consumer wakes on
NOTIFY; polling is a slow backstop.
Core
- Renewed run lock by compare-and-set; per-run counters with an expiry.
- Step, segment and queue-wait deadlines; retry backoff for runs.
BillingPreCheckat dispatch and at pickup with a lowerableRunBudget.ReclaimStuckRuns,HandleDeadJob,FailLostRun,SettleLate; unknown agents fail the run.- Keyed park expiries cancelled on answer; answers written once; cancelled contexts re-enqueue the run.
Full details in #9.