@tangle-network/sandbox-ui 0.2.2 → 0.3.4

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 (70) hide show
  1. package/README.md +201 -10
  2. package/dist/auth.js +2 -2
  3. package/dist/chat-container-C8eHLw8z.d.ts +67 -0
  4. package/dist/chat.d.ts +70 -78
  5. package/dist/chat.js +8 -8
  6. package/dist/chunk-4F2GJRGU.js +756 -0
  7. package/dist/{chunk-HYEAX3DC.js → chunk-5LV6DZZF.js} +445 -114
  8. package/dist/{chunk-QSQBDR3N.js → chunk-BX6AQMUS.js} +5 -2
  9. package/dist/chunk-CCKNIAS7.js +124 -0
  10. package/dist/chunk-CJ2RYVZH.js +128 -0
  11. package/dist/{chunk-KMXV7DDX.js → chunk-CNWVHQFY.js} +1 -1
  12. package/dist/{chunk-OU4TRNQZ.js → chunk-COCSO7FG.js} +3 -3
  13. package/dist/chunk-FJSVPBKY.js +85 -0
  14. package/dist/chunk-FRGMMANX.js +102 -0
  15. package/dist/{chunk-E6FS7R4X.js → chunk-HWLX5NME.js} +1 -1
  16. package/dist/chunk-HY5IBRCE.js +1171 -0
  17. package/dist/chunk-JF6E2DS5.js +610 -0
  18. package/dist/chunk-MUOL44AE.js +121 -0
  19. package/dist/chunk-MXCSSOGH.js +105 -0
  20. package/dist/{chunk-NI2EI43H.js → chunk-PDV7W4NY.js} +9 -124
  21. package/dist/chunk-QGI5E7JD.js +1106 -0
  22. package/dist/chunk-TQN3VR4F.js +92 -0
  23. package/dist/{chunk-SOT2V7TX.js → chunk-TXI4MZAZ.js} +62 -144
  24. package/dist/chunk-WUR652Y3.js +1140 -0
  25. package/dist/chunk-YDBXQQLC.js +336 -0
  26. package/dist/{chunk-4EIWPJMJ.js → chunk-ZP6GSX4D.js} +36 -27
  27. package/dist/dashboard.d.ts +4 -111
  28. package/dist/dashboard.js +17 -4
  29. package/dist/{expanded-tool-detail-OkXGqTHe.d.ts → expanded-tool-detail-BDi_h_dZ.d.ts} +11 -4
  30. package/dist/file-tabs-CmaoDVBI.d.ts +72 -0
  31. package/dist/files.d.ts +25 -44
  32. package/dist/files.js +8 -3
  33. package/{src/styles → dist}/globals.css +16 -67
  34. package/dist/hooks.d.ts +5 -4
  35. package/dist/hooks.js +14 -9
  36. package/dist/index-BOjBJwzD.d.ts +219 -0
  37. package/dist/index.d.ts +39 -10
  38. package/dist/index.js +190 -121
  39. package/dist/markdown.d.ts +1 -24
  40. package/dist/markdown.js +1 -7
  41. package/dist/openui.d.ts +115 -0
  42. package/dist/openui.js +11 -0
  43. package/dist/pages.d.ts +3 -2
  44. package/dist/pages.js +19 -16
  45. package/dist/primitives.js +25 -19
  46. package/dist/run.d.ts +2 -2
  47. package/dist/run.js +8 -7
  48. package/dist/{use-sidecar-auth-Bb0-w3lX.d.ts → sdk-hooks.d.ts} +61 -72
  49. package/dist/sdk-hooks.js +29 -0
  50. package/dist/styles.css +179 -0
  51. package/dist/tokens.css +275 -0
  52. package/dist/{tool-display-BvsVW_Ur.d.ts → tool-display-Ct9nFAzJ.d.ts} +1 -1
  53. package/dist/types.d.ts +1 -1
  54. package/dist/{usage-chart-DINgSVL5.d.ts → usage-chart-CY9xo3KX.d.ts} +8 -3
  55. package/dist/use-pty-session-DeZSxOCN.d.ts +69 -0
  56. package/dist/utils.d.ts +1 -1
  57. package/dist/utils.js +1 -1
  58. package/dist/workspace.d.ts +171 -33
  59. package/dist/workspace.js +25 -1
  60. package/package.json +10 -3
  61. package/tailwind.config.cjs +39 -0
  62. package/dist/chunk-2UHPE5T7.js +0 -201
  63. package/dist/chunk-6MQIDUPA.js +0 -502
  64. package/dist/chunk-J4OADEUK.js +0 -814
  65. package/dist/chunk-KYY2X6LY.js +0 -318
  66. package/dist/chunk-L6ZDH5F4.js +0 -334
  67. package/dist/chunk-M34OA6PQ.js +0 -233
  68. package/dist/chunk-M6VLC32S.js +0 -219
  69. package/dist/chunk-U62G5TS7.js +0 -472
  70. package/src/styles/tokens.css +0 -73
