Skip to content
18 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

An archived agent can be found, brought back, or deleted for good. The Agents page ends with Archived, folded, where owners see every archived agent and members their own personal ones, each with when and by whom it was archived and what deleting it would take; Restore brings it back, under a new handle when a live agent has taken its old one, and Delete permanently asks for the handle to be typed and then removes its sessions, replies, memories, routines, versions, drafts, skills and its computer's home, leaving its messages in chat under its saved name, the workspace's spend totals and the audit log. In Chat an archived agent is deactivated the way people expect: never offered as someone to message or mention, never woken, a conversation with it kept in the list, dimmed and marked Archived, open to read with a note in place of the composer and a way to restore it for owners; after deletion the conversation still reads, its messages marked as a deleted agent's. The agents, chat and agent budgets guides say so.1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { confirmsHandle, countsLine } from "./agents-archived.ts";
5
6test("an archived agent's row says what deleting it takes, zeros left out", () => {
7 assert.equal(countsLine({ sessions: 14, replies: 231, memories: 3, routines: 0 }), "14 sessions · 231 replies · 3 memories");
8 assert.equal(countsLine({ sessions: 1, replies: 1, memories: 1, routines: 1 }), "1 session · 1 reply · 1 memory · 1 routine");
9 assert.equal(countsLine({ sessions: 1200, replies: 0, memories: 0, routines: 0 }), "1,200 sessions");
10 assert.equal(countsLine({ sessions: 0, replies: 0, memories: 0, routines: 0 }), "Nothing recorded");
11});
12
13test("deleting is confirmed by the handle, however it is typed", () => {
14 assert.ok(confirmsHandle("sam", "sam"));
15 assert.ok(confirmsHandle(" @Sam ", "sam"));
16 assert.ok(!confirmsHandle("sam2", "sam"));
17 assert.ok(!confirmsHandle("", "sam"));
18});