The model providers whose API keys the VM's proxy puts in for opencode and
pi are one table, agents.Providers (ID, name, hosts, header), from which the
bindings, devvm agent login --provider and its help, and the docs' table
derive (TestProvidersComplete). Google Gemini, Groq, Mistral, xAI and
DeepSeek join Anthropic, OpenAI and OpenRouter: the VM gets a placeholder,
and the proxy puts the key in, in the provider's header, for its hosts
alone. Binding wins over [pass-keys], and each launch notes a bound API key
that [pass-keys] still lists (login_pass_bound), never a bound OAuth login.
The docs and the note say that a key a VM was given before stays usable
wherever it was copied, that a bound key can mint credentials that work
without the proxy (Gemini's Live API ephemeral tokens, xAI's and OpenAI's
realtime client secrets), and that some providers' own tools fetch URLs the
VM names. The network e2e checks pi's Gemini key in x-goog-api-key, never
in the URL, and opencode's Groq key in its Authorization.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode gets the rule pi got: an entry of its auth.json that devvm
neither binds nor passes reaches the VM's copy with only the fields
that name its account, with the login_withheld warning, which says to
list the provider under opencode in config.toml's [pass-keys]. A listed
provider's api entry goes whole, metadata included (login_passed), and
opencode 2's import brings every API key the copy holds into its
database. A bound API key's entry is {type, key: placeholder} alone, its
metadata kept on the host. pi's allowlist becomes withheldEntry and
withheldKeep, which both agents share; login_oauth_withheld goes.
A user with a local server's key in opencode sees it withheld after
upgrading, and the launch warning names the provider.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each coding agent gets one definition, an agents.Def in a new stdlib-only
leaf package, internal/agents, and everything else iterates over
agents.Defs: agentlogin's format per login kind, secrets' login kinds,
settings' [pass-keys], image.SharedTools, the vm package's store tables
and scripts, and cli's help lists. The VM copies of every login file,
their bindings, the store's layout, the scripts and the CLI reference
stay the same byte for byte, as golden tests made before the refactor
show.
The agents' guest variables leave base.sh for /etc/devvm/agents.sh,
written at every launch, so every image rebuilds once. Messages are
merged per agent (login_kept, login_passed, login_withheld,
login_oauth_withheld, agent_login_key_only). The structure test's new
names rule fails on an agent's name or login kind as a literal outside
internal/agents, and literals on one holding an agent's folder. Docs
link the supported coding agents rather than listing them, and
Contributing gains Adding a coding agent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds pi (earendil-works/pi) as a shared coding agent beside Claude
Code, Codex and opencode: --agents pi, devvm tools add pi, the new-VM
picker and devvm setup offer it. Its network policy allows pi.dev; base
sets PI_SKIP_VERSION_CHECK=1 and PI_TELEMETRY=0 and installs fd-find,
so base and every image on it build again once. The agent store mounts
and copies pi's settings, with keys redacted as JSON.
pi's auth.json is a new login kind: its API keys for Anthropic, OpenAI
and OpenRouter become per-VM placeholders the proxy fills in (devvm
agent login pi --api-key --provider PROVIDER), and everything else is
withheld by default, unless config.toml's [pass-keys] lists the
provider. pi's own account logins aren't supported, and pi has no musl
build, so a musl VM refuses it (image.ToolDef.GlibcOnly). Its sessions
go into devvm history export and import.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux hosts have no unprivileged immutable flag, so devvm can't lock
.git there. It now warns at every launch of a VM that mounts a folder
with a .git (git_unprotected), unless it's a --clone VM or the user
chose devvm git-protect off (git.chosen), and it names, after the fact,
the hooks and config that changed (git_changed). It sums what a lock
would cover, .git/commondir, include.path targets and the folder
core.hooksPath names, never through a symlink out of the project folder
and within bounds (git_watch_blind names what it can't fully watch), at
each launch that finds the VM stopped and at devvm stop.
A check on such a host runs protect's reports without locking:
git_replaced, git_commondir, stray worktrees, git dirs that appeared,
core.hooksPath and delegations into the project folder, and a
submodule's folder that isn't a git dir (git_gitdir_not_git), in which
nothing is created and which the watch doesn't sum as a git dir.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The VM writes a submodule's .git file or folder, so it could name any
folder in the project as a git dir, and devvm then locked that folder's
hooks and config (a React src/hooks, say) or made an empty hooks folder
there. A git dir in the working tree now counts only when isGitDir
passes (a HEAD next to objects and refs folders), the check gitDirs
already ran for .git/modules. devvm locks and creates nothing in a
folder that fails it, and reports it once, and again whenever it
changes, as the new git_gitdir_not_git (delegation kind notgit).
Docs: safety/git-protection's When devvm reports .git, and
internals/git-protection's What's locked and On each launch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prereleases now reach the Homebrew tap through a second formula, `devvm-rc`. The stable `devvm` formula stays on the last final release.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Adds `dotnet`, the .NET SDK, as a fifth shared toolchain next to node,
python, rust and go. `--tools dotnet`, `devvm tools add dotnet` and the
picker offer it, and a folder with `*.sln`, `*.slnx`, `*.csproj`,
`*.fsproj` or `global.json` at its top level suggests it in the new VM's
summary, the way `package.json` suggests node.
Refs #2. Thanks to @jsskeen-utah for the detailed request.
Co-authored-by: Claude Opus 5.5 <[email protected]>
devvm's host mise didn't trust the CAs in ~/.config/devvm/ca, so behind a
network that inspects TLS, resolving the shared tools' versions failed with
UnknownIssuer and a message to check the connection.
The host mise and its download now trust the folder's checked CAs: mise gets
them as MISE_EXTRA_CA_CERTS, and on Linux also an SSL_CERT_FILE bundle of the
system's roots plus those CAs (SSL_CERT_DIR only when the user set neither
variable). On macOS, mise's Sigstore client still needs the CA trusted in the
Keychain, as the docs say. A certificate failure now shows tools_untrusted,
pointing at the CA docs.
Refs #1
Co-authored-by: Claude Opus 5.5 <[email protected]>
devvm can ship prereleases, such as release candidates and betas, for
people to try before a release is out. A prerelease's version is
`x.y.z-<word>.N`, such as `0.2.0-rc.1` or `0.2.0-beta.2`. `VERSION`
holds it, the tag is `v0.2.0-rc.1`, and it gets a `CHANGELOG.md` entry
as usual.
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
When upstream's latest is a version older than the pin (a release marker
that lags, as codex's and opencode's have), report() says the pin is newer
and neither counts it as outdated nor bumps it. Digests and dated releases
are compared as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI's e2e workflow installs Lima 2.3.0, its tarball's checksum taken from the release's SHA256SUMS, checked against the sha256 Lima's release notes publish. scripts/bump.sh e2e-lima moves that pin the same way. devvm's doctor, install.sh, the README and the Lima page ask for Lima 2.2 or newer, compared by major and minor.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The formula has an archive per platform (macOS and Linux, arm64 and
Intel), each URL and checksum filled in by release.sh from the
SHA256SUMS it wrote, and installs only the binary; no Go dependency.
release.sh --formula-from DIR writes the formula for a published
release from its downloaded SHA256SUMS, checked against minisign.pub.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A project VM mounts its whole folder read-write, so a nested project with
a VM of its own is in the parent folder's VM too: code there can change
the nested project's files, .git included where .git protection doesn't
cover it, and replace its folder (which devvm's start refuses since the
nested-replaced checks). devvm now says so each time it makes or opens
such a VM: once per run of devvm, naming the nearest parent folder's VM
that mounts the project (project_in_vm_folder, linked to using/vms.md's
"A nested project replaced").
The finder owns the walk up: parentVM's loop over project.Parents is now
finder.parents, which mountedBy shares. mountedBy reads only the states,
so a stopped parent VM counts (it writes whenever it runs), and it passes
over --clone VMs, which mount nothing, and states made for another
folder. warnMounted skips a --clone VM of the folder's own, new or not.
Only Up warns; devvm restart and the other commands don't.
Docs: using/vms.md says when devvm warns and why; internals/overview.md
how the finder finds the VM; attack-vectors.md's nested entry mentions it.
Tests: TestWarnMounted (the nested VM's creation and next launch with the
parent stopped warn once; the parent's own launch, the parent's VM in a
subfolder, a new --clone VM and a parent --clone VM don't);
nested_replaced.txtar checks the same through the CLI, and that devvm
restart doesn't warn.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each export in devvm's exports folder records its VM's network tier on
the last line of its .folder file (Exports.writeFolder, read back by
Exports.record, Export.Tier). Every import (devvm history import and the
one a new VM offers, both through importHistory) warns first, by
netpolicy's Tier.AtLeast, when the export's VM was on a less strict tier
than the VM it goes into (history_import_less_strict), or when there's
no record of its tier (history_import_tier_unknown, as if open): an
export without a tier, or any file outside the exports folder, whose
.folder file a VM could have written. Then it imports.
Tests: TestExportRecord, TestImportWarnsOfTier (open, internet, none,
the same tier, none recorded, a file elsewhere; an open VM warned of
nothing), TestRm's .folder file, history_import.txtar (the launch's
offered import from an open VM into an allowlist VM, and a file of
your own).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The history export keeps at most 2 GiB: past it, devvm stops the VM's
command, removes the partial file and keeps no export. devvm history
export fails with history_too_large; devvm rm, devvm rm VM and a remake
warn with it and go on. opencode's import of devvm's logins (devvm agent
login) is read up to 1 MiB, then stopped and refused
(opencode_import_too_much). Each VM command adds at most 4 MiB to the
run log (Env.vmLog), then a "devvm: truncated" line.
agentsave's bounded writer is the one owner, in bounded.go: it takes in
vm's capped, and with a cancel it fails every write past its max, so a
command that keeps writing ends. Its buffer is a field: embedded, it gave
the writer bytes.Buffer's ReadFrom, which io.Copy (os/exec's copy of a
command's output) used in place of Write, so no cap held, agent save's
128 MiB included. vmssh's capped had the same flaw, fixed the same way.
Env.HistoryMax, and DEVVM_HISTORY_MAX in a test build, stand in for the
export's cap in tests. The stub guest's opencode-floods and
history-floods switches write without end.
Tests: TestBounded (io.Copy too), TestVMLog, TestExportTooLarge,
TestRemakeHistoryTooLarge, TestImportLoginsTooMuch, TestShellFloods,
vmssh's capped through io.Copy; history_import.txtar (an export that never
ends: export fails, rm deletes and warns, the run log truncated) and
agent_login.txtar (opencode's import floods).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The maintainer tags main's HEAD (git tag -s vX.Y.Z) and runs
mise exec -- scripts/publish.sh, entering the minisign password once.
It checks the preconditions (release.sh --check for the tag and its
signer, main's HEAD and origin, a clean tree, gh logged in, minisign,
no other release, the tap's checkout clean on main), builds dist/ with
release.sh, prints the version, commit, files with sizes and SHA-256s,
the CHANGELOG entry and the tap's diff, asks once on the terminal, then
pushes main and the tag, makes the GitHub release as a draft with every
file and publishes it, and commits and pushes the tap's formula. Each
step skips what's done, a draft left by a failed run gets its files
again, and a failure says what was and wasn't published. --dry-run
stops before the question; --help.
release.sh gains --check (the tag's checks only, printing its commit),
fills in the formula's @URL@ and @SHA256@ only outside its comments,
and points at publish.sh in its last line.
Tests: testdata/script/publish.txtar (a local bare origin and tap, a
fake gh, SSH-signed tags, a passwordless minisign key): refusals (no
tag, a tag release-signer doesn't pin, a dirty tree, an existing
release without its files, gh logged out, no tap), --dry-run, n, y
failing at gh release create then at publishing the draft, the reruns
and the call order, and a run with everything done.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A parent folder's VM mounts a nested project folder read-write, so code in
it can move the nested folder aside and put a link (to the home folder, or
anywhere) in its place after devvm found the nested VM. Lima passes the
mount's location as it is, and QEMU's 9p and Virtualization.framework's
virtiofs follow the link when they open the share at the VM's start, so
the nested VM mounted the link's target read-write. The e2e check below
showed it on macOS (vz, virtiofs) and Fedora (QEMU, 9p) before this
change: devvm restart, and a start
whose limactl start found the link, both ran the nested VM with the decoy
folder's files at the project path.
devvm now checks the folder a start mounts (folderChanged: its path's
links resolved give the same path, and its FolderID is the state's) before
bringUp's host checks of a stopped VM, which would act on the link's
target, just before the backend's start, and once it returns. Before the
start it refuses (project_folder_changed); after, it stops the VM and its
proxy and refuses (project_folder_changed_stopped). Both link to the new
"A nested project replaced" section of using/vms.md; attack-vectors.md
and internals/overview.md say what's checked and what stays open (a swap
put back between the mount and the last check, and the boot it ran for).
Tests: TestFolderChanged (a link in its place, a link above it, another
folder, gone); nested_replaced.txtar, with the limactl stub's new
start-links and stop-links switches (fails without the fix); the project
section's "a nested project folder replaced by a link" (tests/e2e/
nested_test.go): replaced while the VM runs (9p keeps its folder, vz's
virtiofs answers Operation not permitted, neither shows the link's), once
devvm restart's stop ends, and as Lima starts it, through a limactl
stand-in that has the parent's VM make the swap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
release.sh wrote install.sh after it signed SHA256SUMS, so nothing signed
covered the script and checking it by hand with the release key wasn't
possible. It now writes install.sh, adds its checksum to SHA256SUMS, then
signs. install.sh and devvm upgrade look up their archive by name, so the
extra line changes nothing for them. release_head.txtar checks the line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Builds carry packaging/minisign.pub's key now, so an empty DEVVM_RELEASE_KEY
falls back to it and the test server's release fails its signature check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Linux, a child another script forked while testscript's cp held the copy's write descriptor kept it open until that child exec'd, so running the copy failed with ETXTBSY. cp_exe writes it under syscall.ForkLock; upgrade.txtar and release_notice.txtar use it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With nothing blocked, the proxy's /blocked answer (devvm-why) adds that a
DNS or connection error for an allowed host means the tool skipped the
proxy, to turn on its own proxy setting or give it $HTTPS_PROXY, and links
troubleshooting's A host on the allowlist doesn't resolve. The agents' note
in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md says the same in one sentence.
Tests: proxy_test's empty answer, network.txtar asks a running proxy's
/blocked, and the e2e network section checks that curl --noproxy fails for
github.com, devvm-why's hint and the note in CLAUDE.md. Docs: internals and
safety network pages.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode 2 keeps its logins in its database, so a VM whose database
existed kept the logins it had: a key saved from another VM, or a ChatGPT
login for another account, never reached it.
Every launch's setup now sends the store's opencode logins as opencode
auth import reads them (agentlogin.OpencodeImport: each API key the proxy
puts in and OpenAI's Codex login, placeholders alone, IDs
cred_devvm_<provider>; methodID chatgpt-browser and a whole-number
expires, as opencode 2.2.5's credential schema needs). The new guest
script assets/guest/opencode.sh reads them on its input, never argv, and,
once opencode has a database, imports them when they differ from its
record (~/.local/state/devvm/opencode-import.json) or when the database
no longer holds one of devvm's IDs (deleted, or replaced by a history
import; checked with opencode auth export, only the IDs kept). It logs
out of devvm's earlier entries (opencode auth import skips an ID it has),
imports each entry on its own and switches its provider to devvm's entry;
the user's own credentials stay in the database. devvm agent login
opencode --api-key runs the same script at once, in place of the old
one-key import. The record lives in the VM because only the VM knows its
database and what it holds.
No partial success: a provider whose import opencode refuses is printed
as devvm-opencode-failed PROVIDER, the script exits 1 and records
nothing, so the next launch tries again, and devvm agent login names the
providers in the new message opencode_import_failed.
Three faults found on real opencode 2.2.5 VMs and fixed: bash -lc runs
~/.bash_logout (Debian's clear_console, failing without a terminal),
which under set -e became the script's status after a good import, so
the work runs in a subshell; opencode 2.2.5 made its database without
importing auth.json while the script had recorded the entries anyway, so
nothing is recorded until the database exists; and a missing expires
becomes 0.
Every VM also sets OPENCODE_DISABLE_AUTOUPDATE=1, beside Claude Code's
DISABLE_AUTOUPDATER in base's /etc/profile.d/devvm-tools.sh: the agents
are read-only shared tools whose versions mise pins.
Tests: TestOpencodeImport; TestOpencodeScript (the script against a fake
opencode: no database, an import, the same input again, a database made
again, a refused entry); TestOpencodeRefused; TestToolsEnvironment;
agent_login.txtar (the script at a key's save, opencode-import.json in
the setup, a refused provider named through the guest stub's new
opencode-refuses switch). e2e's network section: OPENCODE_DISABLE_AUTOUPDATE in an
opencode VM's login shell; a second opencode VM with a database and a
credential of its own gets a key saved from the first at its next
launch, its own credential kept; and gets it again once its database is
deleted and made again. Failures print opencode.sh's stderr, the run
logs' opencode lines and the VM's credential IDs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The steps of each shared tool's build named the build VM every tool
shares (devvm-tools-build), so a build of several tools printed the same
lines over and over. Each step now names its tool: cloning base for
node 24.22.2, starting the build VM for node 24.22.2, building node
24.22.2, deleting the build VM for node 24.22.2. Lima's start, configure,
script and delete steps take the name from the context (withShown).
Messages: building_tool, cloning_for_tools, tools_build_vm; building_tools_in
goes. tools.txtar checks all five steps for each tool, in order.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After the network tier, a picker (PickOne) offers every port, none, or
a list typed at new_vm_ports_prompt and checked by settings.ParsePorts,
asked again on port_invalid. The summary's ports are preselected and
Enter at the list keeps them; the choice is this VM's alone. --ports
skips it and counts in leftToChoose; where devvm can't ask, the
summary's ports stand. Ports are now read for the requirements after
the choice. new_vm_choose, the customize question and devvm's help name
--ports. Tests: TestPortsRows, TestChoosePorts, TestUpCustomize,
TestLeftToChoose, up_customize.txtar, network.txtar. Docs: commands.md,
first-vm.md, images.md, ports-size.md, devvm.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
TestE2E already set up the sandbox, slots, locks and flags itself, so the
898-line script only handed over. The run is now `mise run e2e -- FLAGS`
(go test -tags e2e from tests/e2e, CGO_ENABLED=0) with the same flags:
--only, --from, --clean, --every-feature, --slots, --slot, --newest-base,
--golden, plus --reuse.
- options: the flags named as the script's options; the hand-over flags
(lock-holder, count, total, started, summary) and the ported/unported
split are gone.
- e2eUbuntuRelease, a const in sandbox_test.go, holds the Ubuntu pin;
scripts/bump.sh e2e-ubuntu moves it (get_const), and TestE2EUbuntuPins,
bump.txtar and the E2E workflow read it there.
- From the script into Go: the OpenSSL-not-LibreSSL host check, and
--newest-base's start line and its UPSTREAM DRIFT summary.
- The script's leftover bash helpers (perl vm_state, no_leak, ca_*,
lima_listens, the retry list, its heartbeat) are gone with it.
- mise's e2e:go task merges into e2e; TestCommandLines drops its $D rule.
- Docs (contributing, testing, maintaining, internals) and AGENTS.md name
mise run e2e; testing.md's "Porting a section" becomes "Adding a section".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The disk's question (new_vm_disk_prompt) starts from the summary's disk,
after one line saying it grows with devvm size --disk but never shrinks
and takes only what the VM writes (new_vm_disk_question). It's this VM's
alone, skipped with --disk, and a disk below the image's or not a size is
refused with Size.Check's and ParseGiB's messages, then asked again.
leftToChoose counts the disk; new_vm_choose and the customize question
name --disk. Tests: TestSizeChoiceAskVM, TestUpCustomize, TestLeftToChoose,
up_customize.txtar. Docs: commands.md, first-vm.md, images.md, devvm.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode 2 keeps its sessions and its logins in one SQLite database,
~/.local/share/opencode/opencode.db (opencode-<channel>.db for other
channels), in WAL mode, so the history export, which tarred
~/.local/share/opencode, carried its credential table (logins, API keys,
MCP OAuth tokens), account and control_account (its console's access
and refresh tokens) and session_share's secrets to this machine, and an
import gave them to another VM. The -wal file carries them too: it holds
full page images of what opencode wrote last, a just-saved credential
row among them, until a checkpoint, and opencode makes it at once.
The export now copies each database in the VM with sqlite3 (base
installs it: sqlite3 on Debian and Ubuntu, sqlite on Alpine), keeping
the sessions: VACUUM INTO (one snapshot, the WAL's rows included); every
trigger dropped; the login tables emptied (credential, account,
control_account, account_state, session_share, and any table whose name
or a column's says it holds a secret, for tables a later opencode adds);
the record of opencode's auth.json import migration taken out, so the
next VM's opencode imports the logins devvm's setup wrote there; WAL off
and secure_delete with VACUUM, so no free page keeps a deleted row; then
the rows counted, and the database left out on any failure or without
sqlite3. tar leaves the database and its -wal, -shm and -journal files
out and adds the copy at its path (--transform, links' targets kept).
The import does the same in the VM to an export it unpacks (one devvm
didn't write may hold the logins): it deletes the -wal, -shm and
-journal files and any database that isn't a regular file, and puts in
the copy, or nothing. Every sqlite3 runs with trusted_schema off.
opencode 1's mcp-auth.json joins the logins left out.
Rejected: excluding the database (loses opencode's sessions);
opencode session export (runs opencode and its server per session, and
per project, which rm's export can't count on).
Security review (security-audit skill, guidance mode, data isolation
and lifecycle): export scope, the WAL, import of an export holding the
logins, a trigger restoring rows and a hostile schema each have a holder
and a test (design.md's threat check). Not covered, documented: a secret
pasted into a session stays in it; a VM without sqlite3 exports no
opencode database; a remake's home copy keeps the database's logins, as
it's the same VM's data going to the same folder's VM.
Tests: TestOpencodeClean (a running opencode's database, its credential
only in the WAL of an open connection, an account's tokens, a share's
secret, a later table's key and a trigger: none in any byte of the copy,
the session kept; a file that isn't a database gives none),
TestHistoryExportRuns and TestHistoryImportCleansOpencode (GNU tar, with
and without sqlite3); the CLI tests' export calls; e2e's network section
plants a key with the VM's sqlite3 and finds neither it nor the login's
placeholders in devvm history export's file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Customizing a new VM shows the four tiers in order, each with what it
reaches (Tier.Desc, which devvm setup's network picker shares), the
summary's tier chosen, through the UI's PickOne (vm.Env.PickOne). Where
the picker can't show, the VM keeps the summary's tier. net_ask,
net_about and net_tier_unknown go; network_default_open, _internet,
_allowlist and _none become net_tier_*; net_tier_help is the picker's.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode 2 keeps its logins in its database's credential table, not
auth.json. When this machine's opencode --version is 2 or later, the
import runs opencode auth export (its output read from stdout, never
logged) and maps each provider's active credential to the store's
opencode format (agentlogin.OpencodeFromExport): an API key as
{"type":"api","key"}, the OpenAI login from a Codex method
(chatgpt-browser, chatgpt-headless, or none for one imported from
auth.json) as {"type":"oauth","access","refresh","expires","accountId"}.
Sign in with ChatGPT, other providers' OAuth and unknown types are left
out with agent_import_opencode_skipped; a failing export fails the
import (agent_import_opencode_failed). opencode 1 keeps auth.json.
Tests: TestOpencodeFromExport, TestOpencode (the new opencode stub),
agent_import_opencode.txtar; AgentImport.Opencode is the seam.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The logo prints from the UI alone (ui.UI.Logo, msg.Reporter's Logo), once
a run, only with stdout a terminal (or a test build's PickOnPipe), not with
--no-input, --json or names mode; its mark green, plain under NO_COLOR. The
CLI reference's pages don't get it: only the root's help func prints it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first run starts with a line saying its questions set devvm's
defaults for every new VM and its base image (first_run_defaults), then
asks new VMs' size and agents and base's features (build's
Choice.Choose, before the summary rather than at the build), then shows
the summary, now headed as this folder's new VM, and asks to customize
it. A base whose features are chosen asks nothing, as before.
new_vm_customize no longer carries its own [y/N], which Ask prints:
TestEveryMessageRenders fails on any message with [y/N] or [Y/n], as
the prompts own them.
Docs: first-vm.md's walkthrough and flowchart, commands.md's questions
table in the first run's order, customizing.md's features question,
images.md's summary and the README.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Chrome, Chromium and Firefox ignore the password in HTTP(S)_PROXY, so in
devvm desktop they asked for the proxy's username and password on every
site. The guest setup now writes devvm-local-proxy, which socat (now in
the desktop layer) serves on 127.0.77.1:3128, the VM's loopback alone.
For each connection it reads the request's head, drops the client's
Proxy-Authorization and Proxy-Connection, adds the VM's password and
sends it to devvm's proxy, then socat carries the rest both ways. It
takes only CONNECT HOST:PORT and absolute http(s):// requests, the
latter with Connection: close, so each connection's one request carries
the password. devvm-desktop starts it and points the Xfce session's
http_proxy, https_proxy, HTTP_PROXY and HTTPS_PROXY at it; on Xfce,
Chrome and Chromium read those, and Firefox reads them first with its
default system proxy setting. A blocked host still gets the proxy's 403.
- proxy.LocalProxyAddr, LocalProxyPort, IsLocalProxyAddr: the one owner
of the address, sent to the guest as DEVVM_LOCAL_PROXY (vm.localProxy).
- vmssh: the port forwarder never forwards a server on 127.0.77.1.
- Tests: netpolicy's TestLocalProxy runs sync.sh's script (bash 3.2 on
macOS) against a fake proxy: the password replaced, Connection: close,
a tunnel, the 403 passed on, origin-form and junk refused with 400
before any connection; TestListeners, TestIsLocalProxyAddr,
TestLocalProxy (vm), sync.txtar. e2e desktop (tests/e2e.sh, still the
bash section): the session's variables, the listener on 127.0.77.1
alone, curl without a password to github.com, example.com's 403 over
CONNECT and plain HTTP, 400 for origin form, nothing on this
machine's 3128.
- Docs: using/desktop.md (Browsers), internals/desktop.md (The local
proxy), design.md's desktop note, ports.md, network.md's setup.
Security review (security-audit skill, guidance mode, local IPC and
proxy request handling):
- Fixed by design: devvm forwards every VM port by default, so a local
proxy on 127.0.0.1 would have put a password-less route to the VM's
proxy, and its secrets, on the host's localhost for every local user.
The forwarder now skips the local proxy's address on every port.
- The password goes only to the VM's proxy, whose address is fixed in
the script, never to an address a request names, in the one header
the local proxy adds; devvm's proxy strips Proxy-Authorization before
forwarding. It's never in a process's arguments (bash builtins only).
- Web pages: requests from a page to the loopback are origin form,
refused with 400 before any connection; a page can't send CONNECT or
an absolute-form line, and DNS rebinding changes only Host.
- No new power in the VM: the same password is in /etc/environment;
the script is mode 700, the VM user's.
- Residual: a program in the VM can hold up to 256 connections slowly
(30 s a line, 100 headers), only against the VM's own browsing; an
ssh -L the user types to 127.0.77.1:3128 would expose it, as any
forward they choose.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm's pinned mise (2026.10.7) resolves aqua's "latest" to GitHub's latest
release, which opencode keeps on its 1.x line (v1.19.5) while it publishes
2.x beside it, so ls-remote lists 2.2.5 but lock picks 1.19.5. The shared
tools' mise.toml holds opencode at "2", which locks the newest 2.x on every
platform (linux-arm64/x64 and their musl entries, the same assets as 1.x).
opencode 2 keeps its logins in its SQLite database and imports auth.json
once, as it makes its credential table. devvm agent login opencode runs
its Codex logins (opencode auth login openai --method chatgpt-browser or
chatgpt-headless), which still post to auth.openai.com/oauth/token with
Codex's client ID, so the capture and the host's refresh are unchanged;
its Sign in with ChatGPT (/api/accounts/oauth/token, a client of its own
and an id_token checked against OpenAI's keys) stays refused by the
proxy's guard. An API key saved into a VM whose opencode has made its
database is imported with opencode auth import (OpencodeKeyImport).
Tests: TestOpencodeKeyImport, the login argv, agent_login.txtar's import
and its failure, the guard on opencode 2's token-sharing path; e2e's
network VM gets opencode and a device-code login against the fake
endpoint. tests/e2e-mise.lock bumped (opencode 2.2.5, claude 2.1.318,
pnpm 12.18.0).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A launch in a terminal checks at most once a day for devvm's newest
release, with upgrade's Source.Check in the background (5 s at most, the
launch waiting at most 1 s more once it's done), and records what it
found in the data folder's cache/release.json (latest, checked, tried;
an offline try keeps what was known, silently). The next launch says
upgrade_available in one line when that release is newer. Nothing
without a terminal, with --no-input, for a source build or for a copy
neither install.sh nor Homebrew installed. Off with config.toml's
release-check = false or DEVVM_NO_RELEASE_CHECK=1. devvm doctor shows
the newest release known (doctor_latest_release, --json's release).
- upgrade: Known, ReadKnown, Due, Newer, Source.Refresh
- settings: ReleaseCheck, KeyReleaseCheck (strict bool)
- paths: Dirs.ReleaseCheck (Dirs' limit 58)
- cli: releaseNotice in up; doctor's Release
- tests: release_notice.txtar, TestKnown, TestRefresh, TestReleaseCheck;
the CLI tests set DEVVM_NO_RELEASE_CHECK=1 by default
- docs: settings (the release check), install, troubleshooting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm upgrade [--check] [--to VERSION] [-f/--force] [--json] installs
devvm's newest release the way this devvm was installed, asking first
(upgrade_confirm, answered by --force). upgrade is a top-level exception
in the cli skill: it acts on devvm itself, not this folder's VM, and it's
the name other tools give the verb. It skips the layout check, as a
layout a newer devvm wrote is a reason to run it.
- install.sh's (<prefix>/lib/devvm/<version>/devvm, which
<prefix>/bin/devvm links to): SHA256SUMS and its .minisig over HTTPS,
the signature checked against the key built in from
packaging/minisign.pub (packaging/key.go embeds the folder; no file,
no key, and upgrade_no_key), the archive's SHA-256, unpacked into
lib/.<v>.new.<pid>, run (--version), renamed to lib/<v>, the link
switched atomically (symlink beside, rename over), run again through
the link, rolled back on any failure; then older versions pruned as
install.sh does (kept: the one that ran, any a running process names,
another upgrade's staging folder).
- Homebrew's (a Cellar/devvm/ keg): brew upgrade devvm, asked first,
through the run log; --to refused.
- Anything else: says how it was installed (a checkout build, go
install, a copy elsewhere) and fails.
- Already latest says so; a newest release older than this devvm is
refused even with --force (rollback); --to installs a named one, older
asked about (upgrade_confirm_older). --check and --json install
nothing.
minisign verification is Go's: ed25519 over blake2b.Sum512 for the
default prehashed ED signature (legacy Ed refused), the key ID, the
global signature over signature||trusted comment, and the trusted
comment "devvm <version>" as scripts/release.sh writes it. Verified
against a signature minisign 0.12 made. golang.org/x/crypto v0.58.0
added for blake2b only (approved; depguard allows only
golang.org/x/crypto/blake2b); MVS raised x/text to v0.43.0 and x/tools
to v0.51.0. mise run vuln: no vulnerability reached; the module-level
GO-2026-5932 is x/crypto/openpgp, which devvm doesn't import.
New: internal/upgrade (Detect, Source: Latest, Check for the release
notice to call, Fetch; ParsePublicKey/Verify; Valid/Compare; Upgrader),
internal/upgrade/upgradetest (TLS release server, minisign signer;
tests only, a structure layer), fetch.Resolve (where a HEAD's redirects
end), fetch.Download's size cap (mise's 256 MiB too). Test-build
overrides: DEVVM_REPO_URL, DEVVM_RELEASE_KEY, DEVVM_RELEASE_CA,
DEVVM_TEST_VERSION; script command release_server [-badsig].
Security review (security-audit skill, guidance mode, a fresh reviewer):
- Prerelease order compared suffixes as text (rc.10 < rc.9), which let
an older signed prerelease past the rollback refusal: fixed, semver
precedence, with table cases.
- No cap on the archive download (a host could fill TMPDIR before the
checksum failed): fixed, fetch.Download takes a limit.
- Two upgrades at once: prune removed another's staging folder: fixed,
.<v>.new/old.<pid> folders are kept while that pid runs.
- A failed rollback of the link was silent: fixed,
upgrade_rollback_failed names the link and the old devvm, and the new
folder stays so the link isn't left dangling.
- QEMU's guestfwd names devvm with commas doubled, which the in-use check
missed: fixed.
- Freeze (a host serving the current version as newest forever): no
boundary crossed, inherent without signed expiring metadata;
documented in internals/install.md.
Checked sound: nothing untrusted runs or unpacks before the signature
and SHA-256; versions from the redirect and --to pass Valid before any
URL or path; tar takes only regular files in its one folder (no links,
subfolders, ..), 512 MiB cap, fixed modes; test overrides are read only
by test builds.
Tests: minisign (real minisign fixture, tampering, legacy, other key),
each install kind against the fake TLS server, bad signature, wrong
trusted comment, replaced archive (wrong SHA), bad archives, a new
devvm that fails before and after the switch, a failed switch (old
kept), a failed rollback, downgrade refused and --to, pruning, Homebrew
via a brew script, Check, Latest's failures, Compare; CLI test
upgrade.txtar.
Docs: getting-started/install.md (Upgrading: how, what it checks, an
older release, --json), getting-started/commands.md (This machine row,
Upgrading devvm, questions, output for scripts), internals/install.md
(devvm upgrade), contributing (release_server), the CLI reference.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude Code logs in from inside a VM, so this machine never needs it, and
devvm keeps one Claude Code login on the host for every VM with Claude
Code: the subscription's OAuth login, or a Claude Code token from claude
setup-token. The newest replaces the other. The VM holds placeholders
alone, so claude /login in a VM no longer leaves real tokens there.
- Capture: every VM's proxy captures at platform.claude.com and
console.anthropic.com /v1/oauth/token (agentlogin.Endpoints), only for
a VM whose image has Claude Code (netpolicy.Capturer). setup-token's
code grant (expires_in, agentlogin.SetupToken) gives the claude secret
(agentlogin.ClaudeToken, secrets.Token's checks) and the VM the
secret's placeholder. Any other code grant goes in the store's
.claude/.credentials.json (a File of kind agentlogin.ClaudeOAuth:
claudeAiOauth accessToken, refreshToken, expiresAt ms, scopes); the
VM's reply holds sk-ant-oat01-devvm-proxy-managed-oauth-<salt> and a
managed refresh token, and the VM's own refresh is answered from the
store. Refused: a new login without user:inference (Console), any
login or refresh with org:create_api_key, an access token that isn't
sk-ant-oat01- shaped.
- One login: saving the claude secret (captured or devvm secret set
claude) removes the OAuth login, and an OAuth capture deletes the saved
token, both under the claude logins folder's lock
(agentlogin.LockFolder); a token that can't be deleted is a warning.
CLAUDE_CODE_OAUTH_TOKEN in devvm's environment wins, as in Claude Code
(secrets.ClaudeOf(store).Login). A launch gives the VM either
CLAUDE_CODE_OAUTH_TOKEN or ~/.claude/.credentials.json (placeholder,
managed refresh token, expiry 2099), never both. Both bindings
(claude, claude-oauth) go into Authorization for api.anthropic.com
while either login exists, and Store.Get gives each the login devvm
keeps now, so a running VM survives the switch.
- Refresh: the host refreshes the OAuth login when due, JSON to
platform.claude.com with Claude Code's client ID and the login's
scopes, through the company proxy (proxy.RouteOf), under the file's
lock; claude_refresh_failed says to log in again.
- devvm agent login claude [--setup-token]: claude auth login --claudeai
or claude setup-token in the VM without CLAUDE_CODE_OAUTH_TOKEN, the
code pasted back on this terminal (no forward); the VM is set up again
once the store has a new login of the kind asked for
(secrets.ClaudeOf(store).Sums); claude_env_token_wins when the
environment's token wins. --device-code, --api-key and --stdin are
usage errors with claude, --setup-token without it.
- Confirmed in Claude Code 2.1.317's linux-arm64 bundle (sha256 checked):
TOKEN_URL platform.claude.com/v1/oauth/token, client ID
9d1c250a-e61b-44d9-88ed-5944d1962f5e, the JSON code and refresh
bodies, setup-token's expires_in 31536000 and user:inference scope,
the claudeAiOauth fields, the anthropic-beta oauth-2025-04-20 header
Claude Code sends itself, claude auth login's pasted code#state on
stdin. The real claude auth login logged in in e2e against the fake.
- Messages: agent_login_claude_paste, claude_login_saved,
claude_setup_token_saved, claude_env_token_wins,
agent_login_claude_flag, agent_login_setup_token_alone,
claude_refresh_failed, claude_no_login; no_claude_token,
claude_token_invalid, claude_token_howto and not_setup_token point at
devvm agent login claude.
- Tests: TestClaudeCapture, TestClaudeSetupToken, TestClaudeOAuthGet,
TestCaptureRefuses' Claude cases (agentlogin); TestOneClaudeLogin,
TestClaudeBindings, TestClaudeOAuthVMCopy (secrets); TestCapturer's
Claude cases (netpolicy); agent_login.txtar's Claude section;
network.txtar's bindings.
- e2e (network): the fake company proxy fakes Claude's token endpoint
and Anthropic's API too; setup-token's request makes the claude secret;
devvm agent login claude runs the real claude auth login, the store
keeps the login, the claude secret goes, the VM holds placeholders and
no token, the API gets the store's token for the VM's placeholder; a
due login makes the host refresh through the company proxy (which
fails there, as the host doesn't trust the run's CA).
- Docs: Claude Code login (using/coding-agents.md), first VM, the home
page, README, commands, settings, safety/network.md, internals
network.md, the design note's risk that this path is unofficial,
Contributing's e2e, the proxy README; the CLI reference.
Security review (security-audit skill, an independent read):
- Fixed: a login granting org:create_api_key would let a VM make an API
key through the binding and get it unread: refused, on refresh too.
- Fixed: a refresh could install a Console login when the store had
none: the scope check applies to every new login.
- Fixed: any VM, without Claude Code, could replace the login or delete
the token with a refresh grant: only a VM with Claude Code captures.
- Fixed: two captures at once could leave neither login: one lock.
- Fixed: a saved token that couldn't be deleted gave the VM a 502 for a
saved login: a warning instead.
- Fixed: captured and refreshed access tokens are shape-checked.
- Accepted, documented: the bound login reaches every api.anthropic.com
path its scopes allow (profile, sessions); any VM with Claude Code can
replace the login; a token Claude Code mints in a VM for another use
(install-github-app) becomes devvm's login.
- Unconfirmed: whether another Anthropic host also answers
/v1/oauth/token (it would pass unguarded).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refusals and help that need a person now say 'in a terminal without
--no-input', as no_terminal_fetch and no_terminal_delete did: each
message names the command to run, so the condition sits in it rather
than being added by UI.Refused. size_pending is for a stopped VM;
size_pending_running keeps the restart hint for a running one. setup's
size question goes through a Reporter the tests make (msg.Fake).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ask setting is gone: a new VM's summary shows its tier (--network,
else the saved tier, else allowlist) and customizing it asks for the
tier, with Enter keeping the one shown, so ask added nothing.
- settings.NetworkChoices is the tiers alone; settings.NetworkDefault
(allowlist) replaces NetworkAsk, checked against netpolicy.TierDefault.
- chooseNet takes --network, then the saved tier; customize asks for the
tier whenever --network didn't give it (netpolicy.Proxy.Choose takes
the tier shown, and net_tier_unknown names it).
- devvm network -g ask and devvm setup's ask choice are gone; ask is a
usage error (arg_not_choice). net_ask_global and network_default_ask
removed.
- A saved "ask" in config.toml or settings.json is refused like any
value that isn't a tier.
- Docs: safety/network, using/settings, using/images, getting-started
commands and first-vm, the cli skill, devvm network's and up's help.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm agent login codex|opencode logs the agent in from inside this
folder's VM, so this machine never needs Codex or opencode, and devvm's
agent store keeps the login for every VM with the agent. It sits under
devvm agent beside import and save: it fills the store, as they do, and
a bare devvm login would read as a verb on the VM itself.
- Browser login (the default): the agent's own login runs in the VM on
this terminal (codex -c cli_auth_credentials_store="file" login;
opencode auth login --provider openai --method "ChatGPT Pro/Plus
(browser)"), and devvm forwards this machine's localhost:1455, and
1457 (Codex's fallback) when free, on 127.0.0.1 and ::1, to the same
ports on the VM's loopback, only while the login runs: closed when it
ends, fails or is interrupted (AddCleanup), and an interrupt also ends
the agent's login in the VM (its pid kept in ~/.cache/devvm-login.pid),
so its server doesn't linger for the VM's port forwarder. Port 1455
taken on this machine: refused, naming --device-code.
- --device-code: codex login --device-auth, or opencode's headless
ChatGPT login; nothing forwarded.
- --api-key [--provider anthropic|openai|openrouter] [--stdin]: the key
is asked for on this machine (msg.Question answered by --stdin) and
saved in the store, never in the VM: Codex's auth.json becomes
{auth_mode: apikey, OPENAI_API_KEY}, opencode's gets the provider's
{type: api, key} beside the others; the running VM gets its copy with
a placeholder and its proxy the binding at once.
- The proxy's capture (agentlogin's capturers) saves ChatGPT logins;
devvm then confirms what the store saved, with the account's email,
and fails when the login saved nothing new.
- opencode 1.19.5 has no Anthropic OAuth in its core (no Anthropic
plugin among its built-ins), so there's no pasted-code capturer:
Anthropic is an API key. opencode's OpenAI login listens on 1455 only;
Codex 0.166 on 1455, falling back to 1457.
- vmssh: SSH.ForwardLoopback (LoopbackForward: listeners in devvm's own
process, each connection its own ssh -W to the VM's 127.0.0.1, no
master; ErrPortTaken).
- agentlogin: KeyProviders, File.SetKey, File.ChatGPT.
- secrets: Store.SaveKey, LoginSum, ChatGPT (loginsDir shared with
Capture).
- vm: AgentLogin (agentlogin.go), LoginAgents.
- cli: agentlogin.go (--device-code, --api-key, --provider, --stdin,
--here/--parent); usage errors before anything runs.
- assets/guest/sync.sh: cli_auth_credentials_store = "file" first in
the VM's ~/.codex/config.toml on every launch.
- Messages: agent_login_* and agent_key_*; codex_no_key,
codex_no_chatgpt, codex_refresh_failed and opencode_refresh_failed
point at devvm agent login.
- Tests: agent_login.txtar (usage errors, no VM, no agent, device code
argv, browser forward and its end, the agent failing, a login saved
while it runs, port taken, interrupt, API keys, the VM's copy failing,
no terminal, an empty key), unit tests for the forward, SetKey,
ChatGPT, SaveKey, the confirmation and the argv; coverage baselines
raised.
- e2e (network): the real Codex's login in the VM against the run's
fake token endpoint, its callback opened through the forward, the
store's tokens and key, placeholders in the VM, the forward gone; an
interrupted login takes its forward away.
- Docs: Logging in with devvm agent login (using/coding-agents.md),
the Commands page, the questions table, Contributing's e2e, the cli
skill's tree, AGENTS.md; the CLI reference.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm agent save [AGENT...] reads the folder's VM's agents' settings,
shows what differs from devvm's agent store and, after a yes, saves them
there for every VM: import's other direction. It always asks, with no
flag that answers (RefusedWith), so without a terminal or with
--no-input it shows the diff and is refused; devvm starts a stopped VM
for it.
What it reads (a fixed list, the agents asked for only): agentFilesOf
(Claude Code's settings.json and CLAUDE.md, Codex's config.toml and
AGENTS.md), agentDirsOf (skills, agents, commands, output-styles,
plugins with marketplaces; prompts, skills), opencode's config folder's
entries but node_modules and lock files, and ~/.claude.json's subset
(claudeTopKeys, reduced by jq in the VM and again on the host, never its
per-project entries). Never a login (.credentials.json, auth.json) or
history. The guest script sends it as a tar stream; a folder that's the
store's own mount (the link to it) is no change.
Every byte from the VM is untrusted, checked on the host (readSent):
- the stream bounded: 128 MiB, the command cancelled past it; its
stderr into the run log, at most 1 MiB
- at most 20,000 entries, a file at most 16 MiB (its header first)
- paths relative, clean, valid UTF-8, only characters a terminal shows
(no control, format, bidi or zero-width), each once, only in the
list, each inside a folder the stream has (nothing below a link):
anything else saves nothing
- only files, folders and links; other kinds left out with a warning
- links never written: one inside its settings folder to a file there,
by relative paths through real folders, at most 8 hops, becomes a
copy; any other is left out, the store's copy kept
- modes normalized: 600, or 700 when executable; no set-id bits
- every file written with state.WriteFileMode; folders replaced in
place (pruneStore through an os.Root), files the VM lacks kept
- every settings file parsed whole (Redact's decode), left out when it
doesn't parse
- placeholders never saved: agentlogin.Restore puts the store's value
back only where the VM's copy (the store's file redacted again, or
for .claude.json the VM's salted claudeVM copy, as every VM gets)
had the same placeholder at the same path and its table and the one
above are unchanged; else the file is left out. A placeholder in any
other file leaves it out; opencode's withheld files, which no VM
gets, are left out.
The diff (data output): each file's lines against the store's, settings
files and .claude.json redacted on both sides so it never prints a
secret, a folder's A/M/D list then each added or changed file's diff, a
mode change line, every character a terminal wouldn't show as \u{HEX},
binary files named only, a file over 1 MiB or 10,000 lines and lines
past 20,000 as counts. Then agent_save_runs: every VM runs the hooks,
MCP servers' commands and plugins saved.
Security review (security-audit skill, guidance mode, an independent
read): nothing reaches outside the store, follows a link, or sends a
store secret to another host. Findings, all fixed here:
- folder files showed only as A/M/D names, so a changed hook or
script went in unseen: their diffs are shown
- invisible Unicode (tag characters, zero-width) passed
msg.Printable into the diff: shownLine escapes every non-graphic
character
- names with bidi or format characters spoofed the diff's headers:
refused in entryName, headers escaped too
- the diff could use GBs of memory on 16 MiB files of newlines: per
file and total caps
- Restore's rewritten JSON/TOML hid a change among reformatted lines:
both sides are diffed as rewritten
- the VM's stderr went into the run log without limit: 1 MiB
- quadratic work over many opencode folders: entries indexed by folder
- an execute-bit change showed no line: a mode line
Found in my own review: the diff printed the store's secrets in
context lines (now redacted), and a VM could replace opencode files
it never got, such as a .env (now left out). With captured logins,
HasPlaceholder also knows the JWT-shaped placeholders (fakeJWT's
devvm-placeholder signature, now jwtMark), so a captured token's
placeholder copied into a settings file is never saved; the save never
writes Codex's or opencode's auth.json or Claude Code's
.credentials.json, which the capture keeps in the logins store.
- agentlogin: Restore, PlaceholderError, HasPlaceholder, ClaudeSubset,
ClaudeTopKeys; Redact and ClaudeCopy share decode/encode
- vm: AgentSave (agentsave.go), readSent, listedPath, resolve,
agentSaveScript (agentsave_read.go), lineDiff, shownLine
(linediff.go); opencodeFolder/opencodeFile from agentDirs/agentFiles
- cli: devvm agent save, with --here/--parent
- messages: agent_save_no_agent, agent_save_none, agent_save_nothing,
agent_save_ask, agent_save_runs, agent_save_refused, nothing_saved,
agent_settings_saved, agent_save_unsafe, agent_save_too_much,
agent_save_link_left_out, agent_save_kind_left_out,
agent_save_unparsed, agent_save_placeholder, agent_save_withheld,
agent_save_not_read, agent_save_failed
- stub: agent-save.tar, the VM's stream
- tests: agentsave_test.go, linediff_test.go, restore_test.go,
testdata/script/agent_save.txtar; e2e project (refused, then saved,
never the login or a link out) and network (MCP header put back,
refused once its URL changed)
- docs: coding agents (saving a VM's settings), commands, attack
vectors, internals network (saving the copies back), contributing,
the cli skill's tree, CLI reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every VM runs a proxy and is on one of four tiers, so the proxy's messages
name the VM's proxy, the unenforced ones its network tier, and the
redaction ones say devvm keeps secrets on this machine on every tier.
Message IDs are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Before devvm makes a new VM it shows a summary of what the VM gets:
each toolchain, coding agent and layer with why (the file that calls for
it, devvm setup, config.toml or the flag that gave it), its size, network
tier and ports, and the devcontainer.json it's made as. Where the picker
shows (CanPick) and something is left to choose, it asks
"Customize it? [y/N]": Enter makes the VM as shown; y opens the picker
(a part a flag gave greyed out), then the network tier question when no
tier is given or saved, then the VM's CPUs and memory (for this VM
alone). Without a terminal or with --no-input the summary ends with the
flags that choose others. The summary replaces new_vm_gets and
devcontainer_using. devvm's first run asks its size and agents first,
as before, then shows the summary.
A test build's DEVVM_PICK_ON_PIPE shows the picker with a terminal on
stdin alone, so testscript's ttyin reaches it (up_customize.txtar).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every VM gets its CA, its proxy setup and placeholders, whatever its
tier, so even an open VM never holds a real secret: a request that goes
around its proxy carries only the placeholder.
- vm/sync.go: the open branches of stage go (the agents' logins copied
as they are, the ClaudeCopy for unconfined VMs and its MCP warning,
real values in ~/.config/devvm/env); stageNet is stageSecrets, run
for every VM, and the salt is every VM's.
- netpolicy: Prepare readies the CAs, salt and secret files on every
tier, and the proxy config carries the CAs and bindings on every tier;
dropCA and its caller are gone, so a VM keeps its CAs as its tier
changes.
- Removed without a caller left: the messages secret_unuse_copied,
net_on_old_tokens and claude_mcp_secrets_copied;
secrets.Store.ClaudeCopy and MCPSecrets; agentlogin.MCPSecrets,
claudeSecrets and argsHoldSecrets; settings.CompanyProxy.ConfigOnly.
- Tests: TestPrepareOpen (open has CAs, salt, secrets; CAs kept across
tiers), TestInterceptOpen (an open proxy puts secrets in, 421 for
another host), TestStageSecretsEveryTier (every tier's setup sends
the VM's CAs, the guard against a tier's own path); sync, ca, network
and secret scripts for open VMs.
- e2e: network checks that an open VM holds no real secret (its proxy
puts the token in over TLS the VM verifies, a direct request carries
only the placeholder and gets a 401); project checks an open VM's
placeholder, and its company-CA checks allow for the VM's own CAs in
/etc/ssl/devvm.pem.
- Docs: safety/network (tiers, secrets), internals/network, the design
note's tiers threat check, attack vectors, coding agents, first VM,
staying safe, contributing; devvm secret's help.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The command line names the four network tiers. --network TIER (open,
internet, allowlist or none) chooses a new VM's tier, checked before
anything runs (arg_not_choice). devvm network open|internet|allowlist|none
gives the folder's VM a tier through Net.SetTier, and devvm network -g
takes the tiers and ask. config.toml's and settings.json's network is ask
or a tier (settings.NetworkChoices, checked against netpolicy.TierNames
by a test, since settings can't import netpolicy).
The question on creation is Proxy.Choose(vm): net_about says what each
tier reaches, net_ask asks for one (Answer, AnsweredBy("--network")),
Enter or a refusal gives allowlist, and an answer that isn't a tier is
warned of (net_tier_unknown) and asked again. devvm setup's picker
offers ask and the four tiers (network_default_open, _internet,
_allowlist, _none). On an existing VM, --network is ignored with the
devvm network TIER command that changes it.
devvm network --json: policy is the tier or unenforced, and each policy
file whose denies alone apply (internet and none) has denies_only: true,
as the text output's "(denies only)", so a script can tell a file's
denies from all of its rules without knowing the tier rules.
Messages reworded: net_tier_backend (--network open), net_open_policy
(devvm network allowlist), net_about, net_ask, network_default*,
net_default_failed, network_failed, setting_already's and
widen_parent_vm*'s descriptions. safety/network's "Choosing a tier"
replaces its on/off section; docs, the cli skill, testscripts and e2e
use the new forms, and e2e's internet and none checks go through devvm
network.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A VM's network is one of four tiers, open, internet, allowlist and none,
in its state's net section (netpolicy.Tier), in place of on/off. Every
VM has its proxy. Confined tiers start on NetProxy; open starts on the
backend's own network with its proxy set in the guest
(Confinement.GuestProxy): on Lima no Seatbelt profile and no QEMU
wrapper, the proxy at 192.168.5.2 on both hosts, propagateProxyEnv off.
The proxy: Config.Open (every host and address, no floor, no
policies), Config.DenyPolicies (files whose denies alone apply), the
rule port :* (any port), and ** matching address literals (the floor
still holds). Policies per tier (netpolicy.PolicySet): internet is
network/internet.policy (**:*) plus your denies; none is the agents'
built-in policies, the secrets' hosts and your denies; open none.
Links: a client links only to a target on its tier or a stricter one,
and a group's VMs are all on one tier. The self-check per tier: open
asks its proxy through the guest's settings and warns
(net_proxy_unreachable). devvm ls and devvm network show the tier. A
backend without egress-proxy offers open alone (net_tier_backend).
devvm network on/off and --network-policy/--no-network-policy map to
allowlist/open. Design note, threat check and docs; e2e in the network
and link sections.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
A question's answer read once the run is interrupted is its refusal, so an
answer typed in the moment after Ctrl+C never lets a deleting command go
ahead. An interrupt no longer waits returnGrace for a command that waits
at a question: its read doesn't end at Ctrl+C (the UI counts the
questions waiting, asking).
One message for a failed export that keeps the VM: export_failed_kept
(command, vm) replaces remake_export_failed, rm_export_failed and
rm_vm_export_failed; devvm rm VM's case gets a CLI test.
no_terminal_delete and no_terminal_fetch no longer say there's no
terminal, as --no-input and the end of the input refuse them too;
no_input says to use its answer; --force's help names --no-input.
Tests: TestAnswerAfterInterrupt, TestSignalsDontWaitForAQuestion,
rm_vm.txtar's failed export.
Co-Authored-By: Claude Opus 5.5 <[email protected]>