@tangle-network/sandbox-ui 2.0.7 → 2.0.8
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 +1 -1
- package/dist/index-DDR9iOBQ.d.ts +121 -0
- package/dist/index-VKtnnRkt.d.ts +188 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/{run-BgllNBrW.js → record-DynwQWg_.js} +10 -615
- package/dist/run/record.d.ts +2 -0
- package/dist/run/record.js +1 -0
- package/dist/run-GaIYaht-.js +613 -0
- package/dist/run.d.ts +3 -2
- package/dist/run.js +2 -1
- package/package.json +6 -2
- package/dist/index-D70BfRTV.d.ts +0 -308
package/dist/index-D70BfRTV.d.ts
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { d as AgentGraphNode, n as AgentGraphProps } from "./AgentGraph-DzdpPFEI.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
import { ApprovalCard, ApprovalCardProps, ApprovalDiffFile, ApprovalDiffSummary, ApprovalPlanStep, ExpandedToolDetail, ExpandedToolDetailProps, FeedSegment, InlineThinkingItem as InlineThinkingItem$1, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps, RunPhase, RunPhaseList, RunRowShell as RunRowShell$1, RunRowShellProps, RunRowStatus, RunRowStatusDot, RunStatus, RunStatusIcon as RunStatusIcon$1, RunStatusIconProps, StatusMeta, TaskList, TaskListItem, TaskListProps, TaskStatus, ToolCallData, ToolCallData as ToolCallData$1, ToolCallFeed, ToolCallFeedProps, ToolCallStatus, ToolCallType, parseToolEvent, runStatus as runStatus$1, showsTaskPriority, statusMeta as statusMeta$1, taskProgress, taskStatus } from "@tangle-network/ui/run";
|
|
4
|
-
import { FlowWaterfallProps } from "@tangle-network/charts/react";
|
|
5
|
-
import { FlowMarker, FlowSpan, FlowTrace } from "@tangle-network/charts";
|
|
6
|
-
/** Agent and model spans show their lab/host mark; tool spans show their provider's mark. Unknown keeps the kind glyph. */
|
|
7
|
-
declare function traceSpanMark(span: FlowSpan): ReactNode;
|
|
8
|
-
type TraceWaterfallProps = FlowWaterfallProps;
|
|
9
|
-
/**
|
|
10
|
-
* The run inspector: the agent timeline (`defaultView="agents"`) and the span waterfall over one clock, from
|
|
11
|
-
* `@tangle-network/charts`, with Sandbox UI's brand marks. Feed it `otlpFlowTrace(spans)` from the
|
|
12
|
-
* `traces convert` contract. Import `@tangle-network/charts/react/flow-waterfall.css` once.
|
|
13
|
-
*/
|
|
14
|
-
declare function TraceWaterfall({ renderIcon, ...props }: TraceWaterfallProps): import("react").JSX.Element;
|
|
15
|
-
/** A moment on the run's event track: a release, a check verdict, a spawn, a crash or a steer. */
|
|
16
|
-
interface TraceEvent extends FlowMarker {}
|
|
17
|
-
interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "markers" | "onSelect" | "onTimeChange" | "selectedId" | "onDeselect" | "graph" | "latestEvents"> {
|
|
18
|
-
trace: FlowTrace;
|
|
19
|
-
/** The selected agent's message stream (Server-Sent Events: rows, reset, end; reconnects with ?after=lastSeq). */
|
|
20
|
-
streamUrl?: (agentId: string) => string;
|
|
21
|
-
events?: TraceEvent[];
|
|
22
|
-
/** The time the reader moved to, in trace ms; null while following live or showing the whole run. */
|
|
23
|
-
onTimeChange?: (t: number | null) => void;
|
|
24
|
-
/**
|
|
25
|
-
* The code workspace as of the cursor and scoped to the selected agent, usually a WorkspaceFilesPane: the page answers
|
|
26
|
-
* the as-of query. It spans the full width and at least 70% of the viewport. Keep its key on the commit so a scrub
|
|
27
|
-
* keeps its state.
|
|
28
|
-
*/
|
|
29
|
-
files?: ReactNode;
|
|
30
|
-
/** The scoreboard as of the cursor, under the code workspace; omitted when not given. */
|
|
31
|
-
scoreboard?: ReactNode;
|
|
32
|
-
selectedAgentId?: string;
|
|
33
|
-
/** Called with the agent the reader selected, or undefined when they close its drawer or press Escape. */
|
|
34
|
-
onSelectAgent?: (agentId: string | undefined) => void;
|
|
35
|
-
/**
|
|
36
|
-
* What the trace cannot say about a live agent, by agent id: its activity, thinking line, latest events, commits or
|
|
37
|
-
* result. Timed agents follow the trace cursor. Workers without recorded timing retain their live identity and metadata.
|
|
38
|
-
*/
|
|
39
|
-
agentCards?: Readonly<Record<string, Partial<AgentGraphNode>>>;
|
|
40
|
-
/** Existing graph layouts and recorded edges/tools; node identity and clock stay with this workspace. */
|
|
41
|
-
agentGraph?: Partial<Pick<AgentGraphProps, "edges" | "tools" | "calls" | "you" | "direction" | "title" | "className">> & {
|
|
42
|
-
defaultLayout?: AgentGraphProps["layout"];
|
|
43
|
-
};
|
|
44
|
-
className?: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The run workspace: the agent timeline and span waterfall over one clock, the selected agent's conversation
|
|
48
|
-
* streaming in a right-hand drawer, and the page's code workspace and scoreboard following the time cursor. Scrubbing is time travel:
|
|
49
|
-
* every panel shows what was true at the cursor, and the conversation shows what had been said by then.
|
|
50
|
-
*/
|
|
51
|
-
declare function TraceWorkspace({ trace, streamUrl, events, onTimeChange, files, scoreboard, selectedAgentId, onSelectAgent, agentCards, agentGraph, className, ...waterfall }: TraceWorkspaceProps): import("react").JSX.Element;
|
|
52
|
-
/** One row of an agent's message stream (tangle-tools `/api/discovery/runs/<run>/agents/<agent>/stream`). */
|
|
53
|
-
interface AgentStreamRow {
|
|
54
|
-
seq: number;
|
|
55
|
-
/** ISO time the event happened. */
|
|
56
|
-
at: string;
|
|
57
|
-
stream?: string;
|
|
58
|
-
attempt?: number;
|
|
59
|
-
event: {
|
|
60
|
-
kind: "text" | "reasoning" | "tool-call" | "tool-result" | "user" | "notice" | (string & {});
|
|
61
|
-
text?: string;
|
|
62
|
-
/** A notice's origin: the agent's `delegated-input`, its `recorded-result`, or a capture fact such as `capture-unavailable`. */
|
|
63
|
-
provenance?: string;
|
|
64
|
-
toolCallId?: string;
|
|
65
|
-
toolName?: string;
|
|
66
|
-
args?: unknown;
|
|
67
|
-
result?: unknown;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
/** A transcript entry with the time it began, so a time cursor can show the conversation as of any moment. */
|
|
71
|
-
type AgentTranscriptEntry = {
|
|
72
|
-
id: string;
|
|
73
|
-
at: number;
|
|
74
|
-
kind: "message";
|
|
75
|
-
role: "assistant" | "user";
|
|
76
|
-
content: string;
|
|
77
|
-
sealed?: true;
|
|
78
|
-
} | {
|
|
79
|
-
id: string;
|
|
80
|
-
at: number;
|
|
81
|
-
kind: "reasoning";
|
|
82
|
-
text: string;
|
|
83
|
-
} | {
|
|
84
|
-
id: string;
|
|
85
|
-
at: number;
|
|
86
|
-
kind: "tool";
|
|
87
|
-
call: ToolCallData;
|
|
88
|
-
} | {
|
|
89
|
-
id: string;
|
|
90
|
-
at: number;
|
|
91
|
-
kind: "notice";
|
|
92
|
-
text: string;
|
|
93
|
-
};
|
|
94
|
-
interface AgentStreamState {
|
|
95
|
-
generation?: string | number;
|
|
96
|
-
entries: AgentTranscriptEntry[];
|
|
97
|
-
lastSeq: number;
|
|
98
|
-
/** The agent is still producing output. */
|
|
99
|
-
alive: boolean;
|
|
100
|
-
/** Why the stream shows nothing new; a reconnect that delivers rows clears it. */
|
|
101
|
-
error?: string;
|
|
102
|
-
}
|
|
103
|
-
/** Fold stream rows into transcript entries: text of one turn merges, a tool call becomes a row its result completes. */
|
|
104
|
-
declare function foldAgentRows(entries: AgentTranscriptEntry[], rows: readonly AgentStreamRow[]): AgentTranscriptEntry[];
|
|
105
|
-
/**
|
|
106
|
-
* Follow one agent's message stream over Server-Sent Events: `rows`, `reset` and `end` events, reconnecting with
|
|
107
|
-
* `?after=<lastSeq>` when the server closes the connection, so a long turn streams without gaps or repeats.
|
|
108
|
-
*/
|
|
109
|
-
declare function useAgentStream(url: string | undefined): AgentStreamState;
|
|
110
|
-
interface LatestEventsProps {
|
|
111
|
-
agents: readonly AgentGraphNode[];
|
|
112
|
-
n?: number;
|
|
113
|
-
now?: number;
|
|
114
|
-
/** Observe incoming status changes. Disable when scrubbing a trace without an epoch. */
|
|
115
|
-
live?: boolean;
|
|
116
|
-
selectedId?: string | null;
|
|
117
|
-
onSelect?: (id: string) => void;
|
|
118
|
-
}
|
|
119
|
-
/** Recorded events and locally observed state changes. Hover or focus holds the reading position. */
|
|
120
|
-
declare function LatestEvents({ agents, n, now, live, selectedId, onSelect }: LatestEventsProps): import("react").JSX.Element;
|
|
121
|
-
/** Presentation inputs, not a wire schema. Producers validate retained data before rendering it. */
|
|
122
|
-
interface ConversationNode {
|
|
123
|
-
id: string;
|
|
124
|
-
label: string;
|
|
125
|
-
parent: string | null;
|
|
126
|
-
kind: string;
|
|
127
|
-
role?: string;
|
|
128
|
-
assignment?: string;
|
|
129
|
-
model?: string | null;
|
|
130
|
-
servedModel?: string | null;
|
|
131
|
-
start?: string;
|
|
132
|
-
status?: string;
|
|
133
|
-
nativeSessionId?: string;
|
|
134
|
-
agentId?: string;
|
|
135
|
-
joinBasis?: string;
|
|
136
|
-
joinProof?: Record<string, unknown>;
|
|
137
|
-
capture?: {
|
|
138
|
-
status: string;
|
|
139
|
-
};
|
|
140
|
-
[field: string]: unknown;
|
|
141
|
-
}
|
|
142
|
-
interface ConversationEvent {
|
|
143
|
-
id: string;
|
|
144
|
-
node: string;
|
|
145
|
-
at: string;
|
|
146
|
-
end?: string;
|
|
147
|
-
kind: string;
|
|
148
|
-
category: string;
|
|
149
|
-
label: string;
|
|
150
|
-
source?: {
|
|
151
|
-
path: string;
|
|
152
|
-
sha256?: string;
|
|
153
|
-
line?: number;
|
|
154
|
-
pointer?: string;
|
|
155
|
-
[field: string]: unknown;
|
|
156
|
-
} | null;
|
|
157
|
-
detail: {
|
|
158
|
-
role?: string;
|
|
159
|
-
publicText?: string;
|
|
160
|
-
publicationNote?: string | null;
|
|
161
|
-
contentOmitted?: string;
|
|
162
|
-
publicToolCalls?: {
|
|
163
|
-
id: string;
|
|
164
|
-
name: string;
|
|
165
|
-
input?: string;
|
|
166
|
-
publicationNote?: string | null;
|
|
167
|
-
}[];
|
|
168
|
-
toolCallIds?: string[];
|
|
169
|
-
toolNames?: string[];
|
|
170
|
-
toolCallId?: string;
|
|
171
|
-
isError?: boolean;
|
|
172
|
-
responseStatus?: string;
|
|
173
|
-
recordedClaim?: string;
|
|
174
|
-
assessment?: string;
|
|
175
|
-
usage?: {
|
|
176
|
-
input?: number;
|
|
177
|
-
output?: number;
|
|
178
|
-
cacheRead?: number;
|
|
179
|
-
cacheWrite?: number;
|
|
180
|
-
[field: string]: unknown;
|
|
181
|
-
} | null;
|
|
182
|
-
reasoning?: string;
|
|
183
|
-
reasoningOmitted?: number;
|
|
184
|
-
reasoningRedacted?: number;
|
|
185
|
-
durationMs?: number;
|
|
186
|
-
costListUsd?: number;
|
|
187
|
-
clip?: {
|
|
188
|
-
bytes: number;
|
|
189
|
-
sha256: string | null;
|
|
190
|
-
};
|
|
191
|
-
[field: string]: unknown;
|
|
192
|
-
};
|
|
193
|
-
[field: string]: unknown;
|
|
194
|
-
}
|
|
195
|
-
interface ConversationRecord {
|
|
196
|
-
runId: string;
|
|
197
|
-
nodes: ConversationNode[];
|
|
198
|
-
events: ConversationEvent[];
|
|
199
|
-
}
|
|
200
|
-
declare namespace model_d_exports {
|
|
201
|
-
export { RecordIndex, ToolCall, TooltipSection, agentState, callsOf, compact, eventMatches, eventSource, fmt, hostless, hoverLines, indexRecord, interval, measuredUsage, modelIdentity, ms, preview, roleOf, textOf, toolKey, tooltipSections, utcTime };
|
|
202
|
-
}
|
|
203
|
-
interface ToolCall {
|
|
204
|
-
id: string;
|
|
205
|
-
name: string;
|
|
206
|
-
input?: string;
|
|
207
|
-
publicationNote?: string | null;
|
|
208
|
-
}
|
|
209
|
-
declare const ms: (value: string) => number;
|
|
210
|
-
/** Normalize labels to UTC without rewriting the source timestamp. */
|
|
211
|
-
declare function utcTime(value: string, includeDate?: boolean): string;
|
|
212
|
-
declare const compact: (value: string) => string;
|
|
213
|
-
declare function hostless(text: string): string;
|
|
214
|
-
declare function hostless(text: string | undefined): string | undefined;
|
|
215
|
-
declare const fmt: (value: number) => string;
|
|
216
|
-
declare const interval: (value: number) => string;
|
|
217
|
-
declare const roleOf: (node?: ConversationNode) => string;
|
|
218
|
-
declare const textOf: (event: ConversationEvent) => string;
|
|
219
|
-
declare const toolKey: (node: string, id: string) => string;
|
|
220
|
-
declare function callsOf(event: ConversationEvent): ToolCall[];
|
|
221
|
-
/** A tool call's subject: its command, path or question, never its JSON. */
|
|
222
|
-
declare function preview(call: ToolCall): string;
|
|
223
|
-
/** Identity is established by the importer, never inferred from labels or timestamps. */
|
|
224
|
-
declare function indexRecord<R extends ConversationRecord>(record: R): {
|
|
225
|
-
nodes: Map<string, ConversationNode>;
|
|
226
|
-
canonical: (id: string) => string;
|
|
227
|
-
actors: ConversationNode[];
|
|
228
|
-
events: ConversationEvent[];
|
|
229
|
-
byEvent: Map<string, ConversationEvent>;
|
|
230
|
-
recordedOrder: Map<string, number>;
|
|
231
|
-
byActor: Map<string, R["events"][number][]>;
|
|
232
|
-
calls: Map<string, {
|
|
233
|
-
event: R["events"][number];
|
|
234
|
-
call: ToolCall;
|
|
235
|
-
}[]>;
|
|
236
|
-
results: Map<string, R["events"][number][]>;
|
|
237
|
-
start: number;
|
|
238
|
-
end: number;
|
|
239
|
-
};
|
|
240
|
-
type RecordIndex<R extends ConversationRecord = ConversationRecord> = ReturnType<typeof indexRecord<R>>;
|
|
241
|
-
/** Whether any event of this agent recorded token usage or a list price: a status alone measures nothing. */
|
|
242
|
-
declare function measuredUsage(index: RecordIndex, id: string): boolean;
|
|
243
|
-
/** An agent's recorded state, qualified when nothing about it was measured or captured. A live agent has no terminal
|
|
244
|
-
* state yet: `live` is its state while the run runs (Runtime's progress document), and it reads as working. */
|
|
245
|
-
declare function agentState(node: ConversationNode | undefined, measured: boolean, live?: string | null): string;
|
|
246
|
-
declare function eventMatches(event: ConversationEvent, index: RecordIndex, query: string, category: string): boolean;
|
|
247
|
-
declare function eventSource(event: ConversationEvent, record: ConversationRecord, index: RecordIndex): {
|
|
248
|
-
path?: string | undefined;
|
|
249
|
-
sha256?: string;
|
|
250
|
-
line?: number;
|
|
251
|
-
pointer?: string;
|
|
252
|
-
runId: string;
|
|
253
|
-
at: string;
|
|
254
|
-
observedNodeId: string;
|
|
255
|
-
agentId: string | null;
|
|
256
|
-
nativeSessionId: string | null;
|
|
257
|
-
joinBasis: string | null;
|
|
258
|
-
joinProof: Record<string, unknown> | null;
|
|
259
|
-
};
|
|
260
|
-
declare function hoverLines(event: ConversationEvent, index: RecordIndex, cutoff: number): string[];
|
|
261
|
-
/** A declared model is configuration; only response metadata shows which model served. */
|
|
262
|
-
declare function modelIdentity(node: ConversationNode | undefined, record: ConversationRecord): string | null;
|
|
263
|
-
interface TooltipSection {
|
|
264
|
-
kind: 'header' | 'body' | 'usage' | 'status' | 'note';
|
|
265
|
-
label?: string;
|
|
266
|
-
value: string;
|
|
267
|
-
tone?: 'default' | 'error' | 'ok' | 'warn' | 'muted' | 'accent';
|
|
268
|
-
}
|
|
269
|
-
declare function tooltipSections(event: ConversationEvent, index: RecordIndex, cutoff: number): {
|
|
270
|
-
title: string;
|
|
271
|
-
category: string;
|
|
272
|
-
tone: string;
|
|
273
|
-
sections: TooltipSection[];
|
|
274
|
-
};
|
|
275
|
-
interface EventFlag {
|
|
276
|
-
dimension: string;
|
|
277
|
-
label: string;
|
|
278
|
-
polarity: string;
|
|
279
|
-
title: string;
|
|
280
|
-
}
|
|
281
|
-
interface ConversationProps {
|
|
282
|
-
index: RecordIndex;
|
|
283
|
-
actor: string;
|
|
284
|
-
cutoff: number;
|
|
285
|
-
query: string;
|
|
286
|
-
category: string;
|
|
287
|
-
selected?: string;
|
|
288
|
-
/** Open the full text of a clipped body by its source hash. */
|
|
289
|
-
openSource?: (sha256: string, event: ConversationEvent) => void;
|
|
290
|
-
/** Assessment labels that cite an event, drawn in the message gutter. */
|
|
291
|
-
flags?: ReadonlyMap<string, readonly EventFlag[]>;
|
|
292
|
-
onFlag?: (flag: EventFlag, event: ConversationEvent) => void;
|
|
293
|
-
/** Show lifecycle events (spawn, pause, settle) between messages. */
|
|
294
|
-
lifecycle?: boolean;
|
|
295
|
-
/** The agent can still act: a call without a result is pending, not uncaptured. */
|
|
296
|
-
live?: boolean;
|
|
297
|
-
/** Suspend following while the reader browses earlier pages of a live agent. */
|
|
298
|
-
follow?: boolean;
|
|
299
|
-
/** The prompt the agent was started with, when its record holds no prompt of its own (a root's run input). */
|
|
300
|
-
opening?: {
|
|
301
|
-
text: string;
|
|
302
|
-
at: string;
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
declare function Conversation({ index, actor, cutoff, query, category, selected, openSource, flags, onFlag, lifecycle, live, follow, opening }: ConversationProps): import("react").JSX.Element;
|
|
306
|
-
/** The conversation needs an opening prompt even when the provider did not retain its first user turn. */
|
|
307
|
-
declare function withPrompts<T extends ConversationRecord>(record: T): T;
|
|
308
|
-
export { AgentStreamRow as $, ToolCallData$1 as A, taskStatus as B, RunStatusIcon$1 as C, TaskListItem as D, TaskList as E, parseToolEvent as F, RecordIndex as G, Conversation as H, runStatus$1 as I, ConversationEvent as J, indexRecord as K, showsTaskPriority as L, ToolCallFeedProps as M, ToolCallStatus as N, TaskListProps as O, ToolCallType as P, LatestEventsProps as Q, statusMeta$1 as R, RunStatus as S, StatusMeta as T, ConversationProps as U, withPrompts as V, EventFlag as W, ConversationRecord as X, ConversationNode as Y, LatestEvents as Z, RunPhaseList as _, ApprovalPlanStep as a, TraceWorkspace as at, RunRowStatus as b, FeedSegment as c, TraceWaterfallProps as ct, InlineToolItem as d, AgentStreamState as et, InlineToolItemProps as f, RunPhase as g, RunGroupProps as h, ApprovalDiffSummary as i, TraceEvent as it, ToolCallFeed as j, TaskStatus as k, InlineThinkingItem$1 as l, traceSpanMark as lt, RunGroup as m, ApprovalCardProps as n, foldAgentRows as nt, ExpandedToolDetail as o, TraceWorkspaceProps as ot, LiveDuration as p, model_d_exports as q, ApprovalDiffFile as r, useAgentStream as rt, ExpandedToolDetailProps as s, TraceWaterfall as st, ApprovalCard as t, AgentTranscriptEntry as tt, InlineThinkingItemProps as u, RunRowShell$1 as v, RunStatusIconProps as w, RunRowStatusDot as x, RunRowShellProps as y, taskProgress as z };
|