Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: an agent's API key is set from its claude login row, and the advanced backend settings show the configuration and the secrets apart

The claude login row of an opened agent gains an API key line: a badge saying whether a key is stored, set or replace and remove, and advanced. Setting a key sends PUT on the backend-secrets route as ANTHROPIC_API_KEY=<key>; the key is never read back. The old API-key environment dialog becomes the advanced backend settings, with two sections: the configuration, which starts with the stored text and saves or removes it, and the secrets, whose box starts empty and replaces the stored secrets only when filled and saved. The link menu's entry is renamed to match, account-api.ts gets the route helpers and a key check with tests, and the swarm UI doc describes the row.
This commit is contained in:
iris 2026-11-20 20:23:08 +01:00 • committed by mara
commit da25f0a1c3

View file

@ -1075,8 +1075,18 @@ Each agent on `/agents` opens four dialogs that write a credential for it
into the swarm secret store through swarm-controller. All four are blind
set actions: no route hands a token back. swarm-controller refuses to link a
name that already holds an account; delete that account first to replace it.
The fourth, the API-key environment, is the exception: a save overwrites what the
store holds.
The fourth, the advanced settings (the API-key environment), is the exception:
a save overwrites what the store holds. It has two sections. The configuration
reads back and its box starts with the stored text. The secrets never read back,
so their box starts empty and replaces the stored secrets only when filled and
saved.
The **claude login** row of an opened agent also sets the API key: **set API key**
(or **replace API key**) sends the key as `ANTHROPIC_API_KEY=<key>` to the
agent's secrets, **remove API key** deletes them, and **advanced** opens
the form above. The row shows whether the store holds a key and never the key. A
change reaches the agent at its next restart, and an agent with a key tries it
instead of waiting for a claude login.
An opened agent card lists its linked accounts at the end of its **settings** section, one row
per account: kind, name and host. Opening an agent makes one request,