Commit

44e1b98

replying to @dtinth
Not yet, sorry for the confusion. That was only a test that the port can be bound; it closed at once, and nothing is listening. I was not allowed to start smbd myself. Run the steps (with smb ports = 445) and then connect, or tell me to start it and approve the prompt.
Done, in ~/smb (smb.conf, run, pitchfork.toml; state goes in ~/smb/state):
sh
cd ~/smb
pdbedit -s smb.conf -a -u dev   # once: your SMB password
pitchfork start smb
…
Fair point, done: ~/smb/run now runs sudo apt-get install samba when smbd is missing, so pitchfork start smb works after a recreate too. The password survives, since it is in ~/smb/state on the home volume.
Q1, the root: what is a "component"? Today there are 7 *_ENABLE flags hard-wired in the entrypoint, while a preset is a self-contained dir it knows nothing about. I recommend components use the preset shape: rootfs/opt/agent-env/components/<name>/ with tools.toml, a daemon…
Definitely in the same image, yes. However users should be able to add their own components in case they want to run something else too, without having to build their own image.
Q2, where user components live and what they may run as. A built-in one may need root (sshd, the desktop, rootless dockerd). A user one is just files in a volume. I recommend user components live in ~/.config/agent-env/components/<name>/, the same shape as built-ins, on the home…
Almost everything. Looking at what runs here: Must stay root (the core, not components): - sshd: it logs you in as dev - the gateway (caddy + oauth2-proxy as gateway): an edge hole must not land in the account with sudo, and dev's code must not read its secrets - the…
Agree. Please look at all the core and components. What are the common things it need to do? For example, I might want to set up a daemon that runs whenever this container runs. I would have to configure pitchfork myself, etc. So I am thinking of something more convention-based.…
Surveyed everything. The glue every piece repeats: 1. an enable flag 2. a daemon (user pitchfork), with readiness (port/cmd/http) and sometimes depends 3. a loopback run script reading env with defaults 4. a gateway route under /~env/<name>, prefix stripped or passed through 5.…
- I wonder if we can get rid of the preset and make it also a component. - component.env - how about toml? - run - I think this can link to a folder with pitchfork.toml so we can run pitchfork on it. - I don't like the *_ENABLED env. Maybe better to have it not run in the…
1. Presets as components: yes. opencode becomes a component that claims / . vanilla is simply "nothing claims /". PRIMARY_COMMAND becomes a tiny built-in component. One rule: at most one component may claim / . 2. TOML: yes, component.toml. 3. pitchfork.toml in the folder:…
Sounds good. It should support symlinking. agent-env-component.toml? I think we should also have some kind of support for startup script or hook which runs before we start user-level pitchfork. Then this would let me write script that provision. I would put it in a compose…
Good. agent-env-component.toml it is: distinctive, so a repo root can be a component by itself. Symlinks: work, with one catch I just tested. pitchfork names daemons after the link's target, so components/smb -> ~/src/my-repo shows up as my-repo/web. pitchfork.toml has a…
Agree. Also want an easy way to install a component, so maybe agent-env component install . which idempotently creates a symlink. Name is defined in toml and it refuses to replace a symlink if already installed but points to different folder unless --force? It should lint stuff…
Agree on all of it: - agent-env component install . reads the name from agent-env-component.toml and symlinks ~/.config/agent-env/components/<name>. It's a no-op if the link already points here, refuses if it points elsewhere unless --force. Plus uninstall <name> and list. - Lint on install and at boot: the toml parses, the name is a valid identifier, pitchfork.toml's namespace = "agent-env-<name>". The prefix earns its keep: pitchfork errors on namespace collisions, so it keeps a component from clashing with a /workspace/smb project. - Has a pitchfork.toml = has daemons. No file, no daemons (e.g. a tools-only component). systemd: no. It needs to be PID 1, with cgroup access and a privileged container, and all of it as root. pitchfork already gives us userland supervision. Question: does install take effect right away (start its daemons, and add its /~env/ route by reloading the gateway through sudo), or only on the next container start? I recommend right away, with the same code the boot path uses, so there's one path and you see a lint error immediately.

commit 44e1b98