11 lines
377 B
Rust
11 lines
377 B
Rust
//! Subagent workspace management — create isolated workspaces for subagents.
|
|||
|
|
|
||
|
|
use std::path::PathBuf;
|
||
|
|
|
||
|
|
/// Create an isolated workspace directory for a subagent.
|
||
|
|
pub fn create_subagent_workspace(base_dir: &PathBuf, agent_id: &str) -> anyhow::Result<PathBuf> {
|
||
|
|
let ws = base_dir.join("subagent-workspaces").join(agent_id);
|
||
|
|
std::fs::create_dir_all(&ws)?;
|
||
|
|
Ok(ws)
|
||
|
|
}
|