@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
@@ -2,7 +2,7 @@ import { type Host } from '@hanzo/build';
2
2
  import { type RailLink } from '@hanzo/ui/chat';
3
3
  import { type ReactNode } from 'react';
4
4
  import { type Place } from './lib/host.js';
5
- export declare function Column({ host, mode, thread, go, onShut, onSeek, onBack, drawer, rail, foot, places, }: {
5
+ export declare function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer, rail, foot, places, }: {
6
6
  host: Host;
7
7
  mode: Place['mode'];
8
8
  /** The Chat conversation the pane holds, or null. */
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  //
12
12
  // The bell is the org's run activity (@hanzo/build `useSessions`): the runs
13
13
  // that moved last, each one press from its page.
14
- // The search opens the palette (Palette.tsx; ⌘K / Ctrl+K from anywhere).
14
+ // The search opens the palette (Search.tsx; ⌘K / Ctrl+K from anywhere).
15
15
  //
16
16
  // Dev's places are @hanzo/build's `own`: New run, Projects, Issues, Templates.
17
17
  // A place the rail holds (Library, Scheduled tasks, Customize) takes the sidebar
@@ -33,9 +33,9 @@ import { ArrowLeft, Bell, Search, Sparkles, SquarePen } from 'lucide-react';
33
33
  import { DOTS, Gutter, library, NEW, own, tabs, useScheduled, useSessions } from '@hanzo/build';
34
34
  import { tidy } from './lib/title.js';
35
35
  import { DropdownMenu } from '@hanzo/ui';
36
- import { Sidebar, SidebarIconButton, SidebarItem, StatusDot } from '@hanzo/ui/chat';
36
+ import { Sidebar as Base, SidebarIconButton, SidebarItem, StatusDot } from '@hanzo/ui/chat';
37
37
  import { useId } from 'react';
38
- import { Made } from './Me.js';
38
+ import { Made } from './Account.js';
39
39
  import { Recents } from './Recents.js';
40
40
  import { MARK, raised } from './Rail.js';
41
41
  import { Setup } from './Setup.js';
@@ -93,7 +93,7 @@ function Activity({ host }) {
93
93
  ];
94
94
  return (_jsx(DropdownMenu, { minWidth: 280, trigger: _jsx(XStack, { render: "button", "aria-label": t('Activity'), ...{ title: t('Activity') }, ...HEAD, items: "center", justify: "center", cursor: "pointer", opacity: 0.7, hoverStyle: { bg: '$hover', opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, children: _jsx(Bell, { size: 16, "aria-hidden": true }) }), items: items }));
95
95
  }
96
- export function Column({ host, mode, thread, go, onShut, onSeek, onBack, drawer = false, rail, foot, places, }) {
96
+ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer = false, rail, foot, places, }) {
97
97
  const { t, dir } = useI18n();
98
98
  const free = useFree(Boolean(host.token?.()));
99
99
  // The desktop sidebar and a phone's drawer can both be in the page: each names its own group labels.
@@ -119,7 +119,7 @@ export function Column({ host, mode, thread, go, onShut, onSeek, onBack, drawer
119
119
  };
120
120
  return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref,
121
121
  // inline-style: `--span`, the width a drag rewrites on the element itself (span.ts); no prop sets a variable.
122
- style: drawer ? undefined : span.style, position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : 'var(--span)', children: [_jsxs(Sidebar, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: "$2", pt: drawer ? 'var(--pane-gap)' : 0,
122
+ style: drawer ? undefined : span.style, position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : 'var(--span)', children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: "$2", pt: drawer ? 'var(--pane-gap)' : 0,
123
123
  // In the drawer the menu's own foot padding is the gap; its foot row stands on it.
124
124
  pb: drawer ? 0 : '$2', gap: "$0", children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2, height: BAND, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 18, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: "$2", paddingInlineEnd: 2, height: BAND, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(Text, { flex: 1, minW: 0, fontSize: drawer ? 20 : 18, lineHeight: 24, fontWeight: drawer ? '700' : '600', color: "$ink", numberOfLines: 1, children: wordmark(mode) }), drawer ? null : _jsx(Activity, { host: host }), _jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
125
125
  ? {
package/dist/Support.js CHANGED
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  // Support mode: a SuperAdmin steps into any organization to see what it sees.
4
4
  //
5
5
  // Everything here is IAM's. The list of every organization is the chooser's
6
- // (Orgs.tsx `Everyone`), IAM's organization list, which answers a SuperAdmin
6
+ // (Gate.tsx `Everyone`), IAM's organization list, which answers a SuperAdmin
7
7
  // every organization and anyone else only their own; the step in and the step
8
8
  // out are IAM's `assume` and `release`, which answer the operator's own token
9
9
  // re-scoped and record each step in the organization's audit log
@@ -15,7 +15,7 @@ import { Text, XStack } from '@hanzo/gui';
15
15
  import { Button } from '@hanzo/ui';
16
16
  import { useHydrated } from './lib/hydrated.js';
17
17
  import { abandon, assumed, named, support } from './lib/session.js';
18
- /** The banner rides above the room's sheets. gui carries a `calc()` to the page unchanged; its types only name custom properties. */
18
+ /** The banner rides above the shell's sheets. gui carries a `calc()` to the page unchanged; its types only name custom properties. */
19
19
  const BANNER = 'calc(var(--z-modal) + 30)';
20
20
  /**
21
21
  * The strip across the top of every page while a SuperAdmin is inside an
package/dist/Talk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type TeamRoom } from './rooms.js';
2
- export declare function Talk({ room }: {
3
- room: TeamRoom;
1
+ import { type Channel } from './channels.js';
2
+ export declare function Talk({ channel }: {
3
+ channel: Channel;
4
4
  }): import("react").JSX.Element;
package/dist/Talk.js CHANGED
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- // A room, read and answered.
3
+ // A channel, read and answered.
4
4
  //
5
- // The org's rooms live on /home: the rail lists them, this pane reads one, and
6
- // the composer answers in it. It draws the same three parts every other room on
7
- // this site draws — the header, the transcript, the one composer — from the
8
- // same components, so a room is not a second design.
5
+ // The org's channels live on /home: the rail lists them, this pane reads one,
6
+ // and the composer answers in it. It draws the same three parts every other
7
+ // conversation on this site draws — the header, the transcript, the one
8
+ // composer — from the same components, so a channel is not a second design.
9
9
  //
10
10
  // WHO SAID IT is the roster's answer (`roster.ts`). A message carries the
11
11
  // account that wrote it, and the name and face beside each row are looked up
12
12
  // there, once, for people and agents alike; an account the roster lacks is
13
- // printed as the id it is. The transcript is polled by `rooms.ts`, so an answer
13
+ // printed as the id it is. The transcript is polled by `channels.ts`, so an answer
14
14
  // — a teammate's or an agent's — lands without a reload.
15
15
  //
16
16
  // WHAT YOU SAY IS DRAWN AT ONCE, in the quiet ink and without a stamp, and it
@@ -29,9 +29,9 @@ import { Face } from './cast.js';
29
29
  import { SpeakButton } from './speech.js';
30
30
  import { say } from './failure.js';
31
31
  import { useOpen } from './open.js';
32
- import { Beside } from './Shell.js';
32
+ import { Side } from './Shell.js';
33
33
  import { memberOf, useMe, useRoster } from './roster.js';
34
- import { useRoomMessages } from './rooms.js';
34
+ import { useMessages } from './channels.js';
35
35
  import { BAD } from './lib/mix.js';
36
36
  /** The clock a transcript reads by: the time for today, the date before that. */
37
37
  function when(ms, locale) {
@@ -40,17 +40,17 @@ function when(ms, locale) {
40
40
  return then.toLocaleString(locale, sameDay ? { hour: 'numeric', minute: '2-digit' } : { month: 'short', day: 'numeric' });
41
41
  }
42
42
  /**
43
- * WHAT A ROOM IS CALLED. A channel carries a name; a direct message does not —
44
- * its members are its name — so one falls back to the other rather than drawing
45
- * an empty header. The sigil is how a client DRAWS a room and is not stored, so
43
+ * WHAT A CHANNEL IS CALLED. An open one carries a name; a direct message does
44
+ * not — its members are its name — so one falls back to the other rather than
45
+ * drawing an empty header. The sigil is how a client DRAWS a channel and is not stored, so
46
46
  * it is added here and only where there is a name to put it on.
47
47
  */
48
- const titleOf = (room, t) => room.name ? `#${room.name}` : room.direct ? t('Direct message') : t('Channel');
48
+ const titleOf = (channel, t) => channel.name ? `#${channel.name}` : channel.direct ? t('Direct message') : t('Channel');
49
49
  /** Adds `@name ` to a draft, after a space where the draft needs one. */
50
50
  const mention = (draft, name) => `${draft && !/\s$/.test(draft) ? `${draft} ` : draft}@${name} `;
51
- export function Talk({ room }) {
51
+ export function Talk({ channel }) {
52
52
  const { t, dir, locale } = useI18n();
53
- const { messages, failed, send } = useRoomMessages(room.id, room.space);
53
+ const { messages, failed, send } = useMessages(channel.id, channel.space);
54
54
  const { members, wrong } = useRoster();
55
55
  const me = useMe();
56
56
  const { aside, showAside } = useOpen();
@@ -59,7 +59,7 @@ export function Talk({ room }) {
59
59
  const [refused, setRefused] = useState(null);
60
60
  const minted = useRef(0);
61
61
  const agents = (members ?? []).filter((one) => one.agent);
62
- const title = titleOf(room, t);
62
+ const title = titleOf(channel, t);
63
63
  const mine = me ? memberOf(members, me) : undefined;
64
64
  const speak = async () => {
65
65
  const text = draft.trim();
@@ -81,9 +81,9 @@ export function Talk({ room }) {
81
81
  }
82
82
  };
83
83
  const name = (of) => setDraft((held) => mention(held, of));
84
- return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(ChannelHeader, { name: dir === 'rtl' ? isolate(title) : title, children: [room.topic ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: room.topic })) : null, _jsx(Box, { render: "button", "aria-label": t(aside === 'roster' ? 'Hide directory & roster' : 'Show directory & roster'), "aria-pressed": aside === 'roster', onClick: () => showAside(aside === 'roster' ? null : 'roster'), marginInlineStart: "auto", p: "$2", rounded: "$3", hoverStyle: { bg: '$hover' }, children: _jsx(Users, { size: 16, "aria-hidden": true }) })] }), _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$4", gap: "$3", children: [failed ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: say(failed, t('this channel'), 'read', t) })) : messages === null ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: t('Reading the room.') })) : messages.length === 0 && pending.length === 0 ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: t('Nothing has been said here yet.') })) : (messages.map((one) => (_jsx(Line, { member: memberOf(members, one.author), fallback: one.author, stamp: when(one.createdOn, locale), text: one.text }, one.id)))), pending
84
+ return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(ChannelHeader, { name: dir === 'rtl' ? isolate(title) : title, children: [channel.topic ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: channel.topic })) : null, _jsx(Box, { render: "button", "aria-label": t(aside === 'roster' ? 'Hide directory & roster' : 'Show directory & roster'), "aria-pressed": aside === 'roster', onClick: () => showAside(aside === 'roster' ? null : 'roster'), marginInlineStart: "auto", p: "$2", rounded: "$3", hoverStyle: { bg: '$hover' }, children: _jsx(Users, { size: 16, "aria-hidden": true }) })] }), _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$4", gap: "$3", children: [failed ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: say(failed, t('this channel'), 'read', t) })) : messages === null ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: t('Reading the channel.') })) : messages.length === 0 && pending.length === 0 ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: t('Nothing has been said here yet.') })) : (messages.map((one) => (_jsx(Line, { member: memberOf(members, one.author), fallback: one.author, stamp: when(one.createdOn, locale), text: one.text }, one.id)))), pending
85
85
  .filter((one) => !messages?.some((said) => said.author === me && said.text === one.text))
86
- .map((one) => (_jsx(Line, { member: mine, fallback: t('You'), text: one.text, soft: true }, `pending-${one.key}`)))] }), _jsxs(YStack, { p: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(Composer, { value: draft, onChange: setDraft, onSend: () => void speak(), placeholder: t('Message {room}', { room: title }), label: t('Message {room}', { room: title }), hint: agents.length ? t('Mention an agent with @name and it answers.') : undefined, children: agents.length ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", shrink: 1, minW: 0, children: agents.map((one) => (_jsx(Box, { render: "button", "aria-label": t('Mention {name}', { name: one.name }), onClick: () => name(one.name), px: "$2", py: "$1", rounded: "$10", hoverStyle: { bg: '$hover' }, children: _jsxs(Text, { "data-i18n-ltr": true, fontSize: "$2", color: "$soft", children: ["@", one.name] }) }, one.id))) })) : null }), refused ? (_jsx(Text, { fontSize: "$2", color: BAD, children: refused })) : null] }), _jsx(Beside, { children: aside === 'roster' ? _jsx(Roster, { members: members, wrong: wrong, onMention: name }) : null })] }));
86
+ .map((one) => (_jsx(Line, { member: mine, fallback: t('You'), text: one.text, soft: true }, `pending-${one.key}`)))] }), _jsxs(YStack, { p: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(Composer, { value: draft, onChange: setDraft, onSend: () => void speak(), placeholder: t('Message {channel}', { channel: title }), label: t('Message {channel}', { channel: title }), hint: agents.length ? t('Mention an agent with @name and it answers.') : undefined, children: agents.length ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", shrink: 1, minW: 0, children: agents.map((one) => (_jsx(Box, { render: "button", "aria-label": t('Mention {name}', { name: one.name }), onClick: () => name(one.name), px: "$2", py: "$1", rounded: "$10", hoverStyle: { bg: '$hover' }, children: _jsxs(Text, { "data-i18n-ltr": true, fontSize: "$2", color: "$soft", children: ["@", one.name] }) }, one.id))) })) : null }), refused ? (_jsx(Text, { fontSize: "$2", color: BAD, children: refused })) : null] }), _jsx(Side, { children: aside === 'roster' ? _jsx(Roster, { members: members, wrong: wrong, onMention: name }) : null })] }));
87
87
  }
88
88
  /** One thing said: a face, a name, the stamp where the platform gave one. */
89
89
  function Line({ member, fallback, stamp, text, soft, }) {
@@ -92,7 +92,7 @@ function Line({ member, fallback, stamp, text, soft, }) {
92
92
  return (_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Face, { src: member?.avatar, name: member?.name ?? fallback, size: 32, person: true }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsxs(XStack, { gap: "$2", items: "baseline", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: ink, numberOfLines: 1, children: member?.name ?? fallback }), member?.agent ? (_jsx(Box, { px: "$1.5", py: "$0.5", rounded: "$2", bg: "$hover", children: _jsx(Text, { fontSize: "$1", color: "$soft", fontWeight: "600", children: t('Agent') }) })) : null, stamp ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: stamp }) })) : null] }), _jsx(Text, { fontSize: "$3", color: ink, children: text }), _jsx(XStack, { mt: "$1", children: _jsx(SpeakButton, { text: text, agentName: member?.name ?? fallback, compact: true }) })] })] }));