@@ -3,7 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { R as Run } from './run-CtFZ6s-D.js';
4
4
  import { a as SessionPart, b as ToolPart, R as ReasoningPart } from './parts-CyGkM6Fp.js';
5
5
  import { A as AgentBranding } from './branding-DCi5VEik.js';
6
- import { C as CustomToolRenderer } from './tool-display-BvsVW_Ur.js';
6
+ import { C as CustomToolRenderer } from './tool-display-Ct9nFAzJ.js';
7
7
 
8
8
  interface RunGroupProps {
9
9
  run: Run;
@@ -17,27 +17,34 @@ interface RunGroupProps {
17
17
  * Collapsible container for a consecutive group of assistant messages (a "run").
18
18
  * Shows a summary header with stats and renders tool/thinking/text parts.
19
19
  */
20
- declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, }: RunGroupProps) => react_jsx_runtime.JSX.Element>;
20
+ declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, }: RunGroupProps) => react_jsx_runtime.JSX.Element | null>;
21
21
 
22
22
  interface InlineToolItemProps {
23
23
  part: ToolPart;
24
24
  renderToolDetail?: CustomToolRenderer;
25
+ groupPosition?: "single" | "first" | "middle" | "last";
26
+ className?: string;
27
+ contentClassName?: string;
25
28
  }
26
29
  /**
27
30
  * Compact single-line tool call display (32px height).
28
31
  * Shows icon, title, description, duration, and status indicator.
29
32
  * Expands on click to show ExpandedToolDetail.
30
33
  */
31
- declare const InlineToolItem: React.MemoExoticComponent<({ part, renderToolDetail }: InlineToolItemProps) => react_jsx_runtime.JSX.Element>;
34
+ declare const InlineToolItem: React.MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, }: InlineToolItemProps) => react_jsx_runtime.JSX.Element>;
32
35
 
33
36
  interface InlineThinkingItemProps {
34
37
  part: ReasoningPart;
38
+ defaultOpen?: boolean;
39
+ autoCollapse?: boolean;
40
+ className?: string;
41
+ contentClassName?: string;
35
42
  }
36
43
  /**
37
44
  * Minimal collapsible display for thinking/reasoning parts.
38
45
  * Shows "Thinking..." with optional preview text and duration.
39
46
  */
40
- declare const InlineThinkingItem: React.MemoExoticComponent<({ part }: InlineThinkingItemProps) => react_jsx_runtime.JSX.Element>;
47
+ declare const InlineThinkingItem: React.MemoExoticComponent<({ part, defaultOpen, autoCollapse, className, contentClassName, }: InlineThinkingItemProps) => react_jsx_runtime.JSX.Element>;
41
48
 
