|
1 | | -# Sessions |
| 1 | +# Me and sessions |
2 | 2 |
|
3 | | -Sessions are focused work conversations built on ordinary private channels. |
| 3 | +Me is personal organization over ordinary channels, not a separate message store |
| 4 | +or relay-enforced privacy mode. Signed channel membership remains access authority. |
| 5 | +The earlier [channel-space proposal](spaces.md) is superseded design history. |
4 | 6 |
|
5 | | -## Current contract |
| 7 | +## Current behavior |
6 | 8 |
|
7 | | -- A session is the work conversation. The Sessions sidebar shows previous topics, |
8 | | - grouped into sections. **New session** starts an unfiled conversation; a custom |
9 | | - section’s **+** inherits that section’s defaults. Selecting a saved session opens it. |
10 | | -- Sessions are ordinary private stream channels. Creation, invitations, messages, |
11 | | - roles, and membership use existing relay behavior. **No relay changes or new |
12 | | - Sessions protocol are required or planned for this iteration.** |
13 | | -- The description marker `Buzz session (buzz.sessions/v1)` identifies sessions. |
14 | | - Legacy `parent:<UUID>` metadata remains readable, but Sessions no longer creates |
15 | | - nested conversations and the Sessions list excludes parent-linked sessions. |
16 | | - Existing content and signed membership are not changed or deleted. |
17 | | -- The sidebar arranges standalone sessions using the same relay-backed personal |
18 | | - sections as channels. Moving an existing session changes organization only. |
19 | | -- Each custom section has **Session settings…** and a **+** for a new session |
20 | | - in that section. Defaults include project folders, optional worktree location |
21 | | - and base branch, Canvas, and optionally a copy of an existing template's lineup. |
22 | | - Paths become Canvas instructions for the agent host; saving them does not create |
23 | | - a worktree or change a running agent's working directory. |
24 | | -- Section overrides are ordinary private template records, keyed by the SHA-256 |
25 | | - of the section ID in the `session-section-` namespace. They use the existing |
26 | | - community-scoped recipe capability; no sidebar migration or new relay event |
27 | | - kind is involved. Existing personal-group template defaults are used when there |
28 | | - is no Sessions override. Templates are copied, not linked for live propagation. |
29 | | -- Creation freezes section defaults in the existing pending-start receipt. The |
30 | | - session's Canvas, section placement, and template agent invitations must succeed |
31 | | - before its first message is sent. A retry keeps the same session ID and setup; |
32 | | - a different existing Canvas blocks replacement. Missing defaults or failed reads |
33 | | - do not silently create an unconfigured session. |
34 | | -- A saved session's header **⋯ → Session settings…** edits that session's Canvas |
35 | | - with the existing revision check. Changes do not update the section default or |
36 | | - sibling sessions. Failed saves retain a local draft and explicit reload flow. |
37 | | -- Saved sessions expose **Rename** in their row and header menus. |
38 | | - The existing channel-details service verifies owner/admin permissions and the |
39 | | - loaded revision, then sends a name-only kind-9002 command. Session metadata, |
40 | | - visibility, and lifetime remain unchanged; uncertain delivery requires checking |
41 | | - the saved result before another write. Automatic generated titles are not added. |
42 | | -- Row menus offer **Section** destinations and **New section…**, plus **Copy** for |
43 | | - the session name, ID, and ordinary Buzz channel link. The unfiled Sessions |
44 | | - destination appears only for sessions currently in a custom section. |
45 | | -- Workspace fields round-trip through a marked block in ordinary Canvas Markdown. |
46 | | - If another editor changes that block, the settings dialog exposes the full |
47 | | - Canvas instead of discarding custom text. |
48 | | -- New sessions use the ordinary composer, centered at the bottom, and |
49 | | - channel-style titles. The avatar-and-name picker opens upward using the same |
50 | | - popover, search field, and option-row components as the mention picker. It |
51 | | - searches available agents by name or public key and keeps the draft intact. |
52 | | - Explicit mentions take precedence over the selected agent. Without a selection, |
53 | | - a sole agent already in the session is addressed automatically; multiple agents |
54 | | - require a recipient. Removing a mention avatar clears only its explicit mention |
55 | | - intent and preserves the draft text; it does not suppress this automatic routing. |
56 | | -- Published replies appear in the main session conversation. Sessions uses normal |
57 | | - paged channel queries and complete message overlays, without new relay filters. |
58 | | - Existing thread replies are also presented inline. |
59 | | -- Detailed activity remains private to the agent's owner. Do not build a shared |
60 | | - activity feed for today's individually owned agents. Shared cloud agents may |
61 | | - introduce a different visibility model later. |
62 | | -- Use real conversations and agents. No sample activity, fake sends, inferred |
63 | | - permissions, or new execution/scheduling infrastructure. |
| 9 | +- Me placement and groups live in the existing encrypted, account/community-scoped |
| 10 | + `groups:me` preference record. Messages groups remain independent. Placement is |
| 11 | + explicit, not inferred from participant count or local agent availability. |
| 12 | +- **Upgrade behavior:** Me starts empty. Existing sessions, including historical |
| 13 | + parent-linked sessions, remain standalone Messages rows. There is no automatic |
| 14 | + migration, membership revocation, nested creation or transcript copy. |
| 15 | +- New conversations use ordinary private channels. The first send freezes the |
| 16 | + draft, channel ID, Canvas and group defaults in the existing pending-start |
| 17 | + receipt. Setup and Me placement must succeed before sending; retries reuse that |
| 18 | + ID. Draft settings remain local until first send and use Me's defaults namespace. |
| 19 | +- Move to Messages preserves the channel ID, history, Canvas and memberships. It |
| 20 | + removes Me placement and the obsolete Me group assignment; it does not import |
| 21 | + the Me group into Messages. This is organization, not a privacy transition. |
| 22 | +- Me sharing explicitly grants selected people access to the existing history and |
| 23 | + moves the conversation to Messages. Destination-link sharing in Messages remains |
| 24 | + a separate flow; see [sharing](sharing.md). Neither flow shares owner-private |
| 25 | + detailed agent activity or starts an agent merely by granting membership. |
| 26 | +- Me uses the ordinary composer with selectable owner-scoped agent mentions. A |
| 27 | + send without a mention does not infer an agent. Existing Messages sessions keep |
| 28 | + their ordinary recipient rules. Saved placement must load before the Me reader |
| 29 | + enables sending; an unavailable preference read is not evidence of Messages. |
| 30 | +- Canonical channel links still use the ordinary channel reader, and Me routes can |
| 31 | + refer to an accessible ordinary channel UUID. Routes and plugin views do not |
| 32 | + grant access. Disabling the Me view does not delete its channels or memberships. |
64 | 33 |
|
65 | | -## Ownership and protocol |
| 34 | +## Organization, settings and recovery |
66 | 35 |
|
67 | | -- `src/bundled/sessions` owns the Sessions page and history navigation. |
68 | | -- `src/bundled/channels` retains ordinary channel access to historical sessions. |
69 | | -- `src/features/sessions` owns composition, recipient selection, workspace settings, |
70 | | - frozen setup, and presentation. Existing relay capabilities own all writes. |
71 | | -- `src/features/relay/work-sessions.ts` uses the existing durable outbox for private |
72 | | - stream creation (kind 9007), invitations (kind 9000), and receipt recovery. |
73 | | -- `browser-host/session-commands.mjs` restricts the host signing boundary to these exact |
74 | | - command shapes. No custom relay operation or migration is needed. |
75 | | -- `session-window.ts` loads ordinary channel rows and complete message overlays |
76 | | - with bounded paging. Signed membership remains the authority for reads. |
| 36 | +Me groups, assignments and section defaults never fall back to Messages defaults. |
| 37 | +Workspace folders, optional worktree/base branch and Canvas are instructions saved |
| 38 | +in ordinary Canvas Markdown; saving settings does not create a worktree or change |
| 39 | +an agent process. Templates are copied, not live-linked. Saved conversation |
| 40 | +settings retain the existing Canvas revision checks and explicit conflict recovery. |
77 | 41 |
|
78 | | -## Validation and scope |
| 42 | +Me uses one bounded 16 KiB recipe record, not unlimited history storage. Admission |
| 43 | +checks its exact serialized size before remote channel creation and again before |
| 44 | +saving placement. A full record keeps the draft and suggests moving an existing |
| 45 | +conversation to Messages, which reclaims its placement and assignment bytes. |
| 46 | +Admission is not a reservation: another device can fill the record between those |
| 47 | +steps. Deleted/archived placements can still consume capacity. No cross-device |
| 48 | +atomicity, automatic compaction or new multi-record storage protocol is claimed. |
79 | 49 |
|
80 | | -Focused tests cover signed create/invite/send, duplicate-creation recovery, |
81 | | -independent memberships, rejected invitations and retry, parent revocation without |
82 | | -child revocation, flat conversation reads, Enter submission, recipient precedence, |
83 | | -and agent mention rendering. Real-agent creation and replies have been exercised |
84 | | -in the native app. |
| 50 | +Share attempts retain in-process intent plus durable per-operation Outbox receipts, |
| 51 | +not a persisted composite transaction. Start over forgets settled choices, not |
| 52 | +submitted operations, created channels, confirmed access or Messages placement. |
| 53 | +An interrupted link can be retried by its exact ID in Outbox; confirmed delivery |
| 54 | +can be removed there before sharing to the same destination again. Unknown |
| 55 | +receipts remain protected. Whole-share intent does not survive an app restart. |
85 | 56 |
|
86 | | -Archive/completion, sharing snapshots, and richer |
87 | | -prompt-linked activity remain future product work. This implementation keeps |
88 | | -memberships independent and detailed activity private to each agent's owner. |
| 57 | +## Owners and validation limits |
89 | 58 |
|
90 | | -### Interactive section/workspace iteration |
| 59 | +`src/bundled/sessions` owns Me navigation and its reused conversation/group UI; |
| 60 | +`src/bundled/channels` owns Messages and Outbox recovery. Shared composition, |
| 61 | +settings and share intent live in `src/features/sessions`; Me preferences use |
| 62 | +`src/features/relay/me-preferences.ts` and the existing recipe capability. Existing |
| 63 | +channel, membership, signing and Outbox owners retain their authority. |
91 | 64 |
|
92 | | -Targeted coverage includes section save/restore/retry, hiding parent-linked |
93 | | -sessions, workspace serialization, revision conflicts, and withholding the first |
94 | | -message until inherited setup succeeds. Native UI checks cover the section |
95 | | -workspace dialog and existing session reads. Live cross-device inheritance and |
96 | | -agent execution from the configured paths still require acceptance testing; |
97 | | -the PR remains a draft until those acceptance checks are complete. |
98 | | - |
99 | | -Section deletion uses the active grouping store: native legacy sections receive a |
100 | | -section tombstone (including the development broker), while personal groups use the existing revision-checked recipe |
101 | | -writer. Sessions and channels are retained and return to the unfiled list; shared |
102 | | -channel-sidebar sections disappear there as well. Hosts without the removal |
103 | | -capability disable the action. Coverage includes native readback, personal-group |
104 | | -removal, source-change rejection, and UI failure/retry. Live deletion of user |
105 | | -sections has not been exercised. Section expansion uses interruptible 180ms motion, |
106 | | -with immediate keyboard and reduced-motion behavior. |
107 | | - |
108 | | -New-session headers expose local draft settings before first send. These overrides |
109 | | -survive reopening, retain section agent defaults, and are frozen into the existing |
110 | | -start receipt. Canvas setup must complete before the first message is sent; |
111 | | -opening or saving the draft settings does not create a remote session. |
| 65 | +Colocated tests cover admission, frozen defaults, navigation lifetime and recovery; |
| 66 | +browser fixtures exercise actual app wiring in Chromium and WebKit with synthetic |
| 67 | +identities. They do not prove native signing, live persistence/restart, |
| 68 | +cross-device/plugin fallback, real-agent effects or opening performance. |
| 69 | +Those checks and renewed human acceptance remain delivery gates where applicable. |
| 70 | +Me menu parity and Archive/Delete availability after Move are disclosed follow-ups, |
| 71 | +not completed behavior in this baseline. |
0 commit comments