Skip to main content

reload_extension_resources

Function reload_extension_resources 

Source
pub async fn reload_extension_resources(
    harness: &AgentHarness,
    ctx: &ReloadContext,
) -> ReloadOutcome
Expand description

Re-run extension + resource discovery and push the rebuilt state into the live harness via the B5d setters. The old ExtensionSession + ActionBridge are invalidated + swapped in ReloadContext’s cells. This is the single routine both /reload (TUI) and a plugin’s runtime_action(Reload) drive (the latter via the mailbox signal).

Returns a ReloadOutcome for the transcript. Best-effort: a failure in one channel (e.g. a plugin that fails to reload) does not abort the others — the reload completes with whatever loaded, mirroring pi’s per-plugin skip-on-error. A hard failure (e.g. the harness is closed) surfaces as an error summary.