diff --git a/CLAUDE.md b/CLAUDE.md index 65a3e10..97fef4e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,6 +12,7 @@ maestro daemon tmux wrapper + session API on 127.0.0.1:7070 ├── GET/POST /api/sessions list / spawn ├── DELETE /api/sessions/:id kill ├── POST /api/sessions/:id/input type text into a session + ├── POST /api/sessions/:id/prompt an agent reports its first prompt (#131) ├── GET /api/info hostname, version, home dir, spawn presets ├── GET /api/dirs directory listing (spawn autocomplete) ├── GET /api/recent-dirs spawn history diff --git a/docs/SIDEBAR.md b/docs/SIDEBAR.md index f7d5a37..5200407 100644 --- a/docs/SIDEBAR.md +++ b/docs/SIDEBAR.md @@ -20,6 +20,25 @@ A card is always two lines: **line 1** and **line 2**. Line 1 carries no badges. The `⚠ blocked work` badge (#83) and the `exited` badge move off this row into line 2. +### Where a name comes from (#131) + +`metadata.name_source` says whether the name is settled or provisional: + +| Source | Means | Rendered | +|---|---|---| +| `User` | Typed in the spawn form, or set by a rename. | Normal | +| `Generated` | The daemon's own handle, assigned because the spawn carried no name. | Muted | +| `Haiku` | Derived from the session's first prompt. | Normal | + +A missing or unrecognised source reads as `User`. That way a session named +before the field existed is never dimmed, and never autonamed over. + +Only `Generated` renders muted, and it is the only source the daemon will +replace: the first prompt an agent reports to `POST /api/sessions/:id/prompt` +settles the session at `Haiku`. A session that never reports a prompt — a +shell, or an agent with no hook installed — keeps its muted handle for as long +as it lives. That is accurate, not a missing state: nothing has named it yet. + The name is editable in place (#125). In the web client, right-clicking a card opens a context menu whose **rename** entry swaps the name for a text field — Enter commits, Escape cancels. The TUI opens the same edit as a prompt, bound