@markmo/europacore-session-ui 0.3.0 → 0.4.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 (51) hide show
  1. package/dist/ArtifactsPage-BxaqShTv.js +1178 -0
  2. package/dist/{BoardPage-DDcf5vup.js → BoardPage-DH7p5o99.js} +54 -54
  3. package/dist/{CardDetail-D0TLVhf7.js → CardDetail-LfDCJQhS.js} +26 -26
  4. package/dist/{ComparePage-C32hPOqV.js → ComparePage-CrbCyu4u.js} +33 -33
  5. package/dist/MemoriesPage-BRA53Hlb.js +679 -0
  6. package/dist/{OverviewPage-BkeuYg6d.js → OverviewPage-BSBqY83_.js} +31 -31
  7. package/dist/{RegisterPage-Dawr26jh.js → RegisterPage-64yGl9E-.js} +75 -75
  8. package/dist/SessionPage-C4hSlxWQ.js +906 -0
  9. package/dist/api/agentClient.d.ts +62 -1
  10. package/dist/api/wire.d.ts +461 -4
  11. package/dist/features/artifacts/ArtifactDetail.d.ts +15 -0
  12. package/dist/features/artifacts/ArtifactDialogs.d.ts +29 -0
  13. package/dist/features/artifacts/ArtifactLedger.d.ts +11 -0
  14. package/dist/features/artifacts/ArtifactStats.d.ts +9 -0
  15. package/dist/features/artifacts/ArtifactsPage.d.ts +1 -0
  16. package/dist/features/artifacts/artifactsCommands.d.ts +3 -0
  17. package/dist/features/artifacts/artifactsStore.d.ts +27 -0
  18. package/dist/features/artifacts/artifactsUi.d.ts +33 -0
  19. package/dist/features/bootstrap.d.ts +1 -0
  20. package/dist/features/chat/model/artifactAccess.d.ts +50 -0
  21. package/dist/features/chat/model/artifactCsv.d.ts +11 -0
  22. package/dist/features/chat/model/artifactExport.d.ts +45 -0
  23. package/dist/features/chat/model/artifactStats.d.ts +79 -0
  24. package/dist/features/chat/model/artifacts.d.ts +151 -0
  25. package/dist/features/chat/model/claims.d.ts +102 -0
  26. package/dist/features/chat/model/contextSources.d.ts +41 -0
  27. package/dist/features/chat/model/entries.d.ts +32 -2
  28. package/dist/features/chat/model/format.d.ts +6 -0
  29. package/dist/features/chat/model/memoryRecords.d.ts +79 -0
  30. package/dist/features/chat/model/monitors.d.ts +11 -0
  31. package/dist/features/chat/model/progress.d.ts +73 -0
  32. package/dist/features/chat/model/tasks.d.ts +1 -1
  33. package/dist/features/chat/panels/ProgressPanel.d.ts +8 -0
  34. package/dist/features/chat/session/SessionController.d.ts +3 -2
  35. package/dist/features/chat/session/useFileMentions.d.ts +18 -5
  36. package/dist/features/chat/transcript/ArtifactCard.d.ts +8 -0
  37. package/dist/features/chat/transcript/Rows.d.ts +12 -1
  38. package/dist/features/memories/MemoriesPage.d.ts +1 -0
  39. package/dist/features/memories/memoriesCommands.d.ts +3 -0
  40. package/dist/features/memories/memoriesController.d.ts +81 -0
  41. package/dist/features/workspace/claimsCommands.d.ts +26 -0
  42. package/dist/features/workspace/collisionsWatcher.d.ts +7 -0
  43. package/dist/features/workspace/useSessionPageHooks.d.ts +1 -1
  44. package/dist/{index-B0hmy2Cw.js → index-CMPf-3JZ.js} +4412 -3293
  45. package/dist/index.d.ts +2 -0
  46. package/dist/index.js +86 -82
  47. package/dist/lib/paths.d.ts +12 -0
  48. package/dist/lib/zip.d.ts +14 -0
  49. package/dist/{promptHistory-DQyt2Br0.js → promptHistory-BR0NpLCI.js} +14 -14
  50. package/package.json +1 -1
  51. package/dist/SessionPage-68nDek9w.js +0 -881
@@ -1,27 +1,27 @@
1
1
  import { jsxs as b, jsx as a, Fragment as te } from "react/jsx-runtime";
