import Database from 'better-sqlite3'; export declare const CREATE_QUEUE_ITEMS_TABLE = "\n CREATE TABLE IF NOT EXISTS queue_items (\n id TEXT PRIMARY KEY,\n session_id TEXT NOT NULL,\n session_key TEXT NOT NULL,\n prompt TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'pending',\n internal INTEGER NOT NULL DEFAULT 0,\n position INTEGER NOT NULL DEFAULT 0,\n created_at TEXT NOT NULL,\n started_at TEXT,\n completed_at TEXT,\n message_id TEXT,\n dispatch_payload TEXT\n );\n CREATE INDEX IF NOT EXISTS idx_queue_session\n ON queue_items (session_key, status, position);\n "; /** * Additive migration for restart-safe system work. Internal queue rows use the * same durable ordering/replay machinery as user messages, but stay out of the * operator-facing queue panel and its cancel/clear controls. * * `dedupe_key` is the durable identity of an agent-initiated send: a replayed * tool call collides on the unique index instead of minting a second row (and * with it a second engine turn). The index is partial on `status` as well as on * the key, so identity only binds while the send is unsettled — once the first * row completes, a genuinely repeated later send is a new intent and enqueues * normally. * * `message_id` links a parked row to the transcript row the operator can see, * so the chat can tell which of its own bubbles are still waiting and edit the * two together. Null on every row enqueued by a path that has no message. * * `dispatch_payload` holds the rest of what the turn runs on - its attachments * and whether its text was spoken. Those used to live only in the dispatch * closure, which is wrong the moment "send this one now" moves a payload onto a * different row: the text would arrive with the other message's attachments. * Null whenever there is nothing extra to carry, which is most rows. */ export declare function migrateQueueItemsSchema(database: Database.Database): void; //# sourceMappingURL=queue-items-schema.d.ts.map