@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
@@ -1,8 +1,542 @@
1
- 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, at as DashboardProfile, 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, t as PlanCardData, u as PlanCards, v as PlanCardsProps, au as PlanFeature, 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, av as TeamRole, aw as Variant, an as VariantList, ao as VariantListProps, ax as VariantOutcome, ay as VariantStatus, az as canAdminSandbox, ap as canonicalModelId, aq as formatContext, ar as formatPricing, as as useSidebar } from './variant-list-BrHYcBCk.js';
2
- export { a as BillingBalance, c as BillingDashboard, d as BillingDashboardProps, B as BillingSubscription, b as BillingUsage, e as PricingPage, f as PricingPageProps, P as PricingTier, g as UsageChart, h as UsageChartProps, U as UsageDataPoint, i as formatPrice } from './usage-chart-CPTcNlGs.js';
3
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- export { a as TemplateCard, T as TemplateCardData, b as TemplateCardProps } from './template-card-BAtvcAkU.js';
5
2
  import * as React from 'react';
3
+ 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';
4
+
5
+ interface SidebarUser {
6
+ email: string;
7
+ name?: string;
8
+ tier?: string;
9
+ avatarUrl?: string;
10
+ }
11
+ interface SidebarProps {
12
+ children: React.ReactNode;
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ }
16
+ declare function Sidebar({ children, className, style }: SidebarProps): react_jsx_runtime.JSX.Element;
17
+ interface SidebarRailProps {
18
+ children: React.ReactNode;
19
+ className?: string;
20
+ /**
21
+ * Render the rail at the wider mobile-drawer width so labels fit
22
+ * beside the icons. Defaults to the 64px icon-only rail used on
23
+ * desktop.
24
+ */
25
+ wide?: boolean;
26
+ }
27
+ declare function SidebarRail({ children, className, wide }: SidebarRailProps): react_jsx_runtime.JSX.Element;
28
+ interface SidebarRailHeaderProps {
29
+ children: React.ReactNode;
30
+ className?: string;
31
+ }
32
+ declare function SidebarRailHeader({ children, className }: SidebarRailHeaderProps): react_jsx_runtime.JSX.Element;
33
+ interface SidebarRailNavProps {
34
+ children: React.ReactNode;
35
+ className?: string;
36
+ }
37
+ declare function SidebarRailNav({ children, className }: SidebarRailNavProps): react_jsx_runtime.JSX.Element;
38
+ interface SidebarRailFooterProps {
39
+ children: React.ReactNode;
40
+ className?: string;
41
+ }
42
+ declare function SidebarRailFooter({ children, className }: SidebarRailFooterProps): react_jsx_runtime.JSX.Element;
43
+ interface RailSeparatorProps {
44
+ className?: string;
45
+ }
46
+ declare function RailSeparator({ className }: RailSeparatorProps): react_jsx_runtime.JSX.Element;
47
+ interface RailButtonProps {
48
+ icon: React.ComponentType<{
49
+ className?: string;
50
+ }>;
51
+ label: string;
52
+ isActive?: boolean;
53
+ badge?: number;
54
+ onClick?: () => void;
55
+ className?: string;
56
+ /** Show label text next to icon (for mobile drawer) */
57
+ showLabel?: boolean;
58
+ }
59
+ declare function RailButton({ icon: Icon, label, isActive, badge, onClick, className, showLabel }: RailButtonProps): react_jsx_runtime.JSX.Element;
60
+ interface RailModeButtonProps {
61
+ mode: string;
62
+ icon: React.ComponentType<{
63
+ className?: string;
64
+ }>;
65
+ label: string;
66
+ badge?: number;
67
+ className?: string;
68
+ /** Show label text next to icon (for mobile drawer) */
69
+ showLabel?: boolean;
70
+ }
71
+ declare function RailModeButton({ mode, icon, label, badge, className, showLabel }: RailModeButtonProps): react_jsx_runtime.JSX.Element;
72
+ interface SidebarPanelProps {
73
+ children: React.ReactNode;
74
+ className?: string;
75
+ }
76
+ declare function SidebarPanel({ children, className }: SidebarPanelProps): react_jsx_runtime.JSX.Element;
77
+ interface SidebarPanelHeaderProps {
78
+ children?: React.ReactNode;
79
+ title?: string;
80
+ className?: string;
81
+ }
82
+ declare function SidebarPanelHeader({ children, title, className }: SidebarPanelHeaderProps): react_jsx_runtime.JSX.Element;
83
+ interface SidebarPanelContentProps {
84
+ children: React.ReactNode;
85
+ className?: string;
86
+ }
87
+ declare function SidebarPanelContent({ children, className }: SidebarPanelContentProps): react_jsx_runtime.JSX.Element;
88
+ interface SidebarContentProps {
89
+ children: React.ReactNode;
90
+ className?: string;
91
+ }
92
+ declare function SidebarContent({ children, className }: SidebarContentProps): react_jsx_runtime.JSX.Element;
93
+ interface ProfileAvatarProps {
94
+ user?: SidebarUser | null;
95
+ isLoading?: boolean;
96
+ onLogout?: () => void;
97
+ onSettingsClick?: () => void;
98
+ settingsHref?: string;
99
+ /** Extra dropdown items rendered before settings/logout */
100
+ children?: React.ReactNode;
101
+ className?: string;
102
+ LinkComponent?: React.ComponentType<any>;
103
+ }
104
+ declare function ProfileAvatar({ user, isLoading, onLogout, onSettingsClick, settingsHref, children, className, LinkComponent, }: ProfileAvatarProps): react_jsx_runtime.JSX.Element;
105
+
106
+ /** Width constants (px) matching blueprint-agent layout */
107
+ declare const SIDEBAR_RAIL_WIDTH = 64;
108
+ declare const SIDEBAR_PANEL_WIDTH = 260;
109
+ declare const SIDEBAR_TOTAL_WIDTH: number;
110
+ /**
111
+ * Width of the mobile drawer when the rail is rendered with labels
112
+ * (`showLabel` on {@link RailButton}). The standard 64px rail is only
113
+ * wide enough for icons; labels need a wider container to avoid truncation.
114
+ */
115
+ declare const SIDEBAR_MOBILE_WIDTH = 256;
116
+ interface SidebarContextValue {
117
+ /** Whether the content panel beside the rail is open */
118
+ panelOpen: boolean;
119
+ setPanelOpen: (open: boolean) => void;
120
+ togglePanel: () => void;
121
+ /** Current panel mode (app-defined, e.g. "projects", "batches") */
122
+ mode: string;
123
+ setMode: (mode: string) => void;
124
+ /** Switch mode — opens panel if closed, closes if same mode clicked */
125
+ switchMode: (mode: string) => void;
126
+ /** Whether entire sidebar (rail + panel) is hidden (focus mode) */
127
+ hidden: boolean;
128
+ setHidden: (hidden: boolean) => void;
129
+ /** Computed content margin in px */
130
+ contentMargin: number;
131
+ /** Whether there are panels at all */
132
+ hasPanels: boolean;
133
+ }
134
+ interface SidebarProviderProps {
135
+ defaultPanelOpen?: boolean;
136
+ defaultMode?: string;
137
+ hasPanels?: boolean;
138
+ children: React.ReactNode;
139
+ }
140
+ declare function SidebarProvider({ defaultPanelOpen, defaultMode, hasPanels, children, }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
141
+ declare function useSidebar(): SidebarContextValue;
142
+
143
+ interface CreditBalanceProps {
144
+ amount: number;
145
+ description?: string;
146
+ onTopUp?: (amount: number) => void;
147
+ quickAmounts?: number[];
148
+ className?: string;
149
+ }
150
+ declare function CreditBalance({ amount, description, onTopUp, quickAmounts, className, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
151
+
152
+ interface ClusterStatusItem {
153
+ icon?: React.ReactNode;
154
+ label: string;
155
+ value: React.ReactNode;
156
+ valueClass?: string;
157
+ }
158
+ interface ClusterStatusBarProps {
159
+ items: ClusterStatusItem[];
160
+ latency?: string;
161
+ className?: string;
162
+ }
163
+ declare function ClusterStatusBar({ items, latency, className }: ClusterStatusBarProps): react_jsx_runtime.JSX.Element | null;
164
+
165
+ interface ResourceMeterProps {
166
+ label: string;
167
+ value: number;
168
+ max?: number;
169
+ unit?: string;
170
+ icon?: React.ReactNode;
171
+ className?: string;
172
+ }
173
+ declare function ResourceMeter({ label, value, max, unit, icon, className }: ResourceMeterProps): react_jsx_runtime.JSX.Element;
174
+
175
+ type SandboxStatus = "running" | "hibernating" | "provisioning" | "stopped" | "failed" | "archived" | "creating";
176
+ type TeamRole = "owner" | "admin" | "member" | "viewer";
177
+ interface SandboxCardData {
178
+ id: string;
179
+ name: string;
180
+ nodeId?: string;
181
+ status: SandboxStatus;
182
+ image?: string;
183
+ imageIcon?: React.ReactNode;
184
+ cpuPercent?: number;
185
+ ramUsed?: number;
186
+ ramTotal?: number;
187
+ provisioningMessage?: string;
188
+ provisioningPercent?: number;
189
+ archivedAt?: string;
190
+ /**
191
+ * Populated when the sandbox is shared with a team. Drives a small
192
+ * "shared with X" badge in the card header so a user can see at a
193
+ * glance which of their sandboxes are personal vs. collaborative.
194
+ */
195
+ team?: {
196
+ id: string;
197
+ name?: string;
198
+ /** Caller's role in the team — the card uses this to gate the Delete action. */
199
+ role: TeamRole;
200
+ };
201
+ }
202
+ interface SandboxCardProps {
203
+ sandbox: SandboxCardData;
204
+ onOpenIDE?: (id: string) => void;
205
+ onOpenTerminal?: (id: string) => void;
206
+ onWake?: (id: string) => void;
207
+ onRestore?: (id: string) => void;
208
+ onDelete?: (id: string) => void;
209
+ onStop?: (id: string) => void;
210
+ onResume?: (id: string) => void;
211
+ onFork?: (id: string) => void;
212
+ onKeepAlive?: (id: string) => void;
213
+ onUsage?: (id: string) => void;
214
+ onHealth?: (id: string) => void;
215
+ className?: string;
216
+ }
217
+ declare function canAdminSandbox(sandbox: SandboxCardData): boolean;
218
+ declare function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, onDelete, onStop, onResume, onFork, onKeepAlive, onUsage, onHealth, className }: SandboxCardProps): react_jsx_runtime.JSX.Element;
219
+ interface NewSandboxCardProps {
220
+ onClick?: () => void;
221
+ className?: string;
222
+ }
223
+ declare function NewSandboxCard({ onClick, className }: NewSandboxCardProps): react_jsx_runtime.JSX.Element;
224
+
225
+ interface SandboxTableProps {
226
+ sandboxes: SandboxCardData[];
227
+ page?: number;
228
+ pageSize?: number;
229
+ total?: number;
230
+ onPageChange?: (page: number) => void;
231
+ onOpenIDE?: (id: string) => void;
232
+ onOpenTerminal?: (id: string) => void;
233
+ onSSH?: (id: string) => void;
234
+ onWake?: (id: string) => void;
235
+ onMore?: (id: string) => void;
236
+ onDelete?: (id: string) => void;
237
+ className?: string;
238
+ }
239
+ declare function SandboxTable({ sandboxes, page, pageSize, total, onPageChange, onOpenIDE, onOpenTerminal, onSSH, onWake, onMore, onDelete, className, }: SandboxTableProps): react_jsx_runtime.JSX.Element;
240
+
241
+ interface Invoice {
242
+ id: string;
243
+ date: string;
244
+ amount: number;
245
+ status: "paid" | "pending" | "failed";
246
+ }
247
+ interface InvoiceTableProps {
248
+ invoices: Invoice[];
249
+ onExportAll?: () => void;
250
+ onLoadMore?: () => void;
251
+ onViewInvoice?: (id: string) => void;
252
+ hasMore?: boolean;
253
+ className?: string;
254
+ }
255
+ declare function InvoiceTable({ invoices, onExportAll, onLoadMore, onViewInvoice, hasMore, className }: InvoiceTableProps): react_jsx_runtime.JSX.Element;
256
+
257
+ interface PlanFeature {
258
+ text: string;
259
+ }
260
+ interface PlanCardData {
261
+ id: string;
262
+ name: string;
263
+ price: number;
264
+ period?: string;
265
+ features: PlanFeature[];
266
+ popular?: boolean;
267
+ current?: boolean;
268
+ ctaLabel?: string;
269
+ onSelect?: (id: string) => void;
270
+ }
271
+ interface PlanCardsProps {
272
+ plans: PlanCardData[];
273
+ className?: string;
274
+ }
275
+ declare function PlanCards({ plans, className }: PlanCardsProps): react_jsx_runtime.JSX.Element;
276
+
277
+ interface Backend {
278
+ type: string;
279
+ label: string;
280
+ description?: string;
281
+ }
282
+ interface BackendSelectorProps {
283
+ backends: Backend[];
284
+ selected: string;
285
+ onChange: (selected: string) => void;
286
+ label?: string;
287
+ placeholder?: string;
288
+ className?: string;
289
+ }
290
+ declare function BackendSelector({ backends, selected, onChange, label, placeholder, className, }: BackendSelectorProps): react_jsx_runtime.JSX.Element;
291
+
292
+ /**
293
+ * Sandbox agent harness types — mirrors `BackendType` from
294
+ * `@tangle-network/sandbox` SDK. Kept in lockstep with that enum:
295
+ * if the SDK adds a backend, add it here too.
296
+ */
297
+ type HarnessType = "opencode" | "claude-code" | "codex" | "amp" | "factory-droids" | "cli-base";
298
+ interface HarnessOption extends Backend {
299
+ type: HarnessType;
300
+ }
301
+ /**
302
+ * Default option list with human-readable copy. Order is curated so the
303
+ * recommended choice (`opencode`) appears first; `cli-base` (no agent) last.
304
+ */
305
+ declare const HARNESS_OPTIONS: readonly HarnessOption[];
306
+ interface HarnessPickerProps extends Omit<BackendSelectorProps, "backends" | "selected" | "onChange"> {
307
+ value: HarnessType;
308
+ onChange: (next: HarnessType) => void;
309
+ /** Filter the available harnesses (e.g. by plan tier). Defaults to all. */
310
+ available?: ReadonlyArray<HarnessType>;
311
+ /** Override or extend the option metadata. Keys are HarnessType. */
312
+ optionsOverride?: Partial<Record<HarnessType, Partial<Omit<HarnessOption, "type">>>>;
313
+ }
314
+ /**
315
+ * Type-safe harness/backend selector for sandbox-backed agent products.
316
+ *
317
+ * Wraps the generic {@link BackendSelector} with the canonical harness list
318
+ * baked in, so consumers don't have to re-declare it (or risk drifting from
319
+ * the SDK enum).
320
+ */
321
+ declare function HarnessPicker({ value, onChange, available, optionsOverride, label, ...rest }: HarnessPickerProps): react_jsx_runtime.JSX.Element;
322
+
323
+ /**
324
+ * Wire-format model entry as returned by `/v1/models` on the Tangle Router
325
+ * (and most OpenAI-compatible gateways). Field names match the upstream
326
+ * response so consumers can pass `data.data` straight through.
327
+ */
328
+ interface ModelInfo {
329
+ /** Provider-local id, e.g. "gpt-5.4" or "anthropic/claude-sonnet-4-6". */
330
+ id: string;
331
+ /** Human label (defaults to id if absent). */
332
+ name?: string;
333
+ /** Provider key, e.g. "openai", "anthropic". Underscored for compat with router. */
334
+ _provider?: string;
335
+ /** Alternative provider field on some gateways. */
336
+ provider?: string;
337
+ /**
338
+ * Per-token prices in USD as decimal strings. Multiply by 1_000_000 for
339
+ * the conventional $/M tokens display.
340
+ */
341
+ pricing?: {
342
+ prompt?: string | null;
343
+ completion?: string | null;
344
+ };
345
+ context_length?: number;
346
+ description?: string | null;
347
+ architecture?: {
348
+ modality?: string;
349
+ input_modalities?: string[];
350
+ output_modalities?: string[];
351
+ };
352
+ }
353
+ /**
354
+ * Curated preset bucket. Three are surfaced by default — they map to typical
355
+ * cost/quality tradeoffs without forcing the consumer to pick a specific
356
+ * model. `match` resolves the preset against the loaded model list.
357
+ */
358
+ interface ModelPreset {
359
+ id: "fast" | "balanced" | "best" | string;
360
+ label: string;
361
+ hint: string;
362
+ icon?: React.ComponentType<{
363
+ className?: string;
364
+ }>;
365
+ /**
366
+ * Pick the canonical model id for this preset given the loaded list.
367
+ * Should return undefined if no acceptable model is loaded yet.
368
+ */
369
+ match: (models: ModelInfo[]) => string | undefined;
370
+ }
371
+ type ModelPickerVariant = "field" | "pill";
372
+ interface ModelPickerProps {
373
+ /** Canonical model id (provider-prefixed, e.g. "openai/gpt-5.4"). */
374
+ value: string;
375
+ onChange: (modelId: string) => void;
376
+ /** Models to choose from. Pass `[]` while loading. */
377
+ models: ModelInfo[];
378
+ /** Show the loading state (overrides empty-list copy). */
379
+ loading?: boolean;
380
+ /** Recently-used canonical ids to surface at the top. */
381
+ recents?: ReadonlyArray<string>;
382
+ /**
383
+ * Curated presets shown above the full list. Defaults to Fast/Balanced/Best
384
+ * resolved against common gpt-5/Claude families.
385
+ */
386
+ presets?: ReadonlyArray<ModelPreset>;
387
+ /** Drop providers from the picker entirely (e.g. "audio", "embedding"). */
388
+ excludeProviders?: ReadonlyArray<string>;
389
+ /** Restrict to these architectures (e.g. ["text"]). Default: all. */
390
+ modalities?: ReadonlyArray<string>;
391
+ /** Trigger appearance. "field" = full-width form field; "pill" = inline chat input pill. */
392
+ variant?: ModelPickerVariant;
393
+ label?: string;
394
+ placeholder?: string;
395
+ className?: string;
396
+ disabled?: boolean;
397
+ }
398
+ /**
399
+ * Resolve the canonical id for a model. Some upstreams already prefix the
400
+ * provider in the id (e.g. "anthropic/claude-haiku-4.5"); others put it in
401
+ * `_provider` and leave the id bare. Always returns "<provider>/<model>"
402
+ * unless the id is already prefixed.
403
+ */
404
+ declare function canonicalModelId(model: ModelInfo): string;
405
+ /** Format $/M tokens. Returns null if pricing is missing or zero. */
406
+ declare function formatPricing(pricing: ModelInfo["pricing"]): string | null;
407
+ /** Format context length compactly (e.g. 200_000 → "200k"). */
408
+ declare function formatContext(ctx: number | undefined): string | null;
409
+ declare function ModelPicker({ value, onChange, models, loading, recents, presets, excludeProviders, modalities, variant, label, placeholder, className, disabled, }: ModelPickerProps): react_jsx_runtime.JSX.Element;
410
+
411
+ type ProductVariant = "sandbox";
412
+ interface NavItem {
413
+ id: string;
414
+ label: string;
415
+ href?: string;
416
+ icon: React.ComponentType<{
417
+ className?: string;
418
+ }>;
419
+ badge?: number;
420
+ }
421
+ interface DashboardUser {
422
+ email: string;
423
+ name?: string;
424
+ tier?: string;
425
+ avatarUrl?: string;
426
+ }
427
+ interface TopNavLink {
428
+ label: string;
429
+ href: string;
430
+ }
431
+ interface PanelConfig {
432
+ mode: string;
433
+ title: string;
434
+ content: React.ReactNode;
435
+ }
436
+ interface DashboardLayoutProps {
437
+ children: React.ReactNode;
438
+ variant?: ProductVariant;
439
+ /** Navigation items for the rail */
440
+ navItems: NavItem[];
441
+ /** Nav item IDs that act as panel mode switchers (others are direct links) */
442
+ modeItems?: string[];
443
+ /** Panel content per mode */
444
+ panels?: PanelConfig[];
445
+ activeNavId?: string;
446
+ user?: DashboardUser | null;
447
+ isLoading?: boolean;
448
+ onLogout?: () => void;
449
+ onSettingsClick?: () => void;
450
+ settingsHref?: string;
451
+ onNewSandbox?: () => void;
452
+ className?: string;
453
+ sidebarClassName?: string;
454
+ contentClassName?: string;
455
+ topNavLinks?: TopNavLink[];
456
+ activeTopNavHref?: string;
457
+ LinkComponent?: React.ComponentType<any>;
458
+ footer?: React.ReactNode;
459
+ defaultPanelOpen?: boolean;
460
+ defaultMode?: string;
461
+ /** Extra content in the rail footer (above profile avatar) */
462
+ railFooter?: React.ReactNode;
463
+ /** Extra dropdown items in the profile menu */
464
+ profileMenuItems?: React.ReactNode;
465
+ /** Notification data for the bell dropdown */
466
+ notifications?: {
467
+ items: {
468
+ id: string;
469
+ title: string;
470
+ message: string;
471
+ read: boolean;
472
+ createdAt: string;
473
+ }[];
474
+ unreadCount: number;
475
+ onMarkRead?: (id: string) => void;
476
+ onMarkAllRead?: () => void;
477
+ };
478
+ }
479
+ declare function DashboardLayout({ defaultPanelOpen, defaultMode, ...props }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
480
+
481
+ interface Profile {
482
+ id: string;
483
+ name: string;
484
+ description?: string;
485
+ is_builtin?: boolean;
486
+ extends?: string;
487
+ model?: string;
488
+ metrics?: {
489
+ total_runs: number;
490
+ success_rate: number;
491
+ avg_duration_ms: number;
492
+ };
493
+ }
494
+ interface ProfileSelectorProps {
495
+ profiles: Profile[];
496
+ selectedId?: string | null;
497
+ onSelect: (profile: Profile | null) => void;
498
+ onCreateClick?: () => void;
499
+ onManageClick?: () => void;
500
+ label?: string;
501
+ placeholder?: string;
502
+ showMetrics?: boolean;
503
+ className?: string;
504
+ }
505
+ declare function ProfileSelector({ profiles, selectedId, onSelect, onCreateClick, onManageClick, label, placeholder, showMetrics, className, }: ProfileSelectorProps): react_jsx_runtime.JSX.Element;
506
+ /**
507
+ * Profile performance comparison card.
508
+ * Shows metrics from multiple profiles side by side.
509
+ */
510
+ interface ProfileComparisonProps {
511
+ profiles: Profile[];
512
+ className?: string;
513
+ }
514
+ declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
515
+
516
+ type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
517
+ type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
518
+ interface Variant {
519
+ id: string;
520
+ label: string;
521
+ sublabel?: string;
522
+ status: VariantStatus;
523
+ outcome?: VariantOutcome;
524
+ durationMs?: number;
525
+ error?: string;
526
+ summary?: string;
527
+ /** Link to view variant details (e.g., chat UI) */
528
+ detailsUrl?: string;
529
+ }
530
+ interface VariantListProps {
531
+ variants: Variant[];
532
+ selectedId?: string | null;
533
+ onSelect?: (id: string) => void;
534
+ onAccept?: (id: string) => void;
535
+ onReject?: (id: string) => void;
536
+ isActioning?: string | null;
537
+ className?: string;
538
+ }
539
+ declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
6
540
 
7
541
  interface SystemLogsViewerProps {
8
542
  apiUrl: string;
@@ -154,4 +688,4 @@ interface InfoPanelProps {
154
688
  }
155
689
  declare function InfoPanel({ label, title, description, className }: InfoPanelProps): react_jsx_runtime.JSX.Element;
156
690
 
157
- export { BackendConfig, type BackendConfigProps, type BackendStatusData, type SnapshotInfo as DashboardSnapshotInfo, type ExposedPort, type GitCommitData, GitPanel, type GitPanelProps, type GitStatusData, InfoPanel, type InfoPanelProps, type McpServer, NetworkConfig, type NetworkConfigData, type NetworkConfigProps, PortsList, type PortsListProps, type ProcessInfo, ProcessList, type ProcessListProps, PromoBanner, type PromoBannerProps, SnapshotList, type SnapshotListProps, SystemLogsViewer, type SystemLogsViewerProps, UsageSummary, type UsageSummaryData, type UsageSummaryProps };
691
+ export { type Backend, BackendConfig, type BackendConfigProps, BackendSelector, type BackendSelectorProps, type BackendStatusData, ClusterStatusBar, type ClusterStatusBarProps, type ClusterStatusItem, CreditBalance, type CreditBalanceProps, DashboardLayout, type DashboardLayoutProps, type Profile as DashboardProfile, type SnapshotInfo as DashboardSnapshotInfo, type DashboardUser, type ExposedPort, type GitCommitData, GitPanel, type GitPanelProps, type GitStatusData, HARNESS_OPTIONS, HarnessPicker, type HarnessPickerProps, type HarnessType, InfoPanel, type InfoPanelProps, type Invoice, InvoiceTable, type InvoiceTableProps, type McpServer, type ModelInfo, ModelPicker, type ModelPickerProps, type ModelPickerVariant, type ModelPreset, type NavItem, NetworkConfig, type NetworkConfigData, type NetworkConfigProps, NewSandboxCard, type NewSandboxCardProps, type PlanCardData, PlanCards, type PlanCardsProps, type PlanFeature, PortsList, type PortsListProps, type ProcessInfo, ProcessList, type ProcessListProps, type ProductVariant, ProfileAvatar, type ProfileAvatarProps, ProfileComparison, type ProfileComparisonProps, ProfileSelector, type ProfileSelectorProps, PromoBanner, type PromoBannerProps, RailButton, type RailButtonProps, RailModeButton, type RailModeButtonProps, RailSeparator, type RailSeparatorProps, ResourceMeter, type ResourceMeterProps, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, type SandboxCardData, type SandboxCardProps, type SandboxStatus, SandboxTable, type SandboxTableProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarPanel, SidebarPanelContent, type SidebarPanelContentProps, SidebarPanelHeader, type SidebarPanelHeaderProps, type SidebarPanelProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarRailFooter, type SidebarRailFooterProps, SidebarRailHeader, type SidebarRailHeaderProps, SidebarRailNav, type SidebarRailNavProps, type SidebarRailProps, type SidebarUser, SnapshotList, type SnapshotListProps, SystemLogsViewer, type SystemLogsViewerProps, type TeamRole, UsageSummary, type UsageSummaryData, type UsageSummaryProps, type Variant, VariantList, type VariantListProps, type VariantOutcome, type VariantStatus, canAdminSandbox, canonicalModelId, formatContext, formatPricing, useSidebar };