@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,25 +1,25 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { useEffect as F, useMemo as I, useState as x, useRef as ee } from "react";
3
- import { useParams as te, Link as z } from "react-router";
2
+ import { useEffect as B, useMemo as O, useState as x, useRef as ee } from "react";
3
+ import { useParams as te, Link as S } from "react-router";
4
4
  import { Star as ae, X as ne, ArrowLeft as se, Check as ie, ExternalLink as le } from "lucide-react";
5
- import { E as de, y as K, G as ce, u as re, a2 as oe, aX as me, aY as pe, aZ as fe, Q as O, a_ as he, F as xe, aB as ue, z as L, a$ as f, a as k, H, b0 as X, b1 as ke, b2 as be, b3 as ge, b4 as Ne, aC as _e, B as ye, C as P } from "./index-B0hmy2Cw.js";
5
+ import { Q as de, K as A, X as ce, u as re, ab as oe, bL as me, bM as pe, bN as fe, a2 as I, bO as he, V as xe, aK as ue, O as F, bP as f, a as k, Y, bQ as q, bR as ke, bS as be, bw as ge, bx as Ne, aL as _e, B as ye, C as P } from "./index-CMPf-3JZ.js";
6
6
  function we(e) {
7
7
  return e.picked ? { label: "★ picked", tone: "ok" } : e.fleet_state === "passed" ? { label: "✔ passed", tone: "ok" } : e.fleet_state === "failed" ? { label: "✗ failed", tone: "danger" } : e.fleet_state === "cancelled" || e.fleet_state === "skipped" ? { label: "⊘ cancelled", tone: "neutral" } : e.pending_tool_call_id ? { label: "⏸ waiting", tone: "warn" } : { label: "● running", tone: "accent" };
8
8
  }
9
9
  function Q(e, s, d) {
10
10
  return d ? be(e, s) ? null : e.fleet_state === "passed" ? "A variant has been picked." : `${f(e)} did not pass: it can't be picked.` : s.some((p) => p.picked) ? "A variant has been picked." : "Nothing to pick yet: the variants are still running.";
11
11
  }