93
93
  }
94
94
  /**
95
- * Who is here, beside the room. An agent is pressable — pressing it names it in
95
+ * Who is here, beside the channel. An agent is pressable — pressing it names it in
96
96
  * the draft, which is how it is asked something — and a person is a person:
97
97
  * IAM publishes no route that messages one, so the row identifies rather than
98
98
  * opens.
@@ -17,12 +17,12 @@ import { DAY, HOME, LIMITS, MISSIONS, ORGS, SCENE, STILL, agent, channelOf, fram
17
17
  * (bold and counted when unread), Direct messages with who is here, and the
18
18
  * org's Agents; then the channel: its name and topic, who is in it, the huddle,
19
19
  * the messages with their cards, reactions and threads, who is typing, and the
20
- * composer. A thread opens beside the channel when there is room, over it when
20
+ * composer. A thread opens beside the channel when there is space, over it when
21
21
  * not.
22
22
  *
23
23
  * The day is `./workday`: more than five minutes of people and agents working
24
24
  * together before it plays again. It plays while on screen and the pointer is
25
- * elsewhere. Pressing an org or a channel plays that room's own scene, an
25
+ * elsewhere. Pressing an org or a channel plays that channel's own scene, an
26
26
  * agent's question or a draft answers a press, and from then on the reader
27
27
  * drives: nothing loops over them. A reader who asked for less motion, the
28
28
  * server and the first paint get one whole frame: #eng with the pull request
@@ -43,7 +43,7 @@ const ROW = {
43
43
  hoverStyle: { bg: '$hover' },
44
44
  focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)', outlineOffset: -2 },
45
45
  };
46
- /** The fade a list takes where it runs out of room. */
46
+ /** The fade a list takes where it runs out of space. */
47
47
  const TOP = { maskImage: 'linear-gradient(to bottom, transparent, black 48px)', WebkitMaskImage: 'linear-gradient(to bottom, transparent, black 48px)' };
