@korso/shepherd-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/ShepherdProvider.d.ts +12 -0
  2. package/dist/ShepherdProvider.js +33 -0
  3. package/dist/ShepherdProvider.test.d.ts +1 -0
  4. package/dist/ShepherdProvider.test.js +47 -0
  5. package/dist/ShepherdRoot.d.ts +9 -0
  6. package/dist/ShepherdRoot.js +88 -0
  7. package/dist/ShepherdRoot.routing.test.d.ts +1 -0
  8. package/dist/ShepherdRoot.routing.test.js +61 -0
  9. package/dist/ShepherdRoot.test.d.ts +1 -0
  10. package/dist/ShepherdRoot.test.js +37 -0
  11. package/dist/app/assets/index-CDOCIg6s.js +11 -0
  12. package/dist/app/index.html +12 -0
  13. package/dist/client.d.ts +107 -0
  14. package/dist/client.js +238 -0
  15. package/dist/client.test.d.ts +1 -0
  16. package/dist/client.test.js +298 -0
  17. package/dist/components/ActiveList.d.ts +22 -0
  18. package/dist/components/ActiveList.js +59 -0
  19. package/dist/components/Chat.d.ts +30 -0
  20. package/dist/components/Chat.js +61 -0
  21. package/dist/components/Composer.d.ts +37 -0
  22. package/dist/components/Composer.js +146 -0
  23. package/dist/components/Crew.d.ts +23 -0
  24. package/dist/components/Crew.js +31 -0
  25. package/dist/components/Dashboard.d.ts +34 -0
  26. package/dist/components/Dashboard.js +209 -0
  27. package/dist/components/DoneList.d.ts +29 -0
  28. package/dist/components/DoneList.js +50 -0
  29. package/dist/components/RepoSelect.d.ts +38 -0
  30. package/dist/components/RepoSelect.js +56 -0
  31. package/dist/components/Territory.d.ts +21 -0
  32. package/dist/components/Territory.js +21 -0
  33. package/dist/config/ConnectAgent.d.ts +10 -0
  34. package/dist/config/ConnectAgent.js +119 -0
  35. package/dist/config/ConnectAgent.test.d.ts +1 -0
  36. package/dist/config/ConnectAgent.test.js +92 -0
  37. package/dist/config/EmptyState.d.ts +12 -0
  38. package/dist/config/EmptyState.js +4 -0
  39. package/dist/config/EmptyState.test.d.ts +1 -0
  40. package/dist/config/EmptyState.test.js +32 -0
  41. package/dist/config/Members.d.ts +10 -0
  42. package/dist/config/Members.js +83 -0
  43. package/dist/config/Members.test.d.ts +1 -0
  44. package/dist/config/Members.test.js +66 -0
  45. package/dist/config/Workspaces.d.ts +12 -0
  46. package/dist/config/Workspaces.js +96 -0
  47. package/dist/config/Workspaces.test.d.ts +1 -0
  48. package/dist/config/Workspaces.test.js +90 -0
  49. package/dist/config/index.d.ts +8 -0
  50. package/dist/config/index.js +6 -0
  51. package/dist/context.d.ts +28 -0
  52. package/dist/context.js +36 -0
  53. package/dist/index.cjs +5289 -0
  54. package/dist/index.cjs.map +1 -0
  55. package/dist/index.d.cts +149 -0
  56. package/dist/index.d.ts +18 -0
  57. package/dist/index.js +15 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/lib/Dashboard-CG6KeFQ3.js +1214 -0
  60. package/dist/lib/index.d.ts +438 -16
  61. package/dist/lib/index.js +455 -6
  62. package/dist/lib/selfhost.js +9 -9
  63. package/dist/lib/styles.css +27 -0
  64. package/dist/logic.d.ts +208 -0
  65. package/dist/logic.js +372 -0
  66. package/dist/main.d.ts +1 -0
  67. package/dist/main.js +11 -0
  68. package/dist/selfhost/assets/{index-tSyzirZa.css → index-BZmImfYZ.css} +1 -1
  69. package/dist/selfhost/assets/index-CS268KSw.js +40 -0
  70. package/dist/selfhost/index.html +2 -2
  71. package/dist/selfhost.d.ts +22 -0
  72. package/dist/selfhost.js +97 -0
  73. package/dist/test/mockClient.d.ts +6 -0
  74. package/dist/test/mockClient.js +45 -0
  75. package/dist/test/setup.d.ts +1 -0
  76. package/dist/test/setup.js +2 -0
  77. package/dist/useLandscapePolling.d.ts +63 -0
  78. package/dist/useLandscapePolling.js +129 -0
  79. package/dist/views/Chat.d.ts +5 -0
  80. package/dist/views/Chat.js +60 -0
  81. package/dist/views/Chat.test.d.ts +1 -0
  82. package/dist/views/Chat.test.js +92 -0
  83. package/dist/views/Config.d.ts +12 -0
  84. package/dist/views/Config.js +6 -0
  85. package/dist/views/Tasks.d.ts +5 -0
  86. package/dist/views/Tasks.js +75 -0
  87. package/dist/views/Tasks.test.d.ts +1 -0
  88. package/dist/views/Tasks.test.js +115 -0
  89. package/dist/views/useLandscape.d.ts +14 -0
  90. package/dist/views/useLandscape.js +74 -0
  91. package/dist/views/useLandscape.test.d.ts +1 -0
  92. package/dist/views/useLandscape.test.js +101 -0
  93. package/dist/views/wallboard.d.ts +46 -0
  94. package/dist/views/wallboard.js +209 -0
  95. package/dist/views/wallboard.test.d.ts +1 -0
  96. package/dist/views/wallboard.test.js +143 -0
  97. package/package.json +1 -1
  98. package/dist/lib/Dashboard-CB6SL-J2.js +0 -1064
  99. package/dist/selfhost/assets/index-BBx3vo2Y.js +0 -40
