@tangle-network/sandbox-ui 6.0.0 → 6.0.1

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/index.js CHANGED
@@ -15,7 +15,7 @@ import { n as FileBreadcrumb, t as CodeView } from "./code-view-BlhCS1SD.js";
15
15
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
16
16
  import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
17
17
  import { S as ReasoningLevelPicker, _ as modelProvider, a as ChatMessage, b as DEFAULT_REASONING_LEVEL_OPTIONS, c as SpeakerHeader, d as UserMessage, f as agentTimelineStepKind, g as ArtifactAgentDock, h as partitionBySpeaker, i as ChatContainer, l as TRANSCRIPT_TEXT, m as isViewerMessage, n as AgentTimelineColumn, o as MessageAuthor, p as foldSummary, r as AgentTimelineStep, s as MessageList, t as AgentTimeline, u as ThinkingIndicator, v as snapHarnessToModel, x as HARNESS_REASONING_OPTIONS, y as AgentProfilePicker } from "./chat-BrlLa4rg.js";
18
- import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-CTMV8zw_.js";
18
+ import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-Cfil2Ma9.js";
19
19
  import { S as model_exports, i as ToolStep, r as PromptMore, s as timelineItems, w as recordFlowTrace, y as indexRecord } from "./use-follow-tail-DZFn7QDO.js";
20
20
  import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
21
21
  import { t as withPrompts } from "./record-C-EUpK-n.js";
package/dist/run/live.js CHANGED
@@ -1,21 +1,24 @@
1
1
  import { t as WorkspaceFilesPane } from "../workspace-files-pane-D24G7H_Z.js";
2
2
  import { t as DiffView } from "../diff-view-B9mNeTLF.js";
3
3
  import { t as CodeView } from "../code-view-BlhCS1SD.js";
4
- import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-CTMV8zw_.js";
4
+ import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-Cfil2Ma9.js";
5
5
  import { useDocument } from "../hooks/use-document.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
8
8
  import { isOpen, runStatus } from "@tangle-network/ui/run/status-meta";
9
9
  // src/run/live-inspection.tsx
10
- /** The graph, conversation and files share one selected agent and one product-owned API. */
11
- function useLiveInspection(url, live, fetcher) {
12
- const inventory = useDocument(url ?? null, live ? 3e3 : void 0, false, fetcher);
10
+ /** The graph, conversation and files share one selected agent and one product-owned API. The inspection refetches
11
+ * when the agent's own activity moves (`activity`, its lastActivityAt from the snapshot) with a slow fallback poll —
12
+ * not a fixed 3 s tick for an agent that may think for minutes (#525). */
13
+ function useLiveInspection(url, live, fetcher, activity) {
14
+ const gate = url ? `${url}${url.includes("?") ? "&" : "?"}activity=${activity ?? "quiet"}` : null;
15
+ const inventory = useDocument(gate, live ? 3e4 : void 0, false, fetcher);
13
16
  const [selected, select] = useState();
14
17
  const [download, setDownload] = useState();
15
18
  const files = inventory.error ? [] : inventory.data?.files?.entries ?? [];
16
19
  const entry = files.find((file) => file.path === selected) ?? files[0];
17
20
  const fileUrl = entry && url ? `${url}/file?path=${encodeURIComponent(entry.path)}` : null;
18
- const content = useDocument(fileUrl, live ? 3e3 : void 0, false, fetcher);
21
+ const content = useDocument(fileUrl ? `${fileUrl}&activity=${activity ?? "quiet"}` : null, live ? 3e4 : void 0, false, fetcher);
19
22
  const file = content.data?.file;
20
23
  const valid = !inventory.error && !content.error && file && entry && file.path === entry.path && file.sha256 === entry.sha256 && file.byteLength === entry.byteLength;
21
24
  const fileKey = valid ? `${entry.path}:${entry.sha256}` : void 0;
@@ -212,9 +215,9 @@ function LiveRunView({ api, transport }) {
212
215
  } : void 0, [active?.run, nodeIndex]);
213
216
  const receiptIndex = useMemo(() => new Map((run?.workers ?? []).map((worker) => [worker.id, worker])), [run]);
214
217
  const detail = useCallback((id) => {
215
- const node = nodeIndex.get(id), receipt = receiptIndex.get(id)?.materialization;
216
- return [node?.model ?? (receipt?.model?.status === "known" ? receipt.model.id : void 0), node?.backend ?? receipt?.backend].filter(Boolean).join(" · ") || void 0;
217
- }, [nodeIndex, receiptIndex]);
218
+ const receipt = receiptIndex.get(id)?.materialization;
219
+ return [receipt?.model?.status === "known" ? receipt.model.id : void 0, receipt?.backend].filter(Boolean).join(" · ") || void 0;
220
+ }, [receiptIndex]);
218
221
  const outcome = run?.outcome;
219
222
  const outcomeText = outcome ? outcome.kind === "winner" ? "Winner" : `${outcome.kind === "no-winner" ? "No winner" : "Failed"}: ${outcome.reason}` : void 0;
220
223
  const startedAt = run ? Math.min(...[run.startedAt, ...run.workers.map((worker) => worker.startedAt)].flatMap((value) => value && Number.isFinite(Date.parse(value)) ? [Date.parse(value)] : [])) : void 0;
@@ -335,7 +338,7 @@ function LiveRunView({ api, transport }) {
335
338
  detail,
336
339
  outcomeText
337
340
  ]);
