@tangle-network/sandbox-ui 6.0.0 → 7.0.0

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.
@@ -1,5 +1,5 @@
1
1
  import { t as VirtualList } from "./VirtualList-DcSGbEtA.js";
2
- import { C as ms, D as toolKey, E as textOf, T as roleOf, a as isLifecycle, c as anchorsOf, d as collapseIdleTurns, f as collapsePolls, g as eventMatches, h as callsOf, l as answeredBy, m as thinkingMarkers, n as ConversationRowView, o as rowItems, p as quietThinking, t as useFollowTail, u as collapseHollowTurns } from "./use-follow-tail-DZFn7QDO.js";
2
+ import { C as ms, D as toolKey, E as textOf, T as roleOf, a as isLifecycle, c as anchorsOf, d as collapseIdleTurns, f as collapsePolls, g as eventMatches, h as callsOf, l as answeredBy, m as thinkingMarkers, n as ConversationRowView, o as rowItems, p as quietThinking, t as useFollowTail, u as collapseHollowTurns } from "./use-follow-tail-Di1zlndg.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
5
5
  import { AgentTimelineColumn, agentTimelineStepKind } from "@tangle-network/ui/chat/agent-timeline";
@@ -1,5 +1,5 @@
1
- import { C as ms, D as toolKey, E as textOf, O as utcTime, T as roleOf, _ as eventSource, b as interval, g as eventMatches, v as fmt, w as recordFlowTrace, x as modelIdentity, y as indexRecord } from "./use-follow-tail-DZFn7QDO.js";
2
- import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
1
+ import { C as ms, D as toolKey, E as textOf, O as utcTime, T as roleOf, _ as eventSource, b as interval, g as eventMatches, v as fmt, w as recordFlowTrace, x as modelIdentity, y as indexRecord } from "./use-follow-tail-Di1zlndg.js";
2
+ import { n as Conversation, t as AgentTree } from "./AgentTree-abRugBMr.js";
3
3
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "@tangle-network/ui/primitives";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { createContext, memo, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
package/dist/globals.css CHANGED
@@ -404,12 +404,12 @@
404
404
  .bottom-2 {
405
405
  bottom: calc(var(--spacing) * 2);
406
406
  }
407
- .bottom-3 {
408
- bottom: calc(var(--spacing) * 3);
409
- }
410
407
  .bottom-4 {
411
408
  bottom: calc(var(--spacing) * 4);
412
409
  }
410
+ .bottom-14 {
411
+ bottom: calc(var(--spacing) * 14);
412
+ }
413
413
  .bottom-\[-0\.75rem\] {
414
414
  bottom: -0.75rem;
415
415
  }
@@ -482,6 +482,9 @@
482
482
  .z-\[100\] {
483
483
  z-index: 100;
484
484
  }
485
+ .z-\[1100\] {
486
+ z-index: 1100;
487
+ }
485
488
  .order-last {
486
489
  order: 9999;
487
490
  }
@@ -986,9 +989,6 @@
986
989
  .h-\[36rem\] {
987
990
  height: 36rem;
988
991
  }
989
- .h-\[60vh\] {
990
- height: 60vh;
991
- }
992
992
  .h-\[70vh\] {
993
993
  height: 70vh;
994
994
  }
@@ -1112,12 +1112,12 @@
1112
1112
  .max-h-96 {
1113
1113
  max-height: calc(var(--spacing) * 96);
1114
1114
  }
1115
- .max-h-\[35vh\] {
1116
- max-height: 35vh;
1117
- }
1118
1115
  .max-h-\[40\%\] {
1119
1116
  max-height: 40%;
1120
1117
  }
1118
+ .max-h-\[45\%\] {
1119
+ max-height: 45%;
1120
+ }
1121
1121
  .max-h-\[70vh\] {
1122
1122
  max-height: 70vh;
1123
1123
  }
@@ -1244,8 +1244,8 @@
1244
1244
  .min-h-\[200px\] {
1245
1245
  min-height: 200px;
1246
1246
  }
1247
- .min-h-\[480px\] {
1248
- min-height: 480px;
1247
+ .min-h-\[320px\] {
1248
+ min-height: 320px;
1249
1249
  }
1250
1250
  .min-h-full {
1251
1251
  min-height: 100%;
@@ -1472,9 +1472,6 @@
1472
1472
  .w-\[calc\(100vw-32px\)\] {
1473
1473
  width: calc(100vw - 32px);
1474
1474
  }
1475
- .w-\[clamp\(320px\,32vw\,560px\)\] {
1476
- width: clamp(320px, 32vw, 560px);
1477
- }
1478
1475
  .w-\[min\(88vw\,24rem\)\] {
1479
1476
  width: min(88vw, 24rem);
1480
1477
  }
@@ -1571,6 +1568,9 @@
1571
1568
  .max-w-\[220px\] {
1572
1569
  max-width: 220px;
1573
1570
  }
1571
+ .max-w-\[240px\] {
1572
+ max-width: 240px;
1573
+ }
1574
1574
  .max-w-\[320px\] {
1575
1575
  max-width: 320px;
1576
1576
  }
@@ -1919,9 +1919,6 @@
1919
1919
  .resize-none {
1920
1920
  resize: none;
1921
1921
  }
1922
- .resize-x {
1923
- resize: horizontal;
1924
- }
1925
1922
  .resize-y {
1926
1923
  resize: vertical;
1927
1924
  }
@@ -1976,6 +1973,9 @@
1976
1973
  .grid-cols-\[minmax\(0\,1fr\)_minmax\(13rem\,20rem\)\] {
1977
1974
  grid-template-columns: minmax(0,1fr) minmax(13rem,20rem);
1978
1975
  }
1976
+ .grid-cols-\[minmax\(0\,auto\)_minmax\(0\,1fr\)\] {
1977
+ grid-template-columns: minmax(0,auto) minmax(0,1fr);
1978
+ }
1979
1979
  .grid-cols-subgrid {
1980
1980
  grid-template-columns: subgrid;
1981
1981
  }
@@ -2845,9 +2845,6 @@
2845
2845
  .bg-\[var\(--surface-info-bg\)\] {
2846
2846
  background-color: var(--surface-info-bg);
2847
2847
  }
2848
- .bg-\[var\(--surface-info-text\)\] {
2849
- background-color: var(--surface-info-text);
2850
- }
2851
2848
  .bg-\[var\(--surface-neutral-bg\)\] {
2852
2849
  background-color: var(--surface-neutral-bg);
2853
2850
  }
@@ -3016,6 +3013,9 @@
3016
3013
  background-color: color-mix(in oklab, hsl(var(--card)) 90%, transparent);
3017
3014
  }
3018
3015
  }
3016
+ .bg-current {
3017
+ background-color: currentcolor;
3018
+ }
3019
3019
  .bg-destructive {
3020
3020
  background-color: hsl(var(--destructive));
3021
3021
  }
@@ -3579,6 +3579,9 @@
3579
3579
  .text-right {
3580
3580
  text-align: right;
3581
3581
  }
3582
+ .align-\[-3px\] {
3583
+ vertical-align: -3px;
3584
+ }
3582
3585
  .align-middle {
3583
3586
  vertical-align: middle;
3584
3587
  }
@@ -4619,6 +4622,9 @@
4619
4622
  .not-first\:border-\[color\:var\(--border-subtle\)\]:not(:first-child) {
4620
4623
  border-color: var(--border-subtle);
4621
4624
  }
4625
+ .group-open\:rotate-90:is(:where(.group):is([open], :popover-open, :open) *) {
4626
+ rotate: 90deg;
4627
+ }
4622
4628
  .group-focus-within\:opacity-100:is(:where(.group):focus-within *) {
4623
4629
  opacity: 100%;
4624
4630
  }
@@ -4633,6 +4639,9 @@
4633
4639
  --tw-translate-x: calc(var(--spacing) * 0.5);
4634
4640
  translate: var(--tw-translate-x) var(--tw-translate-y);
4635
4641
  }
