Approvals could only name recipients listed in the broker's config, so host keys showed abbreviated. The builder already evaluates the main branch's rules; take names from the SSH keys' comments there too (`ssh-ed25519 AAAA… shill`), which age ignores. Every path's keys count, so a key added to a secret is named as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 KiB
slop-broker design
slop-broker lets coding agents use credentials they must never hold: deploy and SSH keys, the
age identity for secrets, a binary cache and DNS API tokens. Agents send it requests through the
slop CLI, and it carries out each one under a policy, usually after a human approves it from a
terminal, the web app or the phone.
The usual setup runs agents in a VM (the agents' VM) and the broker on the box that hosts it
(the broker's box), outside the agents' reach. Agents on other boxes can use it too (see
Other requesters and approvers). The reference deployment is
nixfiles, whose docs/slop-broker.md describes how its boxes use
the broker.
Status: the core, the box queries, slop ssh, the SSH transport, deploys, builds, age
secrets and the approvals web app are implemented. The other operations here are
designed but not built yet (see Planned operations). How the code is put
together is in architecture.md; the NixOS and home-manager modules are in
nix/modules.
Requests at a glance
Every request names an operation, which the requester's policy answers with deny, auto or
ask. What happens before that answer depends on the kind of request, because approvers should
see what a request really does, and that sometimes needs a look at the repository first.
flowchart TD
request["Request from slop"] --> kind{"Kind"}
kind -- "query, ssh" --> approve
kind -- "secret" --> lookup["Builder reads the main branch:<br>what the file is, its recipients"] --> approve
kind -- "deploy, build" --> describe["Builder fetches the commit:<br>commits and diff (Git only)"]
describe --> gate{"Approve use of the builder"}
gate -- "approved" --> build["Builder builds; deploys also<br>copy to the nodes and compare"] --> approve
gate -- "denied" --> denied["Denied"]
approve{"Approve the request:<br>auto, a lease or a person"}
approve -- "approved" --> run["Broker runs it with its credentials"]
approve -- "denied or expired" --> denied
- Box queries and SSH (
status,logs,failed,ssh)- Before approval: nothing. Approvers see the command.
- Once approved: the broker runs it over SSH and streams the output.
- Secrets (
secret keys|set|generate|rekey|read)- Before approval: the builder reads the main branch, so approvers see which file the content really is and whether the recipients match the rules.
- Once approved: the broker decrypts, changes and re-encrypts, and returns the new ciphertext.
- Deploys (
deploy)- Before approval: the builder fetches the commit, and approvers first allow it to build (they see the commits and diff). It builds, and the broker copies the result to each node and compares it with what's installed, so approvers see package, unit and file changes.
- Once approved: the broker activates on every node.
- Builds (
build)- Before approval: as for deploys, up to building. Approvers see each output's size.
- Once approved: the broker pushes the outputs to the binary cache.
requests: the requester's own pending requests and leases; always allowed.
Pending requests go to every approver at once: the web app (with Web Push)
and slop-approve. How the code does it is in
architecture.md.
Trust model
| Part | Trusted with | Because |
|---|---|---|
| The agents' VM and other requesters | Nothing | Everything in them is agent-controlled, including root |
| The broker | Every credential; it runs each privileged step itself | It's outside the agents' reach |
| The builder | A read-only Git key | It evaluates agent-written Nix |
| The broker's box | Everything the broker holds | It should be trusted with that already |
| The repository's main branch | What approvals compare against | Only people can push to it |
- Requests are untrusted. That includes commands, file contents, commit IDs, labels and a requester's own descriptions of its requests.
- Credentials stay with the broker. None reaches a requester; the one exception is an explicit
slop secret read. - Scopes. Each request has a scope, which is what an approval covers (for example: deploy
webat commit X). The broker builds both the scope and the text shown to approvers from validated fields, never from text the agent wrote. - Results are published. Anything returned to a requester ends up in the agent's context, so in the model provider's transcript and in the agent's session logs.
- No agent Nix in the broker. A builder evaluates it, as a separate user. The broker's privileged half only copies, signs, encrypts or activates the results.
- Secrets add little. With deploys, the deploy key is root on every box it reaches, so also giving the broker access to secrets doesn't widen what its box must be trusted with.
- Protect the main branch. Approvals show changes relative to it, and secrets are checked against it, so requesters' Git credentials must not be able to push to it.
- Policies are per requester. Each requester names a policy, and several can share one; leases and request limits are still counted per requester.
Transport
-
vsock for the agents' VM. The VM gets a
vhost-vsockdevice with a fixed CID, and the broker listens onAF_VSOCKon its box.- The kernel-reported peer CID identifies the requester; nothing the guest sends can change it.
- The VM never connects to the broker over the network, so its network can stay isolated from the broker's box.
-
Unix sockets for local users on the broker's box, identified by UID.
-
Messages are typed Rust enums shared by
slopand the broker (the encoding is inarchitecture.md).- Decoding validates every value (node and unit names, ports and so on) and rejects unknown fields.
- The request carries a protocol version, so a mismatched
slopgets a clear error.
-
One connection per request, carrying in order:
- the request;
- the operation's stdin, only after approval and only for operations that read it (
sshcarries its stdin in the request instead, below); - its stdout and stderr;
- a final message with the exit status and any structured result.
If the connection closes, the broker cancels the request or kills the process it started. A deploy's activation is the exception: stopping it partway would leave boxes half changed, so the broker waits for it and logs how it ended.
Other requesters and approvers
Requesters and approvers on other boxes connect with SSH instead, which reuses sshd for
authentication and stream handling.
-
Forced commands. They log in as
slopon the broker's box, and each key's forced command isslop-broker remote <requester|approver> <name>.- Keys come from
services.slop-broker.requesters.<name>.sshKeysandservices.slop-broker.sshApprovers.<name>. - The command connects to the broker's remote socket, which only
slopcan use, and tells the broker whose key it is. The broker trusts that the same way it trusts a CID.
- Keys come from
-
One job per key. The module refuses the same key as both requester and approver, and the client says which job it wants (
ssh … requestorssh … approve), so a key used with the wrong client fails with a clear error.- A requester key only allows making requests, so the agents on that box may read it.
- An approver key must be out of their reach.
-
Policies. The agents' VM is identified by its CID, the others by their key, and each names a policy. For example, workstations might share one that only allows
dns, the box queries andrequests. -
Finding the broker. The first that is set wins:
Client Variable ~/.config/slop/config.tomlDefault slop$SLOP_BROKERbrokervsock slop-approve$SLOP_APPROVEapproveapprove.sockon the boxAn
ssh:<destination>address goes tosshas is, so aHostentry withIdentitiesOnlycan pick the right key when a box has both kinds.SLOP_SSHreplaces thesshcommand, likeGIT_SSH_COMMAND. -
home-manager.
programs.slop.requestandprograms.slop.approveeach take a key file, and get theslop-requestandslop-approveHostentries and the config file pointing at them. It writes a config file rather than session variables, because shells started before a switch don't see new variables.
The slop CLI
There is one client command. Every subcommand blocks until the request is answered, then streams the output.
| Command | Purpose | Suggested policy |
|---|---|---|
slop status <node> [unit], slop logs <node> <unit>, slop failed <node> |
Fixed read-only queries on boxes | auto |
slop ssh <node> -- <cmd>, slop ssh --host user@host[:port] -- <cmd> |
Any command over SSH | ask |
slop deploy <node[.profile]>… [--commit <rev>] [--boot] |
Build a pushed commit and deploy it, to all targets at once | ask |
slop build <attr>… [--commit <rev>] |
Build flake attributes of a pushed commit and push them to a binary cache | ask |
slop secret keys|set|generate|rekey|read <file> … |
Work with age secrets in the requester's checkout | keys auto, read always ask, others ask |
slop dns list|set|delete … (planned) |
Change records in public DNS zones | list auto, others ask |
slop preview <port> [--name n] [--public] [--auth basic|sso] [--ttl 4h] (planned) |
Publish a dev server | ask |
slop requests |
Show this requester's pending requests and active leases | always allowed |
Every request can carry --label (agent, repo and a one-line reason). The CLI fills it in
automatically where it can. Approvals show it marked as agent-supplied.
Approvals and policy
Policies are named in services.slop-broker.policies, and each requester picks one with policy,
so several requesters (agents on different boxes, say) can share one. A policy has request limits
(maxPending, autoPerMinute) and an entry per operation in ops. An operation without an entry
is denied; requests is always allowed.
Each operation's entry has its own settings:
| Option | Meaning |
|---|---|
action |
auto runs at once, ask waits for an approver, deny refuses |
leases |
The lease lengths approvers are offered, such as "5m" or "1h" |
confirm |
"passkey": approving needs a fresh passkey in the web app |
rules |
Exceptions, checked in order. The first whose match fits replaces action, and leases and confirm where it sets them |
services.slop-broker.policies.agents.ops = {
query.action = "auto";
ssh = { action = "ask"; leases = [ "5m" "1h" ]; };
deploy = {
action = "ask";
rules = [{ match.node = "router*"; action = "ask"; confirm = "passkey"; }];
};
};
Rules match fields of the request's scope with globs (* and ?), and each operation has its
own fields. The module and the broker refuse any other operation or field.
| Operation | Fields rules can match |
|---|---|
query (status, logs, failed) |
target (a node), or host and port (--host); query |
ssh |
target, or host and port |
deploy |
node, profile, mode (switch or boot), commit; checked per target, and the strictest answer applies |
builder |
commit, on_branch (true or false), for (deploy or build) |
build |
attr, commit; checked per attribute |
secret |
action (keys, read, set, generate, rekey), path |
- Answers. An
askrequest waits for an answer from the web app orslop-approve(on the broker's box, or over SSH from another), up toservices.slop-broker.timeout. The answers are:- once;
- a lease: the same scope is approved for a while, and only lengths the policy allows are offered;
- deny.
- Passkeys.
slop-approvecan only deny a request that needs a passkey. Deploys to routers are a typical use. - Limits.
autooperations are rate-limited per requester, so a looping agent can't hammer boxes or APIs. Pending requests are capped per requester and overall to limit notification spam. - Restarts drop pending requests and leases. Deploying the broker's box doesn't restart it;
restart
slop-broker.servicefor a new version or configuration to take effect.
Approvals web app
Phone notifications are easy to lose, and a terminal isn't always at hand. The broker serves a web
app (services.slop-broker.web, code in src/web) that makes approving reliable, and
on a desktop shows what slop-approve can only print.
- The page is the source of truth. It lists what's pending with full detail and the active
leases, and updates itself.
- A dismissed or missed notification costs nothing; a notification only points at its request.
- Requests that need a passkey are marked, with a padlock on their approve buttons.
- Audit log. The log page groups the audit file by request: who asked, what, the outcome and
who approved it.
- Filters by requester, operation and outcome, and a search.
- Each request's page shows its full timeline, including the detail approvers saw, so a notification for a request that's since been answered still leads somewhere useful.
- Front end. Server-rendered HTML that works without JavaScript.
- A small script refreshes the list and manages notifications, and a service worker shows them.
- Everything shown passes through the same filter as
slop-approvefor control and bidirectional characters. - A strict content security policy allows only the app's own scripts.
Sign-in
The web app listens on the broker's box (loopback by default, web.address) behind a reverse
proxy that terminates TLS; only the proxy should reach it. Approvers sign in through an OpenID
Connect provider. Pocket ID, which only uses passkeys, is the one it's
tested with, and the demo runs it.
- Signing in. The broker is an OIDC client (
web.clientId, theopenidconnectcrate, with PKCE), and checks the ID token itself rather than trusting a header from the proxy.- Only members of
web.groupmay sign in. The provider should restrict the client to that group, and the broker checks the token'sgroupsclaim too. - Every sign-in asks the provider to authenticate afresh (
max_age=0) and checks the token'sauth_time. Signing out of the app therefore means the next sign-in needs the passkey, even while the provider's own session lasts.
- Only members of
- Sessions. A sign-in gives a session cookie (
tower-sessions) that lasts seven days without use.- Sessions are kept in an SQLite database in the broker's state directory, so a restart doesn't sign phones out.
- Answers are POSTs that need the browser's
Originto be the app and the session's token. - The audit log names web approvers like
alice (web).
- Per-request passkeys, optional. Approving a request whose policy says
confirm = "passkey"sends the approver back to the provider withmax_age=0, which makes it ask for the passkey again.- The sign-in remembers the request, the answer and a hash of what was shown.
- The broker accepts it only if the ID token is the same account's, its
auth_timeis no older than the challenge, and the request hasn't changed. - Pocket ID was tested to prompt and return a fresh
auth_timefor bothmax_age=0andprompt=login. A provider that doesn't can't confirm these requests. - The audit log names these approvers like
alice (web, passkey).
- What a session trusts. Anything that can use the approver's session can answer requests that don't need a fresh passkey, including agents running as that user on a workstation. That's accepted when agents mostly run in the agents' VM; per-request passkeys cover operations where it matters.
Notifications
The web app sends Web Push notifications to every device an approver turns them on for. Each links to its request; on desktop browsers and Android it also has Once and Deny buttons (Android shows at most two), which the service worker answers with the session like the page does. Requests that need a passkey only offer Deny. The broker clears a notification once its request is answered or expires.
- Privacy. Payloads are encrypted to the browser, so the push service (Google, Mozilla, Apple) sees only timing and size. The broker signs pushes with a VAPID key it creates in its state directory.
- Where it works. Desktop browsers deliver pushes while the browser is running, with or without the tab. Android delivers them with everything closed. iOS (16.4 and later) only does once the app is added to the Home Screen, and shows no buttons.
- Endpoints. The broker only accepts subscriptions at the major push services (Google's
fcm.googleapis.comandjmt<N>.google.com, Mozilla, Apple, Microsoft), so a session can't make it send requests elsewhere. - Replacing Home Assistant. The broker used to send Home Assistant Companion notifications instead. Those pass through Firebase Cloud Messaging readable in transit, can be swiped away on Android 14 and later with nothing to fall back on, and need an admin user on Home Assistant. Web Push is end-to-end encrypted, and the page holds every pending request.
Request details
What approvers see of a request is a Detail (src/detail.rs): fields, then sections, each a
table, a list or preformatted text. Fields and table rows have a tone, and a warning tone marks
what needs attention, such as a secret whose content belongs to another file.
- Web app: fields as a label/value grid that stays in view; sections under a fold, tables styled like the audit log. The request's own page opens the fold. Fields, columns and lists marked as code (commands, commits, paths, keys) are in monospace, and diffs are coloured.
- Everything else shows the text rendering: a field per line, then each section under its
title, with tables in aligned columns and warnings marked
⚠.slop-approveshows it as it is, and Web Push a cut-down version that puts headline fields first. - Audit log and passkeys: the audit log keeps the text rendering, so old records read the same whatever the structure becomes, and passkey confirmations fingerprint it.
- Limits: each value, row count and text section is capped, and sections past the total limit are dropped with a note saying which.
The structure is the same for every operation; what's particular to each is only how it fills the fields and sections:
- SSH and queries: the command.
- Builder approvals: the commit, whether it's on the main branch, the commits, changed files and diff.
- Deploys: the commit, and for each profile a packages table (version and size changes), the
changed units and
/etcfiles, and whether a reboot is needed. - Builds: each output with its closure size.
- Secrets: see what approvers see.
A typed detail per operation was considered: every surface would need a renderer for every operation, and nothing acts on the structure besides showing it.
Audit log
Each request, decision, approver, lease use and result is an event with the request's ID. The
broker writes it to the journal as a line of text and to audit.jsonl in its state directory as a
line of JSON. slop-approve log [-n 50] [--json] shows the recent events through the approve
socket, with each request's full detail. Secret operations record the file and the blob ID of the
ciphertext they were sent, never values.
Operations
Box queries and SSH
- Targets are the deploy-rs nodes on the main branch, by name, so a new box needs a commit
there rather than a new broker config. SSH therefore needs deploys set up.
- The builder evaluates each node's
hostname,sshUser,sshOptsandsudo, falling back to the flake-widesshUserandsudo. Only the protected branch's Nix runs, as for secrets. - The broker looks them up again when they're stale, or when a request names a node it doesn't know.
--hostcovers boxes outside them (OpenWrt, switches) with an explicituser@hostand port.
- The builder evaluates each node's
- Fixed options. SSH runs with
-F none, the key withIdentitiesOnly, no agent,BatchMode, no forwarding or local commands, and the broker's ownknown_hosts(new hosts are accepted, changed ones refused). slop sshalways asks.sshjoins its arguments into a string that the remote shell runs, so a free-form command's text can't be judged as read-only.- Approvers see everything that reaches the box. A script piped to
bash -sis as much the command as its arguments, soslop sshsends its whole stdin with the request.- Approvers see the line the remote shell runs (the words joined with spaces, as
sshsends them) and all of the stdin, and the audit log keeps both. - The command gets exactly that stdin and nothing more.
- Stdin must be UTF-8 text, and the command and stdin together are limited
(
MAX_SSH_SHOWN) so they're always shown whole; anything else is refused.
- Approvers see the line the remote shell runs (the words joined with spaces, as
- The queries can be
auto.status,logsandfailedvalidate their arguments (unit names,--since, line counts), and the broker builds the quoted remote command. They cover most of what agents need SSH for without prompting.
Deploys
slop deploy <target>… [--commit <rev>] [--boot] deploys a pushed commit of a
deploy-rs flake to one or more targets, each a node (all
its profiles, like deploy .#node) or node.profile (such as host.container-web). The client
resolves --commit (default HEAD) to a full ID in its checkout.
The builder is a user without keys, slop-broker-build, whose key's forced command is
slop-broker builder (services.slop-broker-builder). The
broker runs it over SSH.
- Describe. The builder fetches every branch from the Git server with a read-only key, so the
agent never supplies the source.
- It refuses commits that aren't on a branch.
- This stage runs only Git: it returns the commits since the main branch, their diffstat and their diff.
- Approve use of the builder. Evaluation runs agent-written Nix, so it waits for a separate
builderrequest to be approved, which shows the commits and the diff.- Its scope is empty, so a lease lets the agent build any commit for a while.
- Rules see the
commit,on_branch(whether it's already on the main branch) andfor(deployorbuild).
- Build. The builder evaluates the targets' deploy-rs profiles and builds them with the box's
Nix daemon.
- Only
gitgets the repository key, never the evaluator. - Build logs stream to the agent. One build runs at a time.
- Only
- Compare, before approval. The broker copies the closures to each node, as deploy-rs does,
and compares each profile with the one installed.
- Nodes substitute what the caches have; progress streams to the agent.
- The comparison is a fixed read-only script. Nothing runs as root, and no agent-written code runs.
- Approve the deploy. One approval covers every target, the commit and the mode.
- Policy rules see one scope per target (
node,profile,mode,commit), and the strictest answer applies, so for example a rule can allow routers onlyboot.
- Policy rules see one scope per target (
- Activate. On every node at once, the broker runs deploy-rs's
activate-rson each profile in deploy-rs's order.- It runs as root through the target's
sudocommand (sudo -uby default), inside a transient unit (systemd-run), so the activation finishes even if the connection drops. Its output streams back until then and is discarded after, sinceactivate-rsstops when it can't write. - Switching doesn't restart the broker (
restartIfChanged = false), so it can deploy its own box and report the result. A new version or configuration of the broker takes effect when it's next restarted. - If the agent goes away, the broker keeps waiting for the activations and logs their outcome. The audit log says the requester left, then how the deploy finished.
- If the broker goes away (a crash, or its box rebooting), the activations still finish.
Their units are named
slop-deploy-<request ID>-<profile>, so the audit record leads to their journals on each node. - Output comes back prefixed with the node.
- Deploys run in parallel; an agent that needs an order sends separate requests.
- It runs as root through the target's
There is no magic rollback, unlike deploy-rs from a workstation. --boot makes the new
configuration the boot default without switching to it. Activation, including dry-activate, runs
the new system's own code as root, so none of it happens before approval.
Approval contents
- Packages: version and size changes, from
nix store diff-closures. - Configuration: changed, added and removed systemd units (drop-ins count as their unit) and
/etcfiles, from comparing the two profiles'etctrees, whose entries are links into the store. That approximates what activation will restart without running anything. - Reboots: a kernel or initrd change is called out.
- Commits: Git's messages and diffstat, for the commits since the main branch.
The full view, in slop-approve show <id> or the web app, looks like this:
deploy hub (switch) at 3f9c2e1a8b0c
Commit 3f9c2e1a8b0c4d…
Commits:
3f9c2e1 nixos/hub: Update Home Assistant
8a1b7d0 nixos/hass: Add Zigbee coordinator
nixos/boxes/hub/containers/hass.nix | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
hub.system (switch):
packages: no version changes
changed units: container@hass.service
hub.container-hass (switch):
packages:
home-assistant: 2026.11.1 → 2026.11.2, +3.4 MiB
python3.13-zha: 0.0.71 → 0.0.72
changed units: home-assistant.service
changed files: /etc/hass/configuration.yaml
The phone notification carries only the first line and the label. It isn't the place to review a large deploy. For those, approve from the web app or a terminal.
Binary cache
Anything in a cache's store is signed and trusted by every box that uses it. A path built inside the agents' VM proves nothing, because the agent could upload a different output under the hash of a real derivation. So the cache is filled only from builds done by the builder.
- Requests.
slop build <attr>… [--commit <rev>]works like a deploy up to approval.- Once use of the builder is approved, it builds the flake attributes.
- The
buildrequest shows the commits and each output with its closure size. - The
builderapproval is where a person reviews the source; a policy can then letbuildpush without asking again.
- Pushing. Once approved, the broker pushes the outputs with
nix copy --to ssh-ng://as the store's owner (services.slop-broker.cache).- That key's forced command (
services.slop-broker-cache) allows onlynix-daemon --stdioon the cache's store, androot <path>…, which adds GC roots undergcroots/slop-broker. - The broker adds the roots before copying, so a garbage collection in that store can't take the paths mid-copy.
- That key's forced command (
- Expiry. A daily timer removes roots
keepDaysafter their path was last pushed, and the store's next collection takes the paths: agent builds are for sharing for a while, not for keeping.
Secrets
The broker has its own age identity, added as a recipient of the secrets it may handle next to the people's keys, so no person's key goes to the broker's box. Adding it to an existing repository needs one full rekey.
The requester sends the current .age file with each request, and the broker returns new
ciphertext. The broker never writes to a checkout.
| Command | Result | Value reaches the requester? |
|---|---|---|
keys <file> |
Key names of an env or JSON secret | No |
set <file> [<key>] (value on stdin) |
That field, or the whole file, replaced and re-encrypted | Only what it sent |
generate <file> [<key>] --kind password|hex|base64|wireguard|ssh-ed25519|age |
A value the broker creates; keypair kinds return the public half | No |
rekey <file> |
Re-encrypted to the given recipients | No |
read <file> |
Plaintext | Yes, so always ask, never leased |
Field edits work on env files (.env.age, keeping every other line as it was) and JSON objects
of strings (.json.age). Anything else is changed whole.
What approvers see
The path in a request is only the requester's name for the file, and the ciphertext and the recipients come from the requester too. Before approval, the builder fetches the main branch, which only people should be able to push to, and the approval shows what that branch says.
-
What the content is. The builder looks the ciphertext's Git blob ID up on the branch, and the approval says the file is one of:
Found Means The named path The file as on the branch Another path (flagged) An agent could be sending a sensitive file's ciphertext under a harmless name, to have it read or re-encrypted to a key of its own Nowhere A new file, or one changed on a branch A pushed commit wouldn't prove anything here, since any branch can copy a blob to any path.
-
Whether the recipients are right. The builder evaluates the branch's own agenix rules file (
secrets.rules, cached per commit) for the path.- The approval says whether the requested recipients match it, with a table of the keys, each as in the rules, added or removed; or that the path isn't in the rules.
- Only the protected branch's Nix is evaluated, never a requester's commit, so this doesn't need the builder approval.
- Keys are labelled by name from
secrets.names(well-known keys, such as people's), then from SSH keys' comments anywhere in the branch's rules (ssh-ed25519 AAAA… shill, which age ignores). Other keys are shown abbreviated.
-
The broker's own key. The broker always adds it to the recipients, and says so, so it can change the file later.
-
Sensitive requests. Requests that read a secret, change who can read one or name content as another file are marked sensitive.
-
Audit. The audit log records the approval's text, including the blob ID, never values.
Planned operations
DNS
For public zones that are edited through a provider's API rather than from Nix config. Zones that come from Nix config are changed with commits and deploys instead. Cloudflare is the first provider.
slop dns list <zone> [name]shows the live records.slop dns set <name> <type> <value>… [--ttl] [--proxied]replaces the record set for that name and type, andslop dns delete <name> <type>removes it.- The approval shows the record set before and after, read live from the provider. Leases are scoped by name and type.
- The broker uses its own API token, limited to DNS edits in the allowed zones and separate from any other automation's tokens.
- Policy denies zone apexes,
NS,MXand_acme-challengenames by default. Records the broker creates get a record comment, so the approval can say whether an agent is changing one of its own records or an existing one.
Previews
slop preview 5173 [--name foo] [--public] [--auth basic|sso] [--ttl 4h] publishes a dev server
in the agents' VM under a wildcard domain until its TTL expires.
- A reverse proxy serves the wildcard domain with a wildcard certificate and proxies to the broker. The broker looks up the host in its active previews and connects to the guest port over vsock. The VM still accepts no inbound connections.
Access
The hostname and the authentication are chosen separately.
- Secret URL (default): the hostname is an unguessable label, for example
foo-<26 base32 characters>.<domain>, which is 128 random bits after the optional name. Because DNS and the certificate are wildcards, the name never appears in the zone or in Certificate Transparency logs. Unknown hostnames get the same 404 as expired ones. Responses carryReferrer-Policy: no-referrerandX-Robots-Tag: noindex. --public: the hostname is just the name (foo.<domain>). Without--auththis is a fully public site. Public names are never leased, so each one needs its own approval.--auth basic: adds basic auth with a generated password. It's shown in the approval and returned to the agent, which needs it to test the page and controls the content anyway.--auth sso: adds the proxy's existing single sign-on.- The secret URL still leaks through browser history, shared links and resolver logs. Use an auth option for anything that matters.
- If the preview domain is a subdomain of other services' domain, preview pages are same-site with
them: they can set cookies on the parent domain, and browsers send
SameSite=Laxcookies (including an SSO session) with their requests to those services. A separate registrable domain avoids this.
TCP forwards and a cache for VM builds
- TCP forwards: time-limited access from the VM to one internal
host:port(for example a database), approved per destination. - VM-built paths: a separate store with its own signing key, trusted only by the agents' VM and by boxes that opt in. Useful for sharing agent build artifacts or keeping them across VM rebuilds.
Both wait until a concrete need comes up.
Agent-facing docs
- Agent context: the package ships
slop-tools.md, which describes theslopCLI and how requests behave (they block while waiting for approval, so no retrying in a loop).slop guideprints it, and it's installed asshare/slop-broker/slop-tools.mdfor deployments to add to their agents' rules. Update the guide with each new operation. It asks agents to suggest new operations when they would otherwise work around a missing one or keep asking for the sameslop sshapproval. - Agent permissions: the broker is the gate, so an agent's own permission prompt for
slopwould only ask twice; allowslopand keep denying direct use of deploy tools and keys. - Deployment docs: deployment-specific notes (which nodes exist, their login shells, where the Git server is) belong in the deployment's own agent rules.
Scope
- Out of scope for now: secret tools other than age (such as
sops), and a general credential proxy for other APIs (forges, package registries). Agents keep using deploy keys of their own for pushing. If more API operations are needed later, add them one at a time likedns.