@tangle-network/sandbox-ui 0.94.2 → 0.95.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.
- package/dist/{WorkflowGraph-4TQFLY3E.js → WorkflowGraph-MPNVC5FE.js} +417 -143
- package/dist/{chunk-TIEOKIMX.js → chunk-3GX5BSD4.js} +251 -71
- package/dist/{chunk-7QKAVIZX.js → chunk-O7MHUR4U.js} +111 -9
- package/dist/globals.css +21 -0
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{sdk-hooks-VtiMwKa6.d.ts → sdk-hooks-Cjt_Wq7g.d.ts} +7 -1
- package/dist/sdk-hooks.d.ts +1 -1
- package/dist/sdk-hooks.js +1 -1
- package/dist/styles.css +21 -0
- package/dist/workflows.d.ts +35 -5
- package/dist/workflows.js +2 -2
- package/package.json +2 -1
package/dist/hooks.js
CHANGED
|
@@ -19,15 +19,19 @@ import {
|
|
|
19
19
|
useToolCallStream
|
|
20
20
|
} from "./chunk-SOKKTB7W.js";
|
|
21
21
|
import {
|
|
22
|
+
SESSION_STREAM_RECONNECT_DELAY_MS,
|
|
23
|
+
SessionStreamError,
|
|
22
24
|
useSessionStream,
|
|
23
25
|
useSidecarAuth
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3GX5BSD4.js";
|
|
25
27
|
import {
|
|
26
28
|
usePtySession
|
|
27
29
|
} from "./chunk-KEYPUGS3.js";
|
|
28
30
|
import "./chunk-CZ7CSFO4.js";
|
|
29
31
|
export {
|
|
30
32
|
RealtimeSessionRegistry,
|
|
33
|
+
SESSION_STREAM_RECONNECT_DELAY_MS,
|
|
34
|
+
SessionStreamError,
|
|
31
35
|
createAuthFetcher,
|
|
32
36
|
useApiKey,
|
|
33
37
|
useAuth,
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { AuthHeader, AuthHeaderProps, GitHubLoginButton, GitHubLoginButtonProps,
|
|
|
16
16
|
export { TangleLoginButton, TangleLoginButtonProps } from './auth.js';
|
|
17
17
|
export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AuthUser, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, TaskStreamEvent, TerminalStreamEvent, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream } from '@tangle-network/ui/hooks';
|
|
18
18
|
export { SandboxMetrics, SidecarMetricsPayload, UsePtySessionOptions, UsePtySessionReturn, UseSandboxMetricsOptions, UseSandboxMetricsResult, useCreateSession, useDeleteSession, usePtySession, useRenameSession, useSandboxMetrics, useSessions } from './hooks.js';
|
|
19
|
-
export { S as SessionInfo, a as SidecarAuth, U as UseSessionStreamOptions, b as UseSessionStreamResult, c as UseSidecarAuthOptions, u as useSessionStream, d as useSidecarAuth } from './sdk-hooks-
|
|
19
|
+
export { S as SessionInfo, a as SidecarAuth, U as UseSessionStreamOptions, b as UseSessionStreamResult, c as UseSidecarAuthOptions, u as useSessionStream, d as useSidecarAuth } from './sdk-hooks-Cjt_Wq7g.js';
|
|
20
20
|
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, RegisterActiveSessionOptions, SessionProjectKey, activeSessionsAtom, addMessage, addParts, bumpActiveSessionActivity, clearChat, getActiveSession, getAllActiveSessions, getAllProjectActivity, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getTotalRunningSessionCount, hasBackgroundRunningSessions, isStreamingAtom, messagesAtom, partMapAtom, registerActiveSession, resetActiveSessions, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useHasBackgroundRunningSessions, useNavbarSessions, useProjectActivity, useProjectSessions, useSessionsByActivity, useTotalRunningSessions } from '@tangle-network/ui/stores';
|
|
21
21
|
export { ChatSession, connectSession, disconnectSession, sessionAtom } from './stores.js';
|
|
22
22
|
export { AgentBranding, CustomToolRenderer, DisplayVariant, FinalTextPart, GroupedMessage, MessageRun, MessageUser, ReasoningPart, Run, RunStats, SessionMessage, SessionPart, TextPart, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime } from '@tangle-network/ui/types';
|
package/dist/index.js
CHANGED
|
@@ -56,6 +56,12 @@ interface UseSessionStreamResult {
|
|
|
56
56
|
/** Whether the SSE connection is active. */
|
|
57
57
|
connected: boolean;
|
|
58
58
|
}
|
|
59
|
+
declare class SessionStreamError extends Error {
|
|
60
|
+
readonly code: string;
|
|
61
|
+
readonly status?: number;
|
|
62
|
+
constructor(code: string, message: string, status?: number);
|
|
63
|
+
}
|
|
64
|
+
declare const SESSION_STREAM_RECONNECT_DELAY_MS = 1000;
|
|
59
65
|
/**
|
|
60
66
|
* Streams chat messages from a sidecar session gateway via SSE.
|
|
61
67
|
*
|
|
@@ -96,4 +102,4 @@ interface SidecarAuth {
|
|
|
96
102
|
*/
|
|
97
103
|
declare function useSidecarAuth({ resourceId, apiUrl, signMessage }: UseSidecarAuthOptions): SidecarAuth;
|
|
98
104
|
|
|
99
|
-
export { type SessionInfo as S, type UseSessionStreamOptions as U, type SidecarAuth as a, type UseSessionStreamResult as b, type UseSidecarAuthOptions as c, useSidecarAuth as d, type SendMessageOptions as
|
|
105
|
+
export { type SessionInfo as S, type UseSessionStreamOptions as U, type SidecarAuth as a, type UseSessionStreamResult as b, type UseSidecarAuthOptions as c, useSidecarAuth as d, SESSION_STREAM_RECONNECT_DELAY_MS as e, type SendMessageOptions as f, SessionStreamError as g, useSessionStream as u };
|
package/dist/sdk-hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream } from '@tangle-network/ui/sdk-hooks';
|
|
2
|
-
export { S as SessionInfo, a as SidecarAuth, U as UseSessionStreamOptions, b as UseSessionStreamResult, c as UseSidecarAuthOptions, u as useSessionStream, d as useSidecarAuth } from './sdk-hooks-
|
|
2
|
+
export { S as SessionInfo, a as SidecarAuth, U as UseSessionStreamOptions, b as UseSessionStreamResult, c as UseSidecarAuthOptions, u as useSessionStream, d as useSidecarAuth } from './sdk-hooks-Cjt_Wq7g.js';
|
|
3
3
|
import '@tangle-network/agent-interface';
|
|
4
4
|
import '@tangle-network/ui/types';
|
package/dist/sdk-hooks.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -643,6 +643,24 @@
|
|
|
643
643
|
-webkit-box-orient: vertical;
|
|
644
644
|
-webkit-line-clamp: 3;
|
|
645
645
|
}
|
|
646
|
+
.line-clamp-4 {
|
|
647
|
+
overflow: hidden;
|
|
648
|
+
display: -webkit-box;
|
|
649
|
+
-webkit-box-orient: vertical;
|
|
650
|
+
-webkit-line-clamp: 4;
|
|
651
|
+
}
|
|
652
|
+
.line-clamp-5 {
|
|
653
|
+
overflow: hidden;
|
|
654
|
+
display: -webkit-box;
|
|
655
|
+
-webkit-box-orient: vertical;
|
|
656
|
+
-webkit-line-clamp: 5;
|
|
657
|
+
}
|
|
658
|
+
.line-clamp-6 {
|
|
659
|
+
overflow: hidden;
|
|
660
|
+
display: -webkit-box;
|
|
661
|
+
-webkit-box-orient: vertical;
|
|
662
|
+
-webkit-line-clamp: 6;
|
|
663
|
+
}
|
|
646
664
|
.block {
|
|
647
665
|
display: block;
|
|
648
666
|
}
|
|
@@ -805,6 +823,9 @@
|
|
|
805
823
|
.h-\[28rem\] {
|
|
806
824
|
height: 28rem;
|
|
807
825
|
}
|
|
826
|
+
.h-\[30rem\] {
|
|
827
|
+
height: 30rem;
|
|
828
|
+
}
|
|
808
829
|
.h-\[32rem\] {
|
|
809
830
|
height: 32rem;
|
|
810
831
|
}
|
package/dist/workflows.d.ts
CHANGED
|
@@ -106,6 +106,9 @@ interface WfNodeData extends Record<string, unknown> {
|
|
|
106
106
|
/** Live run state, merged in by the host at render time (never from YAML). */
|
|
107
107
|
state?: WfNodeState;
|
|
108
108
|
}
|
|
109
|
+
/** Which edge of a node box an edge attaches to. Named in plain compass terms
|
|
110
|
+
* rather than React Flow's `Position` so the layouter stays free of it. */
|
|
111
|
+
type WfSide = "left" | "right" | "top" | "bottom";
|
|
109
112
|
interface WfNode {
|
|
110
113
|
id: string;
|
|
111
114
|
position: {
|
|
@@ -118,6 +121,15 @@ interface WfNode {
|
|
|
118
121
|
width: number;
|
|
119
122
|
height: number;
|
|
120
123
|
data: WfNodeData;
|
|
124
|
+
/**
|
|
125
|
+
* Where this node's edges attach, when the LAYOUT decides rather than the
|
|
126
|
+
* flow direction. A straight layer flow has one answer for every node (edges
|
|
127
|
+
* enter the leading edge and leave the trailing one, per `direction`), so it
|
|
128
|
+
* sets neither and the renderer derives both. A folded layout does not — a row
|
|
129
|
+
* that runs right-to-left mirrors them. Absent ⇒ derive from `direction`.
|
|
130
|
+
*/
|
|
131
|
+
sourceSide?: WfSide;
|
|
132
|
+
targetSide?: WfSide;
|
|
121
133
|
}
|
|
122
134
|
/**
|
|
123
135
|
* Node ids are PUBLIC contract, not an internal detail. A host keys its live
|
|
@@ -217,6 +229,13 @@ interface BuildWorkflowGraphOptions {
|
|
|
217
229
|
/** Collapse every node to the fixed icon-tile size, and pitch the layers for
|
|
218
230
|
* it. Defaults to `false` (the full, expanded card). */
|
|
219
231
|
compact?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Fold a long single-file pipeline into rows instead of one unbounded line,
|
|
234
|
+
* so it occupies both axes of the panel rather than running off one edge.
|
|
235
|
+
* Only a straight chain folds — a graph with any fan-out keeps its layered
|
|
236
|
+
* flow, whose branches need the cross axis. "LR" only. Defaults to `false`.
|
|
237
|
+
*/
|
|
238
|
+
wrap?: boolean;
|
|
220
239
|
/**
|
|
221
240
|
* The graph's DECLARED topology. Omit — the default — and edges are inferred
|
|
222
241
|
* from `do`-list order: a linear spine, which is exactly right for a workflow
|
|
@@ -250,14 +269,25 @@ interface WorkflowGraphProps {
|
|
|
250
269
|
/** Flow direction: "LR" (default) reads left-to-right — best for the wide/short
|
|
251
270
|
* run-detail panel; "TB" is a vertical column. */
|
|
252
271
|
direction?: WfDirection;
|
|
253
|
-
/**
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
272
|
+
/**
|
|
273
|
+
* Start collapsed (compact icon tiles) rather than expanded.
|
|
274
|
+
*
|
|
275
|
+
* Defaults to whether the graph has a RUN: a definition is read
|
|
276
|
+
* structure-first, so it opens as tiles, while a run is read result-first and
|
|
277
|
+
* opens as cards — the answers are the reason the reader opened it. Passing
|
|
278
|
+
* the prop pins the density either way; the full variant still exposes the
|
|
279
|
+
* toggle, and the preview variant is always compact.
|
|
280
|
+
*/
|
|
258
281
|
defaultCompact?: boolean;
|
|
259
282
|
/** Sizing for the wrapper; the caller controls height. */
|
|
260
283
|
className?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Fold a long single-file pipeline into rows instead of one unbounded line,
|
|
286
|
+
* so it uses both axes of the panel rather than running off one edge. Only a
|
|
287
|
+
* straight chain folds; anything with fan-out keeps its layered flow. "LR"
|
|
288
|
+
* only. Defaults to `false`.
|
|
289
|
+
*/
|
|
290
|
+
wrap?: boolean;
|
|
261
291
|
/**
|
|
262
292
|
* Live per-node run state, keyed by graph node id (`trigger`, `a0`, `a0-b1`).
|
|
263
293
|
* Absent ⇒ the static definition view (the proposal-card preview passes
|
package/dist/workflows.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
buildWorkflowGraph,
|
|
6
6
|
triggerNodeId,
|
|
7
7
|
triggerNodeIndex
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-O7MHUR4U.js";
|
|
9
9
|
import {
|
|
10
10
|
ModelBrandStack,
|
|
11
11
|
modelBrandFor
|
|
@@ -36,7 +36,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
|
|
|
36
36
|
function lazyWorkflowGraph() {
|
|
37
37
|
return lazy(
|
|
38
38
|
() => retryImport(
|
|
39
|
-
() => import("./WorkflowGraph-
|
|
39
|
+
() => import("./WorkflowGraph-MPNVC5FE.js").then((m) => ({ default: m.WorkflowGraph }))
|
|
40
40
|
)
|
|
41
41
|
);
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
4
4
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -179,6 +179,7 @@
|
|
|
179
179
|
"@tiptap/starter-kit": "^3.28.0",
|
|
180
180
|
"@tiptap/suggestion": "^3.28.0",
|
|
181
181
|
"diff": "^9.0.0",
|
|
182
|
+
"eventsource-parser": "3.1.0",
|
|
182
183
|
"lucide-react": "^1.25.0",
|
|
183
184
|
"nanostores": "^1.4.1",
|
|
184
185
|
"yaml": "^2.5.0"
|