42
49
  interface ExpandedToolDetailProps {
43
50
  part: ToolPart;
@@ -0,0 +1,72 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface ArtifactPaneProps {
5
+ eyebrow?: ReactNode;
6
+ title: ReactNode;
7
+ subtitle?: ReactNode;
8
+ meta?: ReactNode;
9
+ headerActions?: ReactNode;
10
+ tabs?: ReactNode;
11
+ toolbar?: ReactNode;
12
+ footer?: ReactNode;
13
+ emptyState?: ReactNode;
14
+ children?: ReactNode;
15
+ className?: string;
16
+ contentClassName?: string;
17
+ }
18
+ /**
19
+ * ArtifactPane — shared frame for files, previews, documents, inspectors, and
20
+ * other artifact-like surfaces inside sandbox applications.
21
+ */
22
+ declare function ArtifactPane({ eyebrow, title, subtitle, meta, headerActions, tabs, toolbar, footer, emptyState, children, className, contentClassName, }: ArtifactPaneProps): react_jsx_runtime.JSX.Element;
23
+
24
+ /**
25
+ * FileTree — directory browser with file type icons.
26
+ *
27
+ * Renders a hierarchical file system view. Clicking a file
28
+ * triggers onSelect with the full path.
29
+ */
30
+ interface FileNode {
31
+ name: string;
32
+ path: string;
33
+ type: "file" | "directory";
34
+ children?: FileNode[];
35
+ size?: number;
36
+ mimeType?: string;
37
+ }
38
+ interface FileTreeProps {
39
+ root: FileNode;
40
+ selectedPath?: string;
41
+ onSelect?: (path: string, node: FileNode) => void;
42
+ className?: string;
43
+ defaultExpanded?: boolean;
44
+ visibility?: FileTreeVisibilityOptions;
45
+ }
46
+ interface FileTreeVisibilityOptions {
47
+ hiddenPaths?: string[];
48
+ hiddenPathPrefixes?: string[];
49
+ isVisible?: (node: FileNode) => boolean;
50
+ }
51
+ declare function filterFileTree(root: FileNode, visibility?: FileTreeVisibilityOptions): FileNode | null;
52
+ declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded, visibility, }: FileTreeProps): react_jsx_runtime.JSX.Element | null;
53
+
54
+ /**
55
+ * FileTabs — tab bar for open files in the preview panel.
56
+ */
57
+ interface FileTabData {
58
+ id: string;
59
+ name: string;
60
+ path: string;
61
+ dirty?: boolean;
62
+ }
63
+ interface FileTabsProps {
64
+ tabs: FileTabData[];
65
+ activeId?: string;
66
+ onSelect: (id: string) => void;
67
+ onClose: (id: string) => void;
68
+ className?: string;
69
+ }
70
+ declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): react_jsx_runtime.JSX.Element | null;
71
+
72
+ export { ArtifactPane as A, type FileNode as F, type ArtifactPaneProps as a, type FileTabData as b, FileTabs as c, type FileTabsProps as d, FileTree as e, type FileTreeProps as f, type FileTreeVisibilityOptions as g, filterFileTree as h };
package/dist/files.d.ts CHANGED
@@ -1,38 +1,18 @@
1
+ import { b as FileTabData, a as ArtifactPaneProps } from './file-tabs-CmaoDVBI.js';
2
+ export { F as FileNode, c as FileTabs, d as FileTabsProps, e as FileTree, f as FileTreeProps, g as FileTreeVisibilityOptions, h as filterFileTree } from './file-tabs-CmaoDVBI.js';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- /**
4
- * FileTree — directory browser with file type icons.
5
- *
6
- * Renders a hierarchical file system view. Clicking a file
7
- * triggers onSelect with the full path.
8
- */
9
- interface FileNode {
10
- name: string;
11
- path: string;
12
- type: "file" | "directory";
13
- children?: FileNode[];
14
- size?: number;
15
- mimeType?: string;
16
- }
17
- interface FileTreeProps {
18
- root: FileNode;
19
- selectedPath?: string;
20
- onSelect?: (path: string, node: FileNode) => void;
21
- className?: string;
22
- defaultExpanded?: boolean;
23
- }
24
- declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded }: FileTreeProps): react_jsx_runtime.JSX.Element;
4
+ import 'react';
25
5
 
26
6
  /**
27
7
  * FilePreview — universal file renderer.
28
8
  *
29
9
  * Renders any file type beautifully:
30
- * - PDF: react-pdf paginated viewer
31
- * - CSV/XLSX: sortable table
32
- * - Code (py/json/yaml/ts/js): syntax highlighted
10
+ * - PDF: embedded viewer
11
+ * - CSV/XLSX: tabular preview
12
+ * - Code (py/json/yaml/ts/js): line-numbered viewer
33
13
  * - Markdown: rendered prose
34
14
  * - Images: inline display
35
- * - Text: monospace pre
15
+ * - Text: monospace preview
36
16
  */
