@hanzo/app 0.2.58 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +8 -8
  2. package/dist/{Me.d.ts → Account.d.ts} +1 -1
  3. package/dist/{Me.js → Account.js} +3 -3
  4. package/dist/App.d.ts +2 -2
  5. package/dist/App.js +16 -16
  6. package/dist/{Top.d.ts → Bar.d.ts} +1 -1
  7. package/dist/{Top.js → Bar.js} +3 -3
  8. package/dist/Betas.js +1 -1
  9. package/dist/Board.js +4 -4
  10. package/dist/Chat.d.ts +4 -4
  11. package/dist/Chat.js +96 -96
  12. package/dist/Contacts.js +17 -15
  13. package/dist/Directory.js +7 -21
  14. package/dist/Drive.js +6 -6
  15. package/dist/{Orgs.d.ts → Gate.d.ts} +1 -1
  16. package/dist/{Orgs.js → Gate.js} +32 -32
  17. package/dist/{Chrome.d.ts → Header.d.ts} +1 -1
  18. package/dist/{Chrome.js → Header.js} +1 -1
  19. package/dist/Home.d.ts +3 -3
  20. package/dist/Home.js +30 -30
  21. package/dist/Inbox.js +29 -33
  22. package/dist/Meet.js +22 -22
  23. package/dist/Rail.js +6 -6
  24. package/dist/RightPane.js +2 -2
  25. package/dist/{Palette.d.ts → Search.d.ts} +1 -1
  26. package/dist/{Palette.js → Search.js} +1 -1
  27. package/dist/Settings.d.ts +3 -3
  28. package/dist/Settings.js +5 -5
  29. package/dist/SettingsPane.d.ts +2 -2
  30. package/dist/SettingsPane.js +5 -5
  31. package/dist/Setup.js +2 -2
  32. package/dist/Shell.d.ts +22 -31
  33. package/dist/Shell.js +167 -114
  34. package/dist/{Column.d.ts → Sidebar.d.ts} +1 -1
  35. package/dist/{Column.js → Sidebar.js} +5 -5
  36. package/dist/Support.js +2 -2
  37. package/dist/Talk.d.ts +3 -3
  38. package/dist/Talk.js +18 -18
  39. package/dist/TeamPreview.js +26 -26
  40. package/dist/TeamStory.js +1 -1
  41. package/dist/Usage.js +2 -2
  42. package/dist/Work.js +2 -2
  43. package/dist/bots/Bots.js +2 -2
  44. package/dist/bots/Lights.d.ts +1 -1
  45. package/dist/bots/Lights.js +1 -1
  46. package/dist/bots/api.d.ts +8 -7
  47. package/dist/bots/api.js +4 -4
  48. package/dist/bots/ink.js +3 -3
  49. package/dist/bots/kit.d.ts +2 -2
  50. package/dist/bots/kit.js +4 -4
  51. package/dist/bots/runtime.js +12 -12
  52. package/dist/cast.d.ts +14 -14
  53. package/dist/cast.js +12 -12
  54. package/dist/channels.d.ts +132 -0
  55. package/dist/{rooms.js → channels.js} +56 -55
  56. package/dist/conversations.d.ts +8 -8
  57. package/dist/conversations.js +18 -17
  58. package/dist/crew.d.ts +1 -1
  59. package/dist/crew.js +12 -12
  60. package/dist/dev.js +6 -6
  61. package/dist/failure.d.ts +2 -2
  62. package/dist/failure.js +6 -6
  63. package/dist/ground.d.ts +1 -1
  64. package/dist/ground.js +1 -1
  65. package/dist/help.d.ts +1 -1
  66. package/dist/help.js +2 -2
  67. package/dist/hint.d.ts +1 -1
  68. package/dist/hint.js +1 -1
  69. package/dist/host.d.ts +15 -15
  70. package/dist/host.js +13 -13
  71. package/dist/index.d.ts +5 -5
  72. package/dist/index.js +4 -4
  73. package/dist/lib/ai.js +1 -1
  74. package/dist/lib/api.d.ts +1 -1
  75. package/dist/lib/api.js +1 -1
  76. package/dist/lib/destination.d.ts +3 -3
  77. package/dist/lib/destination.js +3 -3
  78. package/dist/lib/home.d.ts +2 -2
  79. package/dist/lib/home.js +2 -2
  80. package/dist/lib/host.d.ts +17 -16
  81. package/dist/lib/host.js +19 -18
  82. package/dist/lib/hostname.d.ts +1 -1
  83. package/dist/lib/hostname.js +1 -1
  84. package/dist/lib/list.d.ts +1 -1
  85. package/dist/lib/list.js +1 -1
  86. package/dist/lib/models.js +1 -1
  87. package/dist/lib/org.d.ts +1 -1
  88. package/dist/lib/org.js +1 -1
  89. package/dist/lib/orgname.d.ts +1 -1
  90. package/dist/lib/orgname.js +1 -1
  91. package/dist/lib/session.d.ts +4 -4
  92. package/dist/lib/session.js +6 -6
  93. package/dist/lib/tier.d.ts +4 -4
  94. package/dist/lib/tier.js +5 -5
  95. package/dist/lib/tiers.d.ts +1 -1
  96. package/dist/lib/tiers.js +10 -10
  97. package/dist/lib/web.d.ts +1 -1
  98. package/dist/lib/web.js +1 -1
  99. package/dist/network.d.ts +18 -18
  100. package/dist/network.js +28 -28
  101. package/dist/open.d.ts +24 -22
  102. package/dist/open.js +19 -19
  103. package/dist/pane.d.ts +6 -6
  104. package/dist/pane.js +10 -10
  105. package/dist/roster.d.ts +2 -2
  106. package/dist/roster.js +1 -1
  107. package/dist/seek.js +1 -1
  108. package/dist/slide.d.ts +1 -1
  109. package/dist/slide.js +1 -1
  110. package/dist/span.js +1 -1
  111. package/dist/stars.d.ts +4 -4
  112. package/dist/stars.js +8 -10
  113. package/dist/tabs.d.ts +1 -1
  114. package/dist/tabs.js +1 -1
  115. package/dist/team.js +1 -1
  116. package/dist/thread.d.ts +3 -3
  117. package/dist/thread.js +4 -4
  118. package/dist/ui.d.ts +1 -1
  119. package/dist/ui.js +1 -1
  120. package/dist/where.d.ts +7 -7
  121. package/dist/where.js +2 -2
  122. package/dist/workday.d.ts +26 -26
  123. package/dist/workday.js +187 -187
  124. package/package.json +3 -3
  125. package/dist/Room.d.ts +0 -8
  126. package/dist/Room.js +0 -51
  127. package/dist/rooms.d.ts +0 -131
  128. /package/dist/lib/{rooms.json → routes.json} +0 -0
