WIP: feat: Hermes confined to act only as an Endo guest #1

Draft
dckc wants to merge 7 commits from endo-guest into main
pull from: endo-guest
7 Commits
Author SHA1 Message Date
dckc 3f9ba54477 feat: Endo-compatible host, downloads folder, Nix tools PATH
- the fake host serves a subset of @endo/agent-mcp-stdio's catalog,
  with its names, schemas and answers; evaluate takes only
  E(name).method(arg, ...), and __getMethodNames__
- demo.py --host endo: a real Endo daemon (endo-but-for-bots, llm),
  its guest served by the package's broker
- a downloads folder: the host writes, Hermes reads at ~/Downloads;
  BindReadOnlyPaths on Linux, a virtiofs share on macOS
- .#demo-tools: Hermes and the checks get their whole PATH from the store
- each run saves its MCP messages and a transcript
- the guide: tools as system calls, names as file descriptors;
  no Linux networking, but WebApps
- grants match a named URL before "download"

Generated-by: Claude Opus 5.5
2026-11-29 23:15:06 -06:00
dckc 783e4c595f feat: teach the guest call, WebApps and define; install through the host
- guide/endo-guest.md, served as the MCP resource endo://guide: names
  and messages, toybox-style call, WebApps, define, and moving bytes
  over host.sock from the shell.
- The fake host gains call, define (toybox's modules-and-slots shape,
  recorded for the host) and a WebApp narrowed to one URL, with
  getBase64 for bytes, since toybox's fetch device answers text.
- demo.py --task install: with a real model, Hermes installs six and ms
  with no network but package-index WebApps its host grants; on macOS
  under sandbox-exec with outbound network denied. Checked by importing
  both from where Hermes put them.
- Temp cleanup logs, rather than fails, when Hermes's detached helpers
  are still writing.

Generated-by: Claude Opus 5.5
2026-11-29 17:14:02 -06:00
dckc cfffe56cce feat: the Inference Cooperative as the example upstream, and a live demo
- services.hermes-guest.reasoningEffort (and mkDarwin's): DeepSeek V4.1
  takes only low, high, xhigh or max, and rejects Hermes's default.
- The README's examples use gateway.inference.coop and
  deepseek-flash-tee, its TEE-hosted DeepSeek, which supports tool
  calling.
- demo.py takes an optional MODEL and PROXY command: each connection to
  Hermes's model port is handed to PROXY as its stdin, as launchd and
  systemd hand them to llm-proxy.py, and only the outcome is checked.

Generated-by: Claude Opus 5.5
2026-11-29 16:58:56 -06:00
dckc d58b77aa89 feat(sandbox): an empty root, by NixOS confinement
The filesystem was the one part of the sandbox that started from the
host's view and hid places from it (/run, /var/lib, /tmp, /home), so
the argument had to assume no sockets elsewhere. Both units now start
from an empty root: their closure (fullUnit, so PATH's packages too),
/bin/sh, the state directory and the two sockets, and nothing else.
socat is added to Hermes's closure by hand, since only config.yaml
names it.

CONTRIBUTING's table now has one row for files and sockets by path,
and the "sockets the sandbox doesn't hide" caveat is gone.

Generated-by: Claude Opus 5.5
2026-11-29 16:51:19 -06:00
dckc 6d48662c94 docs: condense CONTRIBUTING; status moves to the PR description
Generated-by: Claude Opus 5.5
2026-11-29 16:44:28 -06:00
dckc 052a9dc640 docs: CONTRIBUTING, with the argument for Hermes's confinement
How to check a change (doctests, the demo, evaluation), and a
Confinement section: the claim, why it assumes nothing about Hermes or
its config, each channel a process could use and what closes it, what
the two sockets grant, the VM's added boundary, what's not claimed, and
what has and hasn't been checked, with a probe for a running host.

Generated-by: Claude Opus 5.5
2026-11-29 16:37:03 -06:00
dckc a4b704a38c fix(sandbox): one sandbox for every process running as Hermes's user
- The LLM bridge runs as Hermes's user but saw the host's /run. Where
  same-uid ptrace is allowed, Hermes could take it over and reach any
  socket there. It now gets Hermes's sandbox, with only llm.sock.
- A socket on a read-only mount still accepts connect(), so
  ProtectSystem=strict doesn't hide sockets under /var/lib. /var/lib is
  now empty, with the state directory bound back in.
- ProtectProc=invisible and ProcSubset=pid: other processes, and their
  command lines, are out of sight.

Generated-by: Claude Opus 5.5
2026-11-29 16:36:13 -06:00