-- Operator-only approval flag on task_scope rows. -- Agent-added (add_task_scope) and auto-added (insert_assets) rows remain -- coverage-only (approved_by_operator=false) and never grant sandbox egress. ALTER TABLE task_scope ADD COLUMN IF NOT EXISTS approved_by_operator BOOLEAN NOT NULL DEFAULT FALSE; -- Backfill existing operator-entered ('manual') task_scope rows so upgraded -- tasks retain sandbox egress; goal-derived/agent ('agent') and 'auto' rows -- remain false and must be re-approved once via the task scope UI if egress -- is required. UPDATE task_scope SET approved_by_operator = TRUE WHERE source = 'manual' AND approved_by_operator = FALSE;