@tangle-network/sandbox-ui 0.115.7 → 0.116.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -212,7 +212,12 @@ const partMap: Record<string, SessionPart[]> = {};
212
212
 
213
213
  ### The three-pane shell
214
214
 
215
- For a chats rail · transcript + composer · artifacts layout, hand `SandboxWorkbench` a `SessionSidebar` as its `rail`, your composer as `composer`, and `centerHeader={null}` for the quiet center. `WorkspaceLayout` owns the pane sizes and, when you pass `layout.leftOpen` / `layout.onLeftOpenChange`, the open state too.
215
+ For a chats rail · transcript + composer · artifacts layout, hand `SandboxWorkbench` a `SessionSidebar` as its `rail` and your composer as `composer`.
216
+ The default places the session title and status in the transcript pane header without a second shell row.
217
+ Use `centerHeader={null}` when the transcript should have no pane frame either.
218
+ `WorkspaceLayout` leaves its center row out until a caller supplies `centerHeader`.
219
+ Closed panes get compact edge controls with reserved space beside the transcript.
220
+ It owns pane sizes and, when you pass `layout.leftOpen` / `layout.onLeftOpenChange`, the open state too.
216
221
 
217
222
  ```tsx
218
223
  const [chatsOpen, setChatsOpen] = useState(true);
@@ -1,5 +1,5 @@
1
1
  import { t as cn$1 } from "./utils-DzWbktWG.js";
2
- import { t as WorkspacePaneHeader } from "./workspace-pane-header-C5e7sPaS.js";
2
+ import { t as WorkspacePaneHeader } from "./workspace-pane-header-Bg1cCcHX.js";
3
3
  import { Button } from "@tangle-network/ui/primitives";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import * as React$1 from "react";
package/dist/globals.css CHANGED
@@ -839,8 +839,8 @@
839
839
  .h-\[1em\] {
840
840
  height: 1em;
841
841
  }
842
- .h-\[3px\] {
843
- height: 3px;
842
+ .h-\[9px\] {
843
+ height: 9px;
844
844
  }
845
845
  .h-\[17px\] {
846
846
  height: 17px;
@@ -1190,12 +1190,12 @@
1190
1190
  .w-\[1\.375rem\] {
1191
1191
  width: 1.375rem;
1192
1192
  }
1193
- .w-\[3px\] {
1194
- width: 3px;
1195
- }
1196
1193
  .w-\[5\.5rem\] {
1197
1194
  width: 5.5rem;
1198
1195
  }
1196
+ .w-\[9px\] {
1197
+ width: 9px;
1198
+ }
1199
1199
  .w-\[17px\] {
1200
1200
  width: 17px;
1201
1201
  }
@@ -1319,6 +1319,9 @@
1319
1319
  .max-w-\[14rem\] {
1320
1320
  max-width: 14rem;
1321
1321
  }
1322
+ .max-w-\[35\%\] {
1323
+ max-width: 35%;
1324
+ }
1322
1325
  .max-w-\[45\%\] {
1323
1326
  max-width: 45%;
1324
1327
  }
@@ -1906,6 +1909,9 @@
1906
1909
  .overflow-hidden {
1907
1910
  overflow: hidden;
1908
1911
  }
1912
+ .overflow-visible {
1913
+ overflow: visible;
1914
+ }
1909
1915
  .overflow-x-auto {
1910
1916
  overflow-x: auto;
1911
1917
  }
@@ -2097,12 +2103,6 @@
2097
2103
  border-color: color-mix(in oklab, var(--brand-emerald) 50%, transparent);
2098
2104
  }
2099
2105
  }
2100
- .border-\[var\(--code-error\)\]\/20 {
2101
- border-color: var(--code-error);
2102
- @supports (color: color-mix(in lab, red, red)) {
2103
- border-color: color-mix(in oklab, var(--code-error) 20%, transparent);
2104
- }
2105
- }
2106
2106
  .border-\[var\(--code-number\)\]\/20 {
2107
2107
  border-color: var(--code-number);
2108
2108
  @supports (color: color-mix(in lab, red, red)) {
@@ -2373,12 +2373,6 @@
2373
2373
  .bg-\[var\(--code-error\)\] {
2374
2374
  background-color: var(--code-error);
2375
2375
  }
2376
- .bg-\[var\(--code-error\)\]\/5 {
2377
- background-color: var(--code-error);
2378
- @supports (color: color-mix(in lab, red, red)) {
2379
- background-color: color-mix(in oklab, var(--code-error) 5%, transparent);
2380
- }
2381
- }
2382
2376
  .bg-\[var\(--code-number\)\] {
2383
2377
  background-color: var(--code-number);
2384
2378
  }
@@ -2921,9 +2915,6 @@
2921
2915
  .py-3 {
2922
2916
  padding-block: calc(var(--spacing) * 3);
2923
2917
  }
2924
- .py-3\.5 {
2925
- padding-block: calc(var(--spacing) * 3.5);
2926
- }
2927
2918
  .py-4 {
2928
2919
  padding-block: calc(var(--spacing) * 4);
2929
2920
  }
@@ -3155,9 +3146,6 @@
3155
3146
  .text-\[15px\] {
3156
3147
  font-size: 15px;
3157
3148
  }
3158
- .text-\[17px\] {
3159
- font-size: 17px;
3160
- }
3161
3149
  .text-\[calc\(var\(--font-size-xs\)-1px\)\] {
3162
3150
  font-size: calc(var(--font-size-xs) - 1px);
3163
3151
  }
@@ -3274,10 +3262,6 @@
3274
3262
  --tw-font-weight: var(--font-weight-semibold);
3275
3263
  font-weight: var(--font-weight-semibold);
3276
3264
  }
3277
- .tracking-\[0\.01em\] {
3278
- --tw-tracking: 0.01em;
3279
- letter-spacing: 0.01em;
3280
- }
3281
3265
  .tracking-\[0\.1em\] {
3282
3266
  --tw-tracking: 0.1em;
3283
3267
  letter-spacing: 0.1em;
@@ -3306,10 +3290,6 @@
3306
3290
  --tw-tracking: 0.16em;
3307
3291
  letter-spacing: 0.16em;
3308
3292
  }
3309
- .tracking-\[0\.18em\] {
3310
- --tw-tracking: 0.18em;
3311
- letter-spacing: 0.18em;
3312
- }
3313
3293
  .tracking-\[var\(--tracking-snug\,-0\.01em\)\] {
3314
3294
  --tw-tracking: var(--tracking-snug,-0.01em);
3315
3295
  letter-spacing: var(--tracking-snug,-0.01em);
@@ -3718,6 +3698,10 @@
3718
3698
  --tw-shadow: 0 6px 16px var(--tw-shadow-color, rgba(15,23,42,0.08));
3719
3699
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3720
3700
  }
3701
+ .shadow-\[0_8px_30px_rgba\(0\,0\,0\,0\.18\)\] {
3702
+ --tw-shadow: 0 8px 30px var(--tw-shadow-color, rgba(0,0,0,0.18));
3703
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3704
+ }
3721
3705
  .shadow-\[0_8px_30px_rgba\(0\,0\,0\,0\.45\)\] {
3722
3706
  --tw-shadow: 0 8px 30px var(--tw-shadow-color, rgba(0,0,0,0.45));
3723
3707
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -3989,6 +3973,14 @@
3989
3973
  border-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
3990
3974
  }
3991
3975
  }
3976
+ .group-hover\:bg-primary\/20:is(:where(.group):hover *) {
3977
+ background-color: color-mix(in srgb, hsl(var(--primary)) 20%, transparent);
3978
+ }
3979
+ @supports (color: color-mix(in lab, red, red)) {
3980
+ .group-hover\:bg-primary\/20:is(:where(.group):hover *) {
3981
+ background-color: color-mix(in oklab, var(--color-primary) 20%, transparent);
3982
+ }
3983
+ }
3992
3984
  .group-hover\:text-foreground:is(:where(.group):hover *) {
3993
3985
  color: var(--color-foreground);
3994
3986
  }
@@ -4016,6 +4008,12 @@
4016
4008
  opacity: 100%;
4017
4009
  }
4018
4010
  }
4011
+ .group-focus-visible\:bg-primary\/30:is(:where(.group):focus-visible *) {
4012
+ background-color: color-mix(in srgb, hsl(var(--primary)) 30%, transparent);
4013
+ @supports (color: color-mix(in lab, red, red)) {
4014
+ background-color: color-mix(in oklab, var(--color-primary) 30%, transparent);
4015
+ }
4016
+ }
4019
4017
  .peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled ~ *) {
4020
4018
  cursor: not-allowed;
4021
4019
  }
@@ -4348,14 +4346,6 @@
4348
4346
  background-color: color-mix(in oklab, var(--color-primary) 20%, transparent);
4349
4347
  }
4350
4348
  }
4351
- .hover\:bg-primary\/30:hover {
4352
- background-color: color-mix(in srgb, hsl(var(--primary)) 30%, transparent);
4353
- }
4354
- @supports (color: color-mix(in lab, red, red)) {
4355
- .hover\:bg-primary\/30:hover {
4356
- background-color: color-mix(in oklab, var(--color-primary) 30%, transparent);
4357
- }
4358
- }
4359
4349
  .hover\:bg-primary\/90:hover {
4360
4350
  background-color: color-mix(in srgb, hsl(var(--primary)) 90%, transparent);
4361
4351
  }
@@ -4554,12 +4544,6 @@
4554
4544
  .focus-visible\:bg-background:focus-visible {
4555
4545
  background-color: var(--color-background);
4556
4546
  }
4557
- .focus-visible\:bg-primary\/40:focus-visible {
4558
- background-color: color-mix(in srgb, hsl(var(--primary)) 40%, transparent);
4559
- @supports (color: color-mix(in lab, red, red)) {
4560
- background-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
4561
- }
4562
- }
4563
4547
  .focus-visible\:bg-surface-container:focus-visible {
4564
4548
  background-color: var(--color-surface-container);
4565
4549
  }
@@ -5004,9 +4988,6 @@
5004
4988
  .lg\:p-0 {
5005
4989
  padding: 0px;
5006
4990
  }
5007
- .lg\:p-4 {
5008
- padding: calc(var(--spacing) * 4);
5009
- }
5010
4991
  .lg\:px-8 {
5011
4992
  padding-inline: calc(var(--spacing) * 8);
5012
4993
  }
package/dist/hooks.d.ts CHANGED
@@ -1,69 +1,7 @@
1
+ import { n as UsePtySessionReturn, r as usePtySession, t as UsePtySessionOptions } from "./use-pty-session-DbAYO5uH.js";
1
2
  import { t as Session } from "./sidecar-DgH_vQ6m.js";
2
3
  import { a as SendMessageOptions, c as SessionStreamError, d as useSessionStream, i as SESSION_STREAM_RECONNECT_DELAY_MS, l as UseSessionStreamOptions, n as UseSidecarAuthOptions, o as SessionDegradation, r as useSidecarAuth, s as SessionInfo, t as SidecarAuth, u as UseSessionStreamResult } from "./use-sidecar-auth-CCTJcrq7.js";
3
- import { AgentInteractiveSessionControlClaim } from "@tangle-network/agent-interface";
4
4
  import { 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";
5
- //#region src/hooks/use-pty-session.d.ts
6
- export interface UsePtySessionOptions {
7
- /** Base URL of the sidecar (e.g. "http://localhost:9100"). */
8
- apiUrl: string;
9
- /** Bearer token for authentication. */
10
- token: string;
11
- /** Called with raw PTY output (may contain ANSI escape codes). */
12
- onData: (data: string) => void;
13
- /**
14
- * Stable id identifying this terminal connection to the sidecar.
15
- * Reused on every connect/reconnect so the sidecar restores the same
16
- * PTY session (within its reconnect window) instead of spawning a
17
- * fresh shell. When omitted, a random id is generated per connect —
18
- * so the session does not survive a remount.
19
- */
20
- connectionId?: string;
21
- /**
22
- * Exact incarnation issued for an interactive agent session. When present,
23
- * it must be sent with `control` on every WebSocket init frame.
24
- */
25
- incarnationId?: string;
26
- /** Write claim for the exact interactive agent session. */
27
- control?: AgentInteractiveSessionControlClaim;
28
- }
29
- export interface UsePtySessionReturn {
30
- /** Whether the underlying transport is connected and receiving data. */
31
- isConnected: boolean;
32
- /** Connection or API error, if any. */
33
- error: string | null;
34
- /** Send a command to the PTY session. */
35
- sendCommand: (command: string) => Promise<void>;
36
- /** Safely resize the remote PTY. */
37
- resizeTerminal: (cols: number, rows: number) => Promise<void>;
38
- /** Tear down and reconnect. */
39
- reconnect: () => void;
40
- }
41
- /**
42
- * Manages a PTY session against the sidecar terminal API.
43
- *
44
- * Transport:
45
- * 1. Try the current sidecar WebSocket contract directly:
46
- * GET /terminals/:id/ws, then send `{"type":"init",...}`.
47
- * - Server → client: BINARY frames carrying PTY output; TEXT frames
48
- * carrying lifecycle/control messages.
49
- * - Client → server: TEXT frames carrying JSON input/resize messages.
50
- * 2. If direct WS does not reach server `ready` within
51
- * WS_READY_TIMEOUT_MS, or it errors before ready, fall back to the older
52
- * terminal contract:
53
- * - POST /terminals creates the session.
54
- * - GET /terminals/:id/ws tries the older WS transport.
55
- * - GET /terminals/:id/stream (SSE for output)
56
- * - POST /terminals/:id/input (one batched POST at a time)
57
- * - PATCH /terminals/:id (resize)
58
- * 3. DELETE /terminals/:id closes sessions created by the older REST API.
59
- *
60
- * The WS path eliminates the per-keystroke HTTP round-trip that
61
- * dominates typing latency through edge proxies; the HTTP+SSE path is
62
- * preserved as a fallback so the hook keeps working against
63
- * deployments that have not yet shipped the WS endpoint.
64
- */
65
- export declare function usePtySession({ apiUrl, token, onData, connectionId: providedConnectionId, incarnationId, control }: UsePtySessionOptions): UsePtySessionReturn;
66
- //#endregion
67
5
  //#region src/hooks/use-sandbox-metrics.d.ts
68
6
  /**
69
7
  * Sandbox-level telemetry collected by the sidecar from cgroup v2
@@ -173,14 +111,12 @@ export interface UseSandboxMetricsResult {
173
111
  */
174
112
  history: SandboxMetricsSample[];
175
113
  /**
176
- * True only until the first successful sample has arrived (or the
177
- * first one after the target `sandboxId` changes). Subsequent polls
178
- * do not flip this back to true, so consumers can gate a spinner
179
- * on it without it flashing on every cycle.
114
+ * True while waiting for the first successful metrics response for this
115
+ * sandbox. Errors clear it so consumers can show the failure state.
180
116
  */
181
117
  loading: boolean;
182
118
  error: Error | null;
183
- /** Wall-clock ms of the last successful sample, or null. */
119
+ /** Wall-clock ms of the last successful metrics response, or null. */
184
120
  lastUpdatedAt: number | null;
185
121
  }
186
122
  /**
@@ -203,4 +139,4 @@ export declare function useRenameSession(apiUrl: string, token: string | null):
203
139
  title: string;
204
140
  }, unknown>;
205
141
  //#endregion
206
- export { type AgentStreamEvent, type AppendUserMessageOptions, type ApplySdkEventOptions, type AuthUser, type AutomationStreamEvent, type BeginAssistantMessageOptions, type BotStreamEvent, type CompleteAssistantMessageOptions, type ConnectionState, type RealtimeSessionOptions, RealtimeSessionRegistry, type RealtimeSessionRegistryProps, type RealtimeSessionState, type RealtimeSessionTarget, SESSION_STREAM_RECONNECT_DELAY_MS, type SSEEvent, type SdkSessionAttachment, type SdkSessionEvent, type SdkSessionSeed, SendMessageOptions, SessionDegradation, SessionInfo, SessionStreamError, SidecarAuth, type TaskStreamEvent, type TerminalStreamEvent, type UseAuthOptions, type UseAuthResult, type UseRunGroupsOptions, type UseSSEStreamOptions, type UseSSEStreamResult, type UseSdkSessionOptions, type UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, type UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream };
142
+ export { type AgentStreamEvent, type AppendUserMessageOptions, type ApplySdkEventOptions, type AuthUser, type AutomationStreamEvent, type BeginAssistantMessageOptions, type BotStreamEvent, type CompleteAssistantMessageOptions, type ConnectionState, type RealtimeSessionOptions, RealtimeSessionRegistry, type RealtimeSessionRegistryProps, type RealtimeSessionState, type RealtimeSessionTarget, SESSION_STREAM_RECONNECT_DELAY_MS, type SSEEvent, type SdkSessionAttachment, type SdkSessionEvent, type SdkSessionSeed, SendMessageOptions, SessionDegradation, SessionInfo, SessionStreamError, SidecarAuth, type TaskStreamEvent, type TerminalStreamEvent, type UseAuthOptions, type UseAuthResult, UsePtySessionOptions, UsePtySessionReturn, type UseRunGroupsOptions, type UseSSEStreamOptions, type UseSSEStreamResult, type UseSdkSessionOptions, type UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, type UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useLiveTime, usePtySession, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream };
package/dist/hooks.js CHANGED
@@ -1,9 +1,10 @@
1
- import { t as usePtySession } from "./use-pty-session-C8cE0adT.js";
1
+ import { t as usePtySession } from "./use-pty-session-Bf4hBLXJ.js";
2
2
  import { i as useSessionStream, n as SESSION_STREAM_RECONNECT_DELAY_MS, r as SessionStreamError, t as useSidecarAuth } from "./use-sidecar-auth-DkdcufOz.js";
3
3
  import * as React$1 from "react";
4
4
  import { RealtimeSessionRegistry, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useLiveTime, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream } from "@tangle-network/ui/hooks";
5
5
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
6
6
  //#region src/hooks/use-sandbox-metrics.ts
7
+ const METRICS_REQUEST_TIMEOUT_MS = 15e3;
7
8
  /**
8
9
  * Polls the sandbox's sidecar metrics through the API proxy and
9
10
  * derives a CPU% value from consecutive cumulative-CPU samples. Used
@@ -36,12 +37,19 @@ function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled = true, inter
36
37
  }
37
38
  prevSandboxIdRef.current = sandboxId ?? null;
38
39
  if (!enabled || sandboxCleared) return;
39
- const controller = new AbortController();
40
40
  let cancelled = false;
41
41
  let timeoutId = null;
42
+ let activeRequestController = null;
42
43
  const delay = Math.max(intervalMs, 500);
43
44
  const fetchOnce = async () => {
44
45
  if (!hasLoadedRef.current) setLoading(true);
46
+ const requestController = new AbortController();
47
+ activeRequestController = requestController;
48
+ let requestTimedOut = false;
49
+ const requestTimeoutId = window.setTimeout(() => {
50
+ requestTimedOut = true;
51
+ requestController.abort();
52
+ }, METRICS_REQUEST_TIMEOUT_MS);
45
53
  try {
46
54
  const headers = {};
47
55
  if (token) headers.Authorization = `Bearer ${token}`;
@@ -49,7 +57,7 @@ function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled = true, inter
49
57
  method: "GET",
50
58
  credentials: "include",
51
59
  headers,
52
- signal: controller.signal
60
+ signal: requestController.signal
53
61
  });
54
62
  if (!res.ok) throw new Error(`Metrics request failed (HTTP ${res.status})`);
55
63
  const data = await res.json();
@@ -96,9 +104,14 @@ function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled = true, inter
96
104
  hasLoadedRef.current = true;
97
105
  setLoading(false);
98
106
  } catch (err) {
99
- if (cancelled || err instanceof DOMException && err.name === "AbortError") return;
100
- setError(err instanceof Error ? err : new Error(String(err)));
107
+ if (cancelled) return;
108
+ if (requestTimedOut) setError(/* @__PURE__ */ new Error(`Metrics request timed out after ${METRICS_REQUEST_TIMEOUT_MS / 1e3} seconds`));
109
+ else if (err instanceof DOMException && err.name === "AbortError") return;
110
+ else setError(err instanceof Error ? err : new Error(String(err)));
101
111
  if (!hasLoadedRef.current) setLoading(false);
112
+ } finally {
113
+ window.clearTimeout(requestTimeoutId);
114
+ if (activeRequestController === requestController) activeRequestController = null;
102
115
  }
103
116
  };
104
117
  const runLoop = async () => {
@@ -110,7 +123,7 @@ function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled = true, inter
110
123
  runLoop();
111
124
  return () => {
112
125
  cancelled = true;
113
- controller.abort();
126
+ activeRequestController?.abort();
114
127
  if (timeoutId !== null) window.clearTimeout(timeoutId);
115
128
  };
116
129
  }, [
@@ -96,10 +96,9 @@ interface WorkspaceLayoutProps {
96
96
  /** Extra classes for the right pane's scrolling content wrapper. */
97
97
  rightContentClassName?: string;
98
98
  /**
99
- * `always` (default) keeps the center header row whenever a side or bottom
100
- * pane exists, so pane headers line up across the shell even while the row
101
- * is empty. `auto` renders the row only while it has content: a
102
- * `centerHeader`, or an open-pane toggle for a closed pane.
99
+ * `auto` (default) reserves the center row only for `centerHeader`.
100
+ * Closed panes get narrow edge controls beside the content instead of a
101
+ * full-width row. `always` aligns every pane to the 56px header row.
103
102
  */
104
103
  centerHeaderVisibility?: "always" | "auto";
105
104
  className?: string;
@@ -136,7 +135,7 @@ declare function DirectoryPane({ root, selectedPath, onSelect, onRefresh, onUplo
136
135
  //#endregion
137
136
  //#region src/workspace/status-banner.d.ts
138
137
  /**
139
- * StatusBanner — full-width notification banner for connection/provisioning states.
138
+ * StatusBanner — inline notice for connection and provisioning states.
140
139
  */
141
140
  type BannerType = "provisioning" | "connecting" | "error" | "warning" | "success" | "info";
142
141
  interface StatusBannerProps {
@@ -542,7 +541,7 @@ interface SandboxWorkbenchSessionProps extends Omit<ChatContainerProps, "classNa
542
541
  meta?: ReactNode;
543
542
  headerActions?: ReactNode;
544
543
  /**
545
- * Controls rendered as a strip attached beneath the chat composer —
544
+ * Controls rendered above the composer in the same centered column —
546
545
  * harness/model/effort pickers, token meters, etc. Use
547
546
  * `AgentSessionControls` from `@tangle-network/agent-app/web-react` for the
548
547
  * standard set.
@@ -562,17 +561,15 @@ interface SandboxWorkbenchProps {
562
561
  subtitle?: ReactNode;
563
562
  status?: ReactNode;
564
563
  /**
565
- * Header above the transcript. `undefined` keeps the branded session card
566
- * (`Tangle Sandbox` / `title` / `status`), a node replaces it, and `null`
567
- * removes it: the transcript then renders directly on `bg-surface` with no
568
- * eyebrow/title frame around it, and the shell's center header row appears
569
- * only while it holds an open-pane toggle.
564
+ * Optional header above the transcript. By default, `title`, `subtitle`,
565
+ * and `status` live in the transcript pane's own header, with no separate
566
+ * shell row. A node adds a distinct shell header. `null` removes the pane
567
+ * frame too and renders the transcript directly on `bg-background`.
570
568
  */
571
569
  centerHeader?: ReactNode | null;
572
570
  /**
573
- * Composer rendered under the transcript on the panel background, inside the
574
- * transcript's own `max-w-3xl` column. `session.composerControls`, when
575
- * also given, sits above it as before.
571
+ * Composer rendered under the transcript in the same centered column as
572
+ * `session.composerControls`.
576
573
  */
577
574
  composer?: ReactNode;
578
575
  /**
package/dist/index.d.ts CHANGED
@@ -4,11 +4,12 @@ import { $ as HARNESS_BRAND, $t as useSidebar, A as Variant, An as SidebarProps,
4
4
  import { a as modelBrandFor, i as canonicalModelId, n as ModelBrandStack, r as ModelInfo, t as ModelBrandIdentity } from "./model-brand-B9A4H9pJ.js";
5
5
  import { a as UsageChartProps, c as PricingPageProps, d as BillingBalance, f as BillingDashboard, h as BillingUsage, i as UsageChart, l as PricingTier, m as BillingSubscription, n as TemplateCardData, o as UsageDataPoint, p as BillingDashboardProps, r as TemplateCardProps, s as PricingPage, t as TemplateCard, u as formatPrice } from "./template-card-L-4gmjx2.js";
6
6
  import { C as getCodeLanguage, D as resolveFilePreviewKind, E as parseCsv, S as filterFileTree, T as getSyntaxLanguage, _ as RichFileTreeGitStatus, a as FileNode, b as detectFileFormat, c as FilePreviewProps, d as FileTabsProps, f as FileTree, g as RichFileTreeGitEntry, h as RichFileTree, i as FileFormat, l as FileTabData, m as FileTreeVisibilityOptions, n as FileArtifactPane, o as FilePreview, p as FileTreeProps, r as FileArtifactPaneProps, s as FilePreviewKind, t as CSV_PREVIEW_ROW_LIMIT, u as FileTabs, v as RichFileTreeProps, w as getFormatLabel, x as fileExtension, y as RichFileTreeThemeVars } from "./index-CXX5IpH2.js";
7
+ import { n as UsePtySessionReturn, r as usePtySession, t as UsePtySessionOptions } from "./use-pty-session-DbAYO5uH.js";
7
8
  import { t as Session } from "./sidecar-DgH_vQ6m.js";
8
9
  import { d as useSessionStream, l as UseSessionStreamOptions, n as UseSidecarAuthOptions, o as SessionDegradation, r as useSidecarAuth, s as SessionInfo, t as SidecarAuth, u as UseSessionStreamResult } from "./use-sidecar-auth-CCTJcrq7.js";
9
- import { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AuthUser, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SandboxMetrics, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SidecarMetricsPayload, TaskStreamEvent, TerminalStreamEvent, UseAuthOptions, UseAuthResult, UsePtySessionOptions, UsePtySessionReturn, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSandboxMetricsOptions, UseSandboxMetricsResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useCreateSession, useDeleteSession, useDropdownMenu, useLiveTime, usePtySession, useRealtimeSession, useRenameSession, useRunCollapseState, useRunGroups, useSSEStream, useSandboxMetrics, useSdkSession, useSessions, useToolCallStream } from "./hooks.js";
10
+ import { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AuthUser, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SandboxMetrics, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SidecarMetricsPayload, TaskStreamEvent, TerminalStreamEvent, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSandboxMetricsOptions, UseSandboxMetricsResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, createAuthFetcher, useApiKey, useAuth, useAutoScroll, useCreateSession, useDeleteSession, useDropdownMenu, useLiveTime, useRealtimeSession, useRenameSession, useRunCollapseState, useRunGroups, useSSEStream, useSandboxMetrics, useSdkSession, useSessions, useToolCallStream } from "./hooks.js";
10
11
  import { $ as InputProps, $t as ToastProvider, A as DropZoneProps, At as Table, B as DropdownMenuSeparator, Bt as TabsList, C as DialogFooter, Ct as SkeletonTable, D as DialogTitle, Dt as StatusPillProps, E as DialogPortal, Et as StatusPill, F as DropdownMenuItem, Ft as TableHead, G as DropdownMenuTrigger, H as DropdownMenuSub, I as DropdownMenuLabel, It as TableHeader, J as FilterField, Jt as Textarea, K as EmptyState, Kt as TextShimmer, L as DropdownMenuPortal, Lt as TableRow, M as DropdownMenuCheckboxItem, Mt as TableCaption, N as DropdownMenuContent, Nt as TableCell, O as DialogTrigger, Ot as StatusTone, P as DropdownMenuGroup, Pt as TableFooter, Q as Input, Qt as ToastContainer, R as DropdownMenuRadioGroup, Rt as Tabs, S as DialogDescription, St as SkeletonCard, T as DialogOverlay, Tt as StatCardProps, U as DropdownMenuSubContent, Ut as TerminalDisplay, V as DropdownMenuShortcut, Vt as TabsTrigger, W as DropdownMenuSubTrigger, X as InlineCode, Xt as ThemeToggle, Y as FilterFieldProps, Yt as TextareaProps, Z as InlineCodeProps, Zt as Toast, _ as CodeBlockProps, _t as SelectTrigger, a as AvatarImage, an as badgeVariants, at as Progress, b as DialogClose, bn as TangleKnot, bt as SidebarDropZoneProps, c as Button, cn as useToast, ct as SegmentedControlProps, d as CardContent, dt as SelectGroup, en as Toolbar, et as Label, f as CardDescription, ft as SelectItem, g as CodeBlock, gt as SelectSeparator, h as CardTitle, ht as SelectScrollUpButton, i as AvatarFallback, in as UploadProgressProps, it as MetricStripProps, j as DropdownMenu, jt as TableBody, k as DropZone, kt as Switch, l as ButtonProps, lt as Select, m as CardHeader, mt as SelectScrollDownButton, nn as UploadFile, nt as MetricProps, o as Badge, on as buttonVariants, ot as SegmentedControl, p as CardFooter, pt as SelectLabel, q as EmptyStateProps, qt as TextShimmerProps, r as Avatar, rn as UploadProgress, rt as MetricStrip, s as BadgeProps, sn as useTheme, st as SegmentedControlOption, tn as ToolbarProps, tt as Metric, u as Card, ut as SelectContent, v as CopyButton, vn as Logo, vt as SelectValue, w as DialogHeader, wt as StatCard, x as DialogContent, xt as Skeleton, y as Dialog, yn as LogoProps, yt as SidebarDropZone, z as DropdownMenuRadioItem, zt as TabsContent } from "./index-PRM636Ex.js";
11
- import { $ as TerminalProps, A as ShellShouldRevalidateArgs, B as SessionSidebarLink, C as SandboxWorkbenchLayoutOptions, D as SandboxWorkbenchSessionProps, E as SandboxWorkbenchProps, F as SessionSidebar, G as SessionOptimisticController, H as SessionSidebarVariant, I as SessionSidebarBadge, J as useOptimisticSessionItems, K as UseOptimisticSessionItemsOptions, L as SessionSidebarFilter, M as createShellShouldRevalidate, N as shellShouldRevalidate, O as SessionActivityMonitor, P as formatRelativeAge, Q as TerminalPanel, R as SessionSidebarGroupBy, S as SandboxWorkbenchFileArtifact, T as SandboxWorkbenchOpenUIArtifact, U as SESSION_CREATED_EVENT, V as SessionSidebarProps, W as SessionCreatedDetail, X as RuntimePaneProps, Y as RuntimePane, Z as TerminalLine, _ as FormAudit, a as ApprovalQueue, at as StatusBannerProps, b as SandboxWorkbenchArtifact, c as CalendarView, ct as WorkspacePaneHeader, d as TaskBoardColumn, dt as WorkspaceLayoutProps, et as ContextBadge, f as TaskBoardItem, g as AuditResultsProps, h as AuditResults, i as ApprovalItem, it as StatusBanner, j as ShellShouldRevalidateOptions, k as SessionActivityMonitorProps, l as CalendarViewProps, lt as WorkspacePaneHeaderProps, m as AuditCheck, n as ArtifactPaneProps, nt as StatusBarProps, o as ApprovalQueueProps, ot as DirectoryPane, p as TaskBoardProps, q as dispatchSessionCreated, r as ApprovalConfidenceStat, rt as BannerType, s as CalendarEvent, st as DirectoryPaneProps, t as ArtifactPane, tt as StatusBar, u as TaskBoard, ut as WorkspaceLayout, v as AgentWorkbench, w as SandboxWorkbenchMarkdownArtifact, x as SandboxWorkbenchCustomArtifact, y as SandboxWorkbench, z as SessionSidebarItem } from "./index-CKRaj1pM.js";
12
+ import { $ as TerminalProps, A as ShellShouldRevalidateArgs, B as SessionSidebarLink, C as SandboxWorkbenchLayoutOptions, D as SandboxWorkbenchSessionProps, E as SandboxWorkbenchProps, F as SessionSidebar, G as SessionOptimisticController, H as SessionSidebarVariant, I as SessionSidebarBadge, J as useOptimisticSessionItems, K as UseOptimisticSessionItemsOptions, L as SessionSidebarFilter, M as createShellShouldRevalidate, N as shellShouldRevalidate, O as SessionActivityMonitor, P as formatRelativeAge, Q as TerminalPanel, R as SessionSidebarGroupBy, S as SandboxWorkbenchFileArtifact, T as SandboxWorkbenchOpenUIArtifact, U as SESSION_CREATED_EVENT, V as SessionSidebarProps, W as SessionCreatedDetail, X as RuntimePaneProps, Y as RuntimePane, Z as TerminalLine, _ as FormAudit, a as ApprovalQueue, at as StatusBannerProps, b as SandboxWorkbenchArtifact, c as CalendarView, ct as WorkspacePaneHeader, d as TaskBoardColumn, dt as WorkspaceLayoutProps, et as ContextBadge, f as TaskBoardItem, g as AuditResultsProps, h as AuditResults, i as ApprovalItem, it as StatusBanner, j as ShellShouldRevalidateOptions, k as SessionActivityMonitorProps, l as CalendarViewProps, lt as WorkspacePaneHeaderProps, m as AuditCheck, n as ArtifactPaneProps, nt as StatusBarProps, o as ApprovalQueueProps, ot as DirectoryPane, p as TaskBoardProps, q as dispatchSessionCreated, r as ApprovalConfidenceStat, rt as BannerType, s as CalendarEvent, st as DirectoryPaneProps, t as ArtifactPane, tt as StatusBar, u as TaskBoard, ut as WorkspaceLayout, v as AgentWorkbench, w as SandboxWorkbenchMarkdownArtifact, x as SandboxWorkbenchCustomArtifact, y as SandboxWorkbench, z as SessionSidebarItem } from "./index-iDiLnSoo.js";
12
13
  import { A as SandboxArtifactTerminal, C as ChangesPane, D as ChangesPaneProps, E as ChangedFile, O as SandboxArtifact, S as PillTabsProps, T as ArtifactView, _ as DiffStats, a as PreviewView, b as PillTabItem, c as DiffViewProps, d as FileBreadcrumb, f as FileBreadcrumbProps, g as PanelHeaderProps, h as PanelHeader, i as resolveLanguage, k as SandboxArtifactPaneProps, l as CodeView, m as GitStatusBadge, n as CodeSurface, o as PreviewViewProps, p as DiffStatsBadge, r as CodeSurfaceProps, s as DiffView, t as BRAND_PRISM_THEME, u as CodeViewProps, v as buildUnifiedPatch, w as SandboxArtifactPane, x as PillTabs, y as computeDiffStats } from "./index-D_G-wF6u.js";
13
14
  import { a as PreviewReadiness, i as PreviewAccess, n as EmbeddedAppView, r as EmbeddedAppViewProps, t as EmbeddedApp } from "./embedded-app-view-B_vMTtJn.js";
14
15
  import { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from "./openui.js";
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-CBfynLzB.js";
1
+ import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-DJlOqodW.js";
2
2
  import { $ as SelectItem, A as DropdownMenuItem, At as Textarea, B as DropdownMenuTrigger, C as DialogTitle, Ct as TabsList, D as DropdownMenuCheckboxItem, E as DropdownMenu, Et as TerminalDisplay, F as DropdownMenuSeparator, Ft as UploadProgress, G as Label, Gt as TangleKnot, H as FilterField, I as DropdownMenuShortcut, It as badgeVariants, J as Progress, K as Metric, L as DropdownMenuSub, Lt as buttonVariants, M as DropdownMenuPortal, Mt as ToastContainer, N as DropdownMenuRadioGroup, Nt as ToastProvider, O as DropdownMenuContent, P as DropdownMenuRadioItem, Pt as Toolbar, Q as SelectGroup, R as DropdownMenuSubContent, Rt as useTheme, S as DialogPortal, St as TabsContent, T as DropZone, U as InlineCode, V as EmptyState, W as Input, Wt as Logo, X as Select, Y as SegmentedControl, Z as SelectContent, _ as DialogContent, _t as TableFooter, a as Badge, at as SelectValue, b as DialogHeader, bt as TableRow, c as CardContent, ct as SkeletonCard, d as CardHeader, dt as StatusPill, et as SelectLabel, f as CardTitle, ft as Switch, g as DialogClose, gt as TableCell, h as Dialog, ht as TableCaption, i as AvatarImage, it as SelectTrigger, j as DropdownMenuLabel, jt as ThemeToggle, k as DropdownMenuGroup, kt as TextShimmer, l as CardDescription, lt as SkeletonTable, m as CopyButton, mt as TableBody, n as Avatar, nt as SelectScrollUpButton, o as Button, ot as SidebarDropZone, p as CodeBlock, pt as Table, q as MetricStrip, r as AvatarFallback, rt as SelectSeparator, s as Card, st as Skeleton, tt as SelectScrollDownButton, u as CardFooter, ut as StatCard, v as DialogDescription, vt as TableHead, w as DialogTrigger, wt as TabsTrigger, x as DialogOverlay, xt as Tabs, y as DialogFooter, yt as TableHeader, z as DropdownMenuSubTrigger, zt as useToast } from "./primitives-Dh1vG6J3.js";
3
- import { t as WorkspacePaneHeader } from "./workspace-pane-header-C5e7sPaS.js";
4
- import { _ as TerminalPanel, a as AuditResults, b as DirectoryPane, c as SessionActivityMonitor, d as SessionSidebar, f as SESSION_CREATED_EVENT, g as RuntimePane, h as formatRelativeAge, i as TaskBoard, l as createShellShouldRevalidate, m as useOptimisticSessionItems, n as ApprovalQueue, o as AgentWorkbench, p as dispatchSessionCreated, r as CalendarView, s as SandboxWorkbench, t as ArtifactPane, u as shellShouldRevalidate, v as StatusBar, x as WorkspaceLayout, y as StatusBanner } from "./workspace-DoEZpkfF.js";
3
+ import { t as WorkspacePaneHeader } from "./workspace-pane-header-Bg1cCcHX.js";
4
+ import { _ as TerminalPanel, a as AuditResults, b as DirectoryPane, c as SessionActivityMonitor, d as SessionSidebar, f as SESSION_CREATED_EVENT, g as RuntimePane, h as formatRelativeAge, i as TaskBoard, l as createShellShouldRevalidate, m as useOptimisticSessionItems, n as ApprovalQueue, o as AgentWorkbench, p as dispatchSessionCreated, r as CalendarView, s as SandboxWorkbench, t as ArtifactPane, u as shellShouldRevalidate, v as StatusBar, x as WorkspaceLayout, y as StatusBanner } from "./workspace-Pq-koOTW.js";
5
5
  import { $ as SidebarRailNav, A as ResourceMeter, B as RailFlyout, C as InvoiceTable, D as canAdminSandbox, E as SandboxCard, F as CreditBalance, G as Sidebar, H as RailModeButton, I as ProfileAvatar, J as SidebarPanelContent, K as SidebarContent, L as RailButton, M as INSUFFICIENT_BALANCE_CODE, N as OutOfCreditsModal, O as ActivityFeed, P as parseInsufficientBalance, Q as SidebarRailHeader, R as RailCollapseToggle, S as PlanCards, T as NewSandboxCard, U as RailSeparator, V as RailHeader, W as RailThemeToggle, X as SidebarRail, Y as SidebarPanelHeader, Z as SidebarRailFooter, _ as HarnessPicker, a as ProcessList, at as SIDEBAR_TOTAL_WIDTH, b as HarnessLogo, c as UsageSummary, d as MetricAreaChart, et as RailTooltip, f as ProfileComparison, g as HARNESS_OPTIONS, h as DashboardLayout, i as NetworkConfig, it as SIDEBAR_RAIL_WIDTH, j as ClusterStatusBar, k as ResourceSnapshot, l as SystemLogsViewer, m as SidebarLayout, n as SnapshotList, nt as SIDEBAR_PANEL_WIDTH, o as PortsList, ot as SidebarProvider, p as ProfileSelector, q as SidebarPanel, r as BackendConfig, rt as SIDEBAR_RAIL_LABELED_WIDTH, s as GitPanel, st as useSidebar, t as PromoBanner, tt as SIDEBAR_MOBILE_WIDTH, u as VariantList, v as chatCapableHarnesses, w as SandboxTable, x as BackendSelector, y as HARNESS_BRAND, z as RailExpandable } from "./dashboard-CqyJQc7V.js";
6
6
  import { n as canonicalModelId, r as modelBrandFor, t as ModelBrandStack } from "./model-brand-hMyDTUqB.js";
7
7
  import { a as formatPrice, i as PricingPage, n as TemplateCard, o as BillingDashboard, r as UsageChart, t as InfoPanel } from "./info-panel-C9cqDzOL.js";
8
- import { t as usePtySession } from "./use-pty-session-C8cE0adT.js";
8
+ import { t as usePtySession } from "./use-pty-session-Bf4hBLXJ.js";
9
9
  import { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, FilePreview, FileTabs, FileTree, RichFileTree, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind } from "./files.js";
10
- import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-CNWKeod5.js";
10
+ import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-CoiS_kfY.js";
11
11
  import { OpenUIArtifactRenderer } from "./openui.js";
12
12
  import { a as ThinkingIndicator, c as createFetchTransport, d as AgentProfilePicker, f as DEFAULT_REASONING_LEVEL_OPTIONS, i as MessageList, l as modelProvider, m as ReasoningLevelPicker, n as ChatContainer, o as UserMessage, p as HARNESS_REASONING_OPTIONS, r as ChatMessage, s as ArtifactAgentDock, t as AgentTimeline, u as snapHarnessToModel } from "./chat-BOvFAe6p.js";
13
13
  import { ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunRowShell, RunRowStatusDot, ToolCallFeed, parseToolEvent } from "./run.js";