@korso/shepherd-ui 0.8.0 → 0.9.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.
@@ -1,7 +1,7 @@
1
- var Le = Object.defineProperty;
2
- var Me = (t, n, c) => n in t ? Le(t, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[n] = c;
3
- var ue = (t, n, c) => Me(t, typeof n != "symbol" ? n + "" : n, c);
4
- import { jsx as o, jsxs as m, Fragment as H } from "react/jsx-runtime";
1
+ var Me = Object.defineProperty;
2
+ var Le = (t, n, c) => n in t ? Me(t, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[n] = c;
3
+ var ue = (t, n, c) => Le(t, typeof n != "symbol" ? n + "" : n, c);
4
+ import { jsx as r, jsxs as m, Fragment as H } from "react/jsx-runtime";
5
5
  import { createContext as Pe, useContext as Oe, useState as N, useRef as P, useCallback as R, useEffect as se, Fragment as Ge, useLayoutEffect as Fe, useId as Se } from "react";
6
6
  import { z as e } from "zod";
7
7
  const E = e.string(), Y = e.number(), We = e.object({
@@ -97,10 +97,16 @@ const E = e.string(), Y = e.number(), We = e.object({
97
97
  // (no agent session). The dashboard renders these as "me" (right-aligned).
98
98
  // Defaulted for version-skew safety with older hubs.
99
99
  fromAdmin: e.boolean().default(!1),
100
- // True when an agent addressed the message TO the operator (the mirror of
101
- // fromAdmin). The dashboard renders these as "<agent> admin". Not delivered
102
- // to other agents. Defaulted for version-skew safety with older hubs.
100
+ // True when an agent addressed the message TO the operator side (the
101
+ // dashboard) collectively (legacy) or a specific member (see
102
+ // targetMemberName). Not delivered to other agents. Defaulted for
103
+ // version-skew safety with older hubs.
103
104
  toAdmin: e.boolean().default(!1),
105
+ // When an agent addressed a SPECIFIC workspace member, the member's display
106
+ // name snapshotted at send time — the dashboard renders "→ <name>" instead of
107
+ // the collective "→ admin". Null for legacy/collective operator messages and
108
+ // everything else. Defaulted for version-skew safety with older hubs.
109
+ targetMemberName: e.string().nullable().default(null),
104
110
  createdAt: E
105
111
  }), me = e.object({
106
112
  agents: e.array(He),
@@ -163,13 +169,20 @@ e.object({
163
169
  const Ve = e.object({
164
170
  sessionId: e.string().uuid(),
165
171
  body: e.string().min(1).max(8192),
166
- // absent or null => broadcast to all agents in the workspace
172
+ // THE preferred addressing field: one name that reaches either kind of
173
+ // teammate. The hub resolves it in order — a LIVE AGENT in the sender's repo
174
+ // (exact landscape name, e.g. "alex-rivera-2"), else the operator label
175
+ // ("admin" by default => the dashboard collectively), else a WORKSPACE MEMBER
176
+ // (a dashboard user, matched case-insensitively on display name, GitHub
177
+ // login, or email). No match => 400 listing both sets. Absent/null =>
178
+ // broadcast to all agents. Mutually exclusive with the legacy fields below.
179
+ target: e.string().min(1).nullable().optional(),
180
+ // LEGACY (kept for older clients; prefer `target`): the exact live-agent name.
167
181
  targetAgentName: e.string().nullable().optional(),
168
- // true => address the human operator (the dashboard) instead of agents. The
169
- // mirror of the operator's admin agent DM: it shows in the workspace feed as
170
- // "<agent> → admin" and is NOT delivered to other agents. Mutually exclusive
171
- // with targetAgentName (the hub rejects setting both). Defaulted/optional for
172
- // version skew with older clients.
182
+ // LEGACY (kept for older clients; prefer `target` with a member's name):
183
+ // true => address the human operators (the dashboard) collectively. Shows in
184
+ // the workspace feed as "<agent> → admin" and is NOT delivered to other
185
+ // agents. Mutually exclusive with targetAgentName and target.
173
186
  toAdmin: e.boolean().optional()
174
187
  });
175
188
  e.object({
@@ -308,11 +321,11 @@ class U extends Error {
308
321
  * @param message - Human-readable failure description.
309
322
  * @param status - Upstream HTTP status, omitted for network/abort failures.
310
323
  */
311
- constructor(c, r) {
324
+ constructor(c, o) {
312
325
  super(c);
313
326
  /** Upstream HTTP status for a non-2xx response; absent for transport errors. */
314
327
  ue(this, "status");
315
- this.name = "ShepherdClientError", r !== void 0 && (this.status = r);
328
+ this.name = "ShepherdClientError", o !== void 0 && (this.status = o);
316
329
  }
317
330
  }
318
331
  function ct(t) {
@@ -328,7 +341,7 @@ async function lt(t) {
328
341
  return "";
329
342
  }
330
343
  function qt(t) {
331
- const n = t.baseUrl.replace(/\/$/, ""), c = t.timeoutMs ?? it, r = encodeURIComponent;
344
+ const n = t.baseUrl.replace(/\/$/, ""), c = t.timeoutMs ?? it, o = encodeURIComponent;
332
345
  async function s(a, i, l = {}) {
333
346
  var f, k;
334
347
  const h = new AbortController(), u = setTimeout(() => h.abort(), c);
@@ -383,25 +396,25 @@ function qt(t) {
383
396
  });
384
397
  },
385
398
  deleteWorkspace(a) {
386
- return s("DELETE", `/workspaces/${r(a)}`, {
399
+ return s("DELETE", `/workspaces/${o(a)}`, {
387
400
  schema: Je
388
401
  });
389
402
  },
390
403
  mintToken(a, i) {
391
- return s("POST", `/workspaces/${r(a)}/tokens`, {
404
+ return s("POST", `/workspaces/${o(a)}/tokens`, {
392
405
  body: i,
393
406
  schema: pe
394
407
  });
395
408
  },
396
409
  listTokens(a) {
397
- return s("GET", `/workspaces/${r(a)}/tokens`, {
410
+ return s("GET", `/workspaces/${o(a)}/tokens`, {
398
411
  schema: ge
399
412
  });
400
413
  },
401
414
  revokeToken(a, i) {
402
415
  return s(
403
416
  "DELETE",
404
- `/workspaces/${r(a)}/tokens/${r(i)}`
417
+ `/workspaces/${o(a)}/tokens/${o(i)}`
405
418
  );
406
419
  },
407
420
  mintAccountToken(a) {
@@ -416,16 +429,16 @@ function qt(t) {
416
429
  });
417
430
  },
418
431
  revokeAccountToken(a) {
419
- return s("DELETE", `/tokens/${r(a)}`);
432
+ return s("DELETE", `/tokens/${o(a)}`);
420
433
  },
421
434
  createInvite(a, i) {
422
- return s("POST", `/workspaces/${r(a)}/invites`, {
435
+ return s("POST", `/workspaces/${o(a)}/invites`, {
423
436
  body: i,
424
437
  schema: et
425
438
  });
426
439
  },
427
440
  inviteByEmail(a, i) {
428
- return s("POST", `/workspaces/${r(a)}/invites/email`, {
441
+ return s("POST", `/workspaces/${o(a)}/invites/email`, {
429
442
  body: { email: i },
430
443
  schema: tt
431
444
  });
@@ -433,41 +446,41 @@ function qt(t) {
433
446
  revokeInvite(a, i) {
434
447
  return s(
435
448
  "POST",
436
- `/workspaces/${r(a)}/invites/${r(i)}/revoke`
449
+ `/workspaces/${o(a)}/invites/${o(i)}/revoke`
437
450
  );
438
451
  },
439
452
  redeemInvite(a) {
440
- return s("POST", `/invites/${r(a)}/redeem`, {
453
+ return s("POST", `/invites/${o(a)}/redeem`, {
441
454
  schema: nt
442
455
  });
443
456
  },
444
457
  listMembers(a) {
445
- return s("GET", `/workspaces/${r(a)}/members`, {
458
+ return s("GET", `/workspaces/${o(a)}/members`, {
446
459
  schema: at
447
460
  });
448
461
  },
449
462
  removeMember(a, i) {
450
463
  return s(
451
464
  "DELETE",
452
- `/workspaces/${r(a)}/members/${r(i)}`
465
+ `/workspaces/${o(a)}/members/${o(i)}`
453
466
  );
454
467
  },
455
468
  leave(a) {
456
- return s("POST", `/workspaces/${r(a)}/leave`);
469
+ return s("POST", `/workspaces/${o(a)}/leave`);
457
470
  },
458
471
  landscape(a) {
459
- return s("GET", `/workspaces/${r(a)}/landscape`, {
472
+ return s("GET", `/workspaces/${o(a)}/landscape`, {
460
473
  schema: me
461
474
  });
462
475
  },
463
476
  announceTo(a, i) {
464
- return s("POST", `/workspaces/${r(a)}/announce`, {
477
+ return s("POST", `/workspaces/${o(a)}/announce`, {
465
478
  body: i,
466
479
  schema: he
467
480
  });
468
481
  },
469
482
  submitFeedback(a, i) {
470
- const l = i !== void 0 ? `/workspaces/${r(i)}/feedback` : "/feedback";
483
+ const l = i !== void 0 ? `/workspaces/${o(i)}/feedback` : "/feedback";
471
484
  return s("POST", l, { body: a, schema: ot });
472
485
  },
473
486
  // --- self-host singular aliases (implicit single workspace) -------------
@@ -489,7 +502,7 @@ function Bt({
489
502
  client: t,
490
503
  children: n
491
504
  }) {
492
- return /* @__PURE__ */ o($e.Provider, { value: t, children: n });
505
+ return /* @__PURE__ */ r($e.Provider, { value: t, children: n });
493
506
  }
494
507
  function oe() {
495
508
  const t = Oe($e);
@@ -501,7 +514,7 @@ function oe() {
501
514
  }
502
515
  const dt = 5e3, ut = 1e3;
503
516
  function mt(t) {
504
- const n = oe(), c = t == null ? void 0 : t.workspaceId, r = (t == null ? void 0 : t.pollMs) ?? dt, s = (t == null ? void 0 : t.enabled) ?? !0, [a, i] = N(
517
+ const n = oe(), c = t == null ? void 0 : t.workspaceId, o = (t == null ? void 0 : t.pollMs) ?? dt, s = (t == null ? void 0 : t.enabled) ?? !0, [a, i] = N(
505
518
  null
506
519
  ), [l, h] = N("live"), [u, d] = N(null), [, b] = N(0), f = P(n);
507
520
  f.current = n;
@@ -524,7 +537,7 @@ function mt(t) {
524
537
  v($);
525
538
  const S = setInterval(() => {
526
539
  document.visibilityState !== "hidden" && v($);
527
- }, r), y = setInterval(() => {
540
+ }, o), y = setInterval(() => {
528
541
  b((T) => T + 1);
529
542
  }, ut), j = () => {
530
543
  document.visibilityState === "visible" && v($);
@@ -532,7 +545,7 @@ function mt(t) {
532
545
  return document.addEventListener("visibilitychange", j), () => {
533
546
  k.current++, clearInterval(S), clearInterval(y), document.removeEventListener("visibilitychange", j);
534
547
  };
535
- }, [v, r, s]);
548
+ }, [v, o, s]);
536
549
  const A = R(() => v(k.current), [v]);
537
550
  return { snapshot: a, status: l, lastUpdatedMs: u, refresh: A };
538
551
  }
@@ -540,9 +553,9 @@ function K(t, n) {
540
553
  const c = Math.floor((n - Date.parse(t)) / 1e3);
541
554
  if (c < 5) return "just now";
542
555
  if (c < 60) return `${c}s ago`;
543
- const r = Math.floor(c / 60);
544
- if (r < 60) return `${r}m ago`;
545
- const s = Math.floor(r / 60);
556
+ const o = Math.floor(c / 60);
557
+ if (o < 60) return `${o}m ago`;
558
+ const s = Math.floor(o / 60);
546
559
  return s < 24 ? `${s}h ago` : `${Math.floor(s / 24)}d ago`;
547
560
  }
548
561
  function z(t) {
@@ -557,16 +570,16 @@ function ie(t) {
557
570
  }
558
571
  const Ee = "A-Za-z0-9_-";
559
572
  function ht(t, n) {
560
- const r = t.slice(0, n).match(new RegExp(`(?:^|\\s)@([${Ee}]*)$`));
561
- if (!r) return null;
562
- const s = r[1];
573
+ const o = t.slice(0, n).match(new RegExp(`(?:^|\\s)@([${Ee}]*)$`));
574
+ if (!o) return null;
575
+ const s = o[1];
563
576
  return { start: n - s.length - 1, end: n, query: s };
564
577
  }
565
578
  function pt(t, n) {
566
579
  const c = new RegExp(`(?:^|\\s)@([${Ee}]+)`, "g");
567
- let r;
568
- for (; (r = c.exec(t)) !== null; ) {
569
- const s = r[1].toLowerCase(), a = n.find((i) => i.toLowerCase() === s);
580
+ let o;
581
+ for (; (o = c.exec(t)) !== null; ) {
582
+ const s = o[1].toLowerCase(), a = n.find((i) => i.toLowerCase() === s);
570
583
  if (a) return a;
571
584
  }
572
585
  return null;
@@ -574,13 +587,13 @@ function pt(t, n) {
574
587
  function Re(t) {
575
588
  return [...new Set(t.map((n) => n.repo))].sort();
576
589
  }
577
- function M(t, n) {
590
+ function L(t, n) {
578
591
  return n === null || n === "__all__" || t.repo === n;
579
592
  }
580
593
  function gt(t, n) {
581
594
  return [
582
595
  ...new Set(
583
- t.filter((c) => c.presence === "live" && M(c, n)).map((c) => c.name)
596
+ t.filter((c) => c.presence === "live" && L(c, n)).map((c) => c.name)
584
597
  )
585
598
  ].sort();
586
599
  }
@@ -593,24 +606,24 @@ function ft(t) {
593
606
  }
594
607
  function be(t, n) {
595
608
  if (!n) return "";
596
- const c = Math.floor((Date.parse(n) - Date.parse(t)) / 1e3), r = Math.floor(c / 60);
597
- return r < 60 ? `active ${r}m` : `active ${Math.floor(r / 60)}h`;
609
+ const c = Math.floor((Date.parse(n) - Date.parse(t)) / 1e3), o = Math.floor(c / 60);
610
+ return o < 60 ? `active ${o}m` : `active ${Math.floor(o / 60)}h`;
598
611
  }
599
612
  function bt(t, n) {
600
- const c = new Date(Date.parse(t)), r = new Date(n), s = (i) => new Date(i.getFullYear(), i.getMonth(), i.getDate()).getTime(), a = Math.round((s(r) - s(c)) / 864e5);
613
+ const c = new Date(Date.parse(t)), o = new Date(n), s = (i) => new Date(i.getFullYear(), i.getMonth(), i.getDate()).getTime(), a = Math.round((s(o) - s(c)) / 864e5);
601
614
  return a <= 0 ? "Today" : a === 1 ? "Yesterday" : c.toLocaleDateString(void 0, { month: "short", day: "numeric" });
602
615
  }
603
616
  function ve(t) {
604
617
  let n = t.toLowerCase().replace(/\\/g, "/");
605
618
  n.endsWith("/") && (n = n.replace(/\/+$/, "") + "/**");
606
619
  const c = [];
607
- for (const r of n.split("/"))
608
- if (!(r === "" || r === ".")) {
609
- if (r === "..") {
620
+ for (const o of n.split("/"))
621
+ if (!(o === "" || o === ".")) {
622
+ if (o === "..") {
610
623
  c.length && c.pop();
611
624
  continue;
612
625
  }
613
- c.push(r);
626
+ c.push(o);
614
627
  }
615
628
  return c;
616
629
  }
@@ -620,7 +633,7 @@ function vt(t, n) {
620
633
  }
621
634
  function kt(t, n) {
622
635
  const c = /* @__PURE__ */ new Map();
623
- function r(s, a) {
636
+ function o(s, a) {
624
637
  if (n.length - a === 0) {
625
638
  for (let b = s; b < t.length; b++) if (t[b] !== "**") return !1;
626
639
  return !0;
@@ -630,15 +643,15 @@ function kt(t, n) {
630
643
  if (l !== void 0) return l;
631
644
  const h = t[s], u = n[a];
632
645
  let d;
633
- return h === "**" ? d = r(s + 1, a) || r(s, a + 1) : u === "**" ? d = !1 : d = vt(h, u) && r(s + 1, a + 1), c.set(i, d), d;
646
+ return h === "**" ? d = o(s + 1, a) || o(s, a + 1) : u === "**" ? d = !1 : d = vt(h, u) && o(s + 1, a + 1), c.set(i, d), d;
634
647
  }
635
- return r(0, 0);
648
+ return o(0, 0);
636
649
  }
637
650
  function ye(t, n) {
638
651
  if (n.length === 0) return !0;
639
652
  const c = t.map(ve);
640
- return n.every((r) => {
641
- const s = ve(r);
653
+ return n.every((o) => {
654
+ const s = ve(o);
642
655
  return c.some((a) => kt(a, s));
643
656
  });
644
657
  }
@@ -646,14 +659,14 @@ function yt(t) {
646
659
  const n = /* @__PURE__ */ new Map();
647
660
  for (const s of t)
648
661
  n.has(s.agentName) || n.set(s.agentName, []), n.get(s.agentName).push(s);
649
- const c = (s, a) => a.createdAt.localeCompare(s.createdAt), r = [];
662
+ const c = (s, a) => a.createdAt.localeCompare(s.createdAt), o = [];
650
663
  for (const [s, a] of n) {
651
664
  const i = [...a].sort(c), l = i.map(
652
665
  (u) => i.some(
653
666
  (d) => d !== u && ye(d.pathGlobs, u.pathGlobs) && !ye(u.pathGlobs, d.pathGlobs)
654
667
  )
655
668
  ), h = i[0];
656
- r.push({
669
+ o.push({
657
670
  agentName: s,
658
671
  model: h.model,
659
672
  program: h.program,
@@ -662,17 +675,17 @@ function yt(t) {
662
675
  narrower: i.filter((u, d) => l[d])
663
676
  });
664
677
  }
665
- return r.sort((s, a) => {
678
+ return o.sort((s, a) => {
666
679
  const i = s.primaries.concat(s.narrower)[0].createdAt;
667
680
  return a.primaries.concat(a.narrower)[0].createdAt.localeCompare(i);
668
- }), r;
681
+ }), o;
669
682
  }
670
683
  const _e = { active: 0, done: 0 };
671
684
  function _t({
672
685
  repos: t,
673
686
  counts: n,
674
687
  selected: c,
675
- onSelect: r
688
+ onSelect: o
676
689
  }) {
677
690
  const [s, a] = N(!1), i = P(null);
678
691
  if (se(() => {
@@ -693,11 +706,11 @@ function _t({
693
706
  role: "option",
694
707
  "aria-selected": k,
695
708
  onClick: (A) => {
696
- A.stopPropagation(), a(!1), r(d);
709
+ A.stopPropagation(), a(!1), o(d);
697
710
  },
698
711
  children: [
699
- /* @__PURE__ */ o("span", { children: b }),
700
- /* @__PURE__ */ o("span", { className: "ct", children: `${f.active} active · ${f.done} done` })
712
+ /* @__PURE__ */ r("span", { children: b }),
713
+ /* @__PURE__ */ r("span", { className: "ct", children: `${f.active} active · ${f.done} done` })
701
714
  ]
702
715
  },
703
716
  d ?? "__all__"
@@ -724,9 +737,9 @@ function _t({
724
737
  d.stopPropagation(), a((b) => !b);
725
738
  },
726
739
  children: [
727
- /* @__PURE__ */ o("span", { className: "slash", children: "/" }),
740
+ /* @__PURE__ */ r("span", { className: "slash", children: "/" }),
728
741
  " " + h + " ",
729
- /* @__PURE__ */ o("span", { children: "▼" })
742
+ /* @__PURE__ */ r("span", { children: "▼" })
730
743
  ]
731
744
  }
732
745
  ),
@@ -739,21 +752,21 @@ function _t({
739
752
  );
740
753
  }
741
754
  function Nt({ agents: t, tasks: n, selectedRepo: c }) {
742
- const r = t.filter(
743
- (l) => l.presence === "live" && M({ repo: l.repo ?? "" }, c)
755
+ const o = t.filter(
756
+ (l) => l.presence === "live" && L({ repo: l.repo ?? "" }, c)
744
757
  ), s = /* @__PURE__ */ new Set();
745
758
  for (const l of n) l.status === "active" && s.add(l.agentName);
746
- const a = (l) => s.has(l.name), i = [...r].sort((l, h) => {
759
+ const a = (l) => s.has(l.name), i = [...o].sort((l, h) => {
747
760
  const u = a(l), d = a(h);
748
761
  return u !== d ? u ? -1 : 1 : l.name.localeCompare(h.name);
749
762
  });
750
- return /* @__PURE__ */ o("div", { className: "crew", id: "crew", children: i.map((l) => /* @__PURE__ */ m(
763
+ return /* @__PURE__ */ r("div", { className: "crew", id: "crew", children: i.map((l) => /* @__PURE__ */ m(
751
764
  "div",
752
765
  {
753
766
  className: "person" + (a(l) ? "" : " person--idle"),
754
767
  children: [
755
- /* @__PURE__ */ o("div", { className: "avatar", style: { background: z(l.name) }, children: ie(l.name) }),
756
- /* @__PURE__ */ o("span", { className: "person__name", children: l.name })
768
+ /* @__PURE__ */ r("div", { className: "avatar", style: { background: z(l.name) }, children: ie(l.name) }),
769
+ /* @__PURE__ */ r("span", { className: "person__name", children: l.name })
757
770
  ]
758
771
  },
759
772
  l.name
@@ -761,17 +774,17 @@ function Nt({ agents: t, tasks: n, selectedRepo: c }) {
761
774
  }
762
775
  function je({ globs: t }) {
763
776
  return t.length <= 1 ? /* @__PURE__ */ m("div", { className: "terr", children: [
764
- /* @__PURE__ */ o("span", { className: "terr__lbl", children: "territory" }),
765
- t.map((n) => /* @__PURE__ */ o("span", { className: "glob", children: n }, n))
777
+ /* @__PURE__ */ r("span", { className: "terr__lbl", children: "territory" }),
778
+ t.map((n) => /* @__PURE__ */ r("span", { className: "glob", children: n }, n))
766
779
  ] }) : /* @__PURE__ */ m("details", { className: "terrx", children: [
767
780
  /* @__PURE__ */ m("summary", { children: [
768
- /* @__PURE__ */ o("span", { className: "terr__lbl", children: "territory" }),
781
+ /* @__PURE__ */ r("span", { className: "terr__lbl", children: "territory" }),
769
782
  /* @__PURE__ */ m("span", { className: "glob glob--more", children: [
770
- /* @__PURE__ */ o("span", { className: "tw", children: "▶" }),
783
+ /* @__PURE__ */ r("span", { className: "tw", children: "▶" }),
771
784
  ` ${t.length} paths`
772
785
  ] })
773
786
  ] }),
774
- /* @__PURE__ */ o("div", { className: "terr terr--full", children: t.map((n) => /* @__PURE__ */ o("span", { className: "glob", children: n }, n)) })
787
+ /* @__PURE__ */ r("div", { className: "terr terr--full", children: t.map((n) => /* @__PURE__ */ r("span", { className: "glob", children: n }, n)) })
775
788
  ] });
776
789
  }
777
790
  const te = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, wt = (t) => t === null || t === "__all__";
@@ -780,9 +793,9 @@ function ne({
780
793
  nowMs: n
781
794
  }) {
782
795
  return /* @__PURE__ */ m(H, { children: [
783
- /* @__PURE__ */ o("div", { className: "task__intent", children: t.intent }),
784
- /* @__PURE__ */ o(je, { globs: t.pathGlobs }),
785
- /* @__PURE__ */ o("div", { className: "task__meta", children: `started ${K(t.createdAt, n)}` })
796
+ /* @__PURE__ */ r("div", { className: "task__intent", children: t.intent }),
797
+ /* @__PURE__ */ r(je, { globs: t.pathGlobs }),
798
+ /* @__PURE__ */ r("div", { className: "task__meta", children: `started ${K(t.createdAt, n)}` })
786
799
  ] });
787
800
  }
788
801
  function At({
@@ -790,15 +803,15 @@ function At({
790
803
  nowMs: n,
791
804
  allRepos: c
792
805
  }) {
793
- const r = t.model || t.program;
806
+ const o = t.model || t.program;
794
807
  return /* @__PURE__ */ m("div", { className: "task", children: [
795
808
  /* @__PURE__ */ m("div", { className: "task__r1", children: [
796
- /* @__PURE__ */ o("span", { className: "task__who", children: t.agentName }),
797
- c && /* @__PURE__ */ o("span", { className: "task__repo", children: t.repo }),
798
- r && /* @__PURE__ */ o("span", { className: "task__tag", children: r }),
799
- /* @__PURE__ */ o("span", { className: "livedot", title: "active" })
809
+ /* @__PURE__ */ r("span", { className: "task__who", children: t.agentName }),
810
+ c && /* @__PURE__ */ r("span", { className: "task__repo", children: t.repo }),
811
+ o && /* @__PURE__ */ r("span", { className: "task__tag", children: o }),
812
+ /* @__PURE__ */ r("span", { className: "livedot", title: "active" })
800
813
  ] }),
801
- /* @__PURE__ */ o(ne, { task: t, nowMs: n })
814
+ /* @__PURE__ */ r(ne, { task: t, nowMs: n })
802
815
  ] });
803
816
  }
804
817
  function St({
@@ -806,24 +819,24 @@ function St({
806
819
  nowMs: n,
807
820
  allRepos: c
808
821
  }) {
809
- const r = t.model || t.program, s = t.primaries.length + t.narrower.length, a = t.narrower.length;
822
+ const o = t.model || t.program, s = t.primaries.length + t.narrower.length, a = t.narrower.length;
810
823
  return /* @__PURE__ */ m("div", { className: "grp", children: [
811
824
  /* @__PURE__ */ m("div", { className: "grp__head", children: [
812
- /* @__PURE__ */ o("span", { className: "grp__who", children: t.agentName }),
813
- c && /* @__PURE__ */ o("span", { className: "task__repo", children: t.repo }),
814
- r && /* @__PURE__ */ o("span", { className: "grp__tag", children: r }),
815
- /* @__PURE__ */ o("span", { className: "grp__count", children: `· ${s} active` }),
816
- /* @__PURE__ */ o("span", { className: "grp__dot", title: "live" })
825
+ /* @__PURE__ */ r("span", { className: "grp__who", children: t.agentName }),
826
+ c && /* @__PURE__ */ r("span", { className: "task__repo", children: t.repo }),
827
+ o && /* @__PURE__ */ r("span", { className: "grp__tag", children: o }),
828
+ /* @__PURE__ */ r("span", { className: "grp__count", children: `· ${s} active` }),
829
+ /* @__PURE__ */ r("span", { className: "grp__dot", title: "live" })
817
830
  ] }),
818
- /* @__PURE__ */ o("div", { className: "claims", children: t.primaries.map((i) => /* @__PURE__ */ o("div", { className: "claim", children: /* @__PURE__ */ o(ne, { task: i, nowMs: n }) }, te(i))) }),
831
+ /* @__PURE__ */ r("div", { className: "claims", children: t.primaries.map((i) => /* @__PURE__ */ r("div", { className: "claim", children: /* @__PURE__ */ r(ne, { task: i, nowMs: n }) }, te(i))) }),
819
832
  a > 0 && /* @__PURE__ */ m("details", { className: "fold", children: [
820
833
  /* @__PURE__ */ m("summary", { children: [
821
- /* @__PURE__ */ o("span", { className: "tw", children: "▶" }),
834
+ /* @__PURE__ */ r("span", { className: "tw", children: "▶" }),
822
835
  ` +${a} narrower claim${a > 1 ? "s" : ""}`
823
836
  ] }),
824
- /* @__PURE__ */ o("div", { className: "fold__body", children: t.narrower.map((i) => /* @__PURE__ */ m("div", { className: "claim", children: [
825
- /* @__PURE__ */ o(ne, { task: i, nowMs: n }),
826
- /* @__PURE__ */ o("div", { className: "covered", children: "⊂ covered by a claim above" })
837
+ /* @__PURE__ */ r("div", { className: "fold__body", children: t.narrower.map((i) => /* @__PURE__ */ m("div", { className: "claim", children: [
838
+ /* @__PURE__ */ r(ne, { task: i, nowMs: n }),
839
+ /* @__PURE__ */ r("div", { className: "covered", children: "⊂ covered by a claim above" })
827
840
  ] }, te(i))) })
828
841
  ] })
829
842
  ] });
@@ -833,24 +846,24 @@ function Tt({
833
846
  nowMs: n,
834
847
  selectedRepo: c
835
848
  }) {
836
- const r = wt(c), s = t.filter(
837
- (a) => a.status === "active" && M(a, c)
849
+ const o = wt(c), s = t.filter(
850
+ (a) => a.status === "active" && L(a, c)
838
851
  );
839
852
  if (s.length === 0) {
840
- const a = r ? "Nothing active right now." : `Nothing active in ${c}.`;
841
- return /* @__PURE__ */ o("div", { id: "active-list", children: /* @__PURE__ */ o("div", { className: "empty", children: a }) });
853
+ const a = o ? "Nothing active right now." : `Nothing active in ${c}.`;
854
+ return /* @__PURE__ */ r("div", { id: "active-list", children: /* @__PURE__ */ r("div", { className: "empty", children: a }) });
842
855
  }
843
- return /* @__PURE__ */ o("div", { id: "active-list", children: yt(s).map((a) => {
856
+ return /* @__PURE__ */ r("div", { id: "active-list", children: yt(s).map((a) => {
844
857
  const i = a.primaries.length === 1 && a.narrower.length === 0, l = te(a.primaries.concat(a.narrower)[0]);
845
- return i ? /* @__PURE__ */ o(
858
+ return i ? /* @__PURE__ */ r(
846
859
  At,
847
860
  {
848
861
  task: a.primaries[0],
849
862
  nowMs: n,
850
- allRepos: r
863
+ allRepos: o
851
864
  },
852
865
  l
853
- ) : /* @__PURE__ */ o(St, { group: a, nowMs: n, allRepos: r }, l);
866
+ ) : /* @__PURE__ */ r(St, { group: a, nowMs: n, allRepos: o }, l);
854
867
  }) });
855
868
  }
856
869
  const Ct = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, $t = (t) => t === null || t === "__all__";
@@ -858,17 +871,17 @@ function Et({
858
871
  tasks: t,
859
872
  nowMs: n,
860
873
  selectedRepo: c,
861
- doneShown: r,
874
+ doneShown: o,
862
875
  onLoadMore: s
863
876
  }) {
864
877
  const a = $t(c), i = t.filter(
865
- (u) => u.status !== "active" && M(u, c)
878
+ (u) => u.status !== "active" && L(u, c)
866
879
  );
867
880
  if (i.length === 0) {
868
881
  const u = a ? "No finished tasks yet." : `No finished tasks in ${c} yet.`;
869
- return /* @__PURE__ */ o("div", { id: "done-list", children: /* @__PURE__ */ o("div", { className: "empty", children: u }) });
882
+ return /* @__PURE__ */ r("div", { id: "done-list", children: /* @__PURE__ */ r("div", { className: "empty", children: u }) });
870
883
  }
871
- const l = i.slice(0, r);
884
+ const l = i.slice(0, o);
872
885
  let h = null;
873
886
  return /* @__PURE__ */ m("div", { id: "done-list", children: [
874
887
  l.map((u) => {
@@ -876,12 +889,12 @@ function Et({
876
889
  h = d;
877
890
  const f = u.status === "dropped", k = f ? `went offline ${K(u.endedAt ?? u.createdAt, n)} — no done signal` : `finished ${K(u.endedAt ?? u.createdAt, n)}${be(u.createdAt, u.endedAt) ? " · " + be(u.createdAt, u.endedAt) : ""}`;
878
891
  return /* @__PURE__ */ m(Ge, { children: [
879
- b !== null && /* @__PURE__ */ o("div", { className: "day", children: b }),
892
+ b !== null && /* @__PURE__ */ r("div", { className: "day", children: b }),
880
893
  /* @__PURE__ */ m("div", { className: "task", children: [
881
894
  /* @__PURE__ */ m("div", { className: "task__r1", children: [
882
- /* @__PURE__ */ o("span", { className: "task__who", children: u.agentName }),
883
- a && /* @__PURE__ */ o("span", { className: "task__repo", children: u.repo }),
884
- /* @__PURE__ */ o(
895
+ /* @__PURE__ */ r("span", { className: "task__who", children: u.agentName }),
896
+ a && /* @__PURE__ */ r("span", { className: "task__repo", children: u.repo }),
897
+ /* @__PURE__ */ r(
885
898
  "span",
886
899
  {
887
900
  className: "task__stat" + (f ? " task__stat--drop" : ""),
@@ -889,13 +902,13 @@ function Et({
889
902
  }
890
903
  )
891
904
  ] }),
892
- /* @__PURE__ */ o("div", { className: "task__intent", children: u.intent }),
893
- /* @__PURE__ */ o(je, { globs: u.pathGlobs }),
894
- /* @__PURE__ */ o("div", { className: "task__meta", children: k })
905
+ /* @__PURE__ */ r("div", { className: "task__intent", children: u.intent }),
906
+ /* @__PURE__ */ r(je, { globs: u.pathGlobs }),
907
+ /* @__PURE__ */ r("div", { className: "task__meta", children: k })
895
908
  ] })
896
909
  ] }, Ct(u));
897
910
  }),
898
- i.length > r && /* @__PURE__ */ o(
911
+ i.length > o && /* @__PURE__ */ r(
899
912
  "div",
900
913
  {
901
914
  className: "more",
@@ -905,25 +918,25 @@ function Et({
905
918
  onKeyDown: (u) => {
906
919
  (u.key === "Enter" || u.key === " ") && (u.preventDefault(), s());
907
920
  },
908
- children: `Load older · ${r} of ${i.length}`
921
+ children: `Load older · ${o} of ${i.length}`
909
922
  }
910
923
  )
911
924
  ] });
912
925
  }
913
926
  const Rt = 80;
914
927
  function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
915
- const r = P(null), s = P(!0), a = r.current;
928
+ const o = P(null), s = P(!0), a = o.current;
916
929
  a && (s.current = a.scrollHeight - a.scrollTop - a.clientHeight < Rt);
917
- const i = [...t].filter((l) => M(l, n)).reverse();
930
+ const i = [...t].filter((l) => L(l, n)).reverse();
918
931
  return Fe(() => {
919
- s.current && r.current && (r.current.scrollTop = r.current.scrollHeight);
920
- }, [i.length]), /* @__PURE__ */ o("div", { id: "chat", className: "chat", ref: r, children: i.length === 0 ? /* @__PURE__ */ o("div", { className: "empty", children: "No announcements yet — agents will post here as they coordinate." }) : i.map((l, h) => {
932
+ s.current && o.current && (o.current.scrollTop = o.current.scrollHeight);
933
+ }, [i.length]), /* @__PURE__ */ r("div", { id: "chat", className: "chat", ref: o, children: i.length === 0 ? /* @__PURE__ */ r("div", { className: "empty", children: "No announcements yet — agents will post here as they coordinate." }) : i.map((l, h) => {
921
934
  const d = "msg" + (l.targetAgentName !== null || l.toAdmin ? " msg--targeted" : "") + (l.fromAdmin ? " msg--me" : "");
922
935
  return (
923
936
  // The feed has no stable id; index is acceptable because the list is
924
937
  // append-only oldest->newest and rows are never reordered in place.
925
938
  /* @__PURE__ */ m("div", { className: d, children: [
926
- /* @__PURE__ */ o(
939
+ /* @__PURE__ */ r(
927
940
  "div",
928
941
  {
929
942
  className: "msg__avatar",
@@ -933,7 +946,7 @@ function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
933
946
  ),
934
947
  /* @__PURE__ */ m("div", { className: "msg__body", children: [
935
948
  /* @__PURE__ */ m("div", { className: "msg__head", children: [
936
- /* @__PURE__ */ o(
949
+ /* @__PURE__ */ r(
937
950
  "span",
938
951
  {
939
952
  className: "msg__who",
@@ -941,18 +954,22 @@ function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
941
954
  children: l.fromAgentName
942
955
  }
943
956
  ),
944
- l.fromHuman ? /* @__PURE__ */ o("span", { className: "msg__human", children: l.fromHuman }) : null,
945
- l.targetAgentName !== null ? /* @__PURE__ */ o("span", { className: "msg__to", children: `→ @${l.targetAgentName}` }) : l.toAdmin ? /* @__PURE__ */ o("span", { className: "msg__to", children: "→ admin" }) : null,
946
- /* @__PURE__ */ o("span", { className: "msg__time", children: K(l.createdAt, c) })
957
+ l.fromHuman ? /* @__PURE__ */ r("span", { className: "msg__human", children: l.fromHuman }) : null,
958
+ l.targetAgentName !== null ? /* @__PURE__ */ r("span", { className: "msg__to", children: `→ @${l.targetAgentName}` }) : l.targetMemberName !== null ? (
959
+ // An agent addressed a specific workspace member by name;
960
+ // legacy/collective operator messages fall through to "admin".
961
+ /* @__PURE__ */ r("span", { className: "msg__to", children: `→ @${l.targetMemberName}` })
962
+ ) : l.toAdmin ? /* @__PURE__ */ r("span", { className: "msg__to", children: "→ admin" }) : null,
963
+ /* @__PURE__ */ r("span", { className: "msg__time", children: K(l.createdAt, c) })
947
964
  ] }),
948
- /* @__PURE__ */ o("div", { className: "msg__text", children: l.body })
965
+ /* @__PURE__ */ r("div", { className: "msg__text", children: l.body })
949
966
  ] })
950
967
  ] }, h)
951
968
  );
952
969
  }) });
953
970
  }
954
971
  const Dt = 8;
955
- function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
972
+ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
956
973
  const s = oe(), a = P(null), [i, l] = N(""), [h, u] = N([]), [d, b] = N(0), [f, k] = N(null), [v, A] = N(!1), [$, S] = N(!1), y = gt(
957
974
  t.map((p) => ({ name: p.name, presence: p.presence, repo: p.repo ?? "" })),
958
975
  n
@@ -1001,17 +1018,17 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
1001
1018
  A(!0), S(!1);
1002
1019
  try {
1003
1020
  const I = { body: _, targetAgentName: C, repo: D };
1004
- await (c !== void 0 ? s.announceTo(c, I) : s.announce(I)), l(""), T(), await r();
1021
+ await (c !== void 0 ? s.announceTo(c, I) : s.announce(I)), l(""), T(), await o();
1005
1022
  } catch {
1006
1023
  S(!0);
1007
1024
  } finally {
1008
1025
  A(!1);
1009
1026
  }
1010
1027
  },
1011
- [i, y, n, c, s, T, r]
1028
+ [i, y, n, c, s, T, o]
1012
1029
  );
1013
1030
  return /* @__PURE__ */ m("div", { className: "composer", children: [
1014
- /* @__PURE__ */ o(
1031
+ /* @__PURE__ */ r(
1015
1032
  "div",
1016
1033
  {
1017
1034
  id: "mention-pop",
@@ -1031,8 +1048,8 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
1031
1048
  C.preventDefault(), G(p);
1032
1049
  },
1033
1050
  children: [
1034
- /* @__PURE__ */ o("div", { className: "ma", style: { background: z(p) }, children: ie(p) }),
1035
- /* @__PURE__ */ o("span", { children: p })
1051
+ /* @__PURE__ */ r("div", { className: "ma", style: { background: z(p) }, children: ie(p) }),
1052
+ /* @__PURE__ */ r("span", { children: p })
1036
1053
  ]
1037
1054
  },
1038
1055
  p
@@ -1048,7 +1065,7 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
1048
1065
  X(p);
1049
1066
  },
1050
1067
  children: [
1051
- /* @__PURE__ */ o(
1068
+ /* @__PURE__ */ r(
1052
1069
  "input",
1053
1070
  {
1054
1071
  id: "chat-input",
@@ -1068,33 +1085,33 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
1068
1085
  onKeyDown: F
1069
1086
  }
1070
1087
  ),
1071
- /* @__PURE__ */ o("button", { id: "chat-send", className: "chat-send", type: "submit", disabled: v, children: "Send" })
1088
+ /* @__PURE__ */ r("button", { id: "chat-send", className: "chat-send", type: "submit", disabled: v, children: "Send" })
1072
1089
  ]
1073
1090
  }
1074
1091
  ),
1075
- $ ? /* @__PURE__ */ o("div", { className: "chat__note", role: "status", children: "send failed — retry" }) : null
1092
+ $ ? /* @__PURE__ */ r("div", { className: "chat__note", role: "status", children: "send failed — retry" }) : null
1076
1093
  ] });
1077
1094
  }
1078
1095
  function Ne({
1079
1096
  title: t = "No workspace yet",
1080
1097
  children: n,
1081
1098
  onGetStarted: c,
1082
- ctaLabel: r = "Go to Config"
1099
+ ctaLabel: o = "Go to Config"
1083
1100
  }) {
1084
1101
  const s = Se();
1085
1102
  return /* @__PURE__ */ m("section", { className: "shepherd-empty-state", "aria-labelledby": s, children: [
1086
- /* @__PURE__ */ o("h2", { id: s, children: t }),
1087
- /* @__PURE__ */ o("p", { children: n ?? "Create a workspace or join one with an invite code to get started." }),
1088
- c && /* @__PURE__ */ o("button", { type: "button", onClick: c, children: r })
1103
+ /* @__PURE__ */ r("h2", { id: s, children: t }),
1104
+ /* @__PURE__ */ r("p", { children: n ?? "Create a workspace or join one with an invite code to get started." }),
1105
+ c && /* @__PURE__ */ r("button", { type: "button", onClick: c, children: o })
1089
1106
  ] });
1090
1107
  }
1091
1108
  const xt = [
1092
1109
  { id: "bug", label: "Bug" },
1093
1110
  { id: "suggestion", label: "Suggestion" },
1094
1111
  { id: "other", label: "Other" }
1095
- ], Lt = 1500;
1096
- function Mt({ workspaceId: t }) {
1097
- const n = oe(), c = Se(), [r, s] = N(!1), [a, i] = N("bug"), [l, h] = N(""), [u, d] = N(!1), [b, f] = N(null), [k, v] = N(!1);
1112
+ ], Mt = 1500;
1113
+ function Lt({ workspaceId: t }) {
1114
+ const n = oe(), c = Se(), [o, s] = N(!1), [a, i] = N("bug"), [l, h] = N(""), [u, d] = N(!1), [b, f] = N(null), [k, v] = N(!1);
1098
1115
  function A() {
1099
1116
  s((y) => !y);
1100
1117
  }
@@ -1106,7 +1123,7 @@ function Mt({ workspaceId: t }) {
1106
1123
  try {
1107
1124
  await n.submitFeedback({ type: a, body: l.trim() }, t), v(!0), h(""), setTimeout(() => {
1108
1125
  s(!1), $();
1109
- }, Lt);
1126
+ }, Mt);
1110
1127
  } catch (y) {
1111
1128
  f(ct(y));
1112
1129
  } finally {
@@ -1114,25 +1131,25 @@ function Mt({ workspaceId: t }) {
1114
1131
  }
1115
1132
  }
1116
1133
  return /* @__PURE__ */ m("div", { className: "shepherd-feedback", children: [
1117
- /* @__PURE__ */ o(
1134
+ /* @__PURE__ */ r(
1118
1135
  "button",
1119
1136
  {
1120
1137
  type: "button",
1121
1138
  className: "shepherd-feedback__trigger",
1122
1139
  onClick: A,
1123
- "aria-expanded": r,
1140
+ "aria-expanded": o,
1124
1141
  children: "Feedback"
1125
1142
  }
1126
1143
  ),
1127
- r && /* @__PURE__ */ m(
1144
+ o && /* @__PURE__ */ m(
1128
1145
  "section",
1129
1146
  {
1130
1147
  className: "shepherd-feedback__panel",
1131
1148
  "aria-labelledby": c,
1132
1149
  children: [
1133
- /* @__PURE__ */ o("h3", { id: c, children: "Give feedback" }),
1134
- k ? /* @__PURE__ */ o("p", { role: "status", children: "Thanks! Your feedback was sent." }) : /* @__PURE__ */ m(H, { children: [
1135
- /* @__PURE__ */ o("div", { className: "shepherd-feedback__types", children: xt.map((y) => /* @__PURE__ */ o(
1150
+ /* @__PURE__ */ r("h3", { id: c, children: "Give feedback" }),
1151
+ k ? /* @__PURE__ */ r("p", { role: "status", children: "Thanks! Your feedback was sent." }) : /* @__PURE__ */ m(H, { children: [
1152
+ /* @__PURE__ */ r("div", { className: "shepherd-feedback__types", children: xt.map((y) => /* @__PURE__ */ r(
1136
1153
  "button",
1137
1154
  {
1138
1155
  type: "button",
@@ -1142,7 +1159,7 @@ function Mt({ workspaceId: t }) {
1142
1159
  },
1143
1160
  y.id
1144
1161
  )) }),
1145
- /* @__PURE__ */ o(
1162
+ /* @__PURE__ */ r(
1146
1163
  "textarea",
1147
1164
  {
1148
1165
  "aria-label": "Feedback",
@@ -1151,8 +1168,8 @@ function Mt({ workspaceId: t }) {
1151
1168
  onChange: (y) => h(y.target.value)
1152
1169
  }
1153
1170
  ),
1154
- b && /* @__PURE__ */ o("p", { role: "alert", children: b }),
1155
- /* @__PURE__ */ o(
1171
+ b && /* @__PURE__ */ r("p", { role: "alert", children: b }),
1172
+ /* @__PURE__ */ r(
1156
1173
  "button",
1157
1174
  {
1158
1175
  type: "button",
@@ -1189,9 +1206,9 @@ function ee(t, n) {
1189
1206
  }
1190
1207
  }
1191
1208
  function Ot(t, n, c) {
1192
- const r = Re(n.tasks);
1209
+ const o = Re(n.tasks);
1193
1210
  let s = t;
1194
- if (s === null && r.length >= 2 && (s = fe(n.tasks)), s !== null && s !== "__all__" && !r.includes(s) && (s = "__all__"), c && s !== null && s !== "__all__") {
1211
+ if (s === null && o.length >= 2 && (s = fe(n.tasks)), s !== null && s !== "__all__" && !o.includes(s) && (s = "__all__"), c && s !== null && s !== "__all__") {
1195
1212
  const a = n.tasks.some(
1196
1213
  (l) => l.status === "active" && l.repo === s
1197
1214
  ), i = n.tasks.some((l) => l.status === "active");
@@ -1200,13 +1217,13 @@ function Ot(t, n, c) {
1200
1217
  return s;
1201
1218
  }
1202
1219
  function Gt(t) {
1203
- const n = {}, c = (r, s) => {
1204
- const a = n[r] ?? (n[r] = { active: 0, done: 0 });
1220
+ const n = {}, c = (o, s) => {
1221
+ const a = n[o] ?? (n[o] = { active: 0, done: 0 });
1205
1222
  a[s]++;
1206
1223
  };
1207
- for (const r of t.tasks) {
1208
- const s = r.status === "active" ? "active" : "done";
1209
- c(r.repo, s), c("__all__", s);
1224
+ for (const o of t.tasks) {
1225
+ const s = o.status === "active" ? "active" : "done";
1226
+ c(o.repo, s), c("__all__", s);
1210
1227
  }
1211
1228
  return n;
1212
1229
  }
@@ -1214,9 +1231,9 @@ function Kt({
1214
1231
  workspaceId: t,
1215
1232
  config: n,
1216
1233
  switcher: c,
1217
- hasWorkspace: r
1234
+ hasWorkspace: o
1218
1235
  } = {}) {
1219
- const s = n != null, a = r === !1, { snapshot: i, status: l, lastUpdatedMs: h, refresh: u } = mt({
1236
+ const s = n != null, a = o === !1, { snapshot: i, status: l, lastUpdatedMs: h, refresh: u } = mt({
1220
1237
  workspaceId: t,
1221
1238
  // A no-workspace board has nothing to poll; keep it off the hub.
1222
1239
  enabled: !a
@@ -1232,16 +1249,16 @@ function Kt({
1232
1249
  { id: "tasks", label: "Tasks" },
1233
1250
  { id: "chat", label: "Chat" }
1234
1251
  ], k = P([]), v = R(
1235
- (g, L) => {
1252
+ (g, M) => {
1236
1253
  var de;
1237
1254
  const O = f.length - 1;
1238
1255
  let x = null;
1239
1256
  switch (g.key) {
1240
1257
  case "ArrowRight":
1241
- x = L === O ? 0 : L + 1;
1258
+ x = M === O ? 0 : M + 1;
1242
1259
  break;
1243
1260
  case "ArrowLeft":
1244
- x = L === 0 ? O : L - 1;
1261
+ x = M === 0 ? O : M - 1;
1245
1262
  break;
1246
1263
  case "Home":
1247
1264
  x = 0;
@@ -1265,8 +1282,8 @@ function Kt({
1265
1282
  ), [S, y] = N(Q), j = P(!0), T = R((g) => {
1266
1283
  b(g), ee(we, g);
1267
1284
  }, []), q = R((g) => {
1268
- const L = g === null ? "__all__" : g;
1269
- $(L), ee(J, L), y(Q);
1285
+ const M = g === null ? "__all__" : g;
1286
+ $(M), ee(J, M), y(Q);
1270
1287
  }, []), G = R(() => {
1271
1288
  y((g) => g + Q);
1272
1289
  }, []), w = i ? Ot(A, i, j.current) : A;
@@ -1274,18 +1291,18 @@ function Kt({
1274
1291
  i && (j.current = !1, w !== A && ($(w), w !== null && w !== "__all__" && ee(J, w)));
1275
1292
  }, [i, w, A]);
1276
1293
  const F = i ? Date.parse(i.serverTime) : Date.now(), X = i ? Re(i.tasks) : [], p = i ? Gt(i) : {}, _ = i ? i.agents.filter(
1277
- (g) => g.presence === "live" && M({ repo: g.repo ?? "" }, w)
1278
- ).length : 0, C = i ? i.tasks.filter((g) => g.status === "active" && M(g, w)).length : 0, D = Pt[l], I = h === null ? "" : `updated ${Math.floor((Date.now() - h) / 1e3)}s ago`, B = (i == null ? void 0 : i.agents) ?? [], W = (i == null ? void 0 : i.tasks) ?? [], De = (i == null ? void 0 : i.announcements) ?? [], Ie = W.filter(
1279
- (g) => g.status === "active" && M(g, w)
1294
+ (g) => g.presence === "live" && L({ repo: g.repo ?? "" }, w)
1295
+ ).length : 0, C = i ? i.tasks.filter((g) => g.status === "active" && L(g, w)).length : 0, D = Pt[l], I = h === null ? "" : `updated ${Math.floor((Date.now() - h) / 1e3)}s ago`, B = (i == null ? void 0 : i.agents) ?? [], W = (i == null ? void 0 : i.tasks) ?? [], De = (i == null ? void 0 : i.announcements) ?? [], Ie = W.filter(
1296
+ (g) => g.status === "active" && L(g, w)
1280
1297
  ).length, xe = W.filter(
1281
- (g) => g.status !== "active" && M(g, w)
1298
+ (g) => g.status !== "active" && L(g, w)
1282
1299
  ).length, ce = !a && d !== "config";
1283
1300
  return /* @__PURE__ */ m("div", { id: "board", children: [
1284
1301
  /* @__PURE__ */ m("header", { children: [
1285
- /* @__PURE__ */ o("h1", { className: "brand", style: { margin: 0, font: "inherit" }, children: "Shepherd" }),
1302
+ /* @__PURE__ */ r("h1", { className: "brand", style: { margin: 0, font: "inherit" }, children: "Shepherd" }),
1286
1303
  c,
1287
1304
  ce && /* @__PURE__ */ m(H, { children: [
1288
- /* @__PURE__ */ o(
1305
+ /* @__PURE__ */ r(
1289
1306
  _t,
1290
1307
  {
1291
1308
  repos: X,
@@ -1295,15 +1312,15 @@ function Kt({
1295
1312
  }
1296
1313
  ),
1297
1314
  /* @__PURE__ */ m("span", { className: "vitals", children: [
1298
- /* @__PURE__ */ o("b", { id: "vitals-online", children: _ }),
1315
+ /* @__PURE__ */ r("b", { id: "vitals-online", children: _ }),
1299
1316
  " online · ",
1300
- /* @__PURE__ */ o("b", { id: "vitals-active", children: C }),
1317
+ /* @__PURE__ */ r("b", { id: "vitals-active", children: C }),
1301
1318
  " active"
1302
1319
  ] })
1303
1320
  ] }),
1304
- /* @__PURE__ */ o("span", { className: "grow" }),
1321
+ /* @__PURE__ */ r("span", { className: "grow" }),
1305
1322
  ce && /* @__PURE__ */ m(H, { children: [
1306
- /* @__PURE__ */ o(
1323
+ /* @__PURE__ */ r(
1307
1324
  "span",
1308
1325
  {
1309
1326
  id: "status",
@@ -1311,9 +1328,9 @@ function Kt({
1311
1328
  children: D.text
1312
1329
  }
1313
1330
  ),
1314
- /* @__PURE__ */ o("span", { id: "freshness", className: "freshness", children: I })
1331
+ /* @__PURE__ */ r("span", { id: "freshness", className: "freshness", children: I })
1315
1332
  ] }),
1316
- /* @__PURE__ */ o("nav", { className: "tabs", role: "tablist", "aria-label": "Shepherd views", children: f.map(({ id: g, label: L }, O) => /* @__PURE__ */ o(
1333
+ /* @__PURE__ */ r("nav", { className: "tabs", role: "tablist", "aria-label": "Shepherd views", children: f.map(({ id: g, label: M }, O) => /* @__PURE__ */ r(
1317
1334
  "button",
1318
1335
  {
1319
1336
  ref: (x) => {
@@ -1329,35 +1346,35 @@ function Kt({
1329
1346
  tabIndex: d === g ? 0 : -1,
1330
1347
  onClick: () => T(g),
1331
1348
  onKeyDown: (x) => v(x, O),
1332
- children: L
1349
+ children: M
1333
1350
  },
1334
1351
  g
1335
1352
  )) })
1336
1353
  ] }),
1337
- /* @__PURE__ */ o(
1354
+ /* @__PURE__ */ r(
1338
1355
  "section",
1339
1356
  {
1340
1357
  id: "panel-tasks",
1341
1358
  role: "tabpanel",
1342
1359
  "aria-labelledby": "tab-tasks",
1343
1360
  hidden: d !== "tasks",
1344
- children: a ? /* @__PURE__ */ o(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m(H, { children: [
1345
- /* @__PURE__ */ o(Nt, { agents: B, tasks: W, selectedRepo: w }),
1361
+ children: a ? /* @__PURE__ */ r(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m(H, { children: [
1362
+ /* @__PURE__ */ r(Nt, { agents: B, tasks: W, selectedRepo: w }),
1346
1363
  /* @__PURE__ */ m("div", { className: "board", children: [
1347
1364
  /* @__PURE__ */ m("div", { className: "col", children: [
1348
1365
  /* @__PURE__ */ m("div", { className: "colhead", children: [
1349
- /* @__PURE__ */ o("h2", { children: "Active" }),
1350
- /* @__PURE__ */ o("span", { className: "n", id: "active-count", children: Ie })
1366
+ /* @__PURE__ */ r("h2", { children: "Active" }),
1367
+ /* @__PURE__ */ r("span", { className: "n", id: "active-count", children: Ie })
1351
1368
  ] }),
1352
- /* @__PURE__ */ o(Tt, { tasks: W, nowMs: F, selectedRepo: w })
1369
+ /* @__PURE__ */ r(Tt, { tasks: W, nowMs: F, selectedRepo: w })
1353
1370
  ] }),
1354
- /* @__PURE__ */ o("div", { className: "board__rule" }),
1371
+ /* @__PURE__ */ r("div", { className: "board__rule" }),
1355
1372
  /* @__PURE__ */ m("div", { className: "col", children: [
1356
1373
  /* @__PURE__ */ m("div", { className: "colhead", children: [
1357
- /* @__PURE__ */ o("h2", { children: "Done" }),
1358
- /* @__PURE__ */ o("span", { className: "n", id: "done-count", children: xe })
1374
+ /* @__PURE__ */ r("h2", { children: "Done" }),
1375
+ /* @__PURE__ */ r("span", { className: "n", id: "done-count", children: xe })
1359
1376
  ] }),
1360
- /* @__PURE__ */ o(
1377
+ /* @__PURE__ */ r(
1361
1378
  Et,
1362
1379
  {
1363
1380
  tasks: W,
@@ -1372,16 +1389,16 @@ function Kt({
1372
1389
  ] })
1373
1390
  }
1374
1391
  ),
1375
- /* @__PURE__ */ o(
1392
+ /* @__PURE__ */ r(
1376
1393
  "section",
1377
1394
  {
1378
1395
  id: "panel-chat",
1379
1396
  role: "tabpanel",
1380
1397
  "aria-labelledby": "tab-chat",
1381
1398
  hidden: d !== "chat",
1382
- children: a ? /* @__PURE__ */ o(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m("div", { className: "chat-wrap", children: [
1383
- /* @__PURE__ */ o(jt, { announcements: De, selectedRepo: w, nowMs: F }),
1384
- /* @__PURE__ */ o(
1399
+ children: a ? /* @__PURE__ */ r(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m("div", { className: "chat-wrap", children: [
1400
+ /* @__PURE__ */ r(jt, { announcements: De, selectedRepo: w, nowMs: F }),
1401
+ /* @__PURE__ */ r(
1385
1402
  It,
1386
1403
  {
1387
1404
  agents: B,
@@ -1393,7 +1410,7 @@ function Kt({
1393
1410
  ] })
1394
1411
  }
1395
1412
  ),
1396
- s && /* @__PURE__ */ o(
1413
+ s && /* @__PURE__ */ r(
1397
1414
  "section",
1398
1415
  {
1399
1416
  id: "panel-config",
@@ -1403,7 +1420,7 @@ function Kt({
1403
1420
  children: n
1404
1421
  }
1405
1422
  ),
1406
- /* @__PURE__ */ o(Mt, { workspaceId: t })
1423
+ /* @__PURE__ */ r(Lt, { workspaceId: t })
1407
1424
  ] });
1408
1425
  }
1409
1426
  export {