2
- import { memo as xe, useRef as P, Fragment as be, useState as K, useLayoutEffect as ne, useEffect as V, createElement as we, useMemo as J, useCallback as Y } from "react";
2
+ import { memo as xe, useRef as I, Fragment as be, useState as z, useLayoutEffect as ne, useEffect as V, createElement as we, useMemo as J, useCallback as U } from "react";
3
3
  import { useNavigate as ye } from "react-router";
4
4
  import { Menu as ve, MenuButton as ke, Field as Ne, Switch as Se, Label as Me } from "@headlessui/react";
5
5
  import { MoreHorizontal as Ce, LayoutGrid as Te } from "lucide-react";
6
- import { y as H, ae as $e, a as E, I as Ae, au as Ee, av as z, aw as ae, ax as _e, ay as Q, ad as Le, az as pe, a1 as Pe, g as Ie, aA as se, aB as Fe, F as Be, ah as Oe, H as oe } from "./index-B0hmy2Cw.js";
7
- import { a as He, S as De, c as Ge, b as je, d as Re, i as ze, e as me, f as qe, g as Ke, h as Ue, j as Ye, C as Ve } from "./CardDetail-D0TLVhf7.js";
6
+ import { K as D, an as $e, a as E, I as Ae, aD as Ee, aE as K, aF as ae, aG as _e, aH as Q, am as Le, aI as pe, aa as Ie, n as Pe, aJ as se, aK as Fe, V as Oe, aq as Be, Y as oe } from "./index-CMPf-3JZ.js";
7
+ import { a as De, S as He, c as Ge, b as je, d as Re, i as Ke, e as me, f as qe, g as ze, h as Ye, j as Ue, C as Ve } from "./CardDetail-LfDCJQhS.js";
8
8
  import { createPortal as We } from "react-dom";
9
9
  const Xe = 15e3;
10
10
  function Je(e) {
11
11
  return e.started || e.missing ? Promise.resolve() : new Promise((t) => {
12
12
  const n = () => {
13
13
  clearTimeout(s), i(), t();
14
- }, i = H.subscribe(() => {
14
+ }, i = D.subscribe(() => {
15
15
  (e.started || e.missing) && n();
16
16
  }), s = setTimeout(n, Xe);
17
17
  });
18
18
  }
19
19
  async function Qe(e, t) {
20
- const n = H.attach(e);
20
+ const n = D.attach(e);
21
21
  return await Je(n), n.missing || !n.started ? !1 : n.setStage(t);
22
22
  }
23
23
  const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s, onHover: r, onLongPress: p }) {
24
- const { row: o } = t, y = P(null), f = P(null), v = P(!1), T = He(o, n), I = De[o.status], F = Ge(t), _ = je(o, i), D = $e(o.costUsd), l = o.status === "failed" || o.attention === "failed", m = Re(o), N = ze(o, n), k = () => {
24
+ const { row: o } = t, y = I(null), f = I(null), v = I(!1), T = De(o, n), P = He[o.status], F = Ge(t), _ = je(o, i), H = $e(o.costUsd), l = o.status === "failed" || o.attention === "failed", m = Re(o), N = Ke(o, n), k = () => {
25
25
  f.current && clearTimeout(f.current.timer), f.current = null;
26
26
  };
27
27
  return (
@@ -86,11 +86,11 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
86
86
  /* @__PURE__ */ a(
87
87
  "span",
88
88
  {
89
- className: E("mt-px w-3 shrink-0 text-center text-[12px] leading-5", I.tone, o.status === "running" && "animate-pulse"),
90
- title: I.label,
89
+ className: E("mt-px w-3 shrink-0 text-center text-[12px] leading-5", P.tone, o.status === "running" && "animate-pulse"),
90
+ title: P.label,
91
91
  role: "img",
92
- "aria-label": I.label,
93
- children: I.glyph
92
+ "aria-label": P.label,
93
+ children: P.glyph
94
94
  }
95
95
  ),
96
96
  /* @__PURE__ */ a(
@@ -117,18 +117,18 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
117
117
  }
118
118
  ) }),
