@hanzo/app 0.2.58 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +8 -8
  2. package/dist/{Me.d.ts → Account.d.ts} +1 -1
  3. package/dist/{Me.js → Account.js} +3 -3
  4. package/dist/App.d.ts +2 -2
  5. package/dist/App.js +16 -16
  6. package/dist/{Top.d.ts → Bar.d.ts} +1 -1
  7. package/dist/{Top.js → Bar.js} +3 -3
  8. package/dist/Betas.js +1 -1
  9. package/dist/Board.js +4 -4
  10. package/dist/Chat.d.ts +4 -4
  11. package/dist/Chat.js +96 -96
  12. package/dist/Contacts.js +17 -15
  13. package/dist/Directory.js +7 -21
  14. package/dist/Drive.js +6 -6
  15. package/dist/{Orgs.d.ts → Gate.d.ts} +1 -1
  16. package/dist/{Orgs.js → Gate.js} +32 -32
  17. package/dist/{Chrome.d.ts → Header.d.ts} +1 -1
  18. package/dist/{Chrome.js → Header.js} +1 -1
  19. package/dist/Home.d.ts +3 -3
  20. package/dist/Home.js +30 -30
  21. package/dist/Inbox.js +29 -33
  22. package/dist/Meet.js +22 -22
  23. package/dist/Rail.js +6 -6
  24. package/dist/RightPane.js +2 -2
  25. package/dist/{Palette.d.ts → Search.d.ts} +1 -1
  26. package/dist/{Palette.js → Search.js} +1 -1
  27. package/dist/Settings.d.ts +3 -3
  28. package/dist/Settings.js +5 -5
  29. package/dist/SettingsPane.d.ts +2 -2
  30. package/dist/SettingsPane.js +5 -5
  31. package/dist/Setup.js +2 -2
  32. package/dist/Shell.d.ts +22 -31
  33. package/dist/Shell.js +167 -114
  34. package/dist/{Column.d.ts → Sidebar.d.ts} +1 -1
  35. package/dist/{Column.js → Sidebar.js} +5 -5
  36. package/dist/Support.js +2 -2
  37. package/dist/Talk.d.ts +3 -3
  38. package/dist/Talk.js +18 -18
  39. package/dist/TeamPreview.js +26 -26
  40. package/dist/TeamStory.js +1 -1
  41. package/dist/Usage.js +2 -2
  42. package/dist/Work.js +2 -2
  43. package/dist/bots/Bots.js +2 -2
  44. package/dist/bots/Lights.d.ts +1 -1
  45. package/dist/bots/Lights.js +1 -1
  46. package/dist/bots/api.d.ts +8 -7
  47. package/dist/bots/api.js +4 -4
  48. package/dist/bots/ink.js +3 -3
  49. package/dist/bots/kit.d.ts +2 -2
  50. package/dist/bots/kit.js +4 -4
  51. package/dist/bots/runtime.js +12 -12
  52. package/dist/cast.d.ts +14 -14
  53. package/dist/cast.js +12 -12
  54. package/dist/channels.d.ts +132 -0
  55. package/dist/{rooms.js → channels.js} +56 -55
  56. package/dist/conversations.d.ts +8 -8
  57. package/dist/conversations.js +18 -17
  58. package/dist/crew.d.ts +1 -1
  59. package/dist/crew.js +12 -12
  60. package/dist/dev.js +6 -6
  61. package/dist/failure.d.ts +2 -2
  62. package/dist/failure.js +6 -6
  63. package/dist/ground.d.ts +1 -1
  64. package/dist/ground.js +1 -1
  65. package/dist/help.d.ts +1 -1
  66. package/dist/help.js +2 -2
  67. package/dist/hint.d.ts +1 -1
  68. package/dist/hint.js +1 -1
  69. package/dist/host.d.ts +15 -15
  70. package/dist/host.js +13 -13
  71. package/dist/index.d.ts +5 -5
  72. package/dist/index.js +4 -4
  73. package/dist/lib/ai.js +1 -1
  74. package/dist/lib/api.d.ts +1 -1
  75. package/dist/lib/api.js +1 -1
  76. package/dist/lib/destination.d.ts +3 -3
  77. package/dist/lib/destination.js +3 -3
  78. package/dist/lib/home.d.ts +2 -2
  79. package/dist/lib/home.js +2 -2
  80. package/dist/lib/host.d.ts +17 -16
  81. package/dist/lib/host.js +19 -18
  82. package/dist/lib/hostname.d.ts +1 -1
  83. package/dist/lib/hostname.js +1 -1
  84. package/dist/lib/list.d.ts +1 -1
  85. package/dist/lib/list.js +1 -1
  86. package/dist/lib/models.js +1 -1
  87. package/dist/lib/org.d.ts +1 -1
  88. package/dist/lib/org.js +1 -1
  89. package/dist/lib/orgname.d.ts +1 -1
  90. package/dist/lib/orgname.js +1 -1
  91. package/dist/lib/session.d.ts +4 -4
  92. package/dist/lib/session.js +6 -6
  93. package/dist/lib/tier.d.ts +4 -4
  94. package/dist/lib/tier.js +5 -5
  95. package/dist/lib/tiers.d.ts +1 -1
  96. package/dist/lib/tiers.js +10 -10
  97. package/dist/lib/web.d.ts +1 -1
  98. package/dist/lib/web.js +1 -1
  99. package/dist/network.d.ts +18 -18
  100. package/dist/network.js +28 -28
  101. package/dist/open.d.ts +24 -22
  102. package/dist/open.js +19 -19
  103. package/dist/pane.d.ts +6 -6
  104. package/dist/pane.js +10 -10
  105. package/dist/roster.d.ts +2 -2
  106. package/dist/roster.js +1 -1
  107. package/dist/seek.js +1 -1
  108. package/dist/slide.d.ts +1 -1
  109. package/dist/slide.js +1 -1
  110. package/dist/span.js +1 -1
  111. package/dist/stars.d.ts +4 -4
  112. package/dist/stars.js +8 -10
  113. package/dist/tabs.d.ts +1 -1
  114. package/dist/tabs.js +1 -1
  115. package/dist/team.js +1 -1
  116. package/dist/thread.d.ts +3 -3
  117. package/dist/thread.js +4 -4
  118. package/dist/ui.d.ts +1 -1
  119. package/dist/ui.js +1 -1
  120. package/dist/where.d.ts +7 -7
  121. package/dist/where.js +2 -2
  122. package/dist/workday.d.ts +26 -26
  123. package/dist/workday.js +187 -187
  124. package/package.json +3 -3
  125. package/dist/Room.d.ts +0 -8
  126. package/dist/Room.js +0 -51
  127. package/dist/rooms.d.ts +0 -131
  128. /package/dist/lib/{rooms.json → routes.json} +0 -0
