@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.
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 +9 -9
  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
@@ -1,113 +0,0 @@
1
- import { S as e, n as t, s as n } from "./ui-CEhDqce8.js";
2
- import { clause as r } from "./Overview-BaXPdCFC.js";
3
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
- //#region src/workspace/run/Checks.tsx
5
- function s({ m: s, doc: c }) {
6
- let l = c.run.check, u = l?.latest, d = u ? u.solved ? "Passed" : u.known ? "Failed" : "No verdict" : "Not checked", f = l?.checkerNames?.find((e) => e.current) ?? l?.checkerNames?.[0], p = s.tree.filter((e) => (e.commits ?? 0) > 0).sort((e, t) => (t.commits ?? 0) - (e.commits ?? 0)), m = Math.max(1, ...p.map((e) => e.commits ?? 0));
7
- return /* @__PURE__ */ o("div", {
8
- className: "rp-ck",
9
- children: [/* @__PURE__ */ a("section", {
10
- className: "rp-card",
11
- "aria-label": "Checks",
12
- children: /* @__PURE__ */ o("div", {
13
- className: "rp-scroll rp-ck-in",
14
- children: [
15
- /* @__PURE__ */ o("h2", {
16
- className: "rp-ck-h",
17
- children: [/* @__PURE__ */ a(n, { tone: d === "Passed" ? "ok" : d === "Failed" ? "fail" : "none" }), d]
18
- }),
19
- /* @__PURE__ */ o("dl", {
20
- className: "rp-facts",
21
- children: [
22
- /* @__PURE__ */ a("dt", { children: "Checks" }),
23
- /* @__PURE__ */ o("dd", { children: [
24
- e(l?.counts?.checks ?? 0),
25
- " run · ",
26
- e(l?.counts?.known ?? 0),
27
- " with a verdict",
28
- /* @__PURE__ */ a("span", {
29
- className: "sub",
30
- children: l?.counts?.solved ? `${l.counts.solved} passed` : "none passed"
31
- })
32
- ] }),
33
- /* @__PURE__ */ a("dt", { children: "Latest" }),
34
- /* @__PURE__ */ o("dd", { children: [u?.line ? r(u.line, 24) : "—", /* @__PURE__ */ o("span", {
35
- className: "sub",
36
- children: [u?.at ? `${u.at.slice(0, 10)} ${u.at.slice(11, 16)} UTC` : "", u?.tag ? ` · ${u.tag}` : ""]
37
- })] }),
38
- /* @__PURE__ */ a("dt", { children: "Checker" }),
39
- /* @__PURE__ */ o("dd", { children: [f ? `${f.label}${f.ruling ? ` · ${f.ruling}` : ""}` : "not recorded", /* @__PURE__ */ a("span", {
40
- className: "sub",
41
- children: l?.calibration?.state ? `${l.calibration.state}${l.calibration.stages?.length ? `: ${l.calibration.stages.map((e) => `${e.name} ${e.state}`).join(", ")}` : ""}` : "calibration not recorded"
42
- })] }),
43
- /* @__PURE__ */ a("dt", { children: "Releases" }),
44
- /* @__PURE__ */ a("dd", { children: s.releases.length ? `${s.releases.length} · best ${s.best?.release ?? "none"}` : "None tagged" })
45
- ]
46
- }),
47
- s.releases.length > 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("h3", {
48
- className: "rp-subh",
49
- children: "Releases"
50
- }), /* @__PURE__ */ a("ol", {
51
- className: "rp-rel",
52
- children: [...s.releases].reverse().map((e) => /* @__PURE__ */ o("li", { children: [
53
- /* @__PURE__ */ a("b", { children: e.release }),
54
- /* @__PURE__ */ a("span", {
55
- className: "score",
56
- children: e.total ? `${e.passed ?? 0}/${e.total}` : "not scored"
57
- }),
58
- /* @__PURE__ */ a("span", {
59
- className: "steps",
60
- children: (e.steps ?? []).map((e, t) => /* @__PURE__ */ a("i", {
61
- className: e.state,
62
- title: `${e.label}: ${e.state}`
63
- }, t))
64
- }),
65
- /* @__PURE__ */ a("span", {
66
- className: "when",
67
- children: e.taggedAt ? `${e.taggedAt.slice(5, 10)} ${e.taggedAt.slice(11, 16)}` : "—"
68
- }),
69
- e.sentence && /* @__PURE__ */ a("span", {
70
- className: "sub",
71
- children: r(e.sentence, 20)
72
- })
73
- ] }, e.release))
74
- })] })
75
- ]
76
- })
77
- }), /* @__PURE__ */ o("section", {
78
- className: "rp-card",
79
- "aria-label": "Commits by agent",
80
- children: [/* @__PURE__ */ a("div", {
81
- className: "rp-hd sm",
82
- children: /* @__PURE__ */ o("h2", { children: ["Commits by agent", /* @__PURE__ */ a("span", {
83
- className: "ct",
84
- children: e(p.reduce((e, t) => e + (t.commits ?? 0), 0))
85
- })] })
86
- }), /* @__PURE__ */ a("div", {
87
- className: "rp-scroll rp-commits",
88
- children: p.length ? p.map((e) => /* @__PURE__ */ o("div", {
89
- className: "row",
90
- children: [
91
- /* @__PURE__ */ o("span", {
92
- className: "l",
93
- children: [/* @__PURE__ */ a(n, { tone: e.state.tone }), e.name]
94
- }),
95
- /* @__PURE__ */ a(t, {
96
- ok: e.commits ?? 0,
97
- max: m
98
- }),
99
- /* @__PURE__ */ a("span", {
100
- className: "n",
101
- children: e.commits
102
- })
103
- ]
104
- }, e.id)) : /* @__PURE__ */ a("p", {
105
- className: "ws-status",
106
- children: "No agent's commits reached the run's deliverables."
107
- })
108
- })]
109
- })]
110
- });
111
- }
112
- //#endregion
113
- export { s as Checks };
@@ -1,190 +0,0 @@
1
- import { useEffect as e, useMemo as t, useState as n } from "react";
2
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
- import { TraceWorkspace as a } from "@tangle-network/sandbox-ui/run";
4
- import { AgentGraph as o } from "@tangle-network/sandbox-ui/workflows";
5
- //#region src/workspace/LiveRun.tsx
6
- var s = (e) => {
7
- let t = e ? Date.parse(e) : NaN;
8
- return Number.isFinite(t) ? t : void 0;
9
- }, c = (...e) => e.every((e) => e && e.usdKnown !== !1) ? e.reduce((e, t) => e + (t?.usd ?? 0), 0) : void 0, l = (e) => e === "running" ? "running" : e === "done" ? "succeeded" : e === "down" ? "failed" : e === "cancelled" ? "stopped" : "unknown";
10
- function u({ api: u }) {
11
- let [d, f] = n([]), [p, m] = n(null), [h, g] = n(!1), [_, v] = n(""), [y, b] = n(0), [x, S] = n(), [C, w] = n("tree");
12
- e(() => {
13
- let e = new EventSource(`${u}/events`);
14
- return e.addEventListener("snapshot", (e) => {
15
- try {
16
- let t = JSON.parse(e.data);
17
- if (!Array.isArray(t.snapshots)) throw Error("Invalid snapshot stream");
18
- f((e) => {
19
- let n = new Map((t.reset ? [] : e).map((e) => [e.root, e]));
20
- for (let e of t.snapshots) n.set(e.root, e);
21
- return [...n.values()];
22
- }), b(t.sequence), m(null), g(!0);
23
- } catch (e) {
24
- m(String(e));
25
- }
26
- }), e.addEventListener("unavailable", () => m("The run snapshot is unavailable")), e.onerror = () => g(!1), () => e.close();
27
- }, [u]);
28
- let T = d.flatMap((e, t) => e.supervisors.map((n) => ({
29
- snapshot: e,
30
- root: t,
31
- run: n,
32
- key: JSON.stringify([e.root, n.id])
33
- }))), E = T.find((e) => e.key === _) ?? T[0], D = E?.snapshot.pursuit?.nodes.filter((e) => e.runId === E.run.id) ?? [], O = (e) => {
34
- let t = D.find((t) => t.id === e);
35
- return [t?.model, t?.backend].filter(Boolean).join(" · ") || void 0;
36
- }, k = E ? Math.min(...[E.run.startedAt, ...E.run.workers.map((e) => e.startedAt)].flatMap((e) => e && Number.isFinite(Date.parse(e)) ? [Date.parse(e)] : [])) : void 0, A = t(() => {
37
- let e = E?.run, t = E?.snapshot.generatedAt ?? Date.now(), n = k !== void 0 && Number.isFinite(k) ? k : t, r = (e?.workers ?? []).flatMap((e) => {
38
- if (!e.startedAt || !Number.isFinite(Date.parse(e.startedAt))) return [];
39
- let r = Math.max(0, Date.parse(e.startedAt) - n), i = s(e.endedAt) ?? (e.status === "running" ? t : Date.parse(e.startedAt)), a = c(e.spend, e.metered);
40
- return [{
41
- id: e.id,
42
- ...e.parent ? { parentId: e.parent } : {},
43
- name: e.label,
44
- kind: "pipeline",
45
- startMs: r,
46
- endMs: Math.max(r, i - n),
47
- status: e.status === "running" ? "running" : e.status === "down" ? "failed" : "done",
48
- ...a === void 0 ? {} : { costUsd: a },
49
- ...O(e.id) ? { detail: O(e.id) } : {},
50
- ...e.status === "cancelled" ? { outcome: {
51
- tone: "neutral",
52
- label: "Cancelled"
53
- } } : {}
54
- }];
55
- });
56
- return e?.startedAt && e.status !== "unobserved" && !r.some((t) => t.id === e.id) && r.unshift({
57
- id: e.id,
58
- name: "root",
59
- kind: "pipeline",
60
- detail: O(e.id),
61
- startMs: Math.max(0, Date.parse(e.startedAt) - n),
62
- endMs: Math.max(0, Date.parse(e.completedAt ?? new Date(t).toISOString()) - n),
63
- status: e.status === "running" ? "running" : e.status === "down" ? "failed" : "done",
64
- ...c(e.driverSpend) === void 0 ? {} : { costUsd: c(e.driverSpend) },
65
- ...e.status === "cancelled" ? { outcome: {
66
- tone: "neutral",
67
- label: "Cancelled"
68
- } } : {}
69
- }), {
70
- spans: r,
71
- totalMs: Math.max(0, ...r.map((e) => e.endMs)),
72
- promptTokens: 0,
73
- completionTokens: 0,
74
- modelCalls: 0,
75
- toolCalls: 0,
76
- errors: r.filter((e) => e.status === "failed").length
77
- };
78
- }, [
79
- E?.snapshot,
80
- E?.run,
81
- k
82
- ]), j = E?.run, M = j?.workers.filter((e) => e.id !== j.id) ?? [], N = j ? [{
83
- id: j.id,
84
- label: "root",
85
- status: l(j.status),
86
- model: O(j.id),
87
- costUsd: c(j.driverSpend),
88
- startedAt: s(j.startedAt),
89
- result: j.status === "cancelled" ? "Cancelled" : void 0
90
- }, ...M.map((e) => ({
91
- id: e.id,
92
- label: e.label,
93
- harness: e.runtime,
94
- model: O(e.id),
95
- status: l(e.status),
96
- costUsd: c(e.spend, e.metered),
97
- startedAt: s(e.startedAt),
98
- turn: e.liveTail?.at(-1),
99
- events: e.liveTail?.slice(-3).map((t, n) => ({
100
- id: `${e.id}:${n}:${t}`,
101
- label: t
102
- })),
103
- result: e.status === "cancelled" ? "Cancelled" : e.verdict
104
- }))] : [], P = new Set(N.map((e) => e.id)), F = M.map((e) => ({
105
- from: e.parent && e.parent !== e.id && P.has(e.parent) ? e.parent : j.id,
106
- to: e.id,
107
- kind: "spawn"
108
- })), I = Object.fromEntries([...(E?.run.workers ?? []).filter((e) => e.status === "cancelled").map((e) => [e.id, {
109
- status: "stopped",
110
- result: "Cancelled"
111
- }]), ...E?.run.status === "cancelled" ? [[E.run.id, {
112
- status: "stopped",
113
- result: "Cancelled"
114
- }]] : []]);
115
- return /* @__PURE__ */ i("main", {
116
- className: "ws-live",
117
- "data-top-sequence": y,
118
- children: [
119
- /* @__PURE__ */ i("header", { children: [
120
- /* @__PURE__ */ r("h1", { children: "Live agents" }),
121
- /* @__PURE__ */ i("label", { children: ["Run", /* @__PURE__ */ r("select", {
122
- "aria-label": "Run",
123
- value: E?.key ?? "",
124
- onChange: (e) => {
125
- v(e.target.value), S(void 0);
126
- },
127
- children: T.map((e) => /* @__PURE__ */ r("option", {
128
- value: e.key,
129
- children: e.run.id
130
- }, e.key))
131
- })] }),
132
- /* @__PURE__ */ r("span", {
133
- role: "status",
134
- children: h ? "● Connected" : d.length ? "○ Reconnecting" : "Connecting…"
135
- })
136
- ] }),
137
- E?.run.task && E.run.task !== E.run.id && /* @__PURE__ */ r("p", { children: E.run.task }),
138
- p && /* @__PURE__ */ r("p", {
139
- role: "alert",
140
- children: p
141
- }),
142
- E?.snapshot.completeness === "partial" && /* @__PURE__ */ i("p", {
143
- role: "alert",
144
- children: ["Partial capture: ", E.snapshot.diagnostics.map((e) => `${e.source}: ${e.reason}`).join(" · ")]
145
- }),
146
- E ? /* @__PURE__ */ i("div", {
147
- className: "ws-live-split",
148
- children: [/* @__PURE__ */ i("section", {
149
- "aria-label": "Agent graph",
150
- children: [/* @__PURE__ */ r("div", {
151
- role: "group",
152
- "aria-label": "Graph layout",
153
- children: ["tree", "hub"].map((e) => /* @__PURE__ */ r("button", {
154
- type: "button",
155
- "aria-pressed": C === e,
156
- onClick: () => w(e),
157
- children: e
158
- }, e))
159
- }), /* @__PURE__ */ r(o, {
160
- nodes: N,
161
- edges: F,
162
- layout: C,
163
- live: N.some((e) => e.status === "running"),
164
- selectedId: x ?? null,
165
- onSelect: S,
166
- title: E.run.id,
167
- className: "ws-live-graph"
168
- }, E.key)]
169
- }), /* @__PURE__ */ r(a, {
170
- trace: A,
171
- label: E.run.id,
172
- selectedAgentId: x,
173
- onSelectAgent: S,
174
- live: E.run.status === "running" || E.run.workers.some((e) => e.status === "running"),
175
- startedAt: Number.isFinite(k) ? k : void 0,
176
- agentCards: I,
177
- summary: !1,
178
- defaultView: "agents",
179
- maxHeight: 650,
180
- streamUrl: (e) => `${u}/agents/${E.root}/${encodeURIComponent(E.run.id)}/${encodeURIComponent(e)}/stream`
181
- }, E.key)]
182
- }) : h && /* @__PURE__ */ r("p", {
183
- role: "status",
184
- children: "No recorded agents in these roots."
185
- })
186
- ]
187
- });
188
- }
189
- //#endregion
190
- export { u as LiveRun };