37
17
  interface FilePreviewProps {
38
18
  filename: string;
@@ -41,26 +21,27 @@ interface FilePreviewProps {
41
21
  mimeType?: string;
42
22
  onClose?: () => void;
43
23
  onDownload?: () => void;
24
+ hideHeader?: boolean;
44
25
  className?: string;
45
26
  }
46
- declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
27
+ declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, hideHeader, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
47
28
 
48
- /**
49
- * FileTabs — tab bar for open files in the preview panel.
50
- */
51
- interface FileTabData {
52
- id: string;
53
- name: string;
54
- path: string;
55
- dirty?: boolean;
56
- }
57
- interface FileTabsProps {
58
- tabs: FileTabData[];
59
- activeId?: string;
60
- onSelect: (id: string) => void;
61
- onClose: (id: string) => void;
29
+ interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
30
+ path?: string;
31
+ tabs?: FileTabData[];
32
+ activeTabId?: string;
33
+ onTabSelect?: (id: string) => void;
34
+ onTabClose?: (id: string) => void;
35
+ eyebrow?: ArtifactPaneProps["eyebrow"];
36
+ meta?: ArtifactPaneProps["meta"];
37
+ toolbar?: ArtifactPaneProps["toolbar"];
38
+ footer?: ArtifactPaneProps["footer"];
62
39
  className?: string;
63
40
  }
64
- declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): react_jsx_runtime.JSX.Element | null;
41
+ /**
42
+ * FileArtifactPane — opinionated artifact frame for file previews with tabs and
43
+ * header actions.
44
+ */
45
+ declare function FileArtifactPane({ filename, content, blobUrl, mimeType, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, }: FileArtifactPaneProps): react_jsx_runtime.JSX.Element;
65
46
 
66
- export { type FileNode, FilePreview, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps };
47
+ export { FileArtifactPane, type FileArtifactPaneProps, FilePreview, type FilePreviewProps, FileTabData };
package/dist/files.js CHANGED
@@ -1,11 +1,16 @@
1
1
  import {
2
+ FileArtifactPane,
2
3
  FilePreview,
3
4
  FileTabs,
4
- FileTree
5
- } from "./chunk-L6ZDH5F4.js";
5
+ FileTree,
6
+ filterFileTree
7
+ } from "./chunk-JF6E2DS5.js";
8
+ import "./chunk-LTFK464G.js";
6
9
  import "./chunk-RQHJBTEU.js";
7
10
  export {
11
+ FileArtifactPane,
8
12
  FilePreview,
9
13
  FileTabs,
10
- FileTree
14
+ FileTree,
15
+ filterFileTree
11
16
  };
@@ -1,77 +1,24 @@
1
+ @import "./tokens.css";
2
+
1
3
  @tailwind base;
2
4
  @tailwind components;
3
5
  @tailwind utilities;
4
6
 
