@tangle-network/sandbox-ui 0.21.0 → 0.21.2

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.
@@ -451,6 +451,39 @@ interface ProfileComparisonProps {
451
451
  }
452
452
  declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
453
453
 
454
+ interface MetricChartPoint {
455
+ /** Wall-clock ms. */
456
+ at: number;
457
+ /** Null renders a gap in the series, never a zero. */
458
+ value: number | null;
459
+ }
460
+ type MetricChartTone = "primary" | "success" | "warning" | "danger";
461
+ interface MetricAreaChartProps {
462
+ points: MetricChartPoint[];
463
+ label: string;
464
+ /** Formats the current value and y-axis bounds (e.g. percent, bytes). */
465
+ formatValue: (value: number) => string;
466
+ /**
467
+ * Fixed y-axis maximum (100 for percents, memory total for bytes).
468
+ * Omitted = auto-scale to the observed maximum with 10% headroom.
469
+ */
470
+ maxValue?: number;
471
+ /** Secondary line under the current value (e.g. "of 8 GiB"). */
472
+ detail?: React.ReactNode;
473
+ tone?: MetricChartTone;
474
+ /** Plot height in px. Defaults to 96. */
475
+ height?: number;
476
+ /** Shown instead of the plot while no point has a value yet. */
477
+ emptyState?: React.ReactNode;
478
+ className?: string;
479
+ }
480
+ /**
481
+ * Lightweight live time-series panel (Prometheus/Grafana idiom): big
482
+ * current value, area chart of the rolling window, dashed gridlines.
483
+ * Pure SVG — no chart dependency. Null samples render as gaps.
484
+ */
485
+ declare function MetricAreaChart({ points, label, formatValue, maxValue, detail, tone, height, emptyState, className, }: MetricAreaChartProps): react_jsx_runtime.JSX.Element;
486
+
454
487
  type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
455
488
  type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
