Expand description
What writeagentconfig (the window’s Launch) writes for an agent, before it is written: the files the
window built, with what srv adds to them. The catalog’s MCP servers go into .mcp.json
([mcp_launch::add_to_files]), the launch’s agent id and signing keys
([mcp_json_identity::finish_launch]), and Global Memory and the agent’s picked bundles into the startup
file (inject_global_bundles). Pure, so a test can render a launch without a socket or a disk: the
parity test (agent_config_parity_tests) compares it with agent.open’s.
Functions§
- check_
render_ 🔒request - A request without
render_from_agentis not checked here. Otherwise, asrender_request_agent. - files_
to_ 🔒write - The files
writeagentconfigwrites intowork_dir: rendered from the agent’s definition when the window asks (render_from_agent; after the folder is allocated, so the files name the folder they are in), otherwise the ones the caller sent with what srv adds to them (picker_files). - launch_
files 🔒 - The files the window’s Launch writes for
agent_idintowork_dir, rendered in Rust exactly asagent.openrenders them (render_agent_config_files), so the window sends no file content of its own.instance_nameis the launch’s name for the agent (a modal-supplied one),Nonefor the agent’s own. The launch’s folder is its own (allocated or named by the caller), never the fallback folder every same-name launch shares. Whether the agent is a container agent is the definition’s (agent_type), as inagent.open. - picker_
files 🔒 filesas the window sent them, with what srv adds foragent_idlaunched asagent_mode(hostorcontainer). Keys go only whenhands_out_keys(the window, proven by its host) and the agent is not a container agent.- render_
request_ 🔒agent - The agent a
render_from_agentrequest names, or why it is refused: only the window may ask, and it must name an agent that exists. Checked before the working folder is allocated, so a refused request leaves no folder behind.