338
- const inspection = useLiveInspection(active && agent ? `${api}/agents/${active.root}/${encodeURIComponent(active.run.id)}/${encodeURIComponent(agent)}` : void 0, !!run && isOpen(run.status), transport?.fetch);
341
+ const inspection = useLiveInspection(active && agent ? `${api}/agents/${active.root}/${encodeURIComponent(active.run.id)}/${encodeURIComponent(agent)}` : void 0, !!run && isOpen(run.status), transport?.fetch, run?.workers.find((worker) => worker.id === agent)?.lastActivityAt);
339
342
  return /* @__PURE__ */ jsxs("main", {
340
343
  className: "ws-live",
341
344
  "data-api": api,
package/dist/run.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as VirtualList } from "./VirtualList-DcSGbEtA.js";
2
- import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-CTMV8zw_.js";
2
+ import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-Cfil2Ma9.js";
3
3
  import { S as model_exports, i as ToolStep, r as PromptMore, s as timelineItems, w as recordFlowTrace, y as indexRecord } from "./use-follow-tail-DZFn7QDO.js";
4
4
  import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
5
5
  import { t as withPrompts } from "./record-C-EUpK-n.js";
@@ -43,6 +43,40 @@ function TraceWaterfall({ renderIcon = traceSpanMark, ...props }) {
43
43
  }
44
44
  // src/run/agent-stream.ts
45
45
  const textOf = (value) => value == null ? void 0 : typeof value === "string" ? value : JSON.stringify(value);
46
+ /** A native harness row (live-stream evidence and retained captures: `{ type, data }`) as a producer event, so
47
+ * non-root agents render: the wall's transcript pages and per-agent streams serve these rows verbatim, and before
48
+ * this adapter every one of them was dropped by the fold — a live child agent showed nothing at all. Text and
49
+ * reasoning parts (opencode `raw` events and the SDK's `message.part.updated`) become deltas; a `message.updated`
50
+ * carrying a user role becomes the user's words. Native tool shapes vary by harness and stay unrendered until a
51
+ * captured sample exists to map them honestly. */
52
+ function nativeEventOf(row) {
53
+ const data = row.data;
54
+ if (!data || typeof data !== "object") return void 0;
55
+ const wrapped = data.event;
56
+ const source = wrapped && (wrapped.type === "text" || wrapped.type === "reasoning" || wrapped.type === "message") ? wrapped : data;
57
+ const type = source.type;
58
+ const part = source.part;
59
+ if ((type === "text" || type === "message.part.updated") && part?.type === "text" && typeof part.text === "string") return {
60
+ kind: "text_delta",
61
+ text: part.text
62
+ };
63
+ if ((type === "reasoning" || type === "message.part.updated") && part?.type === "reasoning" && typeof part.text === "string") return {
64
+ kind: "reasoning_delta",
65
+ text: part.text
66
+ };
67
+ if (type === "text" && typeof source.text === "string") return {
68
+ kind: "text_delta",
69
+ text: source.text
70
+ };
71
+ const info = source.properties?.info ?? source.info;
72
+ if ((type === "message" || type === "message.updated") && info?.role === "user") {
73
+ const words = typeof info.content === "string" ? info.content : typeof info.text === "string" ? info.text : void 0;
74
+ if (words) return {
75
+ kind: "user",
76
+ text: words
77
+ };
78
+ }
79
+ }
46
80
  const failed = (value) => typeof value === "object" && value !== null && ("error" in value || value.is_error === true || value.isError === true);
47
81
  const recorded = (text) => {
48
82
  try {
@@ -67,7 +101,7 @@ const TOOL_TYPES = /* @__PURE__ */ new Set([
67
101
  function foldAgentRows(entries, rows) {
68
102
  const next = [...entries];
69
103
  for (const row of rows) {
70
- const event = row.event;
104
+ const event = row.event ?? nativeEventOf(row);
71
105
  if (!event) continue;
72
106
  const at = Date.parse(row.at ?? ""), scope = JSON.stringify([row.stream ?? null, row.attempt ?? null]);
73
107
  const base = {
@@ -41358,7 +41358,7 @@ function SB(e, t) {
41358
41358
  r
41359
41359
  ]);
41360
41360
  }
41361
- // dist/trace-workspace-CTMV8zw_.js
41361
+ // dist/trace-workspace-Cfil2Ma9.js
41362
41362
  function CB(e) {
41363
41363
  if (e.kind === "pipeline" || e.kind === "model") {
41364
41364
  let t = e.detail ? CP(e.detail) : null;
@@ -41381,14 +41381,40 @@ function wB({ renderIcon: e = CB, ...t }) {
41381
41381
  ...t
41382
41382
  });
41383
41383
  }
41384
- var TB = (e) => e == null ? void 0 : typeof e == "string" ? e : JSON.stringify(e), EB = (e) => typeof e == "object" && !!e && ("error" in e || e.is_error === !0 || e.isError === !0), DB = (e) => {
41384
+ var TB = (e) => e == null ? void 0 : typeof e == "string" ? e : JSON.stringify(e);
41385
+ function EB(e) {
41386
+ let t = e.data;
41387
+ if (!t || typeof t != "object") return;
41388
+ let n = t.event, r = n && (n.type === "text" || n.type === "reasoning" || n.type === "message") ? n : t, i = r.type, a = r.part;
41389
+ if ((i === "text" || i === "message.part.updated") && a?.type === "text" && typeof a.text == "string") return {
41390
+ kind: "text_delta",
41391
+ text: a.text
41392
+ };
41393
+ if ((i === "reasoning" || i === "message.part.updated") && a?.type === "reasoning" && typeof a.text == "string") return {
41394
+ kind: "reasoning_delta",
41395
+ text: a.text
41396
+ };
41397
+ if (i === "text" && typeof r.text == "string") return {
41398
+ kind: "text_delta",
41399
+ text: r.text
41400
+ };
41401
+ let o = r.properties?.info ?? r.info;
41402
+ if ((i === "message" || i === "message.updated") && o?.role === "user") {
41403
+ let e = typeof o.content == "string" ? o.content : typeof o.text == "string" ? o.text : void 0;
41404
+ if (e) return {
41405
+ kind: "user",
41406
+ text: e
41407
+ };
41408
+ }
41409
+ }
41410
+ var DB = (e) => typeof e == "object" && !!e && ("error" in e || e.is_error === !0 || e.isError === !0), OB = (e) => {
41385
41411
  try {
41386
41412
  let t = JSON.parse(e);
41387
41413
  return t && typeof t == "object" ? `\`\`\`json\n${e}\n\`\`\`` : e;
41388
41414
  } catch {
41389
41415
  return e;
41390
41416
  }
41391
- }, OB = /* @__PURE__ */ new Set([
41417
+ }, kB = /* @__PURE__ */ new Set([
41392
41418
  "bash",
41393
41419
  "read",
41394
41420
  "write",
@@ -41400,10 +41426,10 @@ var TB = (e) => e == null ? void 0 : typeof e == "string" ? e : JSON.stringify(e
41400
41426
  "inspect",
41401
41427
  "audit"
41402
41428
  ]);
41403
- function kB(e, t) {
41429
+ function AB(e, t) {
41404
41430
  let n = [...e];
41405
41431
  for (let e of t) {
41406
- let t = e.event;
41432
+ let t = e.event ?? EB(e);
41407
41433
  if (!t) continue;
41408
41434
  let r = Date.parse(e.at ?? ""), i = JSON.stringify([e.stream ?? null, e.attempt ?? null]), a = {
41409
41435
  id: t.id ?? `${i}:${e.seq}`,
@@ -41440,7 +41466,7 @@ function kB(e, t) {
41440
41466
  ...a,
41441
41467
  kind: "message",
41442
41468
  role: t.provenance === "delegated-input" ? "user" : "assistant",
41443
- content: DB(t.text),
41469
+ content: OB(t.text),
41444
41470
  sealed: !0
41445
41471
  }) : n.push({
41446
41472
  ...a,
@@ -41463,7 +41489,7 @@ function kB(e, t) {
41463
41489
  input: t.args,
41464
41490
  call: {
41465
41491
  id: i,
41466
- type: OB.has(r) ? r : "unknown",
41492
+ type: kB.has(r) ? r : "unknown",
41467
41493
  label: e,
41468
41494
  status: "running",
41469
41495
  detail: TB(t.args)
@@ -41474,7 +41500,7 @@ function kB(e, t) {
41474
41500
  costUsd: t.costUsd ?? c.costUsd,
41475
41501
  call: {
41476
41502
  ...c.call,
41477
- status: t.isError || EB(t.result) ? "error" : "success",
41503
+ status: t.isError || DB(t.result) ? "error" : "success",
41478
41504
  output: TB(t.result),
41479
41505
  ...t.durationMs === void 0 ? t.atBasis !== "carried" && Number.isFinite(r) && Number.isFinite(c.at) ? { duration: Math.max(0, r - c.at) } : {} : { duration: t.durationMs }
41480
41506
  }
@@ -41486,7 +41512,7 @@ function kB(e, t) {
41486
41512
  id: i,
41487
41513
  type: "unknown",
41488
41514
  label: t.toolName ?? "Tool result",
41489
- status: t.isError || EB(t.result) ? "error" : "success",
41515
+ status: t.isError || DB(t.result) ? "error" : "success",
41490
41516
  output: TB(t.result)
41491
41517
  }
41492
41518
  });
@@ -41498,7 +41524,7 @@ function kB(e, t) {
41498
41524
  }
41499
41525
  return n;
41500
41526
  }
41501
- var AB = (e, t) => ({
41527
+ var jB = (e, t) => ({
41502
41528
  identity: e,
41503
41529
  rows: [],
41504
41530
  entries: [],
@@ -41512,11 +41538,11 @@ var AB = (e, t) => ({
41512
41538
  more: !1,
41513
41539
  reading: !1
41514
41540
  });
41515
- function jB(e, t, n, r) {
41541
+ function MB(e, t, n, r) {
41516
41542
  if (!Array.isArray(t.events)) throw Error("Invalid agent rows stream");
41517
41543
  let i = n === "tail" || n === "head" || t.reset || t.generation !== void 0 && t.generation !== e.generation, a = i ? t.events : n === "before" ? [...t.events, ...e.rows] : [...e.rows, ...t.events], o = [...new Map(a.map((e) => [e.seq, e])).values()].sort((e, t) => e.seq - t.seq), s = o.length > 2e3;
41518
41544
  s && (o = e.reading ? o.slice(0, 2e3) : o.slice(-2e3));
41519
- let c = i ? t.firstSeq ?? o[0]?.seq ?? null : n === "before" ? t.firstSeq ?? e.first : s && !e.reading ? o[0]?.seq ?? e.first : e.first, l = i ? t.lastSeq ?? o.at(-1)?.seq ?? -1 : n === "before" ? e.lastSeq : t.lastSeq ?? o.at(-1)?.seq ?? e.lastSeq, u = i ? kB([], o) : n === "after" ? kB(e.entries, t.events) : kB([], o);
41545
+ let c = i ? t.firstSeq ?? o[0]?.seq ?? null : n === "before" ? t.firstSeq ?? e.first : s && !e.reading ? o[0]?.seq ?? e.first : e.first, l = i ? t.lastSeq ?? o.at(-1)?.seq ?? -1 : n === "before" ? e.lastSeq : t.lastSeq ?? o.at(-1)?.seq ?? e.lastSeq, u = i ? AB([], o) : n === "after" ? AB(e.entries, t.events) : AB([], o);
41520
41546
  return {
41521
41547
  ...e,
41522
41548
  rows: o,
@@ -41533,7 +41559,7 @@ function jB(e, t, n, r) {
41533
41559
  more: n === "before" ? e.more : r && !!t.hasMore
41534
41560
  };
41535
41561
  }
41536
- async function MB(e, t, n, r) {
41562
+ async function NB(e, t, n, r) {
41537
41563
  let i = new URL(e, location.href), a = t === "head" ? 200 : t === "after" ? n.lastSeq : t === "before" ? n.first : null;
41538
41564
  i.searchParams.set("limit", "200"), a !== null && a >= 0 && i.searchParams.set(t === "head" ? "before" : t, String(a)), n.generation !== void 0 && a !== null && i.searchParams.set("generation", String(n.generation));
41539
41565
  let o = await fetch(i, {
@@ -41543,8 +41569,8 @@ async function MB(e, t, n, r) {
41543
41569
  if (!o.ok) throw Error(`Transcript unavailable (HTTP ${o.status})`);
41544
41570
  return o.json();
41545
41571
  }
41546
- function NB(e, t) {
41547
- let n = e ? JSON.stringify([e, t?.url]) : void 0, [r, i] = (0, V.useState)(() => AB(n, t)), a = (0, V.useRef)(r), o = r.identity === n ? r : AB(n, t), [s, c] = (0, V.useState)(), [l, u] = (0, V.useState)(0), d = n !== void 0 && s === n, f = (0, V.useRef)(() => {}), p = (0, V.useRef)({
41572
+ function PB(e, t) {
41573
+ let n = e ? JSON.stringify([e, t?.url]) : void 0, [r, i] = (0, V.useState)(() => jB(n, t)), a = (0, V.useRef)(r), o = r.identity === n ? r : jB(n, t), [s, c] = (0, V.useState)(), [l, u] = (0, V.useState)(0), d = n !== void 0 && s === n, f = (0, V.useRef)(() => {}), p = (0, V.useRef)({
41548
41574
  identity: n,
41549
41575
  alive: t?.alive
41550
41576
  }), m = (e) => {
@@ -41555,19 +41581,19 @@ function NB(e, t) {
41555
41581
  if (p.current = {
41556
41582
  identity: n,
41557
41583
  alive: t?.alive
41558
- }, r || m(AB(n, t)), !e || !t) return;
41584
+ }, r || m(jB(n, t)), !e || !t) return;
41559
41585
  let i = new AbortController(), o = d || !t.alive && !r, s = !1, c = !1, l = async (e) => {
41560
41586
  if (s || c) return;
41561
41587
  c = !0;
41562
41588
  let n = a.current.lastSeq;
41563
41589
  try {
41564
- let r = await MB(t.url, e, a.current, i.signal);
41590
+ let r = await NB(t.url, e, a.current, i.signal);
41565
41591
  if (s) return;
41566
41592
  if (e === "head" && !r.events.length) {
41567
41593
  queueMicrotask(() => void l("tail"));
41568
41594
  return;
41569
41595
  }
41570
- m(jB(a.current, r, e, o)), !o && e !== "before" && !t.alive && r.hasMore && a.current.lastSeq !== n && queueMicrotask(() => void l("after"));
41596
+ m(MB(a.current, r, e, o)), !o && e !== "before" && !t.alive && r.hasMore && a.current.lastSeq !== n && queueMicrotask(() => void l("after"));
41571
41597
  } catch (e) {
41572
41598
  !s && !i.signal.aborted && m({
41573
41599
  ...a.current,
@@ -41601,8 +41627,8 @@ function NB(e, t) {
41601
41627
  pageReader: f
41602
41628
  };
41603
41629
  }
41604
- function PB(e, t, n) {
41605
- let { state: r, current: i, update: a, beginning: o, begin: s, reload: c, pageReader: l } = NB(e, n), u = (0, V.useCallback)(() => {
41630
+ function FB(e, t, n) {
41631
+ let { state: r, current: i, update: a, beginning: o, begin: s, reload: c, pageReader: l } = PB(e, n), u = (0, V.useCallback)(() => {
41606
41632
  let t = new URL(e, location.href);
41607
41633
  return i.current.generation !== void 0 && t.searchParams.set("generation", String(i.current.generation)), t.toString();
41608
41634
  }, [e]);
@@ -41618,7 +41644,7 @@ function PB(e, t, n) {
41618
41644
  events: {
41619
41645
  rows: (e) => {
41620
41646
  try {
41621
- a(jB(i.current, JSON.parse(e.data), "after", !1));
41647
+ a(MB(i.current, JSON.parse(e.data), "after", !1));
41622
41648
  } catch (e) {
41623
41649
  a({
41624
41650
  ...i.current,
@@ -41629,7 +41655,7 @@ function PB(e, t, n) {
41629
41655
  reset: (e) => {
41630
41656
  try {
41631
41657
  a({
41632
- ...AB(r.identity, n),
41658
+ ...jB(r.identity, n),
41633
41659
  generation: JSON.parse(e.data).generation,
41634
41660
  ready: !0,
41635
41661
  loading: !1
@@ -41656,7 +41682,7 @@ function PB(e, t, n) {
41656
41682
  });
41657
41683
  let d = r.entries, f = r.error;
41658
41684
  if (n?.projectRows) try {
41659
- d = kB([], n.projectRows(r.rows) ?? r.rows);
41685
+ d = AB([], n.projectRows(r.rows) ?? r.rows);
41660
41686
  } catch (e) {
41661
41687
  f = e instanceof Error ? e.message : String(e);
41662
41688
  }
@@ -41686,14 +41712,14 @@ function PB(e, t, n) {
41686
41712
  } } : {}
41687
41713
  };
41688
41714
  }
41689
- function FB(e, t) {
41715
+ function IB(e, t) {
41690
41716
  for (let n = e; n; n = n.parentId ? t.get(n.parentId) : void 0) if (n.kind === "pipeline") return n;
41691
41717
  }
41692
- function IB(e, t, n, i, a, s = []) {
41718
+ function LB(e, t, n, i, a, s = []) {
41693
41719
  let c = [], l = [], u = /* @__PURE__ */ new Set(), d = new Set(e.flatMap((e) => e.kind === "pipeline" && e.id ? [e.id] : [])), f = /* @__PURE__ */ new Map();
41694
41720
  for (let [r, a] of e.entries()) {
41695
41721
  if (a.kind === "pipeline" || n !== null && a.startMs > n) continue;
41696
- let e = FB(a, t);
41722
+ let e = IB(a, t);
41697
41723
  if (!e?.id) continue;
41698
41724
  let o = f.get(e.id) ?? [], s = [{
41699
41725
  suffix: "start",
@@ -41735,7 +41761,7 @@ function IB(e, t, n, i, a, s = []) {
41735
41761
  commits: n === null ? e?.commits : void 0,
41736
41762
  tokens: n === null ? e?.tokens : void 0
41737
41763
  });
41738
- let g = s.parentId ? t.get(s.parentId) : void 0, _ = g && FB(g, t);
41764
+ let g = s.parentId ? t.get(s.parentId) : void 0, _ = g && IB(g, t);
41739
41765
  _?.id && l.push({
41740
41766
  from: _.id,
41741
41767
  to: s.id,
@@ -41763,10 +41789,10 @@ function IB(e, t, n, i, a, s = []) {
41763
41789
  edges: l
41764
41790
  };
41765
41791
  }
41766
- function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChange: i, files: a, scoreboard: o, selectedAgentId: c, conversationOpen: l, onSelectAgent: u, renderAgentDrawer: d, docked: f, commission: p, agentCards: h, agentGraph: g, className: _, ...v }) {
41792
+ function RB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChange: i, files: a, scoreboard: o, selectedAgentId: c, conversationOpen: l, onSelectAgent: u, renderAgentDrawer: d, docked: f, commission: p, agentCards: h, agentGraph: g, className: _, ...v }) {
41767
41793
  let y = (0, V.useMemo)(() => new Map(e.spans.flatMap((e) => e.id ? [[e.id, e]] : [])), [e]), [b, S] = (0, V.useState)(), C = c ?? b, w = (e) => {
41768
41794
  S(e), u?.(e);
41769
- }, T = C ? y.get(C) : void 0, E = C ? h?.[C] : void 0, D = T?.id ?? (E ? C : void 0), O = T?.name ?? E?.label ?? D, k = T?.detail ?? E?.model, A = !!D && l !== !1, ee = A && D ? d?.(D) : void 0, { defaultLayout: j = "tree", ...te } = g ?? {}, [M, P] = (0, V.useState)(j), [F, ne] = (0, V.useState)(null), re = PB(C && t ? t(C) : void 0, n), ie = (0, V.useMemo)(() => {
41795
+ }, T = C ? y.get(C) : void 0, E = C ? h?.[C] : void 0, D = T?.id ?? (E ? C : void 0), O = T?.name ?? E?.label ?? D, k = T?.detail ?? E?.model, A = !!D && l !== !1, ee = A && D ? d?.(D) : void 0, { defaultLayout: j = "tree", ...te } = g ?? {}, [M, P] = (0, V.useState)(j), [F, ne] = (0, V.useState)(null), re = FB(C && t ? t(C) : void 0, n), ie = (0, V.useMemo)(() => {
41770
41796
  if (v.startedAt !== void 0) return v.startedAt;
41771
41797
  let e = re.entries[0]?.at;
41772
41798
  return T && e !== void 0 ? e - T.startMs : void 0;
@@ -41774,7 +41800,7 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
41774
41800
  v.startedAt,
41775
41801
  T,
41776
41802
  re.entries
41777
- ]), ae = (0, V.useMemo)(() => IB(e.spans, y, F, v.startedAt, h, g?.edges), [
41803
+ ]), ae = (0, V.useMemo)(() => LB(e.spans, y, F, v.startedAt, h, g?.edges), [
41778
41804
  e,
41779
41805
  y,
41780
41806
  F,
@@ -41799,7 +41825,7 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
41799
41825
  selectedId: D,
41800
41826
  onDeselect: () => w(void 0),
41801
41827
  onSelect: (e) => {
41802
- let t = FB(e, y);
41828
+ let t = IB(e, y);
41803
41829
  t?.id && w(t.id);
41804
41830
  },
41805
41831
  onTimeChange: (e) => {
@@ -41959,8 +41985,8 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
41959
41985
  });
41960
41986
  }
41961
41987
  // dist/hooks/use-document.js
41962
- var RB = 2500, zB = 6, BB = 4;
41963
- function VB(e, t, n = !1, r = globalThis.fetch) {
41988
+ var zB = 2500, BB = 6, VB = 4;
41989
+ function HB(e, t, n = !1, r = globalThis.fetch) {
41964
41990
  let [i, a] = (0, V.useState)({
41965
41991
  url: e,
41966
41992
  fetcher: r,
@@ -42039,13 +42065,13 @@ function VB(e, t, n = !1, r = globalThis.fetch) {
42039
42065
  failing: n
42040
42066
  });
42041
42067
  } catch (e) {
42042
- c && !m.signal.aborted && f < BB ? p = !0 : c && !m.signal.aborted && a((t) => ({
42068
+ c && !m.signal.aborted && f < VB ? p = !0 : c && !m.signal.aborted && a((t) => ({
42043
42069
  ...t,
42044
42070
  loading: !1,
42045
42071
  error: e instanceof Error ? e.message : "Request failed"
42046
42072
  }));
42047
42073
  } finally {
42048
- c && p ? (l = window.setTimeout(h, 1e3 * 2 ** f), f += 1) : c && u && d < zB ? (l = window.setTimeout(h, RB * 1.5 ** d), d += 1) : c && t && (l = window.setTimeout(h, t));
42074
+ c && p ? (l = window.setTimeout(h, 1e3 * 2 ** f), f += 1) : c && u && d < BB ? (l = window.setTimeout(h, zB * 1.5 ** d), d += 1) : c && t && (l = window.setTimeout(h, t));
42049
42075
  }
42050
42076
  };
42051
42077
  return h(), () => {
@@ -42062,68 +42088,68 @@ function VB(e, t, n = !1, r = globalThis.fetch) {
42062
42088
  };
42063
42089
  }
42064
42090
  // dist/run/live.js
42065
- function HB(e, t, n) {
42066
- let r = VB(e ?? null, t ? 3e3 : void 0, !1, n), [i, a] = (0, V.useState)(), [o, s] = (0, V.useState)(), c = r.error ? [] : r.data?.files?.entries ?? [], l = c.find((e) => e.path === i) ?? c[0], u = VB(l && e ? `${e}/file?path=${encodeURIComponent(l.path)}` : null, t ? 3e3 : void 0, !1, n), d = u.data?.file, f = !r.error && !u.error && d && l && d.path === l.path && d.sha256 === l.sha256 && d.byteLength === l.byteLength, p = f ? `${l.path}:${l.sha256}` : void 0;
42091
+ function UB(e, t, n, r) {
42092
+ let i = HB(e ? `${e}${e.includes("?") ? "&" : "?"}activity=${r ?? "quiet"}` : null, t ? 3e4 : void 0, !1, n), [a, o] = (0, V.useState)(), [s, c] = (0, V.useState)(), l = i.error ? [] : i.data?.files?.entries ?? [], u = l.find((e) => e.path === a) ?? l[0], d = u && e ? `${e}/file?path=${encodeURIComponent(u.path)}` : null, f = HB(d ? `${d}&activity=${r ?? "quiet"}` : null, t ? 3e4 : void 0, !1, n), p = f.data?.file, m = !i.error && !f.error && p && u && p.path === u.path && p.sha256 === u.sha256 && p.byteLength === u.byteLength, h = m ? `${u.path}:${u.sha256}` : void 0;
42067
42093
  (0, V.useEffect)(() => {
42068
- if (!p || !d) return;
42069
- let e = URL.createObjectURL(new Blob([d.content], { type: "text/plain;charset=utf-8" }));
42070
- return s({
42071
- key: p,
42094
+ if (!h || !p) return;
42095
+ let e = URL.createObjectURL(new Blob([p.content], { type: "text/plain;charset=utf-8" }));
42096
+ return c({
42097
+ key: h,
42072
42098
  href: e
42073
42099
  }), () => URL.revokeObjectURL(e);
42074
- }, [p, d?.content]);
42075
- let m = r.data?.coverage, h = r.error ? /* @__PURE__ */ (0, U.jsxs)("p", {
42100
+ }, [h, p?.content]);
42101
+ let g = i.data?.coverage, _ = i.error ? /* @__PURE__ */ (0, U.jsxs)("p", {
42076
42102
  className: "ws-status",
42077
42103
  role: "alert",
42078
- children: ["Conversation inspection unavailable: ", r.error]
42079
- }) : m ? /* @__PURE__ */ (0, U.jsxs)("details", {
42104
+ children: ["Conversation inspection unavailable: ", i.error]
42105
+ }) : g ? /* @__PURE__ */ (0, U.jsxs)("details", {
42080
42106
  className: "ws-status",
42081
- open: m.status !== "complete",
42082
- "data-capture-status": m.status,
42107
+ open: g.status !== "complete",
42108
+ "data-capture-status": g.status,
42083
42109
  children: [
42084
- /* @__PURE__ */ (0, U.jsx)("summary", { children: m.status === "complete" ? "Conversation retained" : "Conversation incomplete" }),
42085
- /* @__PURE__ */ (0, U.jsx)("p", { children: m.reason ?? m.source }),
42086
- !!r.data?.context?.length && /* @__PURE__ */ (0, U.jsxs)("details", { children: [/* @__PURE__ */ (0, U.jsx)("summary", { children: "Recorded context" }), r.data.context.map((e, t) => /* @__PURE__ */ (0, U.jsx)("pre", {
42110
+ /* @__PURE__ */ (0, U.jsx)("summary", { children: g.status === "complete" ? "Conversation retained" : "Conversation incomplete" }),
42111
+ /* @__PURE__ */ (0, U.jsx)("p", { children: g.reason ?? g.source }),
42112
+ !!i.data?.context?.length && /* @__PURE__ */ (0, U.jsxs)("details", { children: [/* @__PURE__ */ (0, U.jsx)("summary", { children: "Recorded context" }), i.data.context.map((e, t) => /* @__PURE__ */ (0, U.jsx)("pre", {
42087
42113
  className: "ws-code",
42088
42114
  children: e.event.text
42089
42115
  }, `${e.at}:${t}`))] }),
42090
- r.data?.files?.scope === "none" && /* @__PURE__ */ (0, U.jsx)("p", { children: r.data.files.reason ?? "No workspace inventory was captured." })
42116
+ i.data?.files?.scope === "none" && /* @__PURE__ */ (0, U.jsx)("p", { children: i.data.files.reason ?? "No workspace inventory was captured." })
42091
42117
  ]
42092
42118
  }) : void 0;
42093
42119
  return {
42094
- scoreboard: /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [h, r.data?.files && !r.data.files.complete && /* @__PURE__ */ (0, U.jsxs)("p", {
42120
+ scoreboard: /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [_, i.data?.files && !i.data.files.complete && /* @__PURE__ */ (0, U.jsxs)("p", {
42095
42121
  className: "ws-status",
42096
42122
  role: "alert",
42097
- children: ["Workspace inventory incomplete: ", r.data.files.reason ?? "Some files could not be retained."]
42123
+ children: ["Workspace inventory incomplete: ", i.data.files.reason ?? "Some files could not be retained."]
42098
42124
  })] }),
42099
- files: l ? /* @__PURE__ */ (0, U.jsx)("section", {
42125
+ files: u ? /* @__PURE__ */ (0, U.jsx)("section", {
42100
42126
  "aria-label": "Retained files",
42101
42127
  className: "flex min-h-0 flex-1 flex-col",
42102
- "data-file-scope": r.data?.files?.scope,
42103
- "data-file-complete": r.data?.files?.complete,
42104
- "data-file": l.path,
42105
- "data-file-hash": l.sha256,
42106
- children: f ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(CE, {
42128
+ "data-file-scope": i.data?.files?.scope,
42129
+ "data-file-complete": i.data?.files?.complete,
42130
+ "data-file": u.path,
42131
+ "data-file-hash": u.sha256,
42132
+ children: m ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(CE, {
42107
42133
  className: "min-h-0 flex-1",
42108
- paths: c.map((e) => e.path),
42109
- selectedPath: l.path,
42134
+ paths: l.map((e) => e.path),
42135
+ selectedPath: u.path,
42110
42136
  onSelect: (e) => {
42111
- c.some((t) => t.path === e) && a(e);
42137
+ l.some((t) => t.path === e) && o(e);
42112
42138
  },
42113
42139
  preview: {
42114
- path: l.path,
42140
+ path: u.path,
42115
42141
  content: /* @__PURE__ */ (0, U.jsx)(zN, {
42116
- path: l.path,
42117
- filename: l.path.split("/").at(-1) ?? l.path,
42118
- content: d.content,
42142
+ path: u.path,
42143
+ filename: u.path.split("/").at(-1) ?? u.path,
42144
+ content: p.content,
42119
42145
  showTree: !1
42120
42146
  }),
42121
- ...d.before ? { compare: {
42122
- label: d.before.source.ref,
42147
+ ...p.before ? { compare: {
42148
+ label: p.before.source.ref,
42123
42149
  content: /* @__PURE__ */ (0, U.jsx)(LN, {
42124
- filename: l.path,
42125
- baseline: d.before.content,
42126
- current: d.content
42150
+ filename: u.path,
42151
+ baseline: p.before.content,
42152
+ current: p.content
42127
42153
  })
42128
42154
  } } : {}
42129
42155
  }
@@ -42133,45 +42159,45 @@ function HB(e, t, n) {
42133
42159
  /* @__PURE__ */ (0, U.jsx)("summary", { children: "Provenance" }),
42134
42160
  /* @__PURE__ */ (0, U.jsx)("code", {
42135
42161
  className: "break-all",
42136
- children: l.sha256
42162
+ children: u.sha256
42137
42163
  }),
42138
- d.before && /* @__PURE__ */ (0, U.jsxs)("p", { children: [
42164
+ p.before && /* @__PURE__ */ (0, U.jsxs)("p", { children: [
42139
42165
  "Compared with ",
42140
- d.before.source.kind,
42166
+ p.before.source.kind,
42141
42167
  " ",
42142
42168
  /* @__PURE__ */ (0, U.jsx)("code", {
42143
42169
  className: "break-all",
42144
- children: d.before.source.ref
42170
+ children: p.before.source.ref
42145
42171
  }),
42146
42172
  ": ",
42147
42173
  /* @__PURE__ */ (0, U.jsx)("code", {
42148
42174
  className: "break-all",
42149
- children: d.before.sha256
42175
+ children: p.before.sha256
42150
42176
  })
42151
42177
  ] }),
42152
42178
  /* @__PURE__ */ (0, U.jsx)("p", { children: /* @__PURE__ */ (0, U.jsx)("a", {
42153
- href: o && o.key === p ? o.href : void 0,
42154
- download: l.path.split("/").at(-1),
42179
+ href: s && s.key === h ? s.href : void 0,
42180
+ download: u.path.split("/").at(-1),
42155
42181
  children: "Download"
42156
42182
  }) })
42157
42183
  ]
42158
42184
  })] }) : /* @__PURE__ */ (0, U.jsx)("p", {
42159
42185
  className: "ws-status",
42160
- role: u.loading ? "status" : "alert",
42161
- children: u.loading ? `Reading ${l.path}…` : `This retained file is unavailable: ${u.error ?? "its content identity did not match the inventory"}`
42186
+ role: f.loading ? "status" : "alert",
42187
+ children: f.loading ? `Reading ${u.path}…` : `This retained file is unavailable: ${f.error ?? "its content identity did not match the inventory"}`
42162
42188
  })
42163
42189
  }) : void 0
42164
42190
  };
42165
42191
  }
42166
- var UB = (e) => {
42192
+ var WB = (e) => {
42167
42193
  let t = e ? Date.parse(e) : NaN;
42168
42194
  return Number.isFinite(t) ? t : void 0;
42169
- }, WB = (e) => e !== void 0 && Number.isFinite(e) ? new Date(e).toISOString() : void 0, GB = (e, t) => [...e.workers.map((e) => {
42195
+ }, GB = (e) => e !== void 0 && Number.isFinite(e) ? new Date(e).toISOString() : void 0, KB = (e, t) => [...e.workers.map((e) => {
42170
42196
  let n = t.get(e.id);
42171
42197
  return {
42172
42198
  ...e,
42173
- startedAt: e.startedAt ?? WB(n?.timing?.startedAt),
42174
- endedAt: e.endedAt ?? WB(n?.timing?.settledAt ?? n?.settledAt)
42199
+ startedAt: e.startedAt ?? GB(n?.timing?.startedAt),
42200
+ endedAt: e.endedAt ?? GB(n?.timing?.settledAt ?? n?.settledAt)
42175
42201
  };
42176
42202
  }), ...[...t.values()].filter((t) => t.id !== e.id && !e.workers.some((e) => e.id === t.id)).map((e) => ({
42177
42203
  id: e.id,
@@ -42179,10 +42205,10 @@ var UB = (e) => {
42179
42205
  label: e.label ?? e.id,
42180
42206
  runtime: e.runtime,
42181
42207
  status: e.status ?? "unknown",
42182
- startedAt: WB(e.timing?.startedAt),
42183
- endedAt: WB(e.timing?.settledAt ?? e.settledAt)
42184
- }))], KB = (...e) => e.every((e) => e && e.usdKnown !== !1 && Number.isFinite(e.usd) && e.usd >= 0) ? e.reduce((e, t) => e + (t?.usd ?? 0), 0) : void 0;
42185
- function qB(e) {
42208
+ startedAt: GB(e.timing?.startedAt),
42209
+ endedAt: GB(e.timing?.settledAt ?? e.settledAt)
42210
+ }))], qB = (...e) => e.every((e) => e && e.usdKnown !== !1 && Number.isFinite(e.usd) && e.usd >= 0) ? e.reduce((e, t) => e + (t?.usd ?? 0), 0) : void 0;
42211
+ function JB(e) {
42186
42212
  let t = (0, V.useRef)({
42187
42213
  api: e.api,
42188
42214
  transport: e.transport,
@@ -42196,9 +42222,9 @@ function qB(e) {
42196
42222
  fetcher: e.transport?.fetch,
42197
42223
  opener: e.transport?.openEventSource,
42198
42224
  revision: t.current.revision + 1
42199
- }), /* @__PURE__ */ (0, U.jsx)(JB, { ...e }, t.current.revision);
42225
+ }), /* @__PURE__ */ (0, U.jsx)(YB, { ...e }, t.current.revision);
42200
42226
  }
42201
- function JB({ api: e, transport: t }) {
42227
+ function YB({ api: e, transport: t }) {
42202
42228
  let [n, i] = (0, V.useState)([]), [a, o] = (0, V.useState)(null), [s, c] = (0, V.useState)(!1), [l, u] = (0, V.useState)(!1), [d, f] = (0, V.useState)(""), [p, m] = (0, V.useState)(0), [h, g] = (0, V.useState)(), [_, v] = (0, V.useState)(!0);
42203
42229
  SB(`${e}/events`, {
42204
42230
  opener: t?.openEventSource,
@@ -42232,14 +42258,14 @@ function JB({ api: e, transport: t }) {
42232
42258
  return e;
42233
42259
  }, [b?.snapshot, b?.run.id]), S = (0, V.useMemo)(() => b ? {
42234
42260
  ...b.run,
42235
- workers: GB(b.run, x)
42261
+ workers: KB(b.run, x)
42236
42262
  } : void 0, [b?.run, x]), w = (0, V.useMemo)(() => new Map((S?.workers ?? []).map((e) => [e.id, e])), [S]), T = (0, V.useCallback)((e) => {
42237
- let t = x.get(e), n = w.get(e)?.materialization;
42238
- return [t?.model ?? (n?.model?.status === "known" ? n.model.id : void 0), t?.backend ?? n?.backend].filter(Boolean).join(" · ") || void 0;
42239
- }, [x, w]), E = S?.outcome, D = E ? E.kind === "winner" ? "Winner" : `${E.kind === "no-winner" ? "No winner" : "Failed"}: ${E.reason}` : void 0, O = S ? Math.min(...[S.startedAt, ...S.workers.map((e) => e.startedAt)].flatMap((e) => e && Number.isFinite(Date.parse(e)) ? [Date.parse(e)] : [])) : void 0, k = (0, V.useMemo)(() => {
42263
+ let t = w.get(e)?.materialization;
42264
+ return [t?.model?.status === "known" ? t.model.id : void 0, t?.backend].filter(Boolean).join(" · ") || void 0;
42265
+ }, [w]), E = S?.outcome, D = E ? E.kind === "winner" ? "Winner" : `${E.kind === "no-winner" ? "No winner" : "Failed"}: ${E.reason}` : void 0, O = S ? Math.min(...[S.startedAt, ...S.workers.map((e) => e.startedAt)].flatMap((e) => e && Number.isFinite(Date.parse(e)) ? [Date.parse(e)] : [])) : void 0, k = (0, V.useMemo)(() => {
42240
42266
  let e = b?.snapshot.generatedAt ?? Date.now(), t = O !== void 0 && Number.isFinite(O) ? O : e, n = (S?.workers ?? []).flatMap((n) => {
42241
42267
  if (!n.startedAt || !Number.isFinite(Date.parse(n.startedAt))) return [];
42242
- let i = Math.max(0, Date.parse(n.startedAt) - t), a = UB(n.endedAt) ?? (C(n.status) ? e : Date.parse(n.startedAt)), o = KB(n.spend, n.metered);
42268
+ let i = Math.max(0, Date.parse(n.startedAt) - t), a = WB(n.endedAt) ?? (C(n.status) ? e : Date.parse(n.startedAt)), o = qB(n.spend, n.metered);
42243
42269
  return [{
42244
42270
  id: n.id,
42245
42271
  parentId: n.parent && n.parent !== n.id ? n.parent : S.id,
@@ -42276,7 +42302,7 @@ function JB({ api: e, transport: t }) {
42276
42302
  activityAt: [S.lastActivityAt - t],
42277
42303
  medianEventGapMs: S.medianEventGapMs
42278
42304
  },
42279
- ...KB(S.driverSpend) === void 0 ? {} : { costUsd: KB(S.driverSpend) }
42305
+ ...qB(S.driverSpend) === void 0 ? {} : { costUsd: qB(S.driverSpend) }
42280
42306
  });
42281
42307
  let i = S?.totals;
42282
42308
  return {
@@ -42296,8 +42322,8 @@ function JB({ api: e, transport: t }) {
42296
42322
  label: "root",
42297
42323
  status: r(S.status),
42298
42324
  model: T(S.id),
42299
- costUsd: KB(S.driverSpend),
42300
- startedAt: UB(S.startedAt),
42325
+ costUsd: qB(S.driverSpend),
42326
+ startedAt: WB(S.startedAt),
42301
42327
  lastActivityAt: S.lastActivityAt,
42302
42328
  medianEventGapMs: S.medianEventGapMs,
42303
42329
  result: D ?? S.reason ?? (r(S.status) === "failed" ? "Failure cause not recorded" : void 0)
@@ -42307,8 +42333,8 @@ function JB({ api: e, transport: t }) {
42307
42333
  harness: e.runtime,
42308
42334
  model: T(e.id),
42309
42335
  status: r(e.status),
42310
- costUsd: KB(e.spend, e.metered),
42311
- startedAt: UB(e.startedAt),
42336
+ costUsd: qB(e.spend, e.metered),
42337
+ startedAt: WB(e.startedAt),
42312
42338
  lastActivityAt: e.lastActivityAt,
42313
42339
  medianEventGapMs: e.medianEventGapMs,
42314
42340
  turn: e.liveTail?.at(-1),
@@ -42345,7 +42371,7 @@ function JB({ api: e, transport: t }) {
42345
42371
  S,
42346
42372
  T,
42347
42373
  D
42348
- ]), M = HB(b && h ? `${e}/agents/${b.root}/${encodeURIComponent(b.run.id)}/${encodeURIComponent(h)}` : void 0, !!S && C(S.status), t?.fetch);
42374
+ ]), M = UB(b && h ? `${e}/agents/${b.root}/${encodeURIComponent(b.run.id)}/${encodeURIComponent(h)}` : void 0, !!S && C(S.status), t?.fetch, S?.workers.find((e) => e.id === h)?.lastActivityAt);
42349
42375
  return /* @__PURE__ */ (0, U.jsxs)("main", {
42350
42376
  className: "ws-live",
42351
42377
  "data-api": e,
@@ -42383,7 +42409,7 @@ function JB({ api: e, transport: t }) {
42383
42409
  role: "alert",
42384
42410
  children: ["Partial capture: ", e.diagnostics.map((e) => `${e.source}: ${e.reason}`).join(" · ")]
42385
42411
  }, e.root)),
42386
- b ? /* @__PURE__ */ (0, U.jsx)(LB, {
42412
+ b ? /* @__PURE__ */ (0, U.jsx)(RB, {
42387
42413
  trace: k,
42388
42414
  label: "Run",
42389
42415
  selectedAgentId: h,
@@ -42412,8 +42438,8 @@ function JB({ api: e, transport: t }) {
42412
42438
  });
42413
42439
  }
42414
42440
  // src/runtime-viewer.mjs
42415
- var YB = document.getElementById("agent-workspace");
42416
- if (YB) {
42417
- let e = YB.dataset.theme === "light" ? "light" : YB.dataset.theme === "dark" || matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
42418
- document.documentElement.dataset.theme = e, document.documentElement.classList.toggle("dark", e === "dark"), (0, at.createRoot)(YB).render((0, V.createElement)(V.StrictMode, null, (0, V.createElement)(qB, { api: YB.dataset.api ?? "/api/top" })));
42441
+ var XB = document.getElementById("agent-workspace");
42442
+ if (XB) {
42443
+ let e = XB.dataset.theme === "light" ? "light" : XB.dataset.theme === "dark" || matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
42444
+ document.documentElement.dataset.theme = e, document.documentElement.classList.toggle("dark", e === "dark"), (0, at.createRoot)(XB).render((0, V.createElement)(V.StrictMode, null, (0, V.createElement)(JB, { api: XB.dataset.api ?? "/api/top" })));
42419
42445
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "license": "MIT",
5
5
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
6
6
  "repository": {
@@ -152,6 +152,7 @@
152
152
  "tailwind.config.cjs"
153
153
  ],
154
154
  "peerDependencies": {
155
+ "@drewstone/agent-record": "^2.0.0 || ^3.0.0",
155
156
  "@hocuspocus/provider": ">=2.15.0 <5.0.0",
156
157
  "@nanostores/react": ">=0.8.4 <2.0.0",
157
158
  "@tangle-network/agent-interface": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^5.2.0",
@@ -173,8 +174,7 @@
173
174
  "pdfjs-dist": ">=6.0.0 <7.0.0",
174
175
  "react": "^18 || ^19",
175
176
  "react-dom": "^18 || ^19",
176
- "yjs": "^13.6.0",
177
- "@drewstone/agent-record": "^2.0.0 || ^3.0.0"
177
+ "yjs": "^13.6.0"
178
178
  },
179
179
  "peerDependenciesMeta": {
180
180
  "@tangle-network/charts": {
@@ -241,17 +241,18 @@
241
241
  "@tangle-network/ui": "^11.51.12",
242
242
  "diff": "^9.0.0",
243
243
  "eventsource-parser": "4.1.2",
244
+ "katex": "^0.19.0",
244
245
  "lucide-react": "^1.61.0",
245
246
  "nanostores": "^1.5.5",
246
- "tailwindcss-animate": "^1.0.7",
247
- "yaml": "^2.9.1",
248
247
  "react-markdown": "^10.1.0",
248
+ "rehype-katex": "^7.0.1",
249
249
  "remark-gfm": "^4.0.1",
250
250
  "remark-math": "^6.0.0",
251
- "rehype-katex": "^7.0.1",
252
- "katex": "^0.19.0"
251
+ "tailwindcss-animate": "^1.0.7",
252
+ "yaml": "^2.9.1"
253
253
  },
254
254
  "devDependencies": {
255
+ "@drewstone/agent-record": "https://github.com/drewstone/agent-record/releases/download/v3.0.3/drewstone-agent-record-3.0.3.tgz",
255
256
  "@fontsource/geist": "5.3.0",
256
257
  "@fontsource/geist-mono": "5.3.0",
257
258
  "@fontsource/inter": "5.3.0",
@@ -263,8 +264,10 @@
263
264
  "@storybook/react-vite": "^10.6.3",
264
265
  "@tailwindcss/postcss": "^4.3.3",
265
266
  "@tangle-network/agent-interface": "5.10.2",
267
+ "@tangle-network/agent-runtime": "3.0.32",
266
268
  "@tangle-network/brand": "^1.31.3",
267
269
  "@tangle-network/charts": "^4.0.2",
270
+ "@tangle-network/ui": "^11.51.12",
268
271
  "@tanstack/react-query": "^5.104.5",
269
272
  "@testing-library/dom": "^10.4.2",
270
273
  "@testing-library/jest-dom": "^7.0.1",
@@ -297,9 +300,7 @@
297
300
  "typescript": "^7.0.2",
298
301
  "vite": "^8.3.5",
299
302
  "vitest": "^5.0.5",
300
- "yjs": "^13.6.33",
301
- "@drewstone/agent-record": "https://github.com/drewstone/agent-record/releases/download/v3.0.3/drewstone-agent-record-3.0.3.tgz",
302
- "@tangle-network/ui": "^11.51.12"
303
+ "yjs": "^13.6.33"
303
304
  },
304
305
  "scripts": {
305
306
  "build": "tsdown",