@tangle-network/sandbox-cli 0.21.27 → 0.21.29

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 (70) hide show
  1. package/dist/graph-viewer/{Analytics-DocMpB6T.js → Analytics-DFWW8Phh.js} +260 -275
  2. package/dist/graph-viewer/Checks-qgqV4xgV.js +155 -0
  3. package/dist/graph-viewer/{Conversations-CISiWrR9.js → Conversations-CGB45kpj.js} +112 -80
  4. package/dist/graph-viewer/{Files-Dh8p_Fpw.js → Files-DtZhf0ii.js} +121 -106
  5. package/dist/graph-viewer/LiveRun-C21wUKAY.js +210 -0
  6. package/dist/graph-viewer/Overview-BjeLsA2I.js +506 -0
  7. package/dist/graph-viewer/{RunPage-nJwCsArn.js → RunPage-CkkcBEUe.js} +22 -22
  8. package/dist/graph-viewer/{Timeline-bPjhV3il.js → Timeline-C2Xolk0t.js} +84 -84
  9. package/dist/graph-viewer/{Today-pebCsPJ1.js → Today-BVVDtSVN.js} +65 -58
  10. package/dist/graph-viewer/Topology-DO5XX8e4.js +545 -0
  11. package/dist/graph-viewer/{Traces-C5x2UvJh.js → Traces-BhMxjNgw.js} +79 -52
  12. package/dist/graph-viewer/{WallPages-DSmRm2v3.js → WallPages-4d9QUZDq.js} +3 -3
  13. package/dist/graph-viewer/index.js +103 -102
  14. package/dist/graph-viewer/{lazy-pages-CpmkG5o2.js → lazy-pages-DM0cZM10.js} +4 -4
  15. package/dist/graph-viewer/{record-part-Cx9GDQeo.js → record-part-CZal_IMH.js} +382 -352
  16. package/dist/graph-viewer/report-viewer.js +7 -7
  17. package/dist/graph-viewer/styles.css +596 -284
  18. package/dist/graph-viewer/{ui-CEhDqce8.js → ui-D8QZRsC3.js} +143 -111
  19. package/dist/graph-viewer/viewer/{AgentGraphCanvas-D7jjAE6i-DecKyUGA.js → AgentGraphCanvas-CMdOlSlh-4EervjeC.js} +54 -48
  20. package/dist/graph-viewer/viewer/{Analytics-CtKucZjs.js → Analytics-DD__nbLm.js} +203 -218
  21. package/dist/graph-viewer/viewer/{AnswerStrip-DsI9aF-i.js → AnswerStrip-CGUyXuYH.js} +2 -2
  22. package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +156 -0
  23. package/dist/graph-viewer/viewer/{Conversations-DQBCyko6.js → Conversations-C1n0EBBd.js} +124 -92
  24. package/dist/graph-viewer/viewer/{Files-B-g25gSO.js → Files-Cjr7NMU_.js} +63 -48
  25. package/dist/graph-viewer/viewer/{LiveRun-BMQnTpTZ.js → LiveRun-uPTkPSjo.js} +1223 -1164
  26. package/dist/graph-viewer/viewer/{Outputs-DXnN1wEQ.js → Outputs-CumGyjQo.js} +6 -6
  27. package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +507 -0
  28. package/dist/graph-viewer/viewer/{RunPage-ChipoSdO.js → RunPage-DZlBW7Va.js} +28 -28
  29. package/dist/graph-viewer/viewer/{Scores-CjriXjf_.js → Scores-ZS16yk0n.js} +3 -3
  30. package/dist/graph-viewer/viewer/{Timeline-DzEzobA0.js → Timeline-BnK6-yBR.js} +24 -24
  31. package/dist/graph-viewer/viewer/{Today-DLHe_wTA.js → Today-a_-oNigi.js} +69 -62
  32. package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +546 -0
  33. package/dist/graph-viewer/viewer/{Traces-BWBulSPE.js → Traces-C0IGk0L4.js} +75 -48
  34. package/dist/graph-viewer/viewer/{WallPages-Crj-qPoK.js → WallPages-CzWpyIfp.js} +8 -8
  35. package/dist/graph-viewer/viewer/{WorkflowGraph-DYsP_Kcg-C0O7M5iH.js → WorkflowGraph-DZ3xejKE-jRXKeSrg.js} +6 -6
  36. package/dist/graph-viewer/viewer/{agent-timeline-C-UIhXgu.js → agent-timeline-Cs9Qbpvo.js} +437 -425
  37. package/dist/graph-viewer/viewer/{bot-Bivadvxn.js → bot-D6Nrej7Z.js} +1 -1
  38. package/dist/graph-viewer/viewer/{chevron-right-WW7tFY6B.js → chevron-right-D_5IKLxu.js} +1 -1
  39. package/dist/graph-viewer/viewer/{createLucideIcon-Z6KTw8ff.js → createLucideIcon-yH0cxLMy.js} +1 -1
  40. package/dist/graph-viewer/viewer/{data-azhapQrS.js → data-CkWfWr7i.js} +1 -1
  41. package/dist/graph-viewer/viewer/{dist-CyOc-K4O.js → dist-C1-7EfoW.js} +3 -3
  42. package/dist/graph-viewer/viewer/{file-text-B34N7Soo.js → file-text-m7a3piQF.js} +1 -1
  43. package/dist/graph-viewer/viewer/{final-output-Db2D9cMT.js → final-output-kwY11u9X.js} +1 -1
  44. package/dist/graph-viewer/viewer/{highlights-Bgg6O5ub.js → highlights-Btsi5OXl.js} +2 -2
  45. package/dist/graph-viewer/viewer/{jsx-runtime-BSzbUOFc.js → jsx-runtime-DQWyJOhv.js} +1 -1
  46. package/dist/graph-viewer/viewer/{lazy-pages-fgtpXQ00.js → lazy-pages-BowaGsg-.js} +6 -6
  47. package/dist/graph-viewer/viewer/{markdown-BpJEJUTW.js → markdown-CX_sVrXB.js} +17 -17
  48. package/dist/graph-viewer/viewer/{model-brand-bTcMjQtB-C9bHPsPk.js → model-brand-bTcMjQtB-fagiBQam.js} +3 -3
  49. package/dist/graph-viewer/viewer/{page-header-C6YCPkzJ.js → page-header-Brq611fd.js} +3 -3
  50. package/dist/graph-viewer/viewer/{popover-DrLB9iar.js → popover-CvOAjlnk.js} +4 -4
  51. package/dist/graph-viewer/viewer/{react-CisnW4fB.js → react-CY3IbSNO.js} +24 -24
  52. package/dist/graph-viewer/viewer/{react-dom-C5NDYQCD.js → react-dom-t1L4_-il.js} +1 -1
  53. package/dist/graph-viewer/viewer/{record-part-d0gKKrMI.js → record-part-D3_Anfpe.js} +455 -425
  54. package/dist/graph-viewer/viewer/{segmented-control-ChhLMa6h.js → segmented-control-BaJmvTNd.js} +39 -39
  55. package/dist/graph-viewer/viewer/{shiki-BwlTRTY6.js → shiki-Qnby7Sh6.js} +2 -2
  56. package/dist/graph-viewer/viewer/{stream-tokenizer-CaVb21TO.js → stream-tokenizer-CWtnjmRd.js} +1 -1
  57. package/dist/graph-viewer/viewer/{terminal-BxRacTx0.js → terminal-83J_I4Ne.js} +1 -1
  58. package/dist/graph-viewer/viewer/{themes-BxrCCwH5.js → themes-1i1fzpRk.js} +1 -1
  59. package/dist/graph-viewer/viewer/{ui-DZiGjPwl.js → ui-C9b1rIUH.js} +222 -190
  60. package/dist/graph-viewer/viewer/{workspace-DalRxssx.js → workspace-CekmOBs3.js} +76 -76
  61. package/dist/graph-viewer/viewer/{x-B_F8B4lq.js → x-DOc2URqZ.js} +1 -1
  62. package/dist/graph-viewer/workspace-viewer.js +103 -102
  63. package/package.json +6 -6
  64. package/dist/graph-viewer/Checks-CbnY4tuh.js +0 -113
  65. package/dist/graph-viewer/LiveRun-C-yKwkKs.js +0 -190
  66. package/dist/graph-viewer/Overview-BaXPdCFC.js +0 -477
  67. package/dist/graph-viewer/Topology-CyhuK6XW.js +0 -550
  68. package/dist/graph-viewer/viewer/Checks-DZTgeYlV.js +0 -114
  69. package/dist/graph-viewer/viewer/Overview-u7-8-rGx.js +0 -478
  70. package/dist/graph-viewer/viewer/Topology-Dsmuu27J.js +0 -551