package/dist/workday.js CHANGED
@@ -107,11 +107,11 @@ export const MISSIONS = {
107
107
  friday: { title: phrase('A recipe app by Sunday'), steps: [phrase('Set up the board'), phrase('Search by ingredient'), phrase('Pick a logo'), phrase('Book game night')] },
108
108
  lab: { title: phrase('A first prototype'), steps: [phrase('Boot it'), phrase('Plan a week with it'), phrase('Write up what broke')] },
109
109
  };
110
- export const orgOf = (room) => ORGS.find((o) => o.id === room.split('/')[0]) ?? ORGS[0];
111
- export const channelOf = (room) => room.split('/')[1] ?? 'general';
110
+ export const orgOf = (channel) => ORGS.find((o) => o.id === channel.split('/')[0]) ?? ORGS[0];
111
+ export const channelOf = (channel) => channel.split('/')[1] ?? 'general';
112
112
  /** Minutes after midnight. */
113
113
  const hm = (h, m) => h * 60 + m;
114
- /** What each room already holds when the day begins, so none opens empty. */
114
+ /** What each channel already holds when the day begins, so none opens empty. */
115
115
  const SEED = {
116
116
  'acme/general': [
117
117
  { who: 'zoe', text: phrase('Welcome to Acme. Agents are teammates here: mention one to hand it work.'), time: hm(8, 30) },
@@ -147,26 +147,26 @@ const SEED = {
147
147
  'lab/general': [{ who: 'priya', text: phrase('The prototype boots. That is all it does.'), time: hm(21, 0) }],
148
148
  'lab/ideas': [{ who: 'theo', text: phrase('A bot that waters the plants.'), time: hm(21, 5) }],
149
149
  };
150
- /** Rooms with news before the day starts: their channel is bold, their org's tile marked. */
150
+ /** Channels with news before the day starts: their name is bold, their org's tile marked. */
151
151
  export const UNREAD = { 'acme/random': 2, 'orbit/releases': 3, 'friday/ideas': 1, 'lab/ideas': 1 };
152
- /** The events of one room's scene, in the room's own words. */
153
- function room(id, time, build) {
154
- return [{ kind: 'open', room: id, time }, ...build(new Room(id))];
152
+ /** The events of one channel's scene, in the channel's own words. */
153
+ function scene(id, time, build) {
154
+ return [{ kind: 'open', channel: id, time }, ...build(new Script(id))];
155
155
  }
156
- /** Writes a room's events without naming the room each time. */
157
- class Room {
156
+ /** Writes a channel's events without naming the channel each time. */
157
+ class Script {
158
158
  id;
159
159
  constructor(id) {
160
160
  this.id = id;
161
161
  }
162
162
  say(who, text, more = {}) {
163
- return { kind: 'say', room: this.id, who, text, ...more };
163
+ return { kind: 'say', channel: this.id, who, text, ...more };
164
164
  }
165
165
  typing(who) {
166
- return { kind: 'typing', room: this.id, who };
166
+ return { kind: 'typing', channel: this.id, who };
167
167
  }
168
168
  huddle(...who) {
169
- return { kind: 'huddle', room: this.id, who };
169
+ return { kind: 'huddle', channel: this.id, who };
170
170
  }
171
171
  }
172
172
  const react = (to, mark, n) => ({ kind: 'react', to, mark, n });
@@ -175,21 +175,21 @@ const card = (to, patch) => ({ kind: 'card', to, patch });
175
175
  const thread = (to) => ({ kind: 'thread', to });
176
176
  /** A step of an org's mission is done. */
177
177
  const step = (org, n) => ({ kind: 'step', org, n });
178
- /** A message that arrives in another room while this one is open: it goes unread, and it is the next room's first line. */
179
- const elsewhere = (room, who, text, more = {}) => ({ kind: 'say', room, who, text, ...more });
178
+ /** A message that arrives in another channel while this one is open: it goes unread, and it is the next channel's first line. */
179
+ const elsewhere = (channel, who, text, more = {}) => ({ kind: 'say', channel, who, text, ...more });
180
180
  /**
181
181
  * The morning, across organizations: Acme's #general, a thank-you from the
182
182
  * open-source project that took Acme's fix, friends planning tonight's build,
183
183
  * and back to Acme, where #eng has news. Three switches in under thirty seconds.
184
184
  */
185
- const MORNING = room('acme/general', hm(9, 2), (r) => [
186
- r.say('zoe', phrase("Morning. Launch is Thursday, and Orbit's maintainers are helping us test it.")),
185
+ const MORNING = scene('acme/general', hm(9, 2), (c) => [
186
+ c.say('zoe', phrase("Morning. Launch is Thursday, and Orbit's maintainers are helping us test it.")),
187
187
  elsewhere('orbit/contributors', 'priya', phrase('@dev your retry fix from Acme landed upstream. Thank you.'), { id: 'upstream' }),
188
188
  ]);
189
189
  /** Orbit: people from different teams, and an agent that works for more than one. */
190
- const ORBIT = room('orbit/contributors', hm(9, 4), (r) => [
191
- r.typing('dev'),
192
- r.say('dev', phrase('Glad it helped. I opened a follow-up so the docs say how retries back off.'), {
190
+ const ORBIT = scene('orbit/contributors', hm(9, 4), (c) => [
191
+ c.typing('dev'),
192
+ c.say('dev', phrase('Glad it helped. I opened a follow-up so the docs say how retries back off.'), {
193
193
  id: 'followup',
194
194
  card: { kind: 'pr', repo: 'orbit/orbit', number: 1187, title: phrase('Docs: how retries back off'), add: 42, del: 6, state: 'review', reviewer: 'priya' },
195
195
  }),
@@ -198,61 +198,61 @@ const ORBIT = room('orbit/contributors', hm(9, 4), (r) => [
198
198
  elsewhere('friday/side-project', 'omar', phrase("Tonight's build still on?")),
199
199
  ]);
200
200
  /** Friends, in the morning: tonight is on. */
201
- const PLANS = room('friday/side-project', hm(9, 6), (r) => [
202
- r.say('leo', phrase('On. @mu a playlist for it?')),
201
+ const PLANS = scene('friday/side-project', hm(9, 6), (c) => [
202
+ c.say('leo', phrase('On. @mu a playlist for it?')),
203
203
  elsewhere('acme/eng', 'theo', phrase('Heads up: checkout looks odd on main.')),
204
204
  ]);
205
205
  /** Coding together: a bug report, a pull request, a review, the checks, the merge. */
206
- const ENG = room('acme/eng', hm(9, 12), (r) => [
207
- r.say('mina', phrase('Checkout charges twice if you press Pay twice. Steps are in the thread.'), { id: 'bug' }),
206
+ const ENG = scene('acme/eng', hm(9, 12), (c) => [
207
+ c.say('mina', phrase('Checkout charges twice if you press Pay twice. Steps are in the thread.'), { id: 'bug' }),
208
208
  reply('bug', 'mina', phrase('Card form, press Pay, press Pay again before it answers. Two charges.')),
209
209
  react('bug', 'eyes', 2),
210
- r.say('sam', phrase('@dev can you take this one?')),
211
- r.typing('dev'),
212
- r.say('dev', phrase('On it. The Pay button stays live until the charge answers, so a second press is a second charge.')),
213
- r.typing('dev'),
214
- r.say('dev', phrase('Pull request is up. A new test presses Pay twice and expects one charge.'), {
210
+ c.say('sam', phrase('@dev can you take this one?')),
211
+ c.typing('dev'),
212
+ c.say('dev', phrase('On it. The Pay button stays live until the charge answers, so a second press is a second charge.')),
213
+ c.typing('dev'),
214
+ c.say('dev', phrase('Pull request is up. A new test presses Pay twice and expects one charge.'), {
215
215
  id: 'pr',
216
216
  card: { kind: 'pr', repo: 'acme/web', number: 482, title: phrase('Disable Pay while a charge is pending'), add: 18, del: 3, state: 'review', reviewer: 'theo' },
217
217
  }),
218
218
  thread('pr'),
219
219
  reply('pr', 'theo', phrase('Reviewing. Could the button show a spinner too? A grey button looks broken.')),
220
- r.typing('dev'),
220
+ c.typing('dev'),
221
221
  reply('pr', 'dev', phrase('Added a spinner, and the button now says Paying.')),
222
222
  card('pr', { state: 'passed' }),
223
223
  reply('pr', 'theo', phrase('Approved.')),
224
224
  thread(null),
225
225
  elsewhere('friday/side-project', 'mu', phrase('Playlist is ready: forty minutes, no lyrics, nothing that sounds like a deadline.')),
226
226
  react('pr', 'rocket', 3),
227
- r.typing('dev'),
227
+ c.typing('dev'),
228
228
  card('pr', { state: 'merged' }),
229
- r.say('dev', phrase('Merged and deployed. Checkout is live with the fix.')),
229
+ c.say('dev', phrase('Merged and deployed. Checkout is live with the fix.')),
230
230
  step('acme', 0),
231
- r.say('mina', phrase('Pressed Pay four times on purpose. Charged once.'), { id: 'tried' }),
231
+ c.say('mina', phrase('Pressed Pay four times on purpose. Charged once.'), { id: 'tried' }),
232
232
  react('tried', 'party', 3),
233
- r.say('sam', phrase('Pressing Pay twice is no longer a personality trait we support.'), { id: 'trait' }),
233
+ c.say('sam', phrase('Pressing Pay twice is no longer a personality trait we support.'), { id: 'trait' }),
234
234
  react('trait', 'laugh', 4),
235
235
  elsewhere('acme/support', 'su', phrase('New ticket: invoices download as blank PDFs in Safari.')),
236
236
  ]);
237
237
  /** Support together: an agent drafts, a person makes it warmer, it is sent, the cause is fixed. */
238
- const SUPPORT = room('acme/support', hm(10, 4), (r) => [
239
- r.typing('su'),
240
- r.say('su', phrase('Drafted a reply.'), {
238
+ const SUPPORT = scene('acme/support', hm(10, 4), (c) => [
239
+ c.typing('su'),
240
+ c.say('su', phrase('Drafted a reply.'), {
241
241
  id: 'answer',
242
242
  card: { kind: 'draft', to: phrase('Ticket #1042'), body: phrase('Sorry about the blank invoices. Safari blocks the download; this link opens them now, and a fix ships today.'), approver: 'nia' },
243
243
  }),
244
- r.say('nia', phrase("Warmer first line, please. And let's not blame Safari in writing.")),
245
- r.typing('su'),
244
+ c.say('nia', phrase("Warmer first line, please. And let's not blame Safari in writing.")),
245
+ c.typing('su'),
246
246
  card('answer', { body: phrase('Thanks for telling us, and sorry for the blank invoices. This link opens them now, and a fix ships today.') }),
247
- r.say('su', phrase('Updated.')),
248
- r.say('nia', phrase('Perfect. Send it.')),
247
+ c.say('su', phrase('Updated.')),
248
+ c.say('nia', phrase('Perfect. Send it.')),
249
249
  card('answer', { sent: true }),
250
250
  react('answer', 'check', 1),
251
- r.say('su', phrase('Sent. @dev the download link expires before Safari opens it.')),
252
- r.typing('dev'),
253
- r.say('dev', phrase('Found it. Links last five minutes now instead of five seconds. The fix is in #483.'), { id: 'links' }),
251
+ c.say('su', phrase('Sent. @dev the download link expires before Safari opens it.')),
252
+ c.typing('dev'),
253
+ c.say('dev', phrase('Found it. Links last five minutes now instead of five seconds. The fix is in #483.'), { id: 'links' }),
254
254
  react('links', 'laugh', 3),
255
- r.say('su', phrase('The customer wrote back: “That was fast. Thank you.”'), { id: 'thanks' }),
255
+ c.say('su', phrase('The customer wrote back: “That was fast. Thank you.”'), { id: 'thanks' }),
256
256
  react('thanks', 'heart', 5),
257
257
  step('acme', 1),
258
258
  elsewhere('acme/inbox', 'opera', phrase('Morning sort is done.'), {
@@ -265,41 +265,41 @@ const SUPPORT = room('acme/support', hm(10, 4), (r) => [
265
265
  }),
266
266
  ]);
267
267
  /** Email: the agent triages and drafts, a person approves a batch, a lawyer catches a clause. */
268
- const INBOX = room('acme/inbox', hm(10, 41), (r) => [
269
- r.say('opera', phrase('Six replies are drafted in your voice. Approve them as a batch?'), { id: 'batch', card: { kind: 'ask', options: [phrase('Approve all'), phrase('One by one')], asks: 'ada' } }),
270
- r.typing('ada'),
268
+ const INBOX = scene('acme/inbox', hm(10, 41), (c) => [
269
+ c.say('opera', phrase('Six replies are drafted in your voice. Approve them as a batch?'), { id: 'batch', card: { kind: 'ask', options: [phrase('Approve all'), phrase('One by one')], asks: 'ada' } }),
270
+ c.typing('ada'),
271
271
  card('batch', { picked: 0 }),
272
- r.say('ada', phrase('Approve all. You know how I write by now.')),
273
- r.typing('opera'),
274
- r.say('opera', phrase("Sent all six. The renewal needs a lawyer's eye, so I asked @law.")),
275
- r.typing('law'),
276
- r.say('law', phrase('Read it. It renews itself for three years. I would ask for one.'), { id: 'clause' }),
272
+ c.say('ada', phrase('Approve all. You know how I write by now.')),
273
+ c.typing('opera'),
274
+ c.say('opera', phrase("Sent all six. The renewal needs a lawyer's eye, so I asked @law.")),
275
+ c.typing('law'),
276
+ c.say('law', phrase('Read it. It renews itself for three years. I would ask for one.'), { id: 'clause' }),
277
277
  react('clause', 'eyes', 2),
278
- r.say('ada', phrase('Good catch. Ask for one, nicely.')),
279
- r.typing('opera'),
280
- r.say('opera', phrase('Drafted.'), { id: 'renewal', card: { kind: 'draft', to: phrase('The vendor, about our renewal'), body: phrase('Happy to renew. Could we make the term one year, with the option to extend?'), approver: 'ada' } }),
281
- r.say('ada', phrase('Nicely done. Send.')),
278
+ c.say('ada', phrase('Good catch. Ask for one, nicely.')),
279
+ c.typing('opera'),
280
+ c.say('opera', phrase('Drafted.'), { id: 'renewal', card: { kind: 'draft', to: phrase('The vendor, about our renewal'), body: phrase('Happy to renew. Could we make the term one year, with the option to extend?'), approver: 'ada' } }),
281
+ c.say('ada', phrase('Nicely done. Send.')),
282
282
  card('renewal', { sent: true }),
283
283
  step('acme', 2),
284
- r.say('opera', phrase('Sent. The inbox is at zero, except for the newsletter you keep meaning to read.'), { id: 'zero' }),
284
+ c.say('opera', phrase('Sent. The inbox is at zero, except for the newsletter you keep meaning to read.'), { id: 'zero' }),
285
285
  react('zero', 'laugh', 2),
286
286
  elsewhere('acme/fundraise', 'zoe', phrase('@fin we need a seed deck by Friday.')),
287
287
  ]);
288
288
  /** Fundraising: the deck and the model, the intros, a meeting booked. */
289
- const FUNDRAISE = room('acme/fundraise', hm(11, 20), (r) => [
290
- r.typing('fin'),
291
- r.say('fin', phrase('On it: a deck, and a model with three scenarios where every number links to its source.')),
292
- r.say('zoe', phrase("No hockey sticks we can't explain.")),
293
- r.typing('fin'),
294
- r.say('fin', phrase('Deck v1 is in Drive.'), { id: 'deck', card: { kind: 'file', name: 'Acme seed deck.pdf', type: 'deck', detail: phrase('12 slides') } }),
295
- r.say('fin', phrase('And the model.'), { id: 'model', card: { kind: 'file', name: 'Acme model.xlsx', type: 'sheet', detail: phrase('Three scenarios, sources linked') } }),
296
- r.say('fin', phrase('@sal the deck is ready for the intros.')),
297
- r.say('zoe', phrase('Slide 4 says “synergy”. Remove it with prejudice.')),
298
- r.typing('fin'),
299
- r.say('fin', phrase('Removed. Slide 4 now says what the product does.'), { id: 'synergy' }),
289
+ const FUNDRAISE = scene('acme/fundraise', hm(11, 20), (c) => [
290
+ c.typing('fin'),
291
+ c.say('fin', phrase('On it: a deck, and a model with three scenarios where every number links to its source.')),
292
+ c.say('zoe', phrase("No hockey sticks we can't explain.")),
293
+ c.typing('fin'),
294
+ c.say('fin', phrase('Deck v1 is in Drive.'), { id: 'deck', card: { kind: 'file', name: 'Acme seed deck.pdf', type: 'deck', detail: phrase('12 slides') } }),
295
+ c.say('fin', phrase('And the model.'), { id: 'model', card: { kind: 'file', name: 'Acme model.xlsx', type: 'sheet', detail: phrase('Three scenarios, sources linked') } }),
296
+ c.say('fin', phrase('@sal the deck is ready for the intros.')),
297
+ c.say('zoe', phrase('Slide 4 says “synergy”. Remove it with prejudice.')),
298
+ c.typing('fin'),
299
+ c.say('fin', phrase('Removed. Slide 4 now says what the product does.'), { id: 'synergy' }),
300
300
  react('synergy', 'laugh', 4),
301
- r.typing('sal'),
302
- r.say('sal', phrase('I found four investors who back developer tools. The intros are drafted in your voice.'), {
301
+ c.typing('sal'),
302
+ c.say('sal', phrase('I found four investors who back developer tools. The intros are drafted in your voice.'), {
303
303
  id: 'intros',
304
304
  card: {
305
305
  kind: 'list',
@@ -307,29 +307,29 @@ const FUNDRAISE = room('acme/fundraise', hm(11, 20), (r) => [
307
307
  items: [phrase('A seed fund that backs developer tools'), phrase('An angel who built a developer tools company'), phrase('A partner who wrote about agents last week'), phrase('A fund Theo knows from his last company')],
308
308
  },
309
309
  }),
310
- r.say('zoe', phrase('Send all four.')),
310
+ c.say('zoe', phrase('Send all four.')),
311
311
  card('intros', { done: [0, 1, 2, 3] }),
312
- r.say('sal', phrase('Sent.')),
313
- r.typing('sal'),
314
- r.say('sal', phrase('One replied already. Thursday at 2 works for them.'), { id: 'meeting', card: { kind: 'meeting', title: phrase('Acme and a seed fund'), when: phrase('Thursday, 2:00 PM') } }),
312
+ c.say('sal', phrase('Sent.')),
313
+ c.typing('sal'),
314
+ c.say('sal', phrase('One replied already. Thursday at 2 works for them.'), { id: 'meeting', card: { kind: 'meeting', title: phrase('Acme and a seed fund'), when: phrase('Thursday, 2:00 PM') } }),
315
315
  react('meeting', 'flame', 5),
316
- r.say('theo', phrase('Prep doc?')),
317
- r.typing('fin'),
318
- r.say('fin', phrase('In the deck folder: the questions they are likely to ask, with our answers.')),
316
+ c.say('theo', phrase('Prep doc?')),
317
+ c.typing('fin'),
318
+ c.say('fin', phrase('In the deck folder: the questions they are likely to ask, with our answers.')),
319
319
  step('acme', 3),
320
320
  elsewhere('acme/design', 'sam', phrase('@des the plan cards feel crowded.')),
321
321
  ]);
322
322
  /** A design review: two directions, a pick, a handoff. */
323
- const DESIGN = room('acme/design', hm(13, 15), (r) => [
324
- r.typing('des'),
325
- r.say('des', phrase('Two directions. A keeps every feature; B keeps the five people compare.'), { id: 'options', card: { kind: 'options', file: 'plan-cards.fig', options: ['A', 'B'] } }),
326
- r.say('ada', phrase('B. Fewer words, same truth.')),
327
- r.say('sam', phrase('B, and the prices on one baseline.')),
323
+ const DESIGN = scene('acme/design', hm(13, 15), (c) => [
324
+ c.typing('des'),
325
+ c.say('des', phrase('Two directions. A keeps every feature; B keeps the five people compare.'), { id: 'options', card: { kind: 'options', file: 'plan-cards.fig', options: ['A', 'B'] } }),
326
+ c.say('ada', phrase('B. Fewer words, same truth.')),
327
+ c.say('sam', phrase('B, and the prices on one baseline.')),
328
328
  card('options', { picked: 1 }),
329
- r.typing('des'),
330
- r.say('des', phrase('B it is, prices aligned. @dev the handoff is in the file.')),
331
- r.typing('dev'),
332
- r.say('dev', phrase('Picked it up. It will be on the preview link in ten minutes.'), { id: 'handoff' }),
329
+ c.typing('des'),
330
+ c.say('des', phrase('B it is, prices aligned. @dev the handoff is in the file.')),
331
+ c.typing('dev'),
332
+ c.say('dev', phrase('Picked it up. It will be on the preview link in ten minutes.'), { id: 'handoff' }),
333
333
  react('handoff', 'heart', 3),
334
334
  step('acme', 4),
335
335
  elsewhere('acme/hiring', 'huma', phrase('Designer role: the shortlist is ready, with a note on each.'), {
@@ -338,40 +338,40 @@ const DESIGN = room('acme/design', hm(13, 15), (r) => [
338
338
  }),
339
339
  ]);
340
340
  /** Hiring: a shortlist, interviews booked, an exercise that respects weekends. */
341
- const HIRING = room('acme/hiring', hm(14, 2), (r) => [
342
- r.say('mina', phrase("Let's talk to all three.")),
343
- r.typing('huma'),
344
- r.say('huma', phrase('Booked for Tuesday and Wednesday. Des wrote the exercise: two hours, not a weekend.')),
345
- r.say('mina', phrase('Thank you for respecting weekends.'), { id: 'weekends' }),
341
+ const HIRING = scene('acme/hiring', hm(14, 2), (c) => [
342
+ c.say('mina', phrase("Let's talk to all three.")),
343
+ c.typing('huma'),
344
+ c.say('huma', phrase('Booked for Tuesday and Wednesday. Des wrote the exercise: two hours, not a weekend.')),
345
+ c.say('mina', phrase('Thank you for respecting weekends.'), { id: 'weekends' }),
346
346
  react('weekends', 'heart', 4),
347
- r.say('des', phrase('One screen, two hours, no trick questions.')),
347
+ c.say('des', phrase('One screen, two hours, no trick questions.')),
348
348
  step('acme', 5),
349
349
  elsewhere('acme/launch', 'mark', phrase('The launch post is drafted.'), { id: 'post', card: { kind: 'file', name: 'launch-post.md', type: 'doc', detail: phrase('Draft') } }),
350
350
  ]);
351
351
  /** The launch: the post cut, translated, the checklist closed, a huddle, live. */
352
- const LAUNCH = room('acme/launch', hm(15, 30), (r) => [
353
- r.say('zoe', phrase('Shorter, please. Nobody reads paragraph four.')),
354
- r.typing('mark'),
355
- r.say('mark', phrase('Cut to three paragraphs. Paragraph four is now a footnote nobody will read either.'), { id: 'cut' }),
352
+ const LAUNCH = scene('acme/launch', hm(15, 30), (c) => [
353
+ c.say('zoe', phrase('Shorter, please. Nobody reads paragraph four.')),
354
+ c.typing('mark'),
355
+ c.say('mark', phrase('Cut to three paragraphs. Paragraph four is now a footnote nobody will read either.'), { id: 'cut' }),
356
356
  react('cut', 'laugh', 5),
357
- r.say('mark', phrase('@lang can you take it into Japanese and Spanish?')),
358
- r.typing('lang'),
359
- r.say('lang', phrase('Translated into Japanese and Spanish. The terms match the glossary.')),
360
- r.say('mana', phrase('Everything is done but the docs pass. @doc it is yours.'), {
357
+ c.say('mark', phrase('@lang can you take it into Japanese and Spanish?')),
358
+ c.typing('lang'),
359
+ c.say('lang', phrase('Translated into Japanese and Spanish. The terms match the glossary.')),
360
+ c.say('mana', phrase('Everything is done but the docs pass. @doc it is yours.'), {
361
361
  id: 'checklist',
362
362
  card: { kind: 'list', title: phrase('Launch checklist'), items: [phrase('Launch post'), phrase('Translations'), phrase('Pricing page'), phrase('Docs pass'), phrase('Status page')], done: [0, 1, 2, 4] },
363
363
  }),
364
- r.typing('doc'),
365
- r.say('doc', phrase('Docs pass is done. The quickstart links the new pages.')),
364
+ c.typing('doc'),
365
+ c.say('doc', phrase('Docs pass is done. The quickstart links the new pages.')),
366
366
  card('checklist', { done: [0, 1, 2, 3, 4] }),
367
- r.huddle('zoe', 'ada', 'sam'),
368
- r.say('ada', phrase('Ship it.')),
369
- r.typing('mark'),
370
- r.say('mark', phrase('Posted. It is live.'), { id: 'live' }),
367
+ c.huddle('zoe', 'ada', 'sam'),
368
+ c.say('ada', phrase('Ship it.')),
369
+ c.typing('mark'),
370
+ c.say('mark', phrase('Posted. It is live.'), { id: 'live' }),
371
371
  react('live', 'rocket', 8),
372
372
  react('live', 'party', 6),
373
373
  step('acme', 6),
374
- r.huddle(),
374
+ c.huddle(),
375
375
  elsewhere('acme/general', 'vi', phrase("Today's notes are ready."), {
376
376
  id: 'notes',
377
377
  card: {
@@ -383,95 +383,95 @@ const LAUNCH = room('acme/launch', hm(15, 30), (r) => [
383
383
  }),
384
384
  ]);
385
385
  /** The day closes in #general. */
386
- const GENERAL = room('acme/general', hm(17, 50), (r) => [
387
- r.say('zoe', phrase('And nobody worked the weekend.')),
388
- r.say('vi', phrase("Tomorrow's plan is on the board. Good evening, everyone."), { id: 'evening' }),
386
+ const GENERAL = scene('acme/general', hm(17, 50), (c) => [
387
+ c.say('zoe', phrase('And nobody worked the weekend.')),
388
+ c.say('vi', phrase("Tomorrow's plan is on the board. Good evening, everyone."), { id: 'evening' }),
389
389
  react('notes', 'heart', 9),
390
390
  react('evening', 'thumbs', 5),
391
391
  ]);
392
392
  /** Friends after work: a recipe app, a board, pairing, a logo before a product. */
393
- const SIDE = room('friday/side-project', hm(19, 10), (r) => [
394
- r.say('mina', phrase('Recipe app tonight?')),
395
- r.say('omar', phrase('In. @mana set up a board?')),
396
- r.typing('mana'),
397
- r.say('mana', phrase('Board is ready: a card each.'), {
393
+ const SIDE = scene('friday/side-project', hm(19, 10), (c) => [
394
+ c.say('mina', phrase('Recipe app tonight?')),
395
+ c.say('omar', phrase('In. @mana set up a board?')),
396
+ c.typing('mana'),
397
+ c.say('mana', phrase('Board is ready: a card each.'), {
398
398
  id: 'board',
399
399
  card: { kind: 'list', title: phrase('Board'), items: [phrase('Sign-in'), phrase('Save a recipe'), phrase("Search by what's in the fridge")] },
400
400
  }),
401
401
  step('friday', 0),
402
- r.say('jun', phrase("I'll take search. @dev pair with me?")),
403
- r.typing('dev'),
404
- r.say('dev', phrase('Pairing. Search works on ingredients now: “leftover pizza” returns pizza.'), { id: 'pizza' }),
402
+ c.say('jun', phrase("I'll take search. @dev pair with me?")),
403
+ c.typing('dev'),
404
+ c.say('dev', phrase('Pairing. Search works on ingredients now: “leftover pizza” returns pizza.'), { id: 'pizza' }),
405
405
  card('board', { done: [2] }),
406
406
  step('friday', 1),
407
407
  react('pizza', 'laugh', 4),
408
- r.say('leo', phrase('Bringing snacks and opinions.')),
409
- r.typing('art'),
410
- r.say('art', phrase('Logo sketches, in case anyone wants a logo before a product.'), { id: 'logos', card: { kind: 'file', name: 'logo-sketches.png', type: 'image', detail: phrase('Three options') } }),
408
+ c.say('leo', phrase('Bringing snacks and opinions.')),
409
+ c.typing('art'),
410
+ c.say('art', phrase('Logo sketches, in case anyone wants a logo before a product.'), { id: 'logos', card: { kind: 'file', name: 'logo-sketches.png', type: 'image', detail: phrase('Three options') } }),
411
411
  react('logos', 'heart', 5),
412
412
  step('friday', 2),
413
413
  elsewhere('friday/game-night', 'omar', phrase('Game night Thursday?')),
414
414
  ]);
415
415
  /** Game night, booked by an agent that is now in charge of scheduling forever. */
416
- const GAME = room('friday/game-night', hm(19, 42), (r) => [
417
- r.say('mina', phrase('Yes. @vi can you find a time that works for everyone?')),
418
- r.typing('vi'),
419
- r.say('vi', phrase('Thursday at 8 works for all four of you. It is on your calendars.'), { id: 'slot', card: { kind: 'meeting', title: phrase('Game night'), when: phrase('Thursday, 8:00 PM') } }),
420
- r.say('jun', phrase('Vi is now in charge of all scheduling, forever.'), { id: 'forever' }),
421
- r.typing('vi'),
422
- r.say('vi', phrase('Accepted. I will be fair.')),
416
+ const GAME = scene('friday/game-night', hm(19, 42), (c) => [
417
+ c.say('mina', phrase('Yes. @vi can you find a time that works for everyone?')),
418
+ c.typing('vi'),
419
+ c.say('vi', phrase('Thursday at 8 works for all four of you. It is on your calendars.'), { id: 'slot', card: { kind: 'meeting', title: phrase('Game night'), when: phrase('Thursday, 8:00 PM') } }),
420
+ c.say('jun', phrase('Vi is now in charge of all scheduling, forever.'), { id: 'forever' }),
421
+ c.typing('vi'),
422
+ c.say('vi', phrase('Accepted. I will be fair.')),
423
423
  react('forever', 'laugh', 3),
424
424
  step('friday', 3),
425
425
  ]);
426
- /** Rooms the day does not pass through, played when a reader opens them. */
426
+ /** Channels the day does not pass through, played when a reader opens them. */
427
427
  const EXTRA = {
428
- 'acme/random': room('acme/random', hm(12, 30), (r) => [
429
- r.say('theo', phrase('Lunch?')),
430
- r.say('vi', phrase('The noodle place is quiet until 12:45. I booked a table for five.')),
431
- r.say('theo', phrase('I said lunch, not a plan.'), { id: 'lunch' }),
428
+ 'acme/random': scene('acme/random', hm(12, 30), (c) => [
429
+ c.say('theo', phrase('Lunch?')),
430
+ c.say('vi', phrase('The noodle place is quiet until 12:45. I booked a table for five.')),
431
+ c.say('theo', phrase('I said lunch, not a plan.'), { id: 'lunch' }),
432
432
  react('lunch', 'laugh', 3),
433
433
  ]),
434
- 'friday/ideas': room('friday/ideas', hm(20, 5), (r) => [
435
- r.say('leo', phrase('@mu a song for when the timer rings?')),
436
- r.typing('mu'),
437
- r.say('mu', phrase('Eight seconds, upbeat, and it stops when you open the oven.'), { id: 'song', card: { kind: 'file', name: 'timer.mp3', type: 'doc', detail: phrase('0:08') } }),
434
+ 'friday/ideas': scene('friday/ideas', hm(20, 5), (c) => [
435
+ c.say('leo', phrase('@mu a song for when the timer rings?')),
436
+ c.typing('mu'),
437
+ c.say('mu', phrase('Eight seconds, upbeat, and it stops when you open the oven.'), { id: 'song', card: { kind: 'file', name: 'timer.mp3', type: 'doc', detail: phrase('0:08') } }),
438
438
  react('song', 'heart', 3),
439
439
  ]),
440
- 'orbit/general': room('orbit/general', hm(9, 40), (r) => [
441
- r.say('jun', phrase('First-time contributor here. Where do I start?')),
442
- r.typing('doc'),
443
- r.say('doc', phrase('The contributing guide, then any issue marked good first. I linked three that fit a first afternoon.')),
444
- r.say('priya', phrase('Welcome aboard.'), { id: 'aboard' }),
440
+ 'orbit/general': scene('orbit/general', hm(9, 40), (c) => [
441
+ c.say('jun', phrase('First-time contributor here. Where do I start?')),
442
+ c.typing('doc'),
443
+ c.say('doc', phrase('The contributing guide, then any issue marked good first. I linked three that fit a first afternoon.')),
444
+ c.say('priya', phrase('Welcome aboard.'), { id: 'aboard' }),
445
445
  react('aboard', 'party', 3),
446
446
  ]),
447
- 'orbit/releases': room('orbit/releases', hm(10, 15), (r) => [
448
- r.say('theo', phrase('Is 2.4 ready to tag?')),
449
- r.typing('cyber'),
450
- r.say('cyber', phrase('The dependency audit is clean. Nothing new needs a patch.')),
451
- r.say('doc', phrase('Changelog is final.'), { id: 'tag', card: { kind: 'file', name: 'CHANGELOG.md', type: 'doc', detail: phrase('2.4') } }),
447
+ 'orbit/releases': scene('orbit/releases', hm(10, 15), (c) => [
448
+ c.say('theo', phrase('Is 2.4 ready to tag?')),
449
+ c.typing('cyber'),
450
+ c.say('cyber', phrase('The dependency audit is clean. Nothing new needs a patch.')),
451
+ c.say('doc', phrase('Changelog is final.'), { id: 'tag', card: { kind: 'file', name: 'CHANGELOG.md', type: 'doc', detail: phrase('2.4') } }),
452
452
  react('tag', 'rocket', 5),
453
453
  ]),
454
- 'lab/general': room('lab/general', hm(21, 10), (r) => [
455
- r.say('theo', phrase('What if the app planned the week for you?')),
456
- r.typing('sci'),
457
- r.say('sci', phrase('I will try it on our own calendars first and write up what happens.')),
458
- r.say('priya', phrase('@data how often does a plan survive Tuesday?')),
459
- r.typing('data'),
460
- r.say('data', phrase('I can count that once we have a few weeks of plans to look at.'), { id: 'tuesday' }),
454
+ 'lab/general': scene('lab/general', hm(21, 10), (c) => [
455
+ c.say('theo', phrase('What if the app planned the week for you?')),
456
+ c.typing('sci'),
457
+ c.say('sci', phrase('I will try it on our own calendars first and write up what happens.')),
458
+ c.say('priya', phrase('@data how often does a plan survive Tuesday?')),
459
+ c.typing('data'),
460
+ c.say('data', phrase('I can count that once we have a few weeks of plans to look at.'), { id: 'tuesday' }),
461
461
  react('tuesday', 'eyes', 2),
462
462
  ]),
463
- 'lab/ideas': room('lab/ideas', hm(21, 20), (r) => [r.say('priya', phrase('A plant that texts when it is thirsty.')), r.say('theo', phrase('Filed under someday, next to the bot that waters it.'))]),
463
+ 'lab/ideas': scene('lab/ideas', hm(21, 20), (c) => [c.say('priya', phrase('A plant that texts when it is thirsty.')), c.say('theo', phrase('Filed under someday, next to the bot that waters it.'))]),
464
464
  };
465
465
  /** The day, in order. */
466
466
  const SCENES = [MORNING, ORBIT, PLANS, ENG, SUPPORT, INBOX, FUNDRAISE, DESIGN, HIRING, LAUNCH, GENERAL, SIDE, GAME];
467
- /** What a reader opening a room plays: each room's own scene (the morning's two passes are the day's, not a room's). */
467
+ /** What a reader opening a channel plays: each channel's own scene (the morning's two passes are the day's, not a channel's). */
468
468
  const OWN = [ORBIT, ENG, SUPPORT, INBOX, FUNDRAISE, DESIGN, HIRING, LAUNCH, GENERAL, SIDE, GAME];
469
469
  /** Words a line holds: how long it takes to read. */
470
470
  const words = (text) => text.split(/\s+/).filter(Boolean).length;
471
471
  /**
472
472
  * How long each event waits from the one before it: long enough to read what
473
473
  * came before (a message, and a card under it), to watch someone type, to
474
- * take in a room just opened.
474
+ * take in a channel just opened.
475
475
  */
476
476
  export function pace(events) {
477
477
  return events.map((e, i) => {
@@ -504,9 +504,9 @@ export function pace(events) {
504
504
  }
505
505
  /** The whole day, paced. */
506
506
  export const DAY = pace(SCENES.flat());
507
- /** Every room's own scene, paced, for a reader who opens it. */
508
- export const SCENE = Object.fromEntries([...OWN, ...Object.values(EXTRA)].map((s) => [s[0].room, pace(s)]));
509
- /** The room an org opens on when its tile is pressed. */
507
+ /** Every channel's own scene, paced, for a reader who opens it. */
508
+ export const SCENE = Object.fromEntries([...OWN, ...Object.values(EXTRA)].map((s) => [s[0].channel, pace(s)]));
509
+ /** The channel an org opens on when its tile is pressed. */
510
510
  export const HOME = { acme: 'acme/eng', orbit: 'orbit/contributors', friday: 'friday/side-project', lab: 'lab/general' };
511
511
  /**
512
512
  * The frame a reader who asked for less motion sees, and the first paint: the
@@ -518,23 +518,23 @@ export const STILL = MORNING.length + ORBIT.length + PLANS.length + ENG.length;
518
518
  export const LENGTH = DAY.reduce((n, b) => n + b.wait, 0);
519
519
  /** The handoffs a frame keeps: the newest. */
520
520
  const HANDOFFS = 8;
521
- /** How many messages a room keeps on screen: the oldest leave the top. */
521
+ /** How many messages a channel keeps on screen: the oldest leave the top. */
522
522
  const KEEP = 14;
523
523
  /** Folds the first `at` events into a frame. */
524
524
  export function frame(events, at) {
525
- const rooms = {};
525
+ const channels = {};
526
526
  const where = new Map();
527
527
  const seat = (id) => {
528
- if (!rooms[id]) {
529
- rooms[id] = (SEED[id] ?? []).map((s, i) => ({ id: `${id}#${i}`, who: s.who, text: s.text, time: s.time, reactions: [], replies: [] }));
528
+ if (!channels[id]) {
529
+ channels[id] = (SEED[id] ?? []).map((s, i) => ({ id: `${id}#${i}`, who: s.who, text: s.text, time: s.time, reactions: [], replies: [] }));
530
530
  }
531
- return rooms[id];
531
+ return channels[id];
532
532
  };
533
533
  const unread = { ...UNREAD };
534
534
  const huddle = {};
535
535
  const steps = {};
536
536
  const handoffs = [];
537
- let view = events.find((e) => e.kind === 'open')?.room ?? 'acme/eng';
537
+ let view = events.find((e) => e.kind === 'open')?.channel ?? 'acme/eng';
538
538
  let clock = hm(9, 0);
539
539
  let thread = null;
540
540
  let typing = null;
@@ -543,26 +543,26 @@ export function frame(events, at) {
543
543
  typing = null;
544
544
  switch (e.kind) {
545
545
  case 'open':
546
- view = e.room;
546
+ view = e.channel;
547
547
  clock = Math.max(clock, e.time);
548
- unread[e.room] = 0;
548
+ unread[e.channel] = 0;
549
549
  thread = null;
550
- seat(e.room);
550
+ seat(e.channel);
551
551
  break;
552
552
  case 'say': {
553
553
  clock += Math.max(1, Math.round(words(e.text) / 10));
554
- const m = { id: e.id ?? `${e.room}@${i}`, who: e.who, text: e.text, time: clock, card: e.card, reactions: [], replies: [] };
555
- seat(e.room).push(m);
554
+ const m = { id: e.id ?? `${e.channel}@${i}`, who: e.who, text: e.text, time: clock, card: e.card, reactions: [], replies: [] };
555
+ seat(e.channel).push(m);
556
556
  where.set(m.id, m);
557
557
  for (const [, to] of e.text.matchAll(/@([a-z]+)/g))
558
558
  if (to !== e.who && (to in AGENTS || to in PEOPLE))
559
- handoffs.push({ from: e.who, to, room: e.room, time: clock, text: e.text });
560
- if (e.room !== view)
561
- unread[e.room] = (unread[e.room] ?? 0) + 1;
559
+ handoffs.push({ from: e.who, to, channel: e.channel, time: clock, text: e.text });
560
+ if (e.channel !== view)
561
+ unread[e.channel] = (unread[e.channel] ?? 0) + 1;
562
562
  break;
563
563
  }
564
564
  case 'typing':
565
- typing = { room: e.room, who: e.who };
565
+ typing = { channel: e.channel, who: e.who };
566
566
  break;
567
567
  case 'react': {
568
568
  const m = where.get(e.to);
@@ -593,7 +593,7 @@ export function frame(events, at) {
593
593
  thread = e.to;
594
594
  break;
595
595
  case 'huddle':
596
- huddle[e.room] = e.who;
596
+ huddle[e.channel] = e.who;
597
597
  break;
598
598
  case 'step':
599
599
  steps[e.org] = [...new Set([...(steps[e.org] ?? []), e.n])];
@@ -601,30 +601,30 @@ export function frame(events, at) {
601
601
  }
602
602
  });
603
603
  seat(view);
604
- for (const id of Object.keys(rooms))
605
- rooms[id] = rooms[id].slice(-KEEP);
606
- return { room: view, rooms, unread, typing, thread, huddle, steps, handoffs: handoffs.slice(-HANDOFFS) };
604
+ for (const id of Object.keys(channels))
605
+ channels[id] = channels[id].slice(-KEEP);
606
+ return { channel: view, channels, unread, typing, thread, huddle, steps, handoffs: handoffs.slice(-HANDOFFS) };
607
607
  }
608
608
  /**
609
609
  * What waits on a person in a frame. Always: a draft not yet sent, a question
610
610
  * not yet answered, a pull request still under review. Supervised, also every
611
- * agent's work a person has not answered yet in its room: an agent asks before
612
- * each tool, connector or site (the app's Manual approval).
611
+ * agent's work a person has not answered yet in its channel: an agent asks
612
+ * before each tool, connector or site (the app's Manual approval).
613
613
  */
614
614
  export function waiting(f, supervised) {
615
615
  const out = [];
616
- for (const [room, list] of Object.entries(f.rooms)) {
616
+ for (const [channel, list] of Object.entries(f.channels)) {
617
617
  list.forEach((m, i) => {
618
618
  const c = m.card;
619
619
  if (c?.kind === 'draft' && !c.sent)
620
- out.push({ id: m.id, room, who: c.approver ?? 'ada', say: phrase('Send the reply to {what}'), what: c.to });
620
+ out.push({ id: m.id, channel, who: c.approver ?? 'ada', say: phrase('Send the reply to {what}'), what: c.to });
621
621
  else if (c?.kind === 'ask' && c.picked === undefined)
622
- out.push({ id: m.id, room, who: c.asks ?? 'ada', say: phrase('Answer: {what}'), what: m.text });
622
+ out.push({ id: m.id, channel, who: c.asks ?? 'ada', say: phrase('Answer: {what}'), what: m.text });
623
623
  else if (c?.kind === 'pr' && c.state === 'review')
624
- out.push({ id: m.id, room, who: c.reviewer ?? 'theo', say: phrase('Review {what}'), what: `#${c.number}` });
624
+ out.push({ id: m.id, channel, who: c.reviewer ?? 'theo', say: phrase('Review {what}'), what: `#${c.number}` });
625
625
  else if (supervised && c && agent(m.who) && !list.slice(i + 1).some((n) => !agent(n.who))) {
626
- const owner = orgOf(room).people[0];
627
- out.push({ id: m.id, room, who: owner, say: phrase('Approve {what}'), what: c.kind === 'file' ? c.name : c.kind === 'meeting' || c.kind === 'list' ? c.title : m.text });
626
+ const owner = orgOf(channel).people[0];
627
+ out.push({ id: m.id, channel, who: owner, say: phrase('Approve {what}'), what: c.kind === 'file' ? c.name : c.kind === 'meeting' || c.kind === 'list' ? c.title : m.text });
628
628
  }
629
629
  });
630
630
  }