package/dist/lib/index.js CHANGED
@@ -1,8 +1,457 @@
1
- import { D as a, S as h, a as s, c as d, u as t } from "./Dashboard-CB6SL-J2.js";
1
+ import { u as $, d as I, D as U } from "./Dashboard-CG6KeFQ3.js";
2
+ import { S as ne, a as te, c as ae } from "./Dashboard-CG6KeFQ3.js";
3
+ import { jsxs as b, jsx as e } from "react/jsx-runtime";
4
+ import { useId as O, useState as i, useEffect as H, useRef as _, useCallback as D } from "react";
5
+ function F({ workspaceId: c, refreshKey: t = 0, canRemove: l = !1, onLeft: k }) {
6
+ const f = $(), R = O(), [w, v] = i([]), [N, y] = i(null), [p, C] = i(null), [E, d] = i(!0), [u, n] = i(null), [o, m] = i(!1);
7
+ async function s({ keepError: h = !1 } = {}) {
8
+ h || y(null);
9
+ try {
10
+ const g = await f.listMembers(c);
11
+ v(g.members);
12
+ } catch (g) {
13
+ y(I(g));
14
+ } finally {
15
+ d(!1);
16
+ }
17
+ }
18
+ H(() => {
19
+ d(!0), s();
20
+ }, [f, c, t]);
21
+ async function S(h, g) {
22
+ if (!u) {
23
+ n(h), y(null), C(null), v((T) => T.filter((r) => r.accountId !== h));
24
+ try {
25
+ await f.removeMember(c, h), C(`Removed ${g}`);
26
+ } catch (T) {
27
+ y(I(T)), s({ keepError: !0 });
28
+ } finally {
29
+ n(null);
30
+ }
31
+ }
32
+ }
33
+ async function x() {
34
+ if (!o) {
35
+ m(!0), y(null), C(null);
36
+ try {
37
+ await f.leave(c), C("Left workspace"), k == null || k();
38
+ } catch (h) {
39
+ y(I(h));
40
+ } finally {
41
+ m(!1);
42
+ }
43
+ }
44
+ }
45
+ return /* @__PURE__ */ b("section", { className: "shepherd-members", "aria-labelledby": R, children: [
46
+ /* @__PURE__ */ e("h3", { id: R, children: "Members" }),
47
+ N && /* @__PURE__ */ e("p", { role: "alert", children: N }),
48
+ p && /* @__PURE__ */ e("p", { role: "status", children: p }),
49
+ E ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ e("p", { children: "No members." }) : /* @__PURE__ */ e("ul", { children: w.map((h) => {
50
+ const g = h.displayName ?? h.githubLogin ?? h.accountId;
51
+ return /* @__PURE__ */ b("li", { children: [
52
+ /* @__PURE__ */ e("span", { children: g }),
53
+ /* @__PURE__ */ e("span", { className: "role", children: h.role }),
54
+ l && /* @__PURE__ */ e(
55
+ "button",
56
+ {
57
+ type: "button",
58
+ "aria-label": `Remove ${g}`,
59
+ onClick: () => void S(h.accountId, g),
60
+ disabled: u === h.accountId,
61
+ children: "Remove"
62
+ }
63
+ )
64
+ ] }, h.accountId);
65
+ }) }),
66
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void x(), disabled: o, children: "Leave workspace" })
67
+ ] });
68
+ }
69
+ function M({ workspaces: c, selected: t, onChanged: l, onSelect: k }) {
70
+ const f = $(), R = O(), [w, v] = i(""), [N, y] = i(""), [p, C] = i(null), [E, d] = i(null), [u, n] = i(!1), [o, m] = i(0), s = (t == null ? void 0 : t.role) === "admin";
71
+ async function S() {
72
+ if (!(!w.trim() || u)) {
73
+ n(!0), d(null);
74
+ try {
75
+ await f.createWorkspace({ name: w.trim() }), v(""), l();
76
+ } catch (r) {
77
+ d(I(r));
78
+ } finally {
79
+ n(!1);
80
+ }
81
+ }
82
+ }
83
+ async function x() {
84
+ if (!(!N.trim() || u)) {
85
+ n(!0), d(null);
86
+ try {
87
+ await f.redeemInvite(N.trim()), y(""), l(), m((r) => r + 1);
88
+ } catch (r) {
89
+ d(I(r));
90
+ } finally {
91
+ n(!1);
92
+ }
93
+ }
94
+ }
95
+ async function h() {
96
+ if (!(!t || u)) {
97
+ n(!0), d(null);
98
+ try {
99
+ const r = await f.createInvite(t.id, {});
100
+ C(r), m((j) => j + 1);
101
+ } catch (r) {
102
+ d(I(r));
103
+ } finally {
104
+ n(!1);
105
+ }
106
+ }
107
+ }
108
+ async function g() {
109
+ if (!(!t || !p || u)) {
110
+ n(!0), d(null);
111
+ try {
112
+ await f.revokeInvite(t.id, p.code), C(null);
113
+ } catch (r) {
114
+ d(I(r));
115
+ } finally {
116
+ n(!1);
117
+ }
118
+ }
119
+ }
120
+ H(() => {
121
+ C(null);
122
+ }, [t == null ? void 0 : t.id]);
123
+ const T = p ? `${window.location.origin}/join/${encodeURIComponent(p.code)}` : null;
124
+ return /* @__PURE__ */ b("section", { className: "shepherd-workspaces", "aria-labelledby": R, children: [
125
+ /* @__PURE__ */ e("h3", { id: R, children: "Workspace management" }),
126
+ E && /* @__PURE__ */ e("p", { role: "alert", children: E }),
127
+ c.length > 1 && k && /* @__PURE__ */ b("div", { className: "switcher", children: [
128
+ /* @__PURE__ */ e("label", { htmlFor: "ws-switcher", children: "Active workspace" }),
129
+ /* @__PURE__ */ e(
130
+ "select",
131
+ {
132
+ id: "ws-switcher",
133
+ value: (t == null ? void 0 : t.id) ?? "",
134
+ onChange: (r) => k(r.target.value),
135
+ children: c.map((r) => /* @__PURE__ */ e("option", { value: r.id, children: r.name }, r.id))
136
+ }
137
+ )
138
+ ] }),
139
+ /* @__PURE__ */ b("div", { className: "create", children: [
140
+ /* @__PURE__ */ e("label", { htmlFor: "ws-name", children: "Workspace name" }),
141
+ /* @__PURE__ */ e(
142
+ "input",
143
+ {
144
+ id: "ws-name",
145
+ type: "text",
146
+ value: w,
147
+ onChange: (r) => v(r.target.value)
148
+ }
149
+ ),
150
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void S(), disabled: u, children: "Create workspace" })
151
+ ] }),
152
+ /* @__PURE__ */ b("div", { className: "join", children: [
153
+ /* @__PURE__ */ e("label", { htmlFor: "invite-code", children: "Invite code" }),
154
+ /* @__PURE__ */ e(
155
+ "input",
156
+ {
157
+ id: "invite-code",
158
+ type: "text",
159
+ value: N,
160
+ onChange: (r) => y(r.target.value)
161
+ }
162
+ ),
163
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void x(), disabled: u, children: "Join" })
164
+ ] }),
165
+ s && t && /* @__PURE__ */ b("div", { className: "admin", children: [
166
+ /* @__PURE__ */ b("div", { className: "invites", children: [
167
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void h(), disabled: u, children: "Create invite" }),
168
+ p && /* @__PURE__ */ b("div", { className: "invite-result", children: [
169
+ /* @__PURE__ */ e("code", { children: p.code }),
170
+ /* @__PURE__ */ e("a", { href: T ?? void 0, children: T }),
171
+ /* @__PURE__ */ b("span", { className: "invite-uses", children: [
172
+ p.useCount,
173
+ " / ",
174
+ p.maxUses,
175
+ " uses"
176
+ ] }),
177
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void g(), disabled: u, children: "Revoke invite" })
178
+ ] })
179
+ ] }),
180
+ /* @__PURE__ */ e(
181
+ F,
182
+ {
183
+ workspaceId: t.id,
184
+ refreshKey: o,
185
+ onLeft: l,
186
+ canRemove: !0
187
+ }
188
+ )
189
+ ] })
190
+ ] });
191
+ }
192
+ const P = [
193
+ { id: "claude", label: "Claude Code" },
194
+ { id: "codex", label: "Codex" },
195
+ { id: "pi", label: "Pi" },
196
+ { id: "generic", label: "Generic (JSON)" }
197
+ ], B = "shp_<paste-after-generating>", G = {
198
+ claude: "claude mcp add shepherd -s user \\",
199
+ codex: "codex mcp add shepherd \\",
200
+ pi: "pi mcp add shepherd \\"
201
+ };
202
+ function J(c, t, l) {
203
+ return c === "generic" ? JSON.stringify(
204
+ {
205
+ mcpServers: {
206
+ shepherd: {
207
+ command: "npx",
208
+ args: ["-y", "@korso/shepherd"],
209
+ env: { HUB_URL: t, SHEPHERD_TOKEN: l }
210
+ }
211
+ }
212
+ },
213
+ null,
214
+ 2
215
+ ) : [
216
+ G[c],
217
+ ` -e HUB_URL=${t} \\`,
218
+ ` -e SHEPHERD_TOKEN=${l} \\`,
219
+ " -- npx -y @korso/shepherd"
220
+ ].join(`
221
+ `);
222
+ }
223
+ function V({ workspaceId: c, hubUrl: t }) {
224
+ const l = $(), k = t ?? l.baseUrl, f = O(), [R, w] = i("claude"), [v, N] = i(""), [y, p] = i(null), [C, E] = i([]), [d, u] = i(null), [n, o] = i(null), [m, s] = i(!1), [S, x] = i(!0), [h, g] = i(null);
225
+ async function T() {
226
+ try {
227
+ const a = await l.listTokens(c);
228
+ E(a.tokens);
229
+ } catch (a) {
230
+ u(I(a));
231
+ } finally {
232
+ x(!1);
233
+ }
234
+ }
235
+ H(() => {
236
+ x(!0), T();
237
+ }, [l, c]), H(() => {
238
+ p(null);
239
+ }, [c]);
240
+ async function r() {
241
+ s(!0), u(null);
242
+ try {
243
+ const a = await l.mintToken(
244
+ c,
245
+ v.trim() ? { name: v.trim() } : {}
246
+ );
247
+ p(a.token), N(""), await T();
248
+ } catch (a) {
249
+ u(I(a));
250
+ } finally {
251
+ s(!1);
252
+ }
253
+ }
254
+ async function j(a) {
255
+ if (!h) {
256
+ g(a), u(null), o(null);
257
+ try {
258
+ await l.revokeToken(c, a), E((L) => L.filter((A) => A.id !== a)), o("Token revoked");
259
+ } catch (L) {
260
+ u(I(L));
261
+ } finally {
262
+ g(null);
263
+ }
264
+ }
265
+ }
266
+ const W = J(R, k, y ?? B);
267
+ return /* @__PURE__ */ b("section", { className: "shepherd-connect-agent", "aria-labelledby": f, children: [
268
+ /* @__PURE__ */ e("h3", { id: f, children: "Connect your agent" }),
269
+ /* @__PURE__ */ e("label", { htmlFor: "connect-tool", children: "Tool" }),
270
+ /* @__PURE__ */ e(
271
+ "select",
272
+ {
273
+ id: "connect-tool",
274
+ value: R,
275
+ onChange: (a) => w(a.target.value),
276
+ children: P.map((a) => /* @__PURE__ */ e("option", { value: a.id, children: a.label }, a.id))
277
+ }
278
+ ),
279
+ /* @__PURE__ */ b("div", { className: "generate", children: [
280
+ /* @__PURE__ */ e("label", { htmlFor: "token-name", children: "Token name (optional)" }),
281
+ /* @__PURE__ */ e(
282
+ "input",
283
+ {
284
+ id: "token-name",
285
+ type: "text",
286
+ value: v,
287
+ onChange: (a) => N(a.target.value),
288
+ placeholder: "e.g. laptop"
289
+ }
290
+ ),
291
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => void r(), disabled: m, children: "Generate token" })
292
+ ] }),
293
+ d && /* @__PURE__ */ e("p", { role: "alert", children: d }),
294
+ n && /* @__PURE__ */ e("p", { role: "status", children: n }),
295
+ y && /* @__PURE__ */ e("p", { className: "token-once", role: "status", children: "Copy this token now — it won't be shown again." }),
296
+ /* @__PURE__ */ e("pre", { "data-testid": "install-command", children: W }),
297
+ /* @__PURE__ */ e("h4", { children: "Existing tokens" }),
298
+ S ? /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) : C.length === 0 ? /* @__PURE__ */ e("p", { children: "No tokens yet." }) : /* @__PURE__ */ e("ul", { children: C.map((a) => {
299
+ const L = a.name ?? a.id;
300
+ return /* @__PURE__ */ b("li", { children: [
301
+ /* @__PURE__ */ e("span", { children: L }),
302
+ a.revokedAt ? /* @__PURE__ */ e("span", { className: "revoked", children: "revoked" }) : /* @__PURE__ */ e(
303
+ "button",
304
+ {
305
+ type: "button",
306
+ "aria-label": `Revoke token ${L}`,
307
+ onClick: () => void j(a.id),
308
+ disabled: h === a.id,
309
+ children: "Revoke"
310
+ }
311
+ )
312
+ ] }, a.id);
313
+ }) })
314
+ ] });
315
+ }
316
+ function X({
317
+ title: c = "No workspace yet",
318
+ children: t,
319
+ onGetStarted: l,
320
+ ctaLabel: k = "Go to Config"
321
+ }) {
322
+ return /* @__PURE__ */ b("section", { className: "shepherd-empty-state", "aria-labelledby": "empty-state-heading", children: [
323
+ /* @__PURE__ */ e("h2", { id: "empty-state-heading", children: c }),
324
+ /* @__PURE__ */ e("p", { children: t ?? "Create a workspace or join one with an invite code to get started." }),
325
+ l && /* @__PURE__ */ e("button", { type: "button", onClick: l, children: k })
326
+ ] });
327
+ }
328
+ const K = [
329
+ { id: "board", label: "Board" },
330
+ { id: "config", label: "Config" }
331
+ ];
332
+ function Y({ hubUrl: c }) {
333
+ const t = $(), [l, k] = i({ status: "loading" }), [f, R] = i(null), [w, v] = i("board"), N = _([]), y = D(
334
+ (n, o) => {
335
+ var S;
336
+ const m = K.length - 1;
337
+ let s = null;
338
+ switch (n.key) {
339
+ case "ArrowRight":
340
+ s = o === m ? 0 : o + 1;
341
+ break;
342
+ case "ArrowLeft":
343
+ s = o === 0 ? m : o - 1;
344
+ break;
345
+ case "Home":
346
+ s = 0;
347
+ break;
348
+ case "End":
349
+ s = m;
350
+ break;
351
+ default:
352
+ return;
353
+ }
354
+ n.preventDefault(), v(K[s].id), (S = N.current[s]) == null || S.focus();
355
+ },
356
+ []
357
+ ), p = D(
358
+ async (n) => {
359
+ try {
360
+ const o = await t.listWorkspaces();
361
+ k({ status: "ready", workspaces: o.workspaces }), R(
362
+ (m) => {
363
+ var s;
364
+ return m && o.workspaces.some((S) => S.id === m) ? m : ((s = o.workspaces[0]) == null ? void 0 : s.id) ?? null;
365
+ }
366
+ ), n && v(o.workspaces.length === 0 ? "config" : "board");
367
+ } catch (o) {
368
+ k({
369
+ status: "error",
370
+ message: I(o)
371
+ });
372
+ }
373
+ },
374
+ [t]
375
+ );
376
+ H(() => {
377
+ p(!0);
378
+ }, []);
379
+ const C = D(() => p(!1), [p]), E = l.status === "ready" ? l.workspaces : [], d = E.find((n) => n.id === f) ?? null;
380
+ if (l.status === "loading")
381
+ return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e("p", { role: "status", children: "Loading…" }) });
382
+ if (l.status === "error")
383
+ return /* @__PURE__ */ e("div", { className: "shepherd-root", children: /* @__PURE__ */ e("p", { role: "alert", children: l.message }) });
384
+ const u = E.length > 0;
385
+ return /* @__PURE__ */ b("div", { className: "shepherd-root", children: [
386
+ /* @__PURE__ */ b("header", { children: [
387
+ /* @__PURE__ */ e("h1", { className: "brand", style: { margin: 0, font: "inherit" }, children: "Shepherd" }),
388
+ /* @__PURE__ */ e("nav", { className: "tabs", role: "tablist", "aria-label": "Shepherd views", children: K.map(({ id: n, label: o }, m) => /* @__PURE__ */ e(
389
+ "button",
390
+ {
391
+ ref: (s) => {
392
+ N.current[m] = s;
393
+ },
394
+ type: "button",
395
+ role: "tab",
396
+ id: `tab-${n}`,
397
+ "aria-controls": `panel-${n}`,
398
+ "aria-selected": w === n,
399
+ tabIndex: w === n ? 0 : -1,
400
+ onClick: () => v(n),
401
+ onKeyDown: (s) => y(s, m),
402
+ children: o
403
+ },
404
+ n
405
+ )) })
406
+ ] }),
407
+ /* @__PURE__ */ b("main", { children: [
408
+ w === "board" && /* @__PURE__ */ e(
409
+ "div",
410
+ {
411
+ role: "tabpanel",
412
+ id: "panel-board",
413
+ "aria-labelledby": "tab-board",
414
+ tabIndex: 0,
415
+ children: u && d ? /* @__PURE__ */ e(U, { workspaceId: d.id }) : /* @__PURE__ */ e(X, { onGetStarted: () => v("config") })
416
+ }
417
+ ),
418
+ w === "config" && /* @__PURE__ */ e(
419
+ "div",
420
+ {
421
+ role: "tabpanel",
422
+ id: "panel-config",
423
+ "aria-labelledby": "tab-config",
424
+ tabIndex: 0,
425
+ children: /* @__PURE__ */ b("section", { className: "shepherd-config", "aria-labelledby": "config-heading", children: [
426
+ /* @__PURE__ */ e("h2", { id: "config-heading", children: "Configuration" }),
427
+ /* @__PURE__ */ e(
428
+ M,
429
+ {
430
+ workspaces: E,
431
+ selected: d,
432
+ onChanged: () => {
433
+ C();
434
+ },
435
+ onSelect: R
436
+ }
437
+ ),
438
+ d && /* @__PURE__ */ e(V, { workspaceId: d.id, hubUrl: c })
439
+ ] })
440
+ }
441
+ )
442
+ ] })
443
+ ] });
444
+ }
2
445
  export {
3
- a as Dashboard,
4
- h as ShepherdClientError,
5
- s as ShepherdClientProvider,
6
- d as createShepherdClient,
7
- t as useShepherdClient
446
+ V as ConnectAgent,
447
+ U as Dashboard,
448
+ X as EmptyState,
449
+ F as Members,
450
+ ne as ShepherdClientError,
451
+ te as ShepherdClientProvider,
452
+ Y as ShepherdRoot,
453
+ M as Workspaces,
454
+ ae as createShepherdClient,
455
+ I as describeError,
456
+ $ as useShepherdClient
8
457
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { useState as s, useMemo as h } from "react";
3
- import { c as d, a as m, D as u } from "./Dashboard-CB6SL-J2.js";
3
+ import { c as d, a as m, D as u } from "./Dashboard-CG6KeFQ3.js";
4
4
  const i = "shepherd.token";
5
5
  function p() {
6
6
  try {
@@ -10,7 +10,7 @@ function p() {
10
10
  }
11
11
  }
12
12
  function f({ onSubmit: t }) {
13
- const [r, o] = s("");
13
+ const [r, a] = s("");
14
14
  return /* @__PURE__ */ l("section", { id: "gate", className: "gate", children: [
15
15
  /* @__PURE__ */ e("h1", { children: "Shepherd" }),
16
16
  /* @__PURE__ */ e("p", { children: "Enter the team token to view the workspace." }),
@@ -28,7 +28,7 @@ function f({ onSubmit: t }) {
28
28
  "aria-label": "Team token",
29
29
  autoComplete: "off",
30
30
  value: r,
31
- onChange: (n) => o(n.target.value)
31
+ onChange: (n) => a(n.target.value)
32
32
  }
33
33
  ),
34
34
  /* @__PURE__ */ e("button", { type: "submit", children: "View" })
@@ -36,10 +36,10 @@ function f({ onSubmit: t }) {
36
36
  ] });
37
37
  }
38
38
  function b() {
39
- const [t, r] = s(p), o = h(
39
+ const [t, r] = s(p), a = h(
40
40
  () => d({
41
41
  baseUrl: "",
42
- getAuthHeaders: () => ({ Authorization: `Bearer ${t}` }),
42
+ getAuthHeader: () => `Bearer ${t}`,
43
43
  onUnauthorized: () => {
44
44
  try {
45
45
  localStorage.removeItem(i);
@@ -53,15 +53,15 @@ function b() {
53
53
  return t === "" ? /* @__PURE__ */ e(
54
54
  f,
55
55
  {
56
- onSubmit: (a) => {
56
+ onSubmit: (o) => {
57
57
  try {
58
- localStorage.setItem(i, a);
58
+ localStorage.setItem(i, o);
59
59
  } catch {
60
60
  }
61
- r(a);
61
+ r(o);
62
62
  }
63
63
  }
64
- ) : /* @__PURE__ */ e("div", { className: "wrap", children: /* @__PURE__ */ e(m, { client: o, children: /* @__PURE__ */ e(u, {}) }) });
64
+ ) : /* @__PURE__ */ e("div", { className: "wrap", children: /* @__PURE__ */ e(m, { client: a, children: /* @__PURE__ */ e(u, {}) }) });
65
65
  }
66
66
  export {
67
67
  b as SelfHostApp
@@ -180,3 +180,30 @@
180
180
  background:var(--card); color:var(--ink); }
181
181
  .gate button { padding:10px 16px; border-radius:8px; border:1px solid var(--ink);
182
182
  background:var(--ink); color:var(--bg); font-weight:600; cursor:pointer; }
183
+
184
+ /* --- Multi-workspace hosted shell + config surface (functional, not polished;
185
+ a dedicated styling sub-project refines this). Reuses the board's tokens. --- */
186
+ .shepherd-root { max-width:1100px; margin:0 auto; padding:40px 44px; }
187
+ .shepherd-root > main { padding-top:18px; }
188
+ .shepherd-config { display:flex; flex-direction:column; gap:24px; }
189
+ .shepherd-config h2 { font-size:16px; margin:0 0 4px; }
190
+ .shepherd-workspaces, .shepherd-members, .shepherd-connect-agent {
191
+ display:flex; flex-direction:column; gap:10px;
192
+ padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
193
+ .shepherd-workspaces .switcher { display:flex; flex-wrap:wrap; gap:8px; }
194
+ .shepherd-workspaces .role { color:var(--ink3); font-size:12px; }
195
+ .shepherd-workspaces .admin, .shepherd-workspaces .invites { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
196
+ .shepherd-config input, .shepherd-config select {
197
+ padding:8px 10px; border-radius:8px; border:1px solid var(--line);
198
+ background:var(--bg); color:var(--ink); }
199
+ .shepherd-config button {
200
+ padding:8px 14px; border-radius:8px; border:1px solid var(--ink);
201
+ background:var(--ink); color:var(--bg); font-weight:600; cursor:pointer; }
202
+ .shepherd-config button:disabled { opacity:.55; cursor:default; }
203
+ .shepherd-config .invite-result, .shepherd-connect-agent .token-once {
204
+ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px;
205
+ word-break:break-all; padding:8px 10px; border-radius:8px;
206
+ background:var(--chip); border:1px solid var(--line2); }
207
+ .shepherd-config .revoked { color:var(--ink3); text-decoration:line-through; }
208
+ .shepherd-empty-state { text-align:center; color:var(--ink2); padding:48px 24px; }
209
+ .shepherd-empty-state button { margin-top:14px; }