@@ -0,0 +1,155 @@
1
+ import { C as e, b as t, k as n, n as r, s as i } from "./ui-D8QZRsC3.js";
2
+ import { clause as a } from "./Overview-BjeLsA2I.js";
3
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ //#region src/workspace/run/Checks.tsx
5
+ function l(e) {
6
+ let t = [];
7
+ for (let n of [...e].reverse()) {
8
+ let e = t[t.length - 1];
9
+ n.total ? t.push({
10
+ kind: "release",
11
+ r: n
12
+ }) : e?.kind === "unscored" ? (e.to = n.release, e.n++) : t.push({
13
+ kind: "unscored",
14
+ from: n.release,
15
+ to: n.release,
16
+ n: 1
17
+ });
18
+ }
19
+ return t;
20
+ }
21
+ function u({ m: u, doc: d }) {
22
+ let f = d.run.check, p = f?.latest, m = t(f), h = f?.checkerNames?.find((e) => e.current) ?? f?.checkerNames?.[0], g = f?.calibration?.stages ?? [], _ = u.best, v = u.tree.filter((e) => (e.commits ?? 0) > 0).sort((e, t) => (t.commits ?? 0) - (e.commits ?? 0)), y = Math.max(1, ...v.map((e) => e.commits ?? 0));
23
+ return /* @__PURE__ */ c("div", {
24
+ className: "rp-ck",
25
+ children: [/* @__PURE__ */ s("section", {
26
+ className: "rp-card",
27
+ "aria-label": "Checks",
28
+ children: /* @__PURE__ */ c("div", {
29
+ className: "rp-scroll rp-ck-in",
30
+ children: [
31
+ /* @__PURE__ */ c("h2", {
32
+ className: "rp-ck-h",
33
+ children: [/* @__PURE__ */ s(i, { tone: m.tone }), m.word]
34
+ }),
35
+ m.note && /* @__PURE__ */ c("p", {
36
+ className: "rp-ck-note",
37
+ children: [m.note, "."]
38
+ }),
39
+ /* @__PURE__ */ c("div", {
40
+ className: "rp-ck-stats",
41
+ children: [
42
+ /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("b", { children: e(f?.counts?.checks ?? 0) }), /* @__PURE__ */ c("span", { children: [
43
+ "checks run, ",
44
+ e(f?.counts?.known ?? 0),
45
+ " with a verdict"
46
+ ] })] }),
47
+ /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("b", { children: h?.label ?? "—" }), /* @__PURE__ */ s("span", { children: h ? `checker, ${h.ruling ?? "as pressed"}` : "no checker recorded" })] }),
48
+ /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("b", { children: _ ? `${_.release}${_.total ? ` · ${_.passed ?? 0}/${_.total}` : ""}` : "None" }), /* @__PURE__ */ s("span", { children: u.releases.length ? `best of ${n(u.releases.length, "release")}` : "no release tagged" })] })
49
+ ]
50
+ }),
51
+ p?.line && /* @__PURE__ */ c("p", {
52
+ className: "rp-ck-line",
53
+ children: [
54
+ /* @__PURE__ */ s("span", {
55
+ className: "lbl",
56
+ children: "Latest"
57
+ }),
58
+ /* @__PURE__ */ s("span", { children: a(p.line, 28) }),
59
+ /* @__PURE__ */ c("time", { children: [p.at ? `${p.at.slice(5, 10)} ${p.at.slice(11, 16)} UTC` : "", p.tag ? ` · ${p.tag}` : ""] })
60
+ ]
61
+ }),
62
+ g.some((e) => e.state !== "calibrated") && /* @__PURE__ */ c("p", {
63
+ className: "rp-ck-line",
64
+ children: [/* @__PURE__ */ s("span", {
65
+ className: "lbl",
66
+ children: "Calibrated"
67
+ }), /* @__PURE__ */ s("span", {
68
+ className: "rp-ck-cal",
69
+ children: g.map((e) => /* @__PURE__ */ c("span", {
70
+ className: e.state === "calibrated" ? "ok" : "",
71
+ children: [
72
+ e.state === "calibrated" ? "✓" : "○",
73
+ " ",
74
+ e.name
75
+ ]
76
+ }, e.name))
77
+ })]
78
+ }),
79
+ u.releases.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("h3", {
80
+ className: "rp-subh",
81
+ children: "Releases"
82
+ }), /* @__PURE__ */ s("ol", {
83
+ className: "rp-rel",
84
+ children: l(u.releases).map((e) => e.kind === "unscored" ? /* @__PURE__ */ c("li", {
85
+ className: "gap",
86
+ children: [/* @__PURE__ */ s("b", { children: e.n > 1 ? `${e.from}–${e.to}` : e.from }), /* @__PURE__ */ s("span", {
87
+ className: "sub",
88
+ children: e.n > 1 ? `${e.n} releases the checker did not score` : "not scored"
89
+ })]
90
+ }, e.from) : /* @__PURE__ */ c("li", { children: [
91
+ /* @__PURE__ */ s("b", { children: e.r.release }),
92
+ /* @__PURE__ */ c("span", {
93
+ className: "score",
94
+ children: [
95
+ e.r.passed ?? 0,
96
+ "/",
97
+ e.r.total
98
+ ]
99
+ }),
100
+ /* @__PURE__ */ s("span", {
101
+ className: "steps",
102
+ children: (e.r.steps ?? []).map((e, t) => /* @__PURE__ */ s("i", {
103
+ className: e.state,
104
+ title: `${e.label}: ${e.state}`
105
+ }, t))
106
+ }),
107
+ /* @__PURE__ */ s("span", {
108
+ className: "when",
109
+ children: e.r.taggedAt ? `${e.r.taggedAt.slice(5, 10)} ${e.r.taggedAt.slice(11, 16)}` : "—"
110
+ }),
111
+ e.r.sentence && /* @__PURE__ */ s("span", {
112
+ className: "sub",
113
+ children: a(e.r.sentence, 20)
114
+ })
115
+ ] }, e.r.release))
116
+ })] })
117
+ ]
118
+ })
119
+ }), /* @__PURE__ */ c("section", {
120
+ className: "rp-card",
121
+ "aria-label": "Commits by agent",
122
+ children: [/* @__PURE__ */ s("div", {
123
+ className: "rp-hd sm",
124
+ children: /* @__PURE__ */ c("h2", { children: ["Commits by agent", /* @__PURE__ */ s("span", {
125
+ className: "ct",
126
+ children: e(v.reduce((e, t) => e + (t.commits ?? 0), 0))
127
+ })] })
128
+ }), /* @__PURE__ */ s("div", {
129
+ className: "rp-scroll rp-commits",
130
+ children: v.length ? v.map((e) => /* @__PURE__ */ c("div", {
131
+ className: "row",
132
+ children: [
133
+ /* @__PURE__ */ c("span", {
134
+ className: "l",
135
+ children: [/* @__PURE__ */ s(i, { tone: e.state.tone }), e.name]
136
+ }),
137
+ /* @__PURE__ */ s(r, {
138
+ ok: e.commits ?? 0,
139
+ max: y
140
+ }),
141
+ /* @__PURE__ */ s("span", {
142
+ className: "n",
143
+ children: e.commits
144
+ })
145
+ ]
146
+ }, e.id)) : /* @__PURE__ */ s("p", {
147
+ className: "ws-status",
148
+ children: "No agent's commits reached the run's deliverables."
149
+ })
150
+ })]
151
+ })]
152
+ });
153
+ }
154
+ //#endregion
155
+ export { u as Checks };
@@ -1,5 +1,5 @@
1
- import { d as e, n as t, r as n, t as r } from "./record-part-Cx9GDQeo.js";
2
- import { C as i, O as a, _ as o, a as s, b as c, i as l, k as u, p as d, s as f, v as p } from "./ui-CEhDqce8.js";
1
+ import { d as e, n as t, r as n, t as r } from "./record-part-CZal_IMH.js";
2
+ import { A as i, _ as a, a as o, i as s, k as c, p as l, s as u, v as d, w as f, x as p } from "./ui-D8QZRsC3.js";
3
3
  import { t as m } from "./part-events-BrLrg_EV.js";
