@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
@@ -1,507 +0,0 @@
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 { a as r, i, t as a } from "./popover-CvOAjlnk.js";
4
- import { C as o, T as s, _ as c, a as l, b as u, h as d, j as f, s as p, t as m, v as h, w as g, x as _ } from "./ui-C9b1rIUH.js";
5
- import { O as v } from "./data-CkWfWr7i.js";
6
- import { t as y } from "./plain-words-CgvxtEOa.js";
7
- import { agentParam as b } from "./RunPage-DZlBW7Va.js";
8
- //#region src/workspace/run/Overview.tsx
9
- var x = /* @__PURE__ */ e(t(), 1), S = n();
10
- function C(e, t = Infinity) {
11
- if (!e) return "";
12
- let n = e.replace(/\/(home|mnt|Users|tmp|private)\/\S+/g, "").replace(/:?\s*\b[0-9a-f]{10,40}\b/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(" ").replace(/[.;,:]+$/, "")}…` : n.replace(/[.;,:]$/, "");
16
- }
17
- function w(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 T(e, t) {
26
- let n = Math.max(1, e.duration) / t, r = Array.from({ length: t }, () => /* @__PURE__ */ new Set());
27
- for (let { agent: i, step: a } of e.steps) if (a.kind !== "waiting") for (let e = Math.max(0, Math.floor(a.t / n)); e <= Math.min(t - 1, Math.floor((a.t + a.d) / n)); e++) r[e].add(i.id);
28
- return r.map((e) => e.size);
29
- }
30
- function E(e) {
31
- let { m: t, doc: n, play: r, route: i } = e, a = n.view, o = n.run, s = n.execution, c = (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], u = (0, x.useMemo)(() => w(t), [t]), d = new Date(t.t0).toISOString().slice(0, 10) !== new Date(t.t0 + t.duration).toISOString().slice(0, 10), p = u.reduce((e, [t, n]) => e + (n - t), 0), m = t.best, h = m && m.passed !== null && m.passed !== void 0 && m.total && m.passed === m.total, _ = a?.status.label ?? n.run.state, y = t.live ? `Running for ${g(t.duration)}${m ? `; best release ${m.release} passed ${m.passed}/${m.total} steps` : ", no release checked yet"}.` : h ? `Solved in ${g(t.duration)}: ${m.release} passed every step.` : `${_} after ${g(t.duration)}${m ? `; best release ${m.release} passed ${m.passed ?? 0}/${m.total ?? "?"} steps` : " with no release checked"}.`, b = C(o.ending?.reason ?? a?.blocker?.why ?? a?.blocker?.sentence, 26), T = s?.failedAttempts ?? 0, E = [b && `${b}.`, T && t.totals.lastStep !== null ? `Agents worked for ${g(p)}; ${T} later tries failed${s?.lastAttempt?.error ? `, the last on “${C(s.lastAttempt.error, 8)}”` : ""}.` : ""].filter(Boolean).join(" "), O = t.live ? "clock" : h ? "check" : "stop", A = [
32
- {
33
- at: n.run.startedAt,
34
- title: "Run started",
35
- sub: `${t.agents.length} agents${t.root?.model ? ` on ${t.root.model}` : ""}`,
36
- tone: ""
37
- },
38
- ...t.totals.lastStep === null ? [] : [{
39
- at: new Date(t.t0 + t.totals.lastStep).toISOString(),
40
- title: t.live ? "Latest agent step" : "Last agent step",
41
- sub: `+${g(t.totals.lastStep)} into the run`,
42
- tone: t.duration - t.totals.lastStep > 18e5 ? "warn" : ""
43
- }],
44
- ...s?.lastAttempt?.error ? [{
45
- at: s.lastAttempt.at ?? null,
46
- title: "Last try failed",
47
- sub: C(s.lastAttempt.error, 10),
48
- tone: "fail"
49
- }] : [],
50
- t.live ? {
51
- at: (/* @__PURE__ */ new Date()).toISOString(),
52
- title: "Running now",
53
- sub: `${t.agents.filter((e) => e.state.tone === "live").length} agents live`,
54
- tone: "next"
55
- } : {
56
- at: o.ending?.at ?? n.run.settledAt,
57
- title: _,
58
- sub: c ? `continued in run ${v(n.run.play, c.id)}` : C(o.ending?.sentence, 8),
59
- tone: "next"
60
- }
61
- ];
62
- return /* @__PURE__ */ (0, S.jsxs)("div", {
63
- className: "rp-ov",
64
- children: [
65
- /* @__PURE__ */ (0, S.jsxs)("section", {
66
- className: "rp-card rp-vd",
67
- "aria-label": "Verdict",
68
- children: [/* @__PURE__ */ (0, S.jsxs)("div", {
69
- className: "rp-vd-top",
70
- children: [
71
- /* @__PURE__ */ (0, S.jsx)("div", {
72
- className: "rp-vd-ic",
73
- children: /* @__PURE__ */ (0, S.jsx)(l, {
74
- name: O,
75
- size: 22
76
- })
77
- }),
78
- /* @__PURE__ */ (0, S.jsxs)("div", { children: [/* @__PURE__ */ (0, S.jsx)("h2", {
79
- className: "rp-verdict",
80
- children: y
81
- }), E && /* @__PURE__ */ (0, S.jsx)("p", {
82
- className: "rp-lede",
83
- children: E
84
- })] }),
85
- /* @__PURE__ */ (0, S.jsxs)("div", {
86
- className: "rp-vd-act",
87
- children: [t.live ? /* @__PURE__ */ (0, S.jsxs)("a", {
88
- className: "rp-btn primary",
89
- href: i.href("timeline"),
90
- children: ["Watch the timeline", /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })]
91
- }) : c ? /* @__PURE__ */ (0, S.jsxs)("a", {
92
- className: "rp-btn primary",
93
- href: `/run/${encodeURIComponent(c.id)}`,
94
- children: [
95
- "Open run ",
96
- v(n.run.play, c.id),
97
- /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })
98
- ]
99
- }) : m ? /* @__PURE__ */ (0, S.jsxs)("a", {
100
- className: "rp-btn primary",
101
- href: i.href("checks"),
102
- children: [
103
- "Review ",
104
- m.release,
105
- /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })
106
- ]
107
- }) : /* @__PURE__ */ (0, S.jsxs)("a", {
108
- className: "rp-btn primary",
109
- href: i.href("files"),
110
- children: ["Open the files", /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })]
111
- }), (t.live || c || m) && /* @__PURE__ */ (0, S.jsx)("a", {
112
- className: "rp-btn framed",
113
- href: i.href("files"),
114
- children: "Files"
115
- })]
116
- })
117
- ]
118
- }), /* @__PURE__ */ (0, S.jsx)("ol", {
119
- className: "rp-story",
120
- children: A.map((e, t) => /* @__PURE__ */ (0, S.jsxs)("li", { children: [
121
- /* @__PURE__ */ (0, S.jsx)("span", { className: `sd ${e.tone}` }),
122
- /* @__PURE__ */ (0, S.jsx)("time", { children: e.at ? f(e.at, d) : "—" }),
123
- /* @__PURE__ */ (0, S.jsx)("b", { children: e.title }),
124
- /* @__PURE__ */ (0, S.jsx)("span", {
125
- title: e.sub,
126
- children: e.sub
127
- })
128
- ] }, t))
129
- })]
130
- }),
131
- /* @__PURE__ */ (0, S.jsx)(D, { ...e }),
132
- /* @__PURE__ */ (0, S.jsxs)("div", {
133
- className: "rp-ov-b",
134
- children: [/* @__PURE__ */ (0, S.jsx)(k, {
135
- m: t,
136
- working: p,
137
- failed: T
138
- }), /* @__PURE__ */ (0, S.jsx)(j, { ...e })]
139
- })
140
- ]
141
- });
142
- }
143
- function D({ m: e, doc: t, route: n }) {
144
- let s = t.run.check, c = s?.checkerNames?.find((e) => e.current) ?? s?.checkerNames?.[0], d = y(t.input?.objective), f = (t.findings?.items ?? []).filter((e) => e.path), m = e.agents.filter((e) => e.node.hasCode).length, h = e.agents.reduce((e, t) => e + (t.commits ?? 0), 0), g = e.best, _ = u(s), v = s?.counts?.checks ? `${c ? `Checker ${c.label}` : "The checker"} ran ${o(s.counts.checks)} times` : "No check has run";
145
- return /* @__PURE__ */ (0, S.jsxs)("section", {
146
- className: "rp-card rp-sum",
147
- "aria-label": "Summary",
148
- children: [
149
- /* @__PURE__ */ (0, S.jsxs)("div", { children: [
150
- /* @__PURE__ */ (0, S.jsx)("h3", { children: "Goal" }),
151
- /* @__PURE__ */ (0, S.jsx)("div", {
152
- className: "goal",
153
- children: C(d) || "Not recorded"
154
- }),
155
- d && /* @__PURE__ */ (0, S.jsxs)(a, { children: [/* @__PURE__ */ (0, S.jsx)(r, {
156
- asChild: !0,
157
- children: /* @__PURE__ */ (0, S.jsx)("button", {
158
- type: "button",
159
- className: "rp-link",
160
- children: "Read the goal"
161
- })
162
- }), /* @__PURE__ */ (0, S.jsxs)(i, {
163
- className: "rp-pop wide",
164
- align: "start",
165
- children: [/* @__PURE__ */ (0, S.jsxs)("div", {
166
- className: "ph",
167
- children: [/* @__PURE__ */ (0, S.jsx)("b", { children: "Goal" }), /* @__PURE__ */ (0, S.jsx)("span", { children: "as pressed" })]
168
- }), /* @__PURE__ */ (0, S.jsx)("div", {
169
- className: "rp-pop-goal",
170
- children: d
171
- })]
172
- })] })
173
- ] }),
174
- /* @__PURE__ */ (0, S.jsxs)("div", { children: [
175
- /* @__PURE__ */ (0, S.jsx)("h3", { children: "Check" }),
176
- /* @__PURE__ */ (0, S.jsxs)("div", {
177
- className: "v",
178
- children: [/* @__PURE__ */ (0, S.jsx)(p, { tone: _.tone }), _.word]
179
- }),
180
- /* @__PURE__ */ (0, S.jsx)("div", {
181
- className: "sub",
182
- children: _.note ? `${_.note}.` : `${v}.`
183
- }),
184
- /* @__PURE__ */ (0, S.jsx)("a", {
185
- className: "rp-link",
186
- href: n.href("checks"),
187
- children: "See the checks"
188
- })
189
- ] }),
190
- /* @__PURE__ */ (0, S.jsxs)("div", { children: [
191
- /* @__PURE__ */ (0, S.jsx)("h3", { children: "Best release" }),
192
- /* @__PURE__ */ (0, S.jsx)("div", {
193
- className: "v",
194
- children: g ? `${g.release}${g.total ? ` · ${g.passed ?? 0}/${g.total}` : ""}` : "None"
195
- }),
196
- /* @__PURE__ */ (0, S.jsx)("div", {
197
- className: "sub",
198
- children: g ? g.sentence ? C(g.sentence, 14) : `${e.releases.length} releases checked` : e.releases.length ? `${e.releases.length} releases, none scored` : `${o(h)} commits, none tagged`
199
- })
200
- ] }),
201
- /* @__PURE__ */ (0, S.jsxs)("div", { children: [
202
- /* @__PURE__ */ (0, S.jsx)("h3", { children: "Work kept" }),
203
- /* @__PURE__ */ (0, S.jsxs)("div", {
204
- className: "v",
205
- children: [
206
- o(f.length),
207
- " pages · ",
208
- o(m),
209
- " branches"
210
- ]
211
- }),
212
- /* @__PURE__ */ (0, S.jsxs)("div", {
213
- className: "files",
214
- children: [f.slice(0, 3).map((e, t, r) => /* @__PURE__ */ (0, S.jsxs)("a", {
215
- href: n.href("files", { file: `page:${e.path}` }),
216
- title: e.path,
217
- children: [/* @__PURE__ */ (0, S.jsx)(l, {
218
- name: "file",
219
- size: 14
220
- }), /* @__PURE__ */ (0, S.jsx)("span", { children: O(e.path, r.map((e) => e.path)) })]
221
- }, e.path)), f.length > 3 && /* @__PURE__ */ (0, S.jsx)("a", {
222
- href: n.href("files"),
223
- children: /* @__PURE__ */ (0, S.jsxs)("span", { children: [f.length - 3, " more"] })
224
- })]
225
- })
226
- ] })
227
- ]
228
- });
229
- }
230
- function O(e, t) {
231
- let n = e.split("/"), r = (e, t) => e.split("/").slice(-t).join("/"), i = 1;
232
- for (; i < n.length && t.some((t) => t !== e && r(t, i) === r(e, i));) i++;
233
- return r(e, i);
234
- }
235
- function k({ m: e, working: t, failed: n }) {
236
- let r = (0, x.useMemo)(() => T(e, 96), [e]), i = Math.max(1, ...r), a = (t) => `${Math.max(0, Math.min(100, t / Math.max(1, e.duration) * 100))}%`, o = e.duration > 36e5 ? Math.floor(e.duration / 36e5) : 0, s = new Date(e.t0).toISOString().slice(0, 10) !== new Date(e.t0 + e.duration).toISOString().slice(0, 10), c = e.duration * (s ? .16 : .08), l = o <= 10 ? 1 : Math.ceil(o / 8), u = o ? Array.from({ length: o }, (e, t) => t + 1).filter((t) => t % l === 0 && t * 36e5 >= c && (t + l) * 36e5 <= e.duration && t * 36e5 <= e.duration - c) : [], d = e.tree.filter((e) => e.restarts.length).sort((e, t) => t.restarts.length - e.restarts.length).slice(0, 14), p = (t) => s ? f(new Date(e.t0 + t).toISOString(), !0).replace(" UTC", "") : _(e.t0)(t);
237
- return /* @__PURE__ */ (0, S.jsxs)("section", {
238
- className: "rp-card",
239
- "aria-label": "Where the time went",
240
- children: [/* @__PURE__ */ (0, S.jsxs)("div", {
241
- className: "rp-hd sm",
242
- children: [/* @__PURE__ */ (0, S.jsxs)("h2", { children: [
243
- "Where the ",
244
- g(e.duration),
245
- " went"
246
- ] }), /* @__PURE__ */ (0, S.jsxs)("span", {
247
- className: "end rp-keys",
248
- children: [
249
- /* @__PURE__ */ (0, S.jsxs)("span", {
250
- className: "rp-key",
251
- children: [
252
- /* @__PURE__ */ (0, S.jsx)("i", { className: "work" }),
253
- /* @__PURE__ */ (0, S.jsx)("b", { children: g(t) }),
254
- " agents working"
255
- ]
256
- }),
257
- /* @__PURE__ */ (0, S.jsxs)("span", {
258
- className: "rp-key",
259
- children: [
260
- /* @__PURE__ */ (0, S.jsx)("i", { className: "hatch" }),
261
- /* @__PURE__ */ (0, S.jsx)("b", { children: g(Math.max(0, e.duration - t)) }),
262
- " idle"
263
- ]
264
- }),
265
- n > 0 && /* @__PURE__ */ (0, S.jsxs)("span", {
266
- className: "rp-key",
267
- children: [
268
- /* @__PURE__ */ (0, S.jsx)("span", {
269
- className: "x",
270
- children: "✕"
271
- }),
272
- /* @__PURE__ */ (0, S.jsx)("b", { children: n }),
273
- " tries failed"
274
- ]
275
- })
276
- ]
277
- })]
278
- }), /* @__PURE__ */ (0, S.jsx)("div", {
279
- className: "rp-twrap",
280
- children: /* @__PURE__ */ (0, S.jsxs)("div", {
281
- className: "rp-tg",
282
- children: [
283
- /* @__PURE__ */ (0, S.jsx)("span", {
284
- className: "nm h",
285
- children: "Agents at once"
286
- }),
287
- /* @__PURE__ */ (0, S.jsx)("div", {
288
- className: "rp-strip",
289
- role: "img",
290
- "aria-label": `Agents working at once over the run, peak ${i}; they worked ${g(t)} of ${g(e.duration)}`,
291
- children: r.map((t, n) => /* @__PURE__ */ (0, S.jsx)("i", {
292
- className: t ? void 0 : "idle",
293
- title: `${p(n * e.duration / r.length)}: ${t} working`,
294
- style: {
295
- left: `${n * 100 / r.length}%`,
296
- width: `${100 / r.length}%`,
297
- height: t ? `${Math.max(10, t / i * 100)}%` : void 0
298
- }
299
- }, n))
300
- }),
301
- /* @__PURE__ */ (0, S.jsxs)("span", {
302
- className: "ct",
303
- children: ["peak ", i]
304
- }),
305
- /* @__PURE__ */ (0, S.jsx)("span", {}),
306
- /* @__PURE__ */ (0, S.jsxs)("div", {
307
- className: "rp-strip-ax",
308
- children: [
309
- /* @__PURE__ */ (0, S.jsx)("span", {
310
- className: "first",
311
- style: { left: 0 },
312
- children: p(0)
313
- }),
314
- u.map((e) => /* @__PURE__ */ (0, S.jsxs)("span", {
315
- className: e % 4 ? "ph-hide" : void 0,
316
- style: { left: a(e * 36e5) },
317
- children: [e, "h"]
318
- }, e)),
319
- /* @__PURE__ */ (0, S.jsx)("span", {
320
- className: "last",
321
- style: { left: "100%" },
322
- children: p(e.duration)
323
- })
324
- ]
325
- }),
326
- /* @__PURE__ */ (0, S.jsx)("span", {}),
327
- d.length > 0 && /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [/* @__PURE__ */ (0, S.jsxs)("div", {
328
- className: "rp-tries-h",
329
- children: [/* @__PURE__ */ (0, S.jsx)("b", { children: "Restarts by agent" }), /* @__PURE__ */ (0, S.jsxs)("span", {
330
- className: "end rp-keys",
331
- children: [/* @__PURE__ */ (0, S.jsxs)("span", {
332
- className: "rp-key",
333
- children: [/* @__PURE__ */ (0, S.jsx)("span", {
334
- className: "x",
335
- children: "✕"
336
- }), "Restart"]
337
- }), /* @__PURE__ */ (0, S.jsxs)("span", {
338
- className: "rp-key",
339
- children: [/* @__PURE__ */ (0, S.jsx)("span", { className: "rp-dot ok" }), "Finished"]
340
- })]
341
- })]
342
- }), d.map((t) => /* @__PURE__ */ (0, S.jsx)(A, {
343
- m: e,
344
- a: t,
345
- X: a
346
- }, t.id))] })
347
- ]
348
- })
349
- })]
350
- });
351
- }
352
- function A({ m: e, a: t, X: n }) {
353
- let r = d(() => /* @__PURE__ */ (0, S.jsx)(m, {
354
- m: e,
355
- a: t
356
- }), { wide: t.tools.length > 0 });
357
- return /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [
358
- /* @__PURE__ */ (0, S.jsx)("span", {
359
- className: "nm",
360
- title: t.name,
361
- children: t.name
362
- }),
363
- /* @__PURE__ */ (0, S.jsxs)("div", {
364
- className: "rp-tr-row",
365
- tabIndex: 0,
366
- "aria-label": `${t.name}: ${t.restarts.length} restarts`,
367
- ...r,
368
- children: [
369
- /* @__PURE__ */ (0, S.jsx)("span", {
370
- className: "life",
371
- style: {
372
- left: n(Math.max(0, t.start ?? 0)),
373
- right: `calc(100% - ${n(t.end ?? e.duration)})`
374
- }
375
- }),
376
- t.restarts.map((e, t) => /* @__PURE__ */ (0, S.jsx)("span", {
377
- className: "mk",
378
- style: { left: n(e) },
379
- children: "✕"
380
- }, t)),
381
- s(t.state.tone) && t.end !== null && /* @__PURE__ */ (0, S.jsx)("span", {
382
- className: "mk ok",
383
- style: { left: n(t.end) }
384
- })
385
- ]
386
- }),
387
- /* @__PURE__ */ (0, S.jsx)("span", {
388
- className: "ct",
389
- children: t.restarts.length || "—"
390
- })
391
- ] });
392
- }
393
- function j({ m: e, route: t, doc: n }) {
394
- let r = (0, x.useMemo)(() => [...e.agents].sort((e, t) => (t.tokens ?? -1) - (e.tokens ?? -1)), [e]), i = (0, x.useRef)(null), a = c(i, r.length, 32), o = e.totals.lastStep ?? e.duration, s = (0, x.useMemo)(() => {
395
- let t = 1;
396
- for (let n of e.agents) {
397
- let e = Array(28).fill(0);
398
- for (let t of n.steps) t.t <= o && e[Math.min(27, Math.floor(t.t / Math.max(1, o) * 28))]++;
399
- t = Math.max(t, ...e);
400
- }
401
- return t;
402
- }, [e, o]);
403
- return /* @__PURE__ */ (0, S.jsxs)("section", {
404
- className: "rp-card",
405
- "aria-label": "Agents",
406
- children: [
407
- /* @__PURE__ */ (0, S.jsxs)("div", {
408
- className: "rp-hd sm",
409
- children: [/* @__PURE__ */ (0, S.jsxs)("h2", { children: ["Agents", /* @__PURE__ */ (0, S.jsx)("span", {
410
- className: "ct",
411
- children: e.agents.length
412
- })] }), /* @__PURE__ */ (0, S.jsx)("span", {
413
- className: "end",
414
- children: /* @__PURE__ */ (0, S.jsxs)("a", {
415
- className: "rp-btn sm",
416
- href: t.href("topology"),
417
- children: ["Topology", /* @__PURE__ */ (0, S.jsx)(l, {
418
- name: "arrow",
419
- size: 14
420
- })]
421
- })
422
- })]
423
- }),
424
- /* @__PURE__ */ (0, S.jsxs)("div", {
425
- className: "rp-agt-h",
426
- children: [
427
- /* @__PURE__ */ (0, S.jsx)("span", {}),
428
- /* @__PURE__ */ (0, S.jsx)("span", { children: "Agent" }),
429
- /* @__PURE__ */ (0, S.jsxs)("span", {
430
- className: "ph-hide",
431
- title: `When each agent worked, over the run's ${g(o)}`,
432
- children: ["Activity · ", g(o).split(" ")[0]]
433
- }),
434
- /* @__PURE__ */ (0, S.jsx)("span", { children: "Steps" }),
435
- /* @__PURE__ */ (0, S.jsx)("span", { children: "Tokens" })
436
- ]
437
- }),
438
- /* @__PURE__ */ (0, S.jsxs)("div", {
439
- className: "rp-scroll",
440
- ref: i,
441
- children: [
442
- /* @__PURE__ */ (0, S.jsx)("div", { style: { height: a.before } }),
443
- r.slice(a.first, a.last).map((r) => /* @__PURE__ */ (0, S.jsx)(M, {
444
- m: e,
445
- a: r,
446
- bins: 28,
447
- end: o,
448
- peak: s,
449
- href: t.href("timeline", { agent: b(n.run.id, r.id) })
450
- }, r.id)),
451
- /* @__PURE__ */ (0, S.jsx)("div", { style: { height: a.after } })
452
- ]
453
- })
454
- ]
455
- });
456
- }
457
- function M({ m: e, a: t, bins: n, end: r, peak: i, href: a }) {
458
- let s = d(() => /* @__PURE__ */ (0, S.jsx)(m, {
459
- m: e,
460
- a: t
461
- }), { wide: t.tools.length > 0 }), c = Array(n).fill(0);
462
- for (let e of t.steps) e.t <= r && c[Math.min(n - 1, Math.floor(e.t / Math.max(1, r) * n))]++;
463
- let l = 120 / n;
464
- return /* @__PURE__ */ (0, S.jsxs)("a", {
465
- className: "rp-agt",
466
- href: a,
467
- ...s,
468
- children: [
469
- /* @__PURE__ */ (0, S.jsx)(p, { tone: t.state.tone }),
470
- /* @__PURE__ */ (0, S.jsx)("span", {
471
- className: "nm",
472
- children: t.name
473
- }),
474
- /* @__PURE__ */ (0, S.jsxs)("svg", {
475
- className: "ph-hide",
476
- viewBox: "0 0 120 16",
477
- "aria-hidden": "true",
478
- children: [/* @__PURE__ */ (0, S.jsx)("line", {
479
- x1: "0",
480
- x2: "120",
481
- y1: "15.5",
482
- y2: "15.5",
483
- className: "base"
484
- }), c.map((e, t) => {
485
- let n = e ? 6 + Math.sqrt(e / i) * 10 : 0;
486
- return n ? /* @__PURE__ */ (0, S.jsx)("rect", {
487
- x: t * l + .5,
488
- width: l - 1.2,
489
- y: 16 - n,
490
- height: n,
491
- rx: "1"
492
- }, t) : null;
493
- })]
494
- }),
495
- /* @__PURE__ */ (0, S.jsx)("span", {
496
- className: "v",
497
- children: t.steps.length ? o(t.steps.length) : "—"
498
- }),
499
- /* @__PURE__ */ (0, S.jsx)("span", {
500
- className: "v",
501
- children: t.tokens === null ? "—" : h(t.tokens)
502
- })
503
- ]
504
- });
505
- }
506
- //#endregion
507
- export { E as Overview, C as clause };