Share a Claude Code session with a link, or with your team. Teammates join from their own Claude Code and talk to it: one session does the work, everyone sees…

Work in the same Claude session with your team. Share a link, let a teammate join from their own Claude Code, and see each other's prompts, streamed replies and tool results. The host's machine does the work.
Install · Try a first session · Full guide · Contribute
Watch the 90-second demo on X or download the 8-second invitation clip. The clip shows an invitation arriving in Claude Desktop. Recorded with fictional teammates; demo details and music credit.
Works in Claude Desktop and the terminal. A public room server is included, or you can run your own.
Both people need a working Claude Code installation and this plugin. Requires Claude Code 2.1.286+. Check with claude --version; if your terminal copy is older, use claude update or the setup option below. Your normal Claude authentication still applies; sharing by link needs no separate Shared Sessions account.
In a terminal with a supported Claude Code version:
claude plugin marketplace add Paradigm-Study/claude-share
claude plugin install shared-session@claude-share
Leave the optional share-server setting empty to use the public server. Start a new session after installing. Quit and reopen Claude Desktop to load the plugin into sessions already open.
Have Desktop but an older terminal CLI? With Git and Node 20+ installed, the setup script can find the newer Claude Code bundled with Desktop on macOS:
git clone https://github.com/Paradigm-Study/claude-share.git
cd claude-share
node scripts/setup.mjs join
Despite the command name, join installs the plugin for both sharing and joining. It also enables automatic marketplace updates and the function-hooks switch needed on 2.1.285. Read its NOTE lines; if it prints NEEDS HUMAN, complete that step and rerun the command. More setup and update options.
Try this with a new session in a scratch project:
/share-session. Copy the link./stop-sharing when done. The room ends for everyone.Sharing a session with existing history asks whether to include it. Choose Only from now on or /share-session new to leave earlier messages out. Anything you share passes through the room server; read what it sees and keeps.
Use /room for people, the timeline of turns, the files Claude changed, side chat and host controls, and /who for who's here. In the transcript, react to Claude's replies, see who has seen each, and @name a teammate. Use /team for optional teams. To let teammates open a local dev server, run /share-preview <port> on the host; the plugin also asks about the other web servers the same project runs (a backend on 3510 and 3511, say), one server at a time (three ports a question at most), for the host to share with a click each. Guests press Open preview, and the page opens at the host's own address (http://localhost:3000), so OAuth callbacks and hard-coded 127.0.0.1 backends work. When those port numbers are free on the guest's machine, the page opens there, as VS Code's port forwarding does: in Claude's browser in Claude Desktop, in the guest's own browser in a terminal (Room → Settings → Previews changes it). When one is taken, it opens in a separate browser window instead (Chrome, Edge, Brave, Chromium, Firefox 140+, Vivaldi or Opera, on macOS and Linux), so the guest's own servers on those ports are untouched. Close in Room → Shown, or the host's Stop of that preview, frees the ports again. Previews require Node 20+, POSIX sh and the host's live curl stream. Commands and supported previews.
Keep it running in the cloud. Room → Settings → Move to cloud hands your session's host to a Claude Code the room server runs in a container, so teammates keep working while your computer sleeps. It signs in as you (a token from claude setup-token, copied once and kept on your computer). Every call a teammate's prompt makes, and anything of its localhost before it's shared, asks you first, above the prompt and in the Room wherever you are, and the Room's settings stay yours to change. Bring home takes the session back here with the cloud's changes to your files. How it works.
The default server is claude-share.proud-limit-da0a.workers.dev, run by this project. It receives the shared transcript, tool results, side chat, reactions to replies and who has seen each, and shared files. Messages between a guest's own other sessions and the host's session pass through it to the other side alone and are never kept. Traffic is encrypted in transit, not end to end. Anyone with a room link can join unless access is restricted to a team.
Rooms and their files are deleted 24 hours after the host stops sharing or was last seen, and a room keeps only its newest 5,000 events, 16 MB of them at most. Previews keep a little with the room until then: a forwarded preview and coarse connection and traffic counters (its connections keep nothing, and close when that person leaves or the host stops the preview); a preview opened through its link, that link for 10 minutes and the browser session it starts for 12 hours from the last link that browser opened, or until that person leaves or the host stops the preview (at most 4 sessions per seat and preview, and a room's newest 128 links and 256 sessions; a seat is one person's session in the room). A link or session that expired is removed at the room's next activity, or with the room; one that ended goes at once. Application bytes are relayed, never stored, and there are no analytics or request logs. To count the rooms each network makes in a day, the Cloudflare server keeps a hash of each new room's network address, keyed by a random key made for that day, with that count, until the day (UTC) ends. A session moved to the cloud sends its project's files, its conversation and its host's Claude token to a container the server starts for that room; the server passes them on and keeps none of them, and the container, with everything in it, is deleted when the session comes home, the room ends, or a week after the move. Its changes are kept as a room file for Bring home, deleted with the room. Team accounts and settings persist until account deletion. Signing in finishes only when you press Continue on the server's page, which shows the same code as Claude Code; until you press Continue, the server keeps who GitHub or Google said you are, and after ten minutes that sign-in stops working and is deleted. The server keeps only a hash of Claude Code's token, never the token.
Every session's previews share one preview host name, and their links name the session by a key of its own, which can't join it. A browser not already in a session's previews has that host name's storage and cache, and its domain's cookies, cleared before it enters (browsers clear them only over HTTPS, or on localhost), and no preview can register a service worker there. That can't stop a page that's still open: a preview page of one session left open in a browser can reach the previews of a session that browser opens after it, so close one you don't trust first, or use a server whose previews each have a host name of their own (how). A guest's preview window keeps its sign-ins in a local profile: one per host who is signed in, kept between that host's sessions and deleted after 30 days unused; otherwise one per room, deleted when they leave. The public service has limits, including 20 people, 100 MB of files (10,240 at most), 128 open previews and events of 128 KB each per room, and for a preview's link 512 waiting requests per room, 32 WebSockets per seat and 8 MB waiting for the host per room; a room sends out at most 8 GB a day of its files and preview answers, 256 MB a minute to any one seat; a WebSocket closes once 1 MB it sent waits unread (on Cloudflare, once one side sends more than 4 MB in a second). Full data, retention and access details.
Sharing by link works with the public server. Teams that want their own infrastructure can use a Cloudflare Worker or the Node server:
node scripts/setup.mjs deploy
Run that from a clone with Node 20+; Cloudflare account setup and browser authorization need a person. For an existing server, use node scripts/setup.mjs host --server https://your-server. Cloudflare, Node and team sign-in setup.
hooks: Invalid input: check claude --version. Use the setup script above if Desktop has a newer copy than your terminal.node scripts/setup.mjs check. Add --live to test sharing, resuming, stopping and joining with temporary sessions through the selected server.More troubleshooting · Report a reproducible bug
The host executes the work. Guests see replayed tool cards; those cards do not run the host's commands on their machines. A guest's other Claude sessions on the same computer can message the host's Claude through the joined session (SendMessage to it), and the host's Claude's SendMessage answer goes back to that session alone. Claude Code treats these as messages between any two sessions at both ends: the host's permission mode, not the approval a teammate's prompt asks for, decides what such a message may run, a message from a session in another permission mode class (bypass against the others) waits until its person lets it in, and loops between sessions are cut. Host approval rules govern guest requests, agents a guest's prompt starts included; a call that can't be put to the host, or goes unanswered, is declined. Room links grant access, and the relay server can read shared content. Permissions, files and preview boundaries.
Guests see the first 40 lines of each tool result. Subagents' inner steps are not mirrored. Some viewers and session-list features are Desktop-only; terminal guests receive files or links. Local previews need the host's session and dev server to stay open. Compatibility and resource limits.
The plugin is in plugin/; shared room logic is in server/core.mjs. CONTRIBUTING.md covers local development and tests. AGENTS.md records the engine contracts and release procedure.
If you use Shared Sessions, a star helps other developers find it. Bug reports with the versions and steps to reproduce help us improve it.
MIT. The Paradigm name, logo and Clover character remain trademarks of Paradigm Study. Demo music has separate attribution terms.
types/index.d.ts 451 lines1export type ShareMode = 'idle' | 'host' | 'guest'
2
3export type ShareRoom = {
4 /** The room server's origin, from the share link or the plugin's default. */
5 server: string
6 id: string
7 url: string
8 title: string
9 /** The host's display name. */
10 host: string
11 /** This seat's bearer token (the host's or a guest's). */
12 token: string
13 /** This seat's id in the room: `host`, or the guest seat the server gave. */
14 seat: string
15 /** Last event seq this session has seen. */
16 seq: number
17 /** When this session started sharing or joined, ms since the epoch. */
18 since: number
19 /** The team it's shared with: listed for its people, whose access setting says who joins. */
20 team?: { id: string; name: string } | null
21}
22
23/** A room's host in the cloud: started, running, or stopped after its week. */
24export type ShareCloud = { state: 'starting' | 'running' | 'stopped'; approver: string; since: number; until?: number; mine: boolean }
25
26/**
27 * A question the cloud host put to its approver: a teammate's call, as the
28 * host's own dialog would ask it, or (`kind`) one about its localhost, as the
29 * host's row above the prompt would (`ShareHostAsk`): `port` and `related`
30 * are what a yes shares, and `options` its two answers.
31 */
32export type ShareCloudAsk = { id: string; who: string; seat?: string; kind?: ShareHostAsk['kind']; port?: number; label?: string; related?: { port: number; label: string }[]; what: string; extent?: string; preview?: string; always: string; options: string[]; ts: number }
33
34export type SharePerson = {
35 id: string
36 name: string
37 role: 'host' | 'guest'
38 online: boolean
39 /** Their plugin's version, as the room heard it. */
40 version?: string
41 /** Every seat of theirs (a person signed in from several sessions is one entry). */
42 seats?: string[]
43 /** Their account on the share server, when they're signed in. */
44 account?: string
45}
46
47/** Host: a teammate's prompt waiting to go to Claude: who, the seat it came from, as Claude reads it (`framed`), as guests see it (`text`), its id, whether it has gone, and `aside` once it went and no turn started with it for a while: out of the line, but still theirs if its turn starts later. */
48export type ShareGuestPrompt = { who: string; seat: string; framed: string; text: string; pid: string; sent?: true; aside?: true }
49
50/** Host: whose a turn, an agent or a call is: their name, and the seat their prompt came from (`''` when it can't be told: never always allowed). The host's own is `who: ''`. */
51export type ShareOwner = { who: string; seat: string }
52
53/** Host: a teammate the host always allows, by the seat they were asked for and its account (their other sessions), never by a name anyone can join as. */
54export type ShareTrust = { who: string; seat: string; account?: string }
55
56export type ShareWorking = {
57 turnId: string
58 /** Who the running turn is for. */
59 by: string
60 /** True when a guest's prompt started it (its tools need the host's approval). */
61 byGuest: boolean
62 /** The seat that guest's prompt came from (`''` when it can't be told). */
63 seat?: string
64 startedAt: number
65 /** The tail of the text Claude is streaming, for guests. */
66 tail: string
67 /** A tool call waiting for the host's approval, as guests see it. */
68 waitingFor: string | null
69 /** What the host's Claude is doing this moment, as guests see it: thinking, writing a tool call, or running one. */
70 doing?: ShareDoing | null
71}
72
73/** A moment of a host's step, live: thinking, writing a call (which tool, what for, how far), or running one. */
74export type ShareDoing = { kind: 'thinking' | 'writing' | 'running'; tool?: string; target?: string; chars?: number }
75
76/** One line of the Room panel's timeline. */
77export type ShareActivity = {
78 ts: number
79 who: string
80 kind: 'join' | 'leave' | 'prompt' | 'allowed' | 'denied' | 'stop' | 'policy' | 'shown'
81 text?: string
82}
83
84/** One turn of the session, as the Timeline draws it: who asked, what, how long it took. */
85export type ShareTurn = { id: string; who: string; prompt: string; at: number; /** How long it ran, once it ended. */ ms?: number }
86
87/** A file Claude changed this session, for whom, and its patch (unified-diff hunks). */
88export type ShareChange = { path: string; who: string; added: number; removed: number; patch: string; at: number }
89
90/** What a person hears and sees of the room, kept across sessions. */
91export type SharePrefs = {
92 /** `mentions`: a ping when someone @mentions you, a chime when your prompt starts; `all`: a knock when someone joins too. */
93 sounds: 'off' | 'mentions' | 'all'
94 /** Joins and mentions said out loud by the computer's voice. */
95 voice: boolean
96 /** The room in the status line under the prompt. */
97 statusLine: boolean
98 /** A guest: messages from their other Claude sessions here go on to the host's Claude (relayed, as from that session). */
99 relayPeers: boolean
100}
101
102/** The room's side channel: people talk, Claude never reads it. */
103export type ShareChat = { ts: number; who: string; seat: string; text: string }
104
105/** The host's say over what guests may do. */
106export type SharePolicy = {
107 /** `everyone`: guests' prompts run; `watch`: guests follow along and chat. */
108 prompts: 'everyone' | 'watch'
109 /** Which of a guest's tool calls ask the host first. */
110 approvals: 'edits' | 'all' | 'none'
111 /** Whether what the host's Claude shows (files, widgets, pages, previews) reaches guests. */
112 files?: 'on' | 'off'
113}
114
115/** A file as the room keeps it: its bytes are at files/<id>. */
116export type ShareFileMeta = { id: string; name: string; type: string; size: number; /** Where a page's file sits beside it (`img/01.jpg`). */ path?: string }
117
118/**
119 * Something the host's Claude showed: a file in the side panel or the Files
120 * pane, a widget, a page, or a preview of the host's localhost.
121 */
122export type ShareShown = {
123 key: string
124 kind: 'send' | 'widget' | 'file' | 'page' | 'preview' | 'link'
125 name: string
126 /** A preview's title as its artifact (or the room) gave it, without what `name` adds to it. */
127 title?: string
128 ts: number
129 files?: ShareFileMeta[]
130 pid?: string
131 port?: number
132 /** A preview's page: where its links land. */
133 path?: string
134 url?: string
135 /** A preview the host has stopped. */
136 closed?: boolean
137 /**
138 * A preview the host chose to share for forwarding to a guest's localhost
139 * (raw TCP); else it opens through its link. A guest takes it from the
140 * room's list of what's shared, whatever an artifact says.
141 */
142 tcp?: boolean
143 /** A preview's address as the host gave it (`0.0.0.0` is `localhost`): a preview window opens exactly this origin. */
144 host?: 'localhost' | '127.0.0.1' | '[::1]'
145 /** A preview the host serves over TLS (`https://localhost:3000`); absent is http. */
146 scheme?: 'https'
147 /**
148 * A preview shared for another page's sake (an API the app calls): the
149 * host port of the page that uses it, or `true` when that isn't known.
150 * Pages in a guest's preview window reach it at its own address; it is
151 * never what Open preview opens.
152 */
153 dependency?: number | true
154}
155
156/** Guest: the room's preview window, by its proxy's port (Chrome keeps the flags it started with), and the previews opened in it. */
157export type SharePreviewWindow = {
158 room: string
159 port: number
160 opened: string[]
161 /** Its profile's folder name: the room's and this session's lasting place's, so a reopened session finds its own. */
162 profile?: string
163}
164
165/**
166 * Host: one localhost port this session shares, by port (`shares`): its
167 * preview, and whether the host forwards it and as what, or it opens only
168 * through its link.
169 */
170export type HostShare = {
171 pid: string
172 /** The host chose to let guests forward it to their own localhost over raw TCP (/share-preview, Allow forwarding…); absent, only its link. */
173 tcp?: true
174 /** Forwarded: its address as the host spelled it (`0.0.0.0` is `localhost`); a page Claude opens on it later says the same. */
175 host?: 'localhost' | '127.0.0.1' | '[::1]'
176 /** Its server speaks TLS: its link's requests and sockets go to https and wss. Forwarded, as its forward said it, once said; else as the newest page shown on it said. */
177 scheme?: 'https'
178 /** Forwarded for another page's sake: that page's host port, or `true` when that isn't known; a page Claude opens on it later stays one. */
179 dependency?: number | true
180}
181
182/**
183 * Host: what the host said about sharing more in the room it shares, kept
184 * through a reload and cleared with the room. A hosting place saves it with
185 * its room's name (`room`), and it's taken back only for that room.
186 */
187export type ShareHostMemory = {
188 /** Ports the host said Not now to, or stopped: not asked about again until the host shares them again. */
189 declined: number[]
190 /** Ports the host stopped: not shared again for Claude's mention of them (or a reopened session's look back) until the host shares them again. */
191 stopped: number[]
192 /** When each port was last asked about: once in ten minutes at most. */
193 askedAt: Record<string, number>
194}
195
196/**
197 * Messages between sessions, by id: whose each is. Guest: a handle, which the
198 * room carries in the place of one of this person's sessions (`to`, its
199 * address, which never leaves this computer; `name`, what it calls itself),
200 * at the seat it was made at. Host: a mailbox (relay/mailbox.cjs), standing
201 * for a teammate's session by the seat and handle the room brought its
202 * message with, that teammate's name (`who`) and the session's (`name`).
203 * `at`: when it was last used.
204 */
205export type SharePeerRoute =
206 | { kind: 'guest'; to: string; name: string; seat: string; at: number }
207 | { kind: 'host'; seat: string; handle: string; who: string; name: string; at: number }
208
209/**
210 * Guest: a message one of this person's sessions wrote here, relayed to the
211 * host's session: the message id its session gave it (`id`, which the host's
212 * Claude Code's receipts name; `native` false when it couldn't be read and
213 * this one is new), the turn it plays in here (`pid`), its handle and that
214 * session's address (`to`), and whether a hold went back to that session.
215 */
216export type SharePeerRelay = { id: string; pid: string; handle: string; to: string; native: boolean; held?: true; at: number }
217
218/**
219 * Guest: a message this session sent one of this person's sessions, in the
220 * order sent: a reply of the host's session's (its `handle` and message id,
221 * `ref`) or a note of this plugin's (neither), and the message id Claude
222 * Code gave it once one of its delivery notices named it.
223 */
224export type SharePeerSend = { to: string; at: number; handle?: string; ref?: string; id?: string }
225
226/** Host: the mailboxes' helper running for a room (detached), which a reload ends by its pid. */
227export type ShareMailboxHelper = { room: string; pid: number; port: number }
228
229/** Guest: the ports the preview window asked the host about in the room it's in (once each), and when (five a minute). */
230export type ShareNeedAsked = { ports: number[]; times: number[] }
231
232/** Host: a question in the row above the prompt about sharing more of this machine's localhost. Only a proposal: the host's press shares. */
233export type ShareHostAsk = {
234 id: string
235 /** `show`: share through its link a page Claude gave out or opened; `related`: what a shared port also uses; `mention`: forward a port Claude's mention shared as a page; `need`: a guest's preview asked for it. */
236 kind: 'show' | 'related' | 'mention' | 'need'
237 port: number
238 label?: string
239 /** The guest whose preview asked (`need`). */
240 who?: string
241 /** `related`: the ports of the one service beside the page that a yes forwards, three at most (a service a question: one process, so a backend on two ports is one question; one on more ports, a question each three, in turn); empty for `show`, `mention` and `need`, whose yes shares or forwards `port`. */
242 related: { port: number; label: string }[]
243}
244
245/**
246 * Guest: a localhost listener to restore, without its process or
247 * credentials, saved once the Open (or the restore) that brought it up was
248 * done.
249 */
250export type ShareLocalPreview = {
251 pid: string
252 /** Host's target port. */
253 port: number
254 /** Its actual local port: a reload or resume binds exactly there again, or not at all. */
255 localPort?: number
256 /**
257 * What a page uses, opened by its own Open (its row in Room → Shown), not
258 * only for a page: it stays when a page that uses it is Closed or Stopped.
259 */
260 own?: true
261}
262
263/** The person signed in to the share server (GitHub or Google). */
264export type ShareAccount = { id: string; name: string; login?: string; email?: string; provider: string }
265
266/** A team, as one of its people sees it (domains and orgs: owners only). */
267export type ShareTeam = {
268 id: string
269 name: string
270 role: 'owner' | 'member'
271 /** `members`: only people in the team join its sessions; `link`: anyone with a link. */
272 access: 'members' | 'link'
273 domains?: string[]
274 githubOrgs?: string[]
275 invite: string
276}
277
278/** A session shared with a team, as the team's list shows it. */
279export type ShareTeamSession = { id: string; url: string; title: string; host: string; hostAccount?: string; hostOnline: boolean; people: string[]; /** Who's in it by account. */ accounts?: string[]; createdAt: number }
280
281/** A host's invite to a session, as the invitee's Claude Code shows it. */
282export type ShareInvite = { room: { id: string; url: string; title: string; host: string }; from: { name: string }; at: number }
283
284/** The Team panel: who's signed in, their teams, and what's shared with the one shown. */
285export type ShareTeams = {
286 /** The share server these are on. */
287 server: string
288 account: ShareAccount | null
289 teams: ShareTeam[]
290 /** The team the panel shows, and Share goes to unless `byLink`. */
291 current: string | null
292 /** Share goes by link alone, not to the team. */
293 byLink: boolean
294 sessions: ShareTeamSession[]
295 members: { id: string; name: string; login?: string; role: 'owner' | 'member' }[]
296 /** Everyone who shares a team with you: whom you can invite to a session. */
297 teammates?: { id: string; name: string; login?: string }[]
298 /** Who the server signs people in with. */
299 providers: { id: string; label: string }[]
300 /**
301 * A sign-in waiting in the browser. `code`: what the server's page shows
302 * too (the first eight hex of the hash sent, `XXXX-XXXX`), to continue
303 * only if they match.
304 */
305 signingIn: { provider: string; url: string; until: number; code: string } | null
306 /** An invite link to take once signed in. */
307 invite: { server: string; code: string } | null
308 /** When the list was last asked for, ms since the epoch (0: never). */
309 loaded: number
310 error: string | null
311 /** The panel's new-team field is open. */
312 creating?: boolean
313 /** Rooms another session on this computer is in, and as what. */
314 here?: Record<string, 'host' | 'guest'>
315}
316
317declare module 'claude-code' {
318 interface PluginState {
319 'shared-session': {
320 mode: ShareMode
321 room: ShareRoom | null
322 people: SharePerson[]
323 working: ShareWorking | null
324 activity: ShareActivity[]
325 chat: ShareChat[]
326 /** Chat lines that arrived while the Room panel was closed. */
327 unread: number
328 policy: SharePolicy
329 /** Guests whose tool calls the host allowed for the rest of the session. */
330 trusted: ShareTrust[]
331 /** Host: who each tool call of a guest's turn was for, by tool_use_id. */
332 owners: Record<string, ShareOwner>
333 /**
334 * What the host's Claude showed, newest last (the Room panel's Files):
335 * the newest 40 of what isn't an open preview, and every open preview
336 * (the newest 128). A guest's is what the host forwards, too: the
337 * window's authority, Open preview's list and a restore's.
338 */
339 shown: ShareShown[]
340 /** Guest: open what the host's Claude shows without asking (default), or ask each time. */
341 autoOpen: boolean
342 /** Host: what this session shares, by port: its preview, and whether (and as what) it's forwarded. */
343 shares: Record<string, HostShare>
344 /** Guest: previews opened on this machine's localhost, restored after reload/resume. */
345 localPreviews: ShareLocalPreview[]
346 /** Guest: the room's preview window, its proxy port kept through a reload. */
347 previewWindow: SharePreviewWindow | null
348 /** Guest: previews whose authorization was refused in the window: only an explicit Open reconnects them. */
349 previewNeedsOpen: string[]
350 /** Host: the question in the row above the prompt about sharing another port, one at a time. */
351 hostAsk: ShareHostAsk | null
352 /** Host: what the host said about sharing more in this room. */
353 hostMemory: ShareHostMemory | null
354 /** Guest: the ports the preview window asked the host about. */
355 needAsked: ShareNeedAsked | null
356 /** Messages between sessions: the host's mailboxes, or a guest's handles, by id (the newest 64): whose each is. */
357 peerRoutes: Record<string, SharePeerRoute>
358 /** Guest: messages relayed to the host's session (the newest 64). */
359 peerRelays: SharePeerRelay[]
360 /** Guest: messages sent to this person's other sessions (the newest 64). */
361 peerSends: SharePeerSend[]
362 /** Host: the mailboxes' helper this module started. */
363 mailboxHelper: ShareMailboxHelper | null
364 /** Claude Desktop's sidebar row as it was before sharing marked it, to put back. */
365 sidebar: { title: string; pinned: boolean; id?: string; /** The pin sharing or joining made took. */ pinOk?: boolean } | null
366 /** Share was pressed in a session with history: the row asks whether to include it. */
367 asking: { prompts: number } | null
368 /** Whether this session hears the room: `live`, or `reconnecting` after failed tries. */
369 connection: 'live' | 'reconnecting'
370 /** Guest, in a terminal: replayed reads, searches and commands folded into count lines, or each drawn. */
371 toolRows: 'grouped' | 'each'
372 /** Guest: per replayed call (by tool_use_id), its run's tools on the first call, `hidden` on the rest. */
373 replayRun: StateFamily<{ tools?: string[]; hidden?: true } | null>
374 /** Host: a teammate's tool call waiting for an answer in the row above the prompt (the question dialog didn't show): the oldest waiting there, its id (what its buttons answer), whose, what its one line leaves out (`extent`: a command's lines after its first, an edit's or a new file's size; the Room shows it whole), and how many more wait after it. */
375 approving: { id: string; who: string; what: string; extent?: string; always: string; more: number } | null
376 /** The room's host in the cloud (docs/cloud-host.md), as its pages say; `mine` in the session that moved it, its approver. */
377 cloud: ShareCloud | null
378 /** The approver's: the cloud host's questions waiting for an answer, oldest first. */
379 cloudAsks: ShareCloudAsk[]
380 /** The approver's: whom the cloud host always allows, as this session knows it (the move's, then each Always allow it gave), until its Ask again. */
381 cloudTrusted: string[]
382 /** Where Move to cloud or Bring home is, for the Room to say. */
383 cloudMove: { stage: 'idle' | 'token' | 'packing' | 'starting' | 'home' | 'failed'; note?: string } | null
384 /** Host: a teammate's calls put to the host and not answered yet, by tool_use_id (the newest 64). A hook whose module ends under it has its `.catch` asked in the module after it, which denies these. */
385 unanswered: string[]
386 /** The hooks module that started last in this session, by its own id. A module a reload replaced finds another here, declines the calls still waiting in its row, whose buttons are now the new module's, and stops hearing the room. */
387 module: string | null
388 /** Host: whose each agent is, by its loop's id (the newest 200): the teammate whose turn or agent started it, `who: ''` for the host's own. Its calls are put to the host as theirs, whatever turn runs by then; the host's own, or one not here, are the running turn's. */
389 agents: Record<string, ShareOwner>
390 /** Host: teammates' prompts waiting to go to Claude, one turn each, oldest first; the first is `sent` once submitted, until its turn starts, and one that hasn't started a while on is `aside` (the newest 8), known still when it does. */
391 guestPrompts: ShareGuestPrompt[]
392 /** The main loop's turn running now, by its id, whatever the mode: a teammate's prompt goes to Claude only once none runs. */
393 turn: string | null
394 /** A button pressed once that ends something for everyone, waiting for its second press. */
395 confirming: 'stop' | null
396 /**
397 * A way out of the room under way (`closeRoom`): how, and its room
398 * (`server/id`). Written as the close begins, just before the mode
399 * goes idle; cleared with the room's state. A start that finds it (a
400 * reload cut the close short) finishes the close; one naming another
401 * room than the one set clears nothing.
402 */
403 closing: { how: 'leave' | 'stop' | 'ended' | 'keep' | 'clear'; room: string } | null
404 /** The Team panel's Stop or Leave pressed once on a room (`stop:<id>`, `leave:<id>`): the next press does it. */
405 stoppingRoom: string | null
406 /** A newer plugin than this one, as the share server last said. */
407 newer: string | null
408 /** The Update button's run: under way, or what it did (`text`, `ok`) and when. */
409 updating: { state: 'running' } | { state: 'done'; ok: boolean; text: string; at: number } | null
410 /** Whether Claude Code updates this plugin by itself (the marketplace's `autoUpdate`); null when unknown. */
411 updates: boolean | null
412 /** Updates in place: this session runs the copy that updates itself (`running`), or new sessions will (`next`). */
413 liveUpdates: 'running' | 'next' | 'pinned' | null
414 /** Pages the host's Claude published, by artifact id: what goes to the room again when one is opened again. */
415 pages: Record<string, Record<string, unknown>>
416 /** The Team panel's sign-in, teams and team sessions. */
417 teams: ShareTeams
418 /** Sessions teammates invited you to, newest first, until joined or dismissed. */
419 invites: ShareInvite[]
420 /** Host: teammates invited to this session, by account id, and when. */
421 invited: Record<string, number>
422 /** Claude Code (auto mode) wouldn't let this session be pinned: the Room offers to allow it. */
423 pinRefused: boolean
424 /** Auto mode refused the plugin's call to Claude's browser: not tried again until an allow rule names it, which the Room offers to add. */
425 paneRefused: boolean
426 /** The Room's page showing: who's here, the chat, every turn, the files changed, what Claude showed, or the settings. */
427 roomTab: 'people' | 'chat' | 'timeline' | 'changes' | 'shown' | 'settings'
428 /** Every turn of the session, oldest first (the newest 200). */
429 turns: ShareTurn[]
430 /** The files Claude changed, newest last (the newest 40). */
431 changes: ShareChange[]
432 /** Reactions to Claude's replies: by the reply's key, by emoji, who. */
433 reactions: Record<string, Record<string, string[]>>
434 /** Who has had each reply on screen, by the reply's key. */
435 seen: Record<string, string[]>
436 /** Who each of Claude's replies was for, by message id. */
437 replyFor: Record<string, string>
438 /** Tool calls Claude made this session. */
439 calls: number
440 /** The file open on the Room's Changes page. */
441 changeOpen: string | null
442 /** The link was just copied: the Room's Copy says so for a moment. */
443 copied: boolean
444 /** What this person hears and sees of the room. */
445 prefs: SharePrefs
446 /** The Team panel's page showing: live sessions, the team's people, or the settings. */
447 teamTab: 'live' | 'people' | 'settings'
448 }
449 }
450}
451