456
489
  interface Variant {
@@ -626,4 +659,4 @@ interface InfoPanelProps {
626
659
  }
627
660
  declare function InfoPanel({ label, title, description, className }: InfoPanelProps): react_jsx_runtime.JSX.Element;
628
661
 
629
- export { BackendConfig, type BackendConfigProps, 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, INSUFFICIENT_BALANCE_CODE, InfoPanel, type InfoPanelProps, type InsufficientBalance, type Invoice, InvoiceTable, type InvoiceTableProps, type McpServer, type NavItem, NetworkConfig, type NetworkConfigData, type NetworkConfigProps, NewSandboxCard, type NewSandboxCardProps, OutOfCreditsModal, type OutOfCreditsModalProps, 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, parseInsufficientBalance, useSidebar };
662
+ export { BackendConfig, type BackendConfigProps, 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, INSUFFICIENT_BALANCE_CODE, InfoPanel, type InfoPanelProps, type InsufficientBalance, type Invoice, InvoiceTable, type InvoiceTableProps, type McpServer, MetricAreaChart, type MetricAreaChartProps, type MetricChartPoint, type MetricChartTone, type NavItem, NetworkConfig, type NetworkConfigData, type NetworkConfigProps, NewSandboxCard, type NewSandboxCardProps, OutOfCreditsModal, type OutOfCreditsModalProps, 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, parseInsufficientBalance, useSidebar };
package/dist/dashboard.js CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  GitPanel,
7
7
  INSUFFICIENT_BALANCE_CODE,
8
8
  InvoiceTable,
9
+ MetricAreaChart,
9
10
  NetworkConfig,
10
11
  NewSandboxCard,
11
12
  OutOfCreditsModal,
@@ -43,7 +44,7 @@ import {
43
44
  canAdminSandbox,
44
45
  parseInsufficientBalance,
45
46
  useSidebar
46
- } from "./chunk-FLWMBK77.js";
47
+ } from "./chunk-ZNYEJERQ.js";
47
48
  import {
48
49
  BillingDashboard,
49
50
  InfoPanel,
@@ -52,7 +53,8 @@ import {
52
53
  UsageChart,
53
54
  formatPrice
54
55
  } from "./chunk-DNZ4DTNA.js";
55
- import "./chunk-7ZA5SEK3.js";
56
+ import "./chunk-SM7IJY4I.js";
57
+ import "./chunk-UHFJXO24.js";
56
58
  import {
57
59
  BackendSelector,
58
60
  HARNESS_OPTIONS,
@@ -78,6 +80,7 @@ export {
78
80
  INSUFFICIENT_BALANCE_CODE,
79
81
  InfoPanel,
80
82
  InvoiceTable,
83
+ MetricAreaChart,
81
84
  ModelPicker,
82
85
  NetworkConfig,
83
86
  NewSandboxCard,
package/dist/globals.css CHANGED
@@ -30,7 +30,6 @@
30
30
  --color-violet-300: oklch(81.1% 0.111 293.571);
31
31
  --color-violet-400: oklch(70.2% 0.183 293.541);
32
32
  --color-violet-500: oklch(60.6% 0.25 292.717);
33
- --color-gray-300: oklch(87.2% 0.01 258.338);
34
33
  --color-gray-900: oklch(21% 0.034 264.665);
35
34
  --color-zinc-400: oklch(70.5% 0.015 286.067);
36
35
  --color-neutral-400: oklch(70.8% 0 0);
@@ -70,7 +69,6 @@
70
69
  --font-weight-semibold: 600;
71
70
  --font-weight-bold: 700;
72
71
  --font-weight-extrabold: 800;
73
- --font-weight-black: 900;
74
72
  --tracking-tighter: -0.05em;
75
73
  --tracking-tight: -0.025em;
76
74
  --tracking-normal: 0em;
@@ -523,6 +521,9 @@
523
521
  .mb-2 {
524
522
  margin-bottom: calc(var(--spacing) * 2);
525
523
  }
524
+ .mb-2\.5 {
525
+ margin-bottom: calc(var(--spacing) * 2.5);
526
+ }
526
527
  .mb-3 {
527
528
  margin-bottom: calc(var(--spacing) * 3);
528
529
  }
@@ -550,6 +551,9 @@
550
551
  .ml-1 {
551
552
  margin-left: calc(var(--spacing) * 1);
552
553
  }
554
+ .ml-1\.5 {
555
+ margin-left: calc(var(--spacing) * 1.5);
556
+ }
553
557
  .ml-2 {
554
558
  margin-left: calc(var(--spacing) * 2);
555
559
  }
@@ -605,9 +609,6 @@
605
609
  width: calc(var(--spacing) * 6);
606
610
  height: calc(var(--spacing) * 6);
607
611
  }
608
- .h-0\.5 {
609
- height: calc(var(--spacing) * 0.5);
610
- }
611
612
  .h-1 {
612
613
  height: calc(var(--spacing) * 1);
613
614
  }
@@ -1486,12 +1487,6 @@
1486
1487
  .rounded-\[2px\] {
1487
1488
  border-radius: 2px;
1488
1489
  }
1489
- .rounded-\[14px\] {
1490
- border-radius: 14px;
1491
- }
1492
- .rounded-\[16px\] {
1493
- border-radius: 16px;
1494
- }
1495
1490
  .rounded-\[18px\] {
1496
1491
  border-radius: 18px;
1497
1492
  }
@@ -2053,10 +2048,6 @@
2053
2048
  background-color: color-mix(in oklab, var(--color-yellow-600) 20%, transparent);
2054
2049
  }
2055
2050
  }
2056
- .bg-gradient-to-br {
2057
- --tw-gradient-position: to bottom right in oklab;
2058
- background-image: linear-gradient(var(--tw-gradient-stops));
2059
- }
2060
2051
  .bg-gradient-to-l {
2061
2052
  --tw-gradient-position: to left in oklab;
2062
2053
  background-image: linear-gradient(var(--tw-gradient-stops));
@@ -2108,6 +2099,9 @@
2108
2099
  .p-3 {
2109
2100
  padding: calc(var(--spacing) * 3);
2110
2101
  }
2102
+ .p-3\.5 {
2103
+ padding: calc(var(--spacing) * 3.5);
2104
+ }
2111
2105
  .p-4 {
2112
2106
  padding: calc(var(--spacing) * 4);
2113
2107
  }
@@ -2297,9 +2291,6 @@
2297
2291
  .pb-1 {
2298
2292
  padding-bottom: calc(var(--spacing) * 1);
2299
2293
  }
2300
- .pb-1\.5 {
2301
- padding-bottom: calc(var(--spacing) * 1.5);
2302
- }
2303
2294
  .pb-2 {
2304
2295
  padding-bottom: calc(var(--spacing) * 2);
2305
2296
  }
@@ -2468,10 +2459,6 @@
2468
2459
  --tw-font-weight: var(--font-sans);
2469
2460
  font-weight: var(--font-sans);
2470
2461
  }
