pub fn resolve_spawn_args(
path: &str,
task: Option<&str>,
stdin_is_terminal: &dyn Fn() -> bool,
model: Option<String>,
workdir: &str,
yolo: bool,
allow: Vec<String>,
max_depth: Option<usize>,
regions: HashMap<String, String>,
no_seed_commands: bool,
) -> Result<SpawnArgs>Expand description
Resolve the local inputs of a spawn request: find and parse the manifest,
resolve the --<region> flags, resolve the task, and mint a run id from the
agent’s directory name.
task is what --task was given, if anything. Left off, resolve_task
opens the user’s editor, which is why stdin_is_terminal is threaded
through: the probe itself is real I/O and belongs to the binary, so callers
inject it (tests pass a fn that always says no).
Regions are resolved before the task on purpose. A typo’d --foo has to
fail before the user is dropped into an editor and types a paragraph they
are about to lose.