@tangle-network/sandbox-cli 0.21.26 → 0.21.28
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.
- package/dist/graph-viewer/{Analytics-DocMpB6T.js → Analytics-DFWW8Phh.js} +260 -275
- package/dist/graph-viewer/Checks-qgqV4xgV.js +155 -0
- package/dist/graph-viewer/{Conversations-CISiWrR9.js → Conversations-CGB45kpj.js} +112 -80
- package/dist/graph-viewer/{Files-Dh8p_Fpw.js → Files-DtZhf0ii.js} +121 -106
- package/dist/graph-viewer/LiveRun-C21wUKAY.js +210 -0
- package/dist/graph-viewer/Overview-BjeLsA2I.js +506 -0
- package/dist/graph-viewer/{RunPage-nJwCsArn.js → RunPage-CkkcBEUe.js} +22 -22
- package/dist/graph-viewer/{Timeline-bPjhV3il.js → Timeline-C2Xolk0t.js} +84 -84
- package/dist/graph-viewer/{Today-pebCsPJ1.js → Today-BVVDtSVN.js} +65 -58
- package/dist/graph-viewer/Topology-DO5XX8e4.js +545 -0
- package/dist/graph-viewer/{Traces-C5x2UvJh.js → Traces-BhMxjNgw.js} +79 -52
- package/dist/graph-viewer/{WallPages-DSmRm2v3.js → WallPages-4d9QUZDq.js} +3 -3
- package/dist/graph-viewer/index.js +103 -102
- package/dist/graph-viewer/{lazy-pages-CpmkG5o2.js → lazy-pages-DM0cZM10.js} +4 -4
- package/dist/graph-viewer/{record-part-Cx9GDQeo.js → record-part-CZal_IMH.js} +382 -352
- package/dist/graph-viewer/report-viewer.js +7 -7
- package/dist/graph-viewer/styles.css +596 -284
- package/dist/graph-viewer/{ui-CEhDqce8.js → ui-D8QZRsC3.js} +143 -111
- package/dist/graph-viewer/viewer/{AgentGraphCanvas-D7jjAE6i-DecKyUGA.js → AgentGraphCanvas-CMdOlSlh-4EervjeC.js} +54 -48
- package/dist/graph-viewer/viewer/{Analytics-CtKucZjs.js → Analytics-DD__nbLm.js} +203 -218
- package/dist/graph-viewer/viewer/{AnswerStrip-DsI9aF-i.js → AnswerStrip-CGUyXuYH.js} +2 -2
- package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +156 -0
- package/dist/graph-viewer/viewer/{Conversations-DQBCyko6.js → Conversations-C1n0EBBd.js} +124 -92
- package/dist/graph-viewer/viewer/{Files-B-g25gSO.js → Files-Cjr7NMU_.js} +63 -48
- package/dist/graph-viewer/viewer/{LiveRun-BMQnTpTZ.js → LiveRun-uPTkPSjo.js} +1223 -1164
- package/dist/graph-viewer/viewer/{Outputs-DXnN1wEQ.js → Outputs-CumGyjQo.js} +6 -6
- package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +507 -0
- package/dist/graph-viewer/viewer/{RunPage-ChipoSdO.js → RunPage-DZlBW7Va.js} +28 -28
- package/dist/graph-viewer/viewer/{Scores-CjriXjf_.js → Scores-ZS16yk0n.js} +3 -3
- package/dist/graph-viewer/viewer/{Timeline-DzEzobA0.js → Timeline-BnK6-yBR.js} +24 -24
- package/dist/graph-viewer/viewer/{Today-DLHe_wTA.js → Today-a_-oNigi.js} +69 -62
- package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +546 -0
- package/dist/graph-viewer/viewer/{Traces-BWBulSPE.js → Traces-C0IGk0L4.js} +75 -48
- package/dist/graph-viewer/viewer/{WallPages-Crj-qPoK.js → WallPages-CzWpyIfp.js} +8 -8
- package/dist/graph-viewer/viewer/{WorkflowGraph-DYsP_Kcg-C0O7M5iH.js → WorkflowGraph-DZ3xejKE-jRXKeSrg.js} +6 -6
- package/dist/graph-viewer/viewer/{agent-timeline-C-UIhXgu.js → agent-timeline-Cs9Qbpvo.js} +437 -425
- package/dist/graph-viewer/viewer/{bot-Bivadvxn.js → bot-D6Nrej7Z.js} +1 -1
- package/dist/graph-viewer/viewer/{chevron-right-WW7tFY6B.js → chevron-right-D_5IKLxu.js} +1 -1
- package/dist/graph-viewer/viewer/{createLucideIcon-Z6KTw8ff.js → createLucideIcon-yH0cxLMy.js} +1 -1
- package/dist/graph-viewer/viewer/{data-azhapQrS.js → data-CkWfWr7i.js} +1 -1
- package/dist/graph-viewer/viewer/{dist-CyOc-K4O.js → dist-C1-7EfoW.js} +3 -3
- package/dist/graph-viewer/viewer/{file-text-B34N7Soo.js → file-text-m7a3piQF.js} +1 -1
- package/dist/graph-viewer/viewer/{final-output-Db2D9cMT.js → final-output-kwY11u9X.js} +1 -1
- package/dist/graph-viewer/viewer/{highlights-Bgg6O5ub.js → highlights-Btsi5OXl.js} +2 -2
- package/dist/graph-viewer/viewer/{jsx-runtime-BSzbUOFc.js → jsx-runtime-DQWyJOhv.js} +1 -1
- package/dist/graph-viewer/viewer/{lazy-pages-fgtpXQ00.js → lazy-pages-BowaGsg-.js} +6 -6
- package/dist/graph-viewer/viewer/{markdown-BpJEJUTW.js → markdown-CX_sVrXB.js} +17 -17
- package/dist/graph-viewer/viewer/{model-brand-bTcMjQtB-C9bHPsPk.js → model-brand-bTcMjQtB-fagiBQam.js} +3 -3
- package/dist/graph-viewer/viewer/{page-header-C6YCPkzJ.js → page-header-Brq611fd.js} +3 -3
- package/dist/graph-viewer/viewer/{popover-DrLB9iar.js → popover-CvOAjlnk.js} +4 -4
- package/dist/graph-viewer/viewer/{react-CisnW4fB.js → react-CY3IbSNO.js} +24 -24
- package/dist/graph-viewer/viewer/{react-dom-C5NDYQCD.js → react-dom-t1L4_-il.js} +1 -1
- package/dist/graph-viewer/viewer/{record-part-d0gKKrMI.js → record-part-D3_Anfpe.js} +455 -425
- package/dist/graph-viewer/viewer/{segmented-control-ChhLMa6h.js → segmented-control-BaJmvTNd.js} +39 -39
- package/dist/graph-viewer/viewer/{shiki-BwlTRTY6.js → shiki-Qnby7Sh6.js} +2 -2
- package/dist/graph-viewer/viewer/{stream-tokenizer-CaVb21TO.js → stream-tokenizer-CWtnjmRd.js} +1 -1
- package/dist/graph-viewer/viewer/{terminal-BxRacTx0.js → terminal-83J_I4Ne.js} +1 -1
- package/dist/graph-viewer/viewer/{themes-BxrCCwH5.js → themes-1i1fzpRk.js} +1 -1
- package/dist/graph-viewer/viewer/{ui-DZiGjPwl.js → ui-C9b1rIUH.js} +222 -190
- package/dist/graph-viewer/viewer/{workspace-DalRxssx.js → workspace-CekmOBs3.js} +76 -76
- package/dist/graph-viewer/viewer/{x-B_F8B4lq.js → x-DOc2URqZ.js} +1 -1
- package/dist/graph-viewer/workspace-viewer.js +103 -102
- package/package.json +9 -9
- package/dist/graph-viewer/Checks-CbnY4tuh.js +0 -113
- package/dist/graph-viewer/LiveRun-C-yKwkKs.js +0 -190
- package/dist/graph-viewer/Overview-BaXPdCFC.js +0 -477
- package/dist/graph-viewer/Topology-CyhuK6XW.js +0 -550
- package/dist/graph-viewer/viewer/Checks-DZTgeYlV.js +0 -114
- package/dist/graph-viewer/viewer/Overview-u7-8-rGx.js +0 -478
- package/dist/graph-viewer/viewer/Topology-Dsmuu27J.js +0 -551
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { i as t, t as n } from "./jsx-runtime-BSzbUOFc.js";
|
|
3
|
-
import { a as r, i, t as a } from "./popover-DrLB9iar.js";
|
|
4
|
-
import { A as o, C as s, S as c, _ as l, a as u, b as d, h as f, k as p, s as m, t as h, v as g } from "./ui-DZiGjPwl.js";
|
|
5
|
-
import { O as _ } from "./data-azhapQrS.js";
|
|
6
|
-
import { t as v } from "./plain-words-CgvxtEOa.js";
|
|
7
|
-
import { agentParam as y } from "./RunPage-ChipoSdO.js";
|
|
8
|
-
//#region src/workspace/run/Overview.tsx
|
|
9
|
-
var b = /* @__PURE__ */ e(t(), 1), x = n();
|
|
10
|
-
function S(e, t = Infinity) {
|
|
11
|
-
if (!e) return "";
|
|
12
|
-
let n = e.replace(/\/(home|mnt|Users|tmp|private)\/\S+/g, "").replace(/\s+/g, " ").trim();
|
|
13
|
-
n = n.replace(/^(?:[\w-]+(?: [\w-]+){0,3}: )+(?=\S)/, (e) => e.split(": ").length > 2 ? "" : e), n = n.split(/(?<=[.;])\s|;\s|, the |, starting /)[0] ?? n;
|
|
14
|
-
let r = n.split(" ");
|
|
15
|
-
return (r.length > t ? `${r.slice(0, t).join(" ")}…` : n).replace(/[.;,]$/, "");
|
|
16
|
-
}
|
|
17
|
-
function C(e) {
|
|
18
|
-
let t = e.steps.filter(({ step: e }) => e.kind !== "waiting").map(({ step: e }) => [e.t, e.t + e.d]).sort((e, t) => e[0] - t[0]), n = [];
|
|
19
|
-
for (let [e, r] of t) {
|
|
20
|
-
let t = n[n.length - 1];
|
|
21
|
-
t && e <= t[1] + 3e4 ? t[1] = Math.max(t[1], r) : n.push([e, r]);
|
|
22
|
-
}
|
|
23
|
-
return n;
|
|
24
|
-
}
|
|
25
|
-
function w(e) {
|
|
26
|
-
let { m: t, doc: n, play: r, route: i } = e, a = n.view, c = n.run, l = n.execution, d = (r?.runs ?? []).filter((e) => e.id !== n.run.id && e.startedAt && n.run.startedAt && e.startedAt > n.run.startedAt).sort((e, t) => e.startedAt < t.startedAt ? -1 : 1)[0], f = (0, b.useMemo)(() => C(t), [t]), p = new Date(t.t0).toISOString().slice(0, 10) !== new Date(t.t0 + t.duration).toISOString().slice(0, 10), m = f.reduce((e, [t, n]) => e + (n - t), 0), h = t.best, g = h && h.passed !== null && h.passed !== void 0 && h.total && h.passed === h.total, v = a?.status.label ?? n.run.state, y = t.live ? `Running for ${s(t.duration)}${h ? `; best release ${h.release} passed ${h.passed}/${h.total} steps` : ", no release checked yet"}.` : g ? `Solved in ${s(t.duration)}: ${h.release} passed every step.` : `${v} after ${s(t.duration)}${h ? `; best release ${h.release} passed ${h.passed ?? 0}/${h.total ?? "?"} steps` : " with no release checked"}.`, w = S(c.ending?.reason ?? a?.blocker?.why ?? a?.blocker?.sentence, 26), D = l?.failedAttempts ?? 0, k = [w && `${w}.`, D && t.totals.lastStep !== null ? `Agents worked for ${s(m)}; ${D} later tries failed${l?.lastAttempt?.error ? `, the last on “${S(l.lastAttempt.error, 8)}”` : ""}.` : ""].filter(Boolean).join(" "), A = t.live ? "clock" : g ? "check" : "stop", j = [
|
|
27
|
-
{
|
|
28
|
-
at: n.run.startedAt,
|
|
29
|
-
title: "Run started",
|
|
30
|
-
sub: `${t.agents.length} agents${t.root?.model ? ` on ${t.root.model}` : ""}`,
|
|
31
|
-
tone: ""
|
|
32
|
-
},
|
|
33
|
-
...t.totals.lastStep === null ? [] : [{
|
|
34
|
-
at: new Date(t.t0 + t.totals.lastStep).toISOString(),
|
|
35
|
-
title: t.live ? "Latest agent step" : "Last agent step",
|
|
36
|
-
sub: `+${s(t.totals.lastStep)} into the run`,
|
|
37
|
-
tone: t.duration - t.totals.lastStep > 18e5 ? "warn" : ""
|
|
38
|
-
}],
|
|
39
|
-
...l?.lastAttempt?.error ? [{
|
|
40
|
-
at: l.lastAttempt.at ?? null,
|
|
41
|
-
title: "Last try failed",
|
|
42
|
-
sub: S(l.lastAttempt.error, 10),
|
|
43
|
-
tone: "fail"
|
|
44
|
-
}] : [],
|
|
45
|
-
t.live ? {
|
|
46
|
-
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
47
|
-
title: "Running now",
|
|
48
|
-
sub: `${t.agents.filter((e) => e.state.tone === "live").length} agents live`,
|
|
49
|
-
tone: "next"
|
|
50
|
-
} : {
|
|
51
|
-
at: c.ending?.at ?? n.run.settledAt,
|
|
52
|
-
title: v,
|
|
53
|
-
sub: d ? `continued in run ${_(n.run.play, d.id)}` : S(c.ending?.sentence, 8),
|
|
54
|
-
tone: "next"
|
|
55
|
-
}
|
|
56
|
-
];
|
|
57
|
-
return /* @__PURE__ */ (0, x.jsxs)("div", {
|
|
58
|
-
className: "rp-ov",
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ (0, x.jsxs)("section", {
|
|
61
|
-
className: "rp-card rp-vd",
|
|
62
|
-
"aria-label": "Verdict",
|
|
63
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
64
|
-
className: "rp-vd-top",
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ (0, x.jsx)("div", {
|
|
67
|
-
className: "rp-vd-ic",
|
|
68
|
-
children: /* @__PURE__ */ (0, x.jsx)(u, {
|
|
69
|
-
name: A,
|
|
70
|
-
size: 22
|
|
71
|
-
})
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ (0, x.jsxs)("div", { children: [/* @__PURE__ */ (0, x.jsx)("h2", {
|
|
74
|
-
className: "rp-verdict",
|
|
75
|
-
children: y
|
|
76
|
-
}), k && /* @__PURE__ */ (0, x.jsx)("p", {
|
|
77
|
-
className: "rp-lede",
|
|
78
|
-
children: k
|
|
79
|
-
})] }),
|
|
80
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
81
|
-
className: "rp-vd-act",
|
|
82
|
-
children: [t.live ? /* @__PURE__ */ (0, x.jsxs)("a", {
|
|
83
|
-
className: "rp-btn primary",
|
|
84
|
-
href: i.href("timeline"),
|
|
85
|
-
children: ["Watch the timeline", /* @__PURE__ */ (0, x.jsx)(u, { name: "arrow" })]
|
|
86
|
-
}) : d ? /* @__PURE__ */ (0, x.jsxs)("a", {
|
|
87
|
-
className: "rp-btn primary",
|
|
88
|
-
href: `/run/${encodeURIComponent(d.id)}`,
|
|
89
|
-
children: [
|
|
90
|
-
"Open run ",
|
|
91
|
-
_(n.run.play, d.id),
|
|
92
|
-
/* @__PURE__ */ (0, x.jsx)(u, { name: "arrow" })
|
|
93
|
-
]
|
|
94
|
-
}) : null, /* @__PURE__ */ (0, x.jsx)("a", {
|
|
95
|
-
className: "rp-btn framed",
|
|
96
|
-
href: i.href("files"),
|
|
97
|
-
children: "Files"
|
|
98
|
-
})]
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
}), /* @__PURE__ */ (0, x.jsx)("ol", {
|
|
102
|
-
className: "rp-story",
|
|
103
|
-
children: j.map((e, t) => /* @__PURE__ */ (0, x.jsxs)("li", { children: [
|
|
104
|
-
/* @__PURE__ */ (0, x.jsx)("span", { className: `sd ${e.tone}` }),
|
|
105
|
-
/* @__PURE__ */ (0, x.jsx)("time", { children: e.at ? o(e.at, p) : "—" }),
|
|
106
|
-
/* @__PURE__ */ (0, x.jsx)("b", { children: e.title }),
|
|
107
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
108
|
-
title: e.sub,
|
|
109
|
-
children: e.sub
|
|
110
|
-
})
|
|
111
|
-
] }, t))
|
|
112
|
-
})]
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ (0, x.jsx)(T, { ...e }),
|
|
115
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
116
|
-
className: "rp-ov-b",
|
|
117
|
-
children: [/* @__PURE__ */ (0, x.jsx)(E, {
|
|
118
|
-
m: t,
|
|
119
|
-
work: f,
|
|
120
|
-
working: m,
|
|
121
|
-
failed: D
|
|
122
|
-
}), /* @__PURE__ */ (0, x.jsx)(O, { ...e })]
|
|
123
|
-
})
|
|
124
|
-
]
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function T({ m: e, doc: t, route: n }) {
|
|
128
|
-
let o = t.run.check, s = o?.checkerNames?.find((e) => e.current) ?? o?.checkerNames?.[0], l = v(t.input?.objective), d = (t.findings?.items ?? []).filter((e) => e.path), f = e.agents.filter((e) => e.node.hasCode).length, p = e.agents.reduce((e, t) => e + (t.commits ?? 0), 0), h = e.best, g = o?.latest ? o.latest.solved ? "Passed" : o.latest.known ? "Failed" : "No verdict" : "Not checked";
|
|
129
|
-
return /* @__PURE__ */ (0, x.jsxs)("section", {
|
|
130
|
-
className: "rp-card rp-sum",
|
|
131
|
-
"aria-label": "Summary",
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ (0, x.jsxs)("div", { children: [
|
|
134
|
-
/* @__PURE__ */ (0, x.jsx)("h3", { children: "Goal" }),
|
|
135
|
-
/* @__PURE__ */ (0, x.jsx)("div", {
|
|
136
|
-
className: "goal",
|
|
137
|
-
children: S(l) || "Not recorded"
|
|
138
|
-
}),
|
|
139
|
-
l && /* @__PURE__ */ (0, x.jsxs)(a, { children: [/* @__PURE__ */ (0, x.jsx)(r, {
|
|
140
|
-
asChild: !0,
|
|
141
|
-
children: /* @__PURE__ */ (0, x.jsx)("button", {
|
|
142
|
-
type: "button",
|
|
143
|
-
className: "rp-link",
|
|
144
|
-
children: "Read the goal"
|
|
145
|
-
})
|
|
146
|
-
}), /* @__PURE__ */ (0, x.jsxs)(i, {
|
|
147
|
-
className: "rp-pop wide",
|
|
148
|
-
align: "start",
|
|
149
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
150
|
-
className: "ph",
|
|
151
|
-
children: [/* @__PURE__ */ (0, x.jsx)("b", { children: "Goal" }), /* @__PURE__ */ (0, x.jsx)("span", { children: "as pressed" })]
|
|
152
|
-
}), /* @__PURE__ */ (0, x.jsx)("div", {
|
|
153
|
-
className: "rp-pop-goal",
|
|
154
|
-
children: l
|
|
155
|
-
})]
|
|
156
|
-
})] })
|
|
157
|
-
] }),
|
|
158
|
-
/* @__PURE__ */ (0, x.jsxs)("div", { children: [
|
|
159
|
-
/* @__PURE__ */ (0, x.jsx)("h3", { children: "Check" }),
|
|
160
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
161
|
-
className: "v",
|
|
162
|
-
children: [g === "Passed" ? /* @__PURE__ */ (0, x.jsx)(m, { tone: "ok" }) : g === "Failed" ? /* @__PURE__ */ (0, x.jsx)(m, { tone: "fail" }) : /* @__PURE__ */ (0, x.jsx)(m, { tone: "none" }), g]
|
|
163
|
-
}),
|
|
164
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
165
|
-
className: "sub",
|
|
166
|
-
children: [o?.counts?.checks ? `${s ? `Checker ${s.label}` : "The checker"} ran ${o.counts.checks} times${o.latest?.line ? `; latest: ${S(o.latest.line, 10)}` : ""}. ` : "No check has run. ", /* @__PURE__ */ (0, x.jsx)("a", {
|
|
167
|
-
href: n.href("checks"),
|
|
168
|
-
children: "Checks"
|
|
169
|
-
})]
|
|
170
|
-
})
|
|
171
|
-
] }),
|
|
172
|
-
/* @__PURE__ */ (0, x.jsxs)("div", { children: [
|
|
173
|
-
/* @__PURE__ */ (0, x.jsx)("h3", { children: "Best release" }),
|
|
174
|
-
/* @__PURE__ */ (0, x.jsx)("div", {
|
|
175
|
-
className: "v",
|
|
176
|
-
children: h ? `${h.release}${h.total ? ` · ${h.passed ?? 0}/${h.total}` : ""}` : "None"
|
|
177
|
-
}),
|
|
178
|
-
/* @__PURE__ */ (0, x.jsx)("div", {
|
|
179
|
-
className: "sub",
|
|
180
|
-
children: h ? h.sentence ? S(h.sentence, 14) : `${e.releases.length} releases checked` : e.releases.length ? `${e.releases.length} releases, none scored` : `${c(p)} commits, none tagged`
|
|
181
|
-
})
|
|
182
|
-
] }),
|
|
183
|
-
/* @__PURE__ */ (0, x.jsxs)("div", { children: [
|
|
184
|
-
/* @__PURE__ */ (0, x.jsx)("h3", { children: "Work kept" }),
|
|
185
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
186
|
-
className: "v",
|
|
187
|
-
children: [
|
|
188
|
-
c(d.length),
|
|
189
|
-
" pages · ",
|
|
190
|
-
c(f),
|
|
191
|
-
" branches"
|
|
192
|
-
]
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
195
|
-
className: "files",
|
|
196
|
-
children: [d.slice(0, 3).map((e) => /* @__PURE__ */ (0, x.jsxs)("a", {
|
|
197
|
-
href: n.href("files", { file: `page:${e.path}` }),
|
|
198
|
-
title: e.path,
|
|
199
|
-
children: [/* @__PURE__ */ (0, x.jsx)(u, {
|
|
200
|
-
name: "file",
|
|
201
|
-
size: 14
|
|
202
|
-
}), /* @__PURE__ */ (0, x.jsx)("span", { children: e.path.split("/").pop() })]
|
|
203
|
-
}, e.path)), d.length > 3 && /* @__PURE__ */ (0, x.jsx)("a", {
|
|
204
|
-
href: n.href("files"),
|
|
205
|
-
children: /* @__PURE__ */ (0, x.jsxs)("span", { children: [d.length - 3, " more"] })
|
|
206
|
-
})]
|
|
207
|
-
})
|
|
208
|
-
] })
|
|
209
|
-
]
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
function E({ m: e, work: t, working: n, failed: r }) {
|
|
213
|
-
let i = (t) => `${Math.max(0, Math.min(100, t / Math.max(1, e.duration) * 100))}%`, a = e.duration > 36e5 ? Math.floor(e.duration / 36e5) : 0, c = new Date(e.t0).toISOString().slice(0, 10) !== new Date(e.t0 + e.duration).toISOString().slice(0, 10), l = e.duration * (c ? .16 : .08), u = a <= 10 ? 1 : Math.ceil(a / 8), f = a ? Array.from({ length: a }, (e, t) => t + 1).filter((t) => t % u === 0 && t * 36e5 >= l && (t + u) * 36e5 <= e.duration && t * 36e5 <= e.duration - l) : [], p = e.tree.filter((e) => e.restarts.length || e.state.tone === "ok").slice(0, 14), m = (t) => c ? o(new Date(e.t0 + t).toISOString(), !0).replace(" UTC", "") : d(e.t0)(t);
|
|
214
|
-
return /* @__PURE__ */ (0, x.jsxs)("section", {
|
|
215
|
-
className: "rp-card",
|
|
216
|
-
"aria-label": "Where the time went",
|
|
217
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
218
|
-
className: "rp-hd sm",
|
|
219
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("h2", { children: [
|
|
220
|
-
"Where the ",
|
|
221
|
-
s(e.duration),
|
|
222
|
-
" went"
|
|
223
|
-
] }), /* @__PURE__ */ (0, x.jsxs)("span", {
|
|
224
|
-
className: "end rp-keys",
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ (0, x.jsxs)("span", {
|
|
227
|
-
className: "rp-key",
|
|
228
|
-
children: [
|
|
229
|
-
/* @__PURE__ */ (0, x.jsx)("i", { className: "work" }),
|
|
230
|
-
/* @__PURE__ */ (0, x.jsx)("b", { children: s(n) }),
|
|
231
|
-
" agents working"
|
|
232
|
-
]
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ (0, x.jsxs)("span", {
|
|
235
|
-
className: "rp-key",
|
|
236
|
-
children: [
|
|
237
|
-
/* @__PURE__ */ (0, x.jsx)("i", { className: "hatch" }),
|
|
238
|
-
/* @__PURE__ */ (0, x.jsx)("b", { children: s(Math.max(0, e.duration - n)) }),
|
|
239
|
-
" idle"
|
|
240
|
-
]
|
|
241
|
-
}),
|
|
242
|
-
r > 0 && /* @__PURE__ */ (0, x.jsxs)("span", {
|
|
243
|
-
className: "rp-key",
|
|
244
|
-
children: [
|
|
245
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
246
|
-
className: "x",
|
|
247
|
-
children: "✕"
|
|
248
|
-
}),
|
|
249
|
-
/* @__PURE__ */ (0, x.jsx)("b", { children: r }),
|
|
250
|
-
" tries failed"
|
|
251
|
-
]
|
|
252
|
-
})
|
|
253
|
-
]
|
|
254
|
-
})]
|
|
255
|
-
}), /* @__PURE__ */ (0, x.jsx)("div", {
|
|
256
|
-
className: "rp-twrap",
|
|
257
|
-
children: /* @__PURE__ */ (0, x.jsxs)("div", {
|
|
258
|
-
className: "rp-tg",
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
261
|
-
className: "nm h",
|
|
262
|
-
children: "Whole run"
|
|
263
|
-
}),
|
|
264
|
-
/* @__PURE__ */ (0, x.jsx)("div", {
|
|
265
|
-
className: "rp-strip",
|
|
266
|
-
role: "img",
|
|
267
|
-
"aria-label": `Agents worked ${s(n)} of ${s(e.duration)}`,
|
|
268
|
-
children: t.map(([e, t], n) => /* @__PURE__ */ (0, x.jsx)("i", { style: {
|
|
269
|
-
left: i(e),
|
|
270
|
-
width: `max(1px, calc(${i(t)} - ${i(e)}))`
|
|
271
|
-
} }, n))
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
274
|
-
className: "ct",
|
|
275
|
-
children: s(e.duration)
|
|
276
|
-
}),
|
|
277
|
-
/* @__PURE__ */ (0, x.jsx)("span", {}),
|
|
278
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
279
|
-
className: "rp-strip-ax",
|
|
280
|
-
children: [
|
|
281
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
282
|
-
className: "first",
|
|
283
|
-
style: { left: 0 },
|
|
284
|
-
children: m(0)
|
|
285
|
-
}),
|
|
286
|
-
f.map((e) => /* @__PURE__ */ (0, x.jsxs)("span", {
|
|
287
|
-
className: e % 4 ? "ph-hide" : void 0,
|
|
288
|
-
style: { left: i(e * 36e5) },
|
|
289
|
-
children: [e, "h"]
|
|
290
|
-
}, e)),
|
|
291
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
292
|
-
className: "last",
|
|
293
|
-
style: { left: "100%" },
|
|
294
|
-
children: m(e.duration)
|
|
295
|
-
})
|
|
296
|
-
]
|
|
297
|
-
}),
|
|
298
|
-
/* @__PURE__ */ (0, x.jsx)("span", {}),
|
|
299
|
-
p.length > 0 && /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
300
|
-
className: "rp-tries-h",
|
|
301
|
-
children: [/* @__PURE__ */ (0, x.jsx)("b", { children: "Restarts by agent" }), /* @__PURE__ */ (0, x.jsxs)("span", {
|
|
302
|
-
className: "end rp-keys",
|
|
303
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("span", {
|
|
304
|
-
className: "rp-key",
|
|
305
|
-
children: [/* @__PURE__ */ (0, x.jsx)("span", {
|
|
306
|
-
className: "x",
|
|
307
|
-
children: "✕"
|
|
308
|
-
}), "Restart"]
|
|
309
|
-
}), /* @__PURE__ */ (0, x.jsxs)("span", {
|
|
310
|
-
className: "rp-key",
|
|
311
|
-
children: [/* @__PURE__ */ (0, x.jsx)("span", { className: "rp-dot ok" }), "Done"]
|
|
312
|
-
})]
|
|
313
|
-
})]
|
|
314
|
-
}), p.map((t) => /* @__PURE__ */ (0, x.jsx)(D, {
|
|
315
|
-
m: e,
|
|
316
|
-
a: t,
|
|
317
|
-
X: i
|
|
318
|
-
}, t.id))] })
|
|
319
|
-
]
|
|
320
|
-
})
|
|
321
|
-
})]
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
function D({ m: e, a: t, X: n }) {
|
|
325
|
-
let r = f(() => /* @__PURE__ */ (0, x.jsx)(h, {
|
|
326
|
-
m: e,
|
|
327
|
-
a: t
|
|
328
|
-
}), { wide: t.tools.length > 0 });
|
|
329
|
-
return /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [
|
|
330
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
331
|
-
className: "nm",
|
|
332
|
-
title: t.name,
|
|
333
|
-
children: t.name
|
|
334
|
-
}),
|
|
335
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
336
|
-
className: "rp-tr-row",
|
|
337
|
-
tabIndex: 0,
|
|
338
|
-
"aria-label": `${t.name}: ${t.restarts.length} restarts`,
|
|
339
|
-
...r,
|
|
340
|
-
children: [
|
|
341
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
342
|
-
className: "life",
|
|
343
|
-
style: {
|
|
344
|
-
left: n(Math.max(0, t.start ?? 0)),
|
|
345
|
-
right: `calc(100% - ${n(t.end ?? e.duration)})`
|
|
346
|
-
}
|
|
347
|
-
}),
|
|
348
|
-
t.restarts.map((e, t) => /* @__PURE__ */ (0, x.jsx)("span", {
|
|
349
|
-
className: "mk",
|
|
350
|
-
style: { left: n(e) },
|
|
351
|
-
children: "✕"
|
|
352
|
-
}, t)),
|
|
353
|
-
t.state.tone === "ok" && t.end !== null && /* @__PURE__ */ (0, x.jsx)("span", {
|
|
354
|
-
className: "mk ok",
|
|
355
|
-
style: { left: n(t.end) }
|
|
356
|
-
})
|
|
357
|
-
]
|
|
358
|
-
}),
|
|
359
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
360
|
-
className: "ct",
|
|
361
|
-
children: t.restarts.length || "—"
|
|
362
|
-
})
|
|
363
|
-
] });
|
|
364
|
-
}
|
|
365
|
-
function O({ m: e, route: t, doc: n }) {
|
|
366
|
-
let r = (0, b.useMemo)(() => [...e.agents].sort((e, t) => (t.tokens ?? -1) - (e.tokens ?? -1)), [e]), i = (0, b.useRef)(null), a = l(i, r.length, 32), o = e.totals.lastStep ?? e.duration, s = (0, b.useMemo)(() => {
|
|
367
|
-
let t = 1;
|
|
368
|
-
for (let n of e.agents) {
|
|
369
|
-
let e = Array(28).fill(0);
|
|
370
|
-
for (let t of n.steps) t.t <= o && e[Math.min(27, Math.floor(t.t / Math.max(1, o) * 28))]++;
|
|
371
|
-
t = Math.max(t, ...e);
|
|
372
|
-
}
|
|
373
|
-
return t;
|
|
374
|
-
}, [e, o]);
|
|
375
|
-
return /* @__PURE__ */ (0, x.jsxs)("section", {
|
|
376
|
-
className: "rp-card",
|
|
377
|
-
"aria-label": "Agents",
|
|
378
|
-
children: [
|
|
379
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
380
|
-
className: "rp-hd sm",
|
|
381
|
-
children: [/* @__PURE__ */ (0, x.jsxs)("h2", { children: ["Agents", /* @__PURE__ */ (0, x.jsx)("span", {
|
|
382
|
-
className: "ct",
|
|
383
|
-
children: e.agents.length
|
|
384
|
-
})] }), /* @__PURE__ */ (0, x.jsx)("span", {
|
|
385
|
-
className: "end",
|
|
386
|
-
children: /* @__PURE__ */ (0, x.jsxs)("a", {
|
|
387
|
-
className: "rp-btn sm",
|
|
388
|
-
href: t.href("topology"),
|
|
389
|
-
children: ["Topology", /* @__PURE__ */ (0, x.jsx)(u, {
|
|
390
|
-
name: "arrow",
|
|
391
|
-
size: 14
|
|
392
|
-
})]
|
|
393
|
-
})
|
|
394
|
-
})]
|
|
395
|
-
}),
|
|
396
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
397
|
-
className: "rp-agt-h",
|
|
398
|
-
children: [
|
|
399
|
-
/* @__PURE__ */ (0, x.jsx)("span", {}),
|
|
400
|
-
/* @__PURE__ */ (0, x.jsx)("span", { children: "Agent" }),
|
|
401
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
402
|
-
className: "ph-hide",
|
|
403
|
-
children: p(e.t0, 0, o)
|
|
404
|
-
}),
|
|
405
|
-
/* @__PURE__ */ (0, x.jsx)("span", { children: "Steps" }),
|
|
406
|
-
/* @__PURE__ */ (0, x.jsx)("span", { children: "Tokens" })
|
|
407
|
-
]
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ (0, x.jsxs)("div", {
|
|
410
|
-
className: "rp-scroll",
|
|
411
|
-
ref: i,
|
|
412
|
-
children: [
|
|
413
|
-
/* @__PURE__ */ (0, x.jsx)("div", { style: { height: a.before } }),
|
|
414
|
-
r.slice(a.first, a.last).map((r) => /* @__PURE__ */ (0, x.jsx)(k, {
|
|
415
|
-
m: e,
|
|
416
|
-
a: r,
|
|
417
|
-
bins: 28,
|
|
418
|
-
end: o,
|
|
419
|
-
peak: s,
|
|
420
|
-
href: t.href("timeline", { agent: y(n.run.id, r.id) })
|
|
421
|
-
}, r.id)),
|
|
422
|
-
/* @__PURE__ */ (0, x.jsx)("div", { style: { height: a.after } })
|
|
423
|
-
]
|
|
424
|
-
})
|
|
425
|
-
]
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
function k({ m: e, a: t, bins: n, end: r, peak: i, href: a }) {
|
|
429
|
-
let o = f(() => /* @__PURE__ */ (0, x.jsx)(h, {
|
|
430
|
-
m: e,
|
|
431
|
-
a: t
|
|
432
|
-
}), { wide: t.tools.length > 0 }), s = Array(n).fill(0);
|
|
433
|
-
for (let e of t.steps) e.t <= r && s[Math.min(n - 1, Math.floor(e.t / Math.max(1, r) * n))]++;
|
|
434
|
-
let l = 120 / n;
|
|
435
|
-
return /* @__PURE__ */ (0, x.jsxs)("a", {
|
|
436
|
-
className: "rp-agt",
|
|
437
|
-
href: a,
|
|
438
|
-
...o,
|
|
439
|
-
children: [
|
|
440
|
-
/* @__PURE__ */ (0, x.jsx)(m, { tone: t.state.tone }),
|
|
441
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
442
|
-
className: "nm",
|
|
443
|
-
children: t.name
|
|
444
|
-
}),
|
|
445
|
-
/* @__PURE__ */ (0, x.jsxs)("svg", {
|
|
446
|
-
className: "ph-hide",
|
|
447
|
-
viewBox: "0 0 120 20",
|
|
448
|
-
"aria-hidden": "true",
|
|
449
|
-
children: [/* @__PURE__ */ (0, x.jsx)("line", {
|
|
450
|
-
x1: "0",
|
|
451
|
-
x2: "120",
|
|
452
|
-
y1: "19.5",
|
|
453
|
-
y2: "19.5",
|
|
454
|
-
className: "base"
|
|
455
|
-
}), s.map((e, t) => {
|
|
456
|
-
let n = e ? Math.max(4, Math.sqrt(e / i) * 18) : 0;
|
|
457
|
-
return n ? /* @__PURE__ */ (0, x.jsx)("rect", {
|
|
458
|
-
x: t * l + .5,
|
|
459
|
-
width: l - 1.2,
|
|
460
|
-
y: 19 - n,
|
|
461
|
-
height: n,
|
|
462
|
-
rx: "0.8"
|
|
463
|
-
}, t) : null;
|
|
464
|
-
})]
|
|
465
|
-
}),
|
|
466
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
467
|
-
className: "v",
|
|
468
|
-
children: t.steps.length ? c(t.steps.length) : "—"
|
|
469
|
-
}),
|
|
470
|
-
/* @__PURE__ */ (0, x.jsx)("span", {
|
|
471
|
-
className: "v",
|
|
472
|
-
children: t.tokens === null ? "—" : g(t.tokens)
|
|
473
|
-
})
|
|
474
|
-
]
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
//#endregion
|
|
478
|
-
export { w as Overview, S as clause };
|