@tangle-network/sandbox-cli 0.21.64 → 0.21.65

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 (136) hide show
  1. package/README.md +31 -3
  2. package/SKILL.md +29 -1
  3. package/dist/graph-native-CS_TmaCK.mjs +1 -0
  4. package/dist/graph-viewer/Analytics-bWsqhurt.js +1001 -0
  5. package/dist/graph-viewer/{AnswerStrip-DhwqOyxI.js → AnswerStrip-COxV7gLW.js} +2 -2
  6. package/dist/graph-viewer/Checks-CQGmKcQ0.js +164 -0
  7. package/dist/graph-viewer/Conversations-DgCshBAf.js +627 -0
  8. package/dist/graph-viewer/{Files-DtZhf0ii.js → Files-CvIOGrAs.js} +81 -90
  9. package/dist/graph-viewer/LiveRun-DHmsr6F7.js +311 -0
  10. package/dist/graph-viewer/{Outputs-QET3nPPp.js → Outputs-rwBg_x36.js} +4 -4
  11. package/dist/graph-viewer/Overview-C150tkVa.js +194 -0
  12. package/dist/graph-viewer/{RunOverview-DJQDAMIx.js → RunOverview-CSqsunqf.js} +2 -2
  13. package/dist/graph-viewer/RunPage-F_prVwiV.js +286 -0
  14. package/dist/graph-viewer/Timeline-BFDywlmz.js +335 -0
  15. package/dist/graph-viewer/Today-BdDuqZGF.js +623 -0
  16. package/dist/graph-viewer/Topology-SAfGtd5u.js +238 -0
  17. package/dist/graph-viewer/Traces-BYqXaS_s.js +254 -0
  18. package/dist/graph-viewer/{WallPages-4d9QUZDq.js → WallPages-MM70VZrC.js} +48 -30
  19. package/dist/graph-viewer/agent-runtime.js +55 -55
  20. package/dist/graph-viewer/{data-BJmP7F1M.js → data-DTGmre1W.js} +31 -27
  21. package/dist/graph-viewer/harness-sessions.js +1 -1
  22. package/dist/graph-viewer/index.js +1357 -1392
  23. package/dist/graph-viewer/{lazy-pages-DM0cZM10.js → lazy-pages-BYuq_L_n.js} +9 -5
  24. package/dist/graph-viewer/{outputs-model-CGdvjkQh.js → outputs-model-CHTx8rMz.js} +2 -2
  25. package/dist/graph-viewer/{viewer/plain-words-CgvxtEOa.js → plain-words-BrMHl0On.js} +9 -4
  26. package/dist/graph-viewer/receipt.js +2 -2
  27. package/dist/graph-viewer/record-CsP_3NJS.js +612 -0
  28. package/dist/graph-viewer/record-part-CuT9Xw37.js +334 -0
  29. package/dist/graph-viewer/record.js +2 -336
  30. package/dist/graph-viewer/report-viewer.js +65 -65
  31. package/dist/graph-viewer/report.js +1 -1
  32. package/dist/graph-viewer/research-publication.js +1 -1
  33. package/dist/graph-viewer/{run-files-C1NgzM0l.js → run-files-BckQDdTD.js} +1 -1
  34. package/dist/graph-viewer/{run-receipt-Bvi4-KVM.js → run-receipt-Bt2iXJUy.js} +1 -0
  35. package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +3 -0
  36. package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +2 -0
  37. package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +1 -0
  38. package/dist/graph-viewer/styles.css +4559 -2385
  39. package/dist/graph-viewer/trace-spans.js +1 -1
  40. package/dist/graph-viewer/ui-xa5w5bEN.js +889 -0
  41. package/dist/graph-viewer/viewer/{AgentGraphCanvas-CMdOlSlh-4EervjeC.js → AgentGraphCanvas-B74GN1o6-BZEumF7-.js} +2610 -2707
  42. package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +1002 -0
  43. package/dist/graph-viewer/viewer/{AnswerStrip-CGUyXuYH.js → AnswerStrip-B7xMU57A.js} +2 -2
  44. package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +165 -0
  45. package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +904 -0
  46. package/dist/graph-viewer/viewer/Files-DxL1576V.js +630 -0
  47. package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +820 -0
  48. package/dist/graph-viewer/viewer/{Outputs-CumGyjQo.js → Outputs-BoIpgfMv.js} +24 -23
  49. package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +436 -0
  50. package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +285 -0
  51. package/dist/graph-viewer/viewer/{Scores-ZS16yk0n.js → Scores-Dgv4WePL.js} +3 -3
  52. package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +335 -0
  53. package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +623 -0
  54. package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +239 -0
  55. package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +254 -0
  56. package/dist/graph-viewer/viewer/{WallPages-CzWpyIfp.js → WallPages-Clj4bORg.js} +50 -32
  57. package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +4027 -0
  58. package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +2 -0
  59. package/dist/graph-viewer/viewer/{bot-D6Nrej7Z.js → bot-BaQU59LG.js} +1 -1
  60. package/dist/graph-viewer/viewer/{chevron-right-D_5IKLxu.js → chevron-right-Xn05jYLT.js} +1 -1
  61. package/dist/graph-viewer/viewer/{createLucideIcon-yH0cxLMy.js → createLucideIcon-BSphcoOJ.js} +1 -1
  62. package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +371 -0
  63. package/dist/graph-viewer/viewer/{data-CkWfWr7i.js → data-CVHeKhrh.js} +144 -139
  64. package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +349 -0
  65. package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +1615 -0
  66. package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +3506 -0
  67. package/dist/graph-viewer/viewer/{final-output-kwY11u9X.js → final-output-BYT-g-9j.js} +1 -1
  68. package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +2696 -0
  69. package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +28 -0
  70. package/dist/graph-viewer/viewer/{highlights-Btsi5OXl.js → highlights-DWeSCtiR.js} +4 -4
  71. package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +319 -0
  72. package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +803 -0
  73. package/dist/graph-viewer/viewer/{markdown-CX_sVrXB.js → markdown-lADwhD7y.js} +2324 -2608
  74. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +476 -0
  75. package/dist/graph-viewer/viewer/{page-header-Brq611fd.js → page-header-QbUg8F8i.js} +12 -11
  76. package/dist/graph-viewer/{plain-words-CgvxtEOa.js → viewer/plain-words-BrMHl0On.js} +9 -4
  77. package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +346 -0
  78. package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +4254 -0
  79. package/dist/graph-viewer/viewer/{react-dom-t1L4_-il.js → react-dom-BEusmvQH.js} +1 -1
  80. package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +3523 -0
  81. package/dist/graph-viewer/viewer/record-W39D5MO-.js +1 -0
  82. package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +335 -0
  83. package/dist/graph-viewer/viewer/{segmented-control-BaJmvTNd.js → segmented-control-Di1mbQlP.js} +27 -26
  84. package/dist/graph-viewer/viewer/{shiki-Qnby7Sh6.js → shiki-BfNNlmfZ.js} +15 -15
  85. package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +273 -0
  86. package/dist/graph-viewer/viewer/{stream-tokenizer-CWtnjmRd.js → stream-tokenizer-B5wWaM3U.js} +12 -12
  87. package/dist/graph-viewer/viewer/{themes-1i1fzpRk.js → themes-DuRxHiga.js} +1 -1
  88. package/dist/graph-viewer/viewer/ui-Co03nZUX.js +889 -0
  89. package/dist/graph-viewer/viewer/utils-BuObIC0n.js +1815 -0
  90. package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +28351 -0
  91. package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +3298 -0
  92. package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +2468 -0
  93. package/dist/graph-viewer/{workspace-model-Ewf17pTW.js → workspace-model-BkPl_J8E.js} +1 -1
  94. package/dist/graph-viewer/workspace-viewer.js +7452 -7489
  95. package/dist/graph-viewer/workspace.js +1 -1
  96. package/dist/index.mjs +27 -22
  97. package/package.json +9 -8
  98. package/dist/graph-viewer/Analytics-DFWW8Phh.js +0 -938
  99. package/dist/graph-viewer/Checks-qgqV4xgV.js +0 -155
  100. package/dist/graph-viewer/Conversations-CGB45kpj.js +0 -545
  101. package/dist/graph-viewer/LiveRun-C21wUKAY.js +0 -210
  102. package/dist/graph-viewer/Overview-BjeLsA2I.js +0 -506
  103. package/dist/graph-viewer/RunPage-CkkcBEUe.js +0 -258
  104. package/dist/graph-viewer/Timeline-C2Xolk0t.js +0 -293
  105. package/dist/graph-viewer/Today-BVVDtSVN.js +0 -660
  106. package/dist/graph-viewer/Topology-DO5XX8e4.js +0 -545
  107. package/dist/graph-viewer/Traces-BhMxjNgw.js +0 -259
  108. package/dist/graph-viewer/part-events-BrLrg_EV.js +0 -276
  109. package/dist/graph-viewer/record-part-CZal_IMH.js +0 -1408
  110. package/dist/graph-viewer/ui-D8QZRsC3.js +0 -938
  111. package/dist/graph-viewer/viewer/Analytics-DD__nbLm.js +0 -939
  112. package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +0 -156
  113. package/dist/graph-viewer/viewer/Conversations-C1n0EBBd.js +0 -819
  114. package/dist/graph-viewer/viewer/Files-Cjr7NMU_.js +0 -448
  115. package/dist/graph-viewer/viewer/LiveRun-uPTkPSjo.js +0 -6772
  116. package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +0 -507
  117. package/dist/graph-viewer/viewer/RunPage-DZlBW7Va.js +0 -257
  118. package/dist/graph-viewer/viewer/Timeline-BnK6-yBR.js +0 -294
  119. package/dist/graph-viewer/viewer/Today-a_-oNigi.js +0 -660
  120. package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +0 -546
  121. package/dist/graph-viewer/viewer/Traces-C0IGk0L4.js +0 -259
  122. package/dist/graph-viewer/viewer/WorkflowGraph-DZ3xejKE-jRXKeSrg.js +0 -1559
  123. package/dist/graph-viewer/viewer/agent-record-Dw772ROs.css +0 -2
  124. package/dist/graph-viewer/viewer/agent-timeline-Cs9Qbpvo.js +0 -1798
  125. package/dist/graph-viewer/viewer/dist-C1-7EfoW.js +0 -488
  126. package/dist/graph-viewer/viewer/file-text-m7a3piQF.js +0 -47
  127. package/dist/graph-viewer/viewer/jsx-runtime-DQWyJOhv.js +0 -2136
  128. package/dist/graph-viewer/viewer/lazy-pages-BowaGsg-.js +0 -20
  129. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-fagiBQam.js +0 -723
  130. package/dist/graph-viewer/viewer/popover-CvOAjlnk.js +0 -5329
  131. package/dist/graph-viewer/viewer/react-CY3IbSNO.js +0 -4262
  132. package/dist/graph-viewer/viewer/record-part-D3_Anfpe.js +0 -1329
  133. package/dist/graph-viewer/viewer/terminal-83J_I4Ne.js +0 -52
  134. package/dist/graph-viewer/viewer/ui-C9b1rIUH.js +0 -938
  135. package/dist/graph-viewer/viewer/workspace-CekmOBs3.js +0 -25100
  136. package/dist/graph-viewer/viewer/x-DOc2URqZ.js +0 -56