@@ -28,7 +28,7 @@ import { where } from "../where.js";
28
28
  * who cleared their storage mid-flight). */
29
29
  export const DEFAULT_DESTINATION = "/";
30
30
  /** Where a sign-in with no page to go back to lands on `hostname`: the app on
31
- * the apex, and the rooms' Home everywhere else. */
31
+ * the apex, and the shell's Home everywhere else. */
32
32
  export function landing(hostname) {
33
33
  return apex(hostname) ? DEFAULT_DESTINATION : where().home;
34
34
  }
@@ -108,7 +108,7 @@ export function door() {
108
108
  * Send this reader to sign in, and back to this page after.
109
109
  *
110
110
  * Every signed-out door into the app is this one call: /chat, /dev and every
111
- * path under them, a room. The page is written down, and the browser goes to `to`,
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
113
  * (components/auth/panel.tsx `Gate`). On a `guest` host the same address is asked for on hanzo.ai instead. With no `to`
114
114
  * the page is `door()`'s; a control that says "Sign in" names LOGIN.
@@ -135,7 +135,7 @@ export const CAMPAIGN = [
135
135
  * The sign-in address for a reader on `here`: `to`, with `here` as its `next=`
136
136
  * when that is a page worth coming back to, and the campaign `here` carries as
137
137
  * `to`'s own parameters. The page itself is written in the address too, so the
138
- * place (a room, a prompt in `?q=`) survives what sessionStorage does not: a new
138
+ * place (an app, a prompt in `?q=`) survives what sessionStorage does not: a new
139
139
  * tab, a pasted link.
140
140
  */
141
141
  export function entry(to, here) {
@@ -46,8 +46,8 @@ export interface App {
46
46
  * control and its verb are the same thing again.
47
47
  *
48
48
  * A PATH, not a URL. It is a page of this app, so it is reached the way every
49
- * other page of this app is, and the three doors that offer it (the empty
50
- * room's tile, the Create menu, the sidebar's row) all read this one line.
49
+ * other page of this app is, and the three doors that offer it (Home's Team
50
+ * tile, the Create menu, the sidebar's row) all read this one line.
51
51
  */
52
52
  export declare const invite: () => string;
53
53
  /** The org's projects, newest first. */
package/dist/lib/home.js CHANGED
@@ -32,8 +32,8 @@ import { settings } from './host.js';
32
32
  * control and its verb are the same thing again.
33
33
  *
34
34
  * A PATH, not a URL. It is a page of this app, so it is reached the way every
35
- * other page of this app is, and the three doors that offer it (the empty
36
- * room's tile, the Create menu, the sidebar's row) all read this one line.
35
+ * other page of this app is, and the three doors that offer it (Home's Team
36
+ * tile, the Create menu, the sidebar's row) all read this one line.
37
37
  */
38
38
  export const invite = () => site(settings('members'));
39
39
  /** The org's projects, newest first. */
@@ -5,9 +5,10 @@
5
5
  * hanzo.ai is the site for a stranger and the app for a member: the web app is
6
6
  * /chat and /dev once signed in, and `/` takes a member to the mode they were
7
7
  * last in. hanzo.team is the workspace, its own app (hanzo-apps/team) with Home
8
- * at its root. This export still carries the rooms, so a room asked for on the
9
- * apex is sent to the same room on hanzo.team, and `output: 'export'` has no
10
- * server to do that, so it is decided in the browser off the hostname, here.
8
+ * at its root. This export still carries the workspace's apps, so an app asked
9
+ * for on the apex is sent to the same app on hanzo.team, and `output: 'export'`
10
+ * has no server to do that, so it is decided in the browser off the hostname,
11
+ * here.
11
12
  *
12
13
  * Two predicates, one per product: `apex()` for the app, `team()` for the
13
14
  * workspace. Every host that is neither (localhost, a preview) draws the whole
@@ -116,7 +117,7 @@ export declare function place(pathname: string): Place | null;
116
117
  export declare function page(pathname: string): string;
117
118
  /**
118
119
  * Dev opened on one run, repository or site, from anywhere: every "Try Hanzo
119
- * Dev" link, a room's Dev, the console's "open in the builder". It signs a
120
+ * Dev" link, the rail's Dev, the console's "open in the builder". It signs a
120
121
  * stranger in on the way (app/(app)/dev/_door.tsx), and is reached through
121
122
  * `site()`: here on hanzo.ai, across to hanzo.ai from hanzo.team. Only a value
122
123
  * that is exactly a session id, a repository or a site's slug is carried;
@@ -130,7 +131,7 @@ export declare const dev: (ref?: string | null) => string;
130
131
  * history entry into `usePathname`, so the app follows the path it reads.
131
132
  */
132
133
  export declare function go(address: string, replace?: boolean): void;
133
- /** The host's router, as far as moving to a page goes (`useRooms().router`). */
134
+ /** The host's router, as far as moving to a page goes (`useHost().router`). */
134
135
  interface Router {
135
136
  push(href: string): void;
136
137
  replace(href: string): void;
@@ -146,25 +147,25 @@ export declare function remember(mode: Place['mode']): void;
146
147
  /** Where `/` takes a member: the mode they were last in, Chat when none is kept. */
147
148
  export declare function resume(): string;
148
149
  /**
149
- * The workspace's rooms: every route under app/(app) the apex does not keep.
150
+ * The workspace's apps: every route under app/(app) the apex does not keep.
150
151
  *
151
- * Derived from the tree `scripts/sync-rooms.mjs` walks, so a room added under
152
- * app/(app) lives on hanzo.team unless the apex names it above.
152
+ * Derived from the routes hanzo.ai keeps under app/(app) (routes.json), so an
153
+ * app added there lives on hanzo.team unless the apex names it above.
153
154
  */
154
- export declare const ROOMS: readonly string[];
155
- /** The apex's hosts, where the app is served and the rooms are not. */
155
+ export declare const APPS: readonly string[];
156
+ /** The apex's hosts, where the app is served and the workspace's apps are not. */
156
157
  export declare const APEX: readonly string[];
157
158
  /** Whether a host is the apex. */
158
159
  export declare const apex: (hostname: string) => boolean;
159
- /** Whether a host is the workspace's own, where every room asks for a paid plan. */
160
+ /** Whether a host is the workspace's own, where every app asks for a paid plan. */
160
161
  export declare const team: (hostname: string) => boolean;
161
- /** Whether an address on this export, query and all, opens one of the workspace's rooms. */
162
- export declare function room(address: string): boolean;
162
+ /** Whether an address on this export, query and all, opens one of the workspace's apps, which leave the apex. */
163
+ export declare function leaves(address: string): boolean;
163
164
  /**
164
165
  * Where an address belongs when it is asked for on `hostname`: on a `guest`
165
- * alias, the same address on hanzo.ai, because every room signs in and a guest
166
- * host cannot; on the apex, the same room and query on the workspace; otherwise
167
- * null. Home is the workspace's root, so /home?room=x lands on /?room=x.
166
+ * alias, the same address on hanzo.ai, because every app signs in and a guest
167
+ * host cannot; on the apex, the same app and query on the workspace; otherwise
168
+ * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
168
169
  */
169
170
  export declare const away: (hostname: string, address: string) => string | null;
170
171
  /** Where a sign-in started on a `guest` host is finished. */
package/dist/lib/host.js CHANGED
@@ -5,15 +5,16 @@
5
5
  * hanzo.ai is the site for a stranger and the app for a member: the web app is
6
6
  * /chat and /dev once signed in, and `/` takes a member to the mode they were
7
7
  * last in. hanzo.team is the workspace, its own app (hanzo-apps/team) with Home
8
- * at its root. This export still carries the rooms, so a room asked for on the
9
- * apex is sent to the same room on hanzo.team, and `output: 'export'` has no
10
- * server to do that, so it is decided in the browser off the hostname, here.
8
+ * at its root. This export still carries the workspace's apps, so an app asked
9
+ * for on the apex is sent to the same app on hanzo.team, and `output: 'export'`
10
+ * has no server to do that, so it is decided in the browser off the hostname,
11
+ * here.
11
12
  *
12
13
  * Two predicates, one per product: `apex()` for the app, `team()` for the
13
14
  * workspace. Every host that is neither (localhost, a preview) draws the whole
14
15
  * workspace and admits the way the apex does.
15
16
  */
16
- import APP from './rooms.json' with { type: 'json' };
17
+ import ROUTES from './routes.json' with { type: 'json' };
17
18
  import { href, parse, path, route, SESSION, SLUG } from '@hanzo/build/route';
18
19
  import { site } from '../where.js';
19
20
  import { BETAS } from './betas.js';
@@ -174,7 +175,7 @@ export function page(pathname) {
174
175
  const REPO = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}\/[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
175
176
  /**
176
177
  * Dev opened on one run, repository or site, from anywhere: every "Try Hanzo
177
- * Dev" link, a room's Dev, the console's "open in the builder". It signs a
178
+ * Dev" link, the rail's Dev, the console's "open in the builder". It signs a
178
179
  * stranger in on the way (app/(app)/dev/_door.tsx), and is reached through
179
180
  * `site()`: here on hanzo.ai, across to hanzo.ai from hanzo.team. Only a value
180
181
  * that is exactly a session id, a repository or a site's slug is carried;
@@ -237,33 +238,33 @@ export function resume() {
237
238
  /** The routes under app/(app) the apex keeps: the app — /chat, a chat shared by link, and /dev. */
238
239
  const KEPT = new Set(['/chat', '/chat/shared', '/dev']);
239
240
  /**
240
- * The workspace's rooms: every route under app/(app) the apex does not keep.
241
+ * The workspace's apps: every route under app/(app) the apex does not keep.
241
242
  *
242
- * Derived from the tree `scripts/sync-rooms.mjs` walks, so a room added under
243
- * app/(app) lives on hanzo.team unless the apex names it above.
243
+ * Derived from the routes hanzo.ai keeps under app/(app) (routes.json), so an
244
+ * app added there lives on hanzo.team unless the apex names it above.
244
245
  */
245
- export const ROOMS = APP.filter((path) => !KEPT.has(path) && path !== SETTINGS && !path.startsWith(`${SETTINGS}/`));
246
- /** The apex's hosts, where the app is served and the rooms are not. */
246
+ export const APPS = ROUTES.filter((path) => !KEPT.has(path) && path !== SETTINGS && !path.startsWith(`${SETTINGS}/`));
247
+ /** The apex's hosts, where the app is served and the workspace's apps are not. */
247
248
  export const APEX = ['hanzo.ai', 'www.hanzo.ai'];
248
249
  /** Whether a host is the apex. */
249
250
  export const apex = (hostname) => APEX.includes(hostname);
250
- /** Whether a host is the workspace's own, where every room asks for a paid plan. */
251
+ /** Whether a host is the workspace's own, where every app asks for a paid plan. */
251
252
  export const team = (hostname) => hostname === 'hanzo.team' || hostname === 'www.hanzo.team';
252
- /** Whether an address on this export, query and all, opens one of the workspace's rooms. */
253
- export function room(address) {
253
+ /** Whether an address on this export, query and all, opens one of the workspace's apps, which leave the apex. */
254
+ export function leaves(address) {
254
255
  const path = address.split(/[?#]/)[0].replace(/\/+$/, '') || '/';
255
- return ROOMS.includes(path);
256
+ return APPS.includes(path);
256
257
  }
257
258
  /**
258
259
  * Where an address belongs when it is asked for on `hostname`: on a `guest`
259
- * alias, the same address on hanzo.ai, because every room signs in and a guest
260
- * host cannot; on the apex, the same room and query on the workspace; otherwise
261
- * null. Home is the workspace's root, so /home?room=x lands on /?room=x.
260
+ * alias, the same address on hanzo.ai, because every app signs in and a guest
261
+ * host cannot; on the apex, the same app and query on the workspace; otherwise
262
+ * null. Home is the workspace's root, so /home?channel=x lands on /?channel=x.
262
263
  */
263
264
  export const away = (hostname, address) => {
264
265
  if (guest(hostname))
265
266
  return SIGNIN + address;
266
- if (!apex(hostname) || !room(address))
267
+ if (!apex(hostname) || !leaves(address))
267
268
  return null;
268
269
  const home = address.match(/^\/home\/?(?=[?#]|$)/);
269
270
  return home ? `${WORKSPACE}/${address.slice(home[0].length)}` : `${WORKSPACE}${address}`;
@@ -1 +1 @@
1
- export declare function useHost(): string;
1
+ export declare function useHostname(): string;
@@ -9,6 +9,6 @@ import { useSyncExternalStore } from 'react';
9
9
  * subscribes, because a page's host never changes under it.
10
10
  */
11
11
  const NEVER = () => () => { };
12
- export function useHost() {
12
+ export function useHostname() {
13
13
  return useSyncExternalStore(NEVER, () => window.location.hostname, () => '');
14
14
  }
@@ -2,7 +2,7 @@
2
2
  * A fetched list, as an array or nothing.
3
3
  *
4
4
  * `x ?? []` covers null and undefined and nothing else: a body that answers
5
- * `{rooms: {}}`, or an error object where a page was expected, passes through
5
+ * `{channels: {}}`, or an error object where a page was expected, passes through
6
6
  * it and the first `.filter` on it throws in render. A read from the network
7
7
  * is a boundary, and this is the one check at it.
8
8
  */
package/dist/lib/list.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * A fetched list, as an array or nothing.
3
3
  *
4
4
  * `x ?? []` covers null and undefined and nothing else: a body that answers
5
- * `{rooms: {}}`, or an error object where a page was expected, passes through
5
+ * `{channels: {}}`, or an error object where a page was expected, passes through
6
6
  * it and the first `.filter` on it throws in render. A read from the network
7
7
  * is a boundary, and this is the one check at it.
8
8
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * What a provider and a model are CALLED — the few naming rules the rooms draw
2
+ * What a provider and a model are CALLED — the few naming rules the apps draw
3
3
  * with. The catalogue itself (prices, contexts, the serving list) is the host's.
4
4
  */
5
5
  import { getOrgAndSlug } from './path.js';
package/dist/lib/org.d.ts CHANGED
@@ -30,7 +30,7 @@ export declare class Refusal extends Error {
30
30
  }
31
31
  /**
32
32
  * The words of any failure, for a toast or a line under a control: a refusal
33
- * this module worded in the reader's language (a room passes its `t`), the
33
+ * this module worded in the reader's language (an app passes its `t`), the
34
34
  * server's words as they came, else a plain line.
35
35
  */
36
36
  export declare const say: (e: unknown, t?: Say) => string;
package/dist/lib/org.js CHANGED
@@ -73,7 +73,7 @@ async function ask(path, init = {}) {
73
73
  const enc = encodeURIComponent;
74
74
  /**
75
75
  * The words of any failure, for a toast or a line under a control: a refusal
76
- * this module worded in the reader's language (a room passes its `t`), the
76
+ * this module worded in the reader's language (an app passes its `t`), the
77
77
  * server's words as they came, else a plain line.
78
78
  */
79
79
  export const say = (e, t = english) => e instanceof Refusal && e.source
@@ -21,7 +21,7 @@ export declare function slugify(name: string): string;
21
21
  * would. A name onboarding keeps exactly as typed: IAM's shape with single inner
22
22
  * hyphens, since onboarding folds a double one. The names IAM holds for the
23
23
  * platform are IAM's to refuse, in its own words. Said in the reader's language
24
- * through the room's `t`.
24
+ * through the app's `t`.
25
25
  */
26
26
  export declare function refusal(slug: string, t?: Say): string | null;
27
27
  /** Whether an organization answers what was typed: its name or its display name, in any case (IAM's `matches`). */
@@ -35,7 +35,7 @@ export function slugify(name) {
35
35
  * would. A name onboarding keeps exactly as typed: IAM's shape with single inner
36
36
  * hyphens, since onboarding folds a double one. The names IAM holds for the
37
37
  * platform are IAM's to refuse, in its own words. Said in the reader's language
38
- * through the room's `t`.
38
+ * through the app's `t`.
39
39
  */
40
40
  export function refusal(slug, t = english) {
41
41
  if (slug.length < 2)
@@ -186,13 +186,13 @@ export declare const ORG = "hanzo:org";
186
186
  export declare const PICKED = "hanzo:org:picked";
187
187
  /**
188
188
  * Work in this organization from now on: the SDK's selection, noted as picked
189
- * and announced. Noted here, so a choice made anywhere — the rooms' gate, the
189
+ * and announced. Noted here, so a choice made anywhere — the shell's gate, the
190
190
  * app's account menu — is one the gate does not ask for again.
191
191
  */
192
192
  export declare function pick(o: string): void;
193
- /** Fired on `window` to open the organization chooser over the room. */
193
+ /** Fired on `window` to open the organization chooser over the shell. */
194
194
  export declare const CHOOSE = "hanzo:org:choose";
195
- /** Open the chooser (`Orgs`): every organization of the person's, and every one for a SuperAdmin. */
195
+ /** Open the chooser (`Gate`): every organization of the person's, and every one for a SuperAdmin. */
196
196
  export declare function choose(): void;
197
197
  /**
198
198
  * Whether the signed-in person is a SUPERADMIN: @hanzo/iam's `superAdmin`, which is
@@ -215,7 +215,7 @@ export declare function assumed(): string | null;
215
215
  * (hanzoai/iam internal/oidc/masquerade.go). The answer is kept where the SDK
216
216
  * keeps the session, with its own expiry, so every request made from here on
217
217
  * carries it and the SDK's next refresh ends support mode by itself. The page
218
- * reloads so every room reads under it.
218
+ * reloads so every app reads under it.
219
219
  */
220
220
  export declare function support(org: string | null): Promise<void>;
221
221
  /**
@@ -27,7 +27,7 @@ const KEYS = [ACCESS, REFRESH, `${PREFIX}id_token`, EXPIRES];
27
27
  * The store the SDK keeps the session in: the host's (`configure({ session })`,
28
28
  * Hanzo Desktop's keychain, where no token reaches the webview's localStorage),
29
29
  * else this page's localStorage. Only the SDK's own keys are read from it; the
30
- * rooms' own choices (the organization, the person) stay in localStorage.
30
+ * apps' own choices (the organization, the person) stay in localStorage.
31
31
  */
32
32
  function tokens() {
33
33
  return where().session ?? window.localStorage;
@@ -413,7 +413,7 @@ export function org() {
413
413
  const chosen = window.localStorage.getItem(`${PREFIX}current_org`);
414
414
  if (chosen && mine.includes(chosen))
415
415
  return chosen;
416
- // ONE ORGANIZATION IS NOT A CHOICE. Answering null here until `Orgs` had
416
+ // ONE ORGANIZATION IS NOT A CHOICE. Answering null here until `Gate` had
417
417
  // recorded a pick meant every single-organization reader began UNSCOPED:
418
418
  // the client was built without X-Org-Id, the pick fired the event a moment
419
419
  // later, and useAi rebuilt the client — so every hook restarted after first
@@ -457,7 +457,7 @@ export const ORG = 'hanzo:org';
457
457
  export const PICKED = 'hanzo:org:picked';
458
458
  /**
459
459
  * Work in this organization from now on: the SDK's selection, noted as picked
460
- * and announced. Noted here, so a choice made anywhere — the rooms' gate, the
460
+ * and announced. Noted here, so a choice made anywhere — the shell's gate, the
461
461
  * app's account menu — is one the gate does not ask for again.
462
462
  */
463
463
  export function pick(o) {
@@ -470,9 +470,9 @@ export function pick(o) {
470
470
  }
471
471
  window.dispatchEvent(new Event(ORG));
472
472
  }
473
- /** Fired on `window` to open the organization chooser over the room. */
473
+ /** Fired on `window` to open the organization chooser over the shell. */
474
474
  export const CHOOSE = 'hanzo:org:choose';
475
- /** Open the chooser (`Orgs`): every organization of the person's, and every one for a SuperAdmin. */
475
+ /** Open the chooser (`Gate`): every organization of the person's, and every one for a SuperAdmin. */
476
476
  export function choose() {
477
477
  window.dispatchEvent(new Event(CHOOSE));
478
478
  }
@@ -502,7 +502,7 @@ export function assumed() {
502
502
  * (hanzoai/iam internal/oidc/masquerade.go). The answer is kept where the SDK
503
503
  * keeps the session, with its own expiry, so every request made from here on
504
504
  * carries it and the SDK's next refresh ends support mode by itself. The page
505
- * reloads so every room reads under it.
505
+ * reloads so every app reads under it.
506
506
  */
507
507
  export async function support(org) {
508
508
  const token = bearer();
@@ -115,7 +115,7 @@ export declare function transient(e: unknown): boolean;
115
115
  * What a read of the tier leaves held, and the tier the next read falls back
116
116
  * on. A read that answers is the tier. One that fails for a moment
117
117
  * (`transient`) keeps the tier this organization was last read at, so a reader
118
- * is not swapped out of a room they pay for by a re-read that did not answer
118
+ * is not swapped out of an app they pay for by a re-read that did not answer
119
119
  * (the gate reads again on focus and on return). Billing's refusal, or a
120
120
  * failure with nothing read for it yet, holds nothing and says why, which keeps
121
121
  * every gate shut; a refusal also forgets the tier read before it, so no later
@@ -133,7 +133,7 @@ export declare function hold(last: Read | null, org: string | null, read: {
133
133
  /**
134
134
  * The tier and the refusal held for `org`, and nothing for any other: what was
135
135
  * read for the organization a reader just left is never the one they are in,
136
- * so a switch from a paid organization to a team on Free shows no room while
136
+ * so a switch from a paid organization to a team on Free shows no app while
137
137
  * the new one is read.
138
138
  */
139
139
  export declare function standing(held: Held | null, org: string | null): {
@@ -157,7 +157,7 @@ export declare function useTier(enabled?: boolean, org?: string | null): {
157
157
  * The token's `orgs` claim names an organization and the reader's role in it
158
158
  * and says nothing of its kind; IAM keeps that on the row (`isPersonal`), and
159
159
  * `GET /v1/iam/organizations` answers the rows the caller belongs to. `null`
160
- * until it is answered for this organization. A refusal reads as `false`, so a
161
- * room that needs a plan goes on asking for one.
160
+ * until it is answered for this organization. A refusal reads as `false`, so an
161
+ * app that needs a plan goes on asking for one.
162
162
  */
163
163
  export declare function usePersonal(org: string | null, enabled?: boolean): boolean | null;
package/dist/lib/tier.js CHANGED
@@ -18,7 +18,7 @@
18
18
  * did not come from a response.
19
19
  *
20
20
  * The failure carries `status` because that is what `workspace/failure.ts`
21
- * reads first, so a refusal here already speaks the vocabulary every room uses.
21
+ * reads first, so a refusal here already speaks the vocabulary every app uses.
22
22
  * A second Refusal class would be a second vocabulary for the same event.
23
23
  */
24
24
  import { useCallback, useEffect, useRef, useState } from 'react';
@@ -166,7 +166,7 @@ export function transient(e) {
166
166
  * What a read of the tier leaves held, and the tier the next read falls back
167
167
  * on. A read that answers is the tier. One that fails for a moment
168
168
  * (`transient`) keeps the tier this organization was last read at, so a reader
169
- * is not swapped out of a room they pay for by a re-read that did not answer
169
+ * is not swapped out of an app they pay for by a re-read that did not answer
170
170
  * (the gate reads again on focus and on return). Billing's refusal, or a
171
171
  * failure with nothing read for it yet, holds nothing and says why, which keeps
172
172
  * every gate shut; a refusal also forgets the tier read before it, so no later
@@ -183,7 +183,7 @@ export function hold(last, org, read) {
183
183
  /**
184
184
  * The tier and the refusal held for `org`, and nothing for any other: what was
185
185
  * read for the organization a reader just left is never the one they are in,
186
- * so a switch from a paid organization to a team on Free shows no room while
186
+ * so a switch from a paid organization to a team on Free shows no app while
187
187
  * the new one is read.
188
188
  */
189
189
  export function standing(held, org) {
@@ -223,8 +223,8 @@ export function useTier(enabled = true, org = null) {
223
223
  * The token's `orgs` claim names an organization and the reader's role in it
224
224
  * and says nothing of its kind; IAM keeps that on the row (`isPersonal`), and
225
225
  * `GET /v1/iam/organizations` answers the rows the caller belongs to. `null`
226
- * until it is answered for this organization. A refusal reads as `false`, so a
227
- * room that needs a plan goes on asking for one.
226
+ * until it is answered for this organization. A refusal reads as `false`, so an
227
+ * app that needs a plan goes on asking for one.
228
228
  */
229
229
  export function usePersonal(org, enabled = true) {
230
230
  const [read, setRead] = useState(null);
@@ -3,7 +3,7 @@ export declare function useTiers(): Set<Tier>;
3
3
  /** The tiers this reader has chosen to hide, and the toggle that sets them.
4
4
  *
5
5
  * Entitlement is one question (`useTiers`), what you want to see is another. A
6
- * reader who may see a beta room can still put it away — the choice is theirs and
6
+ * reader who may see a beta app can still put it away — the choice is theirs and
7
7
  * lives with them, in this browser, never on the server. It starts empty: you see
8
8
  * what you are entitled to until you say otherwise. */
9
9
  export declare function useHidden(): [Set<Tier>, (tier: Tier) => void];
package/dist/lib/tiers.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  // Which preview tiers this identity may see.
3
3
  //
4
- // The rail offers Chat and Dev to everyone. The rooms after them — Inbox,
4
+ // The rail offers Chat and Dev to everyone. The apps after them — Inbox,
5
5
  // Agents, Tasks, Drive — are behind a tier, and a tier opens for exactly three
6
6
  // reasons, asked here and nowhere else:
7
7
  //
@@ -14,18 +14,18 @@
14
14
  // 2. An ALPHA or BETA org sees its own tier. Whether an org is in a cohort is
15
15
  // a targeting decision that lives on the cloud, so it is asked of the cloud:
16
16
  // POST /v1/flags answers the feature flags in force for this identity, and
17
- // `tier.alpha` / `tier.beta` open their rooms.
17
+ // `tier.alpha` / `tier.beta` open their apps.
18
18
  //
19
- // 3. A LOCALHOST BUILD sees every tier, because a room nobody can open is a
20
- // room nobody can work on. The check is the ORIGIN the page was served
19
+ // 3. A LOCALHOST BUILD sees every tier, because an app nobody can open is an
20
+ // app nobody can work on. The check is the ORIGIN the page was served
21
21
  // from, not an env var and not a build flag: a deployed host can never
22
22
  // satisfy it however it is configured, so this cannot leak an unfinished
23
- // room into production by being set wrong somewhere.
23
+ // app into production by being set wrong somewhere.
24
24
  //
25
25
  // 4. Nothing else. Signed out, still loading, or on any error the answer is the
26
26
  // empty set: the rail shows Chat and Dev and nothing more. Failing closed is
27
27
  // the point — a stranger meets the product the landing page describes, and a
28
- // flags outage cannot leak an unfinished room into it.
28
+ // flags outage cannot leak an unfinished app into it.
29
29
  //
30
30
  // The per-account SETTING that hides a tier the reader is entitled to lives with
31
31
  // the reader, not here — see `useHidden`. This answers what you MAY see; that
@@ -82,9 +82,9 @@ export function useTiers() {
82
82
  const ac = new AbortController();
83
83
  // The PostHog-shaped evaluate: a distinct_id and the person's org, answered
84
84
  // with `{ featureFlags: { … } }`. The bearer carries the principal, as on
85
- // every other read: no host the rooms are drawn on holds a session cookie
85
+ // every other read: no host the apps are drawn on holds a session cookie
86
86
  // for the API, so a cookie alone was answered 403 on every page. A refusal
87
- // still falls to the empty set, the signed-out room — the safe direction.
87
+ // still falls to the empty set, the signed-out rail — the safe direction.
88
88
  fetch(`${api()}/v1/flags`, {
89
89
  method: 'POST',
90
90
  headers: { 'content-type': 'application/json', ...scope() },
@@ -97,7 +97,7 @@ export function useTiers() {
97
97
  return () => ac.abort();
98
98
  }, [id, superAdmin, organizations]);
99
99
  // A platform admin, or a page served off a developer's own machine. Both see
100
- // every tier for the same reason: a room nobody can open is a room nobody can
100
+ // every tier for the same reason: an app nobody can open is an app nobody can
101
101
  // work on.
102
102
  if (superAdmin || here)
103
103
  return new Set(ALL);
@@ -112,7 +112,7 @@ const HIDDEN_KEY = 'hanzo.hidden-tiers';
112
112
  /** The tiers this reader has chosen to hide, and the toggle that sets them.
113
113
  *
114
114
  * Entitlement is one question (`useTiers`), what you want to see is another. A
115
- * reader who may see a beta room can still put it away — the choice is theirs and
115
+ * reader who may see a beta app can still put it away — the choice is theirs and
116
116
  * lives with them, in this browser, never on the server. It starts empty: you see
117
117
  * what you are entitled to until you say otherwise. */
118
118
  export function useHidden() {
package/dist/lib/web.d.ts CHANGED
@@ -27,7 +27,7 @@
27
27
  * WHERE WHAT WAS FOUND GOES: the end of the leading system turn, between two
28
28
  * markers no page can know. Not a system turn of its own, because the gateway's
29
29
  * text pipeline keeps only the last system turn it reads, and that would drop
30
- * the room's own; not the person's turn, because the router chooses the model
30
+ * the conversation's own; not the person's turn, because the router chooses the model
31
31
  * from the last user turn and would read the web pages as the question.
32
32
  *
33
33
  * A page is read only when the person points at it — never an address that
package/dist/lib/web.js CHANGED
@@ -27,7 +27,7 @@
27
27
  * WHERE WHAT WAS FOUND GOES: the end of the leading system turn, between two
28
28
  * markers no page can know. Not a system turn of its own, because the gateway's
29
29
  * text pipeline keeps only the last system turn it reads, and that would drop
30
- * the room's own; not the person's turn, because the router chooses the model
30
+ * the conversation's own; not the person's turn, because the router chooses the model
31
31
  * from the last user turn and would read the web pages as the question.
32
32
  *
33
33
  * A page is read only when the person points at it — never an address that
package/dist/network.d.ts CHANGED
@@ -12,16 +12,16 @@ interface Net {
12
12
  /** Set where the row is a capability rather than a brand. */
13
13
  glyph?: LucideIcon;
14
14
  }
15
- /** What we know about a channel key, including one nobody taught us — which is
16
- * a name and nothing else, and lands on the same initial Yahoo does. */
17
- export declare function of(channel: string): Net;
15
+ /** What we know about a transport key, including one nobody taught us — which
16
+ * is a name and nothing else, and lands on the same initial Yahoo does. */
17
+ export declare function of(transport: string): Net;
18
18
  /**
19
19
  * WHAT TO CALL THE SPEAKER.
20
20
  *
21
21
  * NOTHING THAT ARRIVES HERE CARRIES A NAME. `sender` is the network's own id
22
22
  * for the person — "U031THJJ7F1" on Slack, a snowflake on Discord, a GUID on
23
23
  * Teams — because that is what every adapter puts there; the envelope declares
24
- * a `Display` beside it (cloud apps/channels/envelope.go) and not one of the
24
+ * a `Display` beside it (the transport's envelope) and not one of the
25
25
  * five adapters fills it, so no name is stored and none is served.
26
26
  * `senderUser` is not the name either: it is the linked account's OIDC `sub`,
27
27
  * which IAM mints from a UUID, so it identifies a Hanzo account without saying
@@ -31,35 +31,35 @@ export declare function of(channel: string): Net;
31
31
  * "U031THJJ7F1" for what somebody calls themselves. So the id is MARKED as an
32
32
  * id — '@' is how every one of these networks writes a handle it has not
33
33
  * resolved — and it is kept, because it is the only thing that tells two
34
- * speakers apart. A room holds messages from many people (useInbox groups by
35
- * channel and room, never by sender), so dropping it renders every line of a
34
+ * speakers apart. A channel holds messages from many people (useInbox groups by
35
+ * transport and channel, never by sender), so dropping it renders every line of a
36
36
  * group identically and a reader cannot tell who said what. Only where no id
37
37
  * arrived at all is the network the one thing left to say. The day the
38
38
  * platform resolves a name, this is where it goes.
39
39
  */
40
- export declare const speaker: (channel: string, sender?: string) => string;
41
- /** A room is named by its own address, not by whoever spoke in it last: the
42
- * handle for a DM, the network's room id otherwise, and the channel it is on
43
- * where no id arrived. */
44
- export declare function roomName(room: {
45
- channel: string;
46
- roomId?: string;
47
- roomKind: string;
40
+ export declare const speaker: (transport: string, sender?: string) => string;
41
+ /** A channel is named by its own address, not by whoever spoke in it last: the
42
+ * handle for a DM, the network's channel id otherwise, and the transport it is
43
+ * on where no id arrived. */
44
+ export declare function channelName(channel: {
45
+ transport: string;
46
+ channelId?: string;
47
+ channelKind: string;
48
48
  last: {
49
49
  sender?: string;
50
50
  };
51
51
  }): string;
52
52
  /**
53
- * One channel's mark, at whatever size the caller has room for.
53
+ * One transport's mark, at whatever size the caller has space for.
54
54
  *
55
55
  * A rounded square rather than a disc, because in the Inbox the face beside it
56
56
  * IS a disc and two circles the same size read as two people rather than as a
57
- * person and where they wrote from. The Channels grid draws the same mark at
57
+ * person and where they wrote from. The Directory's grid draws the same mark at
58
58
  * 46px, which is the size the vendor files were cut for and still the size the
59
59
  * simple-icons silhouettes were meant to scale to.
60
60
  */
61
- export declare function Network({ channel, size }: {
62
- channel: string;
61
+ export declare function Network({ transport, size }: {
62
+ transport: string;
63
63
  size?: number;
64
64
  }): import("react").JSX.Element;
65
65
  export {};