MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / create_agent_network

Method create_agent_network

src/docker/proxy_manager.rs:738–747  ·  view source on GitHub ↗

Creates an internal network for a specific agent container. The network is created with the `internal` flag, meaning it has no external route to the internet. The agent can only reach the proxy. # Returns The network name on success

(&self, task_id: &str)

Source from the content-addressed store, hash-verified

736 /// # Returns
737 /// The network name on success
738 pub(crate) async fn create_agent_network(&self, task_id: &str) -> Result<String> {
739 let network_name = Self::agent_network_name(task_id);
740
741 self.docker_client
742 .create_internal_network(&network_name)
743 .await
744 .map_err(|e| anyhow::anyhow!("Failed to create agent network: {e}"))?;
745
746 Ok(network_name)
747 }
748
749 /// Connects the specified proxy container to an agent's isolated network.
750 ///

Callers 3

acquire_proxyMethod · 0.80

Calls 1

Tested by 2