@tangle-network/sandbox-ui 2.0.20 → 2.0.22

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 (40) hide show
  1. package/README.md +18 -1
  2. package/dist/{record-Cwyo2oHb.js → AgentTree-KO1TJXBq.js} +203 -313
  3. package/dist/VirtualList-DLh2JE0F.js +205 -0
  4. package/dist/{WorkflowGraph-CADReIDl.js → WorkflowGraph-B8cRtVaw.js} +2 -2
  5. package/dist/event-stream-DNEbvx4s.d.ts +2 -0
  6. package/dist/globals.css +5910 -240
  7. package/dist/hooks.d.ts +2 -2
  8. package/dist/hooks.js +2 -2
  9. package/dist/{index-ByNsP4VC.d.ts → index-BoKSR0s9.d.ts} +62 -4
  10. package/dist/{index-BYkigpIM.d.ts → index-gXcuwPOX.d.ts} +13 -7
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +8 -6
  13. package/dist/record-BGcR48YY.js +47 -0
  14. package/dist/record.d.ts +66 -0
  15. package/dist/record.js +2329 -0
  16. package/dist/report-viewer.js +554 -0
  17. package/dist/run/live.d.ts +1 -1
  18. package/dist/run/live.js +26 -28
  19. package/dist/run/record.d.ts +2 -2
  20. package/dist/run/record.js +4 -1
  21. package/dist/run.d.ts +4 -4
  22. package/dist/run.js +5 -3
  23. package/dist/runtime-viewer/{AgentGraphCanvas-B74GN1o6-DC3EH_ss.js → AgentGraphCanvas-DDvaU9Rg-DlNZxJ20.js} +187 -168
  24. package/dist/runtime-viewer/{latest-events-iiWwpIck-BTK0vSlR.js → latest-events-CabhXynX-Dp_vs0Px.js} +705 -691
  25. package/dist/runtime-viewer/sandbox-ui-CUj4Q1P_.css +2 -0
  26. package/dist/styles.css +5911 -241
  27. package/dist/tailwind.css +5677 -5
  28. package/dist/tokens.css +7 -1
  29. package/dist/{trace-workspace-C8dHRBDV.js → trace-workspace-DkakKRLV.js} +64 -78
  30. package/dist/{tree-data-C8CNt4WE.js → tree-data-B_IXAIgg.js} +171 -121
  31. package/dist/use-follow-tail-Ckx5ZSV2.js +1 -0
  32. package/dist/vault-tree.js +1 -1
  33. package/dist/workflows.js +1 -1
  34. package/dist/{workspace-CzikYt_y.js → workspace--GvnZNpH.js} +1 -1
  35. package/dist/{workspace-files-pane-DB9Nvwh4.js → workspace-files-pane-C0PeY6rY.js} +12 -12
  36. package/dist/workspace-viewer.js +9693 -9462
  37. package/dist/workspace.js +2 -2
  38. package/package.json +27 -13
  39. package/dist/agent-stream-CBZ2fXJ2.d.ts +0 -66
  40. package/dist/runtime-viewer/sandbox-ui-z5RGk327.css +0 -2
@@ -1,4 +1,4 @@
1
- import { t as AgentStreamOpener } from "../agent-stream-CBZ2fXJ2.js";
1
+ import { t as AgentStreamOpener } from "../event-stream-DNEbvx4s.js";
2
2
  /** Keep one transport identity per authenticated account; changing it discards the previous view. */