5
7
  @layer base {
6
8
  :root {
7
- --background: 0 0% 98%;
8
- --foreground: 0 0% 9%;
9
- --card: 0 0% 100%;
10
- --card-foreground: 0 0% 9%;
11
- --popover: 0 0% 100%;
12
- --popover-foreground: 0 0% 9%;
13
- --primary: 270 80% 55%;
14
- --primary-foreground: 0 0% 100%;
15
- --secondary: 0 0% 94%;
16
- --secondary-foreground: 0 0% 20%;
17
- --muted: 0 0% 94%;
18
- --muted-foreground: 0 0% 40%;
19
- --accent: 0 0% 94%;
20
- --accent-foreground: 0 0% 9%;
21
- --destructive: 0 84% 60%;
22
- --destructive-foreground: 0 0% 100%;
23
- --border: 0 0% 88%;
24
- --input: 0 0% 88%;
25
- --ring: 270 80% 55%;
26
- --radius: 0.625rem;
27
-
28
- /* Product accent colors -- Tangle purple */
29
- --sandbox: 270 80% 55%;
30
- --sandbox-glow: 270 75% 58%;
31
-
32
- /* Status colors */
33
- --success: 142 71% 40%;
34
- --warning: 38 92% 45%;
35
- --error: 0 84% 55%;
36
- --info: 217 91% 55%;
37
- }
38
-
39
- .dark {
40
- --background: 0 0% 5%;
41
- --foreground: 0 0% 96%;
42
- --card: 0 0% 8%;
43
- --card-foreground: 0 0% 96%;
44
- --popover: 0 0% 8%;
45
- --popover-foreground: 0 0% 96%;
46
- --primary: 0 0% 96%;
47
- --primary-foreground: 0 0% 9%;
48
- --secondary: 0 0% 14%;
49
- --secondary-foreground: 0 0% 96%;
50
- --muted: 0 0% 14%;
51
- --muted-foreground: 0 0% 72%;
52
- --accent: 0 0% 16%;
53
- --accent-foreground: 0 0% 96%;
54
- --destructive: 0 62.8% 30.6%;
55
- --destructive-foreground: 0 0% 96%;
56
- --border: 0 0% 18%;
57
- --input: 0 0% 18%;
58
- --ring: 0 0% 83.1%;
59
-
60
- --sandbox: 270 95% 65%;
61
- --sandbox-glow: 270 90% 66%;
62
-
63
- --success: 142 71% 45%;
64
- --warning: 38 92% 50%;
65
- --error: 0 84% 60%;
66
- --info: 217 91% 60%;
9
+ --sandbox: var(--primary);
10
+ --sandbox-glow: var(--info);
67
11
  }
68
12
 
69
13
  * {
70
- @apply border-border;
14
+ border-color: hsl(var(--border));
71
15
  }
72
16
 
73
17
  body {
74
- @apply bg-background text-foreground antialiased;
18
+ @apply antialiased;
19
+ background-color: hsl(var(--background));
20
+ color: hsl(var(--foreground));
21
+ font-family: var(--font-sans);
75
22
  font-feature-settings:
76
23
  "rlig" 1,
77
24
  "calt" 1;
@@ -97,9 +44,10 @@
97
44
  }
98
45
 
99
46
  @layer utilities {
100
- /* Gradient text -- Tangle purple */
47
+ /* Gradient text -- Tangle default accent */
101
48
  .text-gradient-sandbox {
102
- @apply bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-violet-400;
49
+ background-image: var(--tangle-gradient);
50
+ @apply bg-clip-text text-transparent;
103
51
  }
104
52
 
105
53
  /* Glow effects */
@@ -109,7 +57,9 @@
109
57
 
110
58
  /* Glass effect */
111
59
  .glass {
112
- @apply bg-card/80 backdrop-blur-xl border border-border/50;
60
+ backdrop-filter: blur(24px);
61
+ background-color: hsl(var(--card) / 0.8);
62
+ border: 1px solid hsl(var(--border) / 0.5);
113
63
  }
114
64
 
115
65
  /* Subtle noise texture */
@@ -184,8 +134,7 @@
184
134
  }
185
135
  }
186
136
 
