-- v1.1.1: per-route dispatch mode (design notes §2 + §3).
--
-- `sync` (default): orchestrator awaits the executor inline and
--   returns the response in the same HTTP request — current MVP
--   behaviour.
-- `async`: orchestrator writes the request to the trigger outbox,
--   returns `202 Accepted` immediately. The dispatcher runs the
--   script in the background and surfaces failures via the
--   retry / dead-letter machinery — same shape as any other async
--   event.
--
-- Existing routes default to `sync` so the migration is non-breaking.

ALTER TABLE routes
    ADD COLUMN dispatch_mode TEXT NOT NULL DEFAULT 'sync'
        CHECK (dispatch_mode IN ('sync', 'async'));
