51 lines
2.7 KiB
Markdown
51 lines
2.7 KiB
Markdown
# Sausage v3
|
|
|
|
Sausage is a world of WASI programs and durable agents. The Rust host combines a process table, a shared virtual filesystem, and a durable JavaScript harness. Agents and their programs see the same world. The filesystem prevents mistakes, not attacks between agents. The host credentials manager is the intended security boundary. Coordination (branches, subagents, reviews, the lander) runs as world extensions.
|
|
|
|
Read [Run Sausage](docs/RUNNING.md) for the console, approvals, models, extensions and the known gaps.
|
|
|
|
## Build and run
|
|
|
|
```sh
|
|
nix build
|
|
result/bin/sausage init /path/to/world
|
|
result/bin/sausage run /path/to/world
|
|
result/bin/sausage sh /path/to/world -c 'echo hi | tr a-z A-Z; git --version'
|
|
```
|
|
|
|
The package includes the userland bundle.
|
|
At world creation, the host copies its tools into `/bin` as `<command>.wasm` files.
|
|
The bundle ships plain source files. `sausage init` creates their repository in `/src/sausage` with one commit on `main`.
|
|
The world config lives at `/etc/sausage/config.yaml`.
|
|
It defines the providers, main agent name, and shared system prompt.
|
|
Run `sausage init`. Set `providers.<name>.api_key` in that config, then run `sausage run`.
|
|
The host and chat start with empty keys. A model request with a missing key names the config file.
|
|
Provider API keys in that file are intentionally visible to agents. Other managed secrets stay outside the world.
|
|
Agent definitions live in `/etc/sausage/roster/<name>.md`, with YAML frontmatter and a role prompt as the body.
|
|
Project definitions live in `.sausage/roster/*.md`.
|
|
The chat and console use the configured main agent conversation. A rename keeps that conversation.
|
|
Model, prompt, roster, and provider edits apply at the next run without a host restart.
|
|
|
|
The host creates `world/` for the shared filesystem and `host/` for private runtime state under the supplied directory.
|
|
Services come from `/etc/systemd/system` in the world. `web.service` serves fresh `/srv/www` files on port 8080.
|
|
Use `http://localhost:8080` for chat, passkeys, approvals, and secret entry.
|
|
The first-passkey notice opens the Passkeys view. Pending requests link to `/#approve/ID`.
|
|
The `/api/` mount forwards to `host.sausage`, including NDJSON streams. The host opens no separate port.
|
|
|
|
## Repository
|
|
|
|
- `host/`: the Rust host, process table, and durable harness. Its checked-in JavaScript bundles need no npm during a Nix build.
|
|
- `vfs/`: the shared virtual filesystem and WASI adapters.
|
|
- `userland/`: the default tools and patched Brush source, in the root Cargo workspace. `bundle.nu` builds them for `wasm32-wasip2`.
|
|
|
|
## Development
|
|
|
|
```sh
|
|
nix develop
|
|
cargo test -p sausage -p sausage-vfs
|
|
nu userland/bundle.nu
|
|
nix flake check
|
|
```
|
|
|
|
The development shell provides Rust with `wasm32-wasip2`, wasmtime, and wasm-tools.
|