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
This commit is contained in:
1 parent
cfffe56cce
commit
783e4c595f
4 files changed
+361
-31
No files matched your search
+4
-1
@@ -8,6 +8,7 @@ How to check a change, and why the confinement holds. For what this is and how t
|
||||
- [nix/linux-host.nix](nix/linux-host.nix), [nix/llm-proxy.nix](nix/llm-proxy.nix): on Linux, the host's systemd serves the unit's two sockets.
|
||||
- [nix/vfkit-vm.nix](nix/vfkit-vm.nix), [nix/darwin-host.nix](nix/darwin-host.nix): on macOS, the same unit in a microVM, with its sockets relayed over vsock to launchd.
|
||||
- [llm-proxy.py](llm-proxy.py): the inference proxy, which holds the API key.
|
||||
- [guide/endo-guest.md](guide/endo-guest.md): what a guest can do (names, messages, `call`, WebApps, `define`, and moving bytes over `host.sock` from the shell). A host serves it as the MCP resource `endo://guide`, with `HOST_SOCK` filled in.
|
||||
- [test/](test/demo.py): unmodified Hermes against a fake host and a scripted model.
|
||||
|
||||
## Checking a change
|
||||
@@ -21,10 +22,12 @@ python3 demo.py path/to/hermes path/to/socat # ends with PASS
|
||||
With a model and a proxy command, a real model drives it, through [llm-proxy.py](llm-proxy.py) as deployed. For example, with an [Inference Cooperative](https://docs.inference.coop/guides/api-access/) key:
|
||||
|
||||
```sh
|
||||
python3 demo.py path/to/hermes path/to/socat deepseek-flash-tee \
|
||||
python3 demo.py --model deepseek-flash-tee path/to/hermes path/to/socat \
|
||||
python3 ../llm-proxy.py https://gateway.inference.coop/v1 path/to/key
|
||||
```
|
||||
|
||||
Add `--task install` to ask Hermes to install `six` and `ms` with no network but the package-index WebApps its host grants; on macOS it runs under `sandbox-exec` with outbound network denied. It passes when both import from where Hermes put them.
|
||||
|
||||
The demo leaves Hermes's detached helpers running; look for them with `pgrep -fl hermes_cli`. After a change to `nix/`, evaluate both platforms:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in new issue
Block a user