20 Commits
Author SHA1 Message Date
w3cjandClaude Opus 5.5 ddb06b1ea7 docs(skills): the codebase-standards skill, a short checklist from what reviews kept finding, and how new code matches the codebase
A new project skill, .agents/skills/codebase-standards/, curated from
what reviews of devvm's whole history kept finding. A standard stays
only when it recurred or was costly, and a contributor can apply it
while writing or reviewing; what the linters and the structure test
enforce is only in rules.md's guard tables.

- SKILL.md: the checklist of 13 standards in four groups (safety,
  failures and processes, changes, tests), a Match the codebase
  section (names and files, comments, errors, dependencies as fields,
  table tests, scripts in the VM, prose), how to review a change, and
  the bar for adding a standard.
- standards.md: one section per standard, with its rule, what the
  reviews found and its guard:
  - Fail closed, on every path (a weaker mode only when visible,
    documented and chosen, as the proxy's warn-and-run without a
    sandbox)
  - Bound what you don't control (listeners, locks, overflow, a capping
    writer that doesn't embed its buffer)
  - Treat what a VM can write as hostile (descriptors, signed sources
    and re-hashing, escaping, host tools by absolute path)
  - Keep secrets and host data on the host (no argv or shared
    environment, allowlists into the VM, logs redacted)
  - Parse once, with a real parser (IPv6 and its IPv4-carrying forms)
  - Never fail silently, and name the real cause
  - Give every process an owner that ends it (accept loops included)
  - Survive a kill and a second devvm (one good copy, OS file locks)
  - Extend the owner, and wait for a third copy (an existing owner is
    always extended; a copy of a judge gets one owner at once)
  - Mind what's already running and released
  - Claim only what the code does, where precision belongs (headline
    pages keep their short claims)
  - Prove each fix with a test that fails without it (outside oracles,
    controls for absence checks, sandboxes proven by attack)
  - Write tests that pass on any host, at any load
- rules.md: the rules whose home is AGENTS.md or Contributing, by area,
  each with its guard or review only.
- AGENTS.md: a rule line for the skill and its row in the layout, and
  the owner rule's wait-for-a-third clause, which Contributing's
  structure page explains.
- Contributing's first paragraph links the skill.
- The docs-voice skill's scope, .vale.ini, mise run lint:docs
  (markdownlint and Vale) and TestCommandLines cover the new skill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 07:50:54 -07:00