119
119
  /* @__PURE__ */ b(Ee, { children: [
120
- /* @__PURE__ */ a(z, { onClick: () => s.open(t), children: "Open" }),
121
- o.prUrl && /* @__PURE__ */ a(z, { onClick: () => window.open(o.prUrl, "_blank", "noopener,noreferrer"), children: "Open pull request" }),
120
+ /* @__PURE__ */ a(K, { onClick: () => s.open(t), children: "Open" }),
121
+ o.prUrl && /* @__PURE__ */ a(K, { onClick: () => window.open(o.prUrl, "_blank", "noopener,noreferrer"), children: "Open pull request" }),
122
122
  m && /* @__PURE__ */ b(te, { children: [
123
123
  /* @__PURE__ */ a(ae, {}),
124
124
  /* @__PURE__ */ a(_e, { children: "Set stage" }),
125
- /* @__PURE__ */ a(z, { onClick: () => s.setStage(o, "backlog"), children: Q.backlog }),
126
- /* @__PURE__ */ a(z, { onClick: () => s.setStage(o, "cancelled"), children: Q.cancelled }),
127
- /* @__PURE__ */ a(z, { onClick: () => s.setStage(o, null), children: "Clear" })
125
+ /* @__PURE__ */ a(K, { onClick: () => s.setStage(o, "backlog"), children: Q.backlog }),
126
+ /* @__PURE__ */ a(K, { onClick: () => s.setStage(o, "cancelled"), children: Q.cancelled }),
127
+ /* @__PURE__ */ a(K, { onClick: () => s.setStage(o, null), children: "Clear" })
128
128
  ] }),
129
129
  N && /* @__PURE__ */ b(te, { children: [
130
130
  /* @__PURE__ */ a(ae, {}),
131
- /* @__PURE__ */ a(z, { onClick: () => s.markSeen(o), children: "Mark seen" })
131
+ /* @__PURE__ */ a(K, { onClick: () => s.markSeen(o), children: "Mark seen" })
132
132
  ] })
133
133
  ] })
134
134
  ] })
@@ -145,7 +145,7 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
145
145
  Le(o.tokens),
146
146
  " tok"
147
147
  ] }),
148
- D && /* @__PURE__ */ a("span", { children: D }),
148
+ H && /* @__PURE__ */ a("span", { children: H }),
149
149
  o.model && /* @__PURE__ */ a("span", { className: "min-w-0 truncate", children: o.model })
150
150
  ] })
151
151
  ]
@@ -268,7 +268,7 @@ function de(e) {
268
268
  return Math.round(Math.min(rt, Math.max(re, t)));
269
269
  }