12
- function Le() {
12
+ function Fe() {
13
13
  const { id: e = "", group: s = "" } = te(), d = de(e);
14
- return F(() => {
15
- e && !K.get(e) && K.attach(e);
14
+ return B(() => {
15
+ e && !A.get(e) && A.attach(e);
16
16
  }, [e]), d ? /* @__PURE__ */ t($e, { controller: d, group: s }) : /* @__PURE__ */ t(ce, {});
17
17
  }
18
18
  const Ce = (e) => `${e.task_id}:${e.files_changed ?? ""}:${e.lines_added ?? ""}:${e.lines_deleted ?? ""}:${e.attempt ?? ""}`;
19
19
  function $e({ controller: e, group: s }) {
20
20
  re(e, P.fleet, P.pause, P.session, P.run);
21
- const d = oe(me), p = e.store.state, i = I(() => (p.fleetTasks ?? []).filter((a) => a.group === s), [p.fleetTasks, s]), o = pe(e, s), m = fe(e.session)?.run_id ?? null, [b, g] = x(/* @__PURE__ */ new Map()), [Y, S] = x(/* @__PURE__ */ new Map()), [M, D] = x(null), [q, U] = x(null), [N, E] = x(null), [w, j] = x(!1), [C, W] = x(null), Z = i.map(Ce).join("|");
22
- F(() => {
21
+ const d = oe(me), p = e.store.state, i = O(() => (p.fleetTasks ?? []).filter((a) => a.group === s), [p.fleetTasks, s]), o = pe(e, s), m = fe(e.session)?.run_id ?? null, [b, g] = x(/* @__PURE__ */ new Map()), [G, z] = x(/* @__PURE__ */ new Map()), [M, D] = x(null), [H, U] = x(null), [N, V] = x(null), [w, j] = x(!1), [C, W] = x(null), J = i.map(Ce).join("|");
22
+ B(() => {
23
23
  if (!m) return;
24
24
  let a = !0;
25
25
  for (const l of i) {
@@ -27,7 +27,7 @@ function $e({ controller: e, group: s }) {
27
27
  g((r) => new Map(r).set(l.task_id, null));
28
28
  continue;
29
29
  }
30
- O.fleetTaskDiff(m, l.task_id).then(
30
+ I.fleetTaskDiff(m, l.task_id).then(
31
31
  (r) => a && g((u) => new Map(u).set(l.task_id, r)),
32
32
  () => a && g((r) => new Map(r).set(l.task_id, null))
33
33
  );
@@ -35,33 +35,33 @@ function $e({ controller: e, group: s }) {
35
35
  return () => {
36
36
  a = !1;
37
37
  };
38
- }, [m, Z]);
39
- const T = i.map((a) => a.task_id), _ = T.join("|"), h = I(() => he(_ ? _.split("|") : [], b), [_, b]), c = M && h.some((a) => a.path === M) ? M : h[0]?.path ?? null, y = i.find((a) => a.task_id === q) ?? i[0] ?? null, V = ee(/* @__PURE__ */ new Set());
40
- if (F(() => {
38
+ }, [m, J]);
39
+ const T = i.map((a) => a.task_id), _ = T.join("|"), h = O(() => he(_ ? _.split("|") : [], b), [_, b]), c = M && h.some((a) => a.path === M) ? M : h[0]?.path ?? null, y = i.find((a) => a.task_id === H) ?? i[0] ?? null, E = ee(/* @__PURE__ */ new Set());
40
+ if (B(() => {
41
41
  if (!m || !c) return;
42
42
  const a = h.find((l) => l.path === c);
43
43
  a && a.cells.forEach((l, r) => {
44
44
  const u = _.split("|")[r], $ = `${u}:${c}`;
45
- !l || V.current.has($) || (V.current.add($), O.fleetTaskDiff(m, u, { path: c }).then(
46
- (B) => S((v) => new Map(v).set($, B.patch ?? "")),
47
- () => S((B) => new Map(B).set($, null))
45
+ !l || E.current.has($) || (E.current.add($), I.fleetTaskDiff(m, u, { path: c }).then(
46
+ (L) => z((v) => new Map(v).set($, L.patch ?? "")),
47
+ () => z((L) => new Map(L).set($, null))
48
48
  ));
49
49
  });
50
50
  }, [m, c, h, _]), !i.length)
51
- return /* @__PURE__ */ t(G, { controller: e, group: s, children: /* @__PURE__ */ t(xe, { title: `No variants in ${s}`, children: "The fleet lists a best-of group's variants once its run starts them." }) });
51
+ return /* @__PURE__ */ t(X, { controller: e, group: s, children: /* @__PURE__ */ t(xe, { title: `No variants in ${s}`, children: "The fleet lists a best-of group's variants once its run starts them." }) });
52
52
  const R = async (a) => {
53
53
  if (o) {
54
- E(a?.task_id ?? "none");
54
+ V(a?.task_id ?? "none");
55
55
  try {
56
56
  const l = a ? f(a) : null;
57
57
  await e.pick(o, l) && W(l ?? "none");
58
58
  } finally {
59
- E(null), j(!1);
59
+ V(null), j(!1);
60
60
  }
61
61
  }
62
- }, A = d ? i : y ? [y] : [], J = i.some((a) => a.files_changed && b.get(a.task_id) === void 0);
63
- return /* @__PURE__ */ n(G, { controller: e, group: s, count: i.length, picking: !!o, children: [
64
- C && /* @__PURE__ */ t(ue, { tone: "ok", className: "mb-3", action: /* @__PURE__ */ t(z, { to: L(e.id), className: "text-[12.5px] font-semibold text-accent hover:underline", children: "Back to the session" }), children: C === "none" ? `Picked none: ${s} is cancelled.` : `Picked ${C}: the fleet merges it.` }),
62
+ }, K = d ? i : y ? [y] : [], Z = i.some((a) => a.files_changed && b.get(a.task_id) === void 0);
63
+ return /* @__PURE__ */ n(X, { controller: e, group: s, count: i.length, picking: !!o, children: [
64
+ C && /* @__PURE__ */ t(ue, { tone: "ok", className: "mb-3", action: /* @__PURE__ */ t(S, { to: F(e.id), className: "text-[12.5px] font-semibold text-accent hover:underline", children: "Back to the session" }), children: C === "none" ? `Picked none: ${s} is cancelled.` : `Picked ${C}: the fleet merges it.` }),
65
65
  !o && !C && /* @__PURE__ */ n("p", { className: "mb-3 text-[13px] text-muted", children: [
66
66
  Q(i[0], i, null),
67
67
  " This view only compares."
@@ -89,7 +89,7 @@ function $e({ controller: e, group: s }) {
89
89
  {
90
90
  className: k(d && "grid gap-3 overflow-x-auto"),
91
91
  style: d ? { gridTemplateColumns: `repeat(${i.length}, minmax(240px, 1fr))` } : void 0,
92
- children: A.map((a) => /* @__PURE__ */ t(
92
+ children: K.map((a) => /* @__PURE__ */ t(
93
93
  Pe,
94
94
  {
95
95
  variant: a,
@@ -112,7 +112,7 @@ function $e({ controller: e, group: s }) {
112
112
  ": none of them is merged."
113
113
  ] }),
114
114
  /* @__PURE__ */ t(
115
- H,
115
+ Y,
116
116
  {
117
117
  size: "sm",
118
118
  variant: w ? "danger" : "secondary",
@@ -139,12 +139,12 @@ function $e({ controller: e, group: s }) {
139
139
  className: k("cursor-pointer border-t border-line-soft", a.path === c ? "bg-accent-soft" : "hover:bg-surface-hover"),
140
140
  children: [
141
141
  /* @__PURE__ */ t("td", { className: "max-w-[40ch] truncate px-3 py-1.5 font-mono text-ink", title: a.path, children: /* @__PURE__ */ t("button", { type: "button", className: "text-left", onClick: () => D(a.path), children: a.path }) }),
142
- a.cells.map((l, r) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: l ? /* @__PURE__ */ t(X, { added: l.added, deleted: l.deleted }) : /* @__PURE__ */ t("span", { className: "text-faint", children: "·" }) }, T[r]))
142
+ a.cells.map((l, r) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: l ? /* @__PURE__ */ t(q, { added: l.added, deleted: l.deleted }) : /* @__PURE__ */ t("span", { className: "text-faint", children: "·" }) }, T[r]))
143
143
  ]
144
144
  },
145
145
  a.path
146
146
  )) })
147
- ] }) }) : /* @__PURE__ */ t("p", { className: "text-[13px] text-muted", children: J ? "Reading the variants' changes…" : "No variant has changed a file yet." })
147
+ ] }) }) : /* @__PURE__ */ t("p", { className: "text-[13px] text-muted", children: Z ? "Reading the variants' changes…" : "No variant has changed a file yet." })
148
148
  ] }),
149
149
  c && /* @__PURE__ */ n("section", { "aria-label": `Diffs of ${c}`, className: "mt-5", children: [
150
150
  /* @__PURE__ */ t("h2", { className: "mb-2 truncate font-mono text-[13px] font-semibold text-ink", children: c }),
@@ -153,8 +153,8 @@ function $e({ controller: e, group: s }) {
153
153
  {
154
154
  className: k(d && "grid gap-3 overflow-x-auto"),
155
155
  style: d ? { gridTemplateColumns: `repeat(${i.length}, minmax(320px, 1fr))` } : void 0,
156
- children: A.map((a) => {
157
- const l = h.find((u) => u.path === c)?.cells[T.indexOf(a.task_id)], r = Y.get(`${a.task_id}:${c}`);
156
+ children: K.map((a) => {
157
+ const l = h.find((u) => u.path === c)?.cells[T.indexOf(a.task_id)], r = G.get(`${a.task_id}:${c}`);
158
158
  return /* @__PURE__ */ n("div", { className: "min-w-0", children: [
159
159
  /* @__PURE__ */ t("div", { className: "mb-1 text-[12px] font-semibold text-muted", children: f(a) }),
160
160
  l ? r === void 0 ? /* @__PURE__ */ t("p", { className: "px-3 py-4 text-center text-[12.5px] text-muted", children: "Reading…" }) : r === null ? /* @__PURE__ */ t("p", { className: "px-3 py-4 text-center text-[12.5px] text-danger", children: "Could not read this diff." }) : /* @__PURE__ */ t(ke, { patch: r, path: c, bare: !0, fileList: !1, defaultLayout: "unified" }) : /* @__PURE__ */ t("p", { className: "rounded-lg border border-line-soft px-3 py-4 text-center text-[12.5px] text-faint", children: "Left alone." })
@@ -165,7 +165,7 @@ function $e({ controller: e, group: s }) {
165
165
  ] })
166
166
  ] });
167
167
  }
168
- function G({
168
+ function X({
169
169
  controller: e,
170
170
  group: s,
171
171
  count: d,
@@ -174,7 +174,7 @@ function G({
174
174
  }) {
175
175
  return /* @__PURE__ */ n("div", { className: "mx-auto w-full max-w-[1600px] px-4 py-4 sm:px-6", children: [
176
176
  /* @__PURE__ */ n("div", { className: "mb-4 flex flex-wrap items-center gap-x-3 gap-y-1", children: [
177
- /* @__PURE__ */ n(z, { to: L(e.id), className: "inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink", children: [
177
+ /* @__PURE__ */ n(S, { to: F(e.id), className: "inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink", children: [
178
178
  /* @__PURE__ */ t(se, { size: 14, "aria-hidden": "true" }),
179
179
  e.title()
180
180
  ] }),
@@ -214,7 +214,7 @@ function Pe({
214
214
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Files" }),
215
215
  /* @__PURE__ */ t("dd", { className: "text-ink", children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "no change yet" }) : e.files_changed }),
216
216
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Lines" }),
217
- /* @__PURE__ */ t("dd", { children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) : /* @__PURE__ */ t(X, { added: e.lines_added ?? 0, deleted: e.lines_deleted ?? 0 }) }),
217
+ /* @__PURE__ */ t("dd", { children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) : /* @__PURE__ */ t(q, { added: e.lines_added ?? 0, deleted: e.lines_deleted ?? 0 }) }),
218
218
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Tokens" }),
219
219
  /* @__PURE__ */ t("dd", { className: "text-ink", children: b || /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) }),
220
220
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Time" }),
@@ -227,11 +227,11 @@ function Pe({
227
227
  ] }),
228
228
  e.error && /* @__PURE__ */ t("p", { className: "mt-2 text-[12px] text-danger", children: e.error }),
229
229
  /* @__PURE__ */ n("div", { className: "mt-auto flex flex-wrap items-center gap-2 pt-3", children: [
230
- /* @__PURE__ */ n(H, { size: "sm", variant: "primary", icon: /* @__PURE__ */ t(ie, { size: 14 }), loading: p, disabled: !!s || i, title: s ?? void 0, onClick: o, children: [
230
+ /* @__PURE__ */ n(Y, { size: "sm", variant: "primary", icon: /* @__PURE__ */ t(ie, { size: 14 }), loading: p, disabled: !!s || i, title: s ?? void 0, onClick: o, children: [
231
231
  "Pick ",
232
232
  f(e)
233
233
  ] }),
234
- e.child_session_id && /* @__PURE__ */ n(z, { to: L(e.child_session_id), className: "inline-flex items-center gap-1 text-[12.5px] font-semibold text-accent hover:underline", children: [
234
+ e.child_session_id && /* @__PURE__ */ n(S, { to: F(e.child_session_id), className: "inline-flex items-center gap-1 text-[12.5px] font-semibold text-accent hover:underline", children: [
235
235
  "Open worker transcript",
236
236
  /* @__PURE__ */ t(le, { size: 12, "aria-hidden": "true" })
237
237
  ] })
@@ -241,7 +241,7 @@ function Pe({
241
241
  }
242
242
  export {
243
243
  $e as CompareView,
244
- Le as default,
244
+ Fe as default,
245
245
  we as variantState,
246
246
  Q as whyNotPickable
247
247
  };