@tangle-network/sandbox-ui 2.0.22 → 3.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/README.md +6 -0
- package/dist/{AgentTree-KO1TJXBq.js → AgentTree-CJRVpgPq.js} +8 -8
- package/dist/ResearchReport-CSNpZ-pj.js +2063 -0
- package/dist/ResearchReport-CmFYqNVY.d.ts +36 -0
- package/dist/{chat-BU39pb2j.js → chat-BrlLa4rg.js} +2 -2
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/globals.css +106 -297
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{index-Due7tY0w.d.ts → index-5zOVKgDT.d.ts} +2 -2
- package/dist/{index-D2_4ONCz.d.ts → index-DpzFSqjG.d.ts} +1 -7
- package/dist/{index-BoKSR0s9.d.ts → index-YU_b9xCK.d.ts} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -9
- package/dist/record/ResearchReport.d.ts +2 -0
- package/dist/record/ResearchReport.js +1 -0
- package/dist/{record-BGcR48YY.js → record-Ct_MZeZC.js} +1 -1
- package/dist/record.d.ts +2 -35
- package/dist/record.js +2 -2061
- package/dist/report-viewer.js +130 -90
- package/dist/run/live.js +14 -33
- package/dist/run/record.js +2 -2
- package/dist/run.d.ts +2 -2
- package/dist/run.js +5 -5
- package/dist/runtime-viewer/{AgentGraphCanvas-DDvaU9Rg-DlNZxJ20.js → AgentGraphCanvas-DGq7_u8--WPFPgd72.js} +2254 -2282
- package/dist/runtime-viewer/latest-events-CRq9sGkK-YFXUh9qO.js +9586 -0
- package/dist/runtime-viewer/{sandbox-ui-CUj4Q1P_.css → sandbox-ui-BEziPi7D.css} +1 -1
- package/dist/styles.css +107 -298
- package/dist/tailwind.css +72 -13
- package/dist/{trace-workspace-DkakKRLV.js → trace-workspace-BiJbv9WQ.js} +2 -2
- package/dist/use-follow-tail-Ht7fZGQQ.js +1 -0
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/{workspace--GvnZNpH.js → workspace-CAdAoNmW.js} +11 -17
- package/dist/workspace-viewer.js +10146 -12805
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +11 -7
- package/dist/runtime-viewer/latest-events-CabhXynX-Dp_vs0Px.js +0 -3671
- package/dist/use-follow-tail-Ckx5ZSV2.js +0 -1
package/dist/run/live.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
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 { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-
|
|
4
|
+
import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-BiJbv9WQ.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";
|
|
8
|
-
import { runStatus } from "@tangle-network/ui/run";
|
|
8
|
+
import { isOpen, runStatus } from "@tangle-network/ui/run/status-meta";
|
|
9
9
|
// src/run/live-inspection.tsx
|
|
10
10
|
/** The graph, conversation and files share one selected agent and one product-owned API. */
|
|
11
11
|
function useLiveInspection(url, live, fetcher) {
|
|
@@ -143,16 +143,6 @@ const withNodes = (run, nodes) => [...run.workers.map((worker) => {
|
|
|
143
143
|
endedAt: iso(node.timing?.settledAt ?? node.settledAt)
|
|
144
144
|
}))];
|
|
145
145
|
const cost = (...spends) => spends.every((spend) => spend && spend.usdKnown !== false && Number.isFinite(spend.usd) && spend.usd >= 0) ? spends.reduce((sum, spend) => sum + (spend?.usd ?? 0), 0) : void 0;
|
|
146
|
-
const flowStatus = (status) => runStatus(status === "down" ? "failed" : status === "cancelled" || status === "no-winner" ? "stopped" : status);
|
|
147
|
-
const graphStatus = (status) => {
|
|
148
|
-
const state = flowStatus(status);
|
|
149
|
-
return state === "done" ? "succeeded" : state;
|
|
150
|
-
};
|
|
151
|
-
const isOpen = (status) => [
|
|
152
|
-
"running",
|
|
153
|
-
"waiting",
|
|
154
|
-
"needs-you"
|
|
155
|
-
].includes(flowStatus(status));
|
|
156
146
|
/** Both the Discovery host and agent-runtime-top mount this same stream consumer and shared run workspace. */
|
|
157
147
|
function LiveRun(props) {
|
|
158
148
|
const scope = useRef({
|
|
@@ -238,21 +228,17 @@ function LiveRunView({ api, transport }) {
|
|
|
238
228
|
kind: "pipeline",
|
|
239
229
|
startMs: start,
|
|
240
230
|
endMs: Math.max(start, end - first),
|
|
241
|
-
status:
|
|
231
|
+
status: runStatus(worker.status),
|
|
242
232
|
...costUsd !== void 0 ? { costUsd } : {},
|
|
243
233
|
...worker.lastActivityAt !== void 0 ? {
|
|
244
234
|
activityAt: [worker.lastActivityAt - first],
|
|
245
235
|
medianEventGapMs: worker.medianEventGapMs
|
|
246
236
|
} : {},
|
|
247
237
|
...detail(worker.id) ? { detail: detail(worker.id) } : {},
|
|
248
|
-
...
|
|
238
|
+
...runStatus(worker.status) === "failed" && worker.reason ? { facts: [{
|
|
249
239
|
label: "Failure",
|
|
250
240
|
value: worker.reason
|
|
251
|
-
}] } : {}
|
|
252
|
-
...worker.status === "cancelled" ? { outcome: {
|
|
253
|
-
tone: "neutral",
|
|
254
|
-
label: "Cancelled"
|
|
255
|
-
} } : {}
|
|
241
|
+
}] } : {}
|
|
256
242
|
}];
|
|
257
243
|
});
|
|
258
244
|
if (run?.startedAt && run.status !== "unobserved" && !spans.some((span) => span.id === run.id)) spans.unshift({
|
|
@@ -262,8 +248,8 @@ function LiveRunView({ api, transport }) {
|
|
|
262
248
|
detail: detail(run.id),
|
|
263
249
|
startMs: Math.max(0, Date.parse(run.startedAt) - first),
|
|
264
250
|
endMs: Math.max(0, Date.parse(run.completedAt ?? new Date(at).toISOString()) - first),
|
|
265
|
-
status:
|
|
266
|
-
...
|
|
251
|
+
status: runStatus(run.status),
|
|
252
|
+
...runStatus(run.status) === "failed" && run.reason ? { facts: [{
|
|
267
253
|
label: "Failure",
|
|
268
254
|
value: run.reason
|
|
269
255
|
}] } : {},
|
|
@@ -271,11 +257,7 @@ function LiveRunView({ api, transport }) {
|
|
|
271
257
|
activityAt: [run.lastActivityAt - first],
|
|
272
258
|
medianEventGapMs: run.medianEventGapMs
|
|
273
259
|
} : {},
|
|
274
|
-
...cost(run.driverSpend) !== void 0 ? { costUsd: cost(run.driverSpend) } : {}
|
|
275
|
-
...run.status === "cancelled" ? { outcome: {
|
|
276
|
-
tone: "neutral",
|
|
277
|
-
label: "Cancelled"
|
|
278
|
-
} } : {}
|
|
260
|
+
...cost(run.driverSpend) !== void 0 ? { costUsd: cost(run.driverSpend) } : {}
|
|
279
261
|
});
|
|
280
262
|
const totals = run?.totals;
|
|
281
263
|
return {
|
|
@@ -294,19 +276,19 @@ function LiveRunView({ api, transport }) {
|
|
|
294
276
|
const nodes = run ? [{
|
|
295
277
|
id: run.id,
|
|
296
278
|
label: "root",
|
|
297
|
-
status:
|
|
279
|
+
status: runStatus(run.status),
|
|
298
280
|
model: detail(run.id),
|
|
299
281
|
costUsd: cost(run.driverSpend),
|
|
300
282
|
startedAt: time(run.startedAt),
|
|
301
283
|
lastActivityAt: run.lastActivityAt,
|
|
302
284
|
medianEventGapMs: run.medianEventGapMs,
|
|
303
|
-
result: outcomeText ??
|
|
285
|
+
result: outcomeText ?? run.reason ?? (runStatus(run.status) === "failed" ? "Failure cause not recorded" : void 0)
|
|
304
286
|
}, ...workers.map((worker) => ({
|
|
305
287
|
id: worker.id,
|
|
306
288
|
label: worker.label,
|
|
307
289
|
harness: worker.runtime,
|
|
308
290
|
model: detail(worker.id),
|
|
309
|
-
status:
|
|
291
|
+
status: runStatus(worker.status),
|
|
310
292
|
costUsd: cost(worker.spend, worker.metered),
|
|
311
293
|
startedAt: time(worker.startedAt),
|
|
312
294
|
lastActivityAt: worker.lastActivityAt,
|
|
@@ -316,10 +298,9 @@ function LiveRunView({ api, transport }) {
|
|
|
316
298
|
id: `${worker.id}:${index}:${label}`,
|
|
317
299
|
label
|
|
318
300
|
})),
|
|
319
|
-
result: worker.
|
|
301
|
+
result: worker.reason ?? (runStatus(worker.status) === "failed" ? "Failure cause not recorded" : worker.verdict)
|
|
320
302
|
}))] : [];
|
|
321
|
-
const
|
|
322
|
-
const inspection = useLiveInspection(active && selectedAgent ? `${api}/agents/${active.root}/${encodeURIComponent(active.run.id)}/${encodeURIComponent(selectedAgent)}` : void 0, !!run && isOpen(run.status), transport?.fetch);
|
|
303
|
+
const inspection = useLiveInspection(active && agent ? `${api}/agents/${active.root}/${encodeURIComponent(active.run.id)}/${encodeURIComponent(agent)}` : void 0, !!run && isOpen(run.status), transport?.fetch);
|
|
323
304
|
const known = new Set(nodes.map((node) => node.id));
|
|
324
305
|
const edges = workers.map((worker) => ({
|
|
325
306
|
from: worker.parent && worker.parent !== worker.id && known.has(worker.parent) ? worker.parent : run.id,
|
|
@@ -381,7 +362,7 @@ function LiveRunView({ api, transport }) {
|
|
|
381
362
|
active ? /* @__PURE__ */ jsx(TraceWorkspace, {
|
|
382
363
|
trace,
|
|
383
364
|
label: "Run",
|
|
384
|
-
selectedAgentId:
|
|
365
|
+
selectedAgentId: agent,
|
|
385
366
|
conversationOpen,
|
|
386
367
|
openEventSource: transport?.openEventSource,
|
|
387
368
|
onSelectAgent: (id) => {
|
package/dist/run/record.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
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-
|
|
3
|
-
import { t as withPrompts } from "../record-
|
|
2
|
+
import { d as recordFlowTrace, l as model_exports, n as Conversation, o as indexRecord, t as AgentTree } from "../AgentTree-CJRVpgPq.js";
|
|
3
|
+
import { t as withPrompts } from "../record-Ct_MZeZC.js";
|
|
4
4
|
export { AgentTree, Conversation, VirtualList, indexRecord, recordFlowTrace, model_exports as recordModel, withPrompts };
|
package/dist/run.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as TraceWaterfallProps, A as ToolCallData, B as taskProgress, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as isOpen, G as TraceWorkspace, H as LatestEvents, I as parseToolEvent, J as AgentStreamState, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, Q as TraceWaterfall, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, X as foldAgentRows, Y as AgentTranscriptEntry, Z as useAgentStream, _ as RunPhaseList, a as ApprovalPlanStep, b as RunRowStatus, c as FeedSegment, d as InlineToolItem, et as traceSpanMark, 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 AgentStreamRow, 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 statusMeta } from "./index-YU_b9xCK.js";
|
|
2
2
|
import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
|
|
3
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 };
|
|
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, isOpen, parseToolEvent, recordFlowTrace, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|
package/dist/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { d as recordFlowTrace, l as model_exports, n as Conversation, o as indexRecord, t as AgentTree } from "./AgentTree-
|
|
4
|
-
import { t as withPrompts } from "./record-
|
|
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";
|
|
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 };
|
|
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-BiJbv9WQ.js";
|
|
3
|
+
import { d as recordFlowTrace, l as model_exports, n as Conversation, o as indexRecord, t as AgentTree } from "./AgentTree-CJRVpgPq.js";
|
|
4
|
+
import { t as withPrompts } from "./record-Ct_MZeZC.js";
|
|
5
|
+
import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, isOpen, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "@tangle-network/ui/run";
|
|
6
|
+
export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|