copilotz 1.0.0-rc.14 → 1.0.0-rc.15

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.0.0-rc.15 — 2026-11-02
2
+
3
+ - **Enter as staff, in your own org too.** Staff who belong to an org go in as one of its people, as
4
+ before, but can now ask to go in as staff: from the console, or the org switcher. They keep their
5
+ role, get the staff tools, and "Continue as Owner" takes them back. `POST /orgs/enter` takes
6
+ `staff: true`, `org.enter` takes `staff`, and `GET /orgs` says `asStaff`, which `asStaff()` now
7
+ reads instead of guessing from membership.
8
+
1
9
  ## 1.0.0-rc.14 — 2026-11-02
2
10
 
3
11
  - **Credits** (`plugins/billing/credits`): what an org can spend. Plans, credits and payments are
package/README.md CHANGED
@@ -22,7 +22,7 @@ bun add copilotz # Bun
22
22
  deno add jsr:@copilotz/copilotz # Deno (or `deno add npm:copilotz`)
23
23
  ```
24
24
 
25
- On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.14"`),
25
+ On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.15"`),
26
26
  and the imports below are the same everywhere. Some pieces need a package of their own, installed
27
27
  beside it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the
28
28
  process, and `@types/react` for the front ends' types.
@@ -204,7 +204,7 @@ and an app serves it from there by default:
204
204
  import { computerDownloads } from "copilotz/plugins/compute/downloads";
205
205
 
206
206
  plugins: [...plugins, await computerDownloads()], // this Copilotz's release
207
- plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.14" })], // its own: /computer/download/
207
+ plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.15" })], // its own: /computer/download/
208
208
  plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
209
209
  ```
210
210
 
@@ -26,7 +26,8 @@
26
26
  * `{ suspended?, name? }`; `POST …/<id>/move` `{ schema }` (its rows to
27
27
  * another schema); `GET …/<id>/export` (its rows, as SQL); `POST
28
28
  * …/<id>/delete` `{ confirm: <its name> }`. The app does the rows'
29
- * part (`operations`). Staff enter any org with `/orgs/enter`. Gift codes:
29
+ * part (`operations`). Staff enter any org with `/orgs/enter` `{ org, staff:
30
+ * true }`, their own too; without it, they go into theirs as its people. Gift codes:
30
31
  * `GET /console/codes`; `POST /console/codes` `{ amount, expires?, until?,
31
32
  * note? }` (the code, shown this once); `POST /console/codes/revoke` `{ id }`.
32
33
  * - Hosts orgs claimed (`claimHost` in an org's `directory` resource: a
package/hosts/orgs/mod.js CHANGED
@@ -165,8 +165,13 @@ export function orgsHost(options) {
165
165
  return { person: actor.id, email };
166
166
  };
167
167
  /** Goes into an org: the directory lets them in; the org knows them, and gives them a session. */
168
- const enter = async (request, url, who, org) => {
169
- const { org: info, role, staff } = await directory.call("org.enter", { org, person: who.person, ...(who.email ? { email: who.email } : {}) });
168
+ const enter = async (request, url, who, org, asStaff = false) => {
169
+ const { org: info, role, staff } = await directory.call("org.enter", {
170
+ org,
171
+ person: who.person,
172
+ ...(who.email ? { email: who.email } : {}),
173
+ ...(asStaff ? { staff: true } : {}),
174
+ });
170
175
  const cell = await cellOf(info);
171
176
  cell.last = Date.now();
172
177
  report(cell);
@@ -177,7 +182,7 @@ export function orgsHost(options) {
177
182
  ...(profile?.name ? { name: profile.name } : {}),
178
183
  ...(profile?.picture ? { picture: profile.picture } : {}),
179
184
  });
180
- if (!staff) {
185
+ if (!staff || role) {
181
186
  await cell.runtime.call("org.join", { person: who.person, ...(role ? { role } : {}) });
182
187
  }
183
188
  // A session they hold already, for this org and this person, stays.
@@ -200,6 +205,17 @@ export function orgsHost(options) {
200
205
  ],
201
206
  };
202
207
  };
208
+ /** Whether the session a request holds in an org is staff's. */
209
+ const heldAsStaff = async (request, org) => {
210
+ const secret = cookieOf(request, sessionOf(org));
211
+ const info = secret ? await orgInfo(org) : null;
212
+ if (!info || info.suspended)
213
+ return false;
214
+ const actor = await (await cellOf(info)).runtime
215
+ .query("credential.actor", { secret: secret })
216
+ .catch(() => null);
217
+ return actor?.staff === true;
218
+ };
203
219
  /** Whether a request's session for an org's cell is still good there. */
204
220
  const heldIn = async (cell, request) => {
205
221
  const secret = cookieOf(request, sessionOf(cell.org.id));
@@ -426,13 +442,15 @@ export function orgsHost(options) {
426
442
  ? directory.call("invite.mine", { email: who.email })
427
443
  : Promise.resolve({ invites: [] }),
428
444
  ]);
445
+ const current = cookieOf(request, CURRENT) ?? null;
429
446
  return json({
430
447
  person: who.person,
431
448
  email: who.email,
432
- current: cookieOf(request, CURRENT) ?? null,
449
+ current,
433
450
  orgs,
434
451
  invites,
435
452
  staff,
453
+ asStaff: staff && !!current && await heldAsStaff(request, current),
436
454
  });
437
455
  }
438
456
  case "POST /orgs": {
@@ -454,8 +472,8 @@ export function orgsHost(options) {
454
472
  const who = await signedIn(request);
455
473
  if (!who)
456
474
  return json({ error: "Not signed in" }, { status: 401 });
457
- const { org } = await request.json();
458
- const entered = await enter(request, url, who, String(org));
475
+ const { org, staff } = await request.json();
476
+ const entered = await enter(request, url, who, String(org), staff === true);
459
477
  return json({ org: entered.org }, { cookies: entered.cookies });
460
478
  }
461
479
  case "POST /orgs/invites/answer": {
@@ -23,6 +23,8 @@ export type Orgs = {
23
23
  invites: OrgInvite[];
24
24
  /** Platform staff, who go into any org. */
25
25
  staff: boolean;
26
+ /** The session they hold in the org they're in is staff's, one of theirs or not. */
27
+ asStaff: boolean;
26
28
  };
27
29
  /** An org as staff's console lists it, with what it last reported of itself. */
28
30
  export type ConsoleOrg = Org & {
package/hosts/web/orgs.js CHANGED
@@ -87,7 +87,7 @@ export function useOrgs() {
87
87
  /** The org the session is in: one of theirs, or (for staff) one they've gone into. */
88
88
  export const currentOrg = (orgs) => orgs.orgs.find((o) => o.id === orgs.current);
89
89
  /** Whether they're in an org as platform staff, not as one of its people. */
90
- export const asStaff = (orgs) => orgs.staff && !!orgs.current && !orgs.orgs.some((o) => o.id === orgs.current);
90
+ export const asStaff = (orgs) => orgs.asStaff === true;
91
91
  /** What an org is called where it shows: everyone's own is "Personal". */
92
92
  export const orgName = (org) => org.kind === "personal" ? "Personal" : org.name;
93
93
  /** What a refusal's status means: not let (403), not done by this app (501), or not so (else). */
@@ -144,7 +144,7 @@ async function into(to, move) {
144
144
  }
145
145
  /** Goes into an org (one of theirs; any, for staff), and starts over at its home. */
146
146
  export function enterOrg(org, staff = false) {
147
- return into({ id: org.id, name: org.name, kind: org.kind, ...(staff ? { staff: true } : {}) }, () => post("/orgs/enter", { org: org.id })).then(() => { });
147
+ return into({ id: org.id, name: org.name, kind: org.kind, ...(staff ? { staff: true } : {}) }, () => post("/orgs/enter", { org: org.id, ...(staff ? { staff: true } : {}) })).then(() => { });
148
148
  }
149
149
  /** Makes a team org, its maker its owner, and goes into it. */
150
150
  export function createOrg(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotz",
3
- "version": "1.0.0-rc.14",
3
+ "version": "1.0.0-rc.15",
4
4
  "description": "Copilotz: one runtime for Node, Deno, Bun, Cloudflare Workers and the browser.",
5
5
  "keywords": [
6
6
  "agents",
@@ -90,10 +90,16 @@ export const myOrgsAction = defineAction({
90
90
  },
91
91
  });
92
92
  export const enterOrgAction = defineAction({
93
- description: "Whether someone may go into an org, and how: the role they join with, and where it lives",
93
+ description: "Whether someone may go into an org, and how: the role they join with, whether as staff " +
94
+ "(asked for, or staff who don't belong to it), and where it lives",
94
95
  input: {
95
96
  type: "object",
96
- properties: { org: { type: "string" }, person, email: { type: "string" } },
97
+ properties: {
98
+ org: { type: "string" },
99
+ person,
100
+ email: { type: "string" },
101
+ staff: { type: "boolean" },
102
+ },
97
103
  required: ["org", "person"],
98
104
  additionalProperties: false,
99
105
  },
@@ -103,9 +109,13 @@ export const enterOrgAction = defineAction({
103
109
  throw forbidden("No such org, or not one you belong to.");
104
110
  const memberships = ctx.db.collection("membership");
105
111
  const mine = await memberships.findOne({ _id: `${input.org}|${input.person}` });
106
- const staff = !mine && await isStaff(ctx, input.person, input.email);
112
+ // Staff who belong to an org go in as one of its people, unless they ask.
113
+ const staff = (!mine || input.staff === true) &&
114
+ await isStaff(ctx, input.person, input.email);
107
115
  if (!mine && !staff)
108
116
  throw forbidden("No such org, or not one you belong to.");
117
+ if (input.staff === true && !staff)
118
+ throw forbidden("Staff only.");
109
119
  if (org.suspended && !staff)
110
120
  throw forbidden("This org is suspended.");
111
121
  if (mine) {
@@ -32,9 +32,9 @@ function About({ org, standing, call }) {
32
32
  ? "What everyone in it sees it as: in the switcher, and when they're invited."
33
33
  : "Its owners change its name.", children: personal
34
34
  ? _jsx(Input, { value: "Personal", disabled: true, "aria-label": "The org's name" })
35
- : _jsx(Rename, { org: org, owner: owner, call: call }) }), _jsx(Setting, { title: "Your role", text: standing.role
36
- ? role?.lets ?? ""
37
- : "Platform staff: you reach all of it, and what you do here is on its record, as yours.", children: _jsx("span", { className: "org-about-role", children: standing.role
35
+ : _jsx(Rename, { org: org, owner: owner, call: call }) }), _jsx(Setting, { title: "Your role", text: standing.staff
36
+ ? "Platform staff: you reach all of it, and what you do here is on its record, as yours."
37
+ : role?.lets ?? "", children: _jsx("span", { className: "org-about-role", children: standing.role
38
38
  ? (_jsx(Badge, { tone: runs(standing) ? "primary" : "neutral", children: orgRoleName(standing.role) }))
39
39
  : (_jsxs(Badge, { tone: "warning", children: [_jsx(Icon, { name: "shield", size: 12 }), "Staff"] })) }) })] }), personal ? null : _jsx(WhoSees, { org: org, standing: standing }), _jsxs(Card, { as: "section", className: "space-setting-about", "aria-labelledby": "org-facts", children: [_jsx("h3", { id: "org-facts", className: "space-section-title", children: "Details" }), _jsxs("dl", { className: "space-facts", children: [_jsx("dt", { children: "Kind" }), _jsx("dd", { children: personal ? "Personal: yours alone" : "Team" }), _jsx("dt", { children: "Roles" }), _jsx("dd", { className: "org-about-roles", children: ORG_ROLES.map((r) => (_jsxs("span", { children: [_jsx("b", { children: r.label }), " ", r.lets.charAt(0).toLowerCase() + r.lets.slice(1), "."] }, r.value))) }), _jsx("dt", { children: "Id" }), _jsxs("dd", { className: "space-facts-id", children: [_jsx("code", { children: org.id }), _jsx(CopyButton, { text: org.id, label: "Copy the org's id" })] })] })] })] }));
40
40
  }
@@ -1,2 +1,2 @@
1
1
  /** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
2
- export declare const VERSION = "1.0.0-rc.14";
2
+ export declare const VERSION = "1.0.0-rc.15";
@@ -1,2 +1,2 @@
1
1
  /** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
2
- export const VERSION = "1.0.0-rc.14";
2
+ export const VERSION = "1.0.0-rc.15";
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * ```ts
16
16
  * plugins: [...plugins, await computerDownloads()]