3
3
  export interface LiveRunTransport {
4
4
  fetch?: typeof globalThis.fetch;
package/dist/run/live.js CHANGED
@@ -1,7 +1,7 @@
1
- import { t as WorkspaceFilesPane } from "../workspace-files-pane-DB9Nvwh4.js";
1
+ import { t as WorkspaceFilesPane } from "../workspace-files-pane-C0PeY6rY.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 { t as TraceWorkspace } from "../trace-workspace-C8dHRBDV.js";
4
+ import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-DkakKRLV.js";
5
5
  import { useDocument } from "../hooks/use-document.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -180,32 +180,30 @@ function LiveRunView({ api, transport }) {
180
180
  const [rendered, setRendered] = useState(0);
181
181
  const [agent, setAgent] = useState();
182
182
  const [conversationOpen, setConversationOpen] = useState(true);
183
- useEffect(() => {
184
- const source = transport?.openEventSource ? transport.openEventSource(`${api}/events`, setConnected) : new EventSource(`${api}/events`);
185
- source.addEventListener("snapshot", (message) => {
186
- try {
187
- const frame = JSON.parse(message.data);
188
- if (!Array.isArray(frame.snapshots)) throw new Error("Invalid snapshot stream");
189
- setSnapshots((prior) => {
190
- const byRoot = new Map((frame.reset ? [] : prior).map((snapshot) => [snapshot.root, snapshot]));
191
- for (const snapshot of frame.snapshots) byRoot.set(snapshot.root, snapshot);
192
- return [...byRoot.values()];
193
- });
194
- setRendered(frame.sequence);
195
- setError(null);
196
- setConnected(true);
197
- } catch (cause) {
198
- setError(String(cause));
199
- }
200
- });
201
- source.addEventListener("unavailable", () => setError("The run snapshot is unavailable"));
202
- source.addEventListener("end", () => {
203
- source.close();
204
- setEnded(true);
205
- });
206
- if (!transport?.openEventSource) source.onerror = () => setConnected(false);
207
- return () => source.close();
208
- }, [api, transport?.openEventSource]);
183
+ useEventStream(`${api}/events`, {
184
+ opener: transport?.openEventSource,
185
+ onLiveChange: setConnected,
186
+ events: {
187
+ snapshot: (message) => {
188
+ try {
189
+ const frame = JSON.parse(message.data);
190
+ if (!Array.isArray(frame.snapshots)) throw new Error("Invalid snapshot stream");
191
+ setSnapshots((prior) => {
192
+ const byRoot = new Map((frame.reset ? [] : prior).map((snapshot) => [snapshot.root, snapshot]));
193
+ for (const snapshot of frame.snapshots) byRoot.set(snapshot.root, snapshot);
194
+ return [...byRoot.values()];
195
+ });
196
+ setRendered(frame.sequence);
197
+ setError(null);
198
+ setConnected(true);
199
+ } catch (cause) {
200
+ setError(String(cause));
201
+ }
202
+ },
203
+ unavailable: () => setError("The run snapshot is unavailable"),
204
+ end: () => setEnded(true)
205
+ }
206
+ });
209
207
  const runs = snapshots.flatMap((snapshot, root) => snapshot.supervisors.map((run) => ({
210
208
  snapshot,
211
209
  root,
@@ -1,2 +1,2 @@
1
- import { a as ConversationProps, c as ToolCall, d as ConversationEvent, f as ConversationNode, i as Conversation, l as indexRecord, n as VirtualList, o as EventFlag, p as ConversationRecord, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "../index-BYkigpIM.js";
2
- export { AgentTree, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type RecordIndex, type ToolCall, VirtualList, indexRecord, model_d_exports as recordModel, withPrompts };
1
+ import { a as ConversationProps, c as ToolCall, d as recordFlowTrace, f as ConversationEvent, i as Conversation, l as indexRecord, m as ConversationRecord, n as VirtualList, o as EventFlag, p as ConversationNode, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "../index-gXcuwPOX.js";
2
+ export { AgentTree, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type RecordIndex, type ToolCall, VirtualList, indexRecord, recordFlowTrace, model_d_exports as recordModel, withPrompts };
@@ -1 +1,4 @@
1
- export { t as AgentTree, r as Conversation, o as VirtualList, i as indexRecord, a as recordModel, n as withPrompts } from "../record-Cwyo2oHb.js";
1
+ import { t as VirtualList } from "../VirtualList-DLh2JE0F.js";
2
+ import { d as recordFlowTrace, l as model_exports, n as Conversation, o as indexRecord, t as AgentTree } from "../AgentTree-KO1TJXBq.js";
3
+ import { t as withPrompts } from "../record-BGcR48YY.js";
4
+ export { AgentTree, Conversation, VirtualList, indexRecord, recordFlowTrace, model_exports as recordModel, withPrompts };
package/dist/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ToolCallData, B as taskStatus, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as parseToolEvent, G as TraceWorkspaceProps, H as LatestEventsProps, I as runStatus, J as traceSpanMark, K as TraceWaterfall, L as showsTaskPriority, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as statusMeta, S as RunStatus, T as StatusMeta, U as TraceEvent, V as LatestEvents, W as TraceWorkspace, _ as RunPhaseList, a as ApprovalPlanStep, b as RunRowStatus, c as FeedSegment, d as InlineToolItem, f as InlineToolItemProps, g as RunPhase, h as RunGroupProps, i as ApprovalDiffSummary, j as ToolCallFeed, k as TaskStatus, l as InlineThinkingItem, m as RunGroup, n as ApprovalCardProps, o as ExpandedToolDetail, p as LiveDuration, q as TraceWaterfallProps, r as ApprovalDiffFile, s as ExpandedToolDetailProps, t as ApprovalCard, u as InlineThinkingItemProps, v as RunRowShell, w as RunStatusIconProps, x as RunRowStatusDot, y as RunRowShellProps, z as taskProgress } from "./index-ByNsP4VC.js";
2
- import { a as AgentTranscriptEntry, i as AgentStreamState, n as AgentStreamRow, o as foldAgentRows, r as AgentStreamSource, s as useAgentStream, t as AgentStreamOpener } from "./agent-stream-CBZ2fXJ2.js";
3
- import { a as ConversationProps, c as ToolCall, d as ConversationEvent, f as ConversationNode, i as Conversation, l as indexRecord, n as VirtualList, o as EventFlag, p as ConversationRecord, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "./index-BYkigpIM.js";
4
- export { type AgentStreamOpener, type AgentStreamRow, type AgentStreamSource, type AgentStreamState, type AgentTranscriptEntry, AgentTree, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LatestEvents, type LatestEventsProps, LiveDuration, type RecordIndex, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCall, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, type TraceEvent, TraceWaterfall, type TraceWaterfallProps, TraceWorkspace, type TraceWorkspaceProps, VirtualList, foldAgentRows, indexRecord, parseToolEvent, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, withPrompts };
1
+ import { $ as traceSpanMark, A as ToolCallData, B as taskStatus, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as parseToolEvent, G as TraceWorkspaceProps, H as LatestEventsProps, I as runStatus, J as AgentTranscriptEntry, K as AgentStreamRow, L as showsTaskPriority, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, Q as TraceWaterfallProps, R as statusMeta, S as RunStatus, T as StatusMeta, U as TraceEvent, V as LatestEvents, W as TraceWorkspace, X as useAgentStream, Y as foldAgentRows, Z as TraceWaterfall, _ as RunPhaseList, a as ApprovalPlanStep, b as RunRowStatus, c as FeedSegment, d as InlineToolItem, f as InlineToolItemProps, g as RunPhase, h as RunGroupProps, i as ApprovalDiffSummary, j as ToolCallFeed, k as TaskStatus, l as InlineThinkingItem, m as RunGroup, n as ApprovalCardProps, o as ExpandedToolDetail, p as LiveDuration, q as AgentStreamState, r as ApprovalDiffFile, s as ExpandedToolDetailProps, t as ApprovalCard, u as InlineThinkingItemProps, v as RunRowShell, w as RunStatusIconProps, x as RunRowStatusDot, y as RunRowShellProps, z as taskProgress } from "./index-BoKSR0s9.js";
2
+ import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
3
+ import { a as ConversationProps, c as ToolCall, d as recordFlowTrace, f as ConversationEvent, i as Conversation, l as indexRecord, m as ConversationRecord, n as VirtualList, o as EventFlag, p as ConversationNode, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "./index-gXcuwPOX.js";
4
+ export { type AgentStreamOpener, type AgentStreamRow, type AgentStreamSource, type AgentStreamState, type AgentTranscriptEntry, AgentTree, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type EventStreamHandlers, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LatestEvents, type LatestEventsProps, LiveDuration, type RecordIndex, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCall, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, type TraceEvent, TraceWaterfall, type TraceWaterfallProps, TraceWorkspace, type TraceWorkspaceProps, VirtualList, foldAgentRows, indexRecord, parseToolEvent, recordFlowTrace, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
package/dist/run.js CHANGED
@@ -1,4 +1,6 @@
1
- import { a as TraceWaterfall, i as useAgentStream, n as LatestEvents, o as traceSpanMark, r as foldAgentRows, t as TraceWorkspace } from "./trace-workspace-C8dHRBDV.js";
2
- import { a as model_exports, i as indexRecord, n as withPrompts, o as VirtualList, r as Conversation, t as AgentTree } from "./record-Cwyo2oHb.js";
1
+ import { t as VirtualList } from "./VirtualList-DLh2JE0F.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-DkakKRLV.js";
3
+ import { d as recordFlowTrace, l as model_exports, n as Conversation, o as indexRecord, t as AgentTree } from "./AgentTree-KO1TJXBq.js";
4
+ import { t as withPrompts } from "./record-BGcR48YY.js";
3
5
  import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "@tangle-network/ui/run";
4
- export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, parseToolEvent, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, withPrompts };
6
+ export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, parseToolEvent, recordFlowTrace, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };