@hanzo/app 0.2.57 → 0.2.59

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 (85) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/Board.js +37 -121
  3. package/dist/Boxes.js +12 -16
  4. package/dist/CalScheduler.js +40 -81
  5. package/dist/Chat.js +84 -78
  6. package/dist/Chrome.d.ts +2 -14
  7. package/dist/Chrome.js +7 -44
  8. package/dist/Column.js +6 -2
  9. package/dist/Contents.d.ts +1 -1
  10. package/dist/Contents.js +2 -1
  11. package/dist/Drive.js +100 -121
  12. package/dist/Inbox.js +7 -7
  13. package/dist/Market.js +10 -15
  14. package/dist/Meet.js +48 -78
  15. package/dist/Orgs.js +10 -9
  16. package/dist/Palette.d.ts +1 -1
  17. package/dist/Palette.js +2 -1
  18. package/dist/Rail.js +3 -3
  19. package/dist/Schedule.js +11 -15
  20. package/dist/Settings.d.ts +1 -1
  21. package/dist/SettingsPane.js +2 -2
  22. package/dist/Shared.js +11 -16
  23. package/dist/Shell.js +1 -1
  24. package/dist/Talk.js +4 -4
  25. package/dist/Terminals.js +1 -3
  26. package/dist/Top.js +1 -1
  27. package/dist/Usage.js +3 -3
  28. package/dist/WindowControls.js +3 -5
  29. package/dist/Work.js +28 -51
  30. package/dist/bots/Bots.js +73 -129
  31. package/dist/bots/runtime.js +41 -103
  32. package/dist/cast.d.ts +1 -1
  33. package/dist/cast.js +1 -1
  34. package/dist/failure.d.ts +1 -1
  35. package/dist/failure.js +1 -1
  36. package/dist/ground.d.ts +14 -0
  37. package/dist/ground.js +14 -0
  38. package/dist/lib/limits.d.ts +1 -1
  39. package/dist/lib/limits.js +1 -1
  40. package/dist/lib/org.d.ts +3 -3
  41. package/dist/lib/org.js +5 -4
  42. package/dist/lib/orgname.d.ts +1 -1
  43. package/dist/lib/orgname.js +1 -1
  44. package/dist/lib/pay.d.ts +2 -6
  45. package/dist/lib/pay.js +2 -15
  46. package/dist/lib/plans.d.ts +1 -1
  47. package/dist/lib/plans.js +1 -1
  48. package/dist/lib/tier.d.ts +2 -2
  49. package/dist/lib/tier.js +6 -6
  50. package/dist/look.js +8 -10
  51. package/dist/recent.d.ts +1 -1
  52. package/dist/recent.js +2 -1
  53. package/dist/say.d.ts +4 -0
  54. package/dist/say.js +7 -0
  55. package/dist/thread.js +1 -1
  56. package/package.json +3 -3
  57. package/assets/memoji/art.svg +0 -22
  58. package/assets/memoji/cyber.svg +0 -22
  59. package/assets/memoji/data.svg +0 -22
  60. package/assets/memoji/des.svg +0 -22
  61. package/assets/memoji/dev.svg +0 -22
  62. package/assets/memoji/doc.svg +0 -22
  63. package/assets/memoji/edu.svg +0 -22
  64. package/assets/memoji/fin.svg +0 -22
  65. package/assets/memoji/gov.svg +0 -22
  66. package/assets/memoji/huma.svg +0 -22
  67. package/assets/memoji/lang.svg +0 -22
  68. package/assets/memoji/law.svg +0 -22
  69. package/assets/memoji/mana.svg +0 -22
  70. package/assets/memoji/mark.svg +0 -22
  71. package/assets/memoji/mu.svg +0 -22
  72. package/assets/memoji/opera.svg +0 -22
  73. package/assets/memoji/rev.svg +0 -22
  74. package/assets/memoji/sal.svg +0 -22
  75. package/assets/memoji/sci.svg +0 -22
  76. package/assets/memoji/su.svg +0 -22
  77. package/assets/memoji/vi.svg +0 -22
  78. package/dist/TeamPreview.d.ts +0 -9
  79. package/dist/TeamPreview.js +0 -305
  80. package/dist/TeamStory.d.ts +0 -49
  81. package/dist/TeamStory.js +0 -67
  82. package/dist/preview.d.ts +0 -84
  83. package/dist/preview.js +0 -120
  84. package/dist/workday.d.ts +0 -247
  85. package/dist/workday.js +0 -642
package/dist/Inbox.js CHANGED
@@ -47,7 +47,7 @@ import { conversationOf, useConversations, } from './conversations.js';
47
47
  import { Directory } from './Directory.js';
48
48
  import { BAD } from './lib/mix.js';
49
49
  /** Unix SECONDS, which is what the platform sends. Milliseconds here read as 1970. */
50
- const when = (seconds, locale) => new Date(seconds * 1000).toLocaleString(locale, {
50
+ const when = (seconds) => new Date(seconds * 1000).toLocaleString(undefined, {
51
51
  month: 'short',
52
52
  day: 'numeric',
53
53
  hour: 'numeric',
@@ -55,13 +55,13 @@ const when = (seconds, locale) => new Date(seconds * 1000).toLocaleString(locale
55
55
  });
56
56
  /** Today says the time; anything older says the day. A list scans on the part
57
57
  * that differs, and for mail from this morning that is the clock. */
58
- function stamp(seconds, locale) {
58
+ function stamp(seconds) {
59
59
  const then = new Date(seconds * 1000);
60
60
  const now = new Date();
61
61
  const sameDay = then.getFullYear() === now.getFullYear() &&
62
62
  then.getMonth() === now.getMonth() &&
63
63
  then.getDate() === now.getDate();
64
- return then.toLocaleString(locale, sameDay ? { hour: 'numeric', minute: '2-digit' } : { month: 'short', day: 'numeric' });
64
+ return then.toLocaleString(undefined, sameDay ? { hour: 'numeric', minute: '2-digit' } : { month: 'short', day: 'numeric' });
65
65
  }
66
66
  /**
67
67
  * WHO WROTE, AND FROM WHERE — one mark.
@@ -89,12 +89,12 @@ function Empty({ children, offer }) {
89
89
  }
90
90
  /** The list, which stays on screen while you read down it. */
91
91
  function Arrivals({ rooms, open, onPick, }) {
92
- const { t, locale } = useI18n();
93
- return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(XStack, { height: 48, shrink: 0, items: "center", px: "$3", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { flex: 1, fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Inbox') }), _jsx(Connect, {})] }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", children: rooms.map((one) => (_jsx(Box, { render: "button", onClick: () => onPick(one.key), "aria-current": one.key === open, display: "block", width: "100%", cursor: "pointer", borderBottomWidth: 1, borderColor: "var(--borderColor, var(--white-08))", bg: one.key === open ? 'var(--raised, var(--white-06))' : 'transparent', hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { gap: "$3", items: "center", p: "$3", children: [_jsx(Sender, { channel: one.channel }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", items: "flex-start", children: [_jsxs(XStack, { width: "100%", items: "baseline", gap: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, flex: 1, text: "start", children: one.title }), one.lastAt ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: stamp(one.lastAt / 1000, locale) }) })) : null] }), one.preview ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: one.preview })) : null] })] }) }, one.key))) })] }));
92
+ const { t } = useI18n();
93
+ return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(XStack, { height: 48, shrink: 0, items: "center", px: "$3", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { flex: 1, fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Inbox') }), _jsx(Connect, {})] }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", children: rooms.map((one) => (_jsx(Box, { render: "button", onClick: () => onPick(one.key), "aria-current": one.key === open, display: "block", width: "100%", cursor: "pointer", borderBottomWidth: 1, borderColor: "var(--borderColor, var(--white-08))", bg: one.key === open ? 'var(--raised, var(--white-06))' : 'transparent', hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { gap: "$3", items: "center", p: "$3", children: [_jsx(Sender, { channel: one.channel }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", items: "flex-start", children: [_jsxs(XStack, { width: "100%", items: "baseline", gap: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, flex: 1, text: "start", children: one.title }), one.lastAt ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: stamp(one.lastAt / 1000) }) })) : null] }), one.preview ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: one.preview })) : null] })] }) }, one.key))) })] }));
94
94
  }
95
95
  /** What is open, beside the list rather than instead of it. */
96
96
  function Reading({ room, reload, }) {
97
- const { t, locale } = useI18n();
97
+ const { t } = useI18n();
98
98
  const { client } = useAi();
99
99
  const [draft, setDraft] = useState('');
100
100
  const [sending, setSending] = useState(false);
@@ -140,7 +140,7 @@ function Reading({ room, reload, }) {
140
140
  }, [client, draft, sending, room.channel, room.roomId, reload, t]);
141
141
  return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsx(ChannelHeader, { name: roomName(room), children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Network, { channel: room.channel, size: 14 }), _jsx(Text, { fontSize: "$2", color: "$soft", children: of(room.channel).name })] }) }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$4", gap: "$3", children: [...room.messages]
142
142
  .sort((a, b) => a.createdAt - b.createdAt)
143
- .map((message) => (_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Sender, { channel: room.channel, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsxs(XStack, { gap: "$2", items: "baseline", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", children: speaker(room.channel, message.sender) }), _jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: when(message.createdAt, locale) }) })] }), _jsx(Text, { fontSize: "$3", color: "$ink", children: message.text })] })] }, message.id))) }), _jsx(YStack, { p: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", children: room.roomId ? (_jsxs(_Fragment, { children: [_jsx(Composer, { value: draft, onChange: setDraft, onSend: () => void send(), busy: sending, placeholder: t('Reply on {network}', { network: of(room.channel).name }), label: t('Reply on {network}', { network: of(room.channel).name }) }), failed ? (_jsx(Text, { fontSize: "$2", color: BAD, children: failed })) : null] })) : (_jsx(Text, { fontSize: "$2", color: "$soft", children: t('This message names no room to answer in.') })) })] }));
143
+ .map((message) => (_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Sender, { channel: room.channel, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsxs(XStack, { gap: "$2", items: "baseline", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", children: speaker(room.channel, message.sender) }), _jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: when(message.createdAt) }) })] }), _jsx(Text, { fontSize: "$3", color: "$ink", children: message.text })] })] }, message.id))) }), _jsx(YStack, { p: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", children: room.roomId ? (_jsxs(_Fragment, { children: [_jsx(Composer, { value: draft, onChange: setDraft, onSend: () => void send(), busy: sending, placeholder: t('Reply on {network}', { network: of(room.channel).name }), label: t('Reply on {network}', { network: of(room.channel).name }) }), failed ? (_jsx(Text, { fontSize: "$2", color: BAD, children: failed })) : null] })) : (_jsx(Text, { fontSize: "$2", color: "$soft", children: t('This message names no room to answer in.') })) })] }));
144
144
  }
145
145
  function InboxGrip({ span, onSpan, }) {
146
146
  const { t, dir } = useI18n();
package/dist/Market.js CHANGED
@@ -16,7 +16,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  // than offering a button that fails: a remote endpoint is something this app can
17
17
  // reach, a stdio package is a process someone still has to run.
18
18
  import { useCallback, useEffect, useMemo, useState } from 'react';
19
- import { useI18n } from '@hanzo/i18n/react';
20
19
  import { say } from './failure.js';
21
20
  import { ArrowUpRight, Check, Compass, Search } from 'lucide-react';
22
21
  import { Box, Text, XStack, YStack } from '@hanzo/ui';
@@ -52,14 +51,10 @@ function Mark({ listing }) {
52
51
  return (_jsx(YStack, { width: 40, height: 40, shrink: 0, rounded: "$3", bg: "$panel", items: "center", justify: "center", overflow: "hidden", children: listing.logo ? (_jsx("img", { src: listing.logo, alt: "", width: 40, height: 40 })) : (_jsx(Text, { fontSize: "$4", fontWeight: "500", color: "$soft", children: label(listing).slice(0, 1).toUpperCase() })) }));
53
52
  }
54
53
  function Card({ listing, installed, onInstall, busy, }) {
55
- const { t } = useI18n();
56
54
  const canInstall = reachable(listing);
57
- return (_jsxs(YStack, { width: 300, gap: "$3", p: "$4", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", children: [_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Mark, { listing: listing }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", numberOfLines: 1, children: label(listing) }), _jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: listing.vendor ?? '' })] })] }), _jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 3, children: listing.description || t('No description published.') }), installed ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Check, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Installed') })] })) : canInstall ? (_jsx(Box, { render: "button", onClick: onInstall, self: "flex-start", px: "$3", py: "$2", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: '$hover' }, children: _jsx(Text, { fontSize: "$2", color: "$ink", children: busy ? t('Installing') : t('Install') }) })) : (_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Ships as a {kind} package — needs a runner before it can be connected.', {
58
- kind: (listing.packages ?? [])[0]?.registry ?? 'stdio',
59
- }) }))] }));
55
+ return (_jsxs(YStack, { width: 300, gap: "$3", p: "$4", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", children: [_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Mark, { listing: listing }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", numberOfLines: 1, children: label(listing) }), _jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: listing.vendor ?? '' })] })] }), _jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 3, children: listing.description || 'No description published.' }), installed ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Check, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", color: "$soft", children: "Installed" })] })) : canInstall ? (_jsx(Box, { render: "button", onClick: onInstall, self: "flex-start", px: "$3", py: "$2", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: '$hover' }, children: _jsx(Text, { fontSize: "$2", color: "$ink", children: busy ? 'Installing' : 'Install' }) })) : (_jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Ships as a ", (listing.packages ?? [])[0]?.registry ?? 'stdio', " package \u2014 needs a runner before it can be connected."] }))] }));
60
56
  }
