diff --git a/desktop/src-tauri/src/commands/identity_transition.rs b/desktop/src-tauri/src/commands/identity_transition.rs index 9afe9b158a..63fba8ddc4 100644 --- a/desktop/src-tauri/src/commands/identity_transition.rs +++ b/desktop/src-tauri/src/commands/identity_transition.rs @@ -10,8 +10,8 @@ use tauri::Manager; /// Drain live managed-agent runtimes for identity import (Layer 2 protocol). /// Caller must hold `managed_agent_runtime_transition`. Returns stopped entries /// or `Err((stopped, msg))` on failure. -fn drain_managed_agent_runtimes_for_import( - app: &tauri::AppHandle, +fn drain_managed_agent_runtimes_for_import( + app: &tauri::AppHandle, state: &AppState, ) -> Result< Vec, @@ -33,8 +33,8 @@ fn drain_managed_agent_runtimes_for_import( /// without any interleave window. `scope`/`rt_guard` are `None` on the no-scope /// path (nothing drained); either being `None` skips compensation. Returns a /// combined diagnostic string when compensation itself fails. -fn compensate_import_drain( - app_handle: &tauri::AppHandle, +fn compensate_import_drain( + app_handle: &tauri::AppHandle, stopped: &[crate::managed_agents::DrainJournalEntry], scope: Option<&crate::managed_agents::scope::WorkspaceAgentScope>, rt_guard: Option>, @@ -102,8 +102,8 @@ fn compensate_import_drain( /// runtimes compensate, but revoked owner-identity durable capabilities stay /// revoked. This is design-conformant fail-closed churn, not a split state — /// see `CROSS_WORKSPACE_AGENT_LIBRARY.md` §3.3a (barrier sequence is fixed). -pub(crate) async fn run_identity_transition( - app_handle: tauri::AppHandle, +pub(crate) async fn run_identity_transition( + app_handle: tauri::AppHandle, nsec: String, password: Option, commit_fence: Option>>, @@ -200,8 +200,8 @@ pub(crate) fn commit_under_fence( /// either compensates (cancelled during drain, before the fence is taken) or /// loses to the committed recovery (cancelled after the fenced commit begins). /// Normal import supplies `None` + an always-`Ok(())` check. -fn import_identity_blocking( - app_handle: tauri::AppHandle, +fn import_identity_blocking( + app_handle: tauri::AppHandle, nsec: String, password: Option, commit_fence: Option>>, diff --git a/desktop/src-tauri/src/managed_agents/runtime_commands.rs b/desktop/src-tauri/src/managed_agents/runtime_commands.rs index d8b4aea287..4c5c6347fc 100644 --- a/desktop/src-tauri/src/managed_agents/runtime_commands.rs +++ b/desktop/src-tauri/src/managed_agents/runtime_commands.rs @@ -717,8 +717,8 @@ pub(crate) fn execute_drain_journal_with_stop_fn( /// entries that were successfully killed (compensation restores these). /// `remaining` contains entries that were NOT attempted (due to early-exit on /// first failure). On success `remaining` is empty. -pub(crate) fn drain_scope_runtimes( - app: &AppHandle, +pub(crate) fn drain_scope_runtimes( + app: &AppHandle, state: &AppState, ) -> ( Vec,