@tangle-network/sandbox-ui 0.13.0 → 0.15.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.
Files changed (106) hide show
  1. package/dist/auth.d.ts +1 -74
  2. package/dist/auth.js +1 -4
  3. package/dist/chat.d.ts +1 -136
  4. package/dist/chat.js +2 -15
  5. package/dist/chunk-2BUPSB7O.js +0 -0
  6. package/dist/chunk-3J6FG3FJ.js +18 -0
  7. package/dist/chunk-76IQLPW2.js +206 -0
  8. package/dist/chunk-7ZA5SEK3.js +239 -0
  9. package/dist/{chunk-ESVYBDGA.js → chunk-AG7QDC2Q.js} +182 -2
  10. package/dist/chunk-AHBZCBDO.js +2960 -0
  11. package/dist/chunk-AZ3AWMTM.js +8 -0
  12. package/dist/chunk-CMY7W45U.js +380 -0
  13. package/dist/{chunk-QMU2PWOU.js → chunk-DNZ4DTNA.js} +71 -17
  14. package/dist/chunk-EI44GEQ5.js +6 -0
  15. package/dist/{chunk-5OQ27N57.js → chunk-GPT7VKK6.js} +34 -38
  16. package/dist/chunk-JBGKGLD7.js +16 -0
  17. package/dist/chunk-NJNME4J4.js +14 -0
  18. package/dist/chunk-QPAJR74X.js +20 -0
  19. package/dist/chunk-TK46XFLM.js +28 -0
  20. package/dist/chunk-WID73FPH.js +89 -0
  21. package/dist/chunk-YVXK4XRO.js +30 -0
  22. package/dist/dashboard.d.ts +538 -4
  23. package/dist/dashboard.js +15 -886
  24. package/dist/editor.d.ts +1 -120
  25. package/dist/editor.js +1 -5
  26. package/dist/files.d.ts +1 -129
  27. package/dist/files.js +2 -7
  28. package/dist/globals.css +5 -1265
  29. package/dist/hooks.d.ts +114 -11
  30. package/dist/hooks.js +17 -88
  31. package/dist/index.d.ts +24 -99
  32. package/dist/index.js +247 -252
  33. package/dist/markdown.d.ts +1 -29
  34. package/dist/markdown.js +2 -2
  35. package/dist/openui.d.ts +8 -115
  36. package/dist/openui.js +1 -6
  37. package/dist/pages.d.ts +1 -2
  38. package/dist/pages.js +68 -66
  39. package/dist/primitives.d.ts +14 -49
  40. package/dist/primitives.js +69 -77
  41. package/dist/run.d.ts +1 -14
  42. package/dist/run.js +2 -22
  43. package/dist/sdk-hooks.d.ts +3 -283
  44. package/dist/sdk-hooks.js +10 -14
  45. package/dist/stores.d.ts +2 -14
  46. package/dist/stores.js +11 -39
  47. package/dist/styles.css +5 -1265
  48. package/dist/{usage-chart-CPTcNlGs.d.ts → template-card-UhV3pmRC.d.ts} +16 -1
  49. package/dist/terminal.js +39 -2
  50. package/dist/types.d.ts +11 -8
  51. package/dist/types.js +1 -0
  52. package/dist/utils.d.ts +1 -44
  53. package/dist/utils.js +6 -12
  54. package/dist/workspace.d.ts +5 -10
  55. package/dist/workspace.js +3 -19
  56. package/package.json +23 -54
  57. package/dist/active-sessions-store-CeOmXgv5.d.ts +0 -85
  58. package/dist/artifact-pane-Bh45Ssco.d.ts +0 -24
  59. package/dist/branding-DCi5VEik.d.ts +0 -13
  60. package/dist/button-CMQuQEW_.d.ts +0 -17
  61. package/dist/chat-container-f4yEs6KN.d.ts +0 -106
  62. package/dist/chunk-34A66VBG.js +0 -214
  63. package/dist/chunk-34I7UFSX.js +0 -92
  64. package/dist/chunk-36QY2W5G.js +0 -802
  65. package/dist/chunk-4CLN43XT.js +0 -45
  66. package/dist/chunk-54SQQMMM.js +0 -156
  67. package/dist/chunk-66EZOYZR.js +0 -102
  68. package/dist/chunk-BX6AQMUS.js +0 -183
  69. package/dist/chunk-DI3NZ5ZX.js +0 -192
  70. package/dist/chunk-DPGIXDAI.js +0 -220
  71. package/dist/chunk-DXMIEK4K.js +0 -1426
  72. package/dist/chunk-GSZA3TSY.js +0 -79
  73. package/dist/chunk-HB5Y37YU.js +0 -54
  74. package/dist/chunk-LQNEZDRM.js +0 -109
  75. package/dist/chunk-MA7YKRUP.js +0 -131
  76. package/dist/chunk-MKTSMWVD.js +0 -109
  77. package/dist/chunk-MQXABZTB.js +0 -1348
  78. package/dist/chunk-MT5FJ3ZT.js +0 -186
  79. package/dist/chunk-NKUPJC34.js +0 -2070
  80. package/dist/chunk-OEX7NZE3.js +0 -321
  81. package/dist/chunk-OKLQVY3Y.js +0 -139
  82. package/dist/chunk-Q56BYXQF.js +0 -61
  83. package/dist/chunk-QD4QE5P5.js +0 -40
  84. package/dist/chunk-QDH5GEGY.js +0 -630
  85. package/dist/chunk-QID2OOMG.js +0 -133
  86. package/dist/chunk-RQHJBTEU.js +0 -10
  87. package/dist/chunk-T7HMZEVO.js +0 -216
  88. package/dist/chunk-U6QTHMY6.js +0 -1290
  89. package/dist/chunk-US6JKJKH.js +0 -124
  90. package/dist/chunk-VX3XOUEB.js +0 -63
  91. package/dist/chunk-XLG757B6.js +0 -933
  92. package/dist/chunk-ZMNSRDMH.js +0 -127
  93. package/dist/chunk-ZNCEM5CD.js +0 -316
  94. package/dist/document-editor-pane-A70-EhdQ.d.ts +0 -124
  95. package/dist/document-editor-pane-TLPVRBBU.js +0 -11
  96. package/dist/expanded-tool-detail-Dh99mcbY.d.ts +0 -63
  97. package/dist/file-tabs-BLfxfmAH.d.ts +0 -51
  98. package/dist/parts-CyGkM6Fp.d.ts +0 -50
  99. package/dist/run-CtFZ6s-D.d.ts +0 -41
  100. package/dist/sidebar-drop-zone-tDBsuOH5.d.ts +0 -301
  101. package/dist/sidecar-CFU2W9j1.d.ts +0 -8
  102. package/dist/template-card-BAtvcAkU.d.ts +0 -18
  103. package/dist/tool-call-feed-Bs3MyQMT.d.ts +0 -68
  104. package/dist/tool-display-Ct9nFAzJ.d.ts +0 -32
  105. package/dist/use-sandbox-metrics-B64diPqN.d.ts +0 -141
  106. package/dist/variant-list-BrHYcBCk.d.ts +0 -540