17
- * plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.14" })]
17
+ * plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.15" })]
18
18
  * plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })]
19
19
  * ```
20
20
  */
@@ -31,7 +31,7 @@ export declare const ORG_ROLES: readonly [{
31
31
  export declare const orgRoleName: (role: string | null | undefined) => string;
32
32
  /** Whether someone runs the org (owner or admin), or is staff, who reach all of it. */
33
33
  export declare const runs: (standing: Standing | undefined) => boolean;
34
- /** How someone stands, in a word: "Owner", or "Staff" for staff who aren't in it. */
34
+ /** How someone stands, in a word: their role ("Owner"), or "Staff" for staff who aren't in it. */
35
35
  export declare const standingName: (standing: Standing | undefined) => string;
36
36
  /**
37
37
  * An `orgSettings` resource: a section of the org's page, from the plugin it
@@ -26,7 +26,7 @@ export const orgRoleName = (role) => ORG_ROLES.find((r) => r.value === role)?.la
26
26
  (role ? role[0].toUpperCase() + role.slice(1) : "");
27
27
  /** Whether someone runs the org (owner or admin), or is staff, who reach all of it. */
28
28
  export const runs = (standing) => !!standing && (standing.staff || standing.role === "owner" || standing.role === "admin");
29
- /** How someone stands, in a word: "Owner", or "Staff" for staff who aren't in it. */
29
+ /** How someone stands, in a word: their role ("Owner"), or "Staff" for staff who aren't in it. */
30
30
  export const standingName = (standing) => !standing ? "" : standing.role ? orgRoleName(standing.role) : standing.staff ? "Staff" : "";
31
31
  /** The sections someone sees, in their order (lowest first), each with its key. */
32
32
  export function sectionsOf(given, standing) {
@@ -10,4 +10,4 @@
10
10
  * menu, going between orgs, staff's line along the top, the org's page and
11
11
  * staff's console.
12
12
  */
13
- export declare const STYLE = "\n.copilotz-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100dvh;\n overflow: clip; background: var(--background); }\n.copilotz-sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--sidebar);\n color: var(--sidebar-foreground); border-right: 1px solid var(--sidebar-border); }\n.copilotz-sidebar-head { display: flex; align-items: center; justify-content: space-between;\n gap: 8px; padding: 14px 12px 10px 18px; }\n.copilotz-brand { display: inline-flex; align-items: center; margin: -6px -8px; padding: 6px 8px;\n border-radius: var(--radius-md); text-decoration: none; transition: background-color .15s; }\n.copilotz-brand:hover { background: var(--sidebar-accent); }\n.copilotz-find { padding: 0 10px 6px; }\n.copilotz-find .copilotz-nav-icon { color: var(--muted-foreground); }\n.copilotz-find .copilotz-kbd { font-size: 10.5px; }\n.copilotz-sections { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;\n padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin;\n scrollbar-color: var(--input) transparent; }\n.copilotz-section:empty { display: none; }\n.copilotz-section + .copilotz-section-titled { margin-top: 14px; }\n.copilotz-section > h2 { margin: 0 0 4px; padding: 0 10px; font-family: var(--font-display); font-size: 11.5px;\n font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }\n.copilotz-me { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px;\n border-top: 1px solid var(--sidebar-border); }\n.copilotz-me-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }\n.copilotz-me-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-me-note { font-size: 12px; color: var(--muted-foreground); }\n.copilotz-stage { position: relative; display: flex; min-width: 0; min-height: 0; }\n.copilotz-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0;\n overflow: clip; outline: none; }\n.copilotz-main > * { flex: 1; min-height: 0; }\n.copilotz-main > .copilotz-failed { flex: none; align-self: center; width: min(560px, calc(100% - 32px));\n margin: max(64px, 12vh) 0 0; }\n.copilotz-skip { position: fixed; z-index: 60; top: 10px; left: 10px; transform: translateY(-160%);\n transition: transform .15s; }\n.copilotz-skip:focus-visible { transform: none; }\n.copilotz-shell-empty { display: grid; place-content: center; padding: 32px; }\n\n/* The side panel: its button over the page's top right, and the panel beside it */\n.copilotz-panel-toggle { position: absolute; z-index: 20; top: 11px; right: 12px; color: var(--secondary-foreground); }\n.copilotz-panel { flex: none; display: flex; flex-direction: column; min-height: 0;\n width: clamp(320px, var(--copilotz-panel-width, 420px), 58%); overflow: hidden; background: var(--background);\n animation: copilotz-panel-in .2s ease-out; }\n.copilotz-panel > * { flex: 1; min-height: 0; }\n@keyframes copilotz-panel-in { from { opacity: 0; transform: translateX(14px); } }\n.copilotz-drawer-bottom:has(> .copilotz-panel-sheet) { height: 88dvh; max-height: 88dvh; }\n.copilotz-panel-sheet { position: relative; display: flex; flex-direction: column; overflow: hidden; }\n.copilotz-panel-sheet-head { position: absolute; z-index: 2; inset: 0 0 auto; height: 0; }\n.copilotz-panel-grab { position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px;\n border-radius: var(--radius-full); background: var(--input); }\n.copilotz-panel-close { position: absolute; top: 17px; right: 10px; }\n.copilotz-panel-sheet-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden;\n padding-top: 8px; --copilotz-inset-end: 52px; }\n.copilotz-panel-sheet-body > * { flex: 1; min-height: 0; }\n\n@media (max-width: 760px) {\n .copilotz-shell { grid-template-columns: minmax(0, 1fr); --copilotz-inset: 56px; }\n .copilotz-sidebar { border-right: 0; }\n .copilotz-shell-menu { position: absolute; z-index: 20; top: 10px; left: 10px; color: var(--secondary-foreground); }\n .copilotz-panel-toggle { top: 10px; right: 10px; }\n}\n\n/* Orgs: the switcher at the top of the sidebar, beside the app's mark */\n.copilotz-sidebar-head[data-orgs] { gap: 4px; padding: 12px 10px 8px 10px; }\n.copilotz-brand-mark { flex: none; margin: 0; padding: 8px; color: var(--sidebar-foreground); }\n.copilotz-org { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px;\n padding: 6px 8px 6px 7px; border: 1px solid transparent; border-radius: var(--radius-lg); background: transparent;\n color: var(--sidebar-foreground); text-align: left; cursor: pointer; transition: background-color .12s, border-color .12s; }\n.copilotz-org:hover, .copilotz-org[aria-expanded=true] { background: var(--sidebar-accent); }\n.copilotz-org[aria-expanded=true] { border-color: var(--sidebar-border); }\n.copilotz-org-text { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.25; }\n.copilotz-org-name { overflow: hidden; font-family: var(--font-display); font-size: 14.5px; font-weight: 650;\n letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-org-sub { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden;\n color: var(--muted-foreground); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-org[data-staff] .copilotz-org-sub { color: var(--warning-text); font-weight: 620; }\n.copilotz-org[data-staff] > .copilotz-avatar { outline: 2px solid var(--warning); outline-offset: 1px; }\n.copilotz-org-chevron { flex: none; color: var(--muted-foreground); }\n.copilotz-org-dot { flex: none; display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px;\n border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground); font-size: 11px;\n font-weight: 700; font-variant-numeric: tabular-nums; }\n\n/* What the switcher opens */\n.copilotz-orgs-box { display: grid; gap: 2px; }\n.copilotz-orgs-who { margin: 4px 8px 6px; overflow: hidden; color: var(--muted-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-orgs-who b { color: var(--foreground); font-weight: 600; }\n.copilotz-orgs-staff { display: flex; align-items: flex-start; gap: 8px; margin: 0 2px 6px; padding: 9px 10px;\n border: 1px solid var(--warning-border); border-radius: var(--radius-md); background: var(--warning-soft);\n color: var(--warning-text); font-size: 12.5px; line-height: 1.45; }\n.copilotz-orgs-staff > .copilotz-icon { margin-top: 1px; }\n.copilotz-orgs-staff b { font-weight: 650; }\n.copilotz-orgs-list, .copilotz-orgs-invites ul { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.copilotz-orgs-row, .copilotz-orgs-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;\n padding: 6px 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit;\n font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; outline: none; }\n.copilotz-orgs-row:hover, .copilotz-orgs-row:focus-visible, .copilotz-orgs-action:hover,\n.copilotz-orgs-action:focus-visible { background: var(--accent); color: var(--accent-foreground); }\n.copilotz-orgs-row:focus-visible, .copilotz-orgs-action:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }\n.copilotz-orgs-row[aria-current] { background: color-mix(in oklab, var(--primary-soft) 60%, transparent); }\n.copilotz-orgs-row[aria-disabled] { opacity: .62; cursor: not-allowed; }\n.copilotz-orgs-row-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }\n.copilotz-orgs-row-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-orgs-row-sub { color: var(--muted-foreground); font-size: 12px; }\n.copilotz-orgs-row-error { color: var(--destructive-text); font-size: 12px; white-space: normal; }\n.copilotz-orgs-check { flex: none; color: var(--primary-text); }\n.copilotz-orgs-invites { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }\n.copilotz-orgs-invites h3 { display: flex; align-items: center; gap: 6px; margin: 0 8px 8px; color: var(--muted-foreground);\n font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.copilotz-orgs-invites ul { gap: 6px; }\n.copilotz-orgs-invite { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin: 0 2px; padding: 10px;\n border: 1px solid var(--primary-border); border-radius: var(--radius-lg);\n background: color-mix(in oklab, var(--primary-soft) 45%, var(--popover)); }\n.copilotz-orgs-invite-text { display: grid; gap: 1px; min-width: 0; }\n.copilotz-orgs-invite-name { margin: 0; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }\n.copilotz-orgs-invite-meta { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.copilotz-orgs-invite-meta .copilotz-time { font-size: 12.5px; }\n.copilotz-orgs-invite-answers { display: flex; gap: 6px; margin-top: 8px; }\n.copilotz-orgs-actions { display: grid; gap: 1px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }\n.copilotz-orgs-action { min-height: 38px; color: var(--secondary-foreground); }\n.copilotz-orgs-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--muted-foreground); }\n.copilotz-orgs-icon-new { border: 1px dashed var(--input); border-radius: var(--radius-sm); }\n\n/* Making one */\n.copilotz-new-org { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }\n.copilotz-new-org-preview { padding-top: 25px; }\n\n/* Going into another org: over everything, until it's there; and a word once it is */\n.copilotz-switching { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;\n border: 0; background: transparent; color: var(--foreground); outline: none; }\n.copilotz-switching::backdrop { background: color-mix(in oklab, var(--background) 84%, transparent);\n -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: copilotz-switching .22s ease-out; }\n.copilotz-switching[open] { display: grid; place-items: center; animation: copilotz-switching .22s ease-out; }\n.copilotz-switching-box { display: grid; justify-items: center; text-align: center;\n animation: copilotz-switching-in .36s cubic-bezier(.2, .8, .2, 1); }\n.copilotz-switching-box .copilotz-avatar { box-shadow: var(--shadow-md); }\n.copilotz-switching-personal { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-full);\n background: var(--primary-soft); color: var(--primary-text); }\n.copilotz-switching-label { margin: 18px 0 2px; color: var(--muted-foreground); font-size: 13px; }\n.copilotz-switching-name { margin: 0 0 18px; max-width: min(520px, calc(100vw - 48px)); font-family: var(--font-display);\n font-size: 26px; font-weight: 680; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }\n.copilotz-switching .copilotz-spinner { color: var(--muted-foreground); }\n@keyframes copilotz-switching { from { opacity: 0; } }\n@keyframes copilotz-switching-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }\n.copilotz-arrived { position: fixed; z-index: 70; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));\n display: flex; align-items: center; gap: 9px; width: max-content; max-width: min(560px, calc(100vw - 32px));\n padding: 10px 16px;\n border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--popover);\n color: var(--popover-foreground); box-shadow: var(--shadow-lg); font-size: 13.5px; line-height: 1.4;\n pointer-events: none; animation: copilotz-arrived 2.6s ease-in-out forwards; }\n.copilotz-arrived b { font-weight: 650; }\n.copilotz-arrived > .copilotz-icon { color: var(--success-text); }\n.copilotz-arrived[data-long] { border-radius: var(--radius-xl); animation-duration: 5.2s; }\n.copilotz-arrived[data-long] > .copilotz-icon { color: var(--info-text); }\n.copilotz-arrived[data-staff] { border-color: var(--warning-border); }\n.copilotz-arrived[data-staff] > .copilotz-icon { color: var(--warning-text); }\n@keyframes copilotz-arrived {\n 0% { opacity: 0; transform: translate(-50%, 10px); }\n 10%, 88% { opacity: 1; transform: translate(-50%, 0); }\n 100% { opacity: 0; transform: translate(-50%, 4px); }\n}\n\n/* Staff in someone's org: a line along the top, always */\n.copilotz-staff-line { position: fixed; z-index: 80; inset: 0 0 auto; height: 3px; background: var(--warning);\n pointer-events: none; }\n\n/* The user menu */\n.copilotz-me-menu { padding: 8px; }\n.copilotz-me-button { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px 8px;\n border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; text-align: left;\n cursor: pointer; transition: background-color .12s; }\n.copilotz-me-button:hover, .copilotz-me-button[aria-expanded=true] { background: var(--sidebar-accent); }\n.copilotz-me-chevron { flex: none; color: var(--muted-foreground); }\n\n/* The org's page */\n.copilotz-org-held { margin-bottom: 12px; }\n.copilotz-org-tabs { position: sticky; top: 0; z-index: 4; display: flex; width: 100%; margin-top: -2px;\n background: var(--background); }\n.copilotz-org-tabs .copilotz-tab { padding: 0 10px; }\n.copilotz-org-section { padding-top: 22px; }\n.copilotz-org-loading { display: grid; gap: 14px; margin-top: 8px; }\n.copilotz-org-missing { display: grid; place-items: center; padding: 32px; }\n.copilotz-org-page .copilotz-page-badges .copilotz-badge { gap: 4px; }\n\n/* Staff's console: dense, calm */\n.console-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }\n.console-stat { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);\n background: var(--card); }\n.console-stat-label { color: var(--muted-foreground); font-size: 12px; font-weight: 600; }\n.console-stat-value { font-family: var(--font-display); font-size: 24px; font-weight: 650; letter-spacing: -.02em;\n line-height: 1.2; font-variant-numeric: tabular-nums; }\n.console-stat[data-tone=warning] .console-stat-value { color: var(--warning-text); }\n.console-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;\n margin: 22px 0 12px; }\n.console-search { flex: 1 1 280px; max-width: 420px; }\n.console-notice { margin-bottom: 12px; }\n.console-loading { display: grid; gap: 6px; }\n.console-table { container: console / inline-size; display: grid; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }\n.console-row { display: grid; grid-template-columns: minmax(220px, 2.4fr) 64px 64px minmax(92px, .9fr) minmax(110px, 1fr) 92px 176px;\n align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 14px; font-size: 13.5px; }\n.console-row + .console-row { border-top: 1px solid var(--border); }\n.console-row:not(.console-head):hover { background: color-mix(in oklab, var(--muted) 45%, var(--card)); }\n.console-row[data-suspended] { background: color-mix(in oklab, var(--warning-soft) 35%, var(--card)); }\n.console-head { min-height: 38px; background: color-mix(in oklab, var(--muted) 55%, var(--card)); color: var(--muted-foreground);\n font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }\n.console-num { text-align: right; font-variant-numeric: tabular-nums; }\n.console-org { display: flex; align-items: center; gap: 11px; min-width: 0; }\n.console-org-text { display: grid; gap: 1px; min-width: 0; }\n.console-org-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; font-weight: 620;\n text-overflow: ellipsis; white-space: nowrap; }\n.console-org-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted-foreground);\n font-size: 12px; }\n.console-org-meta code { min-width: 0; overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }\n.console-org-meta .copilotz-copy { margin: -4px 0; }\n.console-error { color: var(--destructive-text); font-size: 12px; }\n.console-active { color: var(--secondary-foreground); }\n.console-active .copilotz-time { font-size: 13px; }\n.console-placement { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted-foreground); }\n.console-placement code { min-width: 0; overflow: hidden; color: var(--secondary-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.console-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }\n.console-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.console-foot { margin: 12px 2px 0; color: var(--muted-foreground); font-size: 12.5px; }\n.console-dialog-text { margin: 0 0 12px; color: var(--secondary-foreground); font-size: 14px; line-height: 1.55; }\n.console-move { display: grid; gap: 4px; }\n.console-move-from { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted-foreground);\n font-size: 13px; }\n.console-move-from code { padding: 2px 8px; border-radius: var(--radius-sm); background: var(--muted);\n color: var(--foreground); font-size: 12.5px; }\n.console-mono input { font-family: var(--font-mono); }\n.console-delete { display: grid; gap: 14px; }\n.console-export { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--primary-text);\n font-size: 13.5px; font-weight: 560; text-underline-offset: 3px; }\n.console-name { font-family: var(--font-mono); font-weight: 650; }\n@container console (max-width: 900px) {\n .console-row.console-head { display: none; }\n .console-row > [data-label=Placement] { display: none; }\n .console-row:not([data-suspended]) > [data-label=Status] { display: none; }\n .console-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 10px 12px 14px; }\n .console-row::after { content: \"\"; order: 1; flex-basis: 100%; height: 0; }\n .console-org { flex: 1 1 0; }\n .console-row > [data-label] { order: 2; color: var(--muted-foreground); font-size: 12.5px; text-align: left; }\n .console-row > [data-label=People] { margin-left: 41px; }\n .console-row > [data-label=People]::before, .console-row > [data-label=Spaces]::before,\n .console-row > [data-label=\"Last active\"]::before { content: attr(data-label) \" \"; }\n .console-row > [data-label=People]::before, .console-row > [data-label=Spaces]::before,\n .console-row > [data-label=\"Last active\"]::before { color: var(--muted-foreground); }\n .console-row > [data-label] .copilotz-time, .console-row > [data-label] code { color: var(--foreground); font-size: 12.5px; }\n .console-row > .console-num { color: var(--foreground); }\n}\n@container console (max-width: 520px) {\n .console-actions .copilotz-button { padding: 0 9px; }\n}\n@media (max-width: 760px) {\n .console-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n .console-search { max-width: none; }\n .copilotz-org-tabs { position: static; }\n}\n";
13
+ export declare const STYLE = "\n.copilotz-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100dvh;\n overflow: clip; background: var(--background); }\n.copilotz-sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--sidebar);\n color: var(--sidebar-foreground); border-right: 1px solid var(--sidebar-border); }\n.copilotz-sidebar-head { display: flex; align-items: center; justify-content: space-between;\n gap: 8px; padding: 14px 12px 10px 18px; }\n.copilotz-brand { display: inline-flex; align-items: center; margin: -6px -8px; padding: 6px 8px;\n border-radius: var(--radius-md); text-decoration: none; transition: background-color .15s; }\n.copilotz-brand:hover { background: var(--sidebar-accent); }\n.copilotz-find { padding: 0 10px 6px; }\n.copilotz-find .copilotz-nav-icon { color: var(--muted-foreground); }\n.copilotz-find .copilotz-kbd { font-size: 10.5px; }\n.copilotz-sections { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;\n padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin;\n scrollbar-color: var(--input) transparent; }\n.copilotz-section:empty { display: none; }\n.copilotz-section + .copilotz-section-titled { margin-top: 14px; }\n.copilotz-section > h2 { margin: 0 0 4px; padding: 0 10px; font-family: var(--font-display); font-size: 11.5px;\n font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }\n.copilotz-me { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px;\n border-top: 1px solid var(--sidebar-border); }\n.copilotz-me-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }\n.copilotz-me-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-me-note { font-size: 12px; color: var(--muted-foreground); }\n.copilotz-stage { position: relative; display: flex; min-width: 0; min-height: 0; }\n.copilotz-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0;\n overflow: clip; outline: none; }\n.copilotz-main > * { flex: 1; min-height: 0; }\n.copilotz-main > .copilotz-failed { flex: none; align-self: center; width: min(560px, calc(100% - 32px));\n margin: max(64px, 12vh) 0 0; }\n.copilotz-skip { position: fixed; z-index: 60; top: 10px; left: 10px; transform: translateY(-160%);\n transition: transform .15s; }\n.copilotz-skip:focus-visible { transform: none; }\n.copilotz-shell-empty { display: grid; place-content: center; padding: 32px; }\n\n/* The side panel: its button over the page's top right, and the panel beside it */\n.copilotz-panel-toggle { position: absolute; z-index: 20; top: 11px; right: 12px; color: var(--secondary-foreground); }\n.copilotz-panel { flex: none; display: flex; flex-direction: column; min-height: 0;\n width: clamp(320px, var(--copilotz-panel-width, 420px), 58%); overflow: hidden; background: var(--background);\n animation: copilotz-panel-in .2s ease-out; }\n.copilotz-panel > * { flex: 1; min-height: 0; }\n@keyframes copilotz-panel-in { from { opacity: 0; transform: translateX(14px); } }\n.copilotz-drawer-bottom:has(> .copilotz-panel-sheet) { height: 88dvh; max-height: 88dvh; }\n.copilotz-panel-sheet { position: relative; display: flex; flex-direction: column; overflow: hidden; }\n.copilotz-panel-sheet-head { position: absolute; z-index: 2; inset: 0 0 auto; height: 0; }\n.copilotz-panel-grab { position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px;\n border-radius: var(--radius-full); background: var(--input); }\n.copilotz-panel-close { position: absolute; top: 17px; right: 10px; }\n.copilotz-panel-sheet-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden;\n padding-top: 8px; --copilotz-inset-end: 52px; }\n.copilotz-panel-sheet-body > * { flex: 1; min-height: 0; }\n\n@media (max-width: 760px) {\n .copilotz-shell { grid-template-columns: minmax(0, 1fr); --copilotz-inset: 56px; }\n .copilotz-sidebar { border-right: 0; }\n .copilotz-shell-menu { position: absolute; z-index: 20; top: 10px; left: 10px; color: var(--secondary-foreground); }\n .copilotz-panel-toggle { top: 10px; right: 10px; }\n}\n\n/* Orgs: the switcher at the top of the sidebar, beside the app's mark */\n.copilotz-sidebar-head[data-orgs] { gap: 4px; padding: 12px 10px 8px 10px; }\n.copilotz-brand-mark { flex: none; margin: 0; padding: 8px; color: var(--sidebar-foreground); }\n.copilotz-org { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px;\n padding: 6px 8px 6px 7px; border: 1px solid transparent; border-radius: var(--radius-lg); background: transparent;\n color: var(--sidebar-foreground); text-align: left; cursor: pointer; transition: background-color .12s, border-color .12s; }\n.copilotz-org:hover, .copilotz-org[aria-expanded=true] { background: var(--sidebar-accent); }\n.copilotz-org[aria-expanded=true] { border-color: var(--sidebar-border); }\n.copilotz-org-text { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.25; }\n.copilotz-org-name { overflow: hidden; font-family: var(--font-display); font-size: 14.5px; font-weight: 650;\n letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-org-sub { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden;\n color: var(--muted-foreground); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-org[data-staff] .copilotz-org-sub { color: var(--warning-text); font-weight: 620; }\n.copilotz-org[data-staff] > .copilotz-avatar { outline: 2px solid var(--warning); outline-offset: 1px; }\n.copilotz-org-chevron { flex: none; color: var(--muted-foreground); }\n.copilotz-org-dot { flex: none; display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px;\n border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground); font-size: 11px;\n font-weight: 700; font-variant-numeric: tabular-nums; }\n\n/* What the switcher opens */\n.copilotz-orgs-box { display: grid; gap: 2px; }\n.copilotz-orgs-who { margin: 4px 8px 6px; overflow: hidden; color: var(--muted-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-orgs-who b { color: var(--foreground); font-weight: 600; }\n.copilotz-orgs-staff { display: flex; align-items: flex-start; gap: 8px; margin: 0 2px 6px; padding: 9px 10px;\n border: 1px solid var(--warning-border); border-radius: var(--radius-md); background: var(--warning-soft);\n color: var(--warning-text); font-size: 12.5px; line-height: 1.45; }\n.copilotz-orgs-staff > .copilotz-icon { margin-top: 1px; }\n.copilotz-orgs-staff b { font-weight: 650; }\n.copilotz-orgs-staff-back { display: block; margin-top: 4px; padding: 0; border: 0; background: none; color: inherit;\n font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }\n.copilotz-orgs-list, .copilotz-orgs-invites ul { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.copilotz-orgs-row, .copilotz-orgs-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;\n padding: 6px 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit;\n font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; outline: none; }\n.copilotz-orgs-row:hover, .copilotz-orgs-row:focus-visible, .copilotz-orgs-action:hover,\n.copilotz-orgs-action:focus-visible { background: var(--accent); color: var(--accent-foreground); }\n.copilotz-orgs-row:focus-visible, .copilotz-orgs-action:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }\n.copilotz-orgs-row[aria-current] { background: color-mix(in oklab, var(--primary-soft) 60%, transparent); }\n.copilotz-orgs-row[aria-disabled] { opacity: .62; cursor: not-allowed; }\n.copilotz-orgs-row-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }\n.copilotz-orgs-row-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.copilotz-orgs-row-sub { color: var(--muted-foreground); font-size: 12px; }\n.copilotz-orgs-row-error { color: var(--destructive-text); font-size: 12px; white-space: normal; }\n.copilotz-orgs-check { flex: none; color: var(--primary-text); }\n.copilotz-orgs-invites { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }\n.copilotz-orgs-invites h3 { display: flex; align-items: center; gap: 6px; margin: 0 8px 8px; color: var(--muted-foreground);\n font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.copilotz-orgs-invites ul { gap: 6px; }\n.copilotz-orgs-invite { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin: 0 2px; padding: 10px;\n border: 1px solid var(--primary-border); border-radius: var(--radius-lg);\n background: color-mix(in oklab, var(--primary-soft) 45%, var(--popover)); }\n.copilotz-orgs-invite-text { display: grid; gap: 1px; min-width: 0; }\n.copilotz-orgs-invite-name { margin: 0; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }\n.copilotz-orgs-invite-meta { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.copilotz-orgs-invite-meta .copilotz-time { font-size: 12.5px; }\n.copilotz-orgs-invite-answers { display: flex; gap: 6px; margin-top: 8px; }\n.copilotz-orgs-actions { display: grid; gap: 1px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }\n.copilotz-orgs-action { min-height: 38px; color: var(--secondary-foreground); }\n.copilotz-orgs-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--muted-foreground); }\n.copilotz-orgs-icon-new { border: 1px dashed var(--input); border-radius: var(--radius-sm); }\n\n/* Making one */\n.copilotz-new-org { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }\n.copilotz-new-org-preview { padding-top: 25px; }\n\n/* Going into another org: over everything, until it's there; and a word once it is */\n.copilotz-switching { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;\n border: 0; background: transparent; color: var(--foreground); outline: none; }\n.copilotz-switching::backdrop { background: color-mix(in oklab, var(--background) 84%, transparent);\n -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: copilotz-switching .22s ease-out; }\n.copilotz-switching[open] { display: grid; place-items: center; animation: copilotz-switching .22s ease-out; }\n.copilotz-switching-box { display: grid; justify-items: center; text-align: center;\n animation: copilotz-switching-in .36s cubic-bezier(.2, .8, .2, 1); }\n.copilotz-switching-box .copilotz-avatar { box-shadow: var(--shadow-md); }\n.copilotz-switching-personal { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-full);\n background: var(--primary-soft); color: var(--primary-text); }\n.copilotz-switching-label { margin: 18px 0 2px; color: var(--muted-foreground); font-size: 13px; }\n.copilotz-switching-name { margin: 0 0 18px; max-width: min(520px, calc(100vw - 48px)); font-family: var(--font-display);\n font-size: 26px; font-weight: 680; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }\n.copilotz-switching .copilotz-spinner { color: var(--muted-foreground); }\n@keyframes copilotz-switching { from { opacity: 0; } }\n@keyframes copilotz-switching-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }\n.copilotz-arrived { position: fixed; z-index: 70; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));\n display: flex; align-items: center; gap: 9px; width: max-content; max-width: min(560px, calc(100vw - 32px));\n padding: 10px 16px;\n border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--popover);\n color: var(--popover-foreground); box-shadow: var(--shadow-lg); font-size: 13.5px; line-height: 1.4;\n pointer-events: none; animation: copilotz-arrived 2.6s ease-in-out forwards; }\n.copilotz-arrived b { font-weight: 650; }\n.copilotz-arrived > .copilotz-icon { color: var(--success-text); }\n.copilotz-arrived[data-long] { border-radius: var(--radius-xl); animation-duration: 5.2s; }\n.copilotz-arrived[data-long] > .copilotz-icon { color: var(--info-text); }\n.copilotz-arrived[data-staff] { border-color: var(--warning-border); }\n.copilotz-arrived[data-staff] > .copilotz-icon { color: var(--warning-text); }\n@keyframes copilotz-arrived {\n 0% { opacity: 0; transform: translate(-50%, 10px); }\n 10%, 88% { opacity: 1; transform: translate(-50%, 0); }\n 100% { opacity: 0; transform: translate(-50%, 4px); }\n}\n\n/* Staff in someone's org: a line along the top, always */\n.copilotz-staff-line { position: fixed; z-index: 80; inset: 0 0 auto; height: 3px; background: var(--warning);\n pointer-events: none; }\n\n/* The user menu */\n.copilotz-me-menu { padding: 8px; }\n.copilotz-me-button { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px 8px;\n border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; text-align: left;\n cursor: pointer; transition: background-color .12s; }\n.copilotz-me-button:hover, .copilotz-me-button[aria-expanded=true] { background: var(--sidebar-accent); }\n.copilotz-me-chevron { flex: none; color: var(--muted-foreground); }\n\n/* The org's page */\n.copilotz-org-held { margin-bottom: 12px; }\n.copilotz-org-tabs { position: sticky; top: 0; z-index: 4; display: flex; width: 100%; margin-top: -2px;\n background: var(--background); }\n.copilotz-org-tabs .copilotz-tab { padding: 0 10px; }\n.copilotz-org-section { padding-top: 22px; }\n.copilotz-org-loading { display: grid; gap: 14px; margin-top: 8px; }\n.copilotz-org-missing { display: grid; place-items: center; padding: 32px; }\n.copilotz-org-page .copilotz-page-badges .copilotz-badge { gap: 4px; }\n\n/* Staff's console: dense, calm */\n.console-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }\n.console-stat { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);\n background: var(--card); }\n.console-stat-label { color: var(--muted-foreground); font-size: 12px; font-weight: 600; }\n.console-stat-value { font-family: var(--font-display); font-size: 24px; font-weight: 650; letter-spacing: -.02em;\n line-height: 1.2; font-variant-numeric: tabular-nums; }\n.console-stat[data-tone=warning] .console-stat-value { color: var(--warning-text); }\n.console-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;\n margin: 22px 0 12px; }\n.console-search { flex: 1 1 280px; max-width: 420px; }\n.console-notice { margin-bottom: 12px; }\n.console-loading { display: grid; gap: 6px; }\n.console-table { container: console / inline-size; display: grid; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }\n.console-row { display: grid; grid-template-columns: minmax(220px, 2.4fr) 64px 64px minmax(92px, .9fr) minmax(110px, 1fr) 92px 176px;\n align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 14px; font-size: 13.5px; }\n.console-row + .console-row { border-top: 1px solid var(--border); }\n.console-row:not(.console-head):hover { background: color-mix(in oklab, var(--muted) 45%, var(--card)); }\n.console-row[data-suspended] { background: color-mix(in oklab, var(--warning-soft) 35%, var(--card)); }\n.console-head { min-height: 38px; background: color-mix(in oklab, var(--muted) 55%, var(--card)); color: var(--muted-foreground);\n font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }\n.console-num { text-align: right; font-variant-numeric: tabular-nums; }\n.console-org { display: flex; align-items: center; gap: 11px; min-width: 0; }\n.console-org-text { display: grid; gap: 1px; min-width: 0; }\n.console-org-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; font-weight: 620;\n text-overflow: ellipsis; white-space: nowrap; }\n.console-org-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted-foreground);\n font-size: 12px; }\n.console-org-meta code { min-width: 0; overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }\n.console-org-meta .copilotz-copy { margin: -4px 0; }\n.console-error { color: var(--destructive-text); font-size: 12px; }\n.console-active { color: var(--secondary-foreground); }\n.console-active .copilotz-time { font-size: 13px; }\n.console-placement { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted-foreground); }\n.console-placement code { min-width: 0; overflow: hidden; color: var(--secondary-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.console-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }\n.console-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.console-foot { margin: 12px 2px 0; color: var(--muted-foreground); font-size: 12.5px; }\n.console-dialog-text { margin: 0 0 12px; color: var(--secondary-foreground); font-size: 14px; line-height: 1.55; }\n.console-move { display: grid; gap: 4px; }\n.console-move-from { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted-foreground);\n font-size: 13px; }\n.console-move-from code { padding: 2px 8px; border-radius: var(--radius-sm); background: var(--muted);\n color: var(--foreground); font-size: 12.5px; }\n.console-mono input { font-family: var(--font-mono); }\n.console-delete { display: grid; gap: 14px; }\n.console-export { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--primary-text);\n font-size: 13.5px; font-weight: 560; text-underline-offset: 3px; }\n.console-name { font-family: var(--font-mono); font-weight: 650; }\n@container console (max-width: 900px) {\n .console-row.console-head { display: none; }\n .console-row > [data-label=Placement] { display: none; }\n .console-row:not([data-suspended]) > [data-label=Status] { display: none; }\n .console-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 10px 12px 14px; }\n .console-row::after { content: \"\"; order: 1; flex-basis: 100%; height: 0; }\n .console-org { flex: 1 1 0; }\n .console-row > [data-label] { order: 2; color: var(--muted-foreground); font-size: 12.5px; text-align: left; }\n .console-row > [data-label=People] { margin-left: 41px; }\n .console-row > [data-label=People]::before, .console-row > [data-label=Spaces]::before,\n .console-row > [data-label=\"Last active\"]::before { content: attr(data-label) \" \"; }\n .console-row > [data-label=People]::before, .console-row > [data-label=Spaces]::before,\n .console-row > [data-label=\"Last active\"]::before { color: var(--muted-foreground); }\n .console-row > [data-label] .copilotz-time, .console-row > [data-label] code { color: var(--foreground); font-size: 12.5px; }\n .console-row > .console-num { color: var(--foreground); }\n}\n@container console (max-width: 520px) {\n .console-actions .copilotz-button { padding: 0 9px; }\n}\n@media (max-width: 760px) {\n .console-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n .console-search { max-width: none; }\n .copilotz-org-tabs { position: static; }\n}\n";
@@ -100,6 +100,8 @@ export const STYLE = `
100
100
  color: var(--warning-text); font-size: 12.5px; line-height: 1.45; }
