brendoncarroll
Joined 6 years ago
Joined 6 years ago
https://github.com/brendoncarroll/nnc
I use it for running agents locally.
nnc run /usr/bin/opencode --preset agent
You can make your own presets (which nnc looks for in ~/.config/nnc/presets) or use one from the standard libraryhttps://github.com/brendoncarroll/nnc/tree/master/presets
Presets are written in Jsonnet, and resolve to a list of things to pass through from the parent process into the container. Presets can reference other presets, so you can build up arbitrary rules for passing files and devices into containers, give those rules a name, and reference them later.
It looks like this treats files as blobs just like Git, and trees as single objects which fit in memory. Assuming that is a correct understanding, this core abstraction would need to change to handle large files and directories well.
All the well known version control systems do this though, and it simplifies the system significantly. It's the right model for source code, but it doesn't translate well to arbitrary data.
I have a project[0] that does the large file thing well, but is missing most of the version control porcelain. I've been looking for the path of least resistance to integrate it into something with a larger user base.
Got is built on Blobcache, which is a general-purpose transactional storage layer and E2E encrypted backend.
Yeah, totally agree. Got has not solved conflict resolution for arbitrary files. However, we can tell the user where the files differ, and that the file has changed.
There is still value in being able to import files and directories of arbitrary sizes, and having the data encrypted. This is the necessary infrastructure to be able to do distributed version control on large amounts of private data. You can't do that easily with Git. It's very clunky even with remote helpers and LFS.
I talk about that in the Why Got? section of the docs.
Notable differences: E2E encryption, parallel imports (Got will light up all your cores), and a data structure that supports large files and directories.
The approach I started taking is mounting the directory, that I want the agent to work on, into a container. I use `/_` as the working directory, and have built up some practices around that convention; that's the only directory that I want it to make changes to. I also mount any config it might need as read-only.
The standard tools like claude code, goose, charm, whatever else, should really spawn the agent (or MCP server?) in another process in a container, and pipe context in and out over stdin/stdout. I want a tool for managing agents, and I want each agent to be its own process, in its own container. But just locking up the whole mess seems to work for now.
I see some people in the other comments iterating on what the precise arguments to bubblewrap should be. nnc lets you write presets in Jsonnet, and then refer them by name on the command line, so you can version and share the set of resources that you give to an agent or subprocess.
All of the complexity lives on the client. That makes a lot of sense for a package manager because it's something lots of people want to run, but no one really wants to host.
My email is on my website.
[ my public key: https://keybase.io/brendoncarroll; my proof: https://keybase.io/brendoncarroll/sigs/fYaonvrG14Nua37nuEegQ1J9jl0b0RYIc3PyBRtwbjE ]