package/dist/hooks.d.ts CHANGED
@@ -1,14 +1,117 @@
1
- export { A as AuthUser, S as SandboxMetrics, a as SidecarMetricsPayload, U as UseAuthOptions, b as UseAuthResult, c as UsePtySessionOptions, d as UsePtySessionReturn, e as UseSandboxMetricsOptions, f as UseSandboxMetricsResult, g as createAuthFetcher, u as useApiKey, h as useAuth, i as useLiveTime, j as usePtySession, k as useSandboxMetrics } from './use-sandbox-metrics-B64diPqN.js';
2
- export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SessionInfo, SidecarAuth, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
1
+ export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AuthUser, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, 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';
3
2
  import * as _tanstack_react_query from '@tanstack/react-query';
4
- import { S as Session } from './sidecar-CFU2W9j1.js';
5
- import 'react';
6
- import './run-CtFZ6s-D.js';
7
- import './parts-CyGkM6Fp.js';
8
- import './active-sessions-store-CeOmXgv5.js';
9
- import 'nanostores';
10
- import './tool-call-feed-Bs3MyQMT.js';
11
- import 'react/jsx-runtime';
3
+ import { Session } from './types.js';
4
+ export { SessionInfo, SidecarAuth, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, useSessionStream, useSidecarAuth } from './sdk-hooks.js';
5
+ import '@tangle-network/ui/types';
6
+ import '@tangle-network/ui/stores';
7
+ import '@tangle-network/ui/sdk-hooks';
8
+
9
+ interface UsePtySessionOptions {
10
+ /** Base URL of the sidecar (e.g. "http://localhost:9100"). */
11
+ apiUrl: string;
12
+ /** Bearer token for authentication. */
13
+ token: string;
14
+ /** Called with raw PTY output (may contain ANSI escape codes). */
15
+ onData: (data: string) => void;
16
+ }
17
+ interface UsePtySessionReturn {
18
+ /** Whether the underlying transport is connected and receiving data. */
19
+ isConnected: boolean;
20
+ /** Connection or API error, if any. */
21
+ error: string | null;
22
+ /** Send a command to the PTY session. */
23
+ sendCommand: (command: string) => Promise<void>;
24
+ /** Safely resize the remote PTY. */
25
+ resizeTerminal: (cols: number, rows: number) => Promise<void>;
26
+ /** Tear down and reconnect. */
27
+ reconnect: () => void;
28
+ }
29
+ /**
30
+ * Manages a PTY session against the sidecar terminal API.
31
+ *
32
+ * Transport:
33
+ * 1. POST /terminals creates the session.
34
+ * 2. The hook tries WebSocket: GET /terminals/:id/ws (Upgrade).
35
+ * - Server → client: TEXT frames carrying raw PTY output.
36
+ * - Client → server: BINARY frames carrying stdin (UTF-8); TEXT
37
+ * frames carrying JSON control messages (`{"type":"resize",...}`).
38
+ * 3. If the WS does not reach OPEN within WS_OPEN_TIMEOUT_MS, or it
39
+ * errors before opening, the hook falls back to SSE+POST:
40
+ * - GET /terminals/:id/stream (SSE for output)
41
+ * - POST /terminals/:id/input (one batched POST at a time)
42
+ * - PATCH /terminals/:id (resize)
43
+ * 4. DELETE /terminals/:id closes the session (both transports).
44
+ *
45
+ * The WS path eliminates the per-keystroke HTTP round-trip that
46
+ * dominates typing latency through edge proxies; the HTTP+SSE path is
47
+ * preserved as a fallback so the hook keeps working against
48
+ * deployments that have not yet shipped the WS endpoint.
49
+ */
50
+ declare function usePtySession({ apiUrl, token, onData }: UsePtySessionOptions): UsePtySessionReturn;
51
+
52
+ /**
53
+ * Shape returned by the sidecar `/metrics/json` endpoint. Only the
54
+ * fields read by this hook are modeled; the sidecar may add more.
55
+ */
56
+ interface SidecarMetricsPayload {
57
+ process?: {
58
+ memoryBytes?: {
59
+ rss?: number;
60
+ heapTotal?: number;
61
+ heapUsed?: number;
62
+ external?: number;
63
+ arrayBuffers?: number;
64
+ };
65
+ cpuSeconds?: {
66
+ user?: number;
67
+ system?: number;
68
+ };
69
+ };
70
+ }
71
+ interface SandboxMetrics {
72
+ /**
73
+ * CPU% derived from consecutive samples. `null` on the first sample
74
+ * because a delta is required. Can exceed 100 on multi-core hosts.
75
+ */
76
+ cpuPercent: number | null;
77
+ rssBytes: number;
78
+ heapUsedBytes: number;
79
+ heapTotalBytes: number;
80
+ }
81
+ interface UseSandboxMetricsOptions {
82
+ /** Sandbox API base URL, e.g. `https://api.tangle.tools`. */
83
+ apiBaseUrl: string;
84
+ /** Sandbox id; when falsy the hook stays idle. */
85
+ sandboxId?: string | null;
86
+ /**
87
+ * Optional bearer token. When omitted the fetch still sends
88
+ * credentials so a cookie session can authenticate the proxy.
89
+ */
90
+ token?: string | null;
91
+ /** Pause polling when false. Defaults to true. */
92
+ enabled?: boolean;
93
+ /** Poll cadence; clamped to a 500ms floor. Defaults to 3000. */
94
+ intervalMs?: number;
95
+ }
96
+ interface UseSandboxMetricsResult {
97
+ metrics: SandboxMetrics | null;
98
+ /**
99
+ * True only until the first successful sample has arrived (or the
100
+ * first one after the target `sandboxId` changes). Subsequent polls
101
+ * do not flip this back to true, so consumers can gate a spinner
102
+ * on it without it flashing on every cycle.
103
+ */
104
+ loading: boolean;
105
+ error: Error | null;
106
+ /** Wall-clock ms of the last successful sample, or null. */
107
+ lastUpdatedAt: number | null;
108
+ }
109
+ /**
110
+ * Polls the sandbox's sidecar metrics through the API proxy and
111
+ * derives a CPU% value from consecutive cumulative-CPU samples. Used
112
+ * by the sandbox overview dashboard to drive live CPU/memory panels.
113
+ */
114
+ declare function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled, intervalMs, }: UseSandboxMetricsOptions): UseSandboxMetricsResult;
12
115
 
