{"record":{"id":"059c8657a5330c48","repo":"zeroclaw-labs/zeroclaw","slug":"tool-http-linker","errorCode":null,"errorMessage":"tool http linker","messagePattern":"tool http linker","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-plugins/src/runtime.rs","lineNumber":64,"sourceCode":"        \"failed to add tool plugin imports to linker\",\n    )?;\n    Ok(linker)\n}\n\n/// Cached linker for plugins without `HttpClient`: base WASI plus the tool\n/// world, no network.\nfn tool_linker() -> &'static Linker<PluginState> {\n    static LINKER: OnceLock<Linker<PluginState>> = OnceLock::new();\n    LINKER.get_or_init(|| base_linker().expect(\"tool linker\"))\n}\n\n/// Cached linker for `HttpClient` plugins: the base surface plus `wasi:http`.\n/// Built only once, on first use by an HTTP-granted plugin.\nfn tool_linker_http() -> &'static Linker<PluginState> {\n    static LINKER: OnceLock<Linker<PluginState>> = OnceLock::new();\n    LINKER.get_or_init(|| {\n        let mut linker = base_linker().expect(\"tool linker\");\n        crate::component::add_wasi_http(&mut linker).expect(\"tool http linker\");\n        linker\n    })\n}\n\n/// Compile and instantiate a tool plugin under one host-issued scope.\n///\n/// The scope decides whether the store carries an outbound-HTTP context and\n/// whether the linker exposes `wasi:http`; deriving both from the same scope\n/// prevents authority from drifting between instantiation and execution.\npub async fn create_plugin(\n    wasm_path: &Path,\n    scope: &PluginInstanceScope,\n    limits: crate::component::PluginLimits,\n) -> Result<Plugin> {\n    scope.require_capability(PluginCapability::Tool)?;\n    let component = load_component(wasm_path)?;\n    let mut store = crate::component::new_store(\n        PluginStoreSpec::new(scope.clone(), limits).with_granted_http(),","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-plugins/src/runtime.rs#L46-L82","documentation":"Error \"tool http linker\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-plugins/src/runtime.rs:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the HTTP-capable linker is configured before loading plugins that use HTTP host functions.","Enable the required plugin HTTP feature and restart the runtime."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}