w3cjandClaude Opus 5.5 cb36951de2 refactor(git-protect): drop strict, convert strict VMs to on
devvm git-protect strict (0.1.0, 0.1.1-rc.1) set diff.ignoreSubmodules =
all in the locked .git/config, which can't keep git on this machine out
of a submodule the VM adds: a .gitmodules ignore line the VM writes
overrides it, and git add -A/-u, describe --dirty, diff-index,
diff-files, fetch and pull recursion and --ignore-submodules on the
command line enter submodules anyway (#37). --clone is the only way to
keep VM code away from host git.

- devvm git-protect takes on|off; strict is a usage error
  (git_protect_strict_refused) naming devvm clone on. Use, help,
  completion (Modes) and --json reflect it.
- A VM left strict reads as on (Mode, Next) and is pinned and kept as on.
  The first check that finds it stopped (Check, then converter.unstrict:
  launches, devvm stop, devvm clone on and its undo) removes the value all
  from the .git/config of each repo its state recorded before that check,
  under the host's git lock, and only where .git's identity is the
  recorded git_id (a replaced .git, or a VM with no record after devvm
  adopt, is left alone, its all named with the manual remedy:
  git_strict_unknown). Each config is read through safefile first,
  unlocked for the edit and locked again even after an interrupt
  (context.WithoutCancel), and checked to still be a regular file in that
  .git afterwards (git_lock_raced). On a watching host, a config whose sum
  isn't the check's is left, and the new sums go into the watch's. An
  interrupt records nothing. Then on is recorded (mode and next) with one
  warning (git_strict_converted), none when next is off. Set on/off and
  Unlock (devvm rm) remove it the same way, silently (strictLeft).
- strict recorded nothing about a value it overwrote, so nothing can be
  restored: only all is removed (--unset-all '^all$'); any other value is
  the user's and stays. This fixes off, which unset any local value.
- A config another VM keeps locked keeps it, named with the manual
  remedy (git_strict_kept, via msg.M.Value), and its repo goes in the
  state's strict_left, retried at each later stopped check until empty.
  A config git can't change is named (git_strict_left).
- Messages: git_locked and git_embedded_new say what on can't stop;
  git_locked_strict and git_config_failed go.
- Docs: .git protection's Strict section becomes VMs that were strict,
  with the remedies; on and Not covered say a submodule or repo the VM
  adds runs through host git until the next check names it, and only
  --clone keeps VM code away; attack vectors, How it works, the design
  notes, the commands table, ls, the cli skill and the CLI reference
  follow.
- Tests: strict_test.go (conversion, values kept, off/on/unlock, nested,
  kept and retried, replaced and unrecorded .git, interrupted, next off,
  changed since the check, Linux pins and sums, Watch, next, a failed
  edit), TestUnstrictFIFO, msg TestValue, git_protect.txtar,
  git_pins.txtar, fixture_v010_strict.txtar (0.1.0's app VM made strict
  on macOS), e2e project checks on macOS and Linux.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 07:20:00 -07:00
w3cjandClaude Opus 5.5 01e5d2488a feat(network): rules by HTTP method and path, and secrets by method
A policy rule for a host name can narrow it to some of its requests:
`api.github.com GET,HEAD /repos/` in a policy file, written by devvm
network allow, deny and rm from --method and --path. Allows add up and a
deny beats any allow, as for every rule, so narrowing a host that a rule
allows whole, such as devvm's built-in GitHub, takes a deny:
`devvm network deny api.github.com --method POST,PUT,PATCH,DELETE`, or
`devvm network deny github.com --path '/*/*/git-receive-pack'`. An allow
by method and path for a host already allowed whole warns that it
narrows nothing and names the deny.

The proxy decrypts such a host's HTTPS on :443 with the VM's CA, refuses
its tunnels on other ports and without a CA, and judges every request on
the connection, kept-alive HTTP/1.1 and HTTP/2 alike, every absolute-form
one, and the shared Nix cache's own fetches. A connection's verdict and
whether its requests are judged come from one read of the policy files.
A blocked request gets 403 and a blocked event with its method and path;
devvm network log shows it, and an allowed one's forward event names the
rule that let it through.

One matcher, internal/proxy/request.go, judges rules and secrets'
bindings: methods from a closed list (RFC 9110's, PATCH, QUERY; never
CONNECT); the methods a request names besides its own (every
override-like header in any spelling, `_` for `-`, and the query's
_method), each word judged, and while a rule narrows by method, a value
that isn't exactly one method refused; path patterns with *, ** and a
last / for everything below; and only a path in plain form. Allows and
bindings match strictly, denies broadly: any case, every path that isn't
plain, the prefix above a trailing /, and a last segment cut at its first
dot (/admin.json, /admin.). A method devvm doesn't know isn't a rule, so
a typo in a deny is a broken deny. Upgrades other than WebSocket and
CONNECT inside a decrypted tunnel are refused for narrowed hosts.

devvm secret set takes an optional --method (none for every method), and
a secret's --path takes the same patterns, marked path_pattern in
custom-secrets.json; a saved path with a * from before is refused rather
than read as a wildcard. The bindings file stays version 1 while every
binding reads alike to an older proxy, so devvm secret set and rm after
an upgrade don't take a running older proxy's bindings away; a binding
with methods or a pattern makes it version 2, which such a proxy refuses
instead of putting a value in for every method, and writing one warns
for each such VM. devvm network allow, deny and rm warn, naming the VM,
when a rule by method and path changes while the VM's proxy runs from
another devvm binary, or one devvm can't tell. A query with a ; or one
Go can't read whole is refused while a rule narrows the host by method,
and denies also match each segment with its trailing dots dropped. An
allow that narrows nothing names the VMs, with -g by each VM's own
allowlist, and says when it narrows only port 80's plain HTTP.

- proxy: match, Methods, ParseMethods, PathOK, plainPath, matchPath,
  overrides, overrideLike, server.judgeRequest; parseRule/parseHostRule,
  CanonicalRule, NarrowRule, Narrowable, hostRules (rulesFor, verdict,
  byRequest, judge, unjudgeable), egress.checkHost,
  Allowlist.CoversWhole, trimDots; Binding.Methods, BindingListVersion
  2 when needed (v1Binding);
  pathWithin and PathPrefixOK folded into match; the Nix cache judged
- netpolicy: Rule(rule, deny, methods, path), NarrowedHost, sameRule,
  Proxy.Allowlist, Proxy.NarrowNotes, Proxy.OtherBinaries, BasePolicy,
  Proxy.SecretsWritten (after RefreshSecrets and devvm agent login
  --api-key's write);
  FormatEvent shows a blocked request's method and path and a forward's
  rule
- secrets: Def/Secret/customJSON Methods, path_pattern, CheckMethods,
  CheckPath on proxy.PathOK
- vm: RuleChange, PolicyChange(ctx, rules, RuleChange)
- cli: --method and --path on network allow, deny and rm, --method on
  secret set, METHODS in devvm secret and "methods" in its --json
- messages: bad_request_path (was bad_secret_path), bad_methods,
  rule_not_narrowable, rule_narrows, rule_narrows_nothing,
  rule_narrows_http_only, rule_narrows_unknown, proxy_other_binary,
  secrets_other_binary
- tests: TestParseRuleNarrowed, TestMatchPath, TestDenyBypasses,
  TestAllowNarrowed, TestCoversWhole, TestForRequestMethods,
  TestInterceptRules and TestInterceptSecretMethods (HTTP/1.1 kept alive
  and HTTP/2), TestNarrowedNotDecrypted, TestNixCacheRulesByPath,
  FuzzDenyBypass (paths, methods, headers, _method), TestRule,
  TestNarrowedRules, TestOtherBinaries, TestRefreshSecretsOtherBinary,
  TestNarrowNotesUnreadable, TestDefine's path of /, TestReadBindings'
  versions,
  TestCustomsUnreadable's prefix path, network_narrow.txtar (narrows
  nothing), secret_custom.txtar's --method; on 0.1.0's frozen state:
  TestV010Bindings, TestV010ProxyConfig, TestV010Rules (0.1.0's
  TestParsePolicy and TestDecide, frozen), fixture_v010_network.txtar;
  e2e network: netRequestRules
  and the basic secret's --method GET,HEAD
- docs: safety/network.md's Rules by method and path, the secrets'
  flags and an example, internals/network.md's Requests by method and
  path, the design note replacing the open-work entry, attack vectors,
  the commands page, internal/proxy/README.md, the CLI reference

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 21:38:23 -07:00
w3cjandClaude Opus 5.5 8f6b30a887 feat(secret): your own secrets, bound to the hosts you choose
devvm secret set NAME --host HOST[,HOST…] --env VARIABLE [--header H]
[--prefix P] [--stdin] saves a secret of your own: the value from a hidden
prompt or stdin (never argv) into the Keychain or devvm's secrets folder,
and its definition into custom-secrets.json. A VM that uses it (devvm
secret use NAME) gets only a per-VM placeholder in VARIABLE, and its proxy
puts the real value in that header only for those exact hosts, over TLS on
443; the hosts join that VM's allowlist. Names, hosts, headers, variables
and prefixes are checked; wildcards, addresses, internal names and other
ports are refused. One placeholder builder serves every secret and login,
and the proxy caches values by kind, agent and name.


After an independent review, a secret goes in only in four exact shapes
(alone; Bearer, Token or a saved --scheme in Authorization; the Basic
password; the Basic username only with --basic-user), values are
printable ASCII under 3,800 bytes, the proxy checks each binding against
its definition, definitions carry IDs and VMs record their hosts, and
custom values are stored apart from the known secrets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 14:22:42 -07:00
w3cjandClaude Opus 5.5 2b68a2347c feat(gitprotect): .git protection on Linux without root, through a user namespace around QEMU
On Linux, a start of a VM whose protection is on pins .git, its git dirs
and every lock path read-only in a user and mount namespace that devvm
_qemu pinned makes around QEMU. It keeps the pins while QEMU runs, records
each re-pin, refuses hard links and fails closed on watches and records;
doctor says why a host can't lock, and such hosts watch .git instead. The
pins' events file is read through safefile, and the command-line check
takes "devvm lock" in prose as English.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 10:06:17 -07:00
w3cj 9d4de9e92f docs: shorter getting started, with managing VMs, the command line and upgrading in using/ 2026-11-06 06:06:31 -07:00
w3cjandClaude Opus 5.5 2545de19f3 test(e2e): the Go runner is the entry point, mise run e2e -- FLAGS, and tests/e2e.sh goes
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]>
2026-11-06 01:56:50 -07:00
w3cjandClaude Opus 5.5 b4b19759c5 feat(guest): a guide to devvm in every VM, for the agents in it, and devvm-help
Every launch sends assets/guest/guide.md with the guest setup, and sync.sh
installs it as /usr/share/doc/devvm/README.md (root's, mode 644, again
whenever it differs) with /usr/local/bin/devvm-help, which prints it. The
guide covers what a devvm VM is, network tiers and secrets, tools and
installs, and the host commands to ask the user for. TestGuideCommandLines
checks that the guide is among TestCommandLines' files and that each devvm
command and flag it names exists. Docs: using/coding-agents.md's The guide
in every VM. e2e: the project section checks the file's owner and mode,
devvm-help's output and that the VM's user can't write it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 01:04:39 -07:00
w3cjandClaude Opus 5.5 39c2ff4f4e test: one Go multi-call stub for every host command
The 18 shell stubs in testdata/stubs (about 600 lines, limactl 337 of
them) are one Go binary, internal/stubtest/stub, which acts as the command
it's run as (argv[0]): limactl, docker, security, ssh, ssh-add, ssh-agent,
ssh-keygen, qemu-img, qemu-system-aarch64, qemu-system-x86_64, chflags,
tmutil, sw_vers, uname, open, code and mise, and stub, scripts' commands
on the stubs' state. stub-log is gone: each stub logs its call itself, in
one write to $STUB_LOG, its arguments on no other process's command line.