61
57
  export function Market({ scope }) {
62
- const { t } = useI18n();
63
58
  const { client } = useAi();
64
59
  // SIGNED IN IS THE CREDENTIAL, NOT THE PROFILE. This gated on `user`, which is
65
60
  // the answer to a userinfo REQUEST — and `IamProvider` swallows that request's
@@ -140,16 +135,16 @@ export function Market({ scope }) {
140
135
  if (isLoading)
141
136
  return _jsx(Empty, { children: "\u00A0" });
142
137
  if (!signedIn)
143
- return _jsx(Empty, { children: t('Sign in to browse agents you can add.') });
138
+ return _jsx(Empty, { children: "Sign in to browse agents you can add." });
144
139
  if (failed)
145
- return _jsx(Empty, { children: say(failed, t('the marketplace'), 'read', t) });
146
- return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(YStack, { p: "$5", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { fontSize: "$7", lineHeight: "$7", fontWeight: "500", color: "$ink", children: t('Put AI to work in {brand}', { brand: brand() }) }), _jsx(Text, { fontSize: "$3", color: "$soft", children: t('Browse agents that bring your tools into {brand}.', { brand: brand() }) }), _jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", mt: "$2", children: [_jsxs(XStack, { width: 420, maxW: "100%", height: 36, items: "center", gap: "$2", px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Search, { size: 14, "aria-hidden": true }), _jsx(Text, { render: _jsx("input", { value: ask, onChange: (e) => setAsk(e.target.value), placeholder: t('Search agents'), "aria-label": t('Search agents') }), flex: 1, bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "inherit" })] }), _jsxs(XStack, { render: "button", onPress: () => window.open('https://hanzo.market', '_blank', 'noopener,noreferrer'), height: 36, px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", items: "center", gap: "$1.5", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Compass, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Explore on hanzo.market') }), _jsx(ArrowUpRight, { size: 13, "aria-hidden": true, color: "$soft" })] })] })] }), !listings ? (_jsx(Empty, { children: t('Reading the shelf.') })) : shown.length === 0 ? (_jsx(Empty, { children: scope === 'installed'
147
- ? t('No agents installed yet.')
140
+ return _jsx(Empty, { children: say(failed, 'the marketplace') });
141
+ return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(YStack, { p: "$5", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsxs(Text, { fontSize: "$7", lineHeight: "$7", fontWeight: "500", color: "$ink", children: ["Put AI to work in ", brand()] }), _jsxs(Text, { fontSize: "$3", color: "$soft", children: ["Browse agents that bring your tools into ", brand(), "."] }), _jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", mt: "$2", children: [_jsxs(XStack, { width: 420, maxW: "100%", height: 36, items: "center", gap: "$2", px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Search, { size: 14, "aria-hidden": true }), _jsx(Text, { render: _jsx("input", { value: ask, onChange: (e) => setAsk(e.target.value), placeholder: "Search agents" }), flex: 1, bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "inherit" })] }), _jsxs(XStack, { render: "button", onPress: () => window.open('https://hanzo.market', '_blank', 'noopener,noreferrer'), height: 36, px: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", items: "center", gap: "$1.5", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Compass, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: "Explore on hanzo.market" }), _jsx(ArrowUpRight, { size: 13, "aria-hidden": true, color: "$soft" })] })] })] }), !listings ? (_jsx(Empty, { children: "Reading the shelf." })) : shown.length === 0 ? (_jsx(Empty, { children: scope === 'installed'
142
+ ? 'No agents installed yet.'
148
143
  : ask
149
- ? t('Nothing in the registry matches that.')
150
- : t('The shelf is empty — the catalog has not been synced yet.') })) : (_jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$5", gap: "$3", children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: scope === 'installed'
151
- ? t('{count} installed', { count: shown.length })
144
+ ? 'Nothing in the registry matches that.'
145
+ : 'The shelf is empty — the catalog has not been synced yet.' })) : (_jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$5", gap: "$3", children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: scope === 'installed'
146
+ ? `${shown.length} installed`
152
147
  : ask
153
- ? t('{count} of {total} matching', { count: shown.length, total })
154
- : t('{count} featured', { count: shown.length }) }), _jsx(XStack, { flexWrap: "wrap", gap: "$3", children: shown.map((listing) => (_jsx(Card, { listing: listing, installed: installed.has(listing.id), busy: busy === listing.id, onInstall: () => void install(listing) }, listing.id))) })] }))] }));
148
+ ? `${shown.length} of ${total} matching`
149
+ : `${shown.length} featured` }), _jsx(XStack, { flexWrap: "wrap", gap: "$3", children: shown.map((listing) => (_jsx(Card, { listing: listing, installed: installed.has(listing.id), busy: busy === listing.id, onInstall: () => void install(listing) }, listing.id))) })] }))] }));
155
150
  }
