Each operation lists the scope fields its rules can match, so a rule
that names any other field, which never matched and so was silently
ignored, is refused: by the module's typed `match` options at
evaluation, and by `Config::validate`. The design doc now shows a
policy's per-operation settings and each operation's fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Policies were keyed by any string, so a mistyped operation was silently
denied. `OpName` makes the broker refuse it when loading the config,
and the module's `ops` names each operation, so evaluation fails
first.
`Parsed::new` fills in the defaults, so each operation sets only what
it uses; what's found before approval moves to `Parsed::prepared`, and
whether an operation is built in follows from its name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file of its own reads as a script, says what its output looks like
and is checked by a new `shellcheck` lint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ssh.targets` duplicated what the main branch's deploy-rs nodes
already say, and a configured target could drift from them. The
nodes are now the only targets, so SSH needs `deploy`, whose builder
reads them.
The VM test gets a real builder and a repository with the nodes, and
the demo's targets move into its repository's flake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `ssh.branchNodes`, every deploy-rs node on the main branch is a
target too, so adding a box takes a commit there rather than a new
broker config. The builder evaluates the branch's `deploy` output
(hostname, SSH user and options, `sudo`), cached per commit, and the
broker looks it up again when stale or when a request names a node it
doesn't know. Only the protected branch's Nix is evaluated, as for
secrets; configured targets win.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request details become fields, then tables, lists and text, with a
tone on fields and rows. The web app shows them as a grid and tables
like the audit log; everything else, the audit log and passkey
fingerprints use the text rendering, with headline fields first in
notifications. Deploys get a packages table per profile, secrets a
recipients table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop secret keys|set|generate|rekey|read` work with an agenix secret
in the requester's checkout: it sends the ciphertext, and the broker
decrypts it with its own age identity and returns new ciphertext.
Field edits work on env and JSON secrets.
The path and recipients are the requester's, so before approval the
builder reads the protected main branch: it looks the ciphertext's
blob up there, so approvers see which file it really is, and
evaluates that branch's rules file to compare the recipients.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before the builder evaluates anything, an approver sees the requester's
commits relative to the branch and their diff, and approves using the
builder. A lease from an earlier request can cover it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop build <attr>…` builds flake attributes of a pushed commit on the
builder and, once approved, copies them to a binary cache's store and
roots them there. `services.slop-broker-cache` gives the cache store
owner's key a forced command that only allows the store protocol and
GC roots, and expires the roots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop deploy <node>…` builds a pushed commit and, once approved,
activates it on every target at once. A builder, reached over SSH as
a user that only holds a read-only Git key, fetches the commit from
the Git server and evaluates and builds the deploy-rs profiles, so
agent-written Nix never runs in the broker. Before asking, the broker
copies the closures to the nodes and compares them there with a fixed
read-only script: package changes from `nix store diff-closures`, and
changed units and `/etc` files from the two `etc` trees.
Once approved, `activate-rs` runs on each node in a transient unit,
so it finishes even if the connection drops or the broker restarts.
Policy rules see one scope per target, and the strictest answer
applies. `services.slop-broker-builder` sets up the builder on any box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop status`, `slop logs` and `slop failed` run fixed read-only
commands that the broker builds and quotes from validated values, so a
policy can let them run without asking.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop-broker` runs privileged operations for coding agents under named
policies (auto, ask or deny per operation), which requesters can share,
with approvals from `slop-approve` or Home Assistant notifications and
optional leases. The broker and the `slop` client talk over vsock, so
a VM needs no network path to it. Messages are typed enums shared by
both, CBOR-encoded and framed with `LengthDelimitedCodec`; decoding
validates every value, and requests carry a protocol version.
The first operation is `slop ssh`. The `services.slop-broker` NixOS
module runs the broker as a hardened service from generated TOML, and
a VM test exercises it over vsock loopback. devenv provides the
development environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>