@hanzo/app 0.2.56 → 0.2.57

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.
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) => new Date(seconds * 1000).toLocaleString(undefined, {
50
+ const when = (seconds, locale) => new Date(seconds * 1000).toLocaleString(locale, {
51
51
  month: 'short',
52
52
  day: 'numeric',
53
53
  hour: 'numeric',
@@ -55,13 +55,13 @@ const when = (seconds) => new Date(seconds * 1000).toLocaleString(undefined, {
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) {
58
+ function stamp(seconds, locale) {
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(undefined, sameDay ? { hour: 'numeric', minute: '2-digit' } : { month: 'short', day: 'numeric' });
64
+ return then.toLocaleString(locale, 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 } = 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))) })] }));
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))) })] }));
94
94
  }
95
95
  /** What is open, beside the list rather than instead of it. */
96
96
  function Reading({ room, reload, }) {
97
- const { t } = useI18n();
97
+ const { t, locale } = 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) }) })] }), _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, 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.') })) })] }));
144
144
  }
145
145
  function InboxGrip({ span, onSpan, }) {
146
146
  const { t, dir } = useI18n();
package/dist/Market.js CHANGED
@@ -16,6 +16,7 @@ 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';
19
20
  import { say } from './failure.js';
20
21
  import { ArrowUpRight, Check, Compass, Search } from 'lucide-react';
21
22
  import { Box, Text, XStack, YStack } from '@hanzo/ui';
@@ -51,10 +52,14 @@ function Mark({ listing }) {
51
52
  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() })) }));
52
53
  }
53
54
  function Card({ listing, installed, onInstall, busy, }) {
55
+ const { t } = useI18n();
54
56
  const canInstall = reachable(listing);
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."] }))] }));
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
+ }) }))] }));
56
60
  }
