MCPcopy Create free account
hub / github.com/block/buzz / find_managed_agent_mut

Function find_managed_agent_mut

desktop/src-tauri/src/managed_agents/runtime.rs:1566–1574  ·  view source on GitHub ↗
(
    records: &'a mut [ManagedAgentRecord],
    pubkey: &str,
)

Source from the content-addressed store, hash-verified

1564}
1565
1566pub fn find_managed_agent_mut<'a>(
1567 records: &'a mut [ManagedAgentRecord],
1568 pubkey: &str,
1569) -> Result<&'a mut ManagedAgentRecord, String> {
1570 records
1571 .iter_mut()
1572 .find(|record| record.pubkey == pubkey)
1573 .ok_or_else(|| format!("agent {pubkey} not found"))
1574}
1575
1576/// Pure decision function for the inbound author gate env vars.
1577///

Calls

no outgoing calls

Tested by

no test coverage detected