7 Commits
Author SHA1 Message Date
jackos1998andClaude Opus 5.5 70a42f6a21 nix: Add the commit to the version
CI / Check (pull_request) Successful in 5m45s
CI / Check (push) Successful in 5m42s
Builds from the flake show the commit they are from in the version,
like `0.3.0+2d59b59`, or `0.3.0+2d59b59-dirty` with uncommitted
changes. It shows in the web app, in `--version`, which `slop` and
`slop-broker` now take, and in the error for an old protocol.

The commit is part of the build, so every commit rebuilds the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:29:17 +00:00
jackos1998andClaude Opus 5.5 538a288182 ci: Add a Gitea Actions workflow
CI / Check (push) Successful in 4m44s
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>
2026-11-23 00:39:37 +00:00
jackos1998andClaude Opus 5.5 313c028ad9 nix: Add a demo
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>
2026-11-23 00:39:36 +00:00
jackos1998andClaude Opus 5.5 eeaf22a7b5 ops: Add builds
`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>
2026-11-23 00:39:35 +00:00
jackos1998andClaude Opus 5.5 6305228e7e ops: Add deploys
`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>
2026-11-23 00:39:35 +00:00
jackos1998andClaude Opus 5.5 73deb0efb8 remote: Add SSH transport
Requesters and approvers on other boxes log in to the broker's box as
`slop`. Each key has a forced `slop-broker remote <role> <name>`, which
joins the session to the broker through a socket only `slop` can open,
so the broker trusts the name like it trusts a vsock CID. A key does
one job: the module refuses a key used for both roles.

`slop` and `slop-approve` take `ssh:<destination>` addresses, from
`SLOP_BROKER` and `SLOP_APPROVE` or else `~/.config/slop/config.toml`,
and an approver connection now carries many requests. The
`programs.slop` home-manager module installs both clients, a `Host`
entry per key and that config file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:35 +00:00
jackos1998andClaude Opus 5.5 67b11b0c61 broker: Add approval broker for coding agents
`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>
2026-11-23 00:39:36 +00:00