Skip to main content

Module picker_config

Module picker_config 

Source
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_agent is not checked here. Otherwise, as render_request_agent.
files_to_write 🔒
The files writeagentconfig writes into work_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_id into work_dir, rendered in Rust exactly as agent.open renders them (render_agent_config_files), so the window sends no file content of its own. instance_name is the launch’s name for the agent (a modal-supplied one), None for 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 in agent.open.
picker_files 🔒
files as the window sent them, with what srv adds for agent_id launched as agent_mode (host or container). Keys go only when hands_out_keys (the window, proven by its host) and the agent is not a container agent.
render_request_agent 🔒
The agent a render_from_agent request 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.