-- Herdr second-runtime path (Phase 1a). -- -- Missions can now execute either through the shared ZeroClaw daemon -- (default, headless, browser-driven) OR through a Herdr session on -- a specific fleet node (attended, operator-visible, uses that node's -- local CLIs). Frontend picks in the wizard; mission_orchestrator + -- phase executors dispatch on runtime_kind. -- -- topology_runs grows a nullable (workspace, tab, pane) triple so a -- run resumed after a server restart can reattach to the same Herdr -- pane instead of spawning a duplicate. BEGIN; ALTER TABLE missions ADD COLUMN runtime_kind TEXT NOT NULL DEFAULT 'zeroclaw' CHECK (runtime_kind IN ('zeroclaw', 'local_herdr')), ADD COLUMN target_node_id UUID REFERENCES nodes(id) ON DELETE SET NULL; CREATE INDEX missions_target_node_idx ON missions (target_node_id) WHERE target_node_id IS NOT NULL; ALTER TABLE topology_runs ADD COLUMN herdr_workspace_id TEXT, ADD COLUMN herdr_tab_id TEXT, ADD COLUMN herdr_pane_id TEXT; COMMIT;