101
101
  .copilotz-orgs-staff > .copilotz-icon { margin-top: 1px; }
102
102
  .copilotz-orgs-staff b { font-weight: 650; }
103
+ .copilotz-orgs-staff-back { display: block; margin-top: 4px; padding: 0; border: 0; background: none; color: inherit;
104
+ font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
103
105
  .copilotz-orgs-list, .copilotz-orgs-invites ul { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }
104
106
  .copilotz-orgs-row, .copilotz-orgs-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
105
107
  padding: 6px 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit;
@@ -66,6 +66,7 @@ function Console({ tab }) {
66
66
  return (_jsxs("div", { className: "copilotz-org-missing", children: [_jsx(Title, { text: "Console" }), _jsx(EmptyState, { icon: "lock", heading: "h1", title: "For platform staff", action: _jsx(Button, { variant: "primary", href: "/", children: "Go home" }), children: "The console lists every organization, for the people who run this app." })] }));
67
67
  }
68
68
  const current = orgs.status === "ready" ? orgs.value.current : null;
69
+ const inAsStaff = orgs.status === "ready" && orgs.value.asStaff;
69
70
  /** A dialog's closing ends what it was for, and nothing that started since. */
70
71
  const closer = (what) => () => setDoing((now) => now?.what === what ? undefined : now);
71
72
  const finished = (note) => {
@@ -89,7 +90,7 @@ function Console({ tab }) {
89
90
  : null, !list
90
91
  ? (_jsx("div", { className: "console-loading", "aria-busy": "true", children: [0, 1, 2, 3].map((i) => _jsx(Skeleton, { height: 52, radius: "md" }, i)) }))
91
92
  : shown.length
92
- ? (_jsxs("div", { className: "console-table", role: "table", "aria-label": "Organizations", children: [_jsxs("div", { className: "console-row console-head", role: "row", children: [_jsx("span", { role: "columnheader", children: "Organization" }), _jsx("span", { role: "columnheader", className: "console-num", children: "People" }), _jsx("span", { role: "columnheader", className: "console-num", children: "Spaces" }), _jsx("span", { role: "columnheader", children: "Last active" }), _jsx("span", { role: "columnheader", children: "Placement" }), _jsx("span", { role: "columnheader", children: "Status" }), _jsx("span", { role: "columnheader", className: "console-sr", children: "Actions" })] }), shown.map((org) => (_jsx(Row, { org: org, here: org.id === current, onDo: (what) => setDoing({ what, org }) }, org.id)))] }))
93
+ ? (_jsxs("div", { className: "console-table", role: "table", "aria-label": "Organizations", children: [_jsxs("div", { className: "console-row console-head", role: "row", children: [_jsx("span", { role: "columnheader", children: "Organization" }), _jsx("span", { role: "columnheader", className: "console-num", children: "People" }), _jsx("span", { role: "columnheader", className: "console-num", children: "Spaces" }), _jsx("span", { role: "columnheader", children: "Last active" }), _jsx("span", { role: "columnheader", children: "Placement" }), _jsx("span", { role: "columnheader", children: "Status" }), _jsx("span", { role: "columnheader", className: "console-sr", children: "Actions" })] }), shown.map((org) => (_jsx(Row, { org: org, here: org.id === current, inAsStaff: org.id === current && inAsStaff, onDo: (what) => setDoing({ what, org }) }, org.id)))] }))
93
94
  : (_jsx(EmptyState, { icon: "search", title: "No organization matches", children: search ? `Nothing matches “${search.trim()}”` : "Nothing in this list yet." })), list && shown.length
94
95
  ? (_jsxs("p", { className: "console-foot", children: [shown.length === list.length
95
96
  ? `${list.length} ${list.length === 1 ? "organization" : "organizations"}`
@@ -101,7 +102,7 @@ function Stat({ label, value, tone }) {
101
102
  ? _jsx(Skeleton, { height: 26, width: 48 })
102
103
  : _jsx("span", { className: "console-stat-value", children: value.toLocaleString() })] }));
103
104
  }
104
- function Row({ org, here, onDo }) {
105
+ function Row({ org, here, inAsStaff, onDo }) {
105
106
  const [entering, setEntering] = useState(false);
106
107
  const [error, setError] = useState();
107
108
  const people = org.summary?.people ?? org.members;
@@ -115,10 +116,12 @@ function Row({ org, here, onDo }) {
115
116
  };
116
117
  return (_jsxs("div", { className: "console-row", role: "row", "data-suspended": org.suspended || undefined, children: [_jsxs("span", { role: "cell", className: "console-org", children: [org.kind === "personal"
117
118
  ? _jsx(Avatar, { name: org.by, size: 30 })
118
- : _jsx(Avatar, { name: org.name, kind: "org", size: 30, tint: org.id }), _jsxs("span", { className: "console-org-text", children: [_jsxs("span", { className: "console-org-name", children: [org.name, here ? _jsx(Badge, { tone: "primary", children: "You're here" }) : null] }), _jsxs("span", { className: "console-org-meta", children: [_jsx("span", { className: "console-kind", children: org.kind === "personal" ? "Personal" : "Team" }), _jsx("span", { "aria-hidden": "true", children: "\u00B7" }), _jsx("code", { title: org.id, children: org.id }), _jsx(CopyButton, { text: org.id, label: "Copy the org's id" })] }), error ? _jsx("span", { className: "console-error", children: error }) : null] })] }), _jsx("span", { role: "cell", className: "console-num", "data-label": "People", children: people.toLocaleString() }), _jsx("span", { role: "cell", className: "console-num", "data-label": "Spaces", children: org.summary?.spaces === undefined ? "—" : org.summary.spaces.toLocaleString() }), _jsx("span", { role: "cell", className: "console-active", "data-label": "Last active", children: org.summary?.active ? _jsx(Time, { at: org.summary.active }) : _jsx("span", { children: "Not yet" }) }), _jsxs("span", { role: "cell", className: "console-placement", "data-label": "Placement", children: [_jsx(Icon, { name: "server", size: 13 }), _jsx("code", { children: org.placement?.schema ?? "—" })] }), _jsx("span", { role: "cell", "data-label": "Status", children: org.suspended
119
+ : _jsx(Avatar, { name: org.name, kind: "org", size: 30, tint: org.id }), _jsxs("span", { className: "console-org-text", children: [_jsxs("span", { className: "console-org-name", children: [org.name, here
120
+ ? _jsx(Badge, { tone: "primary", children: inAsStaff ? "You're here as staff" : "You're here" })
121
+ : null] }), _jsxs("span", { className: "console-org-meta", children: [_jsx("span", { className: "console-kind", children: org.kind === "personal" ? "Personal" : "Team" }), _jsx("span", { "aria-hidden": "true", children: "\u00B7" }), _jsx("code", { title: org.id, children: org.id }), _jsx(CopyButton, { text: org.id, label: "Copy the org's id" })] }), error ? _jsx("span", { className: "console-error", children: error }) : null] })] }), _jsx("span", { role: "cell", className: "console-num", "data-label": "People", children: people.toLocaleString() }), _jsx("span", { role: "cell", className: "console-num", "data-label": "Spaces", children: org.summary?.spaces === undefined ? "—" : org.summary.spaces.toLocaleString() }), _jsx("span", { role: "cell", className: "console-active", "data-label": "Last active", children: org.summary?.active ? _jsx(Time, { at: org.summary.active }) : _jsx("span", { children: "Not yet" }) }), _jsxs("span", { role: "cell", className: "console-placement", "data-label": "Placement", children: [_jsx(Icon, { name: "server", size: 13 }), _jsx("code", { children: org.placement?.schema ?? "—" })] }), _jsx("span", { role: "cell", "data-label": "Status", children: org.suspended
119
122
  ? _jsx(Badge, { tone: "warning", variant: "soft", children: "Suspended" })
120
- : _jsx(Badge, { tone: "success", variant: "soft", children: "Active" }) }), _jsxs("span", { role: "cell", className: "console-actions", children: [_jsx(Button, { size: "sm", icon: "enter", loading: entering, disabled: here, onClick: enter, title: here
121
- ? "You're in it"
123
+ : _jsx(Badge, { tone: "success", variant: "soft", children: "Active" }) }), _jsxs("span", { role: "cell", className: "console-actions", children: [_jsx(Button, { size: "sm", icon: "enter", loading: entering, disabled: inAsStaff, onClick: enter, title: inAsStaff
124
+ ? "You're in it as staff"
122
125
  : `Go into ${org.name} as staff: what you do there is on its record`, children: "Enter as staff" }), _jsx(Menu, { label: `${org.name}: more`, align: "end", size: "sm", items: [
123
126
  { label: "Rename…", icon: "pencil", onSelect: () => onDo("rename") },
124
127
  org.suspended
@@ -28,11 +28,11 @@ function OrgPage({ given, tab, call }) {
28
28
  ? (given ?? {})[tab]?.title
29
29
  : undefined;
30
30
  const personal = here.kind === "personal";
31
- return (_jsxs(Page, { title: name, width: "lg", className: "copilotz-org-page", leading: _jsx(OrgFace, { org: here, person: orgs.value.person, size: 44 }), badges: _jsxs(_Fragment, { children: [_jsx(Badge, { variant: "outline", children: personal ? "Personal org" : "Team org" }), standing.staff && !standing.role
31
+ return (_jsxs(Page, { title: name, width: "lg", className: "copilotz-org-page", leading: _jsx(OrgFace, { org: here, person: orgs.value.person, size: 44 }), badges: _jsxs(_Fragment, { children: [_jsx(Badge, { variant: "outline", children: personal ? "Personal org" : "Team org" }), standing.staff
32
32
  ? (_jsxs(Badge, { tone: "warning", children: [_jsx(Icon, { name: "shield", size: 12 }), "Staff access"] }))
33
- : standing.role
34
- ? _jsx(Badge, { tone: runs(standing) ? "primary" : "neutral", children: standingName(standing) })
35
- : null] }), description: standing.staff && !standing.role
33
+ : null, standing.role
34
+ ? _jsx(Badge, { tone: runs(standing) ? "primary" : "neutral", children: standingName(standing) })
35
+ : null] }), description: standing.staff
36
36
  ? `You're here as platform staff: what you do is on ${here.name}'s record.`
37
37
  : personal
38
38
  ? "Your own organization: just you, and what you make alone."
@@ -10,7 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
10
10
  * theirs see it, quietly and all the time: what they do is on its record.
11
11
  */
12
12
  import { useEffect, useRef, useState } from "react";
13
- import { answerOrgInvite, arrived, Avatar, Badge, Button, createOrg, Dialog, enterOrg, Field, Icon, Input, message, orgName, Popover, Spinner, Time, useSwitching, } from "../../../../hosts/web/mod.js";
13
+ import { answerOrgInvite, arrived, Avatar, Badge, Button, createOrg, Dialog, enterOrg, Field, Icon, Input, message, Notice, orgName, Popover, Spinner, Time, useSwitching, } from "../../../../hosts/web/mod.js";
14
14
  import { orgRoleName, runs, standingName } from "../shared/orgs.js";
15
15
  /** An org's face: yours (Personal) is you; a team's, its initials. */
16
16
  export function OrgFace({ org, person, size = 26 }) {
@@ -27,6 +27,12 @@ function subline(org, standing, staff) {
27
27
  return standingName(standing) || " ";
28
28
  }
29
29
  export function OrgSwitcher({ orgs, here, standing, staff, onNew }) {
30
+ const [failed, setFailed] = useState();
31
+ /** Goes in or back as staff: the page starts over, or it stays and says why. */
32
+ const switchTo = (org, staff) => {
33
+ setFailed(undefined);
34
+ enterOrg(org, staff).catch((e) => setFailed(message(e)));
35
+ };
30
36
  const waiting = orgs.invites.length;
31
37
  const name = here ? orgName(here) : "Organization";
32
38
  const mine = [...orgs.orgs].sort((a, b) => Number(b.kind === "personal") - Number(a.kind === "personal") ||
@@ -38,14 +44,18 @@ export function OrgSwitcher({ orgs, here, standing, staff, onNew }) {
38
44
  : _jsx(Avatar, { name: name, kind: "org", size: 28 }), _jsxs("span", { className: "copilotz-org-text", children: [_jsx("span", { className: "copilotz-org-name", children: name }), _jsxs("span", { className: "copilotz-org-sub", children: [staff ? _jsx(Icon, { name: "shield", size: 12 }) : null, subline(here, standing, staff)] })] }), waiting
39
45
  ? (_jsx("span", { className: "copilotz-org-dot", "aria-label": `${waiting} invitations`, children: waiting }))
40
46
  : null, _jsx(Icon, { name: "selector", size: 15, className: "copilotz-org-chevron" })] })), children: (close) => (_jsxs("div", { className: "copilotz-orgs-box", children: [_jsxs("p", { className: "copilotz-orgs-who", children: ["Signed in as ", _jsx("b", { children: orgs.email ?? orgs.person })] }), staff && here
41
- ? (_jsxs("div", { className: "copilotz-orgs-staff", children: [_jsx(Icon, { name: "shield", size: 15 }), _jsxs("span", { children: ["You're in ", _jsx("b", { children: here.name }), " as staff. What you do here is on its record."] })] }))
42
- : null, _jsx("ul", { className: "copilotz-orgs-list", "aria-label": "Organizations", children: mine.map((org) => (_jsx("li", { children: _jsx(OrgRow, { org: org, person: orgs.person, current: org.id === orgs.current, close: close }) }, org.id))) }), waiting
47
+ ? (_jsxs("div", { className: "copilotz-orgs-staff", children: [_jsx(Icon, { name: "shield", size: 15 }), _jsxs("span", { children: ["You're in ", _jsx("b", { children: here.name }), " as staff. What you do here is on its record.", standing?.role
48
+ ? (_jsxs("button", { type: "button", "data-popover-item": true, className: "copilotz-orgs-staff-back", onClick: () => switchTo(here, false), children: ["Continue as ", standingName(standing)] }))
49
+ : null] })] }))
50
+ : null, failed ? _jsx(Notice, { tone: "destructive", role: "alert", children: failed }) : null, _jsx("ul", { className: "copilotz-orgs-list", "aria-label": "Organizations", children: mine.map((org) => (_jsx("li", { children: _jsx(OrgRow, { org: org, person: orgs.person, current: org.id === orgs.current, close: close }) }, org.id))) }), waiting
43
51
  ? (_jsxs("section", { className: "copilotz-orgs-invites", "aria-labelledby": "copilotz-orgs-invites", children: [_jsxs("h3", { id: "copilotz-orgs-invites", children: ["Invitations ", _jsx(Badge, { tone: "primary", children: waiting })] }), _jsx("ul", { children: orgs.invites.map((invite) => (_jsx("li", { children: _jsx(InviteRow, { invite: invite, close: close }) }, invite.id))) })] }))
44
52
  : null, _jsxs("div", { className: "copilotz-orgs-actions", children: [_jsxs("button", { type: "button", "data-popover-item": true, className: "copilotz-orgs-action", onClick: () => {
45
53
  close();
46
54
  onNew();
47
55
  }, children: [_jsx("span", { className: "copilotz-orgs-icon copilotz-orgs-icon-new", children: _jsx(Icon, { name: "plus", size: 15 }) }), "New organization\u2026"] }), here && (runs(standing) || standing?.role)
48
56
  ? (_jsxs("a", { "data-popover-item": true, className: "copilotz-orgs-action", href: "/org", onClick: close, children: [_jsx("span", { className: "copilotz-orgs-icon", children: _jsx(Icon, { name: "settings", size: 15 }) }), runs(standing) ? "Organization settings" : "About this organization"] }))
57
+ : null, orgs.staff && here && !staff
58
+ ? (_jsxs("button", { type: "button", "data-popover-item": true, className: "copilotz-orgs-action", onClick: () => switchTo(here, true), children: [_jsx("span", { className: "copilotz-orgs-icon", children: _jsx(Icon, { name: "shield", size: 15 }) }), "Enter as staff"] }))
49
59
  : null, orgs.staff
50
60
  ? (_jsxs("a", { "data-popover-item": true, className: "copilotz-orgs-action", href: "/console", onClick: close, children: [_jsx("span", { className: "copilotz-orgs-icon", children: _jsx(Icon, { name: "server", size: 15 }) }), "All orgs (console)"] }))
51
61
  : null] })] })) }));