Skip to main content

Module agent_config

Module agent_config 

Source
Expand description

writeagentconfig, moved out of register_editor_handlers unchanged as named steps: write an agent’s config files atomically into its working directory.

Structs§

ConfigStores 🔒
The stores a config write reads (the agent’s picked bundles, its identity links, the pane store).

Functions§

resolve_workdir 🔒
The final on-disk path. An auto-generated instance path (auto_allocate: true) uses the atomic <base>-N allocator so concurrent same-hour launches don’t share a workdir. A user-specified path is mkdir -p’d and never rewritten.
write_agent_config 🔒
Only the window, proven by its host, gets an agent’s keys (hands_out_keys); an agent writes only its own (agent_config_guard).
write_file 🔒
One config file, written the way its kind needs: CLAUDE.md and the other providers’ startup files keep an existing file’s content, .mcp.json merges into the user’s own, anything else is an atomic workdir write.
write_files 🔒