fn write_file(
wd: &Workdir,
base_path: &Path,
canonical_base: &Path,
file: &AgentConfigFile,
on_host: bool,
) -> Result<(), String>Expand description
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.