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§
- Launch
Meta 🔒 - 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.openand 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
initwhen it has none yet. A pane seeded with a registry-derivedagent:sessionidcan come back alreadyrunning(#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, elseNone. - 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.