mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
Every VM gets its agents' settings and logins from devvm's own store, never from the agents' files in the home folder: settings in ~/.config/devvm/agents/<agent>/, logins in ~/.local/share/devvm/logins/<agent>/ (folders 700, files 600, each agent's logins folder kept out of Time Machine), each laid out as in a home folder. The store's settings folders are mounted read-only and linked into the VM's home; its files and logins are copied in, with network policy as placeholders the proxy fills from the store. devvm agent import [AGENT...] [--force] copies the home folder's agent settings and logins into the store once: only agentDirs, agentFiles and secrets.LoginRel's paths, never history; .claude.json reduced to its settings, account state and MCP servers; read through each agent's folder as an os.Root, so no link out of it is followed (a link to a file inside becomes a copy, any other is left out with a warning, and so is a login file that's a link); Claude Code's plugin records renamed to the store's folders. It asks before replacing what the store has (refused without a terminal, naming --force), replaces in place, keeping the mounted folders, and prunes what the home folder no longer has. - paths: Dirs.AgentSettings, Dirs.AgentLogins - secrets: LoginRel, LoginFile(Dirs, kind), SaveLogin, HasLogin, Store.ExcludeFromBackup; Logins, VMLogin, ClaudeCopy, MCPSecrets and the proxy's Get read the store - vm: agentStore, agentMounts/homeSkips/Inventory.Mounts take Dirs, syncer.stageAgents, AgentImport; the guest's links file holds each folder's home path and its mount's (host_home is gone) - structure: callers takes methods (pkg.Type.Name); Dirs.AgentSettings only in vm/agents.go, Dirs.AgentLogins only in secrets/secrets.go - messages: agent_import_none, agent_import_nothing, agent_import_replace, nothing_imported, agent_settings_imported, agent_login_imported, agent_import_link_left_out, agent_login_read_failed, agent_import_failed; the login refresh messages point at devvm agent import - tests: agentimport_test.go, testdata/script/agent.txtar, sync and network scripts through the store, e2e project and network sections - docs: coding agents (devvm's agent store, importing from this machine), README, getting started, safety, internals, contributing Co-Authored-By: Claude Opus 5.5 <[email protected]>