Skip to main content

resolve_spawn_args

Function resolve_spawn_args 

Source
pub fn resolve_spawn_args(req: LaunchRequest<'_>) -> 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). None of that happens for a blueprint that takes no task: it is not asked for one, and giving it one is an error rather than text with nowhere to go.

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.