package/dist/Meet.js CHANGED
@@ -5,48 +5,37 @@ import { Video, VideoOff, Mic, MicOff, PhoneOff, Copy, Check, Plus, Calendar, Ex
5
5
  import { Text, View, XStack, YStack } from '@hanzo/gui';
6
6
  import { Button } from '@hanzo/ui';
7
7
  import { useIamToken } from '@hanzo/iam/react';
8
- import { phrase } from '@hanzo/i18n';
9
8
  import { refused, speech, useTranscript, useVoice } from '@hanzo/voice';
10
9
  import { Face, voiceOf } from './cast.js';
11
- import { useI18n } from '@hanzo/i18n/react';
12
10
  import { member } from './team.js';
13
11
  import { cleanForSpeech, speakAgent, stopAgentSpeech, AudioWave, useAgentSpeech } from './speech.js';
14
12
  import { GOOD } from './lib/mix.js';
15
13
  import { api } from './lib/api.js';
16
14
  import { ENSO, base } from './lib/ai.js';
17
- /** Roles this screen writes, keyed by member id. A part the screen does not author stays the persona's. */
18
- const PARTS = {
19
- maya: phrase('Chief of Staff'),
20
- des: phrase('Designer'),
21
- vi: phrase('Strategist'),
22
- nora: phrase('Support Lead'),
23
- einstein: phrase('Legal & IP Counsel'),
24
- };
25
15
  /** A core member as a meeting seats them: the team's name and part, the cast's voice. */
26
16
  const seated = (id) => {
27
17
  const one = member(id);
28
- return { id, name: one.name, role: PARTS[id] ?? one.role, voice: voiceOf(id) };
18
+ return { id, name: one.name, role: one.role, voice: voiceOf(id) };
29
19
  };
30
20
  export const AVAILABLE_MEETING_AGENTS = [
31
- { id: 'hanzo-coder', name: 'Hanzo Coder', role: phrase('Engineering Lead & Coder'), voice: voiceOf('Hanzo Coder') },
32
- { id: 'hanzo-researcher', name: 'Hanzo Researcher', role: phrase('Research & DeSci Scientist'), voice: voiceOf('Hanzo Researcher') },
21
+ { id: 'hanzo-coder', name: 'Hanzo Coder', role: 'Engineering Lead & Coder', voice: voiceOf('Hanzo Coder') },
22
+ { id: 'hanzo-researcher', name: 'Hanzo Researcher', role: 'Research & DeSci Scientist', voice: voiceOf('Hanzo Researcher') },
33
23
  seated('maya'),
34
24
  seated('des'),
35
25
  seated('vi'),
36
26
  seated('nora'),
37
27
  seated('einstein'),
38
- { id: 'zach', name: 'Zach', role: phrase('Quantitative Analyst'), voice: voiceOf('zach') },
28
+ { id: 'zach', name: 'Zach', role: 'Quantitative Analyst', voice: voiceOf('zach') },
39
29
  ];
40
30
  const DEFAULT_MEETINGS = [
41
31
  {
42
32
  id: 'meet-1',
43
- title: phrase('AI Platform Architecture & LLM Inference Sync'),
33
+ title: 'AI Platform Architecture & LLM Inference Sync',
44
34
  roomName: 'platform-architecture',
45
35
  time: '18:00 - 18:45',
46
- date: phrase('Today'),
36
+ date: 'Today',
47
37
  duration: '45m',
48
- host: phrase('{name} (You)'),
49
- hostName: 'Alex',
38
+ host: 'Alex (You)',
50
39
  participants: ['Alex', 'Zach'],
51
40
  agents: ['Hanzo Coder', 'Vi'],
52
41
  botInvited: true,
@@ -54,12 +43,12 @@ const DEFAULT_MEETINGS = [
54
43
  },
55
44
  {
56
45
  id: 'meet-2',
57
- title: phrase('Research Review'),
46
+ title: 'Research Review',
58
47
  roomName: 'research-review',
59
48
  time: '20:00 - 21:00',
60
- date: phrase('Today'),
49
+ date: 'Today',
61
50
  duration: '60m',
62
- host: phrase('Research'),
51
+ host: 'Research',
63
52
  participants: ['Alex', 'Research Team'],
64
53
  agents: ['Hanzo Researcher', 'Maya'],
65
54
  botInvited: true,
@@ -67,12 +56,12 @@ const DEFAULT_MEETINGS = [
67
56
  },
68
57
  {
69
58
  id: 'meet-3',
70
- title: phrase('Security & Compliance Sync'),
59
+ title: 'Security & Compliance Sync',
71
60
  roomName: 'security-sync',
72
61
  time: '11:00 - 11:30',
73
- date: phrase('Tomorrow'),
62
+ date: 'Tomorrow',
74
63
  duration: '30m',
75
- host: phrase('Security'),
64
+ host: 'Security',
76
65
  participants: ['Alex', 'Core Developers'],
77
66
  agents: ['Des', 'Einstein'],
78
67
  botInvited: false,
@@ -85,9 +74,9 @@ const DEFAULT_MEETINGS = [
85
74
  * `useIamToken`) through the one API host; a refusal is thrown with what the
86
75
  * gateway said, never answered with a line nobody wrote.
87
76
  */
88
- async function generateAgentMeetingResponse(prompt, agentName, token, t) {
77
+ async function generateAgentMeetingResponse(prompt, agentName, token) {
89
78
  if (!token)
90
- throw new Error(t('Sign in to ask the co-pilot.'));
79
+ throw new Error('Sign in to ask the co-pilot.');
91
80
  const res = await fetch(`${api()}/v1/chat/completions`, {
92
81
  method: 'POST',
93
82
  headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
@@ -104,17 +93,16 @@ async function generateAgentMeetingResponse(prompt, agentName, token, t) {
104
93
  }),
105
94
  });
106
95
  if (!res.ok)
107
- throw new Error(t('The co-pilot is unavailable ({status}).', { status: res.status }));
96
+ throw new Error(`The co-pilot is unavailable (${res.status}).`);
108
97
  const data = await res.json();
109
98
  const text = data.choices?.[0]?.message?.content?.trim();
110
99
  if (!text)
111
- throw new Error(t('The co-pilot answered with nothing.'));
100
+ throw new Error('The co-pilot answered with nothing.');
112
101
  return text;
113
102
  }
114
103
  /** design's smallest rung (`--text-floor`, 10px), below gui's `$1`; gui's font size takes a rung or a number. */
115
104
  const FLOOR = 10;
116
105
  export function Meet() {
117
- const { t, locale } = useI18n();
118
106
  const [activeMeetingRoom, setActiveMeetingRoom] = useState(null);
119
107
  const [roomInput, setRoomInput] = useState('');
120
108
  const [copied, setCopied] = useState(false);
@@ -213,9 +201,7 @@ export function Meet() {
213
201
  return;
214
202
  }
215
203
  setAudioTesting(true);
216
- speakAgent(t("Welcome to Hanzo Meet. This is {agent}'s voice. If you can hear this, your speakers are working.", {
217
- agent: activeCoPilotAgent,
218
- }), {
204
+ speakAgent(`Welcome to Hanzo Meet. This is ${activeCoPilotAgent}'s voice. If you can hear this, your speakers are working.`, {
219
205
  agent: activeCoPilotAgent,
220
206
  token,
221
207
  onEnd: () => setAudioTesting(false),
@@ -243,58 +229,51 @@ export function Meet() {
243
229
  const transcriber = useTranscript({
244
230
  speech: ear,
245
231
  onPartial: setCaption,
246
- onSettled: (text) => setLiveNotes((prev) => [...prev, t('{time}: You: {text}', { time: clock(locale), text })]),
232
+ onSettled: (text) => setLiveNotes((prev) => [...prev, `${clock()}: You: ${text}`]),
247
233
  });
248
234
  const transcriberNote = transcriber.reason ?? (transcriber.refusal ? refused(transcriber.refusal) : null);
249
235
  const handleSpokenInput = useCallback(async (transcript) => {
250
- const time = clock(locale);
251
- setLiveNotes((prev) => [...prev, t('{time}: You (voice): {text}', { time, text: transcript })]);
236
+ const time = clock();
237
+ setLiveNotes((prev) => [...prev, `${time}: You (voice): ${transcript}`]);
252
238
  try {
253
- const reply = await generateAgentMeetingResponse(transcript, activeCoPilotAgent, token, t);
254
- setLiveNotes((prev) => [...prev, t('{time}: {agent} (AI): {reply}', { time, agent: activeCoPilotAgent, reply })]);
239
+ const reply = await generateAgentMeetingResponse(transcript, activeCoPilotAgent, token);
240
+ setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} (AI): ${reply}`]);
255
241
  void handsFreeSay(cleanForSpeech(reply), voiceOf(activeCoPilotAgent));
256
242
  }
257
243
  catch (err) {
258
- setLiveNotes((prev) => [
259
- ...prev,
260
- t('{time}: {agent} did not answer: {reason}', { time, agent: activeCoPilotAgent, reason: err.message }),
261
- ]);
244
+ setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} did not answer: ${err.message}`]);
262
245
  }
263
- }, [activeCoPilotAgent, token, handsFreeSay, t, locale]);
246
+ }, [activeCoPilotAgent, token, handsFreeSay]);
264
247
  const handleAskAgent = async (e) => {
265
248
  e.preventDefault();
266
249
  const q = agentQuestion.trim();
267
250
  if (!q)
268
251
  return;
269
252
  setAgentQuestion('');
270
- const time = clock(locale);
271
- setLiveNotes((prev) => [...prev, t('{time}: You: {text}', { time, text: q })]);
253
+ const time = clock();
254
+ setLiveNotes((prev) => [...prev, `${time}: You: ${q}`]);
272
255
  try {
273
- const reply = await generateAgentMeetingResponse(q, activeCoPilotAgent, token, t);
274
- setLiveNotes((prev) => [...prev, t('{time}: {agent} (AI): {reply}', { time, agent: activeCoPilotAgent, reply })]);
256
+ const reply = await generateAgentMeetingResponse(q, activeCoPilotAgent, token);
257
+ setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} (AI): ${reply}`]);
275
258
  speak(reply, activeCoPilotAgent);
276
259
  }
277
260
  catch (err) {
278
- setLiveNotes((prev) => [
279
- ...prev,
280
- t('{time}: {agent} did not answer: {reason}', { time, agent: activeCoPilotAgent, reason: err.message }),
281
- ]);
261
+ setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} did not answer: ${err.message}`]);
282
262
  }
283
263
  };
284
264
  // The briefing is the call's own notes, read aloud; with none there is nothing to brief.
285
265
  const handleReadBriefing = () => {
286
266
  if (!liveNotes.length)
287
267
  return;
288
- const room = activeMeetingRoom || t('this call');
289
- toggle(t('Briefing for {room}. {notes}', { room, notes: liveNotes.join('. ') }), activeCoPilotAgent);
268
+ toggle(`Briefing for ${activeMeetingRoom || 'this call'}. ${liveNotes.join('. ')}`, activeCoPilotAgent);
290
269
  };
291
270
  // What the hands-free control says: why it cannot run, or that Hanzo's speech
292
271
  // refused and the browser stood in (or could not) — never silence.
293
272
  const handsFreeNote = handsFree.reason ?? (handsFree.refusal ? refused(handsFree.refusal) : null);
294
- return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 20, py: 8, gap: 10, flexWrap: "wrap", bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 12, shrink: 1, minW: "auto", children: [_jsx(XStack, { width: 32, height: 32, rounded: 8, bg: "$raised", items: "center", justify: "center", shrink: 1, minW: "auto", children: _jsx(Video, { size: 18, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: "Hanzo Meet" }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: t('LIVE · {site}', { site: 'meet.hanzo.ai' }) })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Native WebRTC video conferencing with AI meeting bot transcription & voice') })] })] }), activeMeetingRoom ? (_jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(XStack, { bg: "$hover", rounded: 8, p: 2, gap: 2, borderWidth: 1, borderColor: "$borderColor", shrink: 1, minW: "auto", children: [
295
- ['iframe', t('SFU Stage'), Tv],
296
- ['grid', t('Agent Grid'), LayoutGrid],
297
- ].map(([view, label, Icon]) => (_jsxs(Button, { size: "sm", variant: meetingView === view ? 'primary' : 'ghost', ...(meetingView === view ? null : { color: '$soft' }), "aria-pressed": meetingView === view, onClick: () => setMeetingView(view), children: [_jsx(Icon, { size: 12 }), label] }, view))) }), botAssisting ? (_jsx(View, { display: "none", "$max-md": { display: 'flex' }, children: _jsxs(Button, { size: "sm", variant: copilot ? 'secondary' : 'default', onClick: () => setCopilot((v) => !v), "aria-label": t('Co-pilot'), "aria-expanded": copilot, "aria-controls": "meet-copilot", children: [_jsx(Bot, { size: 13 }), t('Co-pilot')] }) })) : null, _jsxs(Button, { size: "sm", onClick: () => handleCopyLink(activeMeetingRoom), children: [copied ? _jsx(Check, { size: 13 }) : _jsx(Copy, { size: 13 }), t(copied ? 'Link Copied' : 'Copy meeting link')] }), _jsxs(Button, { size: "sm", variant: "destructive", onClick: () => {
273
+ return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 20, py: 8, gap: 10, flexWrap: "wrap", bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 12, shrink: 1, minW: "auto", children: [_jsx(XStack, { width: 32, height: 32, rounded: 8, bg: "$raised", items: "center", justify: "center", shrink: 1, minW: "auto", children: _jsx(Video, { size: 18, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: "Hanzo Meet" }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: "LIVE \u00B7 meet.hanzo.ai" })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: "Native WebRTC video conferencing with AI meeting bot transcription & voice" })] })] }), activeMeetingRoom ? (_jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(XStack, { bg: "$hover", rounded: 8, p: 2, gap: 2, borderWidth: 1, borderColor: "$borderColor", shrink: 1, minW: "auto", children: [
274
+ ['iframe', 'SFU Stage', Tv],
275
+ ['grid', 'Agent Grid', LayoutGrid],
276
+ ].map(([view, label, Icon]) => (_jsxs(Button, { size: "sm", variant: meetingView === view ? 'primary' : 'ghost', ...(meetingView === view ? null : { color: '$soft' }), "aria-pressed": meetingView === view, onClick: () => setMeetingView(view), children: [_jsx(Icon, { size: 12 }), label] }, view))) }), botAssisting ? (_jsx(View, { display: "none", "$max-md": { display: 'flex' }, children: _jsxs(Button, { size: "sm", variant: copilot ? 'secondary' : 'default', onClick: () => setCopilot((v) => !v), "aria-label": "Co-pilot", "aria-expanded": copilot, "aria-controls": "meet-copilot", children: [_jsx(Bot, { size: 13 }), "Co-pilot"] }) })) : null, _jsxs(Button, { size: "sm", onClick: () => handleCopyLink(activeMeetingRoom), children: [copied ? _jsx(Check, { size: 13 }) : _jsx(Copy, { size: 13 }), copied ? 'Link Copied' : 'Copy meeting link'] }), _jsxs(Button, { size: "sm", variant: "destructive", onClick: () => {
298
277
  stopAgentSpeech();
299
278
  // Leaving the call hangs up the hands-free conversation and
300
279
  // settles the transcript with it.
@@ -303,10 +282,10 @@ export function Meet() {
303
282
  if (transcriber.open)
304
283
  transcriber.toggle();
305
284
  setActiveMeetingRoom(null);
306
- }, children: [_jsx(PhoneOff, { size: 14 }), t('Leave Call')] })] })) : (_jsx(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: _jsx(Button, { asChild: true, variant: "linkMuted", size: "sm", px: 0, children: _jsxs("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer", children: ["meet.hanzo.ai", _jsx(ExternalLink, { size: 12 })] }) }) }))] }), activeMeetingRoom ? (_jsxs(XStack, { flex: 1, overflow: "hidden", position: "relative", children: [_jsx(XStack, { flex: 1, minW: "auto", position: "relative", bg: "$sunken", children: meetingView === 'iframe' ? (_jsx(View, { render: _jsx("iframe", { src: `https://meet.hanzo.ai/${activeMeetingRoom}#config.prejoinPageEnabled=false&config.startWithAudioMuted=${!micOn}&config.startWithVideoMuted=${!cameraOn}`, allow: "camera; microphone; display-capture; autoplay; clipboard-write; speaker-selection; screen-wake-lock", title: t('Hanzo Meet: {room}', { room: activeMeetingRoom }) }), width: "100%", height: "100%", borderWidth: 0, bg: "$sunken" }, "stage")) : (_jsxs(View, { flex: 1, display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))", gap: 12, p: 16, overflowY: "auto", bg: "$background", children: [_jsx(YStack, { bg: "$panel", rounded: 12, borderWidth: 1, borderColor: "$borderColor", position: "relative", overflow: "hidden", items: "center", justify: "center", minH: 220, children: _jsxs(YStack, { items: "center", children: [_jsx(YStack, { width: 72, height: 72, rounded: 9999, bg: "$raised", items: "center", justify: "center", mb: 8, children: _jsx(Text, { fontSize: "$8", fontWeight: "700", color: "$ink", children: t('You') }) }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: t('{name} (Host)', { name: 'Alex' }) }), _jsx(Text, { fontSize: "$1", color: micOn ? GOOD : '$soft', children: t(micOn ? 'Mic Active' : 'Muted') })] }) }), invitedAgents.map((agentName) => {
285
+ }, children: [_jsx(PhoneOff, { size: 14 }), "Leave Call"] })] })) : (_jsx(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: _jsx(Button, { asChild: true, variant: "linkMuted", size: "sm", px: 0, children: _jsxs("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer", children: ["meet.hanzo.ai", _jsx(ExternalLink, { size: 12 })] }) }) }))] }), activeMeetingRoom ? (_jsxs(XStack, { flex: 1, overflow: "hidden", position: "relative", children: [_jsx(XStack, { flex: 1, minW: "auto", position: "relative", bg: "$sunken", children: meetingView === 'iframe' ? (_jsx(View, { render: _jsx("iframe", { src: `https://meet.hanzo.ai/${activeMeetingRoom}#config.prejoinPageEnabled=false&config.startWithAudioMuted=${!micOn}&config.startWithVideoMuted=${!cameraOn}`, allow: "camera; microphone; display-capture; autoplay; clipboard-write; speaker-selection; screen-wake-lock", title: `Hanzo Meet: ${activeMeetingRoom}` }), width: "100%", height: "100%", borderWidth: 0, bg: "$sunken" }, "stage")) : (_jsxs(View, { flex: 1, display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))", gap: 12, p: 16, overflowY: "auto", bg: "$background", children: [_jsx(YStack, { bg: "$panel", rounded: 12, borderWidth: 1, borderColor: "$borderColor", position: "relative", overflow: "hidden", items: "center", justify: "center", minH: 220, children: _jsxs(YStack, { items: "center", children: [_jsx(YStack, { width: 72, height: 72, rounded: 9999, bg: "$raised", items: "center", justify: "center", mb: 8, children: _jsx(Text, { fontSize: "$8", fontWeight: "700", color: "$ink", children: "You" }) }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: "Alex (Host)" }), _jsx(Text, { fontSize: "$1", color: micOn ? GOOD : '$soft', children: micOn ? 'Mic Active' : 'Muted' })] }) }), invitedAgents.map((agentName) => {
307
286
  const voice = voiceOf(agentName);
308
287
  const isThisSpeaking = (speaking || handsFree.state === 'speaking') && activeCoPilotAgent.toLowerCase() === agentName.toLowerCase();
309
- return (_jsxs(YStack, { bg: "$panel", rounded: 12, borderWidth: isThisSpeaking ? 2 : 1, borderColor: isThisSpeaking ? 'var(--state-success)' : '$borderColor', position: "relative", overflow: "hidden", items: "center", justify: "center", p: 20, minH: 220, transition: "200ms", children: [_jsxs(View, { position: "relative", mb: 10, children: [_jsx(Face, { name: agentName, size: 72 }), isThisSpeaking ? (_jsx(View, { position: "absolute", b: -4, r: -4, bg: "var(--popover)", borderWidth: 1, borderColor: "var(--state-success)", rounded: 9999, p: 4, children: _jsx(Volume2, { size: 12, color: GOOD }) })) : null] }), _jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", mb: 2, children: agentName }), _jsx(Text, { fontSize: "$1", color: "$soft", mb: 8, children: t('Voice: {voice}', { voice }) }), _jsx(XStack, { items: "center", gap: 6, bg: "$hover", px: 10, py: 4, rounded: 12, children: isThisSpeaking ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: GOOD, children: t('Speaking in Call') })] })) : (_jsxs(_Fragment, { children: [_jsx(Bot, { size: 11, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$quiet", children: t('AI Agent · In Call') })] })) })] }, agentName));
288
+ return (_jsxs(YStack, { bg: "$panel", rounded: 12, borderWidth: isThisSpeaking ? 2 : 1, borderColor: isThisSpeaking ? 'var(--state-success)' : '$borderColor', position: "relative", overflow: "hidden", items: "center", justify: "center", p: 20, minH: 220, transition: "200ms", children: [_jsxs(View, { position: "relative", mb: 10, children: [_jsx(Face, { name: agentName, size: 72 }), isThisSpeaking ? (_jsx(View, { position: "absolute", b: -4, r: -4, bg: "var(--popover)", borderWidth: 1, borderColor: "var(--state-success)", rounded: 9999, p: 4, children: _jsx(Volume2, { size: 12, color: GOOD }) })) : null] }), _jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", mb: 2, children: agentName }), _jsxs(Text, { fontSize: "$1", color: "$soft", mb: 8, children: ["Voice: ", voice] }), _jsx(XStack, { items: "center", gap: 6, bg: "$hover", px: 10, py: 4, rounded: 12, children: isThisSpeaking ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: GOOD, children: "Speaking in Call" })] })) : (_jsxs(_Fragment, { children: [_jsx(Bot, { size: 11, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$quiet", children: "AI Agent \u00B7 In Call" })] })) })] }, agentName));
310
289
  })] }, "grid")) }), botAssisting ? (_jsxs(YStack, { id: "meet-copilot", width: 360, minW: 360, bg: "$panel", borderLeftWidth: 1, borderLeftColor: "$borderColor", p: 16, gap: 12, "$max-md": {
311
290
  display: copilot ? 'flex' : 'none',
312
291
  position: 'absolute',
@@ -318,45 +297,36 @@ export function Meet() {
318
297
  minW: 0,
319
298
  z: 'var(--z-sheet)',
320
299
  borderLeftWidth: 0,
321
- }, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Face, { name: activeCoPilotAgent, size: 28 }), _jsxs(YStack, { children: [_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: activeCoPilotAgent }), _jsx(Text, { fontSize: FLOOR, color: "$faint", children: t('AI Co-pilot · Voice: {voice}', { voice: voiceOf(activeCoPilotAgent) }) })] })] }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", color: GOOD, bg: "$hover", px: 6, py: 2, rounded: 4, children: t('Live in call') })] }), _jsx(XStack, { gap: 4, flexWrap: "wrap", children: invitedAgents.map((agent) => (_jsx(Button, { size: "sm", variant: activeCoPilotAgent === agent ? 'secondary' : 'ghost', color: activeCoPilotAgent === agent ? '$ink' : '$soft', "aria-pressed": activeCoPilotAgent === agent, onClick: () => setActiveCoPilotAgent(agent), children: agent }, agent))) }), _jsxs(XStack, { gap: 8, children: [_jsx(Button, { size: "sm", flex: 1, variant: speaking ? 'secondary' : 'default', disabled: !speaking && !liveNotes.length, onClick: handleReadBriefing, children: speaking ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), t('Stop Briefing'), _jsx(Square, { size: 11, fill: "currentColor" })] })) : (_jsxs(_Fragment, { children: [_jsx(Volume2, { size: 14 }), t('Briefing')] })) }), _jsxs(Button, { size: "sm", variant: handsFree.open ? 'secondary' : 'default', "data-testid": "hands-free-voice-toggle", "data-state": handsFree.state, "data-refusal": handsFree.refusal ? handsFree.refusal.service : undefined, "aria-pressed": handsFree.open, disabled: !!handsFree.blocked, title: handsFreeNote ??
322
- t(handsFree.open
323
- ? 'Hands-Free Voice Active (Speaks and interrupts on voice)'
324
- : 'Enable Hands-Free Voice Mode'), onClick: handsFree.toggle, children: [_jsx(Mic, { size: 14, color: handsFree.open ? 'var(--state-success)' : 'currentColor' }), t(handsFree.open ? 'Hands-Free On' : 'Hands-Free')] }), _jsxs(Button, { size: "sm", variant: transcriber.open ? 'secondary' : 'default', "data-testid": "live-transcript-toggle", "data-state": transcriber.state, "data-refusal": transcriber.refusal ? transcriber.refusal.service : undefined, "aria-pressed": transcriber.open, disabled: !!transcriber.blocked, title: transcriberNote ??
325
- t(transcriber.open ? 'Transcribing — click to stop' : 'Transcribe what is said into the notes'), onClick: transcriber.toggle, children: [_jsx(Captions, { size: 14, color: transcriber.open ? 'var(--state-success)' : 'currentColor' }), t(transcriber.open ? 'Transcribing' : 'Transcribe')] })] }), handsFreeNote ? (_jsx(Text, { fontSize: "$1", color: "$soft", role: "status", children: handsFreeNote })) : null, transcriberNote ? (_jsx(Text, { fontSize: "$1", color: "$soft", role: "status", children: transcriberNote })) : null, _jsxs(YStack, { flex: 1, overflowY: "auto", bg: "$background", rounded: 8, borderWidth: 1, borderColor: "$borderColor", p: 12, gap: 8, children: [liveNotes.map((note, i) => (_jsx(Text, { fontSize: "$1", color: "$quiet", lineHeight: 16.5, pb: 8, borderBottomWidth: 1, borderBottomColor: "$borderColor", children: note }, i))), transcriber.open && caption ? (_jsx(Text, { "data-testid": "live-caption", fontSize: "$1", color: "$soft", lineHeight: 16.5, "aria-live": "polite", children: caption })) : null] }), _jsxs(XStack, { render: "form", onSubmit: handleAskAgent, gap: 6, children: [_jsx(Text, { render: _jsx("input", { type: "text", value: agentQuestion, onChange: (e) => setAgentQuestion(e.target.value), placeholder: t('Ask {agent} in meeting...', { agent: activeCoPilotAgent }) }), flex: 1, bg: "$background", borderWidth: 1, borderColor: "var(--border-control)", rounded: 6, px: 10, py: 8, color: "$ink", fontSize: "$1", outlineStyle: "none" }), _jsx(Button, { type: "submit", variant: "primary", size: "icon-sm", disabled: !agentQuestion.trim(), "aria-label": t('Ask'), children: _jsx(Send, { size: 12 }) })] }), _jsxs(XStack, { gap: 8, children: [_jsx(Button, { size: "sm", flex: 1, disabled: !agentQuestion.trim(), title: t('Add what is typed above to the notes, without asking the co-pilot'), onClick: () => {
300
+ }, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Face, { name: activeCoPilotAgent, size: 28 }), _jsxs(YStack, { children: [_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: activeCoPilotAgent }), _jsxs(Text, { fontSize: FLOOR, color: "$faint", children: ["AI Co-pilot \u00B7 Voice: ", voiceOf(activeCoPilotAgent)] })] })] }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", color: GOOD, bg: "$hover", px: 6, py: 2, rounded: 4, children: "Live in call" })] }), _jsx(XStack, { gap: 4, flexWrap: "wrap", children: invitedAgents.map((agent) => (_jsx(Button, { size: "sm", variant: activeCoPilotAgent === agent ? 'secondary' : 'ghost', color: activeCoPilotAgent === agent ? '$ink' : '$soft', "aria-pressed": activeCoPilotAgent === agent, onClick: () => setActiveCoPilotAgent(agent), children: agent }, agent))) }), _jsxs(XStack, { gap: 8, children: [_jsx(Button, { size: "sm", flex: 1, variant: speaking ? 'secondary' : 'default', disabled: !speaking && !liveNotes.length, onClick: handleReadBriefing, children: speaking ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), "Stop Briefing", _jsx(Square, { size: 11, fill: "currentColor" })] })) : (_jsxs(_Fragment, { children: [_jsx(Volume2, { size: 14 }), "Briefing"] })) }), _jsxs(Button, { size: "sm", variant: handsFree.open ? 'secondary' : 'default', "data-testid": "hands-free-voice-toggle", "data-state": handsFree.state, "data-refusal": handsFree.refusal ? handsFree.refusal.service : undefined, "aria-pressed": handsFree.open, disabled: !!handsFree.blocked, title: handsFreeNote ??
301
+ (handsFree.open ? 'Hands-Free Voice Active (Speaks and interrupts on voice)' : 'Enable Hands-Free Voice Mode'), onClick: handsFree.toggle, children: [_jsx(Mic, { size: 14, color: handsFree.open ? 'var(--state-success)' : 'currentColor' }), handsFree.open ? 'Hands-Free On' : 'Hands-Free'] }), _jsxs(Button, { size: "sm", variant: transcriber.open ? 'secondary' : 'default', "data-testid": "live-transcript-toggle", "data-state": transcriber.state, "data-refusal": transcriber.refusal ? transcriber.refusal.service : undefined, "aria-pressed": transcriber.open, disabled: !!transcriber.blocked, title: transcriberNote ?? (transcriber.open ? 'Transcribing — click to stop' : 'Transcribe what is said into the notes'), onClick: transcriber.toggle, children: [_jsx(Captions, { size: 14, color: transcriber.open ? 'var(--state-success)' : 'currentColor' }), transcriber.open ? 'Transcribing' : 'Transcribe'] })] }), handsFreeNote ? (_jsx(Text, { fontSize: "$1", color: "$soft", role: "status", children: handsFreeNote })) : null, transcriberNote ? (_jsx(Text, { fontSize: "$1", color: "$soft", role: "status", children: transcriberNote })) : null, _jsxs(YStack, { flex: 1, overflowY: "auto", bg: "$background", rounded: 8, borderWidth: 1, borderColor: "$borderColor", p: 12, gap: 8, children: [liveNotes.map((note, i) => (_jsx(Text, { fontSize: "$1", color: "$quiet", lineHeight: 16.5, pb: 8, borderBottomWidth: 1, borderBottomColor: "$borderColor", children: note }, i))), transcriber.open && caption ? (_jsx(Text, { "data-testid": "live-caption", fontSize: "$1", color: "$soft", lineHeight: 16.5, "aria-live": "polite", children: caption })) : null] }), _jsxs(XStack, { render: "form", onSubmit: handleAskAgent, gap: 6, children: [_jsx(Text, { render: _jsx("input", { type: "text", value: agentQuestion, onChange: (e) => setAgentQuestion(e.target.value), placeholder: `Ask ${activeCoPilotAgent} in meeting...` }), flex: 1, bg: "$background", borderWidth: 1, borderColor: "var(--border-control)", rounded: 6, px: 10, py: 8, color: "$ink", fontSize: "$1", outlineStyle: "none" }), _jsx(Button, { type: "submit", variant: "primary", size: "icon-sm", disabled: !agentQuestion.trim(), "aria-label": "Ask", children: _jsx(Send, { size: 12 }) })] }), _jsxs(XStack, { gap: 8, children: [_jsx(Button, { size: "sm", flex: 1, disabled: !agentQuestion.trim(), title: "Add what is typed above to the notes, without asking the co-pilot", onClick: () => {
326
302
  const note = agentQuestion.trim();
327
303
  if (!note)
328
304
  return;
329
305
  setAgentQuestion('');
330
- setLiveNotes((prev) => [...prev, t('{time}: You (note): {note}', { time: clock(locale), note })]);
331
- }, children: t('+ Add Live Note') }), _jsx(Button, { variant: "primary", size: "sm", onClick: () => {
306
+ setLiveNotes((prev) => [...prev, `${clock()}: You (note): ${note}`]);
307
+ }, children: "+ Add Live Note" }), _jsx(Button, { variant: "primary", size: "sm", onClick: () => {
332
308
  const text = liveNotes.join('\n');
333
309
  navigator.clipboard.writeText(text);
334
- }, children: t('Copy Summary') })] })] })) : null] })) : (_jsxs(XStack, { flex: 1, overflow: "hidden", "$max-lg": { flexDirection: 'column', overflowY: 'auto', overflowX: 'hidden' }, children: [_jsxs(YStack, { flex: 1, minW: 0, p: 32, gap: 24, overflowY: "auto", "$max-lg": { p: 16, flexBasis: 'auto', shrink: 0, overflowY: 'visible', overflowX: 'hidden' }, children: [_jsxs(YStack, { gap: 6, children: [_jsx(Text, { fontSize: "$8", fontWeight: "800", color: "$ink", letterSpacing: -0.5, children: t('Secure, High-Definition Video Calls') }), _jsx(Text, { fontSize: "$3", color: "$soft", children: t('Powered by native Hanzo Meet ({link}). Connect with team members, clients, and autonomous AI agents.', {
335
- link: (_jsx(Text, { render: _jsx("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer" }), color: "$ink", textDecorationLine: "underline", children: "meet.hanzo.ai" })),
336
- }) })] }), _jsxs(XStack, { gap: 12, flexWrap: "wrap", children: [_jsxs(Button, { variant: "primary", size: "lg", onClick: startInstantMeeting, children: [_jsx(Plus, { size: 16 }), t('Start Instant Meeting')] }), _jsxs(XStack, { items: "center", gap: 6, bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 8, px: 4, height: 42, children: [_jsx(Text, { render: _jsx("input", { type: "text", value: roomInput, onChange: (e) => setRoomInput(e.target.value), onKeyDown: (e) => e.key === 'Enter' && joinCustomMeeting(), placeholder: t('Enter meeting code or link'), "aria-label": t('Meeting code or link') }), bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "$ink", fontSize: "$2", width: 220, px: 8 }), _jsx(Button, { variant: "primary", size: "sm", disabled: !roomInput.trim(), onClick: joinCustomMeeting, children: t('Join') })] }), _jsxs(Button, { size: "lg", variant: showAgentPicker ? 'secondary' : 'default', "aria-expanded": showAgentPicker, onClick: () => setShowAgentPicker(!showAgentPicker), children: [_jsx(UserPlus, { size: 14 }), t('Invite Agents ({count})', { count: invitedAgents.length.toLocaleString(locale) })] })] }), showAgentPicker ? (_jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 12, p: 16, maxW: 560, children: [_jsxs(XStack, { items: "center", justify: "space-between", mb: 12, children: [_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: t('Select AI Agents to Attend Meetings') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Each agent joins the call with voice synthesis & pair programming') })] }), _jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))", gap: 8, children: AVAILABLE_MEETING_AGENTS.map((agent) => {
310
+ }, children: "Copy Summary" })] })] })) : null] })) : (_jsxs(XStack, { flex: 1, overflow: "hidden", "$max-lg": { flexDirection: 'column', overflowY: 'auto', overflowX: 'hidden' }, children: [_jsxs(YStack, { flex: 1, minW: 0, p: 32, gap: 24, overflowY: "auto", "$max-lg": { p: 16, flexBasis: 'auto', shrink: 0, overflowY: 'visible', overflowX: 'hidden' }, children: [_jsxs(YStack, { gap: 6, children: [_jsx(Text, { fontSize: "$8", fontWeight: "800", color: "$ink", letterSpacing: -0.5, children: "Secure, High-Definition Video Calls" }), _jsxs(Text, { fontSize: "$3", color: "$soft", children: ["Powered by native Hanzo Meet (", _jsx(Text, { render: _jsx("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer" }), color: "$ink", textDecorationLine: "underline", children: "meet.hanzo.ai" }), "). Connect with team members, clients, and autonomous AI agents."] })] }), _jsxs(XStack, { gap: 12, flexWrap: "wrap", children: [_jsxs(Button, { variant: "primary", size: "lg", onClick: startInstantMeeting, children: [_jsx(Plus, { size: 16 }), "Start Instant Meeting"] }), _jsxs(XStack, { items: "center", gap: 6, bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 8, px: 4, height: 42, children: [_jsx(Text, { render: _jsx("input", { type: "text", value: roomInput, onChange: (e) => setRoomInput(e.target.value), onKeyDown: (e) => e.key === 'Enter' && joinCustomMeeting(), placeholder: "Enter meeting code or link", "aria-label": "Meeting code or link" }), bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "$ink", fontSize: "$2", width: 220, px: 8 }), _jsx(Button, { variant: "primary", size: "sm", disabled: !roomInput.trim(), onClick: joinCustomMeeting, children: "Join" })] }), _jsxs(Button, { size: "lg", variant: showAgentPicker ? 'secondary' : 'default', "aria-expanded": showAgentPicker, onClick: () => setShowAgentPicker(!showAgentPicker), children: [_jsx(UserPlus, { size: 14 }), `Invite Agents (${invitedAgents.length})`] })] }), showAgentPicker ? (_jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 12, p: 16, maxW: 560, children: [_jsxs(XStack, { items: "center", justify: "space-between", mb: 12, children: [_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: "Select AI Agents to Attend Meetings" }), _jsx(Text, { fontSize: "$1", color: "$soft", children: "Each agent joins the call with voice synthesis & pair programming" })] }), _jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))", gap: 8, children: AVAILABLE_MEETING_AGENTS.map((agent) => {
337
311
  const isInvited = invitedAgents.includes(agent.name);
338
- return (_jsxs(XStack, { onClick: () => toggleAgentInvite(agent.name), items: "center", gap: 10, px: 10, py: 8, rounded: 8, bg: isInvited ? '$raised' : '$hover', borderWidth: 1, borderColor: isInvited ? 'var(--border-selected)' : '$borderColor', cursor: "pointer", transition: "quickest", children: [_jsx(Face, { name: agent.name, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: agent.name }), _jsx(Text, { fontSize: 10, color: "$faint", numberOfLines: 1, children: t('{role} · Voice: {voice}', { role: t(agent.role), voice: agent.voice }) })] }), _jsx(View, { width: 16, height: 16, rounded: 4, borderWidth: isInvited ? 0 : 1, borderColor: "var(--border-selected)", bg: isInvited ? 'var(--foreground)' : 'transparent', items: "center", justify: "center", children: isInvited ? _jsx(Check, { size: 11, strokeWidth: 3, color: "var(--background)" }) : null })] }, agent.id));
339
- }) })] })) : null, _jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 12, overflow: "hidden", maxW: 560, children: [_jsxs(XStack, { height: 280, bg: "$sunken", position: "relative", items: "center", justify: "center", children: [cameraOn ? (_jsx(View, { render: _jsx("video", { ref: videoRef, autoPlay: true, playsInline: true, muted: true }), width: "100%", height: "100%", objectFit: "cover" })) : (_jsxs(YStack, { items: "center", gap: 8, children: [_jsx(XStack, { width: 64, height: 64, rounded: 9999, bg: "$raised", items: "center", justify: "center", children: _jsx(VideoOff, { size: 28, color: "var(--muted-foreground)" }) }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Camera is off') })] })), _jsxs(XStack, { position: "absolute", b: 16, maxW: "calc(100% - 24px)", items: "center", justify: "center", flexWrap: "wrap", gap: 8, bg: "var(--surface-overlay)", backdropFilter: "blur(8px)", px: 12, py: 6, rounded: 24, borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Button, { size: "icon", rounded: 9999, variant: cameraOn ? 'default' : 'destructive', "aria-label": t(cameraOn ? 'Turn Camera Off' : 'Turn Camera On'), title: t(cameraOn ? 'Turn Camera Off' : 'Turn Camera On'), onClick: () => setCameraOn(!cameraOn), children: cameraOn ? _jsx(Video, { size: 16 }) : _jsx(VideoOff, { size: 16 }) }), _jsx(Button, { size: "icon", rounded: 9999, variant: micOn ? 'default' : 'destructive', "aria-label": t(micOn ? 'Mute Mic' : 'Unmute Mic'), title: t(micOn ? 'Mute Mic' : 'Unmute Mic'), onClick: () => setMicOn(!micOn), children: micOn ? _jsx(Mic, { size: 14, strokeWidth: 1.75 }) : _jsx(MicOff, { size: 14, strokeWidth: 1.75 }) }), _jsx(Button, { size: "sm", rounded: 9999, variant: audioTesting ? 'secondary' : 'default', title: t('Test Agent Voice & Audio Output'), onClick: testAudioSpeaker, children: audioTesting ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), t('Testing Audio…')] })) : (_jsxs(_Fragment, { children: [_jsx(Volume2, { size: 12, strokeWidth: 1.75 }), t('Test Audio')] })) }), _jsxs(Button, { size: "sm", rounded: 9999, variant: botAssisting ? 'secondary' : 'default', "aria-pressed": botAssisting, onClick: () => setBotAssisting(!botAssisting), children: [_jsx(Bot, { size: 13 }), t(botAssisting ? 'AI Bot Co-pilot ON' : 'AI Bot OFF')] })] })] }), _jsxs(XStack, { p: 12, items: "center", justify: "space-between", bg: "$panel", children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Readiness: Camera {camera} · Mic {mic} · Audio {audio}', {
340
- camera: t(cameraOn ? 'Active' : 'Muted'),
341
- mic: t(micOn ? 'Active' : 'Muted'),
342
- audio: t(audioTesting ? 'Testing' : 'Ready'),
343
- }) }), _jsx(Text, { fontSize: "$1", color: "$quiet", fontWeight: "600", children: t('HD 1080p Ready') })] })] })] }), _jsxs(YStack, { grow: 1, shrink: 1, flexBasis: 380, minW: 0, maxW: "100%", bg: "$panel", borderLeftWidth: 1, borderLeftColor: "$borderColor", p: 16, gap: 14, overflowY: "auto", "$max-lg": {
312
+ return (_jsxs(XStack, { onClick: () => toggleAgentInvite(agent.name), items: "center", gap: 10, px: 10, py: 8, rounded: 8, bg: isInvited ? '$raised' : '$hover', borderWidth: 1, borderColor: isInvited ? 'var(--border-selected)' : '$borderColor', cursor: "pointer", transition: "quickest", children: [_jsx(Face, { name: agent.name, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: agent.name }), _jsxs(Text, { fontSize: 10, color: "$faint", numberOfLines: 1, children: [agent.role, " \u00B7 Voice: ", agent.voice] })] }), _jsx(View, { width: 16, height: 16, rounded: 4, borderWidth: isInvited ? 0 : 1, borderColor: "var(--border-selected)", bg: isInvited ? 'var(--foreground)' : 'transparent', items: "center", justify: "center", children: isInvited ? _jsx(Check, { size: 11, strokeWidth: 3, color: "var(--background)" }) : null })] }, agent.id));
313
+ }) })] })) : null, _jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 12, overflow: "hidden", maxW: 560, children: [_jsxs(XStack, { height: 280, bg: "$sunken", position: "relative", items: "center", justify: "center", children: [cameraOn ? (_jsx(View, { render: _jsx("video", { ref: videoRef, autoPlay: true, playsInline: true, muted: true }), width: "100%", height: "100%", objectFit: "cover" })) : (_jsxs(YStack, { items: "center", gap: 8, children: [_jsx(XStack, { width: 64, height: 64, rounded: 9999, bg: "$raised", items: "center", justify: "center", children: _jsx(VideoOff, { size: 28, color: "var(--muted-foreground)" }) }), _jsx(Text, { fontSize: "$2", color: "$soft", children: "Camera is off" })] })), _jsxs(XStack, { position: "absolute", b: 16, maxW: "calc(100% - 24px)", items: "center", justify: "center", flexWrap: "wrap", gap: 8, bg: "var(--surface-overlay)", backdropFilter: "blur(8px)", px: 12, py: 6, rounded: 24, borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Button, { size: "icon", rounded: 9999, variant: cameraOn ? 'default' : 'destructive', "aria-label": cameraOn ? 'Turn Camera Off' : 'Turn Camera On', title: cameraOn ? 'Turn Camera Off' : 'Turn Camera On', onClick: () => setCameraOn(!cameraOn), children: cameraOn ? _jsx(Video, { size: 16 }) : _jsx(VideoOff, { size: 16 }) }), _jsx(Button, { size: "icon", rounded: 9999, variant: micOn ? 'default' : 'destructive', "aria-label": micOn ? 'Mute Mic' : 'Unmute Mic', title: micOn ? 'Mute Mic' : 'Unmute Mic', onClick: () => setMicOn(!micOn), children: micOn ? _jsx(Mic, { size: 14, strokeWidth: 1.75 }) : _jsx(MicOff, { size: 14, strokeWidth: 1.75 }) }), _jsx(Button, { size: "sm", rounded: 9999, variant: audioTesting ? 'secondary' : 'default', title: "Test Agent Voice & Audio Output", onClick: testAudioSpeaker, children: audioTesting ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), "Testing Audio\u2026"] })) : (_jsxs(_Fragment, { children: [_jsx(Volume2, { size: 12, strokeWidth: 1.75 }), "Test Audio"] })) }), _jsxs(Button, { size: "sm", rounded: 9999, variant: botAssisting ? 'secondary' : 'default', "aria-pressed": botAssisting, onClick: () => setBotAssisting(!botAssisting), children: [_jsx(Bot, { size: 13 }), botAssisting ? 'AI Bot Co-pilot ON' : 'AI Bot OFF'] })] })] }), _jsxs(XStack, { p: 12, items: "center", justify: "space-between", bg: "$panel", children: [_jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Readiness: Camera ", cameraOn ? 'Active' : 'Muted', " \u00B7 Mic ", micOn ? 'Active' : 'Muted', " \u00B7 Audio ", audioTesting ? 'Testing' : 'Ready'] }), _jsx(Text, { fontSize: "$1", color: "$quiet", fontWeight: "600", children: "HD 1080p Ready" })] })] })] }), _jsxs(YStack, { grow: 1, shrink: 1, flexBasis: 380, minW: 0, maxW: "100%", bg: "$panel", borderLeftWidth: 1, borderLeftColor: "$borderColor", p: 16, gap: 14, overflowY: "auto", "$max-lg": {
344
314
  shrink: 0,
345
315
  flexBasis: 'auto',
346
316
  borderLeftWidth: 0,
347
317
  borderTopWidth: 1,
348
318
  borderTopColor: '$borderColor',
349
319
  overflowX: 'hidden',
350
- }, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", children: t('Upcoming Meetings') }), _jsx(Text, { fontSize: "$1", color: "$faint", children: t('Synced with /cal') })] }), _jsx(YStack, { gap: 10, children: meetings.map((m) => (_jsxs(YStack, { bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: 8, p: 12, gap: 8, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$raised", color: "$ink", px: 6, py: 2, rounded: 4, children: t('{date} · {time}', { date: t(m.date), time: m.time }) }), m.botInvited ? (_jsxs(XStack, { items: "center", gap: 4, children: [_jsx(Bot, { size: 12, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: FLOOR, color: "$soft", fontWeight: "600", children: t('Agents Attending') })] })) : null] }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", lineHeight: 16.9, children: t(m.title) }), _jsxs(XStack, { items: "center", gap: 6, flexWrap: "wrap", children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Host: {host}', { host: m.hostName ? t(m.host, { name: m.hostName }) : t(m.host) }) }), m.agents && m.agents.length > 0 ? (_jsxs(XStack, { display: "inline-flex", items: "center", gap: 4, children: [_jsx(Text, { fontSize: "$1", color: "$faint", children: "\u00B7" }), _jsx(Text, { fontSize: "$1", color: "$soft", children: m.agents.join(', ') })] })) : null] }), _jsxs(XStack, { gap: 8, mt: 4, children: [_jsxs(Button, { variant: "primary", size: "sm", flex: 1, onClick: () => {
320
+ }, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", children: "Upcoming Meetings" }), _jsx(Text, { fontSize: "$1", color: "$faint", children: "Synced with /cal" })] }), _jsx(YStack, { gap: 10, children: meetings.map((m) => (_jsxs(YStack, { bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: 8, p: 12, gap: 8, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$raised", color: "$ink", px: 6, py: 2, rounded: 4, children: [m.date, " \u00B7 ", m.time] }), m.botInvited ? (_jsxs(XStack, { items: "center", gap: 4, children: [_jsx(Bot, { size: 12, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: FLOOR, color: "$soft", fontWeight: "600", children: "Agents Attending" })] })) : null] }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", lineHeight: 16.9, children: m.title }), _jsxs(XStack, { items: "center", gap: 6, flexWrap: "wrap", children: [_jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Host: ", m.host] }), m.agents && m.agents.length > 0 ? (_jsxs(XStack, { display: "inline-flex", items: "center", gap: 4, children: [_jsx(Text, { fontSize: "$1", color: "$faint", children: "\u00B7" }), _jsx(Text, { fontSize: "$1", color: "$soft", children: m.agents.join(', ') })] })) : null] }), _jsxs(XStack, { gap: 8, mt: 4, children: [_jsxs(Button, { variant: "primary", size: "sm", flex: 1, onClick: () => {
351
321
  if (m.agents) {
352
322
  setInvitedAgents(m.agents);
353
323
  if (m.agents[0])
354
324
  setActiveCoPilotAgent(m.agents[0]);
355
325
  }
356
326
  setActiveMeetingRoom(m.roomName);
357
- }, children: [_jsx(Video, { size: 12 }), t('Join Call')] }), _jsx(Button, { size: "icon-sm", "aria-label": t('Copy invite link'), title: t('Copy invite link'), onClick: () => handleCopyLink(m.roomName), children: _jsx(Copy, { size: 12 }) })] })] }, m.id))) }), _jsxs(YStack, { mt: "auto", p: 12, bg: "$background", rounded: 8, borderWidth: 1, borderColor: "$borderColor", gap: 6, children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Calendar, { size: 14, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: t('Need to book a slot?') })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Use the Hanzo Calendar Scheduler to coordinate available times across team members and bots.') }), _jsx(Button, { asChild: true, variant: "link", size: "sm", px: 0, justify: "flex-start", children: _jsxs("a", { href: "/cal", children: [t('Open Calendar Scheduler'), _jsx(ArrowRight, { size: 11 })] }) })] })] })] }))] }));
327
+ }, children: [_jsx(Video, { size: 12 }), "Join Call"] }), _jsx(Button, { size: "icon-sm", "aria-label": "Copy invite link", title: "Copy invite link", onClick: () => handleCopyLink(m.roomName), children: _jsx(Copy, { size: 12 }) })] })] }, m.id))) }), _jsxs(YStack, { mt: "auto", p: 12, bg: "$background", rounded: 8, borderWidth: 1, borderColor: "$borderColor", gap: 6, children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Calendar, { size: 14, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: "Need to book a slot?" })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: "Use the Hanzo Calendar Scheduler to coordinate available times across team members and bots." }), _jsx(Button, { asChild: true, variant: "link", size: "sm", px: 0, justify: "flex-start", children: _jsxs("a", { href: "/cal", children: ["Open Calendar Scheduler", _jsx(ArrowRight, { size: 11 })] }) })] })] })] }))] }));
358
328
  }
