docs, swarm ui: a deleted login now logs the agent out, and the dialog and docs say so
With the harness poll, an agent that holds a session logs out within 5 minutes of its stored login being deleted. The confirmation and the claude-login page said the agent keeps its session.
This commit is contained in:
parent
a2c9e9a8d4
commit
5f5933fde9
3 changed files with 7 additions and 6 deletions
|
|
@ -52,8 +52,9 @@ reads the credential.
|
||||||
**delete login** on the card calls
|
**delete login** on the card calls
|
||||||
`DELETE /api/agents/<agent>/claude-login/stored`. The minter removes the leaf
|
`DELETE /api/agents/<agent>/claude-login/stored`. The minter removes the leaf
|
||||||
and every version of it, not just the newest: an older version is still a
|
and every version of it, not just the newest: an older version is still a
|
||||||
session. It doesn't log out an agent that already holds a session; that agent
|
session. An agent that already holds a session logs out too, the next time it
|
||||||
keeps running on what's in its own `~/.claude`.
|
reads the store: within 5 minutes, or when a paused agent resumes (see
|
||||||
|
[the harness's rule](#why-the-harness-takes-only-a-newer-version)).
|
||||||
|
|
||||||
## Why the harness takes only a newer version
|
## Why the harness takes only a newer version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ export function storedAtMs(login: StoredLogin): number | null {
|
||||||
return Number.isNaN(ms) ? null : ms;
|
return Number.isNaN(ms) ? null : ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
// What the delete's confirmation says: it removes the swarm's copy, and an
|
// What the delete's confirmation says: it removes the swarm's copy, and the
|
||||||
// agent that already holds a session keeps it. The agent is not logged out.
|
// agent reads the store every 5 minutes and logs out when the copy is gone.
|
||||||
export function deleteMessage(agent: string): string {
|
export function deleteMessage(agent: string): string {
|
||||||
return `Delete the stored claude login for ${agent}? ${agent} is not logged out: it keeps its current session. A new login has to be made to get another stored copy.`;
|
return `Delete the stored claude login for ${agent}? ${agent} is logged out within 5 minutes, and needs a new login.`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ test("the time the store gives is read as an instant, or as nothing", () => {
|
||||||
|
|
||||||
test("the delete's confirmation names the agent", () => {
|
test("the delete's confirmation names the agent", () => {
|
||||||
assert.match(deleteMessage("atlas"), /stored claude login for atlas/);
|
assert.match(deleteMessage("atlas"), /stored claude login for atlas/);
|
||||||
assert.match(deleteMessage("atlas"), /not logged out/);
|
assert.match(deleteMessage("atlas"), /logged out within 5 minutes/);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue