Skip to main content

Module agent_handlers

Module agent_handlers 

Source

Re-exports§

pub use input::register_agent_input_handlers;
pub use side_question::register as register_side_question_handlers;
pub use input::run_agent_turn;
pub use input::run_agent_turn_joining;
pub use input::AgentTurnDeps;
pub use input::TurnRegistration;

Modules§

account_label 🔒
The account line of an agent in a list: the My Agents tile and the “Continue an existing agent” menu (SPEC_MY_AGENTS_TILES_AUTH_AND_HISTORY_2026_10_03.md §5.2).
api_retry 🔒
agentapiretry: the API retry a pane’s CLI is waiting on, for a pane that opens mid-retry (backend::agent_api_retry).
build_slot 🔒
getbuildslot: who holds this machine’s build slot, for the Swarm row note (docs/specs/SPEC_BUILD_SLOT_ENFORCEMENT_2026_10_20.md §6). Reads the lock’s owner file; the block it names is the local agent that matches the holder (work_facts::build_slot_of).
bundle 🔒
composer_origin 🔒
Who typed into an agent’s composer (agentinput), decided from the connection, never from the request (SPEC_MESSAGE_ORIGIN_AND_ONE_CONTAINER_2026_10_25.md §3.4).
container_turn 🔒
Getting a container agent’s container ready for a turn: the container is running, and the provider CLI is installed in it.
core 🔒
endpoint 🔒
undoagentendpoint: the Undo on the notice for a changed model server (backend/endpoint_notice.rs). It puts the agent’s environment back as it was, while the notice’s window is open and the environment is unchanged since (app_api::agent_env::undo_endpoint).
fork_history 🔒
copyforkhistory: a fork’s pane starts with its parent’s history (agent_session::fork_history). Forks only; see “Fork, spawn and worker” in mod.rs.
fork_slugs 🔒
agents.migrateForkSlugs: the Settings › Agents card’s way into the fork slug migration (backend::slug_migration). plan, apply, rollback and restore run on the disk, off the async workers; stop asks each running affected pane to stop, through the same 30 s user override an agent’s stop request waits for (fleet_stop_keep_pane_with_override).
history 🔒
identity 🔒
identity_delete 🔒
Deleting an identity account, whoever asks: the window’s deleteidentityaccount and an agent’s Google disconnect run this one function, so the grant is revoked at the provider, the secrets, links, Google grants and log are removed, and the windows and the agents that held it are told, the same way either time.
identity_env 🔒
The agent’s identity variables in its spawn environment, beyond what input.rs’s split_agent_identity_env and carry_agent_uid_env set.
input 🔒
instance 🔒
rename 🔒
Renaming an agent’s displayed name: the one path the window’s renameagentdefinitiontitle and an agent’s Agents rename both take, so every place that shows or addresses the agent follows.
seat 🔒
agent.setSeat: the operator sets or clears an agent’s seat (SPEC_AGENT_SEATS_IN_THE_UI_2026_10_23.md §3). A connection registered as an agent is refused here; an agent sets seats through MuxAPI’s Agents set_seat (app_api/agent_seats.rs), which shares the checks below (plan_seats) and records the agent as the one who set them.
session 🔒
The session RPCs: listrecentsessions (the My Agents list, recent.rs) and the agent-anchored session zone (zone.rs). register only wires each command to its named function.
side_question 🔒
Backend half of the /btw slash command — a faithful recreation of Claude Code CLI’s own native /btw: a fast, one-shot, tool-less answer that is aware of the current conversation (via a text prefix, not --resume), WITHOUT touching the asking pane’s persisted transcript and WITHOUT blocking/queuing behind that pane’s own live turn.
skills 🔒
template 🔒
template_create 🔒
Making a user-owned agent from a seeded template: the core of the agentdefcreatefromtemplate RPC (Phase 1 of the two-tier picker, SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md), shared with the Agents create API (app_api/agent_spawn/create.rs).
template_image 🔒
The container image a new agent gets when it is created from a template (the new-agent form’s image choice). Spec: docs/specs/SPEC_CONTAINER_AGENT_DEVELOPER_IMAGE_2026_10_29.md section 4.
template_switch 🔒
An agent on a removed harness, offered a way on: a copy of it on a harness AgentMux offers.
turn_steps 🔒
The steps of run_agent_turn_joining (input.rs), one function each, in the order it runs them. Moved from it unchanged.

Functions§

purge_identity_store_rows 🔒
Purge a deleted agent’s rows from the IDENTITY store — the second physical database, reachable only from this layer.
read_session_preview 🔒
Read the per-block output.state.json snapshot from filestore and extract a (preview, node_count) pair for the AgentPicker’s “Recent sessions” list.
register_agent_handlers