@@ -0,0 +1,285 @@
1
+ import { i as e } from "./rolldown-runtime-DArdT4gl.js";
2
+ import { n as t, t as n } from "./jsx-runtime-DPT6sCLq.js";
3
+ import { t as r } from "./page-header-QbUg8F8i.js";
4
+ import { c as i, l as a, o, s, u as c } from "./lazy-pages-ChiMJ8r_.js";
5
+ import { a as ee, b as l, g as u, o as d, r as f, x as te } from "./ui-Co03nZUX.js";
6
+ import { O as ne, R as p, d as m, n as h, p as g } from "./data-CVHeKhrh.js";
7
+ //#region src/workspace/run/RunPage.tsx
8
+ var _ = /* @__PURE__ */ e(t(), 1), v = n(), y = [
9
+ "overview",
10
+ "timeline",
11
+ "files",
12
+ "topology",
13
+ "conversations",
14
+ "traces",
15
+ "analytics",
16
+ "checks"
17
+ ], b = {
18
+ overview: "Overview",
19
+ timeline: "Waterfall",
20
+ files: "Files",
21
+ topology: "Topology",
22
+ conversations: "Conversations",
23
+ traces: "Traces",
24
+ analytics: "Analytics",
25
+ checks: "Checks"
26
+ }, re = (0, _.lazy)(() => import("./Overview-Dzg5XJgy.js").then((e) => e.t).catch(o).then((e) => ({ default: e.Overview }))), x = (0, _.lazy)(() => import("./Timeline-CzY3LVDu.js").catch(o).then((e) => ({ default: e.TimelineTab }))), S = (0, _.lazy)(() => import("./Files-DxL1576V.js").catch(o).then((e) => ({ default: e.Files }))), ie = (0, _.lazy)(() => import("./Topology-CzjqSFXH.js").catch(o).then((e) => ({ default: e.Topology }))), C = (0, _.lazy)(() => import("./Conversations-AX8G7Qyl.js").catch(o).then((e) => ({ default: e.Conversations }))), w = (0, _.lazy)(() => import("./Traces-CMX0H1VU.js").catch(o).then((e) => ({ default: e.Traces }))), T = (0, _.lazy)(() => import("./Analytics-E3XS570U.js").catch(o).then((e) => ({ default: e.Analytics }))), E = (0, _.lazy)(() => import("./Checks-CJ5XSHbv.js").catch(o).then((e) => ({ default: e.Checks }))), D = {
27
+ agents: "conversations",
28
+ spend: "analytics",
29
+ progress: "overview"
30
+ }, O = [
31
+ ["findings", "Findings"],
32
+ ["outputs", "Outputs and grades"],
33
+ ["readout", "Readout"],
34
+ ["versions", "Versions"],
35
+ ["graph", "Knowledge graph"],
36
+ ["profiles", "Profiles"],
37
+ ["assessments", "Assessments"],
38
+ ["coverage", "Capture"],
39
+ ["input", "Input"]
40
+ ];
41
+ function k(e) {
42
+ let t = () => {
43
+ let e = window.location.pathname.split("/").filter(Boolean), t = e[0] === "run" ? decodeURIComponent(e[2] ?? "") : "";
44
+ return {
45
+ tab: y.includes(t) ? t : null,
46
+ search: window.location.search
47
+ };
48
+ }, [n, r] = (0, _.useState)(t);
49
+ (0, _.useEffect)(() => {
50
+ let e = () => r(t());
51
+ return window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e);
52
+ }, []);
53
+ let i = (0, _.useMemo)(() => new URLSearchParams(n.search), [n.search]), a = (0, _.useCallback)((t, n = {}, r = !0) => {
54
+ let i = r ? new URLSearchParams(window.location.search) : new URLSearchParams();
55
+ for (let e of [
56
+ "section",
57
+ "node",
58
+ "view",
59
+ "details",
60
+ "tab"
61
+ ]) i.delete(e);
62
+ let a = new URLSearchParams(window.location.search).get("theme");
63
+ a && i.set("theme", a);
64
+ for (let [e, t] of Object.entries(n)) t == null || t === "" ? i.delete(e) : i.set(e, t);
65
+ let o = i.toString();
66
+ return `/run/${encodeURIComponent(e)}/${t}${o ? `?${o}` : ""}`;
67
+ }, [e]), o = (0, _.useCallback)((e, t = {}, n = !1) => {
68
+ let r = a(e, t);
69
+ r !== window.location.pathname + window.location.search && (n ? window.history.replaceState(null, "", r) : window.history.pushState(null, "", r), window.dispatchEvent(new PopStateEvent("popstate")));
70
+ }, [a]);
71
+ return {
72
+ tab: n.tab,
73
+ params: i,
74
+ href: a,
75
+ go: o
76
+ };
77
+ }
78
+ var A = (e, t) => t === e ? "root" : t.startsWith(`${e}:`) ? t.slice(e.length + 1) : t, j = (e, t, n) => {
79
+ if (!n) return null;
80
+ let r = n === "root" ? e.root?.id ?? t : e.byId.has(n) ? n : `${t}:${n}`;
81
+ return e.byId.has(r) ? r : null;
82
+ };
83
+ function M({ api: e, id: t, legacy: n }) {
84
+ let o = k(t), M = `${e}/runs/${encodeURIComponent(t)}`, N = g(M, void 0, !0), P = g(`${M}/workspace`, void 0, !0), [F, I] = (0, _.useState)(null), [L, R] = (0, _.useState)(Date.now), z = F?.url === M ? F : null, B = z?.run ?? N.data, V = {
85
+ ...P,
86
+ data: z?.workspace ?? P.data
87
+ }, H = !!(B?.execution?.alive || V.data?.live);
88
+ (0, _.useEffect)(() => {
89
+ if (!H) return;
90
+ let e = new EventSource(`${M}/agents/${encodeURIComponent(t)}/stream?workspace=1`);
91
+ e.addEventListener("workspace", (e) => {
92
+ try {
93
+ let n = JSON.parse(e.data);
94
+ n.workspace?.runId === t && n.run?.run?.id === t && I({
95
+ ...n,
96
+ url: M
97
+ });
98
+ } catch {}
99
+ }), e.addEventListener("end", () => e.close());
100
+ let n = window.setInterval(() => R(Date.now()), 1e3);
101
+ return () => {
102
+ e.close(), window.clearInterval(n);
103
+ };
104
+ }, [
105
+ H,
106
+ M,
107
+ t
108
+ ]);
109
+ let U = g(B ? `${e}/plays/${encodeURIComponent(B.run.play)}` : null), W = (0, _.useMemo)(() => V.data && B ? u(V.data, B.run) : null, [
110
+ V.data,
111
+ B,
112
+ L
113
+ ]), G = o.params.get("section"), K = G ? D[G] : void 0;
114
+ (0, _.useEffect)(() => {
115
+ if (!K) return;
116
+ let e = o.params.get("node");
117
+ o.go(K, {
118
+ agent: e ? A(t, e) : void 0,
119
+ file: o.params.get("file") ?? void 0
120
+ }, !0);
121
+ }, [K]);
122
+ let q = o.tab ?? "overview", J = W ? j(W, t, o.params.get("agent")) ?? W.root?.id ?? null : null, ae = (0, _.useCallback)((e, n) => o.go(n ?? q, { agent: e ? A(t, e) : null }), [
123
+ o,
124
+ q,
125
+ t
126
+ ]), Y = (0, _.useRef)(null), [X, oe] = (0, _.useState)(!1);
127
+ if ((0, _.useEffect)(() => {
128
+ let e = Y.current;
129
+ if (!e) return;
130
+ let t = () => oe(e.scrollLeft + e.clientWidth < e.scrollWidth - 4);
131
+ e.querySelector("[aria-selected=\"true\"]")?.scrollIntoView({
132
+ block: "nearest",
133
+ inline: "nearest"
134
+ }), t(), e.addEventListener("scroll", t, { passive: !0 });
135
+ let n = new ResizeObserver(t);
136
+ return n.observe(e), () => {
137
+ e.removeEventListener("scroll", t), n.disconnect();
138
+ };
139
+ }, [q, N.data]), N.error && !N.data) return /* @__PURE__ */ (0, v.jsxs)("p", {
140
+ className: "ws-status",
141
+ role: "alert",
142
+ children: ["This run is unavailable: ", N.error]
143
+ });
144
+ if (!B) return /* @__PURE__ */ (0, v.jsx)("p", {
145
+ className: "ws-status",
146
+ role: "status",
147
+ children: "Loading…"
148
+ });
149
+ let Z = W ? {
150
+ conversations: l(W.agents.length),
151
+ traces: l(W.totals.steps),
152
+ checks: l(B.run.check?.counts?.checks ?? W.releases.length)
153
+ } : {}, Q = G && !K && n ? n(G) : null, $ = W ? {
154
+ api: e,
155
+ runUrl: M,
156
+ doc: B,
157
+ play: U.data ?? null,
158
+ m: W,
159
+ route: {
160
+ ...o,
161
+ tab: q
162
+ },
163
+ agent: J,
164
+ selectAgent: ae
165
+ } : null;
166
+ return /* @__PURE__ */ (0, v.jsx)(f, { children: /* @__PURE__ */ (0, v.jsxs)(s, {
167
+ value: q,
168
+ onValueChange: (e) => o.go(e),
169
+ className: "rp rp-run",
170
+ "data-run": t,
171
+ "data-tab": Q ? void 0 : q,
172
+ children: [
173
+ /* @__PURE__ */ (0, v.jsx)(r, {
174
+ className: "rp-head",
175
+ title: /* @__PURE__ */ (0, v.jsxs)(v.Fragment, { children: [
176
+ /* @__PURE__ */ (0, v.jsx)("a", {
177
+ href: `/play/${encodeURIComponent(B.run.play)}`,
178
+ children: B.run.play
179
+ }),
180
+ /* @__PURE__ */ (0, v.jsx)("span", {
181
+ className: "sep",
182
+ "aria-hidden": "true",
183
+ children: "/"
184
+ }),
185
+ /* @__PURE__ */ (0, v.jsxs)("span", { children: ["Run ", ne(B.run.play, B.run.id)] })
186
+ ] }),
187
+ description: /* @__PURE__ */ (0, v.jsx)(h, {
188
+ status: B.view ? p(B.view.status) : m({
189
+ axis: "run",
190
+ state: B.run.state
191
+ }),
192
+ title: B.view?.status.reason ?? void 0
193
+ }),
194
+ actions: W ? /* @__PURE__ */ (0, v.jsx)("time", {
195
+ className: "rp-elapsed",
196
+ "aria-label": "Elapsed",
197
+ children: te(W.duration)
198
+ }) : void 0
199
+ }),
200
+ /* @__PURE__ */ (0, v.jsxs)("div", {
201
+ className: "rp-tabs-wrap",
202
+ "data-more": X || void 0,
203
+ children: [/* @__PURE__ */ (0, v.jsxs)(a, {
204
+ ref: Y,
205
+ variant: "underline",
206
+ className: "rp-tabs",
207
+ "aria-label": "Run",
208
+ children: [y.map((e) => /* @__PURE__ */ (0, v.jsx)(c, {
209
+ value: e,
210
+ variant: "underline",
211
+ asChild: !0,
212
+ children: /* @__PURE__ */ (0, v.jsxs)("a", {
213
+ "data-tab": e,
214
+ href: o.href(e),
215
+ onClick: (t) => {
216
+ t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), o.go(e));
217
+ },
218
+ children: [b[e], Z[e] ? /* @__PURE__ */ (0, v.jsx)("span", {
219
+ className: "ct",
220
+ children: Z[e]
221
+ }) : null]
222
+ })
223
+ }, e)), /* @__PURE__ */ (0, v.jsx)("span", {
224
+ className: "rp-more",
225
+ children: /* @__PURE__ */ (0, v.jsx)(d, {
226
+ label: "More run sections",
227
+ options: O.map(([e, t]) => ({
228
+ id: e,
229
+ label: t
230
+ })),
231
+ value: Q ? G : null,
232
+ width: 260,
233
+ placeholder: "Find a section",
234
+ onChange: (e) => {
235
+ e && (window.history.pushState(null, "", `/run/${encodeURIComponent(t)}?section=${e}`), window.dispatchEvent(new PopStateEvent("popstate")));
236
+ },
237
+ children: Q ? O.find(([e]) => e === G)?.[1] ?? "More" : "More"
238
+ })
239
+ })]
240
+ }), X && /* @__PURE__ */ (0, v.jsx)("button", {
241
+ type: "button",
242
+ className: "rp-tabs-next",
243
+ "aria-label": "More tabs",
244
+ onClick: () => Y.current?.scrollBy({
245
+ left: 160,
246
+ behavior: "smooth"
247
+ }),
248
+ children: /* @__PURE__ */ (0, v.jsx)(ee, { name: "chevron" })
249
+ })]
250
+ }),
251
+ /* @__PURE__ */ (0, v.jsx)(i, {
252
+ value: q,
253
+ forceMount: !0,
254
+ asChild: !0,
255
+ children: /* @__PURE__ */ (0, v.jsx)("main", {
256
+ className: "rp-work",
257
+ "aria-label": Q ? G ?? void 0 : b[q],
258
+ children: Q ?? ($ ? /* @__PURE__ */ (0, v.jsxs)(_.Suspense, {
259
+ fallback: /* @__PURE__ */ (0, v.jsx)("p", {
260
+ className: "ws-status",
261
+ role: "status",
262
+ children: "Loading…"
263
+ }),
264
+ children: [
265
+ q === "overview" && /* @__PURE__ */ (0, v.jsx)(re, { ...$ }),
266
+ q === "timeline" && /* @__PURE__ */ (0, v.jsx)(x, { ...$ }),
267
+ q === "files" && /* @__PURE__ */ (0, v.jsx)(S, { ...$ }),
268
+ q === "topology" && /* @__PURE__ */ (0, v.jsx)(ie, { ...$ }),
269
+ q === "conversations" && /* @__PURE__ */ (0, v.jsx)(C, { ...$ }),
270
+ q === "traces" && /* @__PURE__ */ (0, v.jsx)(w, { ...$ }),
271
+ q === "analytics" && /* @__PURE__ */ (0, v.jsx)(T, { ...$ }),
272
+ q === "checks" && /* @__PURE__ */ (0, v.jsx)(E, { ...$ })
273
+ ]
274
+ }) : /* @__PURE__ */ (0, v.jsx)("p", {
275
+ className: "ws-status",
276
+ role: V.error ? "alert" : "status",
277
+ children: V.error ? `The run's agents are unavailable: ${V.error}` : "Reading the run…"
278
+ }))
279
+ })
280
+ })
281
+ ]
282
+ }) });
283
+ }
284
+ //#endregion
285
+ export { y as RUN_PAGE_TABS, M as RunPage, j as agentFromParam, A as agentParam, k as useRunRoute };
@@ -1,7 +1,7 @@
1
1
  import { i as e } from "./rolldown-runtime-DArdT4gl.js";
