|
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 | | -**Direction:** [Me and Messages: channel spaces](spaces.md) records the agreed |
6 | | -replacement for roster-based placement and shared groups. It is a design contract, |
7 | | -not implemented behavior. The current iteration below remains a prototype until |
8 | | -explicit classification, isolated groups and relay policy are integrated. |
| 7 | +## Current behavior |
9 | 8 |
|
10 | | -For the existing destination-link Share implementation and its validation limits, |
11 | | -see [Sharing a live session](sharing.md). That operation is not Me-to-Messages |
12 | | -promotion. |
| 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. |
13 | 33 |
|
14 | | -## Current implementation (not the target space contract) |
| 34 | +## Organization, settings and recovery |
15 | 35 |
|
16 | | -- Personal work conversations now live in **Me**, with **New session** and |
17 | | - history in the shell sidebar. The old Sessions page redirects to Me and no |
18 | | - longer has a primary sidebar entry. Shared sessions and historical parent-linked |
19 | | - sessions remain as ordinary rows in Messages; nested creation/rows were retired |
20 | | - upstream. |
21 | | -- This first app iteration classifies an existing private, unparented session as |
22 | | - personal only when its entire roster is the viewer plus identities in their |
23 | | - managed/owner-scoped agent inventory. This is placement, not proof of ownership |
24 | | - or a new admission guarantee. Relay-enforced personal admission and same-ID |
25 | | - promotion remain separate work. No existing access is revoked by placement. |
26 | | -- Canonical channel/message links still open the existing Messages reader; Me |
27 | | - history uses scoped page routes. Full ingress unification is not implemented. |
28 | | -- Sessions are ordinary private stream channels. Creation, invitations, messages, |
29 | | - roles, and membership use existing relay behavior. **No relay changes or new |
30 | | - Sessions protocol are changed in this app iteration.** |
31 | | -- The description marker `Buzz session (buzz.sessions/v1)` identifies sessions. |
32 | | - Legacy `parent:<UUID>` metadata remains readable, but Sessions no longer creates |
33 | | - nested conversations and the Sessions list excludes parent-linked sessions. |
34 | | - Existing content and signed membership are not changed or deleted. |
35 | | -- The sidebar arranges standalone sessions using the same relay-backed personal |
36 | | - sections as channels. Moving an existing session changes organization only. |
37 | | -- Each custom section has **Session settings…** and a **+** for a new session |
38 | | - in that section. Defaults include project folders, optional worktree location |
39 | | - and base branch, Canvas, and optionally a copy of an existing template's lineup. |
40 | | - Paths become Canvas instructions for the agent host; saving them does not create |
41 | | - a worktree or change a running agent's working directory. |
42 | | -- Section overrides are ordinary private template records, keyed by the SHA-256 |
43 | | - of the section ID in the `session-section-` namespace. They use the existing |
44 | | - community-scoped recipe capability; no sidebar migration or new relay event |
45 | | - kind is involved. Existing personal-group template defaults are used when there |
46 | | - is no Sessions override. Templates are copied, not linked for live propagation. |
47 | | -- Creation freezes section defaults in the existing pending-start receipt. The |
48 | | - session's Canvas, section placement, and template agent invitations must succeed |
49 | | - before its first message is sent. Me rejects defaults containing agents outside |
50 | | - the viewer's selectable inventory before creation or invitations. A retry keeps |
51 | | - the same session ID and setup; |
52 | | - a different existing Canvas blocks replacement. Missing defaults or failed reads |
53 | | - do not silently create an unconfigured session. |
54 | | -- A saved session's header **⋯ → Session settings…** edits that session's Canvas |
55 | | - with the existing revision check. Changes do not update the section default or |
56 | | - sibling sessions. Failed saves retain a local draft and explicit reload flow. |
57 | | -- Saved sessions expose **Rename** in their row and header menus. |
58 | | - The existing channel-details service verifies owner/admin permissions and the |
59 | | - loaded revision, then sends a name-only kind-9002 command. Session metadata, |
60 | | - visibility, and lifetime remain unchanged; uncertain delivery requires checking |
61 | | - the saved result before another write. Automatic generated titles are not added. |
62 | | -- Row menus offer **Section** destinations and **New section…**, plus **Copy** for |
63 | | - the session name, ID, and ordinary Buzz channel link. The unfiled Sessions |
64 | | - destination appears only for sessions currently in a custom section. |
65 | | -- Workspace fields round-trip through a marked block in ordinary Canvas Markdown. |
66 | | - If another editor changes that block, the settings dialog exposes the full |
67 | | - Canvas instead of discarding custom text. |
68 | | -- Me and Messages share the ordinary composer and channel-style titles. The |
69 | | - separate agent picker has been removed. Me's @ menu and inline completions use |
70 | | - only the viewer's selectable agent inventory, including multiple recipients; |
71 | | - pasted/restored recipients are checked against the same inventory. Me sends |
72 | | - without mentions do not infer an agent. Existing shared/nested session routing |
73 | | - retains its earlier sole-agent fallback. Durable legacy pending sends retain |
74 | | - their saved recipient intent for recovery. |
75 | | -- The old destination-sharing button is absent from Me; it is not promotion. |
76 | | -- Published replies appear in the main session conversation. Sessions uses normal |
77 | | - paged channel queries and complete message overlays, without new relay filters. |
78 | | - Existing thread replies are also presented inline. |
79 | | -- Detailed activity remains private to the agent's owner. Do not build a shared |
80 | | - activity feed for today's individually owned agents. Shared cloud agents may |
81 | | - introduce a different visibility model later. |
82 | | -- Use real conversations and agents. No sample activity, fake sends, inferred |
83 | | - permissions, or new execution/scheduling infrastructure. |
| 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. |
84 | 41 |
|
85 | | -## Ownership and protocol |
| 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. |
86 | 49 |
|
87 | | -- `src/bundled/me` owns personal navigation; `src/bundled/sessions` supplies the |
88 | | - reused conversation and section UI. |
89 | | -- `src/bundled/channels` retains ordinary channel access to historical sessions. |
90 | | -- `src/features/sessions` owns composition, recipient selection, workspace settings, |
91 | | - frozen setup, and presentation. Existing relay capabilities own all writes. |
92 | | -- `src/features/relay/work-sessions.ts` uses the existing durable outbox for private |
93 | | - stream creation (kind 9007), invitations (kind 9000), and receipt recovery. |
94 | | -- `browser-host/session-commands.mjs` restricts the host signing boundary to these exact |
95 | | - command shapes. No custom relay operation or migration is needed. |
96 | | -- `session-window.ts` loads ordinary channel rows and complete message overlays |
97 | | - with bounded paging. Signed membership remains the authority for reads. |
| 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. |
98 | 56 |
|
99 | | -## Validation and scope |
| 57 | +## Owners and validation limits |
100 | 58 |
|
101 | | -The upstream evidence below does not validate the Me integration. Its iteration |
102 | | -currently has passing TypeScript, frontend build, formatting and diff checks; |
103 | | -full automated suites and live Me behavior remain deferred for human 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. |
104 | 64 |
|
105 | | -Focused tests cover signed create/invite/send, duplicate-creation recovery, |
106 | | -independent memberships, rejected invitations and retry, parent revocation without |
107 | | -child revocation, flat conversation reads, Enter submission, recipient precedence, |
108 | | -and agent mention rendering. Real-agent creation and replies have been exercised |
109 | | -in the native app. |
110 | | - |
111 | | -Archive/completion and richer prompt-linked activity remain future product work. |
112 | | -[Live sharing](sharing.md) retains independent memberships and each agent owner's |
113 | | -private detailed activity. |
114 | | - |
115 | | -### Interactive section/workspace iteration |
116 | | - |
117 | | -Targeted coverage includes section save/restore/retry, hiding parent-linked |
118 | | -sessions, workspace serialization, revision conflicts, and withholding the first |
119 | | -message until inherited setup succeeds. Native UI checks cover the section |
120 | | -workspace dialog and existing session reads. Live cross-device inheritance and |
121 | | -agent execution from the configured paths still require acceptance testing; |
122 | | -those acceptance checks remain deferred for this integration. |
123 | | - |
124 | | -Section deletion uses the active grouping store: native legacy sections receive a |
125 | | -section tombstone (including the development broker), while personal groups use the existing revision-checked recipe |
126 | | -writer. Sessions and channels are retained and return to the unfiled list; shared |
127 | | -channel-sidebar sections disappear there as well. Hosts without the removal |
128 | | -capability disable the action. Coverage includes native readback, personal-group |
129 | | -removal, source-change rejection, and UI failure/retry. Live deletion of user |
130 | | -sections has not been exercised. Section expansion uses interruptible 180ms motion, |
131 | | -with immediate keyboard and reduced-motion behavior. |
132 | | - |
133 | | -New-session headers expose local draft settings before first send. These overrides |
134 | | -survive reopening, retain section agent defaults, and are frozen into the existing |
135 | | -start receipt. Canvas setup must complete before the first message is sent; |
136 | | -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