Repository navigation
Let an agent's image build install from a host folder - #976
Merged
Merged
Conversation
lavaman131
force-pushed
the
nvx-install-from
branch
from
November 21, 2026 12:04
69e7670 to
bfa0cfa
Compare
An image's build runs install scripts in a microVM with no credentials, so it can't install anything a registry serves only to a signed-in person. `chopin connect --install-from <dir>` names a folder the owner filled on the host, such as packages fetched with `npm pack` under their own sign-in. Each build of an image made from `--install` or `--planner-install` gets a copy of it, read-only at `/install-from`; no agent's microVM gets it. The copy is readable by the build's own user whatever the folder's modes, holds files and folders only (a link is refused rather than followed), and must match what was read for the image's key, which now includes each file's path, content and executable bit. A changed file builds the image again; moving the folder doesn't. The folder is saved by its absolute path for the service, and is refused when it is missing or no install command could read it. Co-authored-by: Alex Lavaee <lavaman131@github.com>
lavaman131
force-pushed
the
nvx-install-from
branch
from
November 21, 2026 12:06
bfa0cfa to
630dbd4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #975 (merged; this is rebased on main). An agent's image build runs install scripts in a microVM with no credentials, so it can't install a package a registry serves only to a signed-in person. This adds
chopin connect --install-from <dir>: a folder the owner fills on the host (for example withnpm packunder their own sign-in), which each image build reads read-only at/install-from.What changes
--install-from <dir>is saved by its absolute path with the other connect settings and given to the service. It is refused before anything is paired when the folder is missing, or when there is no--installor--planner-installcommand to read it.--installor--planner-installcommands is built with a copy of the folder, shared read-only at/install-fromwith the build's microVM. No agent's microVM gets it, and the image's start check gets no share either.nobodyin the release's layer) whatever the folder's own modes, so a private folder such as~/.something(0700) works.docs/chopin-cli.md(Coding agents, the sandbox options table, Commands) anddocs/nvx-sandbox.md(Images). The Coding agents section now also says wherenpm install -gputs a package in the image (/opt/chopin/agent/lib/node_modules/<name>), so an agent command can name its package root.Tests
images.test.ts: the key changes when a file changes, is added, moves or becomes executable. The copy is exactly what was digested and is 0644/0755 from a 0700 source. A link is refused.main.test.ts: the folder is saved by its full path, and is refused when missing or when no command reads it, before anything is sent to Chopin.nvx-vm.test.ts(real KVM): an image whose install copies a program from a 0700 host folder runs that program in its guest, and an agent's guest has no/install-from. All 9 real-VM tests pass locally on KVM with NVXv0.1.0-dev.c753e7b4c288(57 s, including both image builds).bun testinapps/connector: 415 pass, 26 skip (the VM tests, without/dev/kvmin that shell).bun run typesandbun run cipass.