making use of the extended perms and added future work
This commit is contained in:
1 parent
296e465f48
commit
22fd8fbce8
19 files changed
+617
-40
No files matched your search
+3
-3
@@ -27,11 +27,11 @@ flowchart LR
|
||||
|
||||
**One binary, two modes.** `-mode master` runs the Slack bot, the manager and a local node. `-mode slave` runs only a local node, and keeps one outgoing TLS WebSocket to the master, so slaves can sit behind NAT.
|
||||
|
||||
**A message's path:** Slack event → `bot` → `manager.Ensure` (find the container, or place and start it) → `manager.DialAgent` (direct on the master, relayed for slaves) → `acp` session → updates stream back through `bot`'s streamer, which edits the Slack message.
|
||||
**A message's path:** Slack event (`app_mention`, a DM, or a plain reply in a channel thread set to `all-messages`) → `bot` → `manager.Ensure` (find the container, or place and start it) → `manager.DialAgent` (direct on the master, relayed for slaves) → `acp` session → updates stream back through `bot`'s streamer, which edits the Slack message.
|
||||
|
||||
**Containers** are `systemd-nspawn` machines started through `systemd-run`, each in its own `slackerbot-<machine>.service` unit, with CPU and memory limits. They boot the NixOS system built by `nix build .#agent` (`nix/container.nix`), which runs `goose serve` on port 1984. `/nix/store` is shared read-only. `/root` is bind-mounted from a btrfs subvolume on one of the node's drives, and is the only thing that persists. The agent's env file (API keys, the per-container goose secret) is written by the host and bind-mounted in read-only.
|
||||
|
||||
**State** lives only on the master, in `state_dir/state.json`: owners (container, size, node, drive, storage limits, idle limit), sessions (Slack thread → ACP session id) and permissions. Nodes report what's running and how much disk each home uses. Nothing else is stored.
|
||||
**State** lives only on the master, in `state_dir/state.json`: owners (container, size, node, drive, storage limits, idle limit), sessions (Slack thread → ACP session id, plus the thread's listen mode), each channel's default listen mode, and permissions. Nodes report what's running and how much disk each home uses. Nothing else is stored.
|
||||
|
||||
## Placement and capacity
|
||||
|
||||
@@ -92,7 +92,7 @@ flowchart TD
|
||||
| `balance` | Builds a view of each node and picks where a container goes |
|
||||
| `manager` | `Manager` (owners, placement, start/stop/resize/storage), the cluster link (`Remote`, `ServeCluster`, `RunSlave`) and migration. These three share a package because they're tightly coupled |
|
||||
| `acp` | JSON-RPC client for goose's ACP endpoint. Tool permission requests are auto-approved |
|
||||
| `bot` | Slack events and buttons, replies, permission checks, `grant`/`revoke`, move announcements, idle reaper, streaming replies |
|
||||
| `bot` | Slack events and buttons, replies, permission checks, `grant`/`revoke`, move announcements, idle reaper, streaming replies, thread listen modes, stop reactions, the assistant pane |
|
||||
| `util` | `KeyedMutex`, `RandomHex` |
|
||||
| `testutil`, `testutil/clustertest` | Fake nodes, and a real master + slave harness for tests |
|
||||
| `nix/container.nix` | NixOS system for each container |
|
||||
|
||||
Reference in new issue
Block a user