2
- import { i as t, t as n } from "./jsx-runtime-DQWyJOhv.js";
3
- import { s as r } from "./final-output-kwY11u9X.js";
4
- import { m as i, p as a } from "./data-CkWfWr7i.js";
2
+ import { n as t, t as n } from "./jsx-runtime-DPT6sCLq.js";
3
+ import { s as r } from "./final-output-BYT-g-9j.js";
4
+ import { m as i, p as a } from "./data-CVHeKhrh.js";
5
5
  //#region src/workspace/scores-model.ts
6
6
  var o = /* @__PURE__ */ e(t(), 1);
7
7
  function s(e, t) {
@@ -0,0 +1,335 @@
1
+ import { i as e } from "./rolldown-runtime-DArdT4gl.js";
2
+ import { n as t, t as n } from "./jsx-runtime-DPT6sCLq.js";
3
+ import { S as r, a as i, b as a, c as o, h as s, m as c, n as l, s as u, v as d, x as f } from "./ui-Co03nZUX.js";
4
+ import { a as p } from "./react-DQ7E2Epi.js";
5
+ import { agentParam as m } from "./RunPage-NtevWXBs.js";
6
+ //#region src/workspace/run/Timeline.tsx
7
+ var h = /* @__PURE__ */ e(t(), 1), g = n(), _ = {
8
+ live: (e) => ({
9
+ tone: "live",
10
+ label: e
11
+ }),
12
+ waiting: (e) => ({
13
+ tone: "neutral",
14
+ label: e,
15
+ ring: !0
16
+ }),
17
+ "needs-you": (e) => ({
18
+ tone: "warn",
19
+ label: e
20
+ }),
21
+ ok: (e) => ({
22
+ tone: "ok",
23
+ label: e
24
+ }),
25
+ done: (e) => ({
26
+ tone: "ok",
27
+ label: e,
28
+ ring: !0
29
+ }),
30
+ fail: (e) => ({
31
+ tone: "failed",
32
+ label: e
33
+ }),
34
+ none: (e) => ({
35
+ tone: "neutral",
36
+ label: e,
37
+ ring: !0
38
+ }),
39
+ "": (e) => ({
40
+ tone: "neutral",
41
+ label: e,
42
+ ring: !0
43
+ })
44
+ };
45
+ function v(e) {
46
+ let t = [];
47
+ for (let n of e.agents) {
48
+ if (n.start === null) continue;
49
+ let r = n.status === "running" || n.status === "waiting" || n.status === "needs-you", i = Math.max(n.start, r ? e.duration : n.end ?? n.last ?? n.start);
50
+ t.push({
51
+ id: n.id,
52
+ ...n.parent ? { parentId: n.parent } : {},
53
+ kind: "pipeline",
54
+ name: n.name,
55
+ detail: n.model ?? "Not recorded",
56
+ startMs: Math.max(0, n.start),
57
+ endMs: i,
58
+ status: n.status === "succeeded" ? "done" : n.status,
59
+ outcome: _[n.state.tone](n.state.label),
60
+ activityAt: n.lastActivityAt === void 0 ? [] : [n.lastActivityAt - e.t0],
61
+ medianEventGapMs: n.medianEventGapMs,
62
+ ...n.listUsd === null ? n.billedUsd === null ? {} : {
63
+ costUsd: n.billedUsd,
64
+ costBound: n.node.usage?.billedComplete === !1 ? "lower" : void 0
65
+ } : {
66
+ costUsd: n.listUsd,
67
+ costBound: n.node.usage?.listComplete === !1 ? "lower" : void 0
68
+ },
69
+ ...n.byClass ? {
70
+ promptTokens: n.byClass.input + n.byClass.cacheRead,
71
+ completionTokens: n.byClass.output,
72
+ cachedTokens: n.byClass.cacheRead
73
+ } : {},
74
+ marks: n.restarts.map((t) => ({
75
+ at: t,
76
+ kind: "restart",
77
+ label: `Restarted ${d(e.t0)(t)} UTC`
78
+ })),
79
+ facts: [
80
+ ...n.node.failureReason ? [{
81
+ label: "Failure",
82
+ value: n.node.failureReason
83
+ }] : [],
84
+ {
85
+ label: "Cost basis",
86
+ value: n.listUsd === null ? n.billedUsd === null ? "Not recorded" : "Recorded bill" : "Catalog estimate"
87
+ },
88
+ ...s(e, n).filter((e) => e.label !== "Cost" || n.listUsd === null && n.billedUsd === null),
89
+ ...n.harness ? [{
90
+ label: "Harness",
91
+ value: n.harness
92
+ }] : []
93
+ ]
94
+ }), n.steps.forEach((e, r) => {
95
+ t.push({
96
+ id: `${n.id}#${r}`,
97
+ parentId: n.id,
98
+ kind: e.kind,
99
+ name: e.kind === "model" ? e.model ? e.model.split("/").pop() ?? "model call" : "model call" : e.kind === "tool" ? e.tool ?? "tool" : "waiting",
100
+ ...e.target ? { detail: e.target } : {},
101
+ startMs: Math.max(0, e.t),
102
+ endMs: Math.max(0, e.t + e.d),
103
+ status: e.failed ? "failed" : "done",
104
+ ...e.tokens ? {
105
+ promptTokens: e.tokens.input + e.tokens.cacheRead,
106
+ completionTokens: e.tokens.output,
107
+ cachedTokens: e.tokens.cacheRead
108
+ } : {},
109
+ ...e.usd === null ? {} : { costUsd: e.usd }
110
+ });
111
+ });
112
+ }
113
+ let n = e.totals.byClass;
114
+ return {
115
+ spans: t,
116
+ totalMs: e.duration,
117
+ ...n ? {
118
+ promptTokens: n.input + n.cacheRead,
119
+ completionTokens: n.output
120
+ } : {},
121
+ ...e.totals.listUsd === null ? {} : {
122
+ costUsd: e.totals.listUsd,
123
+ costBasis: "list"
124
+ },
125
+ ...e.totals.billedUsd === null ? {} : { billedUsd: e.totals.billedUsd },
126
+ ...e.totals.model === null ? {} : { modelCalls: e.totals.model },
127
+ ...e.totals.tool === null ? {} : { toolCalls: e.totals.tool },
128
+ errors: e.totals.failed,
129
+ pauses: e.pauses.map((e) => ({
130
+ startMs: e.from,
131
+ endMs: e.to,
132
+ label: `No agent turn ${f(e.to - e.from)}`,
133
+ detail: e.reason
134
+ }))
135
+ };
136
+ }
137
+ function y({ m: e, agent: t, selectAgent: n, route: r, doc: i }) {
138
+ let a = (0, h.useMemo)(() => v(e), [e]), o = (0, h.useMemo)(() => e.releases.filter((t, n, r) => t.taggedAt && Date.parse(t.taggedAt) >= e.t0 && (n === r.length - 1 || t.passed !== r[n - 1]?.passed)).map((t) => ({
139
+ at: Date.parse(t.taggedAt) - e.t0,
140
+ label: `${t.release}${t.total ? ` ${t.passed ?? 0}/${t.total}` : ""}`,
141
+ kind: "release",
142
+ tone: t.total && t.passed === t.total ? "ok" : "neutral"
143
+ })), [e]), s = (0, h.useRef)(null), [c, l] = (0, h.useState)(480);
144
+ (0, h.useEffect)(() => {
145
+ let e = s.current;
146
+ if (!e) return;
147
+ let t = new ResizeObserver(() => l(e.clientHeight));
148
+ return t.observe(e), () => t.disconnect();
149
+ }, []);
150
+ let [u, d] = (0, h.useState)(196);
151
+ (0, h.useLayoutEffect)(() => {
152
+ let e = s.current?.querySelector(".fw-root"), t = e?.querySelector(".fw-scroller");
153
+ if (!e || !t) return;
154
+ let n = e.offsetHeight - t.offsetHeight;
155
+ n > 0 && Math.abs(n - u) > 1 && d(n);
156
+ });
157
+ let f = r.params.get("agent") ? t : null, _ = f ? e.byId.get(f) ?? null : null;
158
+ return /* @__PURE__ */ (0, g.jsxs)("div", {
159
+ className: "rp-tl",
160
+ children: [/* @__PURE__ */ (0, g.jsx)("section", {
161
+ className: "rp-tl-chart",
162
+ "aria-label": "Agents over time",
163
+ ref: s,
164
+ children: /* @__PURE__ */ (0, g.jsx)(p, {
165
+ trace: a,
166
+ live: e.live,
167
+ startedAt: Number.isFinite(Date.parse(i.run.startedAt ?? "")) || e.agents.some((e) => Number.isFinite(Date.parse(e.node.start ?? ""))) ? e.t0 : void 0,
168
+ label: "Agents over time",
169
+ defaultView: "agents",
170
+ summary: !1,
171
+ markers: o,
172
+ agentFill: "muted",
173
+ maxHeight: Math.max(200, c - u - 2),
174
+ selectedId: f ?? void 0,
175
+ onDeselect: () => n(null),
176
+ onSelect: (t) => {
177
+ let r = t.kind === "pipeline" ? t.id : t.parentId;
178
+ r && e.byId.has(r) && n(r);
179
+ }
180
+ })
181
+ }), _ && /* @__PURE__ */ (0, g.jsx)(b, {
182
+ m: e,
183
+ a: _,
184
+ href: (e) => r.href(e, { agent: m(i.run.id, _.id) })
185
+ })]
186
+ });
187
+ }
188
+ function b({ m: e, a: t, href: n }) {
189
+ let s = d(e.t0), p = Math.max(1, ...t.tools.map((e) => e.calls));
190
+ return /* @__PURE__ */ (0, g.jsxs)("section", {
191
+ className: "rp-card rp-insp",
192
+ "aria-label": `${t.name}: whole run`,
193
+ children: [/* @__PURE__ */ (0, g.jsxs)("div", {
194
+ className: "rp-hd sm",
195
+ children: [
196
+ /* @__PURE__ */ (0, g.jsxs)("h2", { children: [/* @__PURE__ */ (0, g.jsx)(u, { tone: t.state.tone }), t.name] }),
197
+ /* @__PURE__ */ (0, g.jsx)("span", {
198
+ className: `rp-pill ${t.state.tone}`,
199
+ children: t.state.label
200
+ }),
201
+ /* @__PURE__ */ (0, g.jsx)("span", {
202
+ className: "muted ph-hide",
203
+ children: [t.model, t.harness].filter(Boolean).join(" · ")
204
+ }),
205
+ /* @__PURE__ */ (0, g.jsxs)("span", {
206
+ className: "end",
207
+ children: [/* @__PURE__ */ (0, g.jsxs)("a", {
208
+ className: "rp-btn sm",
209
+ href: n("conversations"),
210
+ children: ["Conversation", /* @__PURE__ */ (0, g.jsx)(i, {
211
+ name: "arrow",
212
+ size: 14
213
+ })]
214
+ }), /* @__PURE__ */ (0, g.jsxs)("a", {
215
+ className: "rp-btn sm ph-hide",
216
+ href: n("traces"),
217
+ children: ["Traces", /* @__PURE__ */ (0, g.jsx)(i, {
218
+ name: "arrow",
219
+ size: 14
220
+ })]
221
+ })]
222
+ })
223
+ ]
224
+ }), /* @__PURE__ */ (0, g.jsxs)("div", {
225
+ className: "rp-ig",
226
+ children: [
227
+ /* @__PURE__ */ (0, g.jsxs)("div", { children: [
228
+ /* @__PURE__ */ (0, g.jsx)("h4", { children: "Tokens" }),
229
+ /* @__PURE__ */ (0, g.jsx)("div", {
230
+ className: "big",
231
+ children: t.tokens === null ? "—" : c(t.tokens)
232
+ }),
233
+ /* @__PURE__ */ (0, g.jsxs)("dl", { children: [
234
+ t.byClass ? /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [
235
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "In" }),
236
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: c(t.byClass.input) }),
237
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Out" }),
238
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: c(t.byClass.output) }),
239
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Cached" }),
240
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: c(t.byClass.cacheRead) })
241
+ ] }) : /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [/* @__PURE__ */ (0, g.jsx)("dt", { children: "In · out split" }), /* @__PURE__ */ (0, g.jsx)("dd", {
242
+ className: "dim",
243
+ children: "not recorded"
244
+ })] }),
245
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Cost" }),
246
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: o(t) })
247
+ ] })
248
+ ] }),
249
+ /* @__PURE__ */ (0, g.jsxs)("div", { children: [
250
+ /* @__PURE__ */ (0, g.jsx)("h4", { children: "Model calls" }),
251
+ /* @__PURE__ */ (0, g.jsx)("div", {
252
+ className: "big",
253
+ children: a(t.modelCalls)
254
+ }),
255
+ /* @__PURE__ */ (0, g.jsxs)("dl", { children: [
256
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "p50" }),
257
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: r(t.latency.p50) }),
258
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "p90" }),
259
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: r(t.latency.p90) }),
260
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "p99" }),
261
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: r(t.latency.p99) }),
262
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Busy" }),
263
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: f(t.busy) })
264
+ ] })
265
+ ] }),
266
+ /* @__PURE__ */ (0, g.jsxs)("div", { children: [
267
+ /* @__PURE__ */ (0, g.jsx)("h4", { children: "Tool calls" }),
268
+ /* @__PURE__ */ (0, g.jsxs)("div", {
269
+ className: "big",
270
+ children: [a(t.toolCalls), t.toolFailures ? /* @__PURE__ */ (0, g.jsxs)("small", {
271
+ className: "f",
272
+ children: [
273
+ " ",
274
+ t.toolFailures,
275
+ " failed"
276
+ ]
277
+ }) : null]
278
+ }),
279
+ t.tools.length ? /* @__PURE__ */ (0, g.jsx)("div", {
280
+ className: "rp-tbars",
281
+ children: t.tools.slice(0, 4).map((e) => /* @__PURE__ */ (0, g.jsxs)("div", {
282
+ className: "row",
283
+ children: [
284
+ /* @__PURE__ */ (0, g.jsx)("span", {
285
+ className: "l",
286
+ title: e.name,
287
+ children: e.name
288
+ }),
289
+ /* @__PURE__ */ (0, g.jsx)(l, {
290
+ ok: e.calls - e.failures,
291
+ failed: e.failures,
292
+ max: p
293
+ }),
294
+ /* @__PURE__ */ (0, g.jsx)("span", {
295
+ className: "n",
296
+ children: a(e.calls)
297
+ })
298
+ ]
299
+ }, e.name))
300
+ }) : /* @__PURE__ */ (0, g.jsx)("span", {
301
+ className: "dim",
302
+ children: t.toolCalls === null ? "Tool calls not recorded" : "No tool calls"
303
+ })
304
+ ] }),
305
+ /* @__PURE__ */ (0, g.jsxs)("div", { children: [
306
+ /* @__PURE__ */ (0, g.jsx)("h4", { children: "Reliability" }),
307
+ /* @__PURE__ */ (0, g.jsxs)("div", {
308
+ className: "big",
309
+ children: [
310
+ t.failedSteps,
311
+ " ",
312
+ /* @__PURE__ */ (0, g.jsx)("small", { children: "failed steps" })
313
+ ]
314
+ }),
315
+ /* @__PURE__ */ (0, g.jsxs)("dl", { children: [
316
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Retried steps" }),
317
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: t.retries }),
318
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Restarts" }),
319
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: t.restarts.length }),
320
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Spawned · commits" }),
321
+ /* @__PURE__ */ (0, g.jsxs)("dd", { children: [
322
+ t.children.length,
323
+ " · ",
324
+ t.commits ?? "—"
325
+ ] }),
326
+ /* @__PURE__ */ (0, g.jsx)("dt", { children: "Active" }),
327
+ /* @__PURE__ */ (0, g.jsx)("dd", { children: t.first === null ? "never" : `${s(t.first)}–${t.state.tone === "live" ? "now" : s(t.last ?? t.first)}` })
328
+ ] })
329
+ ] })
330
+ ]
331
+ })]
332
+ });
333
+ }
334
+ //#endregion
335
+ export { b as AgentInspector, y as TimelineTab, v as flowTrace };