187
- /* Fonts -- Inter (UI) + JetBrains Mono (code).
188
- Using @font-face with font-display: swap to avoid render-blocking. */
137
+ /* Fonts -- Inter (UI) + JetBrains Mono (code). */
189
138
  @font-face {
190
139
  font-family: "Inter";
191
140
  src: url("https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2") format("woff2");
package/dist/hooks.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- export { A as AgentStreamEvent, a as AuthUser, b as AutomationStreamEvent, B as BotStreamEvent, C as ConnectionState, S as SSEEvent, c as SessionInfo, d as SidecarAuth, T as TaskStreamEvent, e as TerminalStreamEvent, U as UseAuthOptions, f as UseAuthResult, g as UsePtySessionOptions, h as UsePtySessionReturn, i as UseRunGroupsOptions, j as UseSSEStreamOptions, k as UseSSEStreamResult, l as UseSessionStreamOptions, m as UseSessionStreamResult, n as UseSidecarAuthOptions, o as UseToolCallStreamReturn, p as createAuthFetcher, u as useApiKey, q as useAuth, r as useAutoScroll, s as useDropdownMenu, t as usePtySession, v as useRunCollapseState, w as useRunGroups, x as useSSEStream, y as useSessionStream, z as useSidecarAuth, D as useToolCallStream } from './use-sidecar-auth-Bb0-w3lX.js';
1
+ export { A as AuthUser, U as UseAuthOptions, a as UseAuthResult, b as UsePtySessionOptions, c as UsePtySessionReturn, d as createAuthFetcher, u as useApiKey, e as useAuth, f as usePtySession } from './use-pty-session-DeZSxOCN.js';
2
+ export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SessionInfo, SidecarAuth, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
2
3
  import * as _tanstack_react_query from '@tanstack/react-query';
3
4
  import { S as Session } from './sidecar-CFU2W9j1.js';
4
- import './tool-call-feed-D5Ume-Pt.js';
5
- import 'react/jsx-runtime';
6
5
  import 'react';
7
- import './parts-CyGkM6Fp.js';
8
6
  import './run-CtFZ6s-D.js';
7
+ import './parts-CyGkM6Fp.js';
8
+ import './tool-call-feed-D5Ume-Pt.js';
9
+ import 'react/jsx-runtime';
9
10
 
10
11
  /** List all sessions for a sidecar. */
11
12
  declare function useSessions(apiUrl: string, token: string | null): _tanstack_react_query.UseQueryResult<Session[], Error>;
package/dist/hooks.js CHANGED
@@ -1,24 +1,28 @@
1
1
  import {
2
2
  createAuthFetcher,
3
3
  useApiKey,
4
- useAuth,
4
+ useAuth
5
+ } from "./chunk-FJSVPBKY.js";
6
+ import {
7
+ usePtySession
8
+ } from "./chunk-GRYHFH5O.js";
9
+ import {
5
10
  useDropdownMenu,
6
11
  useSSEStream,
12
+ useSdkSession,
7
13
  useSessionStream,
8
14
  useSidecarAuth,
9
15
  useToolCallStream
10
- } from "./chunk-HYEAX3DC.js";
11
- import {
12
- usePtySession
13
- } from "./chunk-GRYHFH5O.js";
16
+ } from "./chunk-5LV6DZZF.js";
17
+ import "./chunk-CCKNIAS7.js";
14
18
  import {
15
19
  useAutoScroll,
16
20
  useRunCollapseState,
17
21
  useRunGroups
18
- } from "./chunk-KMXV7DDX.js";
19
- import "./chunk-M6VLC32S.js";
20
- import "./chunk-M34OA6PQ.js";
21
- import "./chunk-QSQBDR3N.js";
22
+ } from "./chunk-CNWVHQFY.js";
23
+ import "./chunk-CJ2RYVZH.js";
24
+ import "./chunk-BX6AQMUS.js";
25
+ import "./chunk-LTFK464G.js";
22
26
  import "./chunk-RQHJBTEU.js";
23
27
 
24
28
  // src/hooks/use-session-crud.ts
