MCPcopy Create free account
hub / github.com/AI45Lab/Code / with_capabilities

Method with_capabilities

core/src/ahp/executor.rs:270–278  ·  view source on GitHub ↗

Builder method to add client-exposed capabilities. Capabilities allow the server to interact with the agent by calling exposed functions/URLs. Common capabilities: - `memory_search`: Search across memories - `session_info`: Get current session information - `cross_session`: Query cross-session data # Example ```rust,no_run use a3s_code_core::ahp::{AhpHookExecutor, AhpTransport}; # async fn exa

(
        mut self,
        capabilities: impl IntoIterator<Item = (String, serde_json::Value)>,
    )

Source from the content-addressed store, hash-verified

268 /// # }
269 /// ```
270 pub fn with_capabilities(
271 mut self,
272 capabilities: impl IntoIterator<Item = (String, serde_json::Value)>,
273 ) -> Self {
274 for (key, value) in capabilities {
275 self.capabilities.insert(key, value);
276 }
277 self
278 }
279
280 /// Add a single capability
281 pub fn add_capability(mut self, key: impl Into<String>, value: serde_json::Value) -> Self {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected