Skip to main content

Module input

Module input 

Source

Structs§

AgentTurnDeps
The slice of AppState an agent turn needs in order to be started.
ArmedJoinHint 🔒
A held message’s join hint, armed for one dispatch. Dropped without keep (the dispatch failed), it is cleared, so no later message can take it (#4492).
PersistedAgentIdentity 🔒
What the server knows about the agent on a block, read from its db_agents row: the identity that will be carried into the process.

Enums§

TurnGate 🔒
Why run_agent_turn refused to spawn, before any process started.
TurnRegistration
Start one agent turn for block_id with message.

Functions§

build_persistent_spawn_env 🔒
Builds the full spawn environment for a persistent-controller CLI process: cmd:env base → Layer 3 identity/credential gate → the two RESERVED wrapper variables (unconditionally overwritten — AGENTMUX_AUTH_KEY/AGENTMUX_BLOCKID) → the two agent-identity variables and per-agent git identity (all user-overridable via cmd:env) → bundled/user tools PATH → the reserved guards (gh_guard, account_login_guard: no agent gets a human’s gh login or the account’s cloud login).
carry_agent_uid_env 🔒
Identity M1 — spec §9.1: carry the UID and the token into the process.
carry_agent_workdir_env 🔒
AGENTMUX_AGENT_WORKDIR: the agent’s own workspace, which the host-only “Your workspace” Operator Config entry tells it to clone and work in (SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_STARTUP_FILES_2026_09_30.md §3.4). Server-set, like AGENTMUX_AUTH_KEY: it is the launch cwd (cmd:cwd), not user configuration, so a cmd:env copy never wins. Host agents only — a container’s cwd is a host path that means nothing inside the image (the key is also on CONTAINER_ENV_DENYLIST).
carry_block_identity_env 🔒
Identity M4b-2 (spec §6.5.8): carry block_id’s row UID and token into the env of a controller that builds its own (App Server, ACP) instead of going through build_persistent_spawn_env. Same resolution and the same reserved-value rules as that builder (stale values are overwritten, or removed when the block has no row). A synchronous store read and an idempotent token mint, so on a multi-thread runtime worker it runs under block_in_place, as eager resume does (incident #1782).
container_argv 🔒
Heal a container agent’s argv IN PLACE when — and only when — it still carries the persistent controller’s flags.
deleted_agent_of_rowless_block 🔒
#3577: the id of the deleted agent block_id names, when the block resolved to no row (identity is None) and its agent was deleted — the builder’s last-read re-check of the gate’s refusal (Codex P1 on #3591). None whenever a row resolved, or the block names nothing deleted.
flags_with_arity 🔒
Split an args list into (flag, takes_a_value) pairs.
git_identity_env_vars 🔒
Per-agent git commit identity env vars for a spawned agent process (2026-08-22, docs/retro/retro-shared-git-identity-committer-misattribution-2026-08-22.md).
persisted_agent_identity 🔒
The db_agents row for the agent shown on block_id, if it has one, plus that agent’s token.
register_agent_input_handlers
run_agent_turn
run_agent_turn_joining
run_agent_turn for a message the pane held while turn joins_turn ran: if that turn is still settling (or only just ended), the message joins it rather than starting a new one (turn-model spec §4.3, J3).
split_agent_identity_env 🔒
Identity M0 — SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md §9.1: make the display name and the slug two explicit variables, present on every launch path.
strip_flag_with_value 🔒
Remove flag and the value token following it, everywhere it appears. Tolerates a trailing flag with no value rather than panicking.