2471
- .font-black {
2472
- --tw-font-weight: var(--font-weight-black);
2473
- font-weight: var(--font-weight-black);
2474
- }
2475
2462
  .font-bold {
2476
2463
  --tw-font-weight: var(--font-weight-bold);
2477
2464
  font-weight: var(--font-weight-bold);
@@ -2793,10 +2780,6 @@
2793
2780
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
2794
2781
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2795
2782
  }
2796
- .shadow-2xl {
2797
- --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
2798
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2799
- }
2800
2783
  .shadow-\[0_1px_2px_rgba\(15\,23\,42\,0\.04\)\] {
2801
2784
  --tw-shadow: 0 1px 2px var(--tw-shadow-color, rgba(15,23,42,0.04));
2802
2785
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -2837,18 +2820,10 @@
2837
2820
  --tw-shadow: var(--shadow-glow);
2838
2821
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2839
2822
  }
2840
- .shadow-inner {
2841
- --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
2842
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2843
- }
2844
2823
  .shadow-lg {
2845
2824
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
2846
2825
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2847
2826
  }
2848
- .shadow-md {
2849
- --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
2850
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2851
- }
2852
2827
  .shadow-none {
2853
2828
  --tw-shadow: 0 0 #0000;
2854
2829
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -2884,10 +2859,6 @@
2884
2859
  .ring-\[var\(--bg-root\)\] {
2885
2860
  --tw-ring-color: var(--bg-root);
2886
2861
  }
2887
- .ring-offset-2 {
2888
- --tw-ring-offset-width: 2px;
2889
- --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2890
- }
2891
2862
  .outline {
2892
2863
  outline-style: var(--tw-outline-style);
2893
2864
  outline-width: 1px;
@@ -3036,12 +3007,6 @@
3036
3007
  }
3037
3008
  }
3038
3009
  }
3039
- .peer-focus\:outline-none {
3040
- &:is(:where(.peer):focus ~ *) {
3041
- --tw-outline-style: none;
3042
- outline-style: none;
3043
- }
3044
- }
3045
3010
  .peer-disabled\:cursor-not-allowed {
3046
3011
  &:is(:where(.peer):disabled ~ *) {
3047
3012
  cursor: not-allowed;
@@ -3093,12 +3058,6 @@
3093
3058
  top: calc(var(--spacing) * 0);
3094
3059
  }
3095
3060
  }
3096
- .after\:top-\[2px\] {
3097
- &::after {
3098
- content: var(--tw-content);
3099
- top: 2px;
3100
- }
3101
- }
3102
3061
  .after\:right-0 {
3103
3062
  &::after {
3104
3063
  content: var(--tw-content);
@@ -3111,86 +3070,12 @@
3111
3070
  left: calc(var(--spacing) * 0);
3112
3071
  }
3113
3072
  }
3114
- .after\:left-\[2px\] {
3115
- &::after {
3116
- content: var(--tw-content);
3117
- left: 2px;
3118
- }
3119
- }
3120
- .after\:h-5 {
3121
- &::after {
3122
- content: var(--tw-content);
3123
- height: calc(var(--spacing) * 5);
3124
- }
3125
- }
3126
3073
  .after\:h-\[2px\] {
3127
3074
  &::after {
3128
3075
  content: var(--tw-content);
3129
3076
  height: 2px;
3130
3077
  }
3131
3078
  }
