@hanzo/app 0.3.54 → 0.3.55

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/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/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_';
@@ -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,32 @@ 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
190
+ * host, the same address on hanzo.app, because every app signs in and a guest
191
191
  * host cannot; on the apex, the same app and query on the workspace; otherwise
192
192
  * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
193
193
  */
194
194
  export declare const away: (hostname: string, address: string) => string | null;
195
- /** Where a sign-in started on a `guest` host is finished. */
196
- export declare const SIGNIN = "https://hanzo.ai";
195
+ /** Where a sign-in started on a `guest` host is finished: the app's own host. */
196
+ export declare const SIGNIN = "https://hanzo.app";
197
197
  /**
198
198
  * The Hanzo App, to get: the page with Download, Install CLI and Open in web.
199
199
  * 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.
200
+ * static-sites `hanzo-app`), so it is linked by that address.
202
201
  */
203
202
  export declare const GET = "https://hanzo.app";
204
203
  /**
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
204
+ * The app, opened from another host: the chat at hanzo.app/chat. A reader who
205
+ * is signed out is asked to sign in there, on hanzo.app's own page, and lands
207
206
  * back in the chat.
208
207
  */
209
- export declare const WEB = "https://hanzo.ai/chat";
208
+ export declare const WEB = "https://hanzo.app/chat";
210
209
  /**
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.
210
+ * Whether a host serves this export and signs nobody in: hanzo.ai, the
211
+ * signed-out site, while it still serves this export; every `<slug>.hanzo.app`
212
+ * alias the Sites plane serves it at; and hanzo.chat, whose root is /forward.
213
+ * `<slug>.hanzo.app` is a namespace customers publish into and hanzo.chat is
214
+ * only an address for the chat, so no sign-in runs under any of them: every
215
+ * address that needs one is the same address on hanzo.app.
217
216
  */
218
217
  export declare const guest: (hostname: string) => boolean;
219
218
  /**
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,7 +302,7 @@ 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
305
+ * host, the same address on hanzo.app, because every app signs in and a guest
306
306
  * host cannot; on the apex, the same app and query on the workspace; otherwise
307
307
  * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
308
308
  */
@@ -314,30 +314,29 @@ export const away = (hostname, address) => {
314
314
  const home = address.match(/^\/home\/?(?=[?#]|$)/);
315
315
  return home ? `${WORKSPACE}/${address.slice(home[0].length)}` : `${WORKSPACE}${address}`;
316
316
  };
317
- /** Where a sign-in started on a `guest` host is finished. */
318
- export const SIGNIN = 'https://hanzo.ai';
317
+ /** Where a sign-in started on a `guest` host is finished: the app's own host. */
318
+ export const SIGNIN = 'https://hanzo.app';
319
319
  /**
320
320
  * The Hanzo App, to get: the page with Download, Install CLI and Open in web.
321
321
  * 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.
322
+ * static-sites `hanzo-app`), so it is linked by that address.
324
323
  */
325
324
  export const GET = 'https://hanzo.app';
326
325
  /**
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
326
+ * The app, opened from another host: the chat at hanzo.app/chat. A reader who
327
+ * is signed out is asked to sign in there, on hanzo.app's own page, and lands
329
328
  * back in the chat.
330
329
  */
331
330
  export const WEB = `${SIGNIN}${CHAT}`;
332
331
  /**
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.
332
+ * Whether a host serves this export and signs nobody in: hanzo.ai, the
333
+ * signed-out site, while it still serves this export; every `<slug>.hanzo.app`
334
+ * alias the Sites plane serves it at; and hanzo.chat, whose root is /forward.
335
+ * `<slug>.hanzo.app` is a namespace customers publish into and hanzo.chat is
336
+ * only an address for the chat, so no sign-in runs under any of them: every
337
+ * address that needs one is the same address on hanzo.app.
339
338
  */
340
- export const guest = (hostname) => hostname === 'hanzo.app' || hostname.endsWith('.hanzo.app') || hostname === 'hanzo.chat';
339
+ export const guest = (hostname) => hostname === 'hanzo.ai' || hostname === 'www.hanzo.ai' || hostname.endsWith('.hanzo.app') || hostname === 'hanzo.chat';
341
340
  /** The devnet's hosts are one label under hanzo.ai ending in `-dev`: app-dev, api-dev, id-dev. */
342
341
  const DEVNET = '-dev.hanzo.ai';
343
342
  /**
@@ -357,16 +356,16 @@ export function devnet(hostname) {
357
356
  }
358
357
  /**
359
358
  * 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.
359
+ * hanzo.app, where Hanzo signs in (its /v1 is the cloud API, universe
360
+ * hanzo-domains `v1-hanzo-app`), testnet's test.hanzo.ai, and the dev server's
361
+ * /v1 proxy.
363
362
  */
364
363
  const ANSWERS = new Set([...APEX, 'test.hanzo.ai', 'localhost', '127.0.0.1']);
365
364
  /**
366
365
  * The hosts this export is served on that keep a session of their own and sign
367
- * in on hanzo.ai: a person signed out there is sent to hanzo.ai/login carrying
366
+ * in on hanzo.app: a person signed out there is sent to hanzo.app/login carrying
368
367
  * the host's OWN authorize request (its callback, its PKCE challenge), which
369
- * hanzo.ai's page finishes, and the code comes back to the host's
368
+ * hanzo.app's page finishes, and the code comes back to the host's
370
369
  * /auth/callback. One sign-in page for Hanzo, and nobody types a credential on
371
370
  * these hosts.
372
371
  */
@@ -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.55",
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",