pr_01m47d24b0e6n91zwymwxg0vpx/services/work/migrations/0020_agent_waits.sql

12 lines490 bytesCodeBlame
1-- Runs people asked for while every agent slot of their workspace was
2-- busy (its plan's agents-at-once cap). The runner starts them, oldest
3-- first, as slots free up; `payload` is what it needs to, kept as given.
4CREATE TABLE agent_waits (
5 id TEXT PRIMARY KEY,
6 workspace TEXT NOT NULL,
7 -- review, update, plan, reply, revise
8 kind TEXT NOT NULL,
9 payload TEXT NOT NULL,
10 created_at TEXT NOT NULL
11);
12CREATE INDEX agent_waits_by_workspace ON agent_waits (workspace, created_at);