48
48
  const FOOT = { maskImage: 'linear-gradient(to bottom, black 82%, transparent)', WebkitMaskImage: 'linear-gradient(to bottom, black 82%, transparent)' };
49
49
  /** The reader, at the rail's foot. */
@@ -59,7 +59,7 @@ const FACES = 900;
59
59
  /** "1 reply", "3 replies". */
60
60
  const replies = (t, n) => (n === 1 ? t('1 reply') : t('{count} replies', { count: n }));
61
61
  /** How wide it must be for a thread to stand beside the channel rather than over it. */
62
- const ROOM = 1000;
62
+ const WIDE = 1000;
63
63
  /** A person's initials or an agent's memoji. */
64
64
  function Avatar({ id, size }) {
65
65
  if (!agent(id))
@@ -189,7 +189,7 @@ function Panel({ org, supervised, onMode, asks, done, handoffs, onOpen }) {
189
189
  // The four steps shown: the last two done, then what is next.
190
190
  const from = mission ? Math.max(0, Math.min(done.length - 2, mission.steps.length - 4)) : 0;
191
191
  const agents = ORGS.find((o) => o.id === org)?.agents.filter((a) => LIMITS[a]).slice(0, 3) ?? [];
192
- return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "hidden", gap: 10, p: 12, bg: "$sunken", "$platform-web": FOOT, children: [_jsxs(Box, { icon: ShieldCheck, title: t('How agents act'), children: [_jsx(Mode, { supervised: supervised, onSet: onMode }), _jsx(Text, { fontSize: "$1", lineHeight: 16, color: "$soft", children: supervised ? t('Agents ask before each tool, connector or site. Spending limits stay on.') : t('Agents run tools on their own and stop for anything risky. Spending limits stay on.') })] }), _jsx(Box, { icon: UserRound, title: t('Needs a person'), aside: _jsx(Text, { "data-motion": "rise", fontSize: "$1", fontWeight: "700", color: "$ink", "data-i18n-ltr": true, children: asks.length }, asks.length), children: asks.length ? (asks.slice(0, 3).map((a) => (_jsxs(XStack, { "data-motion": "rise", render: _jsx("button", { type: "button", "aria-label": t('Open #{channel}', { channel: channelOf(a.room) }), onClick: () => onOpen(a.room) }), items: "center", gap: 8, p: 4, rounded: 8, bg: "transparent", ...ROW, "$platform-web": { borderRadius: '8px', textAlign: 'start' }, children: [_jsx(Avatar, { id: a.who, size: 20 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", lineHeight: 16, color: "$ink", numberOfLines: 2, children: t(a.say, { what: t(a.what) }) })] }, a.id)))) : (_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Nothing right now.') })) }), mission ? (_jsxs(Box, { icon: Target, title: t(mission.title), aside: _jsx(Text, { fontSize: "$1", color: "$soft", "data-i18n-ltr": true, children: t('{done} of {total}', { done: done.length, total: mission.steps.length }) }), children: [_jsx(Progress, { done: done.length, total: mission.steps.length }), _jsx(YStack, { gap: 5, children: mission.steps.map((step, i) => ({ step, i })).slice(from, from + 4).map(({ step, i }) => (_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Tick, { done: done.includes(i) }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", color: done.includes(i) ? '$ink' : '$soft', numberOfLines: 1, children: t(step) })] }, step))) })] })) : null, _jsx(Box, { icon: CornerDownRight, title: t('Handoffs'), children: handoffs.length ? ([...handoffs]
192
+ return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "hidden", gap: 10, p: 12, bg: "$sunken", "$platform-web": FOOT, children: [_jsxs(Box, { icon: ShieldCheck, title: t('How agents act'), children: [_jsx(Mode, { supervised: supervised, onSet: onMode }), _jsx(Text, { fontSize: "$1", lineHeight: 16, color: "$soft", children: supervised ? t('Agents ask before each tool, connector or site. Spending limits stay on.') : t('Agents run tools on their own and stop for anything risky. Spending limits stay on.') })] }), _jsx(Box, { icon: UserRound, title: t('Needs a person'), aside: _jsx(Text, { "data-motion": "rise", fontSize: "$1", fontWeight: "700", color: "$ink", "data-i18n-ltr": true, children: asks.length }, asks.length), children: asks.length ? (asks.slice(0, 3).map((a) => (_jsxs(XStack, { "data-motion": "rise", render: _jsx("button", { type: "button", "aria-label": t('Open #{channel}', { channel: channelOf(a.channel) }), onClick: () => onOpen(a.channel) }), items: "center", gap: 8, p: 4, rounded: 8, bg: "transparent", ...ROW, "$platform-web": { borderRadius: '8px', textAlign: 'start' }, children: [_jsx(Avatar, { id: a.who, size: 20 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", lineHeight: 16, color: "$ink", numberOfLines: 2, children: t(a.say, { what: t(a.what) }) })] }, a.id)))) : (_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Nothing right now.') })) }), mission ? (_jsxs(Box, { icon: Target, title: t(mission.title), aside: _jsx(Text, { fontSize: "$1", color: "$soft", "data-i18n-ltr": true, children: t('{done} of {total}', { done: done.length, total: mission.steps.length }) }), children: [_jsx(Progress, { done: done.length, total: mission.steps.length }), _jsx(YStack, { gap: 5, children: mission.steps.map((step, i) => ({ step, i })).slice(from, from + 4).map(({ step, i }) => (_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Tick, { done: done.includes(i) }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", color: done.includes(i) ? '$ink' : '$soft', numberOfLines: 1, children: t(step) })] }, step))) })] })) : null, _jsx(Box, { icon: CornerDownRight, title: t('Handoffs'), children: handoffs.length ? ([...handoffs]
193
193
  .reverse()
194
194
  .slice(0, 4)
195
195
  .map((h) => (_jsxs(XStack, { "data-motion": "rise", items: "center", gap: 6, children: [_jsx(Avatar, { id: h.from, size: 18 }), _jsx(CornerDownRight, { size: 11, color: "var(--muted-foreground)", "aria-hidden": true, "data-i18n-mirror": true }), _jsx(Avatar, { id: h.to, size: 18 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", color: "$ink", numberOfLines: 1, children: t('{from} to {to}', { from: who(h.from).name, to: who(h.to).name }) }), _jsx(Text, { fontSize: 11, color: "$faint", "data-i18n-ltr": true, children: clock(h.time) })] }, `${h.time}/${h.from}/${h.to}`)))) : (_jsx(Text, { fontSize: "$1", color: "$soft", children: t('No handoffs yet today.') })) }), agents.length ? (_jsx(Box, { icon: Wallet, title: t('Spending limits'), children: agents.map((a) => (_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Avatar, { id: a, size: 18 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$1", color: "$ink", numberOfLines: 1, children: who(a).name }), _jsx(Text, { fontSize: 11, color: "$soft", "data-i18n-ltr": true, children: t('{week} a week · {task} a task', { week: `$${LIMITS[a].week}`, task: `$${LIMITS[a].task}` }) })] }, a))) })) : null] }));
