@hanzo/app 0.3.54 → 0.3.56

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/Account.js CHANGED
@@ -288,7 +288,7 @@ export function Account({ host, narrow = false, above = false, onOrg, defaultAcc
288
288
  // Clear of the rail's mark (or the row) it opens from, and flush with its foot.
289
289
  offset: 8, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(XStack, { ref: (el) => {
290
290
  row.current = el instanceof HTMLElement ? el : null;
291
- }, render: "button", "data-slot": "me", "aria-label": t('Account: {name}', { name: [who, current].filter(Boolean).join(' · ') }), ...{ title: who }, width: narrow ? (above ? 44 : 36) : '100%', minH: narrow ? (above ? 44 : 36) : 48,
291
+ }, render: "button", "data-slot": "me", "aria-label": t('Account: {name}', { name: [who, current].filter(Boolean).join(' · ') }), width: narrow ? (above ? 44 : 36) : '100%', minH: narrow ? (above ? 44 : 36) : 48,
292
292
  // A thumb's 44 on a touch screen.
293
293
  $touchable: narrow ? { width: 44, minH: 44 } : undefined, px: narrow ? 0 : '$2', gap: "$2.5", rounded: narrow ? 999 : '$5', borderWidth: narrow && above ? 1 : 0, borderColor: narrow && above ? 'var(--border-strong)' : undefined, bg: narrow && above ? 'var(--pane-fill)' : undefined, items: "center", justify: narrow ? 'center' : 'flex-start', hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, cursor: "pointer", children: [_jsx(Face, { host: host, size: narrow ? (above ? 32 : 26) : 32 }), narrow ? null : (_jsxs(_Fragment, { children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, text: "start", children: who }), working ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, text: "start", children: working })) : null] }), isFree ? (_jsx(Button, { size: "xs", variant: "outline", "data-slot": "me-upgrade", px: "$2", py: "$0.5", rounded: "$3", onPress: (e) => {
294
294
  e?.stopPropagation?.();
package/dist/Gate.js CHANGED
@@ -61,7 +61,7 @@ import { site, where } from './where.js';
61
61
  const SETUP = 'hanzo:org:template';
62
62
  /** Checkout for a plan, coming back to this page. */
63
63
  function checkout(plan) {
64
- const origin = typeof window !== 'undefined' ? window.location.origin : 'https://hanzo.ai';
64
+ const origin = typeof window !== 'undefined' ? window.location.origin : 'https://hanzo.app';
65
65
  const path = typeof window !== 'undefined' ? window.location.pathname : '/chat';
66
66
  return checkoutUrl(plan.id, `${origin}${path}`);
67
67
  }
package/dist/Rail.js CHANGED
@@ -129,12 +129,13 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
129
129
  return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
130
130
  // As tall as the window and no taller: its marks scroll inside it (below), never the page.
131
131
  minH: 0,
132
- // The first mark stands at the pane's top edge, one head row high (HEAD), the account on the sidebar's foot (Sidebar's `pb`).
133
- pt: (HEAD - MARK) / 2, pb: "$2", gap: 4, shrink: 0, items: "center", $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", items: "center", gap: 4, width: "100%", "$platform-web": { scrollbarWidth: 'none' }, children: [_jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MARKS.chat.icon, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(MARKS.dev.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "rail-design", children: _jsx(MARKS.design.icon, { size: 18, "aria-hidden": true }) })), !anon && opened('studio') ? (_jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(MARKS.studio.icon, { size: 18, "aria-hidden": true }) })) : null, anon ? null : (_jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(MARKS.tabs.icon, { size: 18, "aria-hidden": true }) })), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(MARKS.library.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(MARKS.scheduled.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(MARKS.customize.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) })), betasDialog, !anon && rest.length ? (_jsx(DropdownMenu
132
+ // The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot by the
133
+ // same inset, so the account mirrors the sidebar's toggle across the rail.
134
+ pt: (HEAD - MARK) / 2, pb: (HEAD - MARK) / 2, gap: 4, shrink: 0, items: "center", $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2, pb: (TOUCH_HEAD - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", items: "center", gap: 4, width: "100%", "$platform-web": { scrollbarWidth: 'none' }, children: [_jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MARKS.chat.icon, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(MARKS.dev.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "rail-design", children: _jsx(MARKS.design.icon, { size: 18, "aria-hidden": true }) })), !anon && opened('studio') ? (_jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(MARKS.studio.icon, { size: 18, "aria-hidden": true }) })) : null, anon ? null : (_jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(MARKS.tabs.icon, { size: 18, "aria-hidden": true }) })), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(MARKS.library.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(MARKS.scheduled.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(MARKS.customize.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) })), betasDialog, !anon && rest.length ? (_jsx(DropdownMenu
134
135
  // Toward the content: right of the rail, left of it right to left.
135
136
  , {
136
137
  // Toward the content: right of the rail, left of it right to left.
137
- placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded: "$4", items: "center", justify: "center", cursor: "pointer", opacity: 0.62, hoverStyle: { bg: '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, $touchable: { width: 44, height: 44 }, children: _jsx(Ellipsis, { size: 18, "aria-hidden": true }) }), items: rest })) : null] }), anon ? (_jsxs(YStack, { gap: 4, items: "center", pb: 4, children: [_jsx(Mark, { label: t('See plans and pricing'), "data-slot": "anon-pricing", onPress: () => {
138
+ placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded: "$4", items: "center", justify: "center", cursor: "pointer", opacity: 0.62, hoverStyle: { bg: '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, $touchable: { width: 44, height: 44 }, children: _jsx(Ellipsis, { size: 18, "aria-hidden": true }) }), items: rest })) : null] }), anon ? (_jsxs(YStack, { gap: 4, items: "center", children: [_jsx(Mark, { label: t('See plans and pricing'), "data-slot": "anon-pricing", onPress: () => {
138
139
  if (typeof window !== 'undefined')
139
140
  window.location.assign('/pricing');
140
141
  }, children: _jsx(Sparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Help'), "data-slot": "anon-help", onPress: () => {
package/dist/lib/api.js CHANGED
@@ -19,7 +19,7 @@
19
19
  * production address was frozen into the bundle before a browser could say
20
20
  * where it was. Called at request time it answers for the page that is open.
21
21
  */
22
- import { devnet, guest, team } from './host.js';
22
+ import { apex, devnet, guest, team } from './host.js';
23
23
  import { where } from '../where.js';
24
24
  /**
25
25
  * The devnet's gateway and identity. A page on a devnet host (`devnet()` in
@@ -41,11 +41,11 @@ export function api() {
41
41
  return set.replace(/\/+$/, '');
42
42
  if (typeof window !== 'undefined') {
43
43
  const host = window.location.hostname;
44
- // The shipped site is served from an origin the gateway already admits, so
45
- // there the absolute address stands and no proxy is involved. hanzo.team,
46
- // hanzo.bot and the Sites plane's `<slug>.hanzo.app` aliases serve this same
47
- // export and are admitted the same way; none of them has a /v1 of its own.
48
- if (host === 'hanzo.ai' || host.endsWith('.hanzo.ai') || team(host) || host === 'hanzo.bot' || guest(host))
44
+ // The shipped app is served from an origin the gateway already admits, so
45
+ // there the absolute address stands and no proxy is involved. hanzo.ai,
46
+ // hanzo.team, hanzo.bot and the Sites plane's `<slug>.hanzo.app` aliases
47
+ // serve this same export and are admitted the same way.
48
+ if (apex(host) || host === 'hanzo.ai' || host.endsWith('.hanzo.ai') || team(host) || host === 'hanzo.bot' || guest(host))
49
49
  return 'https://api.hanzo.ai';
50
50
  return window.location.origin;
51
51
  }
package/dist/lib/betas.js CHANGED
@@ -49,7 +49,9 @@ export const BETAS = [
49
49
  { id: 'search', name: 'Search', line: phrase('Keyword and meaning in one query'), group: 'Data', href: `${PLATFORM}/search` },
50
50
  { id: 'world', name: 'World', line: phrase('A live map of every model and AI workload'), group: 'Data', href: 'https://world.hanzo.ai' },
51
51
  { id: 'crawl', name: 'Crawl', line: phrase('Turn a website into clean Markdown'), group: 'Data', href: `${PLATFORM}/crawl` },
52
+ { id: 'notebook', name: 'Notebook', line: phrase('Shared live Python, R and SQL notebooks connected to Hanzo Science agents'), group: 'Data', href: '/science?view=notebook' },
52
53
  { id: 'workspace', name: 'Google Workspace', line: phrase('Drive, Docs, Sheets, Gmail and Calendar for the assistant, read and write'), group: 'Data' },
54
+ { id: 'science', name: 'Science', line: phrase('AI research workbench for multi-agent literature review, auditable figures and live notebooks'), group: 'Agents', href: '/science?workbench=1' },
53
55
  { id: 'flow', name: 'Flow', line: phrase('Visual node-graph canvas for agents, RAG pipelines and workflows'), group: 'Agents', href: '/flow' },
54
56
  { id: 'operative', name: 'Operative', line: phrase('A desktop in a container, driven by a model'), group: 'Agents' },
55
57
  { id: 'tasks', name: 'Tasks', line: phrase('Durable execution for long-running work'), group: 'Agents', href: `${PLATFORM}/tasks` },
@@ -92,9 +94,11 @@ export const opens = (id, flags, sudo, local = false) => {
92
94
  return true;
93
95
  if (local)
94
96
  return true;
97
+ if ((id === 'science' || id === 'notebook') && hanzoAdmin())
98
+ return true;
95
99
  if (id === 'studio' || id === 'flow')
96
100
  return false;
97
- return Boolean(sudo);
101
+ return Boolean(sudo || hanzoAdmin());
98
102
  };
99
103
  const ADMIN_BETA_ALL_KEY = 'hz_beta_admin_all';
100
104
  const ADMIN_BETA_FLAG_PREFIX = 'hz_beta_admin_flag_';
@@ -50,7 +50,7 @@ export declare function door(): string;
50
50
  * Every signed-out door into the app is this one call: /chat, /dev and every
51
51
  * path under them, an app. The page is written down, and the browser goes to `to`,
52
52
  * which asks IAM for an existing session before it draws a form
53
- * (components/auth/panel.tsx `Gate`). On a `guest` host the same address is asked for on hanzo.ai instead. With no `to`
53
+ * (components/auth/panel.tsx `Gate`). On a `guest` host the same address is asked for on hanzo.app instead. With no `to`
54
54
  * the page is `door()`'s; a control that says "Sign in" names LOGIN.
55
55
  */
56
56
  export declare function enter(to?: string): void;
@@ -75,10 +75,12 @@ export declare function entry(to: string, here: string): string;
75
75
  */
76
76
  export declare function onward(search: string): string | undefined;
77
77
  /**
78
- * On a `guest` host, send this sign-in to `address` on hanzo.ai and report that
79
- * it left; anywhere else, do nothing and report false so the caller signs in
80
- * here. A guest host cannot finish a sign-in (no client lists its callback), so
81
- * starting one there only reaches IAM's refusal.
78
+ * Send this sign-in to `address` on hanzo.app, the app's host, and report that
79
+ * it left, from a host that cannot start one for itself: a `guest` (no client
80
+ * lists its callback), and hanzo.ai opened with no app's authorize request in
81
+ * its address, where a session would land on the site rather than in the app.
82
+ * hanzo.app starts its own request and comes back to hanzo.ai's page with it.
83
+ * Anywhere else, do nothing and report false so the caller signs in here.
82
84
  */
83
85
  export declare function handoff(address: string): boolean;
84
86
  /**
@@ -19,7 +19,7 @@
19
19
  * person who cannot be sent back to their page must still be signed in, so a
20
20
  * refusal degrades to the default and never to an exception.
21
21
  */
22
- import { apex, guest, SIGNIN } from "./host.js";
22
+ import { apex, GET, guest, signs } from "./host.js";
23
23
  import { SHARED } from "./share.js";
24
24
  import { where } from "../where.js";
25
25
  /** The default on the apex: `/`, which takes anyone signed in to the app, in
@@ -110,7 +110,7 @@ export function door() {
110
110
  * Every signed-out door into the app is this one call: /chat, /dev and every
111
111
  * path under them, an app. The page is written down, and the browser goes to `to`,
112
112
  * which asks IAM for an existing session before it draws a form
113
- * (components/auth/panel.tsx `Gate`). On a `guest` host the same address is asked for on hanzo.ai instead. With no `to`
113
+ * (components/auth/panel.tsx `Gate`). On a `guest` host the same address is asked for on hanzo.app instead. With no `to`
114
114
  * the page is `door()`'s; a control that says "Sign in" names LOGIN.
115
115
  */
116
116
  export function enter(to = door()) {
@@ -162,15 +162,21 @@ export function onward(search) {
162
162
  return next && safe(next, "") === next ? next : undefined;
163
163
  }
164
164
  /**
165
- * On a `guest` host, send this sign-in to `address` on hanzo.ai and report that
166
- * it left; anywhere else, do nothing and report false so the caller signs in
167
- * here. A guest host cannot finish a sign-in (no client lists its callback), so
168
- * starting one there only reaches IAM's refusal.
165
+ * Send this sign-in to `address` on hanzo.app, the app's host, and report that
166
+ * it left, from a host that cannot start one for itself: a `guest` (no client
167
+ * lists its callback), and hanzo.ai opened with no app's authorize request in
168
+ * its address, where a session would land on the site rather than in the app.
169
+ * hanzo.app starts its own request and comes back to hanzo.ai's page with it.
170
+ * Anywhere else, do nothing and report false so the caller signs in here.
169
171
  */
170
172
  export function handoff(address) {
171
- if (typeof window === "undefined" || !guest(window.location.hostname))
173
+ if (typeof window === "undefined")
172
174
  return false;
173
- window.location.assign(SIGNIN + address);
175
+ const host = window.location.hostname;
176
+ const asked = new URLSearchParams(address.split("#")[0].split("?")[1] ?? "").has("client_id");
177
+ if (!guest(host) && !(signs(host) && !asked))
178
+ return false;
179
+ window.location.assign(GET + address);
174
180
  return true;
175
181
  }
176
182
  /**
@@ -176,7 +176,7 @@ export declare function resume(): string;
176
176
  * app added there lives on hanzo.team unless the apex names it above.
177
177
  */
178
178
  export declare const APPS: readonly string[];
179
- /** The apex's hosts, where the app is served and the workspace's apps are not. */
179
+ /** The app's host, where it is served and signs people in, and the workspace's apps are not. hanzo.ai is the signed-out site. */
180
180
  export declare const APEX: readonly string[];
181
181
  /** Whether a host is the apex. */
182
182
  export declare const apex: (hostname: string) => boolean;
@@ -187,33 +187,37 @@ export declare function leaves(address: string): boolean;
187
187
  export { APPS as ROOMS, leaves as room };
188
188
  /**
189
189
  * Where an address belongs when it is asked for on `hostname`: on a `guest`
190
- * alias, the same address on hanzo.ai, because every app signs in and a guest
191
- * host cannot; on the apex, the same app and query on the workspace; otherwise
192
- * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
190
+ * host, the same address on hanzo.app, the app's host, because every app signs
191
+ * in and a guest host cannot; on the apex, the same app and query on the
192
+ * workspace; otherwise null. Home is the workspace's root, so /home?channel=x
193
+ * lands on /?channel=x.
193
194
  */
194
195
  export declare const away: (hostname: string, address: string) => string | null;
195
- /** Where a sign-in started on a `guest` host is finished. */
196
+ /**
197
+ * Where Hanzo signs in: hanzo.ai's own page. The app's host, hanzo.app, keeps
198
+ * its session and visits it (`VISITS`): it leaves with its own authorize
199
+ * request, hanzo.ai's page finishes it, and the code comes back to hanzo.app.
200
+ */
196
201
  export declare const SIGNIN = "https://hanzo.ai";
202
+ /** Whether a host is the one Hanzo signs in on. */
203
+ export declare const signs: (hostname: string) => boolean;
197
204
  /**
198
205
  * The Hanzo App, to get: the page with Download, Install CLI and Open in web.
199
206
  * It is this export's /app, served as the root of hanzo.app (universe
200
- * static-sites `hanzo-app`), so it is linked by that address and hanzo.ai/app
201
- * forwards there.
207
+ * static-sites `hanzo-app`), so it is linked by that address.
202
208
  */
203
209
  export declare const GET = "https://hanzo.app";
204
210
  /**
205
- * The app, opened from another host: the chat at hanzo.ai/chat. A reader who
206
- * is signed out is asked to sign in there, on hanzo.ai's own page, and lands
207
- * back in the chat.
211
+ * The app, opened from another host: the chat at hanzo.app/chat. A reader who
212
+ * is signed out signs in on hanzo.ai's page and lands back in the chat.
208
213
  */
209
- export declare const WEB = "https://hanzo.ai/chat";
214
+ export declare const WEB = "https://hanzo.app/chat";
210
215
  /**
211
- * Whether a host serves this export and signs nobody in: hanzo.app, whose root
212
- * is the page above; every `<slug>.hanzo.app` alias the Sites plane serves it
213
- * at; and hanzo.chat, whose root is /forward. hanzo.app is a namespace
214
- * customers publish into and hanzo.chat is only an address for the chat, so no
215
- * sign-in runs under either: every address that needs one is the same address
216
- * on hanzo.ai.
216
+ * Whether a host serves this export and signs nobody in: every `<slug>.hanzo.app`
217
+ * alias the Sites plane serves it at, and hanzo.chat, whose root is /forward.
218
+ * `<slug>.hanzo.app` is a namespace customers publish into and hanzo.chat is
219
+ * only an address for the chat, so no sign-in runs under either: every address
220
+ * is the same address on hanzo.app.
217
221
  */
218
222
  export declare const guest: (hostname: string) => boolean;
219
223
  /**
package/dist/lib/host.js CHANGED
@@ -288,8 +288,8 @@ const KEPT = new Set(['/chat', '/chat/shared', '/dev']);
288
288
  * app added there lives on hanzo.team unless the apex names it above.
289
289
  */
290
290
  export const APPS = ROUTES.filter((path) => !KEPT.has(path) && path !== SETTINGS && !path.startsWith(`${SETTINGS}/`));
291
- /** The apex's hosts, where the app is served and the workspace's apps are not. */
292
- export const APEX = ['hanzo.ai', 'www.hanzo.ai'];
291
+ /** The app's host, where it is served and signs people in, and the workspace's apps are not. hanzo.ai is the signed-out site. */
292
+ export const APEX = ['hanzo.app'];
293
293
  /** Whether a host is the apex. */
294
294
  export const apex = (hostname) => APEX.includes(hostname);
295
295
  /** Whether a host is the workspace's own, where every app asks for a paid plan. */
@@ -302,42 +302,46 @@ export function leaves(address) {
302
302
  export { APPS as ROOMS, leaves as room };
303
303
  /**
304
304
  * Where an address belongs when it is asked for on `hostname`: on a `guest`
305
- * alias, the same address on hanzo.ai, because every app signs in and a guest
306
- * host cannot; on the apex, the same app and query on the workspace; otherwise
307
- * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
305
+ * host, the same address on hanzo.app, the app's host, because every app signs
306
+ * in and a guest host cannot; on the apex, the same app and query on the
307
+ * workspace; otherwise null. Home is the workspace's root, so /home?channel=x
308
+ * lands on /?channel=x.
308
309
  */
309
310
  export const away = (hostname, address) => {
310
311
  if (guest(hostname))
311
- return SIGNIN + address;
312
+ return GET + address;
312
313
  if (!apex(hostname) || !leaves(address))
313
314
  return null;
314
315
  const home = address.match(/^\/home\/?(?=[?#]|$)/);
315
316
  return home ? `${WORKSPACE}/${address.slice(home[0].length)}` : `${WORKSPACE}${address}`;
316
317
  };
317
- /** Where a sign-in started on a `guest` host is finished. */
318
+ /**
319
+ * Where Hanzo signs in: hanzo.ai's own page. The app's host, hanzo.app, keeps
320
+ * its session and visits it (`VISITS`): it leaves with its own authorize
321
+ * request, hanzo.ai's page finishes it, and the code comes back to hanzo.app.
322
+ */
318
323
  export const SIGNIN = 'https://hanzo.ai';
324
+ /** Whether a host is the one Hanzo signs in on. */
325
+ export const signs = (hostname) => hostname === 'hanzo.ai' || hostname === 'www.hanzo.ai';
319
326
  /**
320
327
  * The Hanzo App, to get: the page with Download, Install CLI and Open in web.
321
328
  * It is this export's /app, served as the root of hanzo.app (universe
322
- * static-sites `hanzo-app`), so it is linked by that address and hanzo.ai/app
323
- * forwards there.
329
+ * static-sites `hanzo-app`), so it is linked by that address.
324
330
  */
325
331
  export const GET = 'https://hanzo.app';
326
332
  /**
327
- * The app, opened from another host: the chat at hanzo.ai/chat. A reader who
328
- * is signed out is asked to sign in there, on hanzo.ai's own page, and lands
329
- * back in the chat.
333
+ * The app, opened from another host: the chat at hanzo.app/chat. A reader who
334
+ * is signed out signs in on hanzo.ai's page and lands back in the chat.
330
335
  */
331
- export const WEB = `${SIGNIN}${CHAT}`;
336
+ export const WEB = `${GET}${CHAT}`;
332
337
  /**
333
- * Whether a host serves this export and signs nobody in: hanzo.app, whose root
334
- * is the page above; every `<slug>.hanzo.app` alias the Sites plane serves it
335
- * at; and hanzo.chat, whose root is /forward. hanzo.app is a namespace
336
- * customers publish into and hanzo.chat is only an address for the chat, so no
337
- * sign-in runs under either: every address that needs one is the same address
338
- * on hanzo.ai.
338
+ * Whether a host serves this export and signs nobody in: every `<slug>.hanzo.app`
339
+ * alias the Sites plane serves it at, and hanzo.chat, whose root is /forward.
340
+ * `<slug>.hanzo.app` is a namespace customers publish into and hanzo.chat is
341
+ * only an address for the chat, so no sign-in runs under either: every address
342
+ * is the same address on hanzo.app.
339
343
  */
340
- export const guest = (hostname) => hostname === 'hanzo.app' || hostname.endsWith('.hanzo.app') || hostname === 'hanzo.chat';
344
+ export const guest = (hostname) => hostname.endsWith('.hanzo.app') || hostname === 'hanzo.chat';
341
345
  /** The devnet's hosts are one label under hanzo.ai ending in `-dev`: app-dev, api-dev, id-dev. */
342
346
  const DEVNET = '-dev.hanzo.ai';
343
347
  /**
@@ -357,20 +361,20 @@ export function devnet(hostname) {
357
361
  }
358
362
  /**
359
363
  * The hosts that answer IAM's sign-in and sign-out calls on their own origin:
360
- * hanzo.ai, where Hanzo signs in (universe static-sites `iam-on-hanzo-ai` and
361
- * cloud.yaml `iam-signin`), testnet's test.hanzo.ai, and the dev server's /v1
362
- * proxy.
364
+ * hanzo.ai, where Hanzo signs in (universe static-sites `hanzo-ai`'s /v1/iam
365
+ * routes), hanzo.app (its /v1 is the cloud API, hanzo-domains `v1-hanzo-app`),
366
+ * testnet's test.hanzo.ai, and the dev server's /v1 proxy.
363
367
  */
364
- const ANSWERS = new Set([...APEX, 'test.hanzo.ai', 'localhost', '127.0.0.1']);
368
+ const ANSWERS = new Set(['hanzo.ai', 'www.hanzo.ai', ...APEX, 'test.hanzo.ai', 'localhost', '127.0.0.1']);
365
369
  /**
366
370
  * The hosts this export is served on that keep a session of their own and sign
367
371
  * in on hanzo.ai: a person signed out there is sent to hanzo.ai/login carrying
368
372
  * the host's OWN authorize request (its callback, its PKCE challenge), which
369
373
  * hanzo.ai's page finishes, and the code comes back to the host's
370
374
  * /auth/callback. One sign-in page for Hanzo, and nobody types a credential on
371
- * these hosts.
375
+ * these hosts. hanzo.app, the app's own host, is one.
372
376
  */
373
- const VISITS = new Set(['cloud.hanzo.ai', 'hanzo.bot', 'bot.hanzo.ai']);
377
+ const VISITS = new Set([...APEX, 'cloud.hanzo.ai', 'hanzo.bot', 'bot.hanzo.ai']);
374
378
  /** Whether a host signs in on hanzo.ai with its own request (`VISITS`). */
375
379
  export const visits = (hostname) => VISITS.has(hostname);
376
380
  /**
@@ -16,8 +16,8 @@
16
16
  * page). The opener also reads the popup's address itself once it is back on
17
17
  * this origin, and closes it, so a popup that cannot close itself still does.
18
18
  */
19
- /** The return page the connect names: hanzo.ai's Settings → Integrations, registered with the API. */
20
- export declare const RETURN = "https://hanzo.ai/?at=-/settings/integrations";
19
+ /** The return page the connect names: hanzo.app's Settings → Integrations, registered with the API. */
20
+ export declare const RETURN = "https://hanzo.app/?at=-/settings/integrations";
21
21
  /** The message, channel and storage key one answer travels by. */
22
22
  export declare const RETURNED = "hanzo-oauth-return";
23
23
  /** What the provider answered. */
package/dist/lib/oauth.js CHANGED
@@ -16,8 +16,8 @@
16
16
  * page). The opener also reads the popup's address itself once it is back on
17
17
  * this origin, and closes it, so a popup that cannot close itself still does.
18
18
  */
19
- /** The return page the connect names: hanzo.ai's Settings → Integrations, registered with the API. */
20
- export const RETURN = 'https://hanzo.ai/?at=-/settings/integrations';
19
+ /** The return page the connect names: hanzo.app's Settings → Integrations, registered with the API. */
20
+ export const RETURN = 'https://hanzo.app/?at=-/settings/integrations';
21
21
  /** The message, channel and storage key one answer travels by. */
22
22
  export const RETURNED = 'hanzo-oauth-return';
23
23
  /** The answer a return page's query carries, or null when it carries none. */
package/dist/lib/pay.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * address. Absolute, because this export also serves cloud.hanzo.ai and
17
17
  * hanzo.bot, and the checkout lives on hanzo.ai.
18
18
  */
19
- export declare const BILLING_URL = "https://hanzo.ai/pay";
19
+ export declare const BILLING_URL = "https://hanzo.app/pay";
20
20
  /**
21
21
  * The devnet's checkout: the same /pay mount on the devnet's site host, which
22
22
  * charges Square's sandbox through the devnet's cloud. A page on a devnet host
package/dist/lib/pay.js CHANGED
@@ -18,7 +18,7 @@ import { org } from "./session.js";
18
18
  * address. Absolute, because this export also serves cloud.hanzo.ai and
19
19
  * hanzo.bot, and the checkout lives on hanzo.ai.
20
20
  */
21
- export const BILLING_URL = "https://hanzo.ai/pay";
21
+ export const BILLING_URL = "https://hanzo.app/pay";
22
22
  /**
23
23
  * The devnet's checkout: the same /pay mount on the devnet's site host, which
24
24
  * charges Square's sandbox through the devnet's cloud. A page on a devnet host
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.3.54",
3
+ "version": "0.3.56",
4
4
  "description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",