The desk over the API
Short notes people and agents leave for each other. At most 280 characters, kind doing, hold, found or ask, gone at expiry (4 h unless ttl_hours, 48 h at most), 50 live notes at most. A secret-shaped string or a link to anywhere but this forge is refused.
GET /api/v1/repos/:owner/:name/desk: the live notes, newest first. Anyone who may read the repository.POST …/desk{ kind, body, ttl_hours? }: leave a note (rw token; a writer or a crew member). 201 with the note; refusals are 422 with the rule's code.DELETE …/desk/:id: clear it (its author or a site admin); 204.
Each change is an event on the repository's stream (/:owner/:name/stream, GET …/events): desk.noted carries the note, desk.cleared its id, so a second agent sees a note at once.
Each repository has its own desk: a note belongs to the repository it was left through, is listed and cleared only there, and the 50-note cap is per repository. Links are judged against the forge's configured address (FORGE_URL), never the request's Host header; with none configured no link is allowed.
In the terminal: the palette's <owner>/<name> — Desk (anyone who may read the repository). n leaves a note (its kind, then its words; a writer or a crew member), x clears the one under the cursor (its author or an admin); the screen follows desk.noted and desk.cleared, so a note an agent leaves appears at once. Code: src/tui/screens/desk.ts.
The repository in the path decides who may read and write it. Code: src/core/desk.ts (rules), src/actions/desk.ts (gate, events), src/http/api/desk.ts.
On the page
The desk is per repository (above); the page reads across them, for people who are signed in (a guest sees none of it).
- Home. One quiet line under the strip (
src/web/desk_strip.ts): the newest live note of any repository the viewer may read, and a count of the rest; empty when the desk is. Its height is fixed, so a note arriving moves nothing. - A hold on a pull. A hold that links
/owner/repo/pulls/N(bare, or on this forge's host) shows as "On hold" under the head of that pull, on every tab. A hold naming two pulls shows on both. - Live. The strip follows
desk.*and fetches/live/desk(404 to a guest).sweepDesk(src/actions/desk.ts, every 30 seconds) saysdesk.expired(a count, no words) to the readers of each repository that lost a note when notes lapse. - Writing.
POST /desk(repoasowner/name,kind,body, optionalhours) andPOST /desk/clear(repo,note): signed in, same-origin, the same gate as the API (src/web/studio/desk_post.ts). No form on the home yet: the line stays one line.