- internal/stubtest builds the binary once, into
  $TMPDIR/devvm-stubs-<hash> (its sources and Go's version) with a link
  per command, which every test process and later run reuses until the
  sources change; a day-old folder of another build is removed.
  stubtest.Bin, stubtest.Command (DEVVM_HOST_MISE's path), and Stubs'
  VM, Size, VMs, Keychain and SetKeychain on the state.
- internal/stubtest/stubstate: the stubs' state, $STUB_DIR/state.json,
  typed JSON under a file lock (Lima's instances with their status, size
  and config, the Keychain, the SSH agent and its keys, Time Machine's
  exclusions, the tools build VM's folder). The instances file wasn't
  locked; TestCreatesAtOnce and TestUpdatesAtOnce make 20 and 50 changes
  at once.
- guest.go is the VM behind limactl shell and ssh alike: a --clone VM's
  git on vmfs, a remake's home, a base build's packages, the setup's tar,
  the direct connection, host keys, a forwarder's ports, link forwards.
- A link session's master listens with a backlog of one and never
  accepts, as the Perl one did, so a killed session's socket reads as
  stale once probed (link_life). TestScript's cleanup stops the sandbox's
  masters by their -M -S arguments.
- Structure: the stubtest layers cover internal/stubtest/..., the binary
  and its state import nothing else of devvm's; execSites lists
  internal/stubtest/build.go and internal/stubtest/stub/process.go.

Renamed switch: hostkeys-fail is hostkeys-fails. Moved into the state:
instances, size-<vm>, config-<vm>, keychain/<account>, agent-up,
agent-held, tm-excluded and tools-out; scripts use stub vm, vms, size,
keychain, keychain-set, agent and agent-stop instead (build, existing,
from, gc, gc_orphans, images, ls, net_interrupted, rebuild, rm_vm,
secret, size, space, ssh, ssh_agent, up).

Tests: stub_test.go (every stub in-process, TestShellWords),
stubstate_test.go, TestBuild, TestCreatesAtOnce, TestState; the lima,
platform, vm, tools and build tests use the state helpers and
stubtest.Command. Coverage: internal/stubtest/stub and stubstate added,
stubtest, build and tools raised (and lima, netpolicy on Linux).
Docs: contributing (Stubs: the binary, logging, the state and the stub
command, switches, the guest, adding a stub or a switch; Go test
helpers; the layers), testing.md; AGENTS.md's stubtest and testdata rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 00:00:12 -07:00
w3cjandClaude Opus 5.5 3649978bdb feat(build): base's features are devvm's own; your extras are layers
devvm reads base's features only from its own files (assets/features):
~/.config/devvm/features is no longer a folder devvm knows. An extra of
your own for every new VM is a layer of yours (devvm layer new), chosen
with devvm setup --layers, which each VM's list can uncheck.

- build: Features returns devvm's features alone; featureStep gives each
  its prelude; FeatureScript, the shadowing check and its
  feature_shadowed warning are gone. A chosen name devvm has no script
  for is skipped with unknown_feature, as before.
- paths: Dirs.Features is gone.
- Tests: TestFeatures, TestOwnFeatures, TestPickFeatures,
  TestSetFeatures, TestBuildRunsFeatures and the key tests use devvm's
  features only and check that a script in ~/.config/devvm/features is
  neither a feature nor in any key; features.txtar likewise.
- Docs: customizing's Extras of your own (a layer chosen in devvm
  setup), settings, install, space, overview, internals/images and the
  landing page drop the user features folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 17:16:41 -07:00
w3cjandClaude Opus 5.5 f4ad9c2c3d feat(vm): devvm update makes an outdated VM again from its image's new build, keeping its home and settings
devvm update [--force|--no-export|--clean-home] (internal/cli/update.go)
is the shared remake with the VM's own image name: Lifecycle.Update calls
toRemake, decides with build.Builds.Outdated (WarnIfOutdated's check, now
its owner) whether the chain's keys changed, says vm_current and does
nothing when they didn't, else names what changed (vm_changed) and calls
remakeTo. --from VMs are judged on the recorded digest and built with
build's lookup. The remake's flags are one adder (addRemakeFlags) for
devvm layer add and devvm update. vm_outdated names devvm update.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 19:47:49 -07:00
w3cjandClaude Opus 5.5 ae0fd533fc refactor(msg): names mode is the UI's, read once with each stream's style
A msg.M always renders as its text: String, Error, Parts and Segments no
longer read DEVVM_MESSAGES, and Line is gone. internal/ui reads names mode
in newStyle, with each stream's color, and shows messages as names through
the style (message, segments, line, valueParts). ui.New takes the function
it reads the environment with, so tests make a names-mode UI without
t.Setenv. Messages shown as data go through UI.Text or Table.Text (doctor
--json, ls's image cell, setup's network choices); vm.PickRow.Desc is a
msg.M that cli renders. A config.toml value's refusal keeps its message
(state.CorruptError.Msg, Shown), so fail shows its names in names mode.

Tests: ui TestNamesMode; state TestFiles covers Msg and Shown; Go tests
compare NamesOf or Names, and drop t.Setenv("DEVVM_MESSAGES") outside ui,
msg's TestNames and the testscript runner. The structure test lists
DEVVM_MESSAGES in internal/ui/style.go only; ui.UI's method limit is 47
(Text).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 17:01:47 -07:00
w3cjandClaude Opus 5.5 79b3ef94d4 refactor(cli): one backend: no --backend flag, no BACKEND column
devvm runs every VM on Lima, so the command line has no backend choice:

- --backend is gone from devvm, build, rebuild, images, images rm, gc,
  space, doctor and setup (addBackendFlag, addBackendFilterFlag, setup's
  own, checkFlagValue's case, its completion); a removed flag now fails
  as an unknown flag (exit 2).
- devvm setup no longer asks for or saves a default backend; config.toml
  and settings.json have no backend key (settings.KeyBackend, Values and
  Defaults' Backend, checkBackend, Value.With, Source.File, FromFlag).
- Tables lose BACKEND: ls, images (both tables), space (both tables);
  doctor's FEATURE table is FEATURE and SUPPORT for Lima. space's images
  row is freed by images rm.
- --json keeps every backend field (ls, images, tool records, space,
  doctor's backend, backend_source "built-in" and every backend's
  features).
- The registry keeps Lookup, For and Default: For(d, vm) gives a VM its
  recorded backend and a new VM NewVMs, else Default; tests set NewVMs.
  vm.Env's lookups lose the flag parameter, found.flagIgnored and
  Options.Backend.
- Messages removed: backend_unknown, backend_unknown_default,
  default_backend, backend_help, doctor_backend_from,
  backend_flag_ignored; backend_unknown_vm stays (a VM's recorded
  backend), linked to backends#a-vms-backend.
- Docs: Backends' choosing section becomes "A VM's backend"; settings,
  setup, images, gc, space, doctor, commands and install pages lose
  --backend and BACKEND; Contributing gains "How a backend plugs in".
- Tests: unit tests for For, settings, setup, doctor's table, the
  tables; CLI scripts check --backend as an unknown flag on devvm,
  build, restart, images, gc, space, doctor and setup, and a config.toml
  backend key as unknown; e2e's table checks lose the column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 12:46:28 -07:00
w3cjandClaude Opus 5.5 1917072228 refactor(backend): remove the Docker backend
devvm is about VMs, and Docker's containers aren't VMs: Lima is the
default backend and smolvm stays experimental. The backend architecture
(Backend, Caps, Require, the registry, backendtest.Fake) stays, so
another backend is an addition.

Removed:
- internal/backend/docker, its registry entry and Names/Experimental's
  docker half; devvm _docker-connect and _docker-ports
  (internal/cli/dockerssh.go); assets/docker/unpack.sh.
- Test-build overrides DEVVM_DOCKER_KIND, DEVVM_DOCKER_PROC_SYS,
  DEVVM_LINUX_BUILD_URL/_SHA256, the registry.linuxURL/linuxSHA256
  ldflags vars and the CLI tests' Linux-build archive (linux_release).
- Interfaces only Docker implemented, with their callers:
  backend.ProxySocket/ProxySocketOf (the proxy's -listen-unix),
  DiskUser (ls's and size's disk-over warning, size's disk_used and
  --json disk_used_gib), Reporter (doctor), LeftoverLister and Leftover
  (gc --orphans' volumes, networks, containers and images),
  DockerLayerVM and VMSpec.DockerLayer, SSHTarget.ProxyCommand and
  vmssh.SSH.Proxy, vmssh.SSH.SessionArgs, CacheEntry.Name.
- The docker layer's runtime on a backend that makes VMs for it:
  vm/dockerlayer.go, KeyDockerLayer, chooseNet's refusal (chooseNet
  returns a bool now), the refusals at start and devvm network on, ls's
  "(sysbox)" and --json docker_layer, size_disk_default_unused.
- The proxy's relay mode (relay.go, -relay, -relay-to, -listen-unix).
- paths.Dirs.Docker and paths.VM.Lifeline.
- assets/guest/tools.sh's linked-folder branch; services.sh's
  DEVVM_LOOP, DEVVM_DOCKERD and DEVVM_SSHD=inetd.
- Messages: every docker_* the backend used, docker_layer_runtime,
  net_docker_layer, net_off_docker_layer, committing_image,
  pulling_image, unpacking_tools, disk_over, size_disk_default_unused,
  gc_orphan_volume/_network/_container/_image, docker_connect_failed;
  gc_orphan_elsewhere reworded.
- Tests: docker.txtar, the docker stub's engine (its --from half
  stays), the ssh stub's login-shell branch; e2e's --backend docker,
  --engine, the docker host VM and Docker Desktop runs.
- Release: one GoReleaser pass, no Linux-build pin in the macOS builds,
  no Linux devvm in the Homebrew formula's libexec. Linux builds stay.
- Docs: backends/docker.md and internals/docker.md, design.md's Docker
  notes, the Docker column of the feature table, and every page's
  mentions of the Docker backend, Docker Desktop as one, and Sysbox.

Kept: the docker layer in Lima VMs, devcontainer docker-in-docker,
--from with images only a local Docker has, Docker Hub references.

State written by a Docker VM before this reads as an unknown backend
(backend_unknown_vm).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 10:26:07 -07:00
w3cjandClaude Opus 5.5 34e2e5ef5a feat(cli): devvm WORD naming a toolchain, agent or layer points to its flag
devvm node said "Did you mean devvm code?", which misleads anyone who
means the tool. When the unknown word, or each name in it joined with +
or a comma, is a toolchain, an agent or a layer (devvm's own or the
user's), the usage error is no_command_part, with the flags that choose
them: devvm node+claude -> devvm --tools node --agents claude. Any other
word keeps the did-you-mean over the commands (msg.Closest). The names
come from partNames, which checkPartFlag reads too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 07:06:06 -07:00
w3cjandClaude Opus 5.5 a134e0d8a6 feat(cli): choose a new VM's toolchains, agents and layers in a picker or with --tools, --agents and --layers
devvm takes no IMAGE word any more than any other: in a terminal a new VM's
toolchains, coding agents and layers are checked in one picker, under three
headings, before the network-policy question; --tools, --agents and
--layers (each an exact list, or none) skip it, and a part left out takes
its default: the detected toolchains, devvm setup's agents, no layers (a
devcontainer.json's features still count). Without a terminal, or with
--no-input, the VM gets the defaults and new_vm_gets says so in one line.
devvm setup --agents (and its first-run question) chooses new VMs' agents.
devvm tools in a terminal opens the same picker for the VM, its layers
fixed, and turns the changes into tools add and rm.

An image is base and layers only: tools are the VM's tool_names state key.
build, rebuild and images rm refuse a shared tool (tool_not_layer), and
devvm build builds no tool images. devvm ls gains a TOOLS column and
--json tools. gc's --tools is --tool-images, so --tools has one meaning.

Gone: image.Reserved, checkWord's image half (devvm WORD is no_command or
no_command_like, did-you-mean over commands, msg.Closest), the lacks path
in internal/vm/existing.go, and the messages vm_lacks_tools,
vm_lacks_layer, layer_is_command, layer_name_command, no_image_for,
no_command_or_image*, tools_not_images, tools_not_images_rm, detected,
vm_is_now (vm_tools_now), secret_with_image (secret_with_claude).
New: ui.Pick takes headed sections with fixed rows, ui.CanPick,
vm.PickPart/PickRow/AgentsChoice/CheckPart (internal/vm/parts.go),
state.KeyToolNames, state.ReadAgents/WriteAgents, paths.Dirs.Agents,
project.DetectFiles. Image keys are unchanged in form: images never held
tools; docker.sh's and nix.sh's comments changed, so those layers rebuild.

Docs: the home page's quick start steps, diagram (sandbox.svg), cards and
FAQ; README; getting started; using (images' What a new VM gets, coding
agents' Running an agent, settings' agents); internals; contributing;
the cli skill; AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 00:45:09 -07:00
w3cjandClaude Opus 5.5 ddbc377f8f test: testscript commands for the scripts' setup, and a coverage baseline per package
script_test.go's sandbox sets DEVVM_MESSAGES=names and DATA, VMS, RUN
and CFG by default, and adds stub_reset, catg (the one file a glob
matches), vm_name VAR NAME (the folder's VM) and project NAME [git];
script_cmds.txtar checks each. Every script is rewritten onto them, its
assertions kept; TestCommandLines leaves the scripts' own commands out.

mise run test runs scripts/test.sh: the tests as before, with the CLI
tests' devvm built with -cover for every package (CLI_GOCOVERDIR),
merged with the Go tests' counters by go tool covdata, then
scripts/coverage.sh holds each package to testdata/coverage/<os>.txt.
mise run coverage raises the baselines; coverage.txtar checks the
comparison. The macOS baseline is recorded from this tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 14:25:09 -07:00
w3cjandClaude Opus 5.5 665b9f3b22 feat(group): devvm group, group join NAME and group leave: VMs that reach each other's published ports by name, through links
A group's links are links in each member's state, marked as the group's
(a sixth field, ,group), so the link session, the proxy's list and every
connection check treat them as any link. Membership is each member's own
state (group, group_as), so a VM made again is in none.

- internal/vm/groups.go: Groups (Show, Join, Leave), groupLinks (pure:
  the user's links kept and taking precedence, a link per published port
  of each other member, one address per member kept across changes),
  sync/syncVM/change (records, names what each member gains and loses,
  applies to running members), clashes warned.
- All or none: join refused by network policy (group_policy_on/off);
  devvm network on/off refused for a member (group_policy_mixed).
- One group at a time (group_other); names unique in a group
  (group_name_taken, group_name_host); a member whose hostname is
  another's name gets no links to it (group_link_name_host).
- CheckLink refuses a group's link once the two aren't in one group
  (ungrouped); leave removes the leaver's own group links first; join
  again works every member's links out again; link rm refuses a group's
  link that still applies (link_from_group).
- Publish/unpublish, link add/rm and devvm rm reach the group's links.
- Docs: using/links.md Groups, the Commands page, safety/network.md,
  internals/ports.md, the design note's Groups section and threat check;
  the CLI reference.
- Tests: groups_test.go, testdata/script/group.txtar, JSON shape; e2e:
  three VMs in a group and the all-or-none refusals in the link section
  on every backend.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 16:01:54 -08:00
w3cjandClaude Opus 5.5 4ea141b918 feat(link): devvm link, link add, rm, publish and unpublish, with their state and checks
Links between VMs' commands and state, without anything carrying a
connection yet.

- state: every VM gets a random ID (KeyID, "id") when CreateVM makes it.
- vm: Links (links.go) lists, adds and removes the folder's VM's links
  (KeyLinks, "links": NAME,PORT,TARGET,TARGET_ID,ADDR entries) and
  publishes and withdraws its ports (KeyPublish, "publish"). Each target
  gets one address in 127.77.0.0/16 per client, the lowest free. CheckLink
  says why a link doesn't apply (gone, replaced, unpublished, policy).
- project: Matching (which sshconfig.Alias now uses), IsPath, ForDir and
  Targets resolve a link's TARGET: a path, a VM's name or a folder name.
- cli: link.go, in the Links between VMs group; --json on devvm link and
  devvm link publish; --as checked with the other flag values.
- Messages: no_vm_link, link_failed, link_port_invalid, link_ports_invalid,
  link_unknown_target, link_ambiguous_target, link_self,
  link_not_published, link_policy_mismatch, link_name_invalid,
  link_name_host, link_name_taken, link_target_named, link_exists,
  link_added, link_trust, link_removed, link_not_found, link_port_taken,
  published, unpublished, port_not_published.
- Docs: the Links between VMs table on the Commands page, the CLI
  reference, AGENTS.md and the cli skill's tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 06:13:15 -08:00
w3cjandClaude Opus 5.5 4a81a4246e fix(cli): the last stale command lines, and a test that checks every one
TestCommandLines (internal/cli/commandlines_test.go) reads every devvm
command line in the repo: docs (the CLI reference too), README, AGENTS.md,
locales/en.toml, Go comments and strings, assets/, install.sh,
tests/e2e.sh, testdata scripts and stubs, scripts, packaging, workflows
and the skills (5722 lines in 606 files). Each command must exist, each
flag must be one that command takes, a placeholder must be one its Use
shows and a flag's value the form its help shows, and a reserved word
after a command with commands of its own must be one of them. Lines
written to be typed (code blocks, code spans, testscript exec) get their
values checked with checkFlagValue and, with nothing to fill in, run in
the stubbed tree, where they mustn't be a usage error. Lines written to
show a refusal are in refused, each with why. TestCheckCommandLine checks
it finds each kind of stale line. mise run test and lint:docs run it;
Contributing's The CLI rule tests says what it checks.

Fixed: gc_older_than_needs_history said --older-than AGE (DURATION);
no_vm_ports said devvm --ports LIST (the flag's form is PORTS); the guest
agents' note read "(devvm network policy)" as a command (devvm's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 05:33:47 -08:00