4
4
  import { useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
5
5
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
@@ -117,18 +117,19 @@ function w(e, t, n, r) {
117
117
  }
118
118
  };
119
119
  }
120
- function T({ runUrl: t, runId: r, alive: i, selected: a, onSelect: o, onRecorded: s, onEmpty: c, chooser: l = !0 }) {
121
- let u = a ?? r, [d, f] = v({
120
+ function T({ runUrl: t, runId: r, alive: i, selected: a, onSelect: o, onRecorded: s, onEmpty: c, chooser: l = !0, opening: u }) {
121
+ let d = a ?? r, [f, p] = v({
122
122
  rows: [],
123
123
  nodes: [],
124
124
  earlier: !1,
125
+ more: !1,
125
126
  loading: !0,
126
127
  error: null,
127
128
  trimmed: !1,
128
129
  history: !1,
129
130
  emptyTail: !1
130
- }), [p, m] = v(0), y = _(null), T = _(i), E = _({
131
- node: u,
131
+ }), [m, y] = v(0), T = _(null), E = _(null), D = _(i), O = _({
132
+ node: d,
132
133
  rows: [],
133
134
  earlier: !1,
134
135
  generation: void 0,
@@ -136,91 +137,99 @@ function T({ runUrl: t, runId: r, alive: i, selected: a, onSelect: o, onRecorded
136
137
  last: null
137
138
  });
138
139
  h(() => {
139
- let e = !1, n = 0, r = new AbortController(), a = E.current.node === u && T.current && !i;
140
- T.current = i;
141
- let o = a ? E.current.rows : [], s = a ? E.current.earlier : !1, c = a ? E.current.generation : void 0, l = a ? E.current.first : null, d = a ? E.current.last : null, p = !1, m = !1, h = !1;
142
- f((e) => ({
140
+ let e = !1, n = 0, r = new AbortController(), a = O.current.node === d && D.current && !i;
141
+ D.current = i;
142
+ let o = a ? O.current.rows : [], s = a ? O.current.earlier : !1, c = a ? O.current.generation : void 0, l = a ? O.current.first : null, u = a ? O.current.last : null, f = !1, m = !1, h = !1, g = !i && !a;
143
+ p((e) => ({
143
144
  ...e,
144
145
  rows: o,
145
146
  earlier: s,
147
+ more: !1,
146
148
  loading: !0,
147
149
  error: null,
148
150
  trimmed: a && e.trimmed,
149
151
  history: !1,
150
152
  emptyTail: !1
151
153
  }));
152
- let g = async (a) => {
154
+ let _ = async (a) => {
153
155
  if (e || (a === "before" ? h : m)) return;
154
156
  a === "before" ? h = !0 : m = !0;
155
- let _ = a === "after" ? d : a === "before" ? l : null;
157
+ let v = a === "after" ? u : a === "before" ? l : a === "head" ? S : null;
156
158
  try {
157
159
  let m = new URLSearchParams({
158
- node: u,
160
+ node: d,
159
161
  limit: String(S)
160
162
  });
161
- _ !== null && m.set(a, String(_)), c && _ !== null && m.set("generation", c);
163
+ v !== null && m.set(a === "head" ? "before" : a, String(v)), c && v !== null && m.set("generation", c);
162
164
  let h = await fetch(`${t}/transcript?${m}`, {
163
165
  signal: r.signal,
164
166
  credentials: "same-origin"
165
167
  });
166
168
  if (!h.ok) throw Error(`Transcript unavailable (HTTP ${h.status})`);
167
- let v = await h.json();
169
+ let y = await h.json();
168
170
  if (e) return;
169
- let y = a === "tail" || v.reset ? v.events : a === "before" ? [...v.events, ...o] : [...o, ...v.events];
170
- c = v.generation, a === "tail" || v.reset ? (l = v.firstSeq, d = v.lastSeq) : a === "before" ? l = v.firstSeq ?? l : d = v.lastSeq ?? d, o = [...new Map(y.map((e) => [e.seq, e])).values()].sort((e, t) => e.seq - t.seq);
171
- let b = o.length > C;
172
- b && (o = p ? o.slice(0, C) : o.slice(-2e3)), b && !p && (l = o[0]?.seq ?? l), (a !== "after" || v.reset) && (s = v.hasEarlier), b && a !== "before" && (s = !0), E.current = {
173
- node: u,
171
+ if (a === "head" && !y.events.length) {
172
+ n = window.setTimeout(() => void _("tail"), 0);
173
+ return;
174
+ }
175
+ let b = a === "tail" || a === "head" || y.reset, x = b ? y.events : a === "before" ? [...y.events, ...o] : [...o, ...y.events];
176
+ c = y.generation, b ? (l = y.firstSeq, u = y.lastSeq) : a === "before" ? l = y.firstSeq ?? l : u = y.lastSeq ?? u, o = [...new Map(x.map((e) => [e.seq, e])).values()].sort((e, t) => e.seq - t.seq);
177
+ let w = o.length > C;
178
+ w && (o = f ? o.slice(0, C) : o.slice(-2e3)), w && !f && (l = o[0]?.seq ?? l), (a !== "after" || y.reset) && (s = y.hasEarlier), w && a !== "before" && (s = !0), O.current = {
179
+ node: d,
174
180
  rows: o,
175
181
  earlier: s,
176
182
  generation: c,
177
183
  first: l,
178
- last: d
179
- }, f((e) => ({
184
+ last: u
185
+ };
186
+ let T = g && a !== "before" ? y.hasMore : !1;
187
+ p((e) => ({
180
188
  rows: o,
181
- nodes: v.nodes,
189
+ nodes: y.nodes,
182
190
  earlier: s,
191
+ more: a === "before" ? e.more : T,
183
192
  loading: !1,
184
193
  error: null,
185
- trimmed: b || e.trimmed,
186
- history: p,
187
- emptyTail: !v.alive && o.length === 0 && l === null && d === null
188
- })), a !== "before" && v.hasMore && d !== _ ? n = window.setTimeout(() => void g("after"), 0) : a !== "before" && v.alive && i && (n = window.setTimeout(() => void g("after"), 3e3));
194
+ trimmed: w || e.trimmed,
195
+ history: f,
196
+ emptyTail: !y.alive && o.length === 0 && l === null && u === null
197
+ })), !g && a !== "before" && y.hasMore && u !== v ? n = window.setTimeout(() => void _("after"), 0) : a !== "before" && y.alive && i && (n = window.setTimeout(() => void _("after"), 3e3));
189
198
  } catch (t) {
190
- !e && !r.signal.aborted && (f((e) => ({
199
+ !e && !r.signal.aborted && (p((e) => ({
191
200
  ...e,
192
201
  loading: !1,
193
202
  error: t instanceof Error ? t.message : "Transcript unavailable"
194
- })), i && a !== "before" && (n = window.setTimeout(() => void g("after"), 3e3)));
203
+ })), i && a !== "before" && (n = window.setTimeout(() => void _("after"), 3e3)));
195
204
  } finally {
196
205
  a === "before" ? h = !1 : m = !1;
197
206
  }
198
207
  };
199
- return y.current = () => {
200
- p = !0, f((e) => ({
208
+ return T.current = () => {
209
+ f = !0, p((e) => ({
201
210
  ...e,
202
- history: !0
203
- })), g("before");
204
- }, g(a && d !== null ? "after" : "tail"), () => {
205
- e = !0, r.abort(), window.clearTimeout(n), y.current = null;
211
+ history: !g
212
+ })), _("before");
213
+ }, E.current = () => void _("after"), _(a && u !== null ? "after" : g ? "head" : "tail"), () => {
214
+ e = !0, r.abort(), window.clearTimeout(n), T.current = null, E.current = null;
206
215
  };
207
216
  }, [
208
217
  t,
209
- u,
218
+ d,
210
219
  i,
211
- p
220
+ m
212
221
  ]), h(() => {
213
- d.emptyTail && c && c();
214
- }, [d.emptyTail, c]);
215
- let D = d.nodes.some((e) => e.id === u) ? d.nodes : [...d.nodes, {
216
- id: u,
217
- label: u === r ? "Root" : u,
222
+ f.emptyTail && c && c();
223
+ }, [f.emptyTail, c]);
224
+ let k = f.nodes.some((e) => e.id === d) ? f.nodes : [...f.nodes, {
225
+ id: d,
226
+ label: d === r ? "Root" : d,
218
227
  parent: null
219
- }], O = g(() => e(w(r, u, D, d.rows)), [
228
+ }], A = g(() => e(w(r, d, k, f.rows)), [
220
229
  r,
221
- u,
222
- d.nodes,
223
- d.rows
230
+ d,
231
+ f.nodes,
232
+ f.rows
224
233
  ]);
225
234
  return /* @__PURE__ */ x("section", {
226
235
  className: "run-panel live-transcript",
@@ -230,9 +239,9 @@ function T({ runUrl: t, runId: r, alive: i, selected: a, onSelect: o, onRecorded
230
239
  className: "message-filters",
231
240
  children: [l && /* @__PURE__ */ x("label", { children: ["Agent ", /* @__PURE__ */ b("select", {
232
241
  "aria-label": "Agent conversation",
233
- value: u,
242
+ value: d,
234
243
  onChange: (e) => o(e.target.value),
235
- children: D.map((e) => /* @__PURE__ */ x("option", {
244
+ children: k.map((e) => /* @__PURE__ */ x("option", {
236
245
  value: e.id,
237
246
  children: [e.label, e.parent ? " (child)" : " (root)"]
238
247
  }, e.id))
@@ -243,42 +252,53 @@ function T({ runUrl: t, runId: r, alive: i, selected: a, onSelect: o, onRecorded
243
252
  children: "Timeline and usage"
244
253
  })]
245
254
  }),
246
- (d.earlier || d.history) && /* @__PURE__ */ x("p", {
255
+ (f.earlier || f.history) && /* @__PURE__ */ x("p", {
247
256
  className: "transcript-edge",
248
- children: [d.earlier && /* @__PURE__ */ b("button", {
257
+ children: [f.earlier && /* @__PURE__ */ b("button", {
249
258
  type: "button",
250
259
  className: "link-button",
251
- disabled: d.loading,
252
- onClick: () => y.current?.(),
260
+ disabled: f.loading,
261
+ onClick: () => T.current?.(),
253
262
  children: "Load older"
254
- }), d.history && /* @__PURE__ */ b("button", {
263
+ }), f.history && /* @__PURE__ */ b("button", {
255
264
  type: "button",
256
265
  className: "link-button",
257
- onClick: () => m((e) => e + 1),
266
+ onClick: () => y((e) => e + 1),
258
267
  children: "Latest"
259
268
  })]
260
269
  }),
261
- d.loading && /* @__PURE__ */ b("p", {
270
+ f.loading && /* @__PURE__ */ b("p", {
262
271
  role: "status",
263
272
  children: "Loading transcript…"
264
273
  }),
265
- d.error && /* @__PURE__ */ b("p", {
274
+ f.error && /* @__PURE__ */ b("p", {
266
275
  role: "alert",
267
- children: d.error
276
+ children: f.error
268
277
  }),
269
- d.rows.filter((e) => e.event?.kind === "capture_gap" && (!e.at || !Number.isFinite(Date.parse(e.at)))).map((e) => /* @__PURE__ */ b("p", {
278
+ f.rows.filter((e) => e.event?.kind === "capture_gap" && (!e.at || !Number.isFinite(Date.parse(e.at)))).map((e) => /* @__PURE__ */ b("p", {
270
279
  className: "faint",
271
280
  children: e.event?.text ?? "A stream record could not be displayed."
272
281
  }, e.seq)),
273
- !d.loading && !d.rows.length && !d.error && /* @__PURE__ */ b("p", { children: "No stream events have been retained for this agent." }),
274
- (!d.loading || d.rows.length > 0) && /* @__PURE__ */ b(n, {
275
- index: O,
276
- actor: u,
282
+ !f.loading && !f.rows.length && !f.error && /* @__PURE__ */ b("p", { children: "No stream events have been retained for this agent." }),
283
+ (!f.loading || f.rows.length > 0) && /* @__PURE__ */ b(n, {
284
+ index: A,
285
+ actor: d,
277
286
  cutoff: Infinity,
278
287
  query: "",
279
288
  category: "all",
280
289
  lifecycle: !0,
281
- live: i
290
+ live: i,
291
+ opening: f.earlier ? void 0 : u
292
+ }),
293
+ f.more && /* @__PURE__ */ b("p", {
294
+ className: "transcript-edge",
295
+ children: /* @__PURE__ */ b("button", {
296
+ type: "button",
297
+ className: "link-button",
298
+ disabled: f.loading,
299
+ onClick: () => E.current?.(),
300
+ children: "Load more"
301
+ })
282
302
  })
283
303
  ]
284
304
  });
@@ -312,8 +332,18 @@ function E(e, t) {
312
332
  }
313
333
  return i;
314
334
  }
315
- function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
316
- let [S, C] = v(""), w = g(() => E(e, S), [e, S]), D = _(null), k = o(D, w.length, 52), A = (c ? e.byId.get(c) : null) ?? e.root, j = n.run.record.digest ?? null, M = n.run.record.status === "ready" || !!j, N = j ? `&digest=${j}` : "", P = t(M ? `${i}/record?part=nodes${N}` : null), F = P.index, I = !!n.execution?.alive, L = g(() => e.tree.filter((e) => e.steps.length || e.turns).length, [e]), R = !!y.params.get("agent"), z = A && F && F.nodes.has(F.canonical(A.id)), [B, V] = v(/* @__PURE__ */ new Set());
335
+ function D({ m: e, doc: n, runUrl: f, agent: p, selectAgent: m, route: y }) {
336
+ let [S, C] = v(""), w = g(() => E(e, S), [e, S]), D = _(null), k = a(D, w.length, 52), A = (p ? e.byId.get(p) : null) ?? e.root, j = n.run.record.digest ?? null, M = n.run.record.status === "ready" || !!j, N = j ? `&digest=${j}` : "", P = t(M ? `${f}/record?part=nodes${N}` : null), F = P.index, I = !!n.execution?.alive, L = g(() => e.tree.filter((e) => e.steps.length || e.turns).length, [e]), R = !!y.params.get("agent"), z = A && F && F.nodes.has(F.canonical(A.id)), [B, V] = v(/* @__PURE__ */ new Set()), H = g(() => {
337
+ let t = [n.input?.objective, n.input?.instruction].filter((e) => typeof e == "string" && e.trim().length > 0).join("\n\n");
338
+ return A && A.id === e.root?.id && t ? {
339
+ text: t,
340
+ at: n.run.startedAt ?? new Date(e.t0).toISOString()
341
+ } : void 0;
342
+ }, [
343
+ n,
344
+ A,
345
+ e
346
+ ]);
317
347
  return h(() => V(/* @__PURE__ */ new Set()), [n.run.id]), /* @__PURE__ */ x("div", {
318
348
  className: "rp-conv",
319
349
  "data-picked": R ? "" : void 0,
@@ -332,7 +362,7 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
332
362
  className: "rp-fbar",
333
363
  children: /* @__PURE__ */ x("label", {
334
364
  className: "rp-field",
335
- children: [/* @__PURE__ */ b(s, { name: "search" }), /* @__PURE__ */ b("input", {
365
+ children: [/* @__PURE__ */ b(o, { name: "search" }), /* @__PURE__ */ b("input", {
336
366
  value: S,
337
367
  onChange: (e) => C(e.target.value),
338
368
  placeholder: `Search ${L} agents`,
@@ -350,7 +380,7 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
350
380
  className: "ag",
351
381
  style: { height: 52 },
352
382
  children: [
353
- /* @__PURE__ */ b(s, {
383
+ /* @__PURE__ */ b(o, {
354
384
  name: "users",
355
385
  size: 14
356
386
  }),
@@ -367,22 +397,22 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
367
397
  style: { height: 52 },
368
398
  onClick: () => m(t.a.id),
369
399
  children: [
370
- /* @__PURE__ */ b(f, { tone: t.a.state.tone }),
400
+ /* @__PURE__ */ b(u, { tone: t.a.state.tone }),
371
401
  /* @__PURE__ */ b("span", {
372
402
  className: "nm",
373
403
  title: t.a.name,
374
- children: /* @__PURE__ */ b(l, {
375
- text: S.trim() ? t.a.name : d(t.a, 30),
404
+ children: /* @__PURE__ */ b(s, {
405
+ text: S.trim() ? t.a.name : l(t.a, 30),
376
406
  query: S
377
407
  })
378
408
  }),
379
409
  /* @__PURE__ */ x("span", {
380
410
  className: "sb",
381
- children: [a(t.a.steps.length, "step"), t.a.first === null ? "" : ` · ${u(e.t0, t.a.first, t.a.state.tone === "live" ? "now" : t.a.last ?? t.a.first)}`]
411
+ children: [c(t.a.steps.length, "step"), t.a.first === null ? "" : ` · ${i(e.t0, t.a.first, t.a.state.tone === "live" ? "now" : t.a.last ?? t.a.first)}`]
382
412
  }),
383
413
  /* @__PURE__ */ b("span", {
384
414
  className: "n",
385
- children: p(t.a.tokens)
415
+ children: d(t.a.tokens)
386
416
  })
387
417
  ]
388
418
  }, t.a.id)),
@@ -409,12 +439,12 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
409
439
  className: "rp-back",
410
440
  onClick: () => m(null),
411
441
  "aria-label": "All agents",
412
- children: /* @__PURE__ */ b(s, {
442
+ children: /* @__PURE__ */ b(o, {
413
443
  name: "arrow",
414
444
  size: 16
415
445
  })
416
446
  }),
417
- /* @__PURE__ */ x("h2", { children: [/* @__PURE__ */ b(f, { tone: A.state.tone }), A.name] }),
447
+ /* @__PURE__ */ x("h2", { children: [/* @__PURE__ */ b(u, { tone: A.state.tone }), A.name] }),
418
448
  /* @__PURE__ */ b("span", {
419
449
  className: "muted ph-hide",
420
450
  children: [A.model, A.harness].filter(Boolean).join(" · ")
@@ -427,10 +457,11 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
427
457
  }), /* @__PURE__ */ b("div", {
428
458
  className: "rp-scroll rp-tx",
429
459
  children: !I && z ? /* @__PURE__ */ b(r, {
430
- runUrl: i,
460
+ runUrl: f,
431
461
  version: N,
432
462
  index: F,
433
- actor: F.canonical(A.id)
463
+ actor: F.canonical(A.id),
464
+ opening: H
434
465
  }, A.id) : !I && (P.loading || P.pending) ? /* @__PURE__ */ b("p", {
435
466
  className: "ws-status",
436
467
  role: "status",
@@ -439,12 +470,13 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
439
470
  m: e,
440
471
  a: A
441
472
  }) : /* @__PURE__ */ b(T, {
442
- runUrl: i,
473
+ runUrl: f,
443
474
  runId: n.run.id,
444
475
  alive: I,
445
476
  selected: A.id,
446
477
  onSelect: (e) => m(e),
447
478
  chooser: !1,
479
+ opening: H,
448
480
  onEmpty: () => V((e) => /* @__PURE__ */ new Set([...e, A.id]))
449
481
  }, A.id)
450
482
  })]
@@ -452,7 +484,7 @@ function D({ m: e, doc: n, runUrl: i, agent: c, selectAgent: m, route: y }) {
452
484
  });
453
485
  }
454
486
  function O({ m: e, a: t }) {
455
- let n = c(e.t0), r = [];
487
+ let n = p(e.t0), r = [];
456
488
  for (let e of t.steps) {
457
489
  if (e.kind === "waiting") continue;
458
490
  let t = e.kind === "model" ? "model call" : e.tool ?? "tool", n = r[r.length - 1];
@@ -470,7 +502,7 @@ function O({ m: e, a: t }) {
470
502
  className: "rp-note",
471
503
  children: [
472
504
  "No conversation was recorded for this agent; these are its ",
473
- a(t.steps.length, "recorded step"),
505
+ c(t.steps.length, "recorded step"),
474
506
  "."
475
507
  ]
476
508
  }), r.map((e, t) => /* @__PURE__ */ x("div", {
@@ -489,7 +521,7 @@ function O({ m: e, a: t }) {
489
521
  }),
490
522
  /* @__PURE__ */ b("span", {
491
523
  className: "dim",
492
- children: i(e.end - e.at)
524
+ children: f(e.end - e.at)
493
525
  })
494
526
  ]
495
527
  }), e.failed > 0 && /* @__PURE__ */ x("span", {