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>
The design keeps behaviour and rationale, and the architecture the code.
The SSH options and the builder approval's rules are only in the design
now, and the message encoding only in the architecture. The modules'
details link to the design, and the tests move to the architecture,
without the commands that `AGENTS.md` lists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also extend the writing rules: long bullets and steps get nested
bullets, and the design and architecture docs each own their half.
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>
Turn the architecture's policy, execution, approver and NixOS sections
and the design doc's long bullets and steps into short nested bullets
and tables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builder runs separately from the broker, and which of its requests
need an approval first depends on whose code each one evaluates. A
diagram shows its state, and a table what each request runs, whose code
and whether it waits for an approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overview puts the builder on its own box, which can be the
broker's, and a second diagram shows the parts inside the broker. The
request lifecycle keeps the steps every request takes, with nested
details, and then describes each kind on its own: queries and SSH,
secrets, deploys (with the sequence diagram) and builds.
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>
The architecture gets an overview of the parts and a deploy's sequence,
the request lifecycle splits the steps every request takes from those
of each kind, and the protocol is shown as its types and fields. The
design starts with what happens to each kind of request.
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>
The web app's Web Push notifications replace them: they are encrypted
end to end, and the page holds every pending request, so a dismissed
notification loses nothing. Drops `src/ha.rs`, the
`services.slop-broker.homeAssistant` options and `tokio-tungstenite`.
A config that still has `home_assistant` is refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo repository's flake gets a deploy-rs node, `box`, with a small
custom profile whose activation writes its version, using nixpkgs'
deploy-rs so builds are quick, and its nixpkgs locked to this
repository's. The box VM lets `box` use `sudo` and copy unsigned
paths, and the broker's policy covers the builder and deploys, so a
pushed branch can be deployed and its package changes approved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`devenv up` seeds a bare repository with an agenix rules file and two
secrets, encrypted to the demo person and the broker; a pre-receive
hook protects `master`, and `demo-merge` moves it. The agents' VM
clones it over a QEMU guestfwd to `git daemon`, and the broker reaches
`slop-broker builder` through an `ssh` wrapper, so secret requests
work as in a real deployment.
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>
Signing out only ended the app's session: the next sign-in went
through the provider's still-valid session without a prompt, so
signing out seemed to do nothing. Sign-ins now ask the provider to
authenticate afresh and check the token's auth_time, as passkey
confirmations already do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every push runs `nix flake check`: the package with its tests, new
`clippy` (warnings as errors) and `fmt` checks, and the VM test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design and architecture docs come from nixfiles'
`docs/slop-broker.md` and its working notes, rewritten to describe the
broker rather than one deployment: roles such as the agents' VM and
the broker's box replace box names, and the rollout plan and
deployment's agent setup stay in nixfiles. `AGENTS.md` carries over
the general rules from nixfiles plus this repository's commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setup for trying the broker by hand, laid out like a deployment.
`devenv up` runs the broker from the checkout with its web app, Pocket
ID for approvers to sign in with, and a box VM for the SSH targets; a
setup task creates the approver, their group and the broker's OIDC
client through Pocket ID's API. `demo` boots the agents' VM on the
terminal, which reaches the broker only over vsock.
Approvers use `slop-approve` in the devenv shell, or the web app after
signing in with a link from `demo-sign-in`, so passkey approvals can
be tried without deploying anything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>