3132
- .after\:w-5 {
3133
- &::after {
3134
- content: var(--tw-content);
3135
- width: calc(var(--spacing) * 5);
3136
- }
3137
- }
3138
- .after\:rounded-full {
3139
- &::after {
3140
- content: var(--tw-content);
3141
- border-radius: calc(infinity * 1px);
3142
- }
3143
- }
3144
- .after\:border {
3145
- &::after {
3146
- content: var(--tw-content);
3147
- border-style: var(--tw-border-style);
3148
- border-width: 1px;
3149
- }
3150
- }
3151
- .after\:border-gray-300 {
3152
- &::after {
3153
- content: var(--tw-content);
3154
- border-color: var(--color-gray-300);
3155
- }
3156
- }
3157
- .after\:bg-white {
3158
- &::after {
3159
- content: var(--tw-content);
3160
- background-color: var(--color-white);
3161
- }
3162
- }
3163
- .after\:transition-all {
3164
- &::after {
3165
- content: var(--tw-content);
3166
- transition-property: all;
3167
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
3168
- transition-duration: var(--tw-duration, var(--default-transition-duration));
3169
- }
3170
- }
3171
- .after\:content-\[\'\'\] {
3172
- &::after {
3173
- --tw-content: '';
3174
- content: var(--tw-content);
3175
- }
3176
- }
3177
- .peer-checked\:after\:translate-x-full {
3178
- &:is(:where(.peer):checked ~ *) {
3179
- &::after {
3180
- content: var(--tw-content);
3181
- --tw-translate-x: 100%;
3182
- translate: var(--tw-translate-x) var(--tw-translate-y);
3183
- }
3184
- }
3185
- }
3186
- .peer-checked\:after\:border-white {
3187
- &:is(:where(.peer):checked ~ *) {
3188
- &::after {
3189
- content: var(--tw-content);
3190
- border-color: var(--color-white);
3191
- }
3192
- }
3193
- }
3194
3079
  .last\:border-0 {
3195
3080
  &:last-child {
3196
3081
  border-style: var(--tw-border-style);
@@ -3260,16 +3145,6 @@
3260
3145
  }
3261
3146
  }
3262
3147
  }
3263
- .hover\:border-red-500\/30 {
3264
- &:hover {
3265
- @media (hover: hover) {
3266
- border-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 30%, transparent);
3267
- @supports (color: color-mix(in lab, red, red)) {
3268
- border-color: color-mix(in oklab, var(--color-red-500) 30%, transparent);
3269
- }
3270
- }
3271
- }
3272
- }
3273
3148
  .hover\:bg-\[var\(--accent-surface-soft\)\] {
3274
3149
  &:hover {
3275
3150
  @media (hover: hover) {
@@ -3359,16 +3234,6 @@
3359
3234
  }
3360
3235
  }
3361
3236
  }
3362
- .hover\:bg-red-500\/10 {
3363
- &:hover {
3364
- @media (hover: hover) {
3365
- background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 10%, transparent);
3366
- @supports (color: color-mix(in lab, red, red)) {
3367
- background-color: color-mix(in oklab, var(--color-red-500) 10%, transparent);
3368
- }
3369
- }
3370
- }
3371
- }
3372
3237
  .hover\:bg-red-600\/30 {
3373
3238
  &:hover {
3374
3239
  @media (hover: hover) {
@@ -3446,22 +3311,6 @@
3446
3311
  }
3447
3312
  }
3448
3313
  }
