fix: wire secrets store into all WASM runtime activation paths (#479)

WASM tools and channels activated at runtime (via web UI or CLI) were
missing secrets store wiring, causing credential injection to silently
fail. Tools like web-search would get 401s from APIs even though the
user had configured their API key.

Four bugs fixed:
- activate_wasm_tool(): WasmToolLoader created without .with_secrets_store()
- register_wasm_from_storage(): hardcoded secrets_store: None
- WasmChannelLoader: no secrets_store field at all (added field + builder)
- activate_wasm_channel() and startup path: both missed wiring secrets

The startup path in app.rs was correct; all runtime paths now match it.

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
Henry Park
2026-03-02 16:56:24 -08:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 8530f44630
commit 6adf95b6d1
4 changed files with 22 additions and 5 deletions
+4 -2
View File
@@ -1804,7 +1804,8 @@ impl ExtensionManager {
None
};
let loader = WasmToolLoader::new(Arc::clone(runtime), Arc::clone(&self.tool_registry));
let loader = WasmToolLoader::new(Arc::clone(runtime), Arc::clone(&self.tool_registry))
.with_secrets_store(Arc::clone(&self.secrets));
loader
.load_from_files(name, &wasm_path, cap_path_option)
.await
@@ -1915,7 +1916,8 @@ impl ExtensionManager {
Arc::clone(&channel_runtime),
Arc::clone(&pairing_store),
settings_store,
);
)
.with_secrets_store(Arc::clone(&self.secrets));
let loaded = loader
.load_from_files(name, &wasm_path, cap_path_option)
.await