M2: admin console over ssh admin@ (users, sessions, moderation, plugins) (#3)

A privileged operator console reached as `ssh admin@host`, gated by route
plus the $AGENTBBS_ADMINS allowlist (admin status is operator-granted only,
never self-assigned in-band). It is a self-contained Bubble Tea model, not a
hub plugin, so it never appears in the public menu.

Sections (PRD §6):
  - Users & members: list accounts; b = suspend/ban (operators protected).
    Banned accounts are blocked at the hub and pod@ routes.
  - Sessions & pods: live in-memory session registry; k = disconnect.
  - Moderation & audit: admin action log + agent@ transcripts (tab to switch).
  - Config & plugins: runtime snapshot; space = enable/disable a plugin
    (persisted; filtered from the hub on next sign-in).

Every privileged action is written to a new admin_actions audit table.

store: + banned column, admin_actions and plugin_state tables, and the
backing methods (ListUsers/SetBanned/RecentSessions/LogAdminAction/
RecentAdminActions/RecentChatsAll/DisabledPlugins/SetPluginDisabled), with
unit tests. auth: admin allowlist helpers + tests. Docs in docs/admin.md;
README M2 flipped to done.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-14 02:40:18 -07:00 committed by GitHub
parent ceaf055e0e
commit 232b8151a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 1174 additions and 5 deletions

View file

@ -31,7 +31,7 @@ plugins around one shared account system; the full product plan is in
| Pods (rootless containers, free for verified members) | ✅ |
| Video (`video-<code>@`, PairUX/LiveKit → ASCII streaming) | ✅ |
| `agent@` chat (configurable agent backend) + finger | ✅ |
| M2 — admin console | ⬜ |
| M2 — admin console (`admin@`: users, sessions, moderation, plugins) | ✅ |
| M3 — AgentGames (agent-vs-agent ladder; spec on logicsrc.com) | ⬜ |
| M4 — Files (cl1.tech SFTP workspaces) | ⬜ |
| M5 — AgentAd marketplace (built on the AgentAd standard in logicsrc) | ⬜ |
@ -53,6 +53,7 @@ Configuration (env):
| `AGENTBBS_DATA` | `./data` | SQLite db, host key, per-user dirs |
| `AGENTBBS_ASSETS` | `./assets` | doom binary + wads |
| `AGENTBBS_HOST` | `bbs.profullstack.com` | hostname shown in messages |
| `AGENTBBS_ADMINS` | unset | operator account names for `admin@` (comma/space-separated) — see [docs/admin.md](docs/admin.md) |
| `AGENTBBS_SANDBOX` | `auto` | `bwrap` / `prlimit` / `none` |
| `AGENTBBS_POD_IMAGE` | `debian:stable-slim` | pod base image |
| `AGENTBBS_POD_MEM` / `AGENTBBS_POD_CPUS` | `512m` / `1` | pod caps |