4642
+ .group-hover\:bg-\[hsl\(var\(--ring\)\)\]:is(:where(.group):hover *) {
4643
+ background-color: hsl(var(--ring));
4644
+ }
4636
4645
  .group-hover\:bg-primary\/20:is(:where(.group):hover *) {
4637
4646
  background-color: hsl(var(--primary));
4638
4647
  }
@@ -4671,6 +4680,12 @@
4671
4680
  opacity: 100%;
4672
4681
  }
4673
4682
  }
4683
+ .group-focus-visible\:w-0\.5:is(:where(.group):focus-visible *) {
4684
+ width: calc(var(--spacing) * 0.5);
4685
+ }
4686
+ .group-focus-visible\:bg-\[hsl\(var\(--ring\)\)\]:is(:where(.group):focus-visible *) {
4687
+ background-color: hsl(var(--ring));
4688
+ }
4674
4689
  .group-focus-visible\:bg-primary\/30:is(:where(.group):focus-visible *) {
4675
4690
  background-color: hsl(var(--primary));
4676
4691
  @supports (color: color-mix(in lab, red, red)) {
@@ -5407,6 +5422,9 @@
5407
5422
  .focus-visible\:outline-offset-2:focus-visible {
5408
5423
  outline-offset: 2px;
5409
5424
  }
5425
+ .focus-visible\:outline-\[hsl\(var\(--ring\)\)\]:focus-visible {
5426
+ outline-color: hsl(var(--ring));
5427
+ }
5410
5428
  .focus-visible\:outline-\[var\(--focus-border\)\]:focus-visible {
5411
5429
  outline-color: var(--focus-border);
5412
5430
  }
@@ -6461,6 +6479,9 @@
6461
6479
  border-style: var(--tw-border-style);
6462
6480
  border-width: 0px;
6463
6481
  }
6482
+ .\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker {
6483
+ display: none;
6484
+ }
6464
6485
  .\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar {
6465
6486
  display: none;
6466
6487
  }
@@ -16761,6 +16782,10 @@ svg.react-flow__connectionline {
16761
16782
  gap: 16px;
16762
16783
  padding: 4px 0;
16763
16784
  }
16785
+ .sandbox-trace-workspace .fw-root {
16786
+ flex: 1 1 auto;
16787
+ min-height: 0;
16788
+ }
16764
16789
  .ws-live {
16765
16790
  min-height: 100dvh;
16766
16791
  padding: 24px;
@@ -36,14 +36,19 @@ interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "marke
36
36
  conversationOpen?: boolean;
37
37
  /** Called with the agent the reader selected, or undefined when they close its drawer or press Escape. */
38
38
  onSelectAgent?: (agentId: string | undefined) => void;
39
- /** Dock the conversation as a resizable pane in the layout instead of a fixed overlay over the right edge. */
39
+ /** Dock the inspector as a resizable split (drag or arrow keys; the width is remembered per viewer) instead of a fixed
40
+ * overlay over the right edge. Below 768px the inspector is always a full-screen sheet. */
40
41
  docked?: boolean;
41
- /** The words that created the selected agent — its parent's commission — pinned above its conversation. */
42
+ /** Why the selected agent has no conversation, when the host knows (no transcript captured, harness without a stream).
43
+ * Shown in place of an empty transcript; without it the inspector says no conversation was recorded. */
44
+ transcriptNote?: (agentId: string) => string | undefined;
45
+ /** The words that created the selected agent — its parent's commission — collapsed above its conversation. */
42
46
  commission?: {
43
47
  by?: string;
44
48
  text?: string;
45
49
  };
46
- /** The host's own account of the selected agent beyond its trace facts, such as its profile: its drawer shows it under them. */
50
+ /** The host's own account of the selected agent beyond its trace facts, such as its profile: shown in the inspector's
51
+ * closed-by-default Details, after the conversation. */
47
52
  renderAgentDrawer?: (agentId: string) => ReactNode;
48
53
  /**
49
54
  * What the trace cannot say about a live agent, by agent id: its activity, thinking line, latest events, commits or
@@ -57,9 +62,9 @@ interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "marke
57
62
  className?: string;
58
63
  }
59
64
  /**
60
- * The run workspace: the agent timeline and span waterfall over one clock, the selected agent's conversation
61
- * streaming in a right-hand drawer, and the page's code workspace and scoreboard following the time cursor. Scrubbing is time travel:
65
+ * The run workspace: the agent timeline and span waterfall over one clock, filling its parent's height, with the selected
66
+ * agent's conversation at the center of its inspector, and the page's code workspace and scoreboard following the time cursor. Scrubbing is time travel:
62
67
  * every panel shows what was true at the cursor, and the conversation shows what had been said by then.
63
68
  */
64
- declare function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, renderAgentDrawer, docked, commission, agentCards, agentGraph, className, ...waterfall }: TraceWorkspaceProps): import("react").JSX.Element;
69
+ declare function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, renderAgentDrawer, transcriptNote, docked, commission, agentCards, agentGraph, className, ...waterfall }: TraceWorkspaceProps): import("react").JSX.Element;
65
70
  export { ToolCallData$1 as A, taskProgress as B, RunStatusIcon$1 as C, TaskListItem as D, TaskList as E, isOpen as F, TraceWorkspace as G, LatestEvents as H, parseToolEvent as I, TraceWaterfallProps as J, TraceWorkspaceProps as K, runStatus$1 as L, ToolCallFeedProps as M, ToolCallStatus as N, TaskListProps as O, ToolCallType as P, showsTaskPriority as R, RunStatus as S, StatusMeta as T, LatestEventsProps as U, taskStatus as V, TraceEvent as W, traceSpanMark as Y, RunPhaseList as _, ApprovalPlanStep as a, RunRowStatus as b, FeedSegment as c, InlineToolItem as d, InlineToolItemProps as f, RunPhase as g, RunGroupProps as h, ApprovalDiffSummary as i, ToolCallFeed as j, TaskStatus as k, InlineThinkingItem as l, RunGroup as m, ApprovalCardProps as n, ExpandedToolDetail as o, LiveDuration as p, TraceWaterfall as q, ApprovalDiffFile as r, ExpandedToolDetailProps as s, ApprovalCard as t, InlineThinkingItemProps as u, RunRowShell as v, RunStatusIconProps as w, RunRowStatusDot as x, RunRowShellProps as y, statusMeta$1 as z };
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ import { C as SandboxArtifactPane, D as SandboxArtifact, E as ChangesPaneProps,
15
15
  import { n as DiffViewProps, t as DiffView } from "./diff-view-DDHWtR6X.js";
16
16
  import { a as PreviewReadiness, i as PreviewAccess, n as EmbeddedAppView, r as EmbeddedAppViewProps, t as EmbeddedApp } from "./embedded-app-view-Ta5GI4hx.js";
17
17
  import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISchemaIssue, OpenUISchemaValidation, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
18
- import { 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 TraceWaterfallProps, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, Y as traceSpanMark, _ 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 TraceWaterfall, 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-D6fZ1Hgz.js";
18
+ import { 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 TraceWaterfallProps, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, Y as traceSpanMark, _ 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 TraceWaterfall, 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-PolYo7h9.js";
19
19
  import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
20
20
  import { C as foldAgentRows, S as AgentTranscriptEntry, _ as ConversationRecord, a as VirtualList, b as AgentStreamRow, c as ConversationProps, d as ToolCall, f as indexRecord, g as ConversationNode, h as ConversationEvent, i as AgentTree, l as EventFlag, m as recordFlowTrace, n as ToolStep, o as withPrompts, p as model_d_exports, r as timelineItems, s as Conversation, t as PromptMore, u as RecordIndex, v as AgentStreamHistory, w as useAgentStream, x as AgentStreamState, y as AgentStreamPage } from "./index-Bv2iiZaN.js";
21
21
  import { n as filterFileNodes, t as fileTreeFromPaths } from "./index-CrN4d8gd.js";
package/dist/index.js CHANGED
@@ -15,10 +15,10 @@ 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";
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
- import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
21
- import { t as withPrompts } from "./record-C-EUpK-n.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-WJTjp2Id.js";
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-Di1zlndg.js";
20
+ import { n as Conversation, t as AgentTree } from "./AgentTree-abRugBMr.js";
21
+ import { t as withPrompts } from "./record-hTSz-cf1.js";
22
22
  import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, isOpen, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "./run.js";
23
23
  import "./vault-tree.js";
24
24
  import { a as TangleLoginButton, i as UserMenu, n as GitHubLoginButton, r as LoginLayout, t as AuthHeader } from "./auth-BDpoZ_2f.js";
@@ -1 +1 @@
1
- export { t as ResearchReport } from "../ResearchReport-D1TFmldm.js";
1
+ export { t as ResearchReport } from "../ResearchReport-BPOmsUFI.js";
@@ -1,6 +1,6 @@
1
1
  import "./VirtualList-DcSGbEtA.js";
2
- import "./use-follow-tail-DZFn7QDO.js";
3
- import "./AgentTree-D4d06rfH.js";
2
+ import "./use-follow-tail-Di1zlndg.js";
3
+ import "./AgentTree-abRugBMr.js";
4
4
  // src/run/record/prompts.ts
5
5
  /** The conversation needs an opening prompt even when the provider did not retain its first user turn. */
6
6
  function withPrompts(record) {
package/dist/record.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as AgentRecord, t as ResearchReport } from "./ResearchReport-D1TFmldm.js";
1
+ import { n as AgentRecord, t as ResearchReport } from "./ResearchReport-BPOmsUFI.js";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo, useRef, useState } from "react";
4
4
  import { useColorMode } from "@tangle-network/charts/react/agent-graph/presentation";
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-WJTjp2Id.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,
@@ -1,5 +1,5 @@
1
1
  import { t as VirtualList } from "../VirtualList-DcSGbEtA.js";
2
- 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";
3
- import { n as Conversation, t as AgentTree } from "../AgentTree-D4d06rfH.js";
4
- import { t as withPrompts } from "../record-C-EUpK-n.js";
2
+ import { S as model_exports, i as ToolStep, r as PromptMore, s as timelineItems, w as recordFlowTrace, y as indexRecord } from "../use-follow-tail-Di1zlndg.js";
3
+ import { n as Conversation, t as AgentTree } from "../AgentTree-abRugBMr.js";
4
+ import { t as withPrompts } from "../record-hTSz-cf1.js";
5
5
  export { AgentTree, Conversation, PromptMore, ToolStep, VirtualList, indexRecord, recordFlowTrace, model_exports as recordModel, timelineItems, withPrompts };
package/dist/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { 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 TraceWaterfallProps, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, Y as traceSpanMark, _ 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 TraceWaterfall, 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-D6fZ1Hgz.js";
1
+ import { 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 TraceWaterfallProps, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, Y as traceSpanMark, _ 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 TraceWaterfall, 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-PolYo7h9.js";
2
2
  import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
3
3
  import { C as foldAgentRows, S as AgentTranscriptEntry, _ as ConversationRecord, a as VirtualList, b as AgentStreamRow, c as ConversationProps, d as ToolCall, f as indexRecord, g as ConversationNode, h as ConversationEvent, i as AgentTree, l as EventFlag, m as recordFlowTrace, n as ToolStep, o as withPrompts, p as model_d_exports, r as timelineItems, s as Conversation, t as PromptMore, u as RecordIndex, v as AgentStreamHistory, w as useAgentStream, x as AgentStreamState, y as AgentStreamPage } from "./index-Bv2iiZaN.js";
4
4
  export { type AgentStreamHistory, type AgentStreamOpener, type AgentStreamPage, 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, PromptMore, 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, ToolStep, type TraceEvent, TraceWaterfall, type TraceWaterfallProps, TraceWorkspace, type TraceWorkspaceProps, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, timelineItems, traceSpanMark, useAgentStream, useEventStream, withPrompts };
package/dist/run.js CHANGED
@@ -1,7 +1,7 @@
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";
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
- import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
5
- import { t as withPrompts } from "./record-C-EUpK-n.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-WJTjp2Id.js";
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-Di1zlndg.js";
4
+ import { n as Conversation, t as AgentTree } from "./AgentTree-abRugBMr.js";
5
+ import { t as withPrompts } from "./record-hTSz-cf1.js";
6
6
  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";
7
7
  export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, PromptMore, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, ToolStep, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, timelineItems, traceSpanMark, useAgentStream, useEventStream, withPrompts };
package/dist/styles.css CHANGED
@@ -404,12 +404,12 @@
404
404
  .bottom-2 {
405
405
  bottom: calc(var(--spacing) * 2);
406
406
  }
407
- .bottom-3 {
408
- bottom: calc(var(--spacing) * 3);
409
- }
410
407
  .bottom-4 {
411
408
  bottom: calc(var(--spacing) * 4);
412
409
  }
410
+ .bottom-14 {
411
+ bottom: calc(var(--spacing) * 14);
412
+ }
413
413
  .bottom-\[-0\.75rem\] {
414
414
  bottom: -0.75rem;
415
415
  }
@@ -482,6 +482,9 @@
482
482
  .z-\[100\] {
483
483
  z-index: 100;
484
484
  }
485
+ .z-\[1100\] {
486
+ z-index: 1100;
487
+ }
485
488
  .order-last {
486
489
  order: 9999;
487
490
  }
@@ -986,9 +989,6 @@
986
989
  .h-\[36rem\] {
987
990
  height: 36rem;
988
991
  }
989
- .h-\[60vh\] {
990
- height: 60vh;
991
- }
992
992
  .h-\[70vh\] {
993
993
  height: 70vh;
994
994
  }
@@ -1112,12 +1112,12 @@
1112
1112
  .max-h-96 {
1113
1113
  max-height: calc(var(--spacing) * 96);
1114
1114
  }
1115
- .max-h-\[35vh\] {
1116
- max-height: 35vh;
1117
- }
1118
1115
  .max-h-\[40\%\] {
1119
1116
  max-height: 40%;
1120
1117
  }
1118
+ .max-h-\[45\%\] {
1119
+ max-height: 45%;
1120
+ }
1121
1121
  .max-h-\[70vh\] {
1122
1122
  max-height: 70vh;
1123
1123
  }
@@ -1244,8 +1244,8 @@
1244
1244
  .min-h-\[200px\] {
1245
1245
  min-height: 200px;
1246
1246
  }
1247
- .min-h-\[480px\] {
1248
- min-height: 480px;
1247
+ .min-h-\[320px\] {
1248
+ min-height: 320px;
1249
1249
  }
1250
1250
  .min-h-full {
1251
1251
  min-height: 100%;
@@ -1472,9 +1472,6 @@
1472
1472
  .w-\[calc\(100vw-32px\)\] {
1473
1473
  width: calc(100vw - 32px);
1474
1474
  }
1475
- .w-\[clamp\(320px\,32vw\,560px\)\] {
1476
- width: clamp(320px, 32vw, 560px);
1477
- }
1478
1475
  .w-\[min\(88vw\,24rem\)\] {
1479
1476
  width: min(88vw, 24rem);
1480
1477
  }
@@ -1571,6 +1568,9 @@
1571
1568
  .max-w-\[220px\] {
1572
1569
  max-width: 220px;
1573
1570
  }
1571
+ .max-w-\[240px\] {
1572
+ max-width: 240px;
1573
+ }
1574
1574
  .max-w-\[320px\] {
1575
1575
  max-width: 320px;
1576
1576
  }
@@ -1919,9 +1919,6 @@
1919
1919
  .resize-none {
1920
1920
  resize: none;
1921
1921
  }
1922
- .resize-x {
1923
- resize: horizontal;
1924
- }
1925
1922
  .resize-y {
1926
1923
  resize: vertical;
1927
1924
  }
@@ -1976,6 +1973,9 @@
1976
1973
  .grid-cols-\[minmax\(0\,1fr\)_minmax\(13rem\,20rem\)\] {
1977
1974
  grid-template-columns: minmax(0,1fr) minmax(13rem,20rem);
1978
1975
  }
1976
+ .grid-cols-\[minmax\(0\,auto\)_minmax\(0\,1fr\)\] {
1977
+ grid-template-columns: minmax(0,auto) minmax(0,1fr);
1978
+ }
1979
1979
  .grid-cols-subgrid {
1980
1980
  grid-template-columns: subgrid;
1981
1981
  }
@@ -2845,9 +2845,6 @@
2845
2845
  .bg-\[var\(--surface-info-bg\)\] {
2846
2846
  background-color: var(--surface-info-bg);
2847
2847
  }
2848
- .bg-\[var\(--surface-info-text\)\] {
2849
- background-color: var(--surface-info-text);
2850
- }
2851
2848
  .bg-\[var\(--surface-neutral-bg\)\] {
2852
2849
  background-color: var(--surface-neutral-bg);
2853
2850
  }
@@ -3016,6 +3013,9 @@
3016
3013
  background-color: color-mix(in oklab, hsl(var(--card)) 90%, transparent);
3017
3014
  }
3018
3015
  }
3016
+ .bg-current {
3017
+ background-color: currentcolor;
3018
+ }
3019
3019
  .bg-destructive {
3020
3020
  background-color: hsl(var(--destructive));
3021
3021
  }
@@ -3579,6 +3579,9 @@
3579
3579
  .text-right {
3580
3580
  text-align: right;
3581
3581
  }
3582
+ .align-\[-3px\] {
3583
+ vertical-align: -3px;
3584
+ }
3582
3585
  .align-middle {
3583
3586
  vertical-align: middle;
3584
3587
  }
@@ -4619,6 +4622,9 @@
4619
4622
  .not-first\:border-\[color\:var\(--border-subtle\)\]:not(:first-child) {
4620
4623
  border-color: var(--border-subtle);
4621
4624
  }
4625
+ .group-open\:rotate-90:is(:where(.group):is([open], :popover-open, :open) *) {
4626
+ rotate: 90deg;
4627
+ }
4622
4628
  .group-focus-within\:opacity-100:is(:where(.group):focus-within *) {
4623
4629
  opacity: 100%;
4624
4630
  }
@@ -4633,6 +4639,9 @@
4633
4639
  --tw-translate-x: calc(var(--spacing) * 0.5);
4634
4640
  translate: var(--tw-translate-x) var(--tw-translate-y);
4635
4641
  }
4642
+ .group-hover\:bg-\[hsl\(var\(--ring\)\)\]:is(:where(.group):hover *) {
4643
+ background-color: hsl(var(--ring));
4644
+ }
4636
4645
  .group-hover\:bg-primary\/20:is(:where(.group):hover *) {
4637
4646
  background-color: hsl(var(--primary));
4638
4647
  }
@@ -4671,6 +4680,12 @@
4671
4680
  opacity: 100%;
4672
4681
  }
4673
4682
  }