270
270
  function ue(e, t, n = {}) {
271
- const i = n.shadow || "var(--shadow-pop)", s = U(t.left + t.width / 2 - (e.left + e.width / 2)), r = U(t.top + t.height / 2 - (e.top + e.height / 2)), p = e.width > 0 ? U(t.width / e.width, 4) : 1, o = e.height > 0 ? U(t.height / e.height, 4) : 1, y = (v, T) => `translate(${v}px, ${T + Z.y}px) scale(${Z.scale}) rotate(${Z.rotate}deg)`;
271
+ const i = n.shadow || "var(--shadow-pop)", s = Y(t.left + t.width / 2 - (e.left + e.width / 2)), r = Y(t.top + t.height / 2 - (e.top + e.height / 2)), p = e.width > 0 ? Y(t.width / e.width, 4) : 1, o = e.height > 0 ? Y(t.height / e.height, 4) : 1, y = (v, T) => `translate(${v}px, ${T + Z.y}px) scale(${Z.scale}) rotate(${Z.rotate}deg)`;
272
272
  return [
273
273
  { offset: 0, transform: "translate(0px, 0px) scale(1) rotate(0deg)", boxShadow: "none", opacity: 1 },
274
274
  { offset: 0.16, transform: y(0, 0), boxShadow: i, opacity: 1 },
@@ -277,7 +277,7 @@ function ue(e, t, n = {}) {
277
277
  ];
278
278
  }
279
279
  function lt(e, t) {
280
- const n = U(e.left - t.left), i = U(e.top - t.top);
280
+ const n = Y(e.left - t.left), i = Y(e.top - t.top);
281
281
  return Math.abs(n) < 0.5 && Math.abs(i) < 0.5 ? null : [{ transform: `translate(${n}px, ${i}px)` }, { transform: "translate(0px, 0px)" }];
282
282
  }
283
283
  function ct(e, t, n = "both", i = 1) {
@@ -295,7 +295,7 @@ function ut(e, t, n) {
295
295
  const s = t.left + t.width / 2 >= n.left + n.width / 2 ? n.left + n.width - e.width * 0.35 : n.left - e.width * 0.65, r = Math.min(Math.max(e.top, n.top), Math.max(n.top, n.top + n.height - e.height));
296
296
  return { left: s, top: r, width: e.width, height: e.height };
297
297
  }
298
- function U(e, t = 2) {
298
+ function Y(e, t = 2) {
299
299
  const n = 10 ** t;
300
300
  return Math.round(e * n) / n;
301
301
  }
@@ -326,7 +326,7 @@ function fe(e) {
326
326
  return t;
327
327
  }
328
328
  function mt(e, { containerRef: t, reducedMotion: n }) {
329
- const [i, s] = K(e), r = le(X(e)), p = le(X(i)), o = P(null), y = P(null), f = P({
329
+ const [i, s] = z(e), r = le(X(e)), p = le(X(i)), o = I(null), y = I(null), f = I({
330
330
  animations: /* @__PURE__ */ new Set(),
331
331
  clones: /* @__PURE__ */ new Map(),
332
332
  hidden: /* @__PURE__ */ new Set(),
@@ -362,9 +362,9 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
362
362
  v();
363
363
  const h = it(X(i), X(e)), S = /* @__PURE__ */ new Map();
364
364
  for (const g of [...h.flights.map((M) => M.id), ...h.exits.map((M) => M.id)]) {
365
- const M = N.get(g), B = k.get(g);
366
- if (!M || !B) continue;
367
- const $ = gt(m, M, g, B);
365
+ const M = N.get(g), O = k.get(g);
366
+ if (!M || !O) continue;
367
+ const $ = gt(m, M, g, O);
368
368
  S.set(g, $), f.current.clones.set(g, $);
369
369
  }
370
370
  y.current = { plan: h, rects: k, clones: S }, s(e);
@@ -372,7 +372,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
372
372
  const l = y.current;
373
373
  y.current = null;
374
374
  const m = t.current;
375
- !l || !m || I(l, m, n ?? ge());
375
+ !l || !m || P(l, m, n ?? ge());
376
376
  }, [i]), V(
377
377
  () => () => {
378
378
  v();
@@ -380,11 +380,11 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
380
380
  },
381
381
  []
382
382
  );
383
- function I({ plan: l, rects: m, clones: N }, k, h) {
384
- const S = f.current, g = fe(k), M = l.flights.length > ot, B = L(k), $ = /* @__PURE__ */ new Set();
383
+ function P({ plan: l, rects: m, clones: N }, k, h) {
384
+ const S = f.current, g = fe(k), M = l.flights.length > ot, O = L(k), $ = /* @__PURE__ */ new Set();
385
385
  for (const c of l.flights) {
386
386
  const x = g.get(c.id)?.closest("[data-board-column]");
387
- x && !ct(L(x), B, "x", 0.5) && $.add(c.id);
387
+ x && !ct(L(x), O, "x", 0.5) && $.add(c.id);
388
388
  }
389
389
  for (const c of l.flights) {
390
390
  const d = g.get(c.id), x = d?.closest("[data-column-scroll]");
@@ -402,7 +402,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
402
402
  { duration: C, easing: "ease-out", fill: c.hasAttribute("data-flip-clone") ? "forwards" : "none" }
403
403
  ),
404
404
  u
405
- ), O = (c, d) => {
405
+ ), B = (c, d) => {
406
406
  d.remove(), S.clones.get(c) === d && S.clones.delete(c);
407
407
  };
408
408
  if (!h)
@@ -418,22 +418,22 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
418
418
  }
419
419
  for (const { id: c } of l.exits) {
420
420
  const d = N.get(c);
421
- d && G(d, 1, 0, q, () => O(c, d), !0);
421
+ d && G(d, 1, 0, q, () => B(c, d), !0);
422
422
  }
423
423
  const j = xt(k, "--shadow-pop");
424
424
  for (const c of l.flights) {
425
425
  const d = N.get(c.id), x = g.get(c.id), C = m.get(c.id);
426
426
  if (!d || !C) continue;
427
427
  if (!x) {
428
- G(d, 1, 0, q, () => O(c.id, d));
428
+ G(d, 1, 0, q, () => B(c.id, d));
429
429
  continue;
430
430
  }
431
431
  if (h || M) {
432
- G(d, 1, 0, q * 1.2, () => O(c.id, d)), G(x, 0, 1, q * 1.2), $.has(c.id) && _(c.to, h);
432
+ G(d, 1, 0, q * 1.2, () => B(c.id, d)), G(x, 0, 1, q * 1.2), $.has(c.id) && _(c.to, h);
433
433
  continue;
434
434
  }
435
435
  if ($.has(c.id)) {
436
- const w = x.closest("[data-board-column]"), A = ut(C, L(w), B);
436
+ const w = x.closest("[data-board-column]"), A = ut(C, L(w), O);
437
437
  T(
438
438
  d.animate(ue(C, A, { shadow: j, fade: !0 }), {
439
439
  duration: de(ce(C, A)),
@@ -441,7 +441,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
441
441
  fill: "forwards"
442
442
  }),
443
443
  () => {
444
- O(c.id, d), _(c.to, !1);
444
+ B(c.id, d), _(c.to, !1);
445
445
  }
446
446
  );
447
447
  continue;
@@ -450,7 +450,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
450
450
  x.style.visibility = "hidden", S.hidden.add(x), T(
451
451
  d.animate(ue(C, u, { shadow: j }), { duration: de(ce(C, u)), easing: ee, fill: "forwards" }),
452
452
  () => {
453
- O(c.id, d), x.style.visibility = "", S.hidden.delete(x), F(x);
453
+ B(c.id, d), x.style.visibility = "", S.hidden.delete(x), F(x);
454
454
  }
455
455
  );
456
456
  }
@@ -473,7 +473,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
473
473
  () => N.removeAttribute("data-pulsed")
474
474
  );
475
475
  }
476
- const D = typeof document > "u" ? null : We(
476
+ const H = typeof document > "u" ? null : We(
477
477
  we("div", {
478
478
  ref: o,
479
479
  "data-board-overlay": "",
@@ -482,7 +482,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
482
482
  }),
483
483
  document.body
484
484
  );
485
- return { shown: r === p ? e : i, overlay: D };
485
+ return { shown: r === p ? e : i, overlay: H };
486
486
  }
487
487
  function gt(e, t, n, i) {
488
488
  const s = t.cloneNode(!0);
@@ -525,14 +525,14 @@ function vt(e, t) {
525
525
  }
526
526
  }
527
527
  function kt(e) {
528
- const [t, n] = K(() => Date.now());
528
+ const [t, n] = z(() => Date.now());
529
529
  return V(() => {
530
530
  const i = setInterval(() => n(Date.now()), e);
531
531
  return () => clearInterval(i);
532
532
  }, [e]), t;
533
533
  }
534
534
  function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion: r }) {
535
- const [p, o] = K(() => yt(he)), y = J(() => Ke(e, p), [e, p]), f = Ue(y), v = P(null), { shown: T, overlay: I } = mt(y, { containerRef: v, reducedMotion: r }), F = kt(3e4), [_, D] = K(y[0]?.stage ?? null), l = P(0), m = Y(() => {
535
+ const [p, o] = z(() => yt(he)), y = J(() => ze(e, p), [e, p]), f = Ye(y), v = I(null), { shown: T, overlay: P } = mt(y, { containerRef: v, reducedMotion: r }), F = kt(3e4), [_, H] = z(y[0]?.stage ?? null), l = I(0), m = U(() => {
536
536
  cancelAnimationFrame(l.current), l.current = requestAnimationFrame(() => {
537
537
  const u = v.current;
538
538
  if (!u) return;
@@ -542,31 +542,31 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
542
542
  const W = Math.abs(R.offsetLeft + R.offsetWidth / 2 - w);
543
543
  (!A || W < A.d) && (A = { stage: R.dataset.boardColumn, d: W });
544
544
  }
545
- A && D(A.stage);
545
+ A && H(A.stage);
546
546
  });
547
547
  }, []);
548
548
  V(() => () => cancelAnimationFrame(l.current), []);
549
- const N = Y(
549
+ const N = U(
550
550
  (u) => {
551
551
  const w = v.current, A = w?.querySelector(`[data-board-column="${u}"]`);
552
552
  if (!w || !A) return;
553
- D(u);
553
+ H(u);
554
554
  const R = Math.max(0, A.offsetLeft - (w.clientWidth - A.offsetWidth) / 2), W = r ?? ge() ? "auto" : "smooth";
555
555
  typeof w.scrollTo == "function" ? w.scrollTo({ left: R, behavior: W }) : w.scrollLeft = R;
556
556
  },
557
557
  [r]
558
- ), [k, h] = K(null), S = P(null), g = Y(() => {
558
+ ), [k, h] = z(null), S = I(null), g = U(() => {
559
559
  S.current && clearTimeout(S.current), S.current = null;
560
- }, []), M = Y((u, w) => {
560
+ }, []), M = U((u, w) => {
561
561
  g(), S.current = setTimeout(
562
562
  () => h(w ? { key: u.row.key, el: w } : null),
563
563
  w ? bt : wt
564
564
  );
565
565
  }, [g]);
566
566
  V(() => g, [g]);
567
- const [B, $] = K(null), G = Y((u) => {
567
+ const [O, $] = z(null), G = U((u) => {
568
568
  g(), h(null), $(u.row.key);
569
- }, [g]), O = J(() => new Map(y.flatMap((u) => u.cards).map((u) => [u.row.key, u])), [y]), j = k?.el.isConnected ? O.get(k.key) : void 0, c = B ? O.get(B) : void 0, d = J(
569
+ }, [g]), B = J(() => new Map(y.flatMap((u) => u.cards).map((u) => [u.row.key, u])), [y]), j = k?.el.isConnected ? B.get(k.key) : void 0, c = O ? B.get(O) : void 0, d = J(
570
570
  () => ({
571
571
  ...n,
572
572
  open: (u) => {
@@ -638,10 +638,10 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
638
638
  /* @__PURE__ */ a("div", { className: "w-px shrink-0", "aria-hidden": "true" })
639
639
  ]
640
640
  }
641
- ) : /* @__PURE__ */ a(Be, { icon: /* @__PURE__ */ a(Te, { size: 20 }), title: "No sessions yet", children: "Sessions you start appear here, one card each, and move between columns as their work goes on." }),
642
- I,
641
+ ) : /* @__PURE__ */ a(Oe, { icon: /* @__PURE__ */ a(Te, { size: 20 }), title: "No sessions yet", children: "Sessions you start appear here, one card each, and move between columns as their work goes on." }),
642
+ P,
643
643
  j && k && /* @__PURE__ */ a(
644
- Ye,
644
+ Ue,
645
645
  {
646
646
  card: j,
647
647
  anchor: k.el,
@@ -651,7 +651,7 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
651
651
  onPointerLeave: () => M(j, null)
652
652
  }
653
653
  ),
654
- /* @__PURE__ */ a(Oe, { open: !!c, onClose: () => $(null), title: c?.row.title || c?.row.key || "", footer: c && /* @__PURE__ */ b(te, { children: [
654
+ /* @__PURE__ */ a(Be, { open: !!c, onClose: () => $(null), title: c?.row.title || c?.row.key || "", footer: c && /* @__PURE__ */ b(te, { children: [
655
655
  /* @__PURE__ */ a(oe, { variant: "secondary", onClick: () => $(null), children: "Close" }),
656
656
  /* @__PURE__ */ a(
657
657
  oe,
@@ -667,9 +667,9 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
667
667
  ] });
668
668
  }
669
669
  function Lt() {
670
- const e = Pe(), t = ye(), { toast: n } = Ie(), i = e.filter((r) => r.fleet && !r.parent && !r.run && r.id).map((r) => `${r.id}:${r.status}`).join(",");
670
+ const e = Ie(), t = ye(), { toast: n } = Pe(), i = e.filter((r) => r.fleet && !r.parent && !r.run && r.id).map((r) => `${r.id}:${r.status}`).join(",");
671
671
  V(() => {
672
- H.wantFleetTasks(H.activeFleetIds());
672
+ D.wantFleetTasks(D.activeFleetIds());
673
673
  }, [i]);
674
674
  const s = J(
675
675
  () => ({
@@ -679,11 +679,11 @@ function Lt() {
679
679
  o || n("Couldn't change the card's stage.", "danger");
680
680
  });
681
681
  },
682
- markSeen: (r) => H.markSeen(r)
682
+ markSeen: (r) => D.markSeen(r)
683
683
  }),
684
684
  [t, n]
685
685
  );
686
- return /* @__PURE__ */ a(Nt, { rows: e, seen: H.seen, actions: s, loading: !H.listedOnce, error: H.listError });
686
+ return /* @__PURE__ */ a(Nt, { rows: e, seen: D.seen, actions: s, loading: !D.listedOnce, error: D.listError });
687
687
  }
688
688
  export {
689
689
  Nt as Board,
@@ -1,7 +1,7 @@
1
- import { jsxs as s, Fragment as C, jsx as a } from "react/jsx-runtime";
2
- import { useRef as B, useState as D, useLayoutEffect as O } from "react";
3
- import { createPortal as j } from "react-dom";
4
- import { z as T, O as G, a8 as w, aC as _, aD as v, ay as k, az as L, aE as P, ae as H, ad as U, a as W } from "./index-B0hmy2Cw.js";
1
+ import { jsxs as s, Fragment as _, jsx as a } from "react/jsx-runtime";
2
+ import { useRef as B, useState as D, useLayoutEffect as L } from "react";
3
+ import { createPortal as O } from "react-dom";
4
+ import { O as T, a0 as j, ah as w, aL as v, aM as C, aH as k, aI as G, aN as H, an as P, am as U, a as W } from "./index-CMPf-3JZ.js";
5
5
  const I = ["backlog", "planned", "in_progress", "blocked", "in_review", "done", "cancelled"], R = {
6
6
  input: "waits for you",
7
7
  failed: "failed",
@@ -34,7 +34,7 @@ function ee(e, t) {
34
34
  const i = w(e, t) ?? e.attention;
35
35
  return i ? R[i] : null;
36
36
  }
37
- function E(e) {
37
+ function M(e) {
38
38
  const t = e.subject?.split(":").pop();
39
39
  return e.origin === "trigger" && t ? `from ${t}` : e.origin ? `from ${e.origin === "cli" ? "the command line" : `a ${e.origin}`}` : "";
40
40
  }
@@ -42,16 +42,16 @@ function ne(e) {
42
42
  const { row: t } = e;
43
43
  if (e.fleet) return `↳ ${e.fleet}`;
44
44
  if (t.run) {
45
- const i = E(t.run);
45
+ const i = M(t.run);
46
46
  return `fleet run${i ? ` · ${i}` : ""}`;
47
47
  }
48
48
  return [t.agent, t.branch ? `⎇ ${t.branch}` : null].filter(Boolean).join(" · ");
49
49
  }
50
50
  function te(e, t = Date.now()) {
51
- return e.runningMs ? { text: _(e.runningMs), running: !0 } : e.stageSince ? { text: v(Math.max(0, t - e.stageSince)), running: !1 } : null;
51
+ return e.runningMs ? { text: v(e.runningMs), running: !0 } : e.stageSince ? { text: C(Math.max(0, t - e.stageSince)), running: !1 } : null;
52
52
  }
53
53
  function ae(e) {
54
- return e.parent ? T(e.parent.key) : e.run || !(e.id ?? e.key) ? G() : T(e.id ?? e.key);
54
+ return e.parent ? T(e.parent.key) : e.run || !(e.id ?? e.key) ? j() : T(e.id ?? e.key);
55
55
  }
56
56
  function ie(e) {
57
57
  return !!(e.id && !e.parent && !e.run);
@@ -59,7 +59,7 @@ function ie(e) {
59
59
  function se(e, t) {
60
60
  return e.attention === "finished" || w(e, t) === "done" || e.stage === "done" && e.status === "idle";
61
61
  }
62
- const z = {
62
+ const F = {
63
63
  backlog: "text-faint",
64
64
  planned: "text-muted",
65
65
  in_progress: "text-accent",
@@ -72,7 +72,7 @@ const z = {
72
72
  running: { glyph: "●", tone: "text-accent", label: "running" },
73
73
  failed: { glyph: "✗", tone: "text-danger", label: "failed" },
74
74
  idle: { glyph: "○", tone: "text-faint", label: "idle" }
75
- }, F = {
75
+ }, Y = {
76
76
  input: "waiting for you",
77
77
  running: "running",
78
78
  failed: "the last turn failed",
@@ -85,11 +85,11 @@ const z = {
85
85
  done: "finished"
86
86
  };
87
87
  function N(e) {
88
- const t = H(e.costUsd);
88
+ const t = P(e.costUsd);
89
89
  return `${U(e.tokens)} tokens${t ? ` · ${t}` : ""}`;
90
90
  }
91
91
  function l({ label: e, children: t }) {
92
- return /* @__PURE__ */ s(C, { children: [
92
+ return /* @__PURE__ */ s(_, { children: [
93
93
  /* @__PURE__ */ a("dt", { className: "pt-px text-[11.5px] font-medium text-muted", children: e }),
94
94
  /* @__PURE__ */ a("dd", { className: "min-w-0 text-[12.5px] text-ink [overflow-wrap:anywhere]", children: t })
95
95
  ] });
@@ -108,19 +108,19 @@ function $({ row: e }) {
108
108
  ] }, n)
109
109
  )) }) });
110
110
  }
111
- function Y({ card: e, seen: t, now: i = Date.now() }) {
112
- const { row: n } = e, f = n.stageSince ? ` for ${v(Math.max(0, i - n.stageSince))}` : "", u = /* @__PURE__ */ s(C, { children: [
113
- /* @__PURE__ */ a("span", { className: z[n.stage], "aria-hidden": "true", children: L[n.stage] }),
111
+ function z({ card: e, seen: t, now: i = Date.now() }) {
112
+ const { row: n } = e, f = n.stageSince ? ` for ${C(Math.max(0, i - n.stageSince))}` : "", u = /* @__PURE__ */ s(_, { children: [
113
+ /* @__PURE__ */ a("span", { className: F[n.stage], "aria-hidden": "true", children: G[n.stage] }),
114
114
  " ",
115
115
  n.stageText ?? k[n.stage],
116
116
  f
117
117
  ] }), m = n.runningMs ? /* @__PURE__ */ s(g, { children: [
118
118
  " · ran ",
119
- _(n.runningMs)
119
+ v(n.runningMs)
120
120
  ] }) : null, c = w(n, t), r = [];
121
121
  let h;
122
122
  if (n.run) {
123
- const o = E(n.run);
123
+ const o = M(n.run);
124
124
  r.push(
125
125
  /* @__PURE__ */ s(l, { label: "Fleet run", children: [
126
126
  n.run.runId,
@@ -171,7 +171,7 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
171
171
  o,
172
172
  /* @__PURE__ */ s(g, { children: [
173
173
  o ? " · " : "",
174
- F[n.status],
174
+ Y[n.status],
175
175
  p
176
176
  ] }),
177
177
  c && c !== "input" && /* @__PURE__ */ s("span", { className: "text-warn", children: [
@@ -188,7 +188,7 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
188
188
  ] })
189
189
  ] }, "stage")
190
190
  ), n.children.length) {
191
- const x = P.map((d) => [d, n.children.filter((b) => b.stage === d).length]).filter(([, d]) => d).map(([d, b]) => `${b} ${k[d].toLowerCase()}`);
191
+ const x = H.map((d) => [d, n.children.filter((b) => b.stage === d).length]).filter(([, d]) => d).map(([d, b]) => `${b} ${k[d].toLowerCase()}`);
192
192
  r.push(/* @__PURE__ */ a(l, { label: "Tasks", children: x.join(" · ") }, "tasks"));
193
193
  }
194
194
  r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), n.explain.length && r.push(
@@ -220,12 +220,12 @@ function le({
220
220
  onPointerLeave: u
221
221
  }) {
222
222
  const m = B(null), [c, r] = D(null);
223
- return O(() => {
223
+ return L(() => {
224
224
  const h = m.current;
225
225
  if (!h) return;
226
- const o = t.getBoundingClientRect(), p = h.offsetWidth || 320, x = h.offsetHeight || 200, d = window.innerWidth, b = window.innerHeight, y = 10, M = o.right + y + p <= d - 8 ? o.right + y : Math.max(8, o.left - y - p), A = Math.min(Math.max(8, o.top), Math.max(8, b - x - 8));
227
- r({ left: M, top: A });
228
- }, [t, e]), j(
226
+ const o = t.getBoundingClientRect(), p = h.offsetWidth || 320, x = h.offsetHeight || 200, d = window.innerWidth, b = window.innerHeight, y = 10, E = o.right + y + p <= d - 8 ? o.right + y : Math.max(8, o.left - y - p), A = Math.min(Math.max(8, o.top), Math.max(8, b - x - 8));
227
+ r({ left: E, top: A });
228
+ }, [t, e]), O(
229
229
  /* @__PURE__ */ s(
230
230
  "div",
231
231
  {
@@ -241,7 +241,7 @@ function le({
241
241
  ),
242
242
  children: [
243
243
  /* @__PURE__ */ a("div", { className: "mb-2.5 text-[13px] leading-5 font-semibold text-ink [overflow-wrap:anywhere]", children: e.row.title || e.row.key }),
244
- /* @__PURE__ */ a(Y, { card: e, seen: i, now: n })
244
+ /* @__PURE__ */ a(z, { card: e, seen: i, now: n })
245
245
  ]
246
246
  }
247
247
  ),
@@ -249,13 +249,13 @@ function le({
249
249
  );
250
250
  }
251
251
  export {
252
- Y as C,
252
+ z as C,
253
253
  re as S,
254
254
  ee as a,
255
255
  te as b,
256
256
  ne as c,
257
257
  ie as d,
258
- z as e,
258
+ F as e,
259
259
  ae as f,
260
260
  V as g,
261
261
  Z as h,