@@ -215,11 +215,11 @@ export function TeamPreview(props) {
215
215
  // hero's half and a device's screen alike; the window decides only before it
216
216
  // is measured (the server's render and the first paint).
217
217
  const desk = phone ? false : width ? width >= DESK : null;
218
- const roomy = desk !== false && width >= ROOM;
218
+ const wide = desk !== false && width >= WIDE;
219
219
  const [driven, setDriven] = useState(false);
220
220
  const loop = useRef(true);
221
221
  const [replay, setReplay] = useState(0);
222
- // The room the reader opened, the rooms they have read, and what they set by hand.
222
+ // The channel the reader opened, the channels they have read, and what they set by hand.
223
223
  const [opened, setOpened] = useState(null);
224
224
  const [read, setRead] = useState([]);
225
225
  const [hand, setHand] = useState({});
@@ -230,36 +230,36 @@ export function TeamPreview(props) {
230
230
  useEffect(() => {
231
231
  loop.current = !driven;
232
232
  }, [driven]);
233
- const lines = useMemo(() => (opened ? (SCENE[opened] ?? pace([{ kind: 'open', room: opened, time: 9 * 60 }])) : DAY), [opened]);
233
+ const lines = useMemo(() => (opened ? (SCENE[opened] ?? pace([{ kind: 'open', channel: opened, time: 9 * 60 }])) : DAY), [opened]);
234
234
  const run = seen && !still;
235
235
  const at = usePlay(lines, run, replay, { visible, held, loop, live, end });
236
236
  // Before it plays, and under reduced motion, the day stands at its still frame.
237
237
  const upto = opened || run ? at : STILL;
238
238
  const f = useMemo(() => frame(lines, upto), [lines, upto]);
239
- const here = f.room;
239
+ const here = f.channel;
240
240
  const o = orgOf(here);
241
241
  const channel = channelOf(here);
242
242
  const topic = o.channels.find((c) => c.id === channel)?.topic ?? '';
243
- const messages = (f.rooms[here] ?? []).map((m) => (hand[m.id] && m.card ? { ...m, card: { ...m.card, ...hand[m.id] } } : m));
243
+ const messages = (f.channels[here] ?? []).map((m) => (hand[m.id] && m.card ? { ...m, card: { ...m.card, ...hand[m.id] } } : m));
244
244
  const thread = threadHand === undefined ? f.thread : threadHand;
245
245
  const parent = thread ? messages.find((m) => m.id === thread) : undefined;
246
246
  const typing = f.typing;
247
247
  const huddle = f.huddle[here] ?? [];
248
- const unread = (room) => (room === here || read.includes(room) ? 0 : (f.unread[room] ?? 0));
248
+ const unread = (id) => (id === here || read.includes(id) ? 0 : (f.unread[id] ?? 0));
249
249
  /** What is unread across an org's channels. */
250
250
  const news = (org) => ORGS.find((x) => x.id === org)?.channels.reduce((n, c) => n + unread(`${org}/${c.id}`), 0) ?? 0;
251
251
  const members = [...o.people.slice(0, 2), ...o.agents.slice(0, 2)];
252
- const asks = waiting(f, supervised).filter((a) => orgOf(a.room).id === o.id);
252
+ const asks = waiting(f, supervised).filter((a) => orgOf(a.channel).id === o.id);
253
253
  const done = f.steps[o.id] ?? [];
254
- const handoffs = f.handoffs.filter((h) => orgOf(h.room).id === o.id);
254
+ const handoffs = f.handoffs.filter((h) => orgOf(h.channel).id === o.id);
255
255
  const mission = MISSIONS[o.id];
256
256
  /** The reader takes over: nothing loops over what they set. */
257
- const go = (room) => {
257
+ const go = (id) => {
258
258
  setDriven(true);
259
259
  setDrawer(false);
260
260
  setThreadHand(undefined);
261
- setOpened(room);
262
- setRead((r) => (r.includes(room) ? r : [...r, room]));
261
+ setOpened(id);
262
+ setRead((r) => (r.includes(id) ? r : [...r, id]));
263
263
  setReplay((n) => n + 1);
264
264
  };
265
265
  const pick = (id) => (patch) => {
@@ -278,10 +278,10 @@ export function TeamPreview(props) {
278
278
  const heading = (label) => (_jsxs(XStack, { items: "center", gap: 4, px: 8, pt: 12, pb: 3, children: [_jsx(ChevronDown, { size: 12, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$soft", children: label })] }));
279
279
  /** The workspace's column: its name, search, the channels, the direct messages and the agents. */
280
280
  const column = (_jsxs(YStack, { "data-motion": "rise", flex: 1, minH: 0, overflow: "hidden", px: 8, py: 10, "$platform-web": FOOT, children: [_jsxs(XStack, { items: "center", gap: 6, px: 8, pb: 10, children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", numberOfLines: 1, children: o.name }), _jsx(ChevronDown, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(View, { flex: 1 }), _jsx(XStack, { width: 28, height: 28, rounded: 8, items: "center", justify: "center", bg: "$raised", "$platform-web": { borderRadius: '8px' }, children: _jsx(SquarePen, { size: 14, color: "var(--foreground)", "aria-hidden": true }) })] }), _jsxs(XStack, { items: "center", gap: 6, mx: 4, mb: 4, px: 10, height: 28, rounded: 8, borderWidth: 1, borderColor: "$edge", "$platform-web": { borderRadius: '8px' }, children: [_jsx(Search, { size: 12, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: "$faint", numberOfLines: 1, children: t('Search {org}', { org: o.name }) })] }), heading(t('Channels')), o.channels.map((c) => {
281
- const room = `${o.id}/${c.id}`;
282
- const on = room === here;
283
- const n = unread(room);
284
- return (_jsxs(XStack, { render: _jsx("button", { type: "button", "aria-pressed": on, "aria-label": t('Open #{channel}', { channel: c.id }), onClick: () => go(room) }), items: "center", gap: 6, px: 10, py: 4, rounded: 8, bg: on ? '$raised' : 'transparent', ...ROW, "$platform-web": { borderRadius: '8px', textAlign: 'start' }, children: [_jsx(Hash, { size: 13, color: on || n ? 'var(--foreground)' : 'var(--muted-foreground)', "aria-hidden": true }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$2", lineHeight: 20, fontWeight: on || n ? '700' : '400', color: on || n ? '$ink' : '$soft', numberOfLines: 1, "data-i18n-ltr": true, children: c.id }), n ? _jsx(Count, { n: n }) : null] }, c.id));
281
+ const id = `${o.id}/${c.id}`;
282
+ const on = id === here;
283
+ const n = unread(id);
284
+ return (_jsxs(XStack, { render: _jsx("button", { type: "button", "aria-pressed": on, "aria-label": t('Open #{channel}', { channel: c.id }), onClick: () => go(id) }), items: "center", gap: 6, px: 10, py: 4, rounded: 8, bg: on ? '$raised' : 'transparent', ...ROW, "$platform-web": { borderRadius: '8px', textAlign: 'start' }, children: [_jsx(Hash, { size: 13, color: on || n ? 'var(--foreground)' : 'var(--muted-foreground)', "aria-hidden": true }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$2", lineHeight: 20, fontWeight: on || n ? '700' : '400', color: on || n ? '$ink' : '$soft', numberOfLines: 1, "data-i18n-ltr": true, children: c.id }), n ? _jsx(Count, { n: n }) : null] }, c.id));
285
285
  }), heading(t('Direct messages')), o.people.map((p, i) => (_jsxs(XStack, { items: "center", gap: 8, px: 10, py: 3, children: [_jsx(Avatar, { id: p, size: 20 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$2", color: "$soft", numberOfLines: 1, children: who(p).name }), _jsx(Here, { away: i === o.people.length - 1, busy: typing?.who === p })] }, p))), heading(t('Agents')), o.agents.map((a) => (_jsxs(XStack, { items: "center", gap: 8, px: 10, py: 3, children: [_jsx(Avatar, { id: a, size: 20 }), _jsx(Text, { flex: 1, minW: 0, fontSize: "$2", color: "$soft", numberOfLines: 1, children: t('{name} · {role}', { name: who(a).name, role: t(who(a).role ?? '') }) }), _jsx(Here, { busy: typing?.who === a })] }, a)))] }, o.id));
286
286
  const title = (_jsxs(YStack, { flex: 1, minW: 0, children: [_jsxs(XStack, { items: "center", gap: 3, children: [_jsx(Hash, { size: 15, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", numberOfLines: 1, "data-i18n-ltr": true, children: channel }), _jsx(ChevronDown, { size: 13, color: "var(--muted-foreground)", "aria-hidden": true })] }), _jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: t(topic) })] }));
287
287
  /** A conversation's messages, the oldest leaving the top; a run of one author's lines shares one face. */
@@ -295,11 +295,11 @@ export function TeamPreview(props) {
295
295
  const side = parent ? (_jsxs(YStack, { flex: 1, minH: 0, bg: "var(--background)", children: [_jsxs(XStack, { items: "center", gap: 8, px: 14, minH: 52, borderBottomWidth: 1, borderColor: "$edge", children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", children: t('Thread') }), _jsx(Text, { fontSize: "$1", color: "$soft", "data-i18n-ltr": true, children: `#${channel}` })] }), _jsx(XStack, { render: _jsx("button", { type: "button", "aria-label": t('Close the thread'), onClick: () => openThread(null) }), width: 28, height: 28, rounded: 8, items: "center", justify: "center", bg: "transparent", ...ROW, "$platform-web": { borderRadius: '8px' }, children: _jsx(X, { size: 15, color: "var(--muted-foreground)", "aria-hidden": true }) })] }), _jsxs(YStack, { flex: 1, minH: 0, overflow: "hidden", justify: "flex-end", gap: 6, px: 14, pt: 8, pb: 4, "$platform-web": TOP, children: [_jsx(Post, { m: { ...parent, replies: [] }, grouped: false, onPick: pick(parent.id) }), _jsxs(XStack, { items: "center", gap: 8, py: 6, children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: replies(t, parent.replies.length) }), _jsx(View, { flex: 1, height: 1, bg: "$edge" })] }), parent.replies.map((r, i) => (_jsx(Post, { m: { id: `${parent.id}/${i}`, who: r.who, text: r.text, time: r.time, reactions: [], replies: [] }, grouped: false, onPick: () => undefined }, i)))] }), composer(t('Reply…'))] }, parent.id)) : null;
296
296
  return (_jsxs(View, { ref: box, "data-slot": "team-preview", role: "group", "aria-label": t('Hanzo Team, playing a sample workspace'), ...hold, display: "grid", position: "relative", height: compact ? '100%' : 620, overflow: "hidden", bg: "var(--background)", gridTemplateColumns: "minmax(0, 1fr)", ...md(desk, {
297
297
  height: compact ? '100%' : 640,
298
- gridTemplateColumns: `60px ${breadth(width)}px minmax(0, 1fr)${roomy ? ' 290px' : ''}`,
298
+ gridTemplateColumns: `60px ${breadth(width)}px minmax(0, 1fr)${wide ? ' 290px' : ''}`,
299
299
  }), "$platform-web": { textAlign: 'start' }, children: [_jsx(YStack, { display: "none", ...md(desk, { display: 'flex' }), minH: 0, children: rail }), _jsx(YStack, { display: "none", ...md(desk, { display: 'flex' }), minH: 0, borderColor: "$edge", borderInlineEndWidth: 1, bg: "$sunken", children: column }), _jsxs(YStack, { minW: 0, minH: 0, position: "relative", children: [_jsxs(XStack, { items: "center", gap: 10, px: 14, minH: 52, borderBottomWidth: 1, borderColor: "$edge", children: [_jsx(XStack, { ...md(desk, { display: 'none' }), children: _jsx(XStack, { render: _jsx("button", { type: "button", "aria-expanded": drawer, "aria-label": t('Channels in {org}', { org: o.name }), onClick: () => setDrawer(!drawer) }), width: 32, height: 32, rounded: 8, items: "center", justify: "center", bg: "transparent", ...ROW, "$platform-web": { borderRadius: '8px' }, children: _jsx(Menu, { size: 17, color: "var(--foreground)", "aria-hidden": true }) }) }), title, _jsxs(XStack, { display: "none", ...(width >= FACES ? { display: 'flex' } : {}), items: "center", children: [members.map((p, i) => (_jsx(View, { marginInlineStart: i ? -6 : 0, rounded: 9999, borderWidth: 2, borderColor: "var(--background)", "$platform-web": { borderRadius: '9999px' }, children: _jsx(Avatar, { id: p, size: 22 }) }, p))), _jsx(Text, { fontSize: "$1", color: "$soft", marginInlineStart: 6, "data-i18n-ltr": true, children: o.people.length + o.agents.length })] }), _jsxs(XStack, { "data-motion": "rise", items: "center", gap: 6, px: 10, height: 30, rounded: 8, borderWidth: 1, borderColor: huddle.length ? '$ink' : '$edge', bg: huddle.length ? '$ink' : 'transparent', "$platform-web": { borderRadius: '8px' }, children: [huddle.length ? _jsx(View, { "data-motion": "pulse", width: 7, height: 7, rounded: 9999, bg: "var(--state-online)", "$platform-web": { borderRadius: '9999px' } }) : null, _jsx(Headphones, { size: 14, color: huddle.length ? 'var(--background)' : 'var(--foreground)', "aria-hidden": true }), _jsx(Text, { display: "none", ...md(desk, { display: 'flex' }), fontSize: "$1", fontWeight: "600", color: huddle.length ? '$background' : '$ink', children: huddle.length ? t('Huddle · {count}', { count: huddle.length }) : t('Huddle') })] }, huddle.length ? 'on' : 'off')] }), _jsxs(YStack, { ...md(desk, { display: 'none' }), gap: 8, pt: 10, pb: 8, borderBottomWidth: 1, borderColor: "$edge", children: [_jsxs(XStack, { items: "center", gap: 10, px: 12, children: [ORGS.map((x) => (_jsx(Tile, { org: x, on: x.id === o.id, n: x.id === o.id ? 0 : news(x.id), size: "lg", onPress: () => go(HOME[x.id]) }, x.id))), _jsx(Text, { "data-motion": "rise", flex: 1, minW: 0, fontSize: "$3", fontWeight: "700", color: "$ink", numberOfLines: 1, marginInlineStart: 4, children: o.name }, o.id)] }), _jsx(XStack, { flexWrap: "wrap", gap: 6, px: 12, display: height && height < LIST ? 'none' : 'flex', children: o.channels.map((c) => {
300
- const room = `${o.id}/${c.id}`;
301
- const on = room === here;
302
- const n = unread(room);
303
- return (_jsxs(XStack, { render: _jsx("button", { type: "button", "aria-pressed": on, "aria-label": t('Open #{channel}', { channel: c.id }), onClick: () => go(room) }), shrink: 0, items: "center", gap: 5, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: on ? '$ink' : '$edge', bg: on ? '$ink' : 'transparent', cursor: "pointer", focusVisibleStyle: ROW.focusVisibleStyle, "$platform-web": { borderRadius: '9999px' }, children: [_jsx(Text, { fontSize: "$1", fontWeight: on || n ? '700' : '500', color: on ? '$background' : n ? '$ink' : '$soft', "data-i18n-ltr": true, children: `#${c.id}` }), n && !on ? _jsx(Count, { n: n }) : null] }, c.id));
304
- }) })] }), list(messages, true), _jsx(XStack, { items: "center", gap: 6, px: 18, minH: 20, children: typing && typing.room === here ? (_jsxs(_Fragment, { children: [_jsx(Dots, {}), _jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: t('{name} is typing…', { name: who(typing.who).name }) })] })) : null }), roomy || (height && height < LIST) ? null : (_jsxs(XStack, { flexWrap: "wrap", items: "center", gap: 8, px: 12, pb: 8, children: [_jsx(Mode, { supervised: supervised, onSet: setSupervised, small: true }), _jsxs(XStack, { items: "center", gap: 6, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: asks.length ? '$ink' : '$edge', "$platform-web": { borderRadius: '9999px' }, children: [_jsx(UserRound, { size: 12, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { "data-motion": "rise", fontSize: 11, fontWeight: "600", color: "$ink", children: asks.length ? t('{count} need a person', { count: asks.length }) : t('Nothing needs a person') }, asks.length)] }), mission ? (_jsxs(XStack, { items: "center", gap: 6, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: "$edge", "$platform-web": { borderRadius: '9999px' }, children: [_jsx(Target, { size: 12, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 11, fontWeight: "600", color: "$ink", "data-i18n-ltr": true, children: t('{done} of {total}', { done: done.length, total: mission.steps.length }) }), _jsx(View, { width: 36, children: _jsx(Progress, { done: done.length, total: mission.steps.length }) })] })) : null] })), composer(t('Message #{channel}', { channel })), side && !roomy ? (_jsx(YStack, { "data-motion": "rise", position: "absolute", t: 0, b: 0, insetInlineEnd: 0, width: "100%", maxW: 420, borderColor: "$edge", borderInlineStartWidth: 1, bg: "var(--background)", boxShadow: "0 24px 60px -24px color-mix(in srgb, var(--pure-black) 60%, transparent)", children: side })) : null, drawer && desk !== true ? (_jsxs(XStack, { "data-motion": "rise", position: "absolute", t: 0, b: 0, insetInlineStart: 0, width: "88%", maxW: 340, bg: "var(--background)", borderColor: "$edge", borderInlineEndWidth: 1, boxShadow: "0 24px 60px -24px color-mix(in srgb, var(--pure-black) 60%, transparent)", ...md(desk, { display: 'none' }), children: [rail, _jsx(YStack, { flex: 1, minW: 0, bg: "$sunken", children: column })] })) : null] }), roomy ? (_jsx(YStack, { minW: 0, minH: 0, borderColor: "$edge", borderInlineStartWidth: 1, children: side ?? _jsx(Panel, { org: o.id, supervised: supervised, onMode: setSupervised, asks: asks, done: done, handoffs: handoffs, onOpen: go }) })) : null] }));
300
+ const id = `${o.id}/${c.id}`;
301
+ const on = id === here;
302
+ const n = unread(id);
303
+ return (_jsxs(XStack, { render: _jsx("button", { type: "button", "aria-pressed": on, "aria-label": t('Open #{channel}', { channel: c.id }), onClick: () => go(id) }), shrink: 0, items: "center", gap: 5, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: on ? '$ink' : '$edge', bg: on ? '$ink' : 'transparent', cursor: "pointer", focusVisibleStyle: ROW.focusVisibleStyle, "$platform-web": { borderRadius: '9999px' }, children: [_jsx(Text, { fontSize: "$1", fontWeight: on || n ? '700' : '500', color: on ? '$background' : n ? '$ink' : '$soft', "data-i18n-ltr": true, children: `#${c.id}` }), n && !on ? _jsx(Count, { n: n }) : null] }, c.id));
304
+ }) })] }), list(messages, true), _jsx(XStack, { items: "center", gap: 6, px: 18, minH: 20, children: typing && typing.channel === here ? (_jsxs(_Fragment, { children: [_jsx(Dots, {}), _jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: t('{name} is typing…', { name: who(typing.who).name }) })] })) : null }), wide || (height && height < LIST) ? null : (_jsxs(XStack, { flexWrap: "wrap", items: "center", gap: 8, px: 12, pb: 8, children: [_jsx(Mode, { supervised: supervised, onSet: setSupervised, small: true }), _jsxs(XStack, { items: "center", gap: 6, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: asks.length ? '$ink' : '$edge', "$platform-web": { borderRadius: '9999px' }, children: [_jsx(UserRound, { size: 12, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { "data-motion": "rise", fontSize: 11, fontWeight: "600", color: "$ink", children: asks.length ? t('{count} need a person', { count: asks.length }) : t('Nothing needs a person') }, asks.length)] }), mission ? (_jsxs(XStack, { items: "center", gap: 6, px: 10, height: 28, rounded: 9999, borderWidth: 1, borderColor: "$edge", "$platform-web": { borderRadius: '9999px' }, children: [_jsx(Target, { size: 12, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 11, fontWeight: "600", color: "$ink", "data-i18n-ltr": true, children: t('{done} of {total}', { done: done.length, total: mission.steps.length }) }), _jsx(View, { width: 36, children: _jsx(Progress, { done: done.length, total: mission.steps.length }) })] })) : null] })), composer(t('Message #{channel}', { channel })), side && !wide ? (_jsx(YStack, { "data-motion": "rise", position: "absolute", t: 0, b: 0, insetInlineEnd: 0, width: "100%", maxW: 420, borderColor: "$edge", borderInlineStartWidth: 1, bg: "var(--background)", boxShadow: "0 24px 60px -24px color-mix(in srgb, var(--pure-black) 60%, transparent)", children: side })) : null, drawer && desk !== true ? (_jsxs(XStack, { "data-motion": "rise", position: "absolute", t: 0, b: 0, insetInlineStart: 0, width: "88%", maxW: 340, bg: "var(--background)", borderColor: "$edge", borderInlineEndWidth: 1, boxShadow: "0 24px 60px -24px color-mix(in srgb, var(--pure-black) 60%, transparent)", ...md(desk, { display: 'none' }), children: [rail, _jsx(YStack, { flex: 1, minW: 0, bg: "$sunken", children: column })] })) : null] }), wide ? (_jsx(YStack, { minW: 0, minH: 0, borderColor: "$edge", borderInlineStartWidth: 1, children: side ?? _jsx(Panel, { org: o.id, supervised: supervised, onMode: setSupervised, asks: asks, done: done, handoffs: handoffs, onOpen: go }) })) : null] }));
305
305
  }
package/dist/TeamStory.js CHANGED
@@ -11,7 +11,7 @@ import { Text, View, XStack, YStack } from '@hanzo/ui';
11
11
  * where each one leads are here, so the two cannot drift.
12
12
  *
13
13
  * Every sentence states something the product does: organizations and channels
14
- * (the switcher, the rooms), agents with roles and spending limits (an agent's
14
+ * (the switcher, the channels), agents with roles and spending limits (an agent's
15
15
  * settings: a period cap and the most one task may spend, docs "Budgets"),
16
16
  * agents handing work to agents (Hanzo Bot's multi-agent sessions), and the
17
17
  * approval mode (Auto, which the app also calls autonomous, or Manual,
package/dist/Usage.js CHANGED
@@ -11,7 +11,7 @@ import { showSettings } from './open.js';
11
11
  import { hasSession, org, subject, bearer, scope } from './lib/session.js';
12
12
  import { fetchCloudUsage } from '@hanzo/usage';
13
13
  import { api } from './lib/api.js';
14
- import { useRooms } from './host.js';
14
+ import { useHost } from './host.js';
15
15
  import { tokensOf } from './lib/tokens.js';
16
16
  import { payPage } from './lib/pay.js';
17
17
  import { useLimits } from './lib/limits.js';
@@ -22,7 +22,7 @@ export function UsageControl({ context, read }) {
22
22
  const [open, setOpen] = useState(false);
23
23
  const currentOrg = org();
24
24
  const identity = `${currentOrg}:${subject()}`;
25
- const { path } = useRooms();
25
+ const { path } = useHost();
26
26
  const run = path?.match(/^\/dev\/run\/([^/]+)/)?.[1];
27
27
  const [account, setAccount] = useState(null);
28
28
  const [runUsage, setRunUsage] = useState(null);
package/dist/Work.js CHANGED
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  // Every piece here comes from `@hanzo/ui/agents` and every fact from
6
6
  // `@hanzo/ai`. This file is arrangement — it owns no pixels and no transport,
7
7
  // which is the test of whether the lift actually landed: a stranger with the
8
- // two packages can assemble this room, and a channel workspace will assemble
8
+ // two packages can assemble this app, and a channel workspace will assemble
9
9
  // the same one from the same parts.
10
10
  //
11
11
  // THE BOARD IS A TREE, not a list. `sessions.list` answers ROOT sessions only,
@@ -135,7 +135,7 @@ function Watching({ idle }) {
135
135
  // the 316px left after the rail and the sidebar, so the pane beside it
136
136
  // was 32px wide and the run itself was unreadable — a narrow strip with
137
137
  // a rule down it, which is what a squeezed column looks like. Above
138
- // 1024 there is room for both; below it the board is a strip across the
138
+ // 1024 there is space for both; below it the board is a strip across the
139
139
  // top and the run has the whole width under it.
140
140
  //
141
141
  // STATE THE VALUE, NEVER `undefined`. gui emits nothing for an
package/dist/bots/Bots.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- // The Bots Room.
3
+ // The Bots app.
4
4
  //
5
5
  // Bots are autonomous workers for your organization: each has a model,
6
6
  // instructions, tools, and a record of everything it has accomplished.
@@ -255,7 +255,7 @@ export function Bots() {
255
255
  });
256
256
  }, [activeRoster, query, live, t]);
257
257
  const bot = useMemo(() => activeRoster.find((b) => b.name === picked) ?? shown[0] ?? activeRoster[0] ?? null, [activeRoster, shown, picked]);
258
- // Its record and its work, re-read after anything this room does to it —
258
+ // Its record and its work, re-read after anything this app does to it —
259
259
  // the platform's answer is the only account of what happened.
260
260
  const refresh = useCallback(async () => {
261
261
  if (!client || !bot)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A window's head: three rings, not three colours. Red, amber and green are
3
3
  * another company's mark, and nothing here closes, minimises or zooms, so the
4
- * shape alone says "window". The Bots room, its capture and the template
4
+ * shape alone says "window". The Bots app, its capture and the template
5
5
  * cards wear it (components/bots/Bots.tsx, components/home/Shot.tsx,
6
6
  * components/home/Templates.tsx).
7
7
  */
@@ -4,7 +4,7 @@ import { XStack, YStack } from '@hanzo/gui';
4
4
  /**
5
5
  * A window's head: three rings, not three colours. Red, amber and green are
6
6
  * another company's mark, and nothing here closes, minimises or zooms, so the
7
- * shape alone says "window". The Bots room, its capture and the template
7
+ * shape alone says "window". The Bots app, its capture and the template
8
8
  * cards wear it (components/bots/Bots.tsx, components/home/Shot.tsx,
9
9
  * components/home/Templates.tsx).
10
10
  */
@@ -14,7 +14,7 @@ export declare const ONCE = "one-shot";
14
14
  * The sessions opened under this Bot's name.
15
15
  *
16
16
  * NARROWED HERE, BECAUSE THE ROUTE WILL NOT. Its query is root, parent,
17
- * status, project, room and limit — there is no per-agent filter — and an
17
+ * status, project, channel and limit — there is no per-agent filter — and an
18
18
  * `agent=` it does not know is SILENTLY IGNORED rather than refused. Measured:
19
19
  * `?agent=nope` and no query at all answer the same five rows. A caller that
20
20
  * trusts the parameter draws the whole org's work as one bot's, which is how
@@ -35,15 +35,16 @@ export declare const steer: (c: Client, id: string, command: 'pause' | 'resume'
35
35
  event?: SessionEvent;
36
36
  forwarded?: boolean;
37
37
  }>;
38
- /** Which Bot answers a channel: the org default and any room bound past it. */
38
+ /** Which Bot answers on a transport: the org default and any channel bound past it. */
39
39
  export interface Answering {
40
- channel: string;
40
+ transport: string;
41
41
  default?: string;
42
- rooms?: Record<string, string>;
42
+ /** A channel id on that transport, to the agent bound to it. */
43
+ channels?: Record<string, string>;
43
44
  }
44
- export declare const answering: (c: Client, channel: string, signal?: AbortSignal) => Promise<Answering>;
45
- /** Makes this Bot the one that answers a channel. */
46
- export declare const answer: (c: Client, channel: string, agent: string) => Promise<Answering>;
45
+ export declare const answering: (c: Client, transport: string, signal?: AbortSignal) => Promise<Answering>;
46
+ /** Makes this Bot the one that answers on a transport. */
47
+ export declare const answer: (c: Client, transport: string, agent: string) => Promise<Answering>;
47
48
  /**
48
49
  * The platform's own MCP surface — every subsystem's operations, projected as
49
50
  * tools, over JSON-RPC at `/v1/mcp`.
package/dist/bots/api.js CHANGED
@@ -27,7 +27,7 @@ export const ONCE = 'one-shot';
27
27
  * The sessions opened under this Bot's name.
28
28
  *
29
29
  * NARROWED HERE, BECAUSE THE ROUTE WILL NOT. Its query is root, parent,
30
- * status, project, room and limit — there is no per-agent filter — and an
30
+ * status, project, channel and limit — there is no per-agent filter — and an
31
31
  * `agent=` it does not know is SILENTLY IGNORED rather than refused. Measured:
32
32
  * `?agent=nope` and no query at all answer the same five rows. A caller that
33
33
  * trusts the parameter draws the whole org's work as one bot's, which is how
@@ -50,9 +50,9 @@ export const steer = (c, id, command, message) => c.http.json({
50
50
  path: `${SESSION}/${encodeURIComponent(id)}/${command}`,
51
51
  body: message === undefined ? {} : { message },
52
52
  });
53
- export const answering = (c, channel, signal) => c.http.json({ path: '/v1/channels/agent', query: { channel }, signal });
54
- /** Makes this Bot the one that answers a channel. */
55
- export const answer = (c, channel, agent) => c.http.json({ method: 'PUT', path: '/v1/channels/agent', body: { channel, default: agent } });
53
+ export const answering = (c, transport, signal) => c.http.json({ path: '/v1/transport/agent', query: { transport }, signal });
54
+ /** Makes this Bot the one that answers on a transport. */
55
+ export const answer = (c, transport, agent) => c.http.json({ method: 'PUT', path: '/v1/transport/agent', body: { transport, default: agent } });
56
56
  const rpc = (c, method, params) => c.http
57
57
  .json({
58
58
  method: 'POST',
package/dist/bots/ink.js CHANGED
@@ -1,4 +1,4 @@
1
- // The ramp this room is drawn in.
1
+ // The ramp this app is drawn in.
2
2
  //
3
3
  // Greyscale, because nothing on this screen is a category: a Bot is not red and
4
4
  // a session is not green. What used to stand here was seven personas each given
@@ -10,9 +10,9 @@
10
10
  //
11
11
  // ROLES, NOT VALUES. These were seven literals — black ground, white ink, white
12
12
  // at four opacities — which reads right in dark by coincidence and cannot
13
- // retune. On the light theme the room came out an island: the rail and the
13
+ // retune. On the light theme the app came out an island: the rail and the
14
14
  // column beside it followed the page while everything these painted stayed
15
- // night, which is also what a screenshot of the room then carried onto the
15
+ // night, which is also what a screenshot of the app then carried onto the
16
16
  // landing. Naming the role hands the decision to @hanzo/design, which tunes
17
17
  // both grounds already.
18
18
  //
@@ -79,7 +79,7 @@ export declare const LABEL: {
79
79
  readonly color: "$faint";
80
80
  readonly textTransform: 'uppercase';
81
81
  };
82
- /** A sentence the room says when it has nothing else to draw. */
82
+ /** A sentence the app says when it has nothing else to draw. */
83
83
  export declare const NOTE: {
84
84
  readonly render: 'p';
85
85
  readonly px: 12;
@@ -88,7 +88,7 @@ export declare const NOTE: {
88
88
  readonly lineHeight: '1.3rem';
89
89
  readonly color: "var(--muted-foreground)";
90
90
  };
91
- /** One line, cut with an ellipsis where it runs out of room. */
91
+ /** One line, cut with an ellipsis where it runs out of space. */
92
92
  export declare const CLIP: {
93
93
  readonly whiteSpace: 'nowrap';
94
94
  readonly overflow: 'hidden';
package/dist/bots/kit.js CHANGED
@@ -1,6 +1,6 @@
1
- // The controls and surfaces the Bots room is drawn from, as gui props.
1
+ // The controls and surfaces the Bots app is drawn from, as gui props.
2
2
  //
3
- // The room and its runtime pane spelled the same tab, field and label twice
3
+ // The app and its runtime pane spelled the same tab, field and label twice
4
4
  // each; they are stated once here and spread where they are drawn. Each is a
5
5
  // plain prop object, so a call site adds to one and never needs a style.
6
6
  import { DIM, FAINT, INK, LINE, RAISED, SURFACE } from './ink.js';
@@ -32,9 +32,9 @@ export const CARD = { bg: RAISED, borderWidth: 1, borderColor: LINE, rounded: 14
32
32
  export const LABEL = {
33
33
  render: 'h3', fontSize: '$1', fontWeight: '600', letterSpacing: 0.6, color: FAINT, textTransform: 'uppercase',
34
34
  };
35
- /** A sentence the room says when it has nothing else to draw. */
35
+ /** A sentence the app says when it has nothing else to draw. */
36
36
  export const NOTE = { render: 'p', px: 12, py: 10, fontSize: '$2', lineHeight: '1.3rem', color: DIM };
37
- /** One line, cut with an ellipsis where it runs out of room. */
37
+ /** One line, cut with an ellipsis where it runs out of space. */
38
38
  export const CLIP = { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' };
39
39
  /** What a run printed: a bounded block of mono that scrolls. */
40
40
  export const OUT = {