@tangle-network/sandbox-ui 0.20.3 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat.d.ts +111 -1
- package/dist/chat.js +17 -3
- package/dist/{chunk-QNVVKMEW.js → chunk-4KAPMTPU.js} +1 -542
- package/dist/chunk-DNZ4DTNA.js +547 -0
- package/dist/chunk-ESRYVGHF.js +147 -0
- package/dist/{chunk-R6QNJQRH.js → chunk-LA5GHELP.js} +446 -451
- package/dist/{chunk-CMY7W45U.js → chunk-MEDE37J5.js} +8 -2
- package/dist/{chunk-CP2L6B53.js → chunk-R6NONXFC.js} +12 -8
- package/dist/{chunk-76IQLPW2.js → chunk-SOKKTB7W.js} +29 -5
- package/dist/{chunk-MQ52AYJX.js → chunk-TAAYDQGM.js} +236 -24
- package/dist/dashboard.d.ts +37 -48
- package/dist/dashboard.js +14 -8
- package/dist/globals.css +33 -209
- package/dist/harness-picker-C1W3rTeb.d.ts +49 -0
- package/dist/hooks.d.ts +64 -3
- package/dist/hooks.js +2 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.js +33 -15
- package/dist/{template-card-gf-InrfN.d.ts → model-picker-DUfMTQo5.d.ts} +1 -86
- package/dist/pages.d.ts +5 -37
- package/dist/pages.js +304 -396
- package/dist/sdk-hooks-jUbIngSV.d.ts +96 -0
- package/dist/sdk-hooks.d.ts +2 -77
- package/dist/sdk-hooks.js +1 -1
- package/dist/styles.css +33 -209
- package/dist/template-card-UhV3pmRC.d.ts +88 -0
- package/dist/workspace.d.ts +7 -0
- package/dist/workspace.js +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -78,27 +78,33 @@ import {
|
|
|
78
78
|
useSdkSession,
|
|
79
79
|
useSessions,
|
|
80
80
|
useToolCallStream
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-SOKKTB7W.js";
|
|
82
82
|
import {
|
|
83
83
|
usePtySession
|
|
84
84
|
} from "./chunk-AG7QDC2Q.js";
|
|
85
85
|
import {
|
|
86
86
|
useSessionStream,
|
|
87
87
|
useSidecarAuth
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-MEDE37J5.js";
|
|
89
89
|
import {
|
|
90
|
+
AgentSessionControls,
|
|
90
91
|
AgentTimeline,
|
|
91
92
|
ArtifactAgentDock,
|
|
92
93
|
ChatContainer,
|
|
93
94
|
ChatInput,
|
|
94
95
|
ChatMessage,
|
|
95
96
|
DEFAULT_REASONING_LEVEL_OPTIONS,
|
|
97
|
+
HARNESS_MODEL_POLICIES,
|
|
96
98
|
MessageList,
|
|
97
99
|
ReasoningLevelPicker,
|
|
98
100
|
ThinkingIndicator,
|
|
99
101
|
UserMessage,
|
|
100
|
-
createFetchTransport
|
|
101
|
-
|
|
102
|
+
createFetchTransport,
|
|
103
|
+
isModelCompatibleWithHarness,
|
|
104
|
+
modelProvider,
|
|
105
|
+
snapHarnessToModel,
|
|
106
|
+
snapModelToHarness
|
|
107
|
+
} from "./chunk-TAAYDQGM.js";
|
|
102
108
|
import {
|
|
103
109
|
ExpandedToolDetail,
|
|
104
110
|
InlineThinkingItem,
|
|
@@ -122,7 +128,7 @@ import {
|
|
|
122
128
|
TaskBoard,
|
|
123
129
|
TerminalPanel,
|
|
124
130
|
WorkspaceLayout
|
|
125
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-R6NONXFC.js";
|
|
126
132
|
import {
|
|
127
133
|
OpenUIArtifactRenderer
|
|
128
134
|
} from "./chunk-AZ3AWMTM.js";
|
|
@@ -136,15 +142,13 @@ import {
|
|
|
136
142
|
} from "./chunk-3J6FG3FJ.js";
|
|
137
143
|
import {
|
|
138
144
|
BackendConfig,
|
|
139
|
-
BackendSelector,
|
|
140
145
|
ClusterStatusBar,
|
|
141
146
|
CreditBalance,
|
|
142
147
|
DashboardLayout,
|
|
143
148
|
GitPanel,
|
|
144
|
-
HARNESS_OPTIONS,
|
|
145
|
-
HarnessPicker,
|
|
146
149
|
INSUFFICIENT_BALANCE_CODE,
|
|
147
150
|
InvoiceTable,
|
|
151
|
+
MetricAreaChart,
|
|
148
152
|
NetworkConfig,
|
|
149
153
|
NewSandboxCard,
|
|
150
154
|
OutOfCreditsModal,
|
|
@@ -182,19 +186,15 @@ import {
|
|
|
182
186
|
canAdminSandbox,
|
|
183
187
|
parseInsufficientBalance,
|
|
184
188
|
useSidebar
|
|
185
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-LA5GHELP.js";
|
|
186
190
|
import {
|
|
187
191
|
BillingDashboard,
|
|
188
192
|
InfoPanel,
|
|
189
|
-
ModelPicker,
|
|
190
193
|
PricingPage,
|
|
191
194
|
TemplateCard,
|
|
192
195
|
UsageChart,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
formatPrice,
|
|
196
|
-
formatPricing
|
|
197
|
-
} from "./chunk-QNVVKMEW.js";
|
|
196
|
+
formatPrice
|
|
197
|
+
} from "./chunk-DNZ4DTNA.js";
|
|
198
198
|
import {
|
|
199
199
|
Avatar,
|
|
200
200
|
AvatarFallback,
|
|
@@ -282,6 +282,17 @@ import {
|
|
|
282
282
|
useTheme,
|
|
283
283
|
useToast
|
|
284
284
|
} from "./chunk-7ZA5SEK3.js";
|
|
285
|
+
import {
|
|
286
|
+
BackendSelector,
|
|
287
|
+
HARNESS_OPTIONS,
|
|
288
|
+
HarnessPicker
|
|
289
|
+
} from "./chunk-ESRYVGHF.js";
|
|
290
|
+
import {
|
|
291
|
+
ModelPicker,
|
|
292
|
+
canonicalModelId,
|
|
293
|
+
formatContext,
|
|
294
|
+
formatPricing
|
|
295
|
+
} from "./chunk-4KAPMTPU.js";
|
|
285
296
|
import "./chunk-EI44GEQ5.js";
|
|
286
297
|
|
|
287
298
|
// src/index.ts
|
|
@@ -302,6 +313,7 @@ import {
|
|
|
302
313
|
} from "@tangle-network/ui/tool-previews";
|
|
303
314
|
import { Markdown } from "@tangle-network/ui/markdown";
|
|
304
315
|
export {
|
|
316
|
+
AgentSessionControls,
|
|
305
317
|
AgentTimeline,
|
|
306
318
|
AgentWorkbench,
|
|
307
319
|
ApprovalQueue,
|
|
@@ -373,6 +385,7 @@ export {
|
|
|
373
385
|
GitPanel,
|
|
374
386
|
GlobResultsPreview,
|
|
375
387
|
GrepResultsPreview,
|
|
388
|
+
HARNESS_MODEL_POLICIES,
|
|
376
389
|
HARNESS_OPTIONS,
|
|
377
390
|
HarnessPicker,
|
|
378
391
|
INSUFFICIENT_BALANCE_CODE,
|
|
@@ -388,6 +401,7 @@ export {
|
|
|
388
401
|
Logo,
|
|
389
402
|
Markdown,
|
|
390
403
|
MessageList,
|
|
404
|
+
MetricAreaChart,
|
|
391
405
|
ModelPicker,
|
|
392
406
|
NetworkConfig,
|
|
393
407
|
NewSandboxCard,
|
|
@@ -521,8 +535,10 @@ export {
|
|
|
521
535
|
getToolErrorText,
|
|
522
536
|
getTotalRunningSessionCount,
|
|
523
537
|
hasBackgroundRunningSessions,
|
|
538
|
+
isModelCompatibleWithHarness,
|
|
524
539
|
isStreamingAtom,
|
|
525
540
|
messagesAtom,
|
|
541
|
+
modelProvider,
|
|
526
542
|
parseInsufficientBalance,
|
|
527
543
|
partMapAtom,
|
|
528
544
|
registerActiveSession,
|
|
@@ -533,6 +549,8 @@ export {
|
|
|
533
549
|
setActiveSessionError,
|
|
534
550
|
setActiveSessionRunning,
|
|
535
551
|
setForegroundActiveSession,
|
|
552
|
+
snapHarnessToModel,
|
|
553
|
+
snapModelToHarness,
|
|
536
554
|
timeAgo,
|
|
537
555
|
truncateText,
|
|
538
556
|
unregisterActiveSession,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Wire-format model entry as returned by `/v1/models` on the Tangle Router
|
|
@@ -92,88 +91,4 @@ declare function formatPricing(pricing: ModelInfo["pricing"]): string | null;
|
|
|
92
91
|
declare function formatContext(ctx: number | undefined): string | null;
|
|
93
92
|
declare function ModelPicker({ value, onChange, models, loading, recents, popular, excludeProviders, modalities, variant, label, placeholder, className, triggerClassName, disabled, }: ModelPickerProps): react_jsx_runtime.JSX.Element;
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
status: string;
|
|
97
|
-
tierName: string;
|
|
98
|
-
renewsAt: string;
|
|
99
|
-
}
|
|
100
|
-
interface BillingBalance {
|
|
101
|
-
available: number;
|
|
102
|
-
used: number;
|
|
103
|
-
}
|
|
104
|
-
interface BillingUsage {
|
|
105
|
-
period: string;
|
|
106
|
-
total: number;
|
|
107
|
-
byModel: Record<string, number>;
|
|
108
|
-
}
|
|
109
|
-
interface BillingDashboardProps {
|
|
110
|
-
subscription: BillingSubscription | null;
|
|
111
|
-
balance: BillingBalance;
|
|
112
|
-
usage: BillingUsage;
|
|
113
|
-
onManageSubscription: () => void;
|
|
114
|
-
onAddCredits: () => void;
|
|
115
|
-
variant?: "sandbox";
|
|
116
|
-
className?: string;
|
|
117
|
-
cardClassName?: string;
|
|
118
|
-
}
|
|
119
|
-
declare function BillingDashboard({ subscription, balance, usage, onManageSubscription, onAddCredits, variant, className, cardClassName, }: BillingDashboardProps): react_jsx_runtime.JSX.Element;
|
|
120
|
-
|
|
121
|
-
interface PricingTier {
|
|
122
|
-
id: string;
|
|
123
|
-
name: string;
|
|
124
|
-
description: string;
|
|
125
|
-
monthlyPriceCents: number;
|
|
126
|
-
yearlyPriceCents?: number;
|
|
127
|
-
features: string[];
|
|
128
|
-
recommended?: boolean;
|
|
129
|
-
creditsPerMonth?: number;
|
|
130
|
-
monthlyPriceId?: string;
|
|
131
|
-
yearlyPriceId?: string;
|
|
132
|
-
}
|
|
133
|
-
interface PricingPageProps {
|
|
134
|
-
tiers: PricingTier[];
|
|
135
|
-
currentTierId?: string;
|
|
136
|
-
billingPeriod: "monthly" | "yearly";
|
|
137
|
-
onBillingPeriodChange: (period: "monthly" | "yearly") => void;
|
|
138
|
-
onSelectTier: (tierId: string) => void;
|
|
139
|
-
variant?: "sandbox";
|
|
140
|
-
loading?: boolean;
|
|
141
|
-
className?: string;
|
|
142
|
-
cardClassName?: string;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Formats an integer cent amount as a human-readable USD price.
|
|
146
|
-
* Whole-dollar amounts omit decimals ($10), fractional amounts show two ($10.99).
|
|
147
|
-
* Returns "$0" for non-finite or negative inputs.
|
|
148
|
-
* @param cents - Amount in whole US cents (e.g. 1099 for $10.99).
|
|
149
|
-
*/
|
|
150
|
-
declare function formatPrice(cents: number): string;
|
|
151
|
-
declare function PricingPage({ tiers, currentTierId, billingPeriod, onBillingPeriodChange, onSelectTier, loading, className, }: PricingPageProps): react_jsx_runtime.JSX.Element;
|
|
152
|
-
|
|
153
|
-
interface UsageDataPoint {
|
|
154
|
-
date: string;
|
|
155
|
-
value: number;
|
|
156
|
-
}
|
|
157
|
-
interface UsageChartProps {
|
|
158
|
-
data: UsageDataPoint[];
|
|
159
|
-
title: string;
|
|
160
|
-
unit: string;
|
|
161
|
-
className?: string;
|
|
162
|
-
}
|
|
163
|
-
declare function UsageChart({ data, title, unit, className }: UsageChartProps): react_jsx_runtime.JSX.Element;
|
|
164
|
-
|
|
165
|
-
interface TemplateCardData {
|
|
166
|
-
id: string;
|
|
167
|
-
name: string;
|
|
168
|
-
description: string;
|
|
169
|
-
icon?: React.ReactNode;
|
|
170
|
-
tags?: string[];
|
|
171
|
-
}
|
|
172
|
-
interface TemplateCardProps {
|
|
173
|
-
template: TemplateCardData;
|
|
174
|
-
onUseTemplate: (templateId: string) => void;
|
|
175
|
-
className?: string;
|
|
176
|
-
}
|
|
177
|
-
declare function TemplateCard({ template, onUseTemplate, className }: TemplateCardProps): react_jsx_runtime.JSX.Element;
|
|
178
|
-
|
|
179
|
-
export { type BillingBalance as B, type ModelInfo as M, PricingPage as P, TemplateCard as T, UsageChart as U, BillingDashboard as a, type BillingDashboardProps as b, type BillingSubscription as c, type BillingUsage as d, ModelPicker as e, type ModelPickerProps as f, type ModelPickerVariant as g, type PricingPageProps as h, type PricingTier as i, type TemplateCardData as j, type TemplateCardProps as k, type UsageChartProps as l, type UsageDataPoint as m, canonicalModelId as n, formatContext as o, formatPrice as p, formatPricing as q };
|
|
94
|
+
export { type ModelInfo as M, ModelPicker as a, type ModelPickerProps as b, type ModelPickerVariant as c, canonicalModelId as d, formatPricing as e, formatContext as f };
|
package/dist/pages.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { c as BillingSubscription, B as BillingBalance, d as BillingUsage,
|
|
2
|
+
import { c as BillingSubscription, B as BillingBalance, d as BillingUsage, j as UsageDataPoint, f as PricingTier, g as TemplateCardData } from './template-card-UhV3pmRC.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
export { M as ModelInfo } from './model-picker-DUfMTQo5.js';
|
|
4
5
|
|
|
5
6
|
type ProductVariant$1 = "sandbox";
|
|
6
7
|
interface BillingPageData {
|
|
@@ -89,37 +90,6 @@ interface ProvisioningWizardProps {
|
|
|
89
90
|
onLoadStartupScripts?: () => Promise<StartupScriptEntry[]>;
|
|
90
91
|
/** Plan-based resource limits — caps the slider maximums */
|
|
91
92
|
resourceLimits?: ResourceLimits;
|
|
92
|
-
/**
|
|
93
|
-
* Models to surface in step 3, typically the wire-format payload from
|
|
94
|
-
* Tangle Router's `/v1/models`. The wizard stores the canonical id
|
|
95
|
-
* (`<provider>/<model>`) on `ProvisioningConfig.modelTier`, which is
|
|
96
|
-
* the same shape the API expects for `backend.model.model`. While the
|
|
97
|
-
* list is empty (e.g. router fetch in flight) the picker renders a
|
|
98
|
-
* disabled trigger with "no models available" copy.
|
|
99
|
-
*/
|
|
100
|
-
models?: ModelInfo[];
|
|
101
|
-
/**
|
|
102
|
-
* Canonical model ids to surface in the picker's "Popular" section.
|
|
103
|
-
* Forwarded straight to ModelPicker. Use this to surface a curated set
|
|
104
|
-
* of common models (e.g. one per provider/tier) without imposing a
|
|
105
|
-
* Fast/Balanced/Best taxonomy.
|
|
106
|
-
*/
|
|
107
|
-
popular?: ReadonlyArray<string>;
|
|
108
|
-
/**
|
|
109
|
-
* The user's saved preferred model id (canonical, e.g.
|
|
110
|
-
* "openai/gpt-5.4"). Used as the initial `modelTier` when
|
|
111
|
-
* `defaultConfig.modelTier` isn't set, and as the next-best fallback
|
|
112
|
-
* when the current selection drops out of the loaded model list.
|
|
113
|
-
* Persistence is the caller's responsibility.
|
|
114
|
-
*/
|
|
115
|
-
defaultModel?: string | null;
|
|
116
|
-
/**
|
|
117
|
-
* Persist the current `modelTier` as the user's default. When provided,
|
|
118
|
-
* the wizard renders a "Save as default" affordance under the model
|
|
119
|
-
* picker. The wizard does not store anything itself — the caller owns
|
|
120
|
-
* persistence (e.g. localStorage, account settings API).
|
|
121
|
-
*/
|
|
122
|
-
onSetDefault?: (modelId: string) => void;
|
|
123
93
|
sshAccess?: SshAccessConfig;
|
|
124
94
|
/** Real pricing rates from the API for accurate cost calculation */
|
|
125
95
|
pricingRates?: PricingRates;
|
|
@@ -142,8 +112,6 @@ interface ProvisioningConfig {
|
|
|
142
112
|
cpuCores: number;
|
|
143
113
|
ramGB: number;
|
|
144
114
|
storageGB: number;
|
|
145
|
-
modelTier: string;
|
|
146
|
-
systemPrompt: string;
|
|
147
115
|
name: string;
|
|
148
116
|
gitUrl: string;
|
|
149
117
|
envVars: {
|
|
@@ -155,7 +123,7 @@ interface ProvisioningConfig {
|
|
|
155
123
|
startupScriptIds?: string[];
|
|
156
124
|
}
|
|
157
125
|
declare function resolveEnvironment(env: EnvironmentEntry): EnvironmentOption;
|
|
158
|
-
declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits,
|
|
126
|
+
declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits, sshAccess, pricingRates, planTiers, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
|
|
159
127
|
|
|
160
128
|
type ProductVariant = "sandbox";
|
|
161
129
|
interface StandalonePricingPageProps {
|
|
@@ -318,7 +286,7 @@ interface StartupScriptsPageProps {
|
|
|
318
286
|
declare function StartupScriptsPage({ apiClient, className }: StartupScriptsPageProps): react_jsx_runtime.JSX.Element;
|
|
319
287
|
|
|
320
288
|
type TemplateCategory = "blockchain" | "ai-ml" | "frontend" | "infrastructure" | "general";
|
|
321
|
-
type TemplatePreset = Omit<ProvisioningConfig, "name" | "gitUrl" | "envVars" | "driver" | "startupScriptIds"
|
|
289
|
+
type TemplatePreset = Omit<ProvisioningConfig, "name" | "gitUrl" | "envVars" | "driver" | "startupScriptIds">;
|
|
322
290
|
declare function getPresetForTemplate(id: string): TemplatePreset;
|
|
323
291
|
|
|
324
|
-
export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption,
|
|
292
|
+
export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption, type PlanTierInfo, type PricingRates, PricingTier, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, type ResourceLimits, type ScriptType, type Secret, type SecretsApiClient, SecretsPage, type SecretsPageProps, type SshAccessConfig, type SshKeyOption, StandalonePricingPage, type StandalonePricingPageProps, type StartupScript, type StartupScriptEntry, type StartupScriptFormData, type StartupScriptsApiClient, StartupScriptsPage, type StartupScriptsPageProps, type TemplateCategory, type TemplatePreset, TemplatesPage, type TemplatesPageProps, getPresetForTemplate, resolveEnvironment };
|