359
329
  /** A note's time, as the reader's clock shows it: 4:22 PM, never "4:22:". */
360
- function clock(locale) {
361
- return new Date().toLocaleTimeString(locale, { hour: 'numeric', minute: '2-digit' });
330
+ function clock() {
331
+ return new Date().toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
362
332
  }
package/dist/Orgs.js CHANGED
@@ -30,7 +30,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
30
30
  import { dev } from './lib/host.js';
31
31
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
32
32
  import { useIam } from '@hanzo/iam/react';
33
- import { phrase, english } from '@hanzo/i18n';
33
+ import { phrase } from '@hanzo/i18n';
34
34
  import { useI18n } from '@hanzo/i18n/react';
35
35
  import { Text, View, XStack, YStack } from '@hanzo/gui';
36
36
  import { Avatar, Button, Tag } from '@hanzo/ui';
@@ -51,6 +51,7 @@ import { checkoutUrl, money } from './lib/pay.js';
51
51
  import { cartUrl, charge, priced, usePlan, usePlans } from './lib/plans.js';
52
52
  import { createInvitation, inviteLink, setOrganizationProfile } from './lib/invite.js';
53
53
  import { createOrg, say } from './lib/org.js';
54
+ import { english } from './say.js';
54
55
  import { countSignup } from './lib/intent.js';
55
56
  import { BAD, mix } from './lib/mix.js';
56
57
  import { useRooms } from './host.js';
@@ -859,7 +860,7 @@ const home = () => `${window.location.origin}${where().home}`;
859
860
  * organization and returning Home.
860
861
  */
861
862
  function Plan({ org, members, onSwitch, outage, onRetry, seats: wanted = 1, setup = false, }) {
862
- const { t, locale } = useI18n();
863
+ const { t } = useI18n();
863
864
  const { plan } = usePlan('team');
864
865
  const floor = Math.max(1, Number(plan?.limits?.minSeats ?? 1));
865
866
  // The count asked for, held above the floor: the floor arrives with the live
@@ -871,18 +872,18 @@ function Plan({ org, members, onSwitch, outage, onRetry, seats: wanted = 1, setu
871
872
  const yearly = plan ? charge(plan, 'year') : null;
872
873
  const each = term === 'year' && yearly ? yearly : monthly;
873
874
  const terms = [
874
- ['month', t('Monthly'), t('{price} / seat / month', { price: money(monthly, locale) })],
875
- ...(yearly ? [['year', t('Annual'), t('{price} / seat, billed once a year', { price: money(yearly, locale) })]] : []),
875
+ ['month', t('Monthly'), t('{price} / seat / month', { price: money(monthly) })],
876
+ ...(yearly ? [['year', t('Annual'), t('{price} / seat, billed once a year', { price: money(yearly) })]] : []),
876
877
  ];
877
878
  // What the seats come to, bold inside the sentence that adds them up.
878
- const total = (_jsx(Text, { fontWeight: "500", color: "$ink", children: term === 'year' ? t('{amount} a year', { amount: money(seats * each, locale) }) : t('{amount} a month', { amount: money(seats * each, locale) }) }));
879
+ const total = (_jsx(Text, { fontWeight: "500", color: "$ink", children: term === 'year' ? t('{amount} a year', { amount: money(seats * each) }) : t('{amount} a month', { amount: money(seats * each) }) }));
879
880
  const sum = term === 'year'
880
881
  ? seats === 1
881
- ? t('1 seat at {price} a year is {total}.', { price: money(each, locale), total })
882
- : t('{seats} seats at {price} a year is {total}.', { seats, price: money(each, locale), total })
882
+ ? t('1 seat at {price} a year is {total}.', { price: money(each), total })
883
+ : t('{seats} seats at {price} a year is {total}.', { seats, price: money(each), total })
883
884
  : seats === 1
884
- ? t('1 seat at {price} a month is {total}.', { price: money(each, locale), total })
885
- : t('{seats} seats at {price} a month is {total}.', { seats, price: money(each, locale), total });
885
+ ? t('1 seat at {price} a month is {total}.', { price: money(each), total })
886
+ : t('{seats} seats at {price} a month is {total}.', { seats, price: money(each), total });
886
887
  return (_jsx(Page, { label: t('Choose your plan'), children: _jsxs(Column, { children: [setup ? _jsx(Step, { at: 3, of: 3 }) : null, _jsx(Heading, { title: org, lead: 22.5, lede: outage
887
888
  ? t('Billing could not be read just now, so this team cannot open yet. That is ours to fix.')
888
889
  : plan
package/dist/Palette.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type Say } from '@hanzo/i18n';
3
2
  import { type Host } from '@hanzo/build';
4
3
  import { type ShortcutKeys } from '@hanzo/ui';
5
4
  import { type Place } from './lib/host.js';
6
5
  import { type Hit } from './seek.js';
6
+ import { type Say } from './say.js';
7
7
  /** A row: what it is called (in the reader's words), its glyph, where it lives, and what pressing it does. */
8
8
  export interface Action extends Hit {
9
9
  icon?: ReactNode;
package/dist/Palette.js CHANGED
@@ -28,7 +28,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
28
  // (`/v1/tool/mcp/servers`) and the agents (crew.tsx) arrive while the reader
29
29
  // types, and a read the palette closes on is aborted.
30
30
  import { useEffect, useMemo, useState } from 'react';
31
- import { isolate, english } from '@hanzo/i18n';
31
+ import { isolate } from '@hanzo/i18n';
32
32
  import { useI18n } from '@hanzo/i18n/react';
33
33
  import { BookOpen, Bot, Building2, CircleHelp, Clock, Code2, FlaskConical, FolderGit2, Gift, Keyboard, LogOut, MessageCircle, MessageSquare, Plug, Settings, Sparkles, SquarePen, SquareTerminal, SunMoon, Users, WandSparkles, } from 'lucide-react';
34
34
  import { useAi } from '@hanzo/ai/react';
@@ -50,6 +50,7 @@ import { tidy } from './lib/title.js';
50
50
  import { KEYS, legal, out, pages } from './help.js';
51
51
  import { site } from './where.js';
52
52
  import { find } from './seek.js';
53
+ import { english } from './say.js';
53
54
  const ICON = { size: 16, 'aria-hidden': true };
54
55
  const SKILLS = written({ kind: 'customize', tab: 'skills' });
55
56
  const CONNECTORS = written({ kind: 'customize', tab: 'connectors' });