3449
- .hover\:shadow-sm {
3450
- &:hover {
3451
- @media (hover: hover) {
3452
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
3453
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3454
- }
3455
- }
3456
- }
3457
- .hover\:brightness-95 {
3458
- &:hover {
3459
- @media (hover: hover) {
3460
- --tw-brightness: brightness(95%);
3461
- filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
3462
- }
3463
- }
3464
- }
3465
3314
  .hover\:brightness-110 {
3466
3315
  &:hover {
3467
3316
  @media (hover: hover) {
@@ -3621,6 +3470,11 @@
3621
3470
  scale: 0.98;
3622
3471
  }
3623
3472
  }
3473
+ .active\:scale-\[0\.99\] {
3474
+ &:active {
3475
+ scale: 0.99;
3476
+ }
3477
+ }
3624
3478
  .active\:bg-\[var\(--border-accent\)\] {
3625
3479
  &:active {
3626
3480
  background-color: var(--border-accent);
@@ -3646,6 +3500,11 @@
3646
3500
  opacity: 50%;
3647
3501
  }
3648
3502
  }
3503
+ .disabled\:opacity-60 {
3504
+ &:disabled {
3505
+ opacity: 60%;
3506
+ }
3507
+ }
3649
3508
  .data-\[disabled\]\:pointer-events-none {
3650
3509
  &[data-disabled] {
3651
3510
  pointer-events: none;
@@ -3718,14 +3577,9 @@
3718
3577
  translate: var(--tw-translate-x) var(--tw-translate-y);
3719
3578
  }
3720
3579
  }
3721
- .sm\:mx-4 {
3580
+ .sm\:mx-3 {
3722
3581
  @media (width >= 40rem) {
3723
- margin-inline: calc(var(--spacing) * 4);
3724
- }
3725
- }
3726
- .sm\:ml-3 {
3727
- @media (width >= 40rem) {
3728
- margin-left: calc(var(--spacing) * 3);
3582
+ margin-inline: calc(var(--spacing) * 3);
3729
3583
  }
3730
3584
  }
3731
3585
  .sm\:inline {
@@ -3972,9 +3826,9 @@
3972
3826
  border-width: 0px;
3973
3827
  }
3974
3828
  }
3975
- .\[\&\:\:-moz-range-track\]\:h-2 {
3829
+ .\[\&\:\:-moz-range-track\]\:h-1\.5 {
3976
3830
  &::-moz-range-track {
3977
- height: calc(var(--spacing) * 2);
3831
+ height: calc(var(--spacing) * 1.5);
3978
3832
  }
3979
3833
  }
3980
3834
  .\[\&\:\:-moz-range-track\]\:rounded-full {
@@ -3982,9 +3836,9 @@
3982
3836
  border-radius: calc(infinity * 1px);
3983
3837
  }
3984
3838
  }
3985
- .\[\&\:\:-webkit-slider-runnable-track\]\:h-2 {
3839
+ .\[\&\:\:-webkit-slider-runnable-track\]\:h-1\.5 {
3986
3840
  &::-webkit-slider-runnable-track {
3987
- height: calc(var(--spacing) * 2);
3841
+ height: calc(var(--spacing) * 1.5);
3988
3842
  }
3989
3843
  }
3990
3844
  .\[\&\:\:-webkit-slider-runnable-track\]\:rounded-full {
@@ -3992,19 +3846,19 @@
3992
3846
  border-radius: calc(infinity * 1px);
3993
3847
  }
3994
3848
  }
3995
- .\[\&\:\:-webkit-slider-thumb\]\:-mt-\[6px\] {
3849
+ .\[\&\:\:-webkit-slider-thumb\]\:-mt-\[5px\] {
3996
3850
  &::-webkit-slider-thumb {
3997
- margin-top: calc(6px * -1);
3851
+ margin-top: calc(5px * -1);
3998
3852
  }
3999
3853
  }
4000
- .\[\&\:\:-webkit-slider-thumb\]\:h-5 {
3854
+ .\[\&\:\:-webkit-slider-thumb\]\:h-4 {
4001
3855
  &::-webkit-slider-thumb {
4002
- height: calc(var(--spacing) * 5);
3856
+ height: calc(var(--spacing) * 4);
4003
3857
  }
4004
3858
  }
4005
- .\[\&\:\:-webkit-slider-thumb\]\:w-5 {
3859
+ .\[\&\:\:-webkit-slider-thumb\]\:w-4 {
4006
3860
  &::-webkit-slider-thumb {
4007
- width: calc(var(--spacing) * 5);
3861
+ width: calc(var(--spacing) * 4);
4008
3862
  }
4009
3863
  }
4010
3864
  .\[\&\:\:-webkit-slider-thumb\]\:appearance-none {
@@ -4023,31 +3877,12 @@
4023
3877
  border-width: 2px;
4024
3878
  }
4025
3879
  }
4026
- .\[\&\:\:-webkit-slider-thumb\]\:shadow-md {
3880
+ .\[\&\:\:-webkit-slider-thumb\]\:shadow-sm {
4027
3881
  &::-webkit-slider-thumb {
4028
- --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
3882
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
4029
3883
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
4030
3884
  }
4031
3885
  }
4032
- .\[\&\:\:-webkit-slider-thumb\]\:transition-transform {
4033
- &::-webkit-slider-thumb {
4034
- transition-property: transform, translate, scale, rotate;
4035
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
4036
- transition-duration: var(--tw-duration, var(--default-transition-duration));
4037
- }
4038
- }
4039
- .\[\&\:\:-webkit-slider-thumb\]\:hover\:scale-110 {
4040
- &::-webkit-slider-thumb {
4041
- &:hover {
4042
- @media (hover: hover) {
4043
- --tw-scale-x: 110%;
4044
- --tw-scale-y: 110%;
4045
- --tw-scale-z: 110%;
4046
- scale: var(--tw-scale-x) var(--tw-scale-y);
4047
- }
4048
- }
4049
- }
4050
- }
4051
3886
  .\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0 {
4052
3887
  &:has([role=checkbox]) {
4053
3888
  padding-right: calc(var(--spacing) * 0);
package/dist/hooks.d.ts CHANGED
@@ -49,6 +49,36 @@ interface UsePtySessionReturn {
49
49
  */
50
50
  declare function usePtySession({ apiUrl, token, onData }: UsePtySessionOptions): UsePtySessionReturn;
51
51
 
52
+ /**
53
+ * Sandbox-level telemetry collected by the sidecar from cgroup v2
54
+ * (Docker) or /proc (Firecracker guest). `cpuPercent` is computed
55
+ * server-side from consecutive samples; sections are null when the
56
+ * source cannot provide them.
57
+ */
58
+ interface SystemMetricsSnapshot {
59
+ cpuPercent: number | null;
60
+ cpuCores: number;
61
+ memory: {
62
+ usedBytes: number;
63
+ totalBytes: number;
64
+ } | null;
65
+ disk: {
66
+ usedBytes: number;
67
+ totalBytes: number;
68
+ path: string;
69
+ } | null;
70
+ source: "cgroup-v2" | "proc";
71
+ }
72
+ interface LatencyPercentiles {
73
+ p50: number | null;
74
+ p95: number | null;
75
+ sampleCount: number;
76
+ }
77
+ interface SandboxLatencyMetrics {
78
+ ttftMs: LatencyPercentiles;
79
+ firstResponseMs: LatencyPercentiles;
80
+ runDurationMs: LatencyPercentiles;
81
+ }
52
82
  /**
53
83
  * Shape returned by the sidecar `/metrics/json` endpoint. Only the
54
84
  * fields read by this hook are modeled; the sidecar may add more.
@@ -67,6 +97,22 @@ interface SidecarMetricsPayload {
67
97
  system?: number;
68
98
  };
69
99
  };
100
+ system?: SystemMetricsSnapshot | null;
101
+ latency?: SandboxLatencyMetrics;
102
+ }
103
+ /**
104
+ * One polled time-series point, sourced from the sandbox-level
105
+ * `system` section. Null values mean the sidecar could not provide
106
+ * that reading — charts must render a gap, not a zero.
107
+ */
108
+ interface SandboxMetricsSample {
109
+ /** Wall-clock ms when the sample was committed client-side. */
110
+ at: number;
111
+ cpuPercent: number | null;
112
+ memoryUsedBytes: number | null;
113
+ memoryTotalBytes: number | null;
114
+ diskUsedBytes: number | null;
115
+ diskTotalBytes: number | null;
70
116
  }
71
117
  interface SandboxMetrics {
72
118
  /**
@@ -92,9 +138,24 @@ interface UseSandboxMetricsOptions {
92
138
  enabled?: boolean;
93
139
  /** Poll cadence; clamped to a 500ms floor. Defaults to 3000. */
94
140
  intervalMs?: number;
141
+ /** Max retained history samples for charting. Defaults to 120. */
142
+ historyLimit?: number;
95
143
  }
96
144
  interface UseSandboxMetricsResult {
97
145
  metrics: SandboxMetrics | null;
146
+ /**
147
+ * Sandbox-level (container/VM) telemetry. Null until the sidecar
148
+ * reports a `system` section — older sidecars never will, and
149
+ * consumers must surface that as "unavailable", not zeros.
150
+ */
151
+ system: SystemMetricsSnapshot | null;
152
+ /** Agent latency percentiles (TTFT, first response, run duration). */
153
+ latency: SandboxLatencyMetrics | null;
154
+ /**
155
+ * Rolling window of system samples (oldest first), capped at
156
+ * `historyLimit`. Cleared when the target sandbox changes.
157
+ */
158
+ history: SandboxMetricsSample[];
98
159
  /**
99
160
  * True only until the first successful sample has arrived (or the
100
161
  * first one after the target `sandboxId` changes). Subsequent polls
@@ -111,7 +172,7 @@ interface UseSandboxMetricsResult {
111
172
  * derives a CPU% value from consecutive cumulative-CPU samples. Used
112
173
  * by the sandbox overview dashboard to drive live CPU/memory panels.
113
174
  */
114
- declare function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled, intervalMs, }: UseSandboxMetricsOptions): UseSandboxMetricsResult;
175
+ declare function useSandboxMetrics({ apiBaseUrl, sandboxId, token, enabled, intervalMs, historyLimit, }: UseSandboxMetricsOptions): UseSandboxMetricsResult;
115
176
 
116
177
  /** List all sessions for a sidecar. */
117
178
  declare function useSessions(apiUrl: string, token: string | null): _tanstack_react_query.UseQueryResult<Session[], Error>;
@@ -125,4 +186,4 @@ declare function useRenameSession(apiUrl: string, token: string | null): _tansta
125
186
  title: string;
126
187
  }, unknown>;
127
188
 
128
- export { type SandboxMetrics, type SidecarMetricsPayload, type UsePtySessionOptions, type UsePtySessionReturn, type UseSandboxMetricsOptions, type UseSandboxMetricsResult, useCreateSession, useDeleteSession, usePtySession, useRenameSession, useSandboxMetrics, useSessions };
189
+ export { type LatencyPercentiles, type SandboxLatencyMetrics, type SandboxMetrics, type SandboxMetricsSample, type SidecarMetricsPayload, type SystemMetricsSnapshot, type UsePtySessionOptions, type UsePtySessionReturn, type UseSandboxMetricsOptions, type UseSandboxMetricsResult, useCreateSession, useDeleteSession, usePtySession, useRenameSession, useSandboxMetrics, useSessions };
package/dist/hooks.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  useSdkSession,
18
18
  useSessions,
19
19
  useToolCallStream
20
- } from "./chunk-76IQLPW2.js";
20
+ } from "./chunk-SOKKTB7W.js";
21
21
  import {
22
22
  usePtySession
23
23
  } from "./chunk-AG7QDC2Q.js";
package/dist/index.d.ts CHANGED
@@ -4,11 +4,11 @@ export { CodeBlock as CodeBlockDisplay, Markdown, MarkdownProps } from '@tangle-
4
4
  export { AgentWorkbench, ApprovalConfidenceStat, ApprovalItem, ApprovalQueue, ApprovalQueueProps, AuditCheck, AuditResults, AuditResultsProps, BannerType, CalendarEvent, CalendarView, CalendarViewProps, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, SessionActivityMonitor, SessionActivityMonitorProps, SessionSidebar, SessionSidebarBadge, SessionSidebarFilter, SessionSidebarItem, SessionSidebarLink, SessionSidebarProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TaskBoard, TaskBoardColumn, TaskBoardItem, TaskBoardProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
5
5
  export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from '@tangle-network/ui/openui';
6
6
  export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatInput, ChatInputProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, PendingFile, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from '@tangle-network/ui/chat';
7
- export { AgentSessionControls, AgentSessionControlsProps, AgentSessionHarnessControl, AgentSessionModelControl, AgentSessionReasoningControl, ArtifactAgentDock, ArtifactAgentDockProps, ArtifactAgentDockTransport, ArtifactDockMessage, ArtifactDockStreamEvent, ArtifactKind, ArtifactScope, DEFAULT_REASONING_LEVEL_OPTIONS, ReasoningLevel, ReasoningLevelOption, ReasoningLevelPicker, ReasoningLevelPickerProps, createFetchTransport } from './chat.js';
7
+ export { AgentSessionControls, AgentSessionControlsProps, AgentSessionHarnessControl, AgentSessionModelControl, AgentSessionReasoningControl, ArtifactAgentDock, ArtifactAgentDockProps, ArtifactAgentDockTransport, ArtifactDockMessage, ArtifactDockStreamEvent, ArtifactKind, ArtifactScope, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_MODEL_POLICIES, ReasoningLevel, ReasoningLevelOption, ReasoningLevelPicker, ReasoningLevelPickerProps, createFetchTransport, isModelCompatibleWithHarness, modelProvider, snapHarnessToModel, snapModelToHarness } from './chat.js';
8
8
  export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps } from '@tangle-network/ui/run';
9
9
  export { CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, QuestionPreview, WebSearchPreview, WriteFilePreview } from '@tangle-network/ui/tool-previews';
10
10
  export { FileArtifactPane, FileArtifactPaneProps, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, filterFileTree } from '@tangle-network/ui/files';
11
- export { BackendConfig, BackendConfigProps, BackendStatusData, ClusterStatusBar, ClusterStatusBarProps, ClusterStatusItem, CreditBalance, CreditBalanceProps, DashboardLayout, DashboardLayoutProps, DashboardProfile, DashboardSnapshotInfo, DashboardUser, ExposedPort, GitCommitData, GitPanel, GitPanelProps, GitStatusData, INSUFFICIENT_BALANCE_CODE, InfoPanel, InfoPanelProps, InsufficientBalance, Invoice, InvoiceTable, InvoiceTableProps, McpServer, NavItem, NetworkConfig, NetworkConfigData, NetworkConfigProps, NewSandboxCard, NewSandboxCardProps, OutOfCreditsModal, OutOfCreditsModalProps, PlanCardData, PlanCards, PlanCardsProps, PlanFeature, PortsList, PortsListProps, ProcessInfo, ProcessList, ProcessListProps, ProductVariant, ProfileAvatar, ProfileAvatarProps, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, PromoBanner, PromoBannerProps, RailButton, RailButtonProps, RailModeButton, RailModeButtonProps, RailSeparator, RailSeparatorProps, ResourceMeter, ResourceMeterProps, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, SandboxCardData, SandboxCardProps, SandboxStatus, SandboxTable, SandboxTableProps, Sidebar, SidebarContent, SidebarContentProps, SidebarPanel, SidebarPanelContent, SidebarPanelContentProps, SidebarPanelHeader, SidebarPanelHeaderProps, SidebarPanelProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailFooter, SidebarRailFooterProps, SidebarRailHeader, SidebarRailHeaderProps, SidebarRailNav, SidebarRailNavProps, SidebarRailProps, SidebarUser, SnapshotList, SnapshotListProps, SystemLogsViewer, SystemLogsViewerProps, TeamRole, UsageSummary, UsageSummaryData, UsageSummaryProps, Variant, VariantList, VariantListProps, VariantOutcome, VariantStatus, canAdminSandbox, parseInsufficientBalance, useSidebar } from './dashboard.js';
11
+ export { BackendConfig, BackendConfigProps, BackendStatusData, ClusterStatusBar, ClusterStatusBarProps, ClusterStatusItem, CreditBalance, CreditBalanceProps, DashboardLayout, DashboardLayoutProps, DashboardProfile, DashboardSnapshotInfo, DashboardUser, ExposedPort, GitCommitData, GitPanel, GitPanelProps, GitStatusData, INSUFFICIENT_BALANCE_CODE, InfoPanel, InfoPanelProps, InsufficientBalance, Invoice, InvoiceTable, InvoiceTableProps, McpServer, MetricAreaChart, MetricAreaChartProps, MetricChartPoint, MetricChartTone, NavItem, NetworkConfig, NetworkConfigData, NetworkConfigProps, NewSandboxCard, NewSandboxCardProps, OutOfCreditsModal, OutOfCreditsModalProps, PlanCardData, PlanCards, PlanCardsProps, PlanFeature, PortsList, PortsListProps, ProcessInfo, ProcessList, ProcessListProps, ProductVariant, ProfileAvatar, ProfileAvatarProps, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, PromoBanner, PromoBannerProps, RailButton, RailButtonProps, RailModeButton, RailModeButtonProps, RailSeparator, RailSeparatorProps, ResourceMeter, ResourceMeterProps, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, SandboxCardData, SandboxCardProps, SandboxStatus, SandboxTable, SandboxTableProps, Sidebar, SidebarContent, SidebarContentProps, SidebarPanel, SidebarPanelContent, SidebarPanelContentProps, SidebarPanelHeader, SidebarPanelHeaderProps, SidebarPanelProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailFooter, SidebarRailFooterProps, SidebarRailHeader, SidebarRailHeaderProps, SidebarRailNav, SidebarRailNavProps, SidebarRailProps, SidebarUser, SnapshotList, SnapshotListProps, SystemLogsViewer, SystemLogsViewerProps, TeamRole, UsageSummary, UsageSummaryData, UsageSummaryProps, Variant, VariantList, VariantListProps, VariantOutcome, VariantStatus, canAdminSandbox, parseInsufficientBalance, useSidebar } from './dashboard.js';
12
12
  export { B as Backend, a as BackendSelector, b as BackendSelectorProps, H as HARNESS_OPTIONS, c as HarnessPicker, d as HarnessPickerProps, e as HarnessType } from './harness-picker-C1W3rTeb.js';
13
13
  export { M as ModelInfo, a as ModelPicker, b as ModelPickerProps, c as ModelPickerVariant, d as canonicalModelId, f as formatContext, e as formatPricing } from './model-picker-DUfMTQo5.js';
14
14
  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';