4683
+ .group-focus-visible\:w-0\.5:is(:where(.group):focus-visible *) {
4684
+ width: calc(var(--spacing) * 0.5);
4685
+ }
4686
+ .group-focus-visible\:bg-\[hsl\(var\(--ring\)\)\]:is(:where(.group):focus-visible *) {
4687
+ background-color: hsl(var(--ring));
4688
+ }
4674
4689
  .group-focus-visible\:bg-primary\/30:is(:where(.group):focus-visible *) {
4675
4690
  background-color: hsl(var(--primary));
4676
4691
  @supports (color: color-mix(in lab, red, red)) {
@@ -5407,6 +5422,9 @@
5407
5422
  .focus-visible\:outline-offset-2:focus-visible {
5408
5423
  outline-offset: 2px;
5409
5424
  }
5425
+ .focus-visible\:outline-\[hsl\(var\(--ring\)\)\]:focus-visible {
5426
+ outline-color: hsl(var(--ring));
5427
+ }
5410
5428
  .focus-visible\:outline-\[var\(--focus-border\)\]:focus-visible {
5411
5429
  outline-color: var(--focus-border);
5412
5430
  }
@@ -6461,6 +6479,9 @@
6461
6479
  border-style: var(--tw-border-style);
6462
6480
  border-width: 0px;
6463
6481
  }
6482
+ .\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker {
6483
+ display: none;
6484
+ }
6464
6485
  .\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar {
6465
6486
  display: none;
6466
6487
  }
@@ -16761,6 +16782,10 @@ svg.react-flow__connectionline {
16761
16782
  gap: 16px;
16762
16783
  padding: 4px 0;
16763
16784
  }
16785
+ .sandbox-trace-workspace .fw-root {
16786
+ flex: 1 1 auto;
16787
+ min-height: 0;
16788
+ }
16764
16789
  .ws-live {
16765
16790
  min-height: 100dvh;
16766
16791
  padding: 24px;
package/dist/tailwind.css CHANGED
@@ -8443,6 +8443,7 @@ button.tgc-count-label {
8443
8443
  .record-conversation .ar-turn { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 8px; padding-top: 12px; border-top: 1px solid hsl(var(--border)); }
8444
8444
  .record-conversation .ar-turn time, .record-conversation .ar-idle-event time { flex: none; color: hsl(var(--muted-foreground)); font: var(--font-size-sm)/1.5 var(--font-sans); }
8445
8445
  .record-conversation .ar-idle-event { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 4px 0; }
8446
+ .sandbox-trace-workspace .fw-root { flex: 1 1 auto; min-height: 0; }
8446
8447
  .ws-live { min-height: 100dvh; padding: 24px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: 14px/1.5 var(--font-sans, sans-serif); }
8447
8448
  .ws-live > header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
8448
8449
  .ws-live > header h1 { margin: 0 auto 0 0; font: 600 26px/1.3 var(--font-sans, sans-serif); }