13
116
  /** List all sessions for a sidecar. */
14
117
  declare function useSessions(apiUrl: string, token: string | null): _tanstack_react_query.UseQueryResult<Session[], Error>;
@@ -22,4 +125,4 @@ declare function useRenameSession(apiUrl: string, token: string | null): _tansta
22
125
  title: string;
23
126
  }, unknown>;
24
127
 
25
- export { useCreateSession, useDeleteSession, useRenameSession, useSessions };
128
+ export { type SandboxMetrics, type SidecarMetricsPayload, type UsePtySessionOptions, type UsePtySessionReturn, type UseSandboxMetricsOptions, type UseSandboxMetricsResult, useCreateSession, useDeleteSession, usePtySession, useRenameSession, useSandboxMetrics, useSessions };
package/dist/hooks.js CHANGED
@@ -1,101 +1,30 @@
1
1
  import {
2
+ RealtimeSessionRegistry,
2
3
  createAuthFetcher,
3
4
  useApiKey,
4
5
  useAuth,
5
- useLiveTime,
6
- useSandboxMetrics
7
- } from "./chunk-DPGIXDAI.js";
8
- import {
9
- usePtySession
10
- } from "./chunk-ESVYBDGA.js";
11
- import {
12
- RealtimeSessionRegistry,
6
+ useAutoScroll,
7
+ useCreateSession,
8
+ useDeleteSession,
13
9
  useDropdownMenu,
10
+ useLiveTime,
14
11
  useRealtimeSession,
12
+ useRenameSession,
13
+ useRunCollapseState,
14
+ useRunGroups,
15
15
  useSSEStream,
16
+ useSandboxMetrics,
16
17
  useSdkSession,
17
- useSessionStream,
18
- useSidecarAuth,
18
+ useSessions,
19
19
  useToolCallStream
20
- } from "./chunk-DXMIEK4K.js";
21
- import "./chunk-QID2OOMG.js";
22
- import "./chunk-OEX7NZE3.js";
20
+ } from "./chunk-76IQLPW2.js";
23
21
  import {
24
- useAutoScroll,
25
- useRunCollapseState,
26
- useRunGroups
27
- } from "./chunk-54SQQMMM.js";
28
- import "./chunk-MT5FJ3ZT.js";
29
- import "./chunk-BX6AQMUS.js";
30
- import "./chunk-T7HMZEVO.js";
31
- import "./chunk-RQHJBTEU.js";
32
-
33
- // src/hooks/use-session-crud.ts
34
- import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
35
- async function sessionFetch(apiUrl, token, path, opts) {
36
- const res = await fetch(`${apiUrl}${path}`, {
37
- ...opts,
38
- headers: {
39
- "Content-Type": "application/json",
40
- Authorization: `Bearer ${token}`,
41
- ...opts?.headers ?? {}
42
- }
43
- });
44
- if (!res.ok) {
45
- const text = await res.text();
46
- throw new Error(text || `API error: ${res.status}`);
47
- }
48
- return res.json();
49
- }
50
- function useSessions(apiUrl, token) {
51
- return useQuery({
52
- queryKey: ["sessions", apiUrl, token],
53
- queryFn: () => sessionFetch(apiUrl, token, "/session/sessions"),
54
- enabled: !!token,
55
- staleTime: 3e4
56
- });
57
- }
58
- function useCreateSession(apiUrl, token) {
59
- const queryClient = useQueryClient();
60
- return useMutation({
61
- mutationFn: async (title) => {
62
- return sessionFetch(apiUrl, token, "/session/sessions", {
63
- method: "POST",
64
- body: JSON.stringify({ title, backend: { type: "opencode" } })
65
- });
66
- },
67
- onSuccess: () => {
68
- queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
69
- }
70
- });
71
- }
72
- function useDeleteSession(apiUrl, token) {
73
- const queryClient = useQueryClient();
74
- return useMutation({
75
- mutationFn: async (sessionId) => {
76
- return sessionFetch(apiUrl, token, `/session/sessions/${encodeURIComponent(sessionId)}`, {
77
- method: "DELETE"
78
- });
79
- },
80
- onSuccess: () => {
81
- queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
82
- }
83
- });
84
- }
85
- function useRenameSession(apiUrl, token) {
86
- const queryClient = useQueryClient();
87
- return useMutation({
88
- mutationFn: async ({ sessionId, title }) => {
89
- return sessionFetch(apiUrl, token, `/session/sessions/${encodeURIComponent(sessionId)}`, {
90
- method: "PATCH",
91
- body: JSON.stringify({ title })
92
- });
93
- },
94
- onSuccess: () => {
95
- queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
96
- }
97
- });
98
- }
22
+ usePtySession
23
+ } from "./chunk-AG7QDC2Q.js";
24
+ import {
25
+ useSessionStream,
26
+ useSidecarAuth
27
+ } from "./chunk-CMY7W45U.js";
99
28
  export {
100
29
  RealtimeSessionRegistry,
101
30
  createAuthFetcher,
package/dist/index.d.ts CHANGED
@@ -1,101 +1,26 @@
1
- export { B as Button, a as ButtonProps, b as buttonVariants } from './button-CMQuQEW_.js';
2
- export { A as Avatar, a as AvatarFallback, b as AvatarImage, B as Badge, c as BadgeProps, C as Card, d as CardContent, e as CardDescription, f as CardFooter, g as CardHeader, h as CardTitle, D as Dialog, i as DialogClose, j as DialogContent, k as DialogDescription, l as DialogFooter, m as DialogHeader, n as DialogOverlay, o as DialogPortal, p as DialogTitle, q as DialogTrigger, r as DropZone, s as DropZoneProps, t as DropdownMenu, u as DropdownMenuCheckboxItem, v as DropdownMenuContent, w as DropdownMenuGroup, x as DropdownMenuItem, y as DropdownMenuLabel, z as DropdownMenuPortal, E as DropdownMenuRadioGroup, F as DropdownMenuRadioItem, G as DropdownMenuSeparator, H as DropdownMenuShortcut, I as DropdownMenuSub, J as DropdownMenuSubContent, K as DropdownMenuSubTrigger, L as DropdownMenuTrigger, M as EmptyState, N as EmptyStateProps, O as Input, P as InputProps, Q as Label, R as Logo, S as LogoProps, T as Progress, U as Select, V as SelectContent, W as SelectGroup, X as SelectItem, Y as SelectLabel, Z as SelectScrollDownButton, _ as SelectScrollUpButton, $ as SelectSeparator, a0 as SelectTrigger, a1 as SelectValue, a2 as SidebarDropZone, a3 as SidebarDropZoneProps, a4 as Skeleton, a5 as SkeletonCard, a6 as SkeletonTable, a7 as StatCard, a8 as StatCardProps, a9 as Switch, aa as Table, ab as TableBody, ac as TableCaption, ad as TableCell, ae as TableFooter, af as TableHead, ag as TableHeader, ah as TableRow, ai as Tabs, aj as TabsContent, ak as TabsList, al as TabsTrigger, am as TangleKnot, ao as TerminalDisplay, an as TerminalDisplayCursor, ap as TerminalDisplayInput, aq as TerminalDisplayLine, ar as Textarea, as as TextareaProps, at as Toast, au as ToastContainer, av as ToastProvider, aw as UploadFile, ax as UploadProgress, ay as UploadProgressProps, az as badgeVariants, aA as useToast } from './sidebar-drop-zone-tDBsuOH5.js';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ export { ArtifactPane, ArtifactPaneProps, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CodeBlock, CodeBlockProps, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, InlineCode, InlineCodeProps, Input, InputProps, Label, Progress, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TerminalDisplay, TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine, Textarea, TextareaProps, ThemeToggle, Toast, ToastContainer, ToastProvider, UploadFile, UploadProgress, UploadProgressProps, badgeVariants, buttonVariants, useTheme, useToast } from '@tangle-network/ui/primitives';
2
+ export { Logo, LogoProps, TangleKnot } from './primitives.js';
3
+ export { CodeBlock as CodeBlockDisplay, Markdown, MarkdownProps } from '@tangle-network/ui/markdown';
4
4
  export { AgentWorkbench, ApprovalConfidenceStat, ApprovalItem, ApprovalQueue, ApprovalQueueProps, AuditCheck, AuditResults, AuditResultsProps, BannerType, CalendarEvent, CalendarView, CalendarViewProps, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, SessionActivityMonitor, SessionActivityMonitorProps, SessionSidebar, SessionSidebarBadge, SessionSidebarFilter, SessionSidebarItem, SessionSidebarLink, SessionSidebarProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TaskBoard, TaskBoardColumn, TaskBoardItem, TaskBoardProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
5
- export { a as ArtifactPane, A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
6
- export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
7
- export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from './chat.js';
8
- export { C as ChatContainer, a as ChatContainerProps, b as ChatInput, c as ChatInputProps, P as PendingFile } from './chat-container-f4yEs6KN.js';
9
- export { C as Collaborator, a as ConnectionState, D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorUser, u as useEditorContext } from './document-editor-pane-A70-EhdQ.js';
10
- export { CollaboratorsList, EditorToolbar, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState } from './editor.js';
11
- export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-Bs3MyQMT.js';
12
- export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-Dh99mcbY.js';
13
- import * as React$1 from 'react';
14
- import { b as ToolPart } from './parts-CyGkM6Fp.js';
15
- export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
16
- export { F as FileNode, a as FileTabData, b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
17
- export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars } from './files.js';
18
- export { B as Backend, a as BackendSelector, b as BackendSelectorProps, C as ClusterStatusBar, c as ClusterStatusBarProps, d as ClusterStatusItem, e as CreditBalance, f as CreditBalanceProps, D as DashboardLayout, g as DashboardLayoutProps, h as DashboardUser, H as HARNESS_OPTIONS, i as HarnessPicker, j as HarnessPickerProps, k as HarnessType, I as Invoice, l as InvoiceTable, m as InvoiceTableProps, M as ModelInfo, n as ModelPicker, o as ModelPickerProps, p as ModelPickerVariant, q as ModelPreset, N as NavItem, r as NewSandboxCard, s as NewSandboxCardProps, P as PanelConfig, t as PlanCardData, u as PlanCards, v as PlanCardsProps, w as ProductVariant, x as ProfileAvatar, y as ProfileAvatarProps, z as ProfileComparison, A as ProfileComparisonProps, E as ProfileSelector, F as ProfileSelectorProps, R as RailButton, G as RailButtonProps, J as RailModeButton, K as RailModeButtonProps, L as RailSeparator, O as RailSeparatorProps, Q as ResourceMeter, S as ResourceMeterProps, T as SIDEBAR_MOBILE_WIDTH, U as SIDEBAR_PANEL_WIDTH, V as SIDEBAR_RAIL_WIDTH, W as SIDEBAR_TOTAL_WIDTH, X as SandboxCard, Y as SandboxCardData, Z as SandboxCardProps, _ as SandboxStatus, $ as SandboxTable, a0 as SandboxTableProps, a1 as Sidebar, a2 as SidebarContent, a3 as SidebarContentProps, a4 as SidebarPanel, a5 as SidebarPanelContent, a6 as SidebarPanelContentProps, a7 as SidebarPanelHeader, a8 as SidebarPanelHeaderProps, a9 as SidebarPanelProps, aa as SidebarProps, ab as SidebarProvider, ac as SidebarProviderProps, ad as SidebarRail, ae as SidebarRailFooter, af as SidebarRailFooterProps, ag as SidebarRailHeader, ah as SidebarRailHeaderProps, ai as SidebarRailNav, aj as SidebarRailNavProps, ak as SidebarRailProps, al as SidebarUser, am as TopNavLink, an as VariantList, ao as VariantListProps, ap as canonicalModelId, aq as formatContext, ar as formatPricing, as as useSidebar } from './variant-list-BrHYcBCk.js';
19
- export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-CPTcNlGs.js';
20
- export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
21
- export { CodeBlock, CodeBlock as CodeBlockDisplay, CopyButton, Markdown, MarkdownProps } from './markdown.js';
22
- export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
23
- export { S as SandboxMetrics, a as SidecarMetricsPayload, e as UseSandboxMetricsOptions, f as UseSandboxMetricsResult, g as createAuthFetcher, u as useApiKey, h as useAuth, i as useLiveTime, j as usePtySession, k as useSandboxMetrics } from './use-sandbox-metrics-B64diPqN.js';
24
- export { G as GroupedMessage, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
25
- export { S as Session } from './sidecar-CFU2W9j1.js';
26
- export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
27
- export { A as AgentBranding } from './branding-DCi5VEik.js';
28
- export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey } from './active-sessions-store-CeOmXgv5.js';
29
- export { TOOL_CATEGORY_ICONS, cn, copyText, formatBytes, formatDuration, formatUptime, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from './utils.js';
30
- import 'class-variance-authority/types';
31
- import '@radix-ui/react-dialog';
32
- import 'class-variance-authority';
33
- import '@radix-ui/react-avatar';
34
- import '@radix-ui/react-dropdown-menu';
35
- import '@radix-ui/react-select';
36
- import '@radix-ui/react-tabs';
37
- import '@radix-ui/react-progress';
38
- import '@radix-ui/react-switch';
39
- import '@radix-ui/react-label';
40
- import '@hocuspocus/provider';
41
- import 'yjs';
42
- import '@tiptap/react';
43
- import '@pierre/trees';
5
+ export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from '@tangle-network/ui/openui';
6
+ export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatInput, ChatInputProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, PendingFile, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from '@tangle-network/ui/chat';
7
+ export { Collaborator, CollaboratorsList, ConnectionState, DocumentEditorBackend, DocumentEditorMode, DocumentEditorPane, DocumentEditorPaneCollaborationConfig, DocumentEditorPaneProps, EditorContextValue, EditorProvider, EditorProviderProps, EditorTokenRefreshResult, EditorToolbar, EditorUser, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useEditorContext, useYjsState } from '@tangle-network/ui/editor';
8
+ export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps } from '@tangle-network/ui/run';
9
+ export { CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, QuestionPreview, WebSearchPreview, WriteFilePreview } from '@tangle-network/ui/tool-previews';
10
+ export { FileArtifactPane, FileArtifactPaneProps, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, filterFileTree } from '@tangle-network/ui/files';
11
+ export { Backend, BackendConfig, BackendConfigProps, BackendSelector, BackendSelectorProps, BackendStatusData, ClusterStatusBar, ClusterStatusBarProps, ClusterStatusItem, CreditBalance, CreditBalanceProps, DashboardLayout, DashboardLayoutProps, DashboardProfile, DashboardSnapshotInfo, DashboardUser, ExposedPort, GitCommitData, GitPanel, GitPanelProps, GitStatusData, HARNESS_OPTIONS, HarnessPicker, HarnessPickerProps, HarnessType, InfoPanel, InfoPanelProps, Invoice, InvoiceTable, InvoiceTableProps, McpServer, ModelInfo, ModelPicker, ModelPickerProps, ModelPickerVariant, ModelPreset, NavItem, NetworkConfig, NetworkConfigData, NetworkConfigProps, NewSandboxCard, NewSandboxCardProps, PlanCardData, PlanCards, PlanCardsProps, PlanFeature, PortsList, PortsListProps, ProcessInfo, ProcessList, ProcessListProps, ProductVariant, ProfileAvatar, ProfileAvatarProps, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, PromoBanner, PromoBannerProps, RailButton, RailButtonProps, RailModeButton, RailModeButtonProps, RailSeparator, RailSeparatorProps, ResourceMeter, ResourceMeterProps, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, SandboxCardData, SandboxCardProps, SandboxStatus, SandboxTable, SandboxTableProps, Sidebar, SidebarContent, SidebarContentProps, SidebarPanel, SidebarPanelContent, SidebarPanelContentProps, SidebarPanelHeader, SidebarPanelHeaderProps, SidebarPanelProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailFooter, SidebarRailFooterProps, SidebarRailHeader, SidebarRailHeaderProps, SidebarRailNav, SidebarRailNavProps, SidebarRailProps, SidebarUser, SnapshotList, SnapshotListProps, SystemLogsViewer, SystemLogsViewerProps, TeamRole, UsageSummary, UsageSummaryData, UsageSummaryProps, Variant, VariantList, VariantListProps, VariantOutcome, VariantStatus, canAdminSandbox, canonicalModelId, formatContext, formatPricing, useSidebar } from './dashboard.js';
12
+ export { B as BillingBalance, a as BillingDashboard, b as BillingDashboardProps, c as BillingSubscription, d as BillingUsage, P as PricingPage, e as PricingPageProps, f as PricingTier, T as TemplateCard, g as TemplateCardData, h as TemplateCardProps, U as UsageChart, i as UsageChartProps, j as UsageDataPoint, k as formatPrice } from './template-card-UhV3pmRC.js';
13
+ export { AuthHeader, AuthHeaderProps, GitHubLoginButton, GitHubLoginButtonProps, LoginLayout, LoginLayoutProps, SessionUser, UserMenu, UserMenuProps } from '@tangle-network/ui/auth';
14
+ 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';
15
+ export { SandboxMetrics, SidecarMetricsPayload, UsePtySessionOptions, UsePtySessionReturn, UseSandboxMetricsOptions, UseSandboxMetricsResult, useCreateSession, useDeleteSession, usePtySession, useRenameSession, useSandboxMetrics, useSessions } from './hooks.js';
16
+ export { SessionInfo, SidecarAuth, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, useSessionStream, useSidecarAuth } from './sdk-hooks.js';
17
+ 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';
18
+ export { ChatSession, connectSession, disconnectSession, sessionAtom } from './stores.js';
19
+ 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';
20
+ export { Session } from './types.js';
21
+ export { TOOL_CATEGORY_ICONS, cn, copyText, formatBytes, formatDuration, formatUptime, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from '@tangle-network/ui/utils';
22
+ import 'react/jsx-runtime';
23
+ import 'react';
24
+ import '@tanstack/react-query';
25
+ import '@tangle-network/ui/sdk-hooks';
44
26
  import 'nanostores';
45
- import 'clsx';
46
-
47
- type Theme = "light" | "dark" | "system";
48
- declare function useTheme(): {
49
- theme: Theme;
50
- setTheme: (next: Theme) => void;
51
- };
52
- declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
53
-
54
- interface InlineCodeProps extends React.HTMLAttributes<HTMLElement> {
55
- }
56
- declare function InlineCode({ className, children, ...props }: InlineCodeProps): react_jsx_runtime.JSX.Element;
57
-
58
- interface CommandPreviewProps {
59
- part: ToolPart;
60
- }
61
- /**
62
- * Terminal-style command output preview.
63
- * Shows the command, exit code, and stdout/stderr with expand/collapse.
64
- */
65
- declare const CommandPreview: React$1.MemoExoticComponent<({ part }: CommandPreviewProps) => react_jsx_runtime.JSX.Element>;
66
-
67
- interface WriteFilePreviewProps {
68
- part: ToolPart;
69
- }
70
- /**
71
- * Preview for file write/create operations.
72
- * Shows file path, line count, and the written content.
73
- */
74
- declare const WriteFilePreview: React$1.MemoExoticComponent<({ part }: WriteFilePreviewProps) => react_jsx_runtime.JSX.Element | null>;
75
-
76
- interface GrepResultsPreviewProps {
77
- part: ToolPart;
78
- }
79
- declare const GrepResultsPreview: React$1.MemoExoticComponent<({ part }: GrepResultsPreviewProps) => react_jsx_runtime.JSX.Element>;
80
-
81
- interface GlobResultsPreviewProps {
82
- part: ToolPart;
83
- }
84
- declare const GlobResultsPreview: React$1.MemoExoticComponent<({ part }: GlobResultsPreviewProps) => react_jsx_runtime.JSX.Element>;
85
-
86
- interface WebSearchPreviewProps {
87
- part: ToolPart;
88
- }
89
- declare const WebSearchPreview: React$1.MemoExoticComponent<({ part }: WebSearchPreviewProps) => react_jsx_runtime.JSX.Element>;
90
-
91
- interface QuestionPreviewProps {
92
- part: ToolPart;
93
- }
94
- declare const QuestionPreview: React$1.MemoExoticComponent<({ part }: QuestionPreviewProps) => react_jsx_runtime.JSX.Element>;
95
-
96
- interface DiffPreviewProps {
97
- part: ToolPart;
98
- }
99
- declare const DiffPreview: React$1.MemoExoticComponent<({ part }: DiffPreviewProps) => react_jsx_runtime.JSX.Element>;
100
-
101
- export { CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, InlineCode, QuestionPreview, ThemeToggle, ToolPart, WebSearchPreview, WriteFilePreview, useTheme };