57
61
  export function Market({ scope }) {
62
+ const { t } = useI18n();
58
63
  const { client } = useAi();
59
64
  // SIGNED IN IS THE CREDENTIAL, NOT THE PROFILE. This gated on `user`, which is
60
65
  // the answer to a userinfo REQUEST — and `IamProvider` swallows that request's
@@ -135,16 +140,16 @@ export function Market({ scope }) {
135
140
  if (isLoading)
136
141
  return _jsx(Empty, { children: "\u00A0" });
137
142
  if (!signedIn)
138
- return _jsx(Empty, { children: "Sign in to browse agents you can add." });
143
+ return _jsx(Empty, { children: t('Sign in to browse agents you can add.') });
139
144
  if (failed)
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.'
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.')
143
148
  : ask
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`
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 })
147
152
  : ask
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))) })] }))] }));
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))) })] }))] }));
150
155
  }
package/dist/Meet.js CHANGED
@@ -5,37 +5,48 @@ 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';
8
9
  import { refused, speech, useTranscript, useVoice } from '@hanzo/voice';
9
10
  import { Face, voiceOf } from './cast.js';
11
+ import { useI18n } from '@hanzo/i18n/react';
10
12
  import { member } from './team.js';
11
13
  import { cleanForSpeech, speakAgent, stopAgentSpeech, AudioWave, useAgentSpeech } from './speech.js';
12
14
  import { GOOD } from './lib/mix.js';
13
15
  import { api } from './lib/api.js';
14
16
  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
+ };
15
25
  /** A core member as a meeting seats them: the team's name and part, the cast's voice. */
16
26
  const seated = (id) => {
17
27
  const one = member(id);
18
- return { id, name: one.name, role: one.role, voice: voiceOf(id) };
28
+ return { id, name: one.name, role: PARTS[id] ?? one.role, voice: voiceOf(id) };
19
29
  };
20
30
  export const AVAILABLE_MEETING_AGENTS = [
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') },
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') },
23
33
  seated('maya'),
24
34
  seated('des'),
25
35
  seated('vi'),
26
36
  seated('nora'),
27
37
  seated('einstein'),
28
- { id: 'zach', name: 'Zach', role: 'Quantitative Analyst', voice: voiceOf('zach') },
38
+ { id: 'zach', name: 'Zach', role: phrase('Quantitative Analyst'), voice: voiceOf('zach') },
29
39
  ];
30
40
  const DEFAULT_MEETINGS = [
31
41
  {
32
42
  id: 'meet-1',
33
- title: 'AI Platform Architecture & LLM Inference Sync',
43
+ title: phrase('AI Platform Architecture & LLM Inference Sync'),
34
44
  roomName: 'platform-architecture',
35
45
  time: '18:00 - 18:45',
36
- date: 'Today',
46
+ date: phrase('Today'),
37
47
  duration: '45m',
38
- host: 'Alex (You)',
48
+ host: phrase('{name} (You)'),
49
+ hostName: 'Alex',
39
50
  participants: ['Alex', 'Zach'],
40
51
  agents: ['Hanzo Coder', 'Vi'],
41
52
  botInvited: true,
@@ -43,12 +54,12 @@ const DEFAULT_MEETINGS = [
43
54
  },
44
55
  {
45
56
  id: 'meet-2',
46
- title: 'Research Review',
57
+ title: phrase('Research Review'),
47
58
  roomName: 'research-review',
48
59
  time: '20:00 - 21:00',
49
- date: 'Today',
60
+ date: phrase('Today'),
50
61
  duration: '60m',
51
- host: 'Research',
62
+ host: phrase('Research'),
52
63
  participants: ['Alex', 'Research Team'],
53
64
  agents: ['Hanzo Researcher', 'Maya'],
54
65
  botInvited: true,
@@ -56,12 +67,12 @@ const DEFAULT_MEETINGS = [
56
67
  },
57
68
  {
58
69
  id: 'meet-3',
59
- title: 'Security & Compliance Sync',
70
+ title: phrase('Security & Compliance Sync'),
60
71
  roomName: 'security-sync',
61
72
  time: '11:00 - 11:30',
62
- date: 'Tomorrow',
73
+ date: phrase('Tomorrow'),
63
74
  duration: '30m',
64
- host: 'Security',
75
+ host: phrase('Security'),
65
76
  participants: ['Alex', 'Core Developers'],
66
77
  agents: ['Des', 'Einstein'],
67
78
  botInvited: false,
@@ -74,9 +85,9 @@ const DEFAULT_MEETINGS = [
74
85
  * `useIamToken`) through the one API host; a refusal is thrown with what the
75
86
  * gateway said, never answered with a line nobody wrote.
76
87
  */
77
- async function generateAgentMeetingResponse(prompt, agentName, token) {
88
+ async function generateAgentMeetingResponse(prompt, agentName, token, t) {
78
89
  if (!token)
79
- throw new Error('Sign in to ask the co-pilot.');
90
+ throw new Error(t('Sign in to ask the co-pilot.'));
80
91
  const res = await fetch(`${api()}/v1/chat/completions`, {
81
92
  method: 'POST',
82
93
  headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
@@ -93,16 +104,17 @@ async function generateAgentMeetingResponse(prompt, agentName, token) {
93
104
  }),
94
105
  });
95
106
  if (!res.ok)
96
- throw new Error(`The co-pilot is unavailable (${res.status}).`);
107
+ throw new Error(t('The co-pilot is unavailable ({status}).', { status: res.status }));
97
108
  const data = await res.json();
98
109
  const text = data.choices?.[0]?.message?.content?.trim();
99
110
  if (!text)
100
- throw new Error('The co-pilot answered with nothing.');
111
+ throw new Error(t('The co-pilot answered with nothing.'));
101
112
  return text;
102
113
  }
103
114
  /** design's smallest rung (`--text-floor`, 10px), below gui's `$1`; gui's font size takes a rung or a number. */
104
115
  const FLOOR = 10;
105
116
  export function Meet() {
117
+ const { t, locale } = useI18n();
106
118
  const [activeMeetingRoom, setActiveMeetingRoom] = useState(null);
107
119
  const [roomInput, setRoomInput] = useState('');
108
120
  const [copied, setCopied] = useState(false);
@@ -201,7 +213,9 @@ export function Meet() {
201
213
  return;
202
214
  }
203
215
  setAudioTesting(true);
204
- speakAgent(`Welcome to Hanzo Meet. This is ${activeCoPilotAgent}'s voice. If you can hear this, your speakers are working.`, {
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
+ }), {
205
219
  agent: activeCoPilotAgent,
206
220
  token,
207
221
  onEnd: () => setAudioTesting(false),
@@ -229,51 +243,58 @@ export function Meet() {
229
243
  const transcriber = useTranscript({
230
244
  speech: ear,
231
245
  onPartial: setCaption,
232
- onSettled: (text) => setLiveNotes((prev) => [...prev, `${clock()}: You: ${text}`]),
246
+ onSettled: (text) => setLiveNotes((prev) => [...prev, t('{time}: You: {text}', { time: clock(locale), text })]),
233
247
  });
234
248
  const transcriberNote = transcriber.reason ?? (transcriber.refusal ? refused(transcriber.refusal) : null);
235
249
  const handleSpokenInput = useCallback(async (transcript) => {
236
- const time = clock();
237
- setLiveNotes((prev) => [...prev, `${time}: You (voice): ${transcript}`]);
250
+ const time = clock(locale);
251
+ setLiveNotes((prev) => [...prev, t('{time}: You (voice): {text}', { time, text: transcript })]);
238
252
  try {
239
- const reply = await generateAgentMeetingResponse(transcript, activeCoPilotAgent, token);
240
- setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} (AI): ${reply}`]);
253
+ const reply = await generateAgentMeetingResponse(transcript, activeCoPilotAgent, token, t);
254
+ setLiveNotes((prev) => [...prev, t('{time}: {agent} (AI): {reply}', { time, agent: activeCoPilotAgent, reply })]);
241
255
  void handsFreeSay(cleanForSpeech(reply), voiceOf(activeCoPilotAgent));
242
256
  }
243
257
  catch (err) {
244
- setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} did not answer: ${err.message}`]);
258
+ setLiveNotes((prev) => [
259
+ ...prev,
260
+ t('{time}: {agent} did not answer: {reason}', { time, agent: activeCoPilotAgent, reason: err.message }),
261
+ ]);
245
262
  }
246
- }, [activeCoPilotAgent, token, handsFreeSay]);
263
+ }, [activeCoPilotAgent, token, handsFreeSay, t, locale]);
247
264
  const handleAskAgent = async (e) => {
248
265
  e.preventDefault();
249
266
  const q = agentQuestion.trim();
250
267
  if (!q)
251
268
  return;
252
269
  setAgentQuestion('');
253
- const time = clock();
254
- setLiveNotes((prev) => [...prev, `${time}: You: ${q}`]);
270
+ const time = clock(locale);
271
+ setLiveNotes((prev) => [...prev, t('{time}: You: {text}', { time, text: q })]);
255
272
  try {
256
- const reply = await generateAgentMeetingResponse(q, activeCoPilotAgent, token);
257
- setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} (AI): ${reply}`]);
273
+ const reply = await generateAgentMeetingResponse(q, activeCoPilotAgent, token, t);
274
+ setLiveNotes((prev) => [...prev, t('{time}: {agent} (AI): {reply}', { time, agent: activeCoPilotAgent, reply })]);
258
275
  speak(reply, activeCoPilotAgent);
259
276
  }
260
277
  catch (err) {
261
- setLiveNotes((prev) => [...prev, `${time}: ${activeCoPilotAgent} did not answer: ${err.message}`]);
278
+ setLiveNotes((prev) => [
279
+ ...prev,
280
+ t('{time}: {agent} did not answer: {reason}', { time, agent: activeCoPilotAgent, reason: err.message }),
281
+ ]);
262
282
  }
263
283
  };
264
284
  // The briefing is the call's own notes, read aloud; with none there is nothing to brief.
265
285
  const handleReadBriefing = () => {
266
286
  if (!liveNotes.length)
267
287
  return;
268
- toggle(`Briefing for ${activeMeetingRoom || 'this call'}. ${liveNotes.join('. ')}`, activeCoPilotAgent);
288
+ const room = activeMeetingRoom || t('this call');
289
+ toggle(t('Briefing for {room}. {notes}', { room, notes: liveNotes.join('. ') }), activeCoPilotAgent);
269
290
  };
270
291
  // What the hands-free control says: why it cannot run, or that Hanzo's speech
271
292
  // refused and the browser stood in (or could not) — never silence.
272
293
  const handsFreeNote = handsFree.reason ?? (handsFree.refusal ? refused(handsFree.refusal) : null);
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: () => {
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: () => {
277
298
  stopAgentSpeech();
278
299
  // Leaving the call hangs up the hands-free conversation and
279
300
  // settles the transcript with it.
@@ -282,10 +303,10 @@ export function Meet() {
282
303
  if (transcriber.open)
283
304
  transcriber.toggle();
284
305
  setActiveMeetingRoom(null);
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) => {
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) => {
286
307
  const voice = voiceOf(agentName);
287
308
  const isThisSpeaking = (speaking || handsFree.state === 'speaking') && activeCoPilotAgent.toLowerCase() === agentName.toLowerCase();
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));
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));
289
310
  })] }, "grid")) }), botAssisting ? (_jsxs(YStack, { id: "meet-copilot", width: 360, minW: 360, bg: "$panel", borderLeftWidth: 1, borderLeftColor: "$borderColor", p: 16, gap: 12, "$max-md": {
290
311
  display: copilot ? 'flex' : 'none',
291
312
  position: 'absolute',
@@ -297,36 +318,45 @@ export function Meet() {
297
318
  minW: 0,
298
319
  z: 'var(--z-sheet)',
299
320
  borderLeftWidth: 0,
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: () => {
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: () => {
302
326
  const note = agentQuestion.trim();
303
327
  if (!note)
304
328
  return;
305
329
  setAgentQuestion('');
306
- setLiveNotes((prev) => [...prev, `${clock()}: You (note): ${note}`]);
307
- }, children: "+ Add Live Note" }), _jsx(Button, { variant: "primary", size: "sm", onClick: () => {
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: () => {
308
332
  const text = liveNotes.join('\n');
309
333
  navigator.clipboard.writeText(text);
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) => {
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) => {
311
337
  const isInvited = invitedAgents.includes(agent.name);
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": {
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": {
314
344
  shrink: 0,
315
345
  flexBasis: 'auto',
316
346
  borderLeftWidth: 0,
317
347
  borderTopWidth: 1,
318
348
  borderTopColor: '$borderColor',
319
349
  overflowX: 'hidden',
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: () => {
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: () => {
321
351
  if (m.agents) {
322
352
  setInvitedAgents(m.agents);
323
353
  if (m.agents[0])
324
354
  setActiveCoPilotAgent(m.agents[0]);
325
355
  }
326
356
  setActiveMeetingRoom(m.roomName);
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 })] }) })] })] })] }))] }));
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 })] }) })] })] })] }))] }));
328
358
  }
329
359
  /** A note's time, as the reader's clock shows it: 4:22 PM, never "4:22:". */
330
- function clock() {
331
- return new Date().toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
360
+ function clock(locale) {
361
+ return new Date().toLocaleTimeString(locale, { hour: 'numeric', minute: '2-digit' });
332
362
  }
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 } from '@hanzo/i18n';
33
+ import { phrase, english } 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,7 +51,6 @@ 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';
55
54
  import { countSignup } from './lib/intent.js';
56
55
  import { BAD, mix } from './lib/mix.js';
57
56
  import { useRooms } from './host.js';
@@ -860,7 +859,7 @@ const home = () => `${window.location.origin}${where().home}`;
860
859
  * organization and returning Home.
861
860
  */
862
861
  function Plan({ org, members, onSwitch, outage, onRetry, seats: wanted = 1, setup = false, }) {
863
- const { t } = useI18n();
862
+ const { t, locale } = useI18n();
864
863
  const { plan } = usePlan('team');
865
864
  const floor = Math.max(1, Number(plan?.limits?.minSeats ?? 1));
866
865
  // The count asked for, held above the floor: the floor arrives with the live
@@ -872,18 +871,18 @@ function Plan({ org, members, onSwitch, outage, onRetry, seats: wanted = 1, setu
872
871
  const yearly = plan ? charge(plan, 'year') : null;
873
872
  const each = term === 'year' && yearly ? yearly : monthly;
874
873
  const terms = [
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) })]] : []),
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) })]] : []),
877
876
  ];
878
877
  // What the seats come to, bold inside the sentence that adds them up.
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) }) }));
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) }) }));
880
879
  const sum = term === 'year'
881
880
  ? seats === 1
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 })
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 })
884
883
  : seats === 1
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 });
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 });
887
886
  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
888
887
  ? t('Billing could not be read just now, so this team cannot open yet. That is ours to fix.')
889
888
  : 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';
2
3
  import { type Host } from '@hanzo/build';
3
4
  import { type ShortcutKeys } from '@hanzo/ui';
4
5
  import { type Place } from './lib/host.js';
5
6
  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 } from '@hanzo/i18n';
31
+ import { isolate, english } 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,7 +50,6 @@ 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';
54
53
  const ICON = { size: 16, 'aria-hidden': true };
55
54
  const SKILLS = written({ kind: 'customize', tab: 'skills' });
56
55
  const CONNECTORS = written({ kind: 'customize', tab: 'connectors' });