Phase 11, part 1: agents and their keys

Agents are users of kind agent, each given modules to read, or to read
and act on, and the CRM scope. Admins make them under Settings → Agents,
on every edition; keys (sm_…) are shown once and kept as hashes, can
expire, be rotated (the old one works a day) or revoked, and record their
last use. /mcp takes agent keys and offers each agent only the tools its
scopes allow. On the local edition, mcp-token is the key of a built-in
Hermes agent with the CRM and the Market.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 10:26:31 -07:00
co-authored by Claude Opus 5.5
parent da16736fb4
commit da2d56f8d2
19 changed files with 1323 additions and 138 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ The old terminal app used `http://localhost:8080/callback`; you can remove that
- The port is published on `127.0.0.1` only, so other machines can't reach it, whatever the firewall says.
- The local edition has no login, so it protects itself from web pages open in the same browser: it only answers requests addressed to `localhost` (against DNS rebinding), and refuses form posts that don't come from its own pages: each form carries a random token that another site can't know, and the browser's `Origin` must be the app's own.
- The container runs as you, with a read-only filesystem, no Linux capabilities and `no-new-privileges`. It can write only its data folder.
- `/mcp` requires the bearer token in `mcp-token`.
- `/mcp` requires an agent's key (Settings → Agents). The key in `mcp-token` belongs to the built-in Hermes agent, which may work the CRM queue and read the Market; each agent gets only the tools for what it was given.
## The server edition