@korso/shepherd-ui 0.5.1 → 0.6.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.
package/dist/lib/index.js CHANGED
@@ -1,99 +1,99 @@
1
- import { u as A, d as I, f as O, D as G } from "./Dashboard-qipRa5MO.js";
2
- import { E as ce, S as de, a as ue, c as he } from "./Dashboard-qipRa5MO.js";
3
- import { jsxs as n, jsx as e, Fragment as F } from "react/jsx-runtime";
4
- import { useId as B, useRef as P, useState as a, useEffect as U, useCallback as K } from "react";
5
- function D(i) {
6
- return (i.trim()[0] ?? "?").toUpperCase();
1
+ import { u as B, d as S, S as G, f as O, D as K } from "./Dashboard-D7tbhMwK.js";
2
+ import { E as ue, a as he, c as me } from "./Dashboard-D7tbhMwK.js";
3
+ import { jsxs as n, jsx as e, Fragment as W } from "react/jsx-runtime";
4
+ import { useId as $, useRef as F, useState as i, useEffect as A, useCallback as Y } from "react";
5
+ function U(a) {
6
+ return (a.trim()[0] ?? "?").toUpperCase();
7
7
  }
8
- function Y({
9
- workspaces: i,
8
+ function J({
9
+ workspaces: a,
10
10
  selected: t,
11
- onSelect: d,
12
- onChanged: v,
13
- onMembersChanged: o
11
+ onSelect: o,
12
+ onChanged: y,
13
+ onMembersChanged: l
14
14
  }) {
15
- const h = A(), m = B(), p = P(null), [l, y] = a(!1), [b, w] = a("menu"), [g, N] = a(""), [u, C] = a(""), [E, r] = a(null), [k, _] = a(!1);
16
- function S() {
17
- y(!1), w("menu"), N(""), C(""), r(null);
15
+ const b = B(), c = $(), f = F(null), [r, v] = i(!1), [h, m] = i("menu"), [g, k] = i(""), [u, _] = i(""), [E, s] = i(null), [N, I] = i(!1);
16
+ function C() {
17
+ v(!1), m("menu"), k(""), _(""), s(null);
18
18
  }
19
- U(() => {
20
- if (!l) return;
21
- function s($) {
22
- p.current && !p.current.contains($.target) && S();
19
+ A(() => {
20
+ if (!r) return;
21
+ function d(j) {
22
+ f.current && !f.current.contains(j.target) && C();
23
23
  }
24
- function R($) {
25
- $.key === "Escape" && S();
24
+ function x(j) {
25
+ j.key === "Escape" && C();
26
26
  }
27
- return document.addEventListener("mousedown", s), document.addEventListener("keydown", R), () => {
28
- document.removeEventListener("mousedown", s), document.removeEventListener("keydown", R);
27
+ return document.addEventListener("mousedown", d), document.addEventListener("keydown", x), () => {
28
+ document.removeEventListener("mousedown", d), document.removeEventListener("keydown", x);
29
29
  };
30
- }, [l]);
31
- async function x() {
32
- if (!(!g.trim() || k)) {
33
- _(!0), r(null);
30
+ }, [r]);
31
+ async function T() {
32
+ if (!(!g.trim() || N)) {
33
+ I(!0), s(null);
34
34
  try {
35
- const s = await h.createWorkspace({ name: g.trim() });
36
- d(s.id), v(), S();
37
- } catch (s) {
38
- r(I(s));
35
+ const d = await b.createWorkspace({ name: g.trim() });
36
+ o(d.id), y(), C();
37
+ } catch (d) {
38
+ s(S(d));
39
39
  } finally {
40
- _(!1);
40
+ I(!1);
41
41
  }
42
42
  }
43
43
  }
44
- async function L() {
45
- if (!(!u.trim() || k)) {
46
- _(!0), r(null);
44
+ async function R() {
45
+ if (!(!u.trim() || N)) {
46
+ I(!0), s(null);
47
47
  try {
48
- const s = await h.redeemInvite(u.trim());
49
- d(s.workspace.id), v(), o == null || o(), S();
50
- } catch (s) {
51
- r(I(s));
48
+ const d = await b.redeemInvite(u.trim());
49
+ o(d.workspace.id), y(), l == null || l(), C();
50
+ } catch (d) {
51
+ s(S(d));
52
52
  } finally {
53
- _(!1);
53
+ I(!1);
54
54
  }
55
55
  }
56
56
  }
57
- const f = t !== null, T = t ? t.name : "Get started";
58
- return /* @__PURE__ */ n("div", { className: "ws-switcher", ref: p, children: [
57
+ const w = t !== null, L = t ? t.name : "Get started";
58
+ return /* @__PURE__ */ n("div", { className: "ws-switcher", ref: f, children: [
59
59
  /* @__PURE__ */ n(
60
60
  "button",
61
61
  {
62
62
  type: "button",
63
- className: "ws-trig" + (f ? "" : " ws-trig--empty"),
63
+ className: "ws-trig" + (w ? "" : " ws-trig--empty"),
64
64
  "aria-haspopup": "menu",
65
- "aria-expanded": l,
66
- "aria-controls": l ? m : void 0,
67
- onClick: () => l ? S() : y(!0),
65
+ "aria-expanded": r,
66
+ "aria-controls": r ? c : void 0,
67
+ onClick: () => r ? C() : v(!0),
68
68
  children: [
69
- f ? /* @__PURE__ */ e("span", { className: "ws-avatar", "aria-hidden": "true", children: D(T) }) : /* @__PURE__ */ e("span", { className: "ws-plus", "aria-hidden": "true", children: "+" }),
70
- /* @__PURE__ */ e("span", { className: "ws-name", children: T }),
69
+ w ? /* @__PURE__ */ e("span", { className: "ws-avatar", "aria-hidden": "true", children: U(L) }) : /* @__PURE__ */ e("span", { className: "ws-plus", "aria-hidden": "true", children: "+" }),
70
+ /* @__PURE__ */ e("span", { className: "ws-name", children: L }),
71
71
  /* @__PURE__ */ e("span", { className: "ws-caret", "aria-hidden": "true", children: "▾" })
72
72
  ]
73
73
  }
74
74
  ),
75
- l && /* @__PURE__ */ n("div", { className: "ws-menu", id: m, role: "menu", children: [
76
- b === "menu" && /* @__PURE__ */ n(F, { children: [
77
- /* @__PURE__ */ e("p", { className: "ws-menu__head", children: f ? "Switch workspace" : "Your workspaces" }),
78
- i.length === 0 ? /* @__PURE__ */ e("p", { className: "ws-menu__none", children: "None yet" }) : /* @__PURE__ */ e("ul", { className: "ws-menu__list", children: i.map((s) => {
79
- const R = s.id === (t == null ? void 0 : t.id);
75
+ r && /* @__PURE__ */ n("div", { className: "ws-menu", id: c, role: "menu", children: [
76
+ h === "menu" && /* @__PURE__ */ n(W, { children: [
77
+ /* @__PURE__ */ e("p", { className: "ws-menu__head", children: w ? "Switch workspace" : "Your workspaces" }),
78
+ a.length === 0 ? /* @__PURE__ */ e("p", { className: "ws-menu__none", children: "None yet" }) : /* @__PURE__ */ e("ul", { className: "ws-menu__list", children: a.map((d) => {
79
+ const x = d.id === (t == null ? void 0 : t.id);
80
80
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ n(
81
81
  "button",
82
82
  {
83
83
  type: "button",
84
84
  role: "menuitemradio",
85
- "aria-checked": R,
86
- className: "ws-mi" + (R ? " ws-mi--on" : ""),
85
+ "aria-checked": x,
86
+ className: "ws-mi" + (x ? " ws-mi--on" : ""),
87
87
  onClick: () => {
88
- d(s.id), S();
88
+ o(d.id), C();
89
89
  },
90
90
  children: [
91
- /* @__PURE__ */ e("span", { className: "ws-avatar ws-avatar--sm", "aria-hidden": "true", children: D(s.name) }),
92
- /* @__PURE__ */ e("span", { className: "ws-mi__name", children: s.name }),
93
- R && /* @__PURE__ */ e("span", { className: "ws-mi__check", "aria-hidden": "true", children: "✓" })
91
+ /* @__PURE__ */ e("span", { className: "ws-avatar ws-avatar--sm", "aria-hidden": "true", children: U(d.name) }),
92
+ /* @__PURE__ */ e("span", { className: "ws-mi__name", children: d.name }),
93
+ x && /* @__PURE__ */ e("span", { className: "ws-mi__check", "aria-hidden": "true", children: "✓" })
94
94
  ]
95
95
  }
96
- ) }, s.id);
96
+ ) }, d.id);
97
97
  }) }),
98
98
  /* @__PURE__ */ n("div", { className: "ws-menu__actions", children: [
99
99
  /* @__PURE__ */ e(
@@ -103,7 +103,7 @@ function Y({
103
103
  role: "menuitem",
104
104
  className: "ws-action",
105
105
  onClick: () => {
106
- r(null), w("create");
106
+ s(null), m("create");
107
107
  },
108
108
  children: "+ Create workspace"
109
109
  }
@@ -115,63 +115,63 @@ function Y({
115
115
  role: "menuitem",
116
116
  className: "ws-action",
117
117
  onClick: () => {
118
- r(null), w("join");
118
+ s(null), m("join");
119
119
  },
120
120
  children: "⎘ Join with a code"
121
121
  }
122
122
  )
123
123
  ] })
124
124
  ] }),
125
- b === "create" && /* @__PURE__ */ n(
125
+ h === "create" && /* @__PURE__ */ n(
126
126
  "form",
127
127
  {
128
128
  className: "ws-form",
129
- onSubmit: (s) => {
130
- s.preventDefault(), x();
129
+ onSubmit: (d) => {
130
+ d.preventDefault(), T();
131
131
  },
132
132
  children: [
133
- /* @__PURE__ */ e("label", { htmlFor: `${m}-name`, children: "New workspace name" }),
133
+ /* @__PURE__ */ e("label", { htmlFor: `${c}-name`, children: "New workspace name" }),
134
134
  /* @__PURE__ */ e(
135
135
  "input",
136
136
  {
137
- id: `${m}-name`,
137
+ id: `${c}-name`,
138
138
  type: "text",
139
139
  placeholder: "e.g. Acme Engineering",
140
140
  value: g,
141
141
  autoFocus: !0,
142
- onChange: (s) => N(s.target.value)
142
+ onChange: (d) => k(d.target.value)
143
143
  }
144
144
  ),
145
145
  /* @__PURE__ */ n("div", { className: "ws-form__row", children: [
146
- /* @__PURE__ */ e("button", { type: "button", className: "ws-form__back", onClick: () => w("menu"), children: "Back" }),
147
- /* @__PURE__ */ e("button", { type: "submit", disabled: k || !g.trim(), children: "Create" })
146
+ /* @__PURE__ */ e("button", { type: "button", className: "ws-form__back", onClick: () => m("menu"), children: "Back" }),
147
+ /* @__PURE__ */ e("button", { type: "submit", disabled: N || !g.trim(), children: "Create" })
148
148
  ] })
149
149
  ]
150
150
  }
151
151
  ),
152
- b === "join" && /* @__PURE__ */ n(
152
+ h === "join" && /* @__PURE__ */ n(
153
153
  "form",
154
154
  {
155
155
  className: "ws-form",
156
- onSubmit: (s) => {
157
- s.preventDefault(), L();
156
+ onSubmit: (d) => {
157
+ d.preventDefault(), R();
158
158
  },
159
159
  children: [
160
- /* @__PURE__ */ e("label", { htmlFor: `${m}-code`, children: "Invite code" }),
160
+ /* @__PURE__ */ e("label", { htmlFor: `${c}-code`, children: "Invite code" }),
161
161
  /* @__PURE__ */ e(
162
162
  "input",
163
163
  {
164
- id: `${m}-code`,
164
+ id: `${c}-code`,
165
165
  type: "text",
166
166
  placeholder: "Paste an invite code",
167
167
  value: u,
168
168
  autoFocus: !0,
169
- onChange: (s) => C(s.target.value)
169
+ onChange: (d) => _(d.target.value)
170
170
  }
171
171
  ),
172
172
  /* @__PURE__ */ n("div", { className: "ws-form__row", children: [
173
- /* @__PURE__ */ e("button", { type: "button", className: "ws-form__back", onClick: () => w("menu"), children: "Back" }),
174
- /* @__PURE__ */ e("button", { type: "submit", disabled: k || !u.trim(), children: "Join" })
173
+ /* @__PURE__ */ e("button", { type: "button", className: "ws-form__back", onClick: () => m("menu"), children: "Back" }),
174
+ /* @__PURE__ */ e("button", { type: "submit", disabled: N || !u.trim(), children: "Join" })
175
175
  ] })
176
176
  ]
177
177
  }
@@ -180,195 +180,314 @@ function Y({
180
180
  ] })
181
181
  ] });
182
182
  }
183
- function J({ workspace: i, onLeft: t }) {
184
- const d = A(), v = B(), [o, h] = a(null), [m, p] = a(!1);
185
- async function l() {
186
- if (!m) {
187
- p(!0), h(null);
183
+ function V({
184
+ workspaceName: a,
185
+ busy: t,
186
+ error: o,
187
+ onConfirm: y,
188
+ onCancel: l
189
+ }) {
190
+ const b = $(), c = $(), [f, r] = i(""), v = F(null);
191
+ A(() => {
192
+ var m;
193
+ (m = v.current) == null || m.focus();
194
+ }, []), A(() => {
195
+ function m(g) {
196
+ g.key === "Escape" && !t && l();
197
+ }
198
+ return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
199
+ }, [t, l]);
200
+ const h = f === a;
201
+ return /* @__PURE__ */ e(
202
+ "div",
203
+ {
204
+ className: "shepherd-modal__backdrop",
205
+ onClick: () => {
206
+ t || l();
207
+ },
208
+ children: /* @__PURE__ */ n(
209
+ "div",
210
+ {
211
+ className: "shepherd-modal",
212
+ role: "dialog",
213
+ "aria-modal": "true",
214
+ "aria-labelledby": b,
215
+ "aria-describedby": c,
216
+ onClick: (m) => m.stopPropagation(),
217
+ children: [
218
+ /* @__PURE__ */ e("h3", { id: b, children: "Delete workspace" }),
219
+ /* @__PURE__ */ n("p", { id: c, className: "shepherd-modal__body", children: [
220
+ "This permanently deletes ",
221
+ /* @__PURE__ */ e("b", { children: a }),
222
+ " and all of its data — agents, sessions, tasks, announcements, change history, tokens, invites, and members. This cannot be undone."
223
+ ] }),
224
+ /* @__PURE__ */ n("label", { htmlFor: `${b}-input`, className: "shepherd-modal__label", children: [
225
+ "Type ",
226
+ /* @__PURE__ */ e("b", { children: a }),
227
+ " to confirm"
228
+ ] }),
229
+ /* @__PURE__ */ e(
230
+ "input",
231
+ {
232
+ id: `${b}-input`,
233
+ ref: v,
234
+ type: "text",
235
+ value: f,
236
+ autoComplete: "off",
237
+ disabled: t,
238
+ onChange: (m) => r(m.target.value)
239
+ }
240
+ ),
241
+ o && /* @__PURE__ */ e("p", { role: "alert", children: o }),
242
+ /* @__PURE__ */ n("div", { className: "shepherd-modal__actions", children: [
243
+ /* @__PURE__ */ e("button", { type: "button", onClick: l, disabled: t, children: "Cancel" }),
244
+ /* @__PURE__ */ e(
245
+ "button",
246
+ {
247
+ type: "button",
248
+ className: "danger",
249
+ onClick: y,
250
+ disabled: !h || t,
251
+ children: t ? "Deleting…" : "Delete workspace"
252
+ }
253
+ )
254
+ ] })
255
+ ]
256
+ }
257
+ )
258
+ }
259
+ );
260
+ }
261
+ function X({ workspace: a, onLeft: t, onDeleted: o }) {
262
+ const y = B(), l = $(), [b, c] = i(null), [f, r] = i(!1), [v, h] = i(!1), [m, g] = i(!1), [k, u] = i(!1), [_, E] = i(null), s = a.role === "admin";
263
+ async function N() {
264
+ if (!f) {
265
+ r(!0), c(null), h(!1);
188
266
  try {
189
- await d.leave(i.id), t == null || t();
190
- } catch (y) {
191
- h(I(y));
267
+ await y.leave(a.id), t == null || t();
268
+ } catch (C) {
269
+ c(S(C)), C instanceof G && C.status === 409 && h(!0);
192
270
  } finally {
193
- p(!1);
271
+ r(!1);
194
272
  }
195
273
  }
196
274
  }
197
- return /* @__PURE__ */ n("section", { className: "shepherd-general", "aria-labelledby": v, children: [
275
+ async function I() {
276
+ if (!k) {
277
+ u(!0), E(null);
278
+ try {
279
+ await y.deleteWorkspace(a.id), g(!1), o == null || o();
280
+ } catch (C) {
281
+ E(S(C));
282
+ } finally {
283
+ u(!1);
284
+ }
285
+ }
286
+ }
287
+ return /* @__PURE__ */ n("section", { className: "shepherd-general", "aria-labelledby": l, children: [
198
288
  /* @__PURE__ */ n("div", { className: "card-head", children: [
199
- /* @__PURE__ */ e("h3", { id: v, children: "General" }),
289
+ /* @__PURE__ */ e("h3", { id: l, children: "General" }),
200
290
  /* @__PURE__ */ e("p", { className: "card-sub", children: "Your active workspace and its settings." })
201
291
  ] }),
202
292
  /* @__PURE__ */ n("div", { className: "card-body", children: [
203
- o && /* @__PURE__ */ e("p", { role: "alert", children: o }),
293
+ b && /* @__PURE__ */ e("p", { role: "alert", children: b }),
294
+ v && s && /* @__PURE__ */ e("p", { className: "helper", children: "You're the last admin, so you can't leave. To remove this workspace entirely, delete it below." }),
204
295
  /* @__PURE__ */ n("div", { className: "field", children: [
205
296
  /* @__PURE__ */ e("label", { children: "Workspace name" }),
206
- /* @__PURE__ */ e("p", { className: "readonly-value", children: i.name })
297
+ /* @__PURE__ */ e("p", { className: "readonly-value", children: a.name })
207
298
  ] }),
208
299
  /* @__PURE__ */ n("div", { className: "field", children: [
209
300
  /* @__PURE__ */ e("label", { children: "Your role" }),
210
- /* @__PURE__ */ e("p", { className: "readonly-value", children: i.role })
301
+ /* @__PURE__ */ e("p", { className: "readonly-value", children: a.role })
211
302
  ] }),
212
303
  /* @__PURE__ */ n("div", { className: "field leave", children: [
213
304
  /* @__PURE__ */ e("label", { children: "Leave workspace" }),
214
305
  /* @__PURE__ */ e("p", { className: "helper", children: "Remove yourself from this workspace. You'll need a new invite to rejoin." }),
215
- /* @__PURE__ */ e("button", { type: "button", className: "danger", onClick: () => void l(), disabled: m, children: "Leave workspace" })
306
+ /* @__PURE__ */ e("button", { type: "button", className: "danger", onClick: () => void N(), disabled: f, children: "Leave workspace" })
307
+ ] }),
308
+ s && /* @__PURE__ */ n("div", { className: "field delete", children: [
309
+ /* @__PURE__ */ e("label", { children: "Delete workspace" }),
310
+ /* @__PURE__ */ e("p", { className: "helper", children: "Permanently delete this workspace and all of its data. This cannot be undone." }),
311
+ /* @__PURE__ */ e(
312
+ "button",
313
+ {
314
+ type: "button",
315
+ className: "danger",
316
+ onClick: () => {
317
+ E(null), g(!0);
318
+ },
319
+ disabled: k,
320
+ children: "Delete workspace"
321
+ }
322
+ )
216
323
  ] })
217
- ] })
324
+ ] }),
325
+ m && /* @__PURE__ */ e(
326
+ V,
327
+ {
328
+ workspaceName: a.name,
329
+ busy: k,
330
+ error: _,
331
+ onConfirm: () => void I(),
332
+ onCancel: () => {
333
+ k || g(!1);
334
+ }
335
+ }
336
+ )
218
337
  ] });
219
338
  }
220
- function V({ workspaceId: i, refreshKey: t = 0, canRemove: d = !1 }) {
221
- const v = A(), o = B(), [h, m] = a([]), [p, l] = a(null), [y, b] = a(null), [w, g] = a(!0), [N, u] = a(null);
222
- async function C({ keepError: r = !1 } = {}) {
223
- r || l(null);
339
+ function q({ workspaceId: a, refreshKey: t = 0, canRemove: o = !1 }) {
340
+ const y = B(), l = $(), [b, c] = i([]), [f, r] = i(null), [v, h] = i(null), [m, g] = i(!0), [k, u] = i(null);
341
+ async function _({ keepError: s = !1 } = {}) {
342
+ s || r(null);
224
343
  try {
225
- const k = await v.listMembers(i);
226
- m(k.members);
227
- } catch (k) {
228
- l(I(k));
344
+ const N = await y.listMembers(a);
345
+ c(N.members);
346
+ } catch (N) {
347
+ r(S(N));
229
348
  } finally {
230
349
  g(!1);
231
350
  }
232
351
  }
233
- U(() => {
234
- g(!0), C();
235
- }, [v, i, t]);
236
- async function E(r, k) {
237
- if (!N) {
238
- u(r), l(null), b(null), m((_) => _.filter((S) => S.accountId !== r));
352
+ A(() => {
353
+ g(!0), _();
354
+ }, [y, a, t]);
355
+ async function E(s, N) {
356
+ if (!k) {
357
+ u(s), r(null), h(null), c((I) => I.filter((C) => C.accountId !== s));
239
358
  try {
240
- await v.removeMember(i, r), b(`Removed ${k}`);
241
- } catch (_) {
242
- l(I(_)), C({ keepError: !0 });
359
+ await y.removeMember(a, s), h(`Removed ${N}`);
360
+ } catch (I) {
361
+ r(S(I)), _({ keepError: !0 });
243
362
  } finally {
244
363
  u(null);
245
364
  }
246
365
  }
247
366
  }
248
- return /* @__PURE__ */ n("section", { className: "shepherd-members", "aria-labelledby": o, children: [
249
- /* @__PURE__ */ e("div", { className: "card-head", children: /* @__PURE__ */ e("h3", { id: o, children: "Members" }) }),
367
+ return /* @__PURE__ */ n("section", { className: "shepherd-members", "aria-labelledby": l, children: [
368
+ /* @__PURE__ */ e("div", { className: "card-head", children: /* @__PURE__ */ e("h3", { id: l, children: "Members" }) }),
250
369
  /* @__PURE__ */ n("div", { className: "card-body", children: [
251
- p && /* @__PURE__ */ e("p", { role: "alert", children: p }),
252
- y && /* @__PURE__ */ e("p", { role: "status", children: y }),
253
- w ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : h.length === 0 ? /* @__PURE__ */ e("p", { children: "No members." }) : /* @__PURE__ */ e("ul", { children: h.map((r) => {
254
- const k = r.displayName ?? r.githubLogin ?? r.email ?? r.accountId;
370
+ f && /* @__PURE__ */ e("p", { role: "alert", children: f }),
371
+ v && /* @__PURE__ */ e("p", { role: "status", children: v }),
372
+ m ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ e("p", { children: "No members." }) : /* @__PURE__ */ e("ul", { children: b.map((s) => {
373
+ const N = s.displayName ?? s.githubLogin ?? s.email ?? s.accountId;
255
374
  return /* @__PURE__ */ n("li", { children: [
256
- /* @__PURE__ */ e("span", { children: k }),
257
- /* @__PURE__ */ e("span", { className: "role", children: r.role }),
258
- d && /* @__PURE__ */ e(
375
+ /* @__PURE__ */ e("span", { children: N }),
376
+ /* @__PURE__ */ e("span", { className: "role", children: s.role }),
377
+ o && /* @__PURE__ */ e(
259
378
  "button",
260
379
  {
261
380
  type: "button",
262
- "aria-label": `Remove ${k}`,
263
- onClick: () => void E(r.accountId, k),
264
- disabled: N === r.accountId,
381
+ "aria-label": `Remove ${N}`,
382
+ onClick: () => void E(s.accountId, N),
383
+ disabled: k === s.accountId,
265
384
  children: "Remove"
266
385
  }
267
386
  )
268
- ] }, r.accountId);
387
+ ] }, s.accountId);
269
388
  }) })
270
389
  ] })
271
390
  ] });
272
391
  }
273
- function X({ workspaceId: i, onMembersChanged: t }) {
274
- const d = A(), v = B(), [o, h] = a(null), [m, p] = a(null), [l, y] = a(!1), [b, w] = a(""), [g, N] = a(null), [u, C] = a(!1), [E, r] = a(null);
275
- U(() => {
276
- h(null), N(null);
277
- }, [i]);
278
- async function k() {
279
- if (!l) {
280
- y(!0), p(null);
392
+ function z({ workspaceId: a, onMembersChanged: t }) {
393
+ const o = B(), y = $(), [l, b] = i(null), [c, f] = i(null), [r, v] = i(!1), [h, m] = i(""), [g, k] = i(null), [u, _] = i(!1), [E, s] = i(null);
394
+ A(() => {
395
+ b(null), k(null);
396
+ }, [a]);
397
+ async function N() {
398
+ if (!r) {
399
+ v(!0), f(null);
281
400
  try {
282
- const f = await d.createInvite(i, {});
283
- h(f), t == null || t();
284
- } catch (f) {
285
- p(I(f));
401
+ const w = await o.createInvite(a, {});
402
+ b(w), t == null || t();
403
+ } catch (w) {
404
+ f(S(w));
286
405
  } finally {
287
- y(!1);
406
+ v(!1);
288
407
  }
289
408
  }
290
409
  }
291
- async function _() {
292
- if (!(!o || l)) {
293
- y(!0), p(null);
410
+ async function I() {
411
+ if (!(!l || r)) {
412
+ v(!0), f(null);
294
413
  try {
295
- await d.revokeInvite(i, o.code), h(null);
296
- } catch (f) {
297
- p(I(f));
414
+ await o.revokeInvite(a, l.code), b(null);
415
+ } catch (w) {
416
+ f(S(w));
298
417
  } finally {
299
- y(!1);
418
+ v(!1);
300
419
  }
301
420
  }
302
421
  }
303
- async function S() {
304
- if (!(!b.trim() || u)) {
305
- C(!0), N(null);
422
+ async function C() {
423
+ if (!(!h.trim() || u)) {
424
+ _(!0), k(null);
306
425
  try {
307
- const f = await d.inviteByEmail(i, b.trim());
308
- N(`Invite sent to ${f.email}.`), w(""), t == null || t();
309
- } catch (f) {
310
- N(I(f));
426
+ const w = await o.inviteByEmail(a, h.trim());
427
+ k(`Invite sent to ${w.email}.`), m(""), t == null || t();
428
+ } catch (w) {
429
+ k(S(w));
311
430
  } finally {
312
- C(!1);
431
+ _(!1);
313
432
  }
314
433
  }
315
434
  }
316
- const x = o ? `${window.location.origin}/shepherd/join/${encodeURIComponent(o.code)}` : null;
317
- async function L(f, T) {
318
- await navigator.clipboard.writeText(T), r(f), setTimeout(() => r((s) => s === f ? null : s), 2e3);
435
+ const T = l ? `${window.location.origin}/shepherd/join/${encodeURIComponent(l.code)}` : null;
436
+ async function R(w, L) {
437
+ await navigator.clipboard.writeText(L), s(w), setTimeout(() => s((d) => d === w ? null : d), 2e3);
319
438
  }
320
- return /* @__PURE__ */ n("section", { className: "shepherd-invites", "aria-labelledby": v, children: [
439
+ return /* @__PURE__ */ n("section", { className: "shepherd-invites", "aria-labelledby": y, children: [
321
440
  /* @__PURE__ */ n("div", { className: "card-head", children: [
322
- /* @__PURE__ */ e("h3", { id: v, children: "Invite people" }),
441
+ /* @__PURE__ */ e("h3", { id: y, children: "Invite people" }),
323
442
  /* @__PURE__ */ e("p", { className: "card-sub", children: "Share a code, or send a one-time join link by email." })
324
443
  ] }),
325
444
  /* @__PURE__ */ n("div", { className: "card-body", children: [
326
- m && /* @__PURE__ */ e("p", { role: "alert", children: m }),
445
+ c && /* @__PURE__ */ e("p", { role: "alert", children: c }),
327
446
  /* @__PURE__ */ n("div", { className: "field invites", children: [
328
447
  /* @__PURE__ */ e("label", { children: "Invite by code" }),
329
448
  /* @__PURE__ */ e("p", { className: "helper", children: "Anyone with the code can join this workspace." }),
330
- o && /* @__PURE__ */ n("div", { className: "invite-result", children: [
449
+ l && /* @__PURE__ */ n("div", { className: "invite-result", children: [
331
450
  /* @__PURE__ */ n("div", { className: "invite-result__head", children: [
332
451
  /* @__PURE__ */ e("span", { className: "invite-result__eyebrow", children: "Invite code" }),
333
- /* @__PURE__ */ e("span", { className: "invite-uses", children: o.maxUses === null ? `${o.useCount} uses` : `${o.useCount} / ${o.maxUses} uses` }),
452
+ /* @__PURE__ */ e("span", { className: "invite-uses", children: l.maxUses === null ? `${l.useCount} uses` : `${l.useCount} / ${l.maxUses} uses` }),
334
453
  /* @__PURE__ */ e(
335
454
  "button",
336
455
  {
337
456
  type: "button",
338
457
  className: "link-btn",
339
458
  "aria-label": "Revoke invite",
340
- onClick: () => void _(),
341
- disabled: l,
459
+ onClick: () => void I(),
460
+ disabled: r,
342
461
  children: "Revoke"
343
462
  }
344
463
  )
345
464
  ] }),
346
465
  /* @__PURE__ */ n("div", { className: "invite-result__copyrow", children: [
347
- /* @__PURE__ */ e("code", { children: o.code }),
466
+ /* @__PURE__ */ e("code", { children: l.code }),
348
467
  /* @__PURE__ */ e(
349
468
  "button",
350
469
  {
351
470
  type: "button",
352
471
  className: "copy-btn",
353
- onClick: () => void L("code", o.code),
472
+ onClick: () => void R("code", l.code),
354
473
  children: E === "code" ? "Copied" : "Copy"
355
474
  }
356
475
  )
357
476
  ] }),
358
- x && /* @__PURE__ */ n("div", { className: "invite-result__copyrow invite-result__copyrow--link", children: [
359
- /* @__PURE__ */ e("a", { href: x, children: x }),
477
+ T && /* @__PURE__ */ n("div", { className: "invite-result__copyrow invite-result__copyrow--link", children: [
478
+ /* @__PURE__ */ e("a", { href: T, children: T }),
360
479
  /* @__PURE__ */ e(
361
480
  "button",
362
481
  {
363
482
  type: "button",
364
483
  className: "copy-btn",
365
- onClick: () => void L("link", x),
484
+ onClick: () => void R("link", T),
366
485
  children: E === "link" ? "Copied" : "Copy link"
367
486
  }
368
487
  )
369
488
  ] })
370
489
  ] }),
371
- /* @__PURE__ */ e("button", { type: "button", onClick: () => void k(), disabled: l, children: "Create invite" })
490
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void N(), disabled: r, children: "Create invite" })
372
491
  ] }),
373
492
  /* @__PURE__ */ n("div", { className: "field email-invite", children: [
374
493
  /* @__PURE__ */ e("label", { htmlFor: "invite-email", children: "Invite by email" }),
@@ -380,98 +499,98 @@ function X({ workspaceId: i, onMembersChanged: t }) {
380
499
  id: "invite-email",
381
500
  type: "email",
382
501
  placeholder: "name@example.com",
383
- value: b,
384
- onChange: (f) => w(f.target.value)
502
+ value: h,
503
+ onChange: (w) => m(w.target.value)
385
504
  }
386
505
  ),
387
- /* @__PURE__ */ e("button", { type: "button", onClick: () => void S(), disabled: u, children: "Send invite" })
506
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void C(), disabled: u, children: "Send invite" })
388
507
  ] }),
389
508
  g && /* @__PURE__ */ e("p", { className: "email-invite__status", children: g })
390
509
  ] })
391
510
  ] })
392
511
  ] });
393
512
  }
394
- const q = [
513
+ const Q = [
395
514
  { id: "claude", label: "Claude Code" },
396
515
  { id: "codex", label: "Codex" },
397
516
  { id: "pi", label: "Pi" },
398
517
  { id: "generic", label: "Generic (JSON)" }
399
- ], z = "shp_<paste-after-generating>", Q = {
518
+ ], Z = "shp_<paste-after-generating>", M = {
400
519
  claude: "claude mcp add shepherd -s user",
401
520
  codex: "codex mcp add shepherd",
402
521
  pi: "pi mcp add shepherd"
403
522
  };
404
- function Z(i, t) {
405
- const d = `created ${O(i.createdAt, t)}`, v = i.lastUsedAt ? `last used ${O(i.lastUsedAt, t)}` : "never used";
406
- return `${d} · ${v}`;
523
+ function ee(a, t) {
524
+ const o = `created ${O(a.createdAt, t)}`, y = a.lastUsedAt ? `last used ${O(a.lastUsedAt, t)}` : "never used";
525
+ return `${o} · ${y}`;
407
526
  }
408
- function M(i, t, d) {
409
- return i === "generic" ? JSON.stringify(
527
+ function ne(a, t, o) {
528
+ return a === "generic" ? JSON.stringify(
410
529
  {
411
530
  mcpServers: {
412
531
  shepherd: {
413
532
  command: "npx",
414
- args: ["-y", "@korso/shepherd"],
415
- env: { HUB_URL: t, SHEPHERD_TOKEN: d }
533
+ args: ["-y", "-p", "@korso/shepherd", "shepherd-mcp"],
534
+ env: { HUB_URL: t, SHEPHERD_TOKEN: o }
416
535
  }
417
536
  }
418
537
  },
419
538
  null,
420
539
  2
421
540
  ) : [
422
- Q[i],
541
+ M[a],
423
542
  `-e HUB_URL=${t}`,
424
- `-e SHEPHERD_TOKEN=${d}`,
425
- "-- npx -y @korso/shepherd"
543
+ `-e SHEPHERD_TOKEN=${o}`,
544
+ "-- npx -y -p @korso/shepherd shepherd-mcp"
426
545
  ].join(" ");
427
546
  }
428
- function ee({ hubUrl: i }) {
429
- const t = A(), d = i ?? t.baseUrl, v = B(), [o, h] = a("claude"), [m, p] = a(""), [l, y] = a(null), [b, w] = a([]), [g, N] = a(null), [u, C] = a(null), [E, r] = a(!1), [k, _] = a(!1), [S, x] = a(!0), [L, f] = a(null);
430
- async function T() {
547
+ function te({ hubUrl: a }) {
548
+ const t = B(), o = a ?? t.baseUrl, y = $(), [l, b] = i("claude"), [c, f] = i(""), [r, v] = i(null), [h, m] = i([]), [g, k] = i(null), [u, _] = i(null), [E, s] = i(!1), [N, I] = i(!1), [C, T] = i(!0), [R, w] = i(null);
549
+ async function L() {
431
550
  try {
432
- const c = await t.listAccountTokens();
433
- w(c.tokens);
434
- } catch (c) {
435
- N(I(c));
551
+ const p = await t.listAccountTokens();
552
+ m(p.tokens);
553
+ } catch (p) {
554
+ k(S(p));
436
555
  } finally {
437
- x(!1);
556
+ T(!1);
438
557
  }
439
558
  }
440
- U(() => {
441
- x(!0), T();
559
+ A(() => {
560
+ T(!0), L();
442
561
  }, [t]);
443
- async function s() {
444
- r(!0), N(null);
562
+ async function d() {
563
+ s(!0), k(null);
445
564
  try {
446
- const c = await t.mintAccountToken(
447
- m.trim() ? { name: m.trim() } : {}
565
+ const p = await t.mintAccountToken(
566
+ c.trim() ? { name: c.trim() } : {}
448
567
  );
449
- y(c.token), p(""), await T();
450
- } catch (c) {
451
- N(I(c));
568
+ v(p.token), f(""), await L();
569
+ } catch (p) {
570
+ k(S(p));
452
571
  } finally {
453
- r(!1);
572
+ s(!1);
454
573
  }
455
574
  }
456
- async function R(c) {
457
- if (!L) {
458
- f(c), N(null), C(null);
575
+ async function x(p) {
576
+ if (!R) {
577
+ w(p), k(null), _(null);
459
578
  try {
460
- await t.revokeAccountToken(c), w((j) => j.filter((W) => W.id !== c)), C("Token revoked");
461
- } catch (j) {
462
- N(I(j));
579
+ await t.revokeAccountToken(p), m((D) => D.filter((H) => H.id !== p)), _("Token revoked");
580
+ } catch (D) {
581
+ k(S(D));
463
582
  } finally {
464
- f(null);
583
+ w(null);
465
584
  }
466
585
  }
467
586
  }
468
- const $ = M(o, d, l ?? z);
469
- async function H() {
470
- await navigator.clipboard.writeText($), _(!0), setTimeout(() => _(!1), 2e3);
587
+ const j = ne(l, o, r ?? Z);
588
+ async function P() {
589
+ await navigator.clipboard.writeText(j), I(!0), setTimeout(() => I(!1), 2e3);
471
590
  }
472
- return /* @__PURE__ */ n("section", { className: "shepherd-connect-agent", "aria-labelledby": v, children: [
591
+ return /* @__PURE__ */ n("section", { className: "shepherd-connect-agent", "aria-labelledby": y, children: [
473
592
  /* @__PURE__ */ n("div", { className: "card-head", children: [
474
- /* @__PURE__ */ e("h3", { id: v, children: "Connect your agent" }),
593
+ /* @__PURE__ */ e("h3", { id: y, children: "Connect your agent" }),
475
594
  /* @__PURE__ */ e("p", { className: "card-sub", children: "Generate a token — it works across all your workspaces — then paste the command into your coding tool." }),
476
595
  /* @__PURE__ */ e("p", { className: "card-sub", children: "The first time the agent opens a repo, it'll ask which workspace to coordinate that repo with." })
477
596
  ] }),
@@ -482,9 +601,9 @@ function ee({ hubUrl: i }) {
482
601
  "select",
483
602
  {
484
603
  id: "connect-tool",
485
- value: o,
486
- onChange: (c) => h(c.target.value),
487
- children: q.map((c) => /* @__PURE__ */ e("option", { value: c.id, children: c.label }, c.id))
604
+ value: l,
605
+ onChange: (p) => b(p.target.value),
606
+ children: Q.map((p) => /* @__PURE__ */ e("option", { value: p.id, children: p.label }, p.id))
488
607
  }
489
608
  )
490
609
  ] }),
@@ -496,28 +615,28 @@ function ee({ hubUrl: i }) {
496
615
  {
497
616
  id: "token-name",
498
617
  type: "text",
499
- value: m,
500
- onChange: (c) => p(c.target.value),
618
+ value: c,
619
+ onChange: (p) => f(p.target.value),
501
620
  placeholder: "e.g. laptop"
502
621
  }
503
622
  ),
504
- /* @__PURE__ */ e("button", { type: "button", onClick: () => void s(), disabled: E, children: "Generate token" })
623
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void d(), disabled: E, children: "Generate token" })
505
624
  ] })
506
625
  ] }),
507
626
  g && /* @__PURE__ */ e("p", { role: "alert", children: g }),
508
627
  u && /* @__PURE__ */ e("p", { role: "status", children: u }),
509
- l && /* @__PURE__ */ e("p", { className: "token-once", role: "status", children: "Copy this token now — it won't be shown again." }),
628
+ r && /* @__PURE__ */ e("p", { className: "token-once", role: "status", children: "Copy this token now — it won't be shown again." }),
510
629
  /* @__PURE__ */ n("div", { className: "install-command", children: [
511
- /* @__PURE__ */ e("pre", { "data-testid": "install-command", children: $ }),
630
+ /* @__PURE__ */ e("pre", { "data-testid": "install-command", children: j }),
512
631
  /* @__PURE__ */ e(
513
632
  "button",
514
633
  {
515
634
  type: "button",
516
635
  className: "install-command__copy",
517
- "aria-label": k ? "Copied" : "Copy command",
518
- title: k ? "Copied" : "Copy",
519
- onClick: () => void H(),
520
- children: k ? /* @__PURE__ */ e(
636
+ "aria-label": N ? "Copied" : "Copy command",
637
+ title: N ? "Copied" : "Copy",
638
+ onClick: () => void P(),
639
+ children: N ? /* @__PURE__ */ e(
521
640
  "svg",
522
641
  {
523
642
  width: "15",
@@ -553,111 +672,113 @@ function ee({ hubUrl: i }) {
553
672
  )
554
673
  ] }),
555
674
  /* @__PURE__ */ e("h4", { children: "Existing tokens" }),
556
- S ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ e("p", { children: "No tokens yet." }) : /* @__PURE__ */ e("ul", { children: b.map((c) => {
557
- const j = c.name ?? c.id;
675
+ C ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : h.length === 0 ? /* @__PURE__ */ e("p", { children: "No tokens yet." }) : /* @__PURE__ */ e("ul", { children: h.map((p) => {
676
+ const D = p.name ?? p.id;
558
677
  return /* @__PURE__ */ n("li", { children: [
559
- /* @__PURE__ */ e("span", { children: j }),
560
- /* @__PURE__ */ e("span", { className: "token-meta", children: Z(c, Date.now()) }),
561
- c.revokedAt ? /* @__PURE__ */ e("span", { className: "revoked", children: "revoked" }) : /* @__PURE__ */ e(
678
+ /* @__PURE__ */ e("span", { children: D }),
679
+ /* @__PURE__ */ e("span", { className: "token-meta", children: ee(p, Date.now()) }),
680
+ p.revokedAt ? /* @__PURE__ */ e("span", { className: "revoked", children: "revoked" }) : /* @__PURE__ */ e(
562
681
  "button",
563
682
  {
564
683
  type: "button",
565
- "aria-label": `Revoke token ${j}`,
566
- onClick: () => void R(c.id),
567
- disabled: L === c.id,
684
+ "aria-label": `Revoke token ${D}`,
685
+ onClick: () => void x(p.id),
686
+ disabled: R === p.id,
568
687
  children: "Revoke"
569
688
  }
570
689
  )
571
- ] }, c.id);
690
+ ] }, p.id);
572
691
  }) })
573
692
  ] })
574
693
  ] });
575
694
  }
576
- const ne = [
695
+ const ae = [
577
696
  { id: "general", label: "General" },
578
697
  { id: "members", label: "Members" },
579
698
  { id: "agent", label: "Agent" }
580
699
  ];
581
- function te({
582
- workspace: i,
700
+ function ie({
701
+ workspace: a,
583
702
  hubUrl: t,
584
- membersRefreshKey: d,
585
- onMembersChanged: v,
586
- onLeft: o
703
+ membersRefreshKey: o,
704
+ onMembersChanged: y,
705
+ onLeft: l,
706
+ onDeleted: b
587
707
  }) {
588
- const [h, m] = a("general"), p = i.role === "admin";
708
+ const [c, f] = i("general"), r = a.role === "admin";
589
709
  return /* @__PURE__ */ n("div", { className: "config-layout", children: [
590
- /* @__PURE__ */ e("nav", { className: "config-nav", "aria-label": "Configuration sections", children: ne.map(({ id: l, label: y }) => /* @__PURE__ */ e(
710
+ /* @__PURE__ */ e("nav", { className: "config-nav", "aria-label": "Configuration sections", children: ae.map(({ id: v, label: h }) => /* @__PURE__ */ e(
591
711
  "button",
592
712
  {
593
713
  type: "button",
594
- className: "config-nav__item" + (h === l ? " config-nav__item--on" : ""),
595
- "aria-current": h === l ? "page" : void 0,
596
- onClick: () => m(l),
597
- children: y
714
+ className: "config-nav__item" + (c === v ? " config-nav__item--on" : ""),
715
+ "aria-current": c === v ? "page" : void 0,
716
+ onClick: () => f(v),
717
+ children: h
598
718
  },
599
- l
719
+ v
600
720
  )) }),
601
721
  /* @__PURE__ */ n("div", { className: "config-panel", children: [
602
- h === "general" && /* @__PURE__ */ e(J, { workspace: i, onLeft: o }),
603
- h === "members" && /* @__PURE__ */ n(F, { children: [
722
+ c === "general" && /* @__PURE__ */ e(X, { workspace: a, onLeft: l, onDeleted: b }),
723
+ c === "members" && /* @__PURE__ */ n(W, { children: [
604
724
  /* @__PURE__ */ e(
605
- V,
725
+ q,
606
726
  {
607
- workspaceId: i.id,
608
- refreshKey: d,
609
- canRemove: p
727
+ workspaceId: a.id,
728
+ refreshKey: o,
729
+ canRemove: r
610
730
  }
611
731
  ),
612
- p && /* @__PURE__ */ e(X, { workspaceId: i.id, onMembersChanged: v })
732
+ r && /* @__PURE__ */ e(z, { workspaceId: a.id, onMembersChanged: y })
613
733
  ] }),
614
- h === "agent" && /* @__PURE__ */ e(ee, { hubUrl: t })
734
+ c === "agent" && /* @__PURE__ */ e(te, { hubUrl: t })
615
735
  ] })
616
736
  ] });
617
737
  }
618
- function re({ hubUrl: i }) {
619
- const t = A(), [d, v] = a({ status: "loading" }), [o, h] = a(null), [m, p] = a(0), l = K(async () => {
738
+ function oe({ hubUrl: a }) {
739
+ const t = B(), [o, y] = i({ status: "loading" }), [l, b] = i(null), [c, f] = i(0), r = Y(async () => {
620
740
  try {
621
741
  const u = await t.listWorkspaces();
622
- v({ status: "ready", workspaces: u.workspaces }), h(
623
- (C) => {
742
+ y({ status: "ready", workspaces: u.workspaces }), b(
743
+ (_) => {
624
744
  var E;
625
- return C && u.workspaces.some((r) => r.id === C) ? C : ((E = u.workspaces[0]) == null ? void 0 : E.id) ?? null;
745
+ return _ && u.workspaces.some((s) => s.id === _) ? _ : ((E = u.workspaces[0]) == null ? void 0 : E.id) ?? null;
626
746
  }
627
747
  );
628
748
  } catch (u) {
629
- v({ status: "error", message: I(u) });
749
+ y({ status: "error", message: S(u) });
630
750
  }
631
751
  }, [t]);
632
- U(() => {
633
- l();
634
- }, [l]);
635
- const y = d.status === "ready" ? d.workspaces : [], b = y.find((u) => u.id === o) ?? null;
636
- if (d.status === "loading")
752
+ A(() => {
753
+ r();
754
+ }, [r]);
755
+ const v = o.status === "ready" ? o.workspaces : [], h = v.find((u) => u.id === l) ?? null;
756
+ if (o.status === "loading")
637
757
  return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) });
638
- if (d.status === "error")
639
- return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e("p", { role: "alert", children: d.message }) });
640
- const w = y.length > 0, g = /* @__PURE__ */ e(
641
- Y,
758
+ if (o.status === "error")
759
+ return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e("p", { role: "alert", children: o.message }) });
760
+ const m = v.length > 0, g = /* @__PURE__ */ e(
761
+ J,
642
762
  {
643
- workspaces: y,
644
- selected: b,
645
- onSelect: h,
763
+ workspaces: v,
764
+ selected: h,
765
+ onSelect: b,
646
766
  onChanged: () => {
647
- l();
767
+ r();
648
768
  },
649
- onMembersChanged: () => p((u) => u + 1)
769
+ onMembersChanged: () => f((u) => u + 1)
650
770
  }
651
- ), N = /* @__PURE__ */ n("section", { className: "shepherd-config", "aria-labelledby": "config-heading", children: [
771
+ ), k = /* @__PURE__ */ n("section", { className: "shepherd-config", "aria-labelledby": "config-heading", children: [
652
772
  /* @__PURE__ */ e("h2", { id: "config-heading", children: "Configuration" }),
653
- b ? /* @__PURE__ */ e(
654
- te,
773
+ h ? /* @__PURE__ */ e(
774
+ ie,
655
775
  {
656
- workspace: b,
657
- hubUrl: i,
658
- membersRefreshKey: m,
659
- onMembersChanged: () => p((u) => u + 1),
660
- onLeft: () => void l()
776
+ workspace: h,
777
+ hubUrl: a,
778
+ membersRefreshKey: c,
779
+ onMembersChanged: () => f((u) => u + 1),
780
+ onLeft: () => void r(),
781
+ onDeleted: () => void r()
661
782
  }
662
783
  ) : /* @__PURE__ */ n("p", { className: "config-none", children: [
663
784
  "You're not in a workspace yet. Use the ",
@@ -666,28 +787,28 @@ function re({ hubUrl: i }) {
666
787
  ] })
667
788
  ] });
668
789
  return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e(
669
- G,
790
+ K,
670
791
  {
671
- workspaceId: b == null ? void 0 : b.id,
672
- config: N,
792
+ workspaceId: h == null ? void 0 : h.id,
793
+ config: k,
673
794
  switcher: g,
674
- hasWorkspace: w
795
+ hasWorkspace: m
675
796
  }
676
797
  ) });
677
798
  }
678
799
  export {
679
- te as ConfigPanel,
680
- ee as ConnectAgent,
681
- G as Dashboard,
682
- ce as EmptyState,
683
- J as GeneralSettings,
684
- X as Invites,
685
- V as Members,
686
- de as ShepherdClientError,
687
- ue as ShepherdClientProvider,
688
- re as ShepherdRoot,
689
- Y as WorkspaceSwitcher,
690
- he as createShepherdClient,
691
- I as describeError,
692
- A as useShepherdClient
800
+ ie as ConfigPanel,
801
+ te as ConnectAgent,
802
+ K as Dashboard,
803
+ ue as EmptyState,
804
+ X as GeneralSettings,
805
+ z as Invites,
806
+ q as Members,
807
+ G as ShepherdClientError,
808
+ he as ShepherdClientProvider,
809
+ oe as ShepherdRoot,
810
+ J as WorkspaceSwitcher,
811
+ me as createShepherdClient,
812
+ S as describeError,
813
+ B as useShepherdClient
693
814
  };