@@ -100,6 +104,7 @@ export {
100
104
  useRunCollapseState,
101
105
  useRunGroups,
102
106
  useSSEStream,
107
+ useSdkSession,
103
108
  useSessionStream,
104
109
  useSessions,
105
110
  useSidecarAuth,
@@ -0,0 +1,219 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import './usage-chart-CY9xo3KX.js';
4
+
5
+ interface SidebarNavItem {
6
+ id: string;
7
+ label: string;
8
+ href: string;
9
+ icon: string;
10
+ badge?: string;
11
+ }
12
+ interface SidebarSandbox {
13
+ id: string;
14
+ name: string;
15
+ label?: string;
16
+ }
17
+ interface AppSidebarProps {
18
+ navItems: SidebarNavItem[];
19
+ activeNavId?: string;
20
+ sandboxes?: SidebarSandbox[];
21
+ activeSandboxId?: string;
22
+ onSandboxChange?: (id: string) => void;
23
+ onNewAgent?: () => void;
24
+ className?: string;
25
+ LinkComponent?: React.ComponentType<any>;
26
+ }
27
+ declare function AppSidebar({ navItems, activeNavId, sandboxes, activeSandboxId, onSandboxChange, onNewAgent, className, LinkComponent, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
28
+
29
+ interface ClusterStatusItem {
30
+ icon: string;
31
+ label: string;
32
+ value: string;
33
+ valueClass?: string;
34
+ }
35
+ interface ClusterStatusBarProps {
36
+ items: ClusterStatusItem[];
37
+ latency?: string;
38
+ className?: string;
39
+ }
40
+ declare function ClusterStatusBar({ items, latency, className }: ClusterStatusBarProps): react_jsx_runtime.JSX.Element;
41
+
42
+ type ProductVariant = "sandbox";
43
+ interface NavItem {
44
+ id: string;
45
+ label: string;
46
+ href: string;
47
+ icon: React.ComponentType<{
48
+ className?: string;
49
+ }>;
50
+ /** Material icon name for Stitch sidebar (optional, falls back to icon component) */
51
+ materialIcon?: string;
52
+ }
53
+ interface DashboardUser {
54
+ email: string;
55
+ name?: string;
56
+ tier?: string;
57
+ avatarUrl?: string;
58
+ }
59
+ interface TopNavLink {
60
+ label: string;
61
+ href: string;
62
+ }
63
+ interface DashboardLayoutProps {
64
+ children: React.ReactNode;
65
+ variant?: ProductVariant;
66
+ navItems: NavItem[];
67
+ activeNavId?: string;
68
+ user?: DashboardUser | null;
69
+ isLoading?: boolean;
70
+ onLogout?: () => void;
71
+ onSettingsClick?: () => void;
72
+ settingsHref?: string;
73
+ onNewSandbox?: () => void;
74
+ className?: string;
75
+ sidebarClassName?: string;
76
+ contentClassName?: string;
77
+ topNavLinks?: TopNavLink[];
78
+ activeTopNavHref?: string;
79
+ sandboxName?: string;
80
+ sandboxLabel?: string;
81
+ /** Custom link component (e.g., Next.js Link). Use any type to support various router implementations. */
82
+ LinkComponent?: React.ComponentType<any>;
83
+ /** Footer content rendered at bottom of viewport */
84
+ footer?: React.ReactNode;
85
+ }
86
+ declare function DashboardLayout({ children, variant, navItems, activeNavId, user, isLoading, onLogout, onSettingsClick, settingsHref, onNewSandbox, className, sidebarClassName, contentClassName, topNavLinks, activeTopNavHref, sandboxName, sandboxLabel, LinkComponent, footer, }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
87
+
88
+ interface ResourceMeterProps {
89
+ label: string;
90
+ value: number;
91
+ max?: number;
92
+ unit?: string;
93
+ icon?: string;
94
+ className?: string;
95
+ }
96
+ declare function ResourceMeter({ label, value, max, unit, icon, className }: ResourceMeterProps): react_jsx_runtime.JSX.Element;
97
+
98
+ type SandboxStatus = "running" | "hibernating" | "provisioning" | "stopped" | "failed" | "archived";
99
+ interface SandboxCardData {
100
+ id: string;
101
+ name: string;
102
+ nodeId?: string;
103
+ status: SandboxStatus;
104
+ image?: string;
105
+ imageIcon?: React.ReactNode;
106
+ cpuPercent?: number;
107
+ ramUsed?: number;
108
+ ramTotal?: number;
109
+ provisioningMessage?: string;
110
+ provisioningPercent?: number;
111
+ archivedAt?: string;
112
+ }
113
+ interface SandboxCardProps {
114
+ sandbox: SandboxCardData;
115
+ onOpenIDE?: (id: string) => void;
116
+ onOpenTerminal?: (id: string) => void;
117
+ onWake?: (id: string) => void;
118
+ onRestore?: (id: string) => void;
119
+ className?: string;
120
+ }
121
+ declare function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, className }: SandboxCardProps): react_jsx_runtime.JSX.Element;
122
+ interface NewSandboxCardProps {
123
+ onClick?: () => void;
124
+ className?: string;
125
+ }
126
+ declare function NewSandboxCard({ onClick, className }: NewSandboxCardProps): react_jsx_runtime.JSX.Element;
127
+
128
+ interface SandboxTableProps {
129
+ sandboxes: SandboxCardData[];
130
+ page?: number;
131
+ pageSize?: number;
132
+ total?: number;
133
+ onPageChange?: (page: number) => void;
134
+ onOpenIDE?: (id: string) => void;
135
+ onOpenTerminal?: (id: string) => void;
136
+ onSSH?: (id: string) => void;
137
+ onWake?: (id: string) => void;
138
+ onMore?: (id: string) => void;
139
+ className?: string;
140
+ }
141
+ declare function SandboxTable({ sandboxes, page, pageSize, total, onPageChange, onOpenIDE, onOpenTerminal, onSSH, onWake, onMore, className, }: SandboxTableProps): react_jsx_runtime.JSX.Element;
142
+
143
+ interface Backend {
144
+ type: string;
145
+ label: string;
146
+ description?: string;
147
+ }
148
+ interface BackendSelectorProps {
149
+ backends: Backend[];
150
+ selected: string[];
151
+ onChange: (selected: string[]) => void;
152
+ label?: string;
153
+ hint?: string;
154
+ multiSelect?: boolean;
155
+ className?: string;
156
+ }
157
+ declare function BackendSelector({ backends, selected, onChange, label, hint, multiSelect, className, }: BackendSelectorProps): react_jsx_runtime.JSX.Element;
158
+
159
+ interface Profile {
160
+ id: string;
161
+ name: string;
162
+ description?: string;
163
+ is_builtin?: boolean;
164
+ extends?: string;
165
+ model?: string;
166
+ metrics?: {
167
+ total_runs: number;
168
+ success_rate: number;
169
+ avg_duration_ms: number;
170
+ };
171
+ }
172
+ interface ProfileSelectorProps {
173
+ profiles: Profile[];
174
+ selectedId?: string | null;
175
+ onSelect: (profile: Profile | null) => void;
176
+ onCreateClick?: () => void;
177
+ onManageClick?: () => void;
178
+ label?: string;
179
+ placeholder?: string;
180
+ showMetrics?: boolean;
181
+ className?: string;
182
+ }
183
+ declare function ProfileSelector({ profiles, selectedId, onSelect, onCreateClick, onManageClick, label, placeholder, showMetrics, className, }: ProfileSelectorProps): react_jsx_runtime.JSX.Element;
184
+ /**
185
+ * Profile performance comparison card.
186
+ * Shows metrics from multiple profiles side by side.
187
+ */
188
+ interface ProfileComparisonProps {
189
+ profiles: Profile[];
190
+ className?: string;
191
+ }
192
+ declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
193
+
194
+ type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
195
+ type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
196
+ interface Variant {
197
+ id: string;
198
+ label: string;
199
+ sublabel?: string;
200
+ status: VariantStatus;
201
+ outcome?: VariantOutcome;
202
+ durationMs?: number;
203
+ error?: string;
204
+ summary?: string;
205
+ /** Link to view variant details (e.g., chat UI) */
206
+ detailsUrl?: string;
207
+ }
208
+ interface VariantListProps {
209
+ variants: Variant[];
210
+ selectedId?: string | null;
211
+ onSelect?: (id: string) => void;
212
+ onAccept?: (id: string) => void;
213
+ onReject?: (id: string) => void;
214
+ isActioning?: string | null;
215
+ className?: string;
216
+ }
217
+ declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
218
+
219
+ export { AppSidebar as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, type NavItem as N, ProfileComparison as P, ResourceMeter as R, SandboxCard as S, type TopNavLink as T, VariantList as V, type AppSidebarProps as a, BackendSelector as b, type BackendSelectorProps as c, type ClusterStatusBarProps as d, type ClusterStatusItem as e, type DashboardLayoutProps as f, type DashboardUser as g, NewSandboxCard as h, type NewSandboxCardProps as i, type ProfileComparisonProps as j, ProfileSelector as k, type ProfileSelectorProps as l, type ResourceMeterProps as m, type SandboxCardData as n, type SandboxCardProps as o, type SandboxStatus as p, SandboxTable as q, type SandboxTableProps as r, type SidebarNavItem as s, type SidebarSandbox as t, type VariantListProps as u, type Profile as v, type ProductVariant as w, type Variant as x, type VariantOutcome as y, type VariantStatus as z };