Skip to main content

Module agent_open_steps

Module agent_open_steps 

Source
Expand description

The steps agent.open runs in order, one function each. open_agent_inner (agent_open.rs) calls them; the code is moved from it unchanged.

Structs§

LaunchMeta 🔒
What the pane needs to launch the CLI, added to its identity meta.

Functions§

add_launch_meta 🔒
Step 6, the launch half: command, args, working directory, env, resume settings, then the caller’s extra keys.
admit_open 🔒
The checks before anything is written for the agent: no live instance elsewhere on this host, and a local row.
agent_work_dir 🔒
Where the agent runs.
create_agent_block 🔒
Step 7 for a new pane: create the block through the reducer, then place it in the layout (or park it for a start).
fill_existing_pane 🔒
Step 7 for layout.open and Import: give an empty agent pane that already sits in the layout the agent’s meta.
launch_env 🔒
The environment the agent’s process starts with: provider and auth entries, the vendor override, the definition’s own variables and its identity.
launch_status 🔒
The status of the pane’s controller, or init when it has none yet. A pane seeded with a registry-derived agent:sessionid can come back already running (#3513), so this is read, not assumed.
open_controller_type 🔒
The controller type a new pane gets for this agent’s runtime.
pane_identity_meta 🔒
The pane meta that says which agent this is: its zoom, colour, seat, icon and container settings.
pick_openable_agent 🔒
Step 1: the definition to open, by id or name, with its provider settled.
prepare_auth_dir 🔒
The provider’s default auth directory, created with the isolation it needs before a CLI is pointed at it.
resolve_cli_path 🔒
Step 5: the provider’s CLI on disk, installing the pinned version when it is missing.
resume_session_for 🔒
The provider session this open resumes: the agent’s newest captured one, unless another block of it is live.
routing_id 🔒
The id the agent is known by on the message bus: its stored slug (stable across renames), else one derived from its name.
seed_runtime_args 🔒
The CLI args for the pane: catalog args, the runtime the menu shows, then the definition’s own flags.
start_controller 🔒
Step 9: register the block’s controller (not for a terminal-tier CLI: its term view starts it once attached).
take_start_marker 🔒
Takes the start’s marker off extra_meta (it is not block meta): whether it is a start with no pane.
unreadable_refusal 🔒
The refusal for agent_ref (an id or a name) when it names a record this build cannot read, else None.
unreadable_text 🔒
What a start of an agent whose record this build cannot read is told.
write_files_and_record_launch 🔒
Step 8: write the agent’s config files, then record the launch and stamp the block before the resync.