The open-source agent harness - the runtime layer that turns an LLM into a working agent.
Wire skill and sandbox provider settings catalogs into the frontend.
debajyoti-truefoundry22136b840ed1
diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsxindex 9cf2f81c2..addc570e0 100644--- a/packages/frontend/src/App.tsx+++ b/packages/frontend/src/App.tsx@@ -12,6 +12,8 @@ import { getCapabilities, listMcpServers, listModels, listSkills } from './catalimport { createConnectorCatalog } from './connectorCatalog';import { createHarnessChatServer, type HarnessAgentSpec } from './harnessServer';import { createModelProviderCatalog } from './modelProviderCatalog';+import { createSandboxProviderCatalog } from './sandboxProviderCatalog';+import { createSkillCatalog } from './skillCatalog';/** Harness model names are `provider/model`. */function providerOf(name: string): string {@@ -49,12 +51,8 @@ const server = createTrueFoundryServer<HarnessAgentSpec>({catalog: {modelCatalog: createModelProviderCatalog(),connectorCatalog: createConnectorCatalog(),- // Skills settings still deferred (UI create shape is repo/directory; Harness is git manifest).- skillCatalog: {- getSkillCatalog: () => Promise.resolve([]),- listSkills: () => Promise.resolve([]),- createSkill: () => Promise.reject(new Error('not implemented')),- },+ skillCatalog: createSkillCatalog(),+ sandboxCatalog: createSandboxProviderCatalog(),},});diff --git a/packages/frontend/src/catalog.ts b/packages/frontend/src/catalog.tsindex e5f7f3db3..2af1459df 100644--- a/packages/frontend/src/catalog.ts+++ b/packages/frontend/src/catalog.ts@@ -1,8 +1,6 @@/** DB-backed catalog list helpers for the composer pickers and boot. */import type { TrueForgeApi as Harness } from 'trueforge';-import { TrueForge } from 'trueforge';--const client = new TrueForge({ baseUrl: '/' });+import { harnessClient as client } from './harnessClient';export async function listModels(): Promise<Harness.Model[]> {const body = await client.models.list();diff --git a/packages/frontend/src/connectorCatalog.ts b/packages/frontend/src/connectorCatalog.tsindex c6947f990..6070f1f30 100644--- a/packages/frontend/src/connectorCatalog.ts+++ b/packages/frontend/src/connectorCatalog.ts@@ -16,7 +16,7 @@ import type {UpdateConnectorRequest,} from '@truefoundry/trueforge-ui';import type { TrueForgeApi as Harness } from 'trueforge';-import { TrueForge } from 'trueforge';+import { harnessClient as client } from './harnessClient';export type UiConnectorAuth = ConnectorAuth;export type UiConnectorAuthPublic = ConnectorAuthPublic;@@ -25,8 +25,6 @@ export type UiConnectorCatalogEntry = ConnectorCatalogEntry;const DEFAULT_API_KEY_HEADER = 'Authorization';-const client = new TrueForge({ baseUrl: '/' });-export function toUiAuthPublic(auth: Harness.ConfiguredMcpServerAuth | undefined): UiConnectorAuthPublic {if (auth === undefined) {return { type: 'none' };diff --git a/packages/frontend/src/harnessClient.ts b/packages/frontend/src/harnessClient.tsnew file mode 100644index 000000000..85b4392f2--- /dev/null+++ b/packages/frontend/src/harnessClient.ts@@ -0,0 +1,23 @@+/**+ * Shared TrueForge HTTP client for the Harness host app.+ * One place for baseUrl / future auth (headers, API key) so catalog adapters+ * and the chat server do not each construct their own client.+ */+import { TrueForge } from 'trueforge';++export interface CreateHarnessClientOptions {+ baseUrl?: string;+ fetch?: typeof fetch;+}++const DEFAULT_BASE_URL = '/';++export function createHarnessClient(options: CreateHarnessClientOptions = {}): TrueForge {+ return new TrueForge({+ baseUrl: options.baseUrl ?? DEFAULT_BASE_URL,+ ...(options.fetch ? { fetch: options.fetch } : {}),+ });+}++/** Default browser client — Vite proxies `/api/*` to the Harness server. */+export const harnessClient = createHarnessClient();diff --git a/packages/frontend/src/harnessServer.ts b/packages/frontend/src/harnessServer.tsindex 0fa25af19..0209b11a9 100644--- a/packages/frontend/src/harnessServer.ts+++ b/packages/frontend/src/harnessServer.ts@@ -25,7 +25,7 @@ import type {UserMessageContent,} from '@truefoundry/trueforge-ui';import type { TrueForgeApi as Harness } from 'trueforge';-import { TrueForge } from 'trueforge';+import { createHarnessClient, harnessClient, type CreateHarnessClientOptions } from './harnessClient';export type HarnessSkillMount = SkillMount;export type HarnessMcpServerMount = McpServerMount & Harness.McpServer;@@ -42,10 +42,7 @@ export interface HarnessSession extends Session<HarnessAgentSpec> {isMutable: true;}-export interface CreateHarnessServerOptions {- baseUrl?: string;- fetch?: typeof fetch;-}+export type CreateHarnessServerOptions = CreateHarnessClientOptions;/** Mount ids are derived, not stored: Harness returns MCP servers keyed by name. */function toUiMcpServer(server: Harness.McpServer): HarnessMcpServerMount {@@ -177,10 +174,8 @@ function toHarnessPreviousTurnId(previousTurnId: string): Harness.PreviousTurnId}export function createHarnessChatServer(options: CreateHarnessServerOptions = {}): AgentChatServer<HarnessAgentSpec> {- const client = new TrueForge({- baseUrl: options.baseUrl ?? '/',- ...(options.fetch ? { fetch: options.fetch } : {}),- });+ const client =+ options.baseUrl === undefined && options.fetch === undefined ? harnessClient : createHarnessClient(options);return {async createSession(request) {diff --git a/packages/frontend/src/index.css b/packages/frontend/src/index.cssindex f60c0a70e..e67dcf62d 100644--- a/packages/frontend/src/index.css+++ b/packages/frontend/src/index.css@@ -1,8 +1,8 @@/* The SDK ships utilities and theme tokens but no reset. Preflight goes in itsown layer: unlayered it would outrank `tfy-agent-ui-utilities` and strip theSDK's own margin, padding and border. */-@import "tailwindcss";-@import "@truefoundry/trueforge-ui/styles.css";+@import 'tailwindcss';+@import '@truefoundry/trueforge-ui/styles.css';html,body,diff --git a/packages/frontend/src/modelProviderCatalog.ts b/packages/frontend/src/modelProviderCatalog.tsindex 5c5a757d3..aab7ab003 100644--- a/packages/frontend/src/modelProviderCatalog.ts+++ b/packages/frontend/src/modelProviderCatalog.ts@@ -13,7 +13,8 @@ import type {ModelProviderCatalogEntry,UpdateModelProviderRequest,} from '@truefoundry/trueforge-ui';-import { TrueForgeApi as Harness, TrueForge } from 'trueforge';+import { TrueForgeApi as Harness } from 'trueforge';+import { harnessClient as client } from './harnessClient';/** Custom-form rows omit properties; catalog rows round-trip them. */export type UiModelEntry = ModelEntry & {properties?: Harness.ModelProperties;@@ -27,8 +28,6 @@ const DEFAULT_MODEL_PROPERTIES: Harness.ModelProperties = {maxOutputTokens: 16_384,};-const client = new TrueForge({ baseUrl: '/' });-export function toUiModelEntry(model: Harness.ModelEntry): UiModelEntry {return {id: model.modelId,diff --git a/packages/frontend/src/sandboxProviderCatalog.ts b/packages/frontend/src/sandboxProviderCatalog.tsnew file mode 100644index 000000000..ae94f95e1--- /dev/null+++ b/packages/frontend/src/sandboxProviderCatalog.ts@@ -0,0 +1,151 @@+/**+ * Maps trueforge-ui sandbox-settings calls onto Harness+ * `/api/v1/settings/sandbox-providers` (singleton upsert, no delete).+ *+ * UI: multi-row providers with `id` / `catalogId` / `name` / flat `apiKey`.+ * Harness: one Daytona provider per tenant; catalog YAML has no name — synthetic+ * identity uses `type` (`daytona`) as id/catalogId and display name `Daytona`.+ */+import type {+ SandboxCatalogServer,+ SandboxProviderBase,+ SandboxProviderCatalogEntry,+ SandboxProviderConfig,+} from '@truefoundry/trueforge-ui';+import { TrueForgeApi as Harness } from 'trueforge';+import { harnessClient as client } from './harnessClient';++export type UiSandboxProvider = SandboxProviderBase;+export type UiSandboxProviderCatalogEntry = SandboxProviderCatalogEntry;++const DAYTONA_TYPE = 'daytona';+const DAYTONA_DISPLAY_NAME = 'Daytona';++function displayNameForType(type: string): string {+ if (type === DAYTONA_TYPE) {+ return DAYTONA_DISPLAY_NAME;+ }+ return type;+}++export function configFromHarness(+ provider: Harness.CatalogDaytonaSandboxProvider | Harness.DaytonaSandboxProvider,+): SandboxProviderConfig {+ return {+ snapshotName: provider.snapshotName,+ execTimeoutMs: provider.execTimeoutMs,+ autoStopIntervalInMinutes: provider.autoStopIntervalInMinutes,+ autoArchiveIntervalInMinutes: provider.autoArchiveIntervalInMinutes,+ autoDeleteIntervalInMinutes: provider.autoDeleteIntervalInMinutes,+ };+}++export function toUiCatalogEntry(provider: Harness.CatalogDaytonaSandboxProvider): UiSandboxProviderCatalogEntry {+ return {+ id: provider.type,+ name: displayNameForType(provider.type),+ type: provider.type,+ ...configFromHarness(provider),+ };+}++export function toUiSandboxProvider(provider: Harness.DaytonaSandboxProvider): UiSandboxProvider {+ return {+ id: provider.type,+ name: displayNameForType(provider.type),+ catalogId: provider.type,+ isConnected: true,+ ...configFromHarness(provider),+ };+}++export function toHarnessManifest(+ req: {+ type: string;+ apiKey: string;+ } & SandboxProviderConfig,+): Harness.DaytonaSandboxProvider {+ if (req.type !== DAYTONA_TYPE) {+ throw new Error(`Unsupported sandbox provider type: ${req.type}`);+ }+ return {+ type: DAYTONA_TYPE,+ snapshotName: req.snapshotName,+ execTimeoutMs: req.execTimeoutMs,+ autoStopIntervalInMinutes: req.autoStopIntervalInMinutes,+ autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,+ autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes,+ auth: { apiKey: req.apiKey },+ };+}++async function resolveApiKey(apiKey: string | undefined): Promise<string> {+ const trimmed = apiKey?.trim();+ if (trimmed !== undefined && trimmed !== '') {+ return trimmed;+ }+ const existing = await client.settings.sandboxProviders.get();+ return existing.data.auth.apiKey;+}++/** Settings sandbox-catalog port for `createTrueFoundryServer`. Delete omitted (no BE route). */+export function createSandboxProviderCatalog(): SandboxCatalogServer {+ return {+ getSandboxProviderCatalog: async () => {+ const body = await client.settings.sandboxProviders.catalog();+ return body.data.map(toUiCatalogEntry);+ },+ listSandboxProviders: async req => {+ let providers: UiSandboxProvider[];+ try {+ const body = await client.settings.sandboxProviders.get();+ providers = [toUiSandboxProvider(body.data)];+ } catch (err) {+ if (err instanceof Harness.NotFoundError) {+ providers = [];+ } else {+ throw err;+ }+ }+ const query = req?.query?.trim().toLowerCase();+ if (query === undefined || query === '') {+ return providers;+ }+ return providers.filter(+ provider =>+ provider.name.toLowerCase().includes(query) ||+ provider.id.toLowerCase().includes(query) ||+ provider.snapshotName.toLowerCase().includes(query),+ );+ },+ createSandboxProvider: async req => {+ const body = await client.settings.sandboxProviders.upsert(+ toHarnessManifest({+ type: req.type,+ apiKey: req.apiKey,+ snapshotName: req.snapshotName,+ execTimeoutMs: req.execTimeoutMs,+ autoStopIntervalInMinutes: req.autoStopIntervalInMinutes,+ autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,+ autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes,+ }),+ );+ return toUiSandboxProvider(body.data);+ },+ updateSandboxProvider: async req => {+ const apiKey = await resolveApiKey(req.apiKey);+ const body = await client.settings.sandboxProviders.upsert(+ toHarnessManifest({+ type: DAYTONA_TYPE,+ apiKey,+ snapshotName: req.snapshotName,+ execTimeoutMs: req.execTimeoutMs,+ autoStopIntervalInMinutes: req.autoStopIntervalInMinutes,+ autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,+ autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes,+ }),+ );+ return toUiSandboxProvider(body.data);+ },+ };+}diff --git a/packages/frontend/src/skillCatalog.ts b/packages/frontend/src/skillCatalog.tsnew file mode 100644index 000000000..422019c36--- /dev/null+++ b/packages/frontend/src/skillCatalog.ts@@ -0,0 +1,89 @@+/**+ * Maps trueforge-ui skill-settings calls onto Harness+ * `/api/v1/settings/skills` (name-keyed upsert, no delete).+ *+ * UI: `repoURL` / skill `id` / optional `catalogId`.+ * Harness: `url` / resource `name` (no separate id or catalogId on wire).+ * For now UI `id = name`; registry link uses `catalogId = name` when the+ * configured skill name matches a catalog preset.+ */+import type { DefinedSkill, SkillCatalogEntry, SkillCatalogServer, SkillConfigBase } from '@truefoundry/trueforge-ui';+import type { TrueForgeApi as Harness } from 'trueforge';+import { harnessClient as client } from './harnessClient';++export type UiSkill = DefinedSkill;+export type UiSkillCatalogEntry = SkillCatalogEntry;++export function toUiCatalogEntry(skill: Harness.CatalogSkill): UiSkillCatalogEntry {+ return {+ id: skill.name,+ name: skill.name,+ description: skill.description,+ repoURL: skill.url,+ path: skill.path ?? '',+ ref: skill.ref,+ };+}++export function toHarnessManifest(req: SkillConfigBase): Harness.SkillManifest {+ const path = req.path.trim();+ return {+ type: 'git',+ name: req.name,+ url: req.repoURL,+ ...(path === '' ? {} : { path }),+ ref: req.ref,+ description: req.description,+ };+}++export function toUiSkill(skill: Harness.SkillManifest, catalogNames: ReadonlySet<string>): UiSkill {+ const base = {+ id: skill.name,+ name: skill.name,+ description: skill.description,+ };+ if (catalogNames.has(skill.name)) {+ return { ...base, catalogId: skill.name };+ }+ return base;+}++/** Settings skill-catalog port for `createTrueFoundryServer`. Delete omitted (no BE route). */+export function createSkillCatalog(): SkillCatalogServer<UiSkill> {+ return {+ getSkillCatalog: async () => {+ const body = await client.settings.skills.catalog();+ return body.data.map(toUiCatalogEntry);+ },+ listSkills: async req => {+ const [listed, catalog] = await Promise.all([client.settings.skills.list(), client.settings.skills.catalog()]);+ const catalogNames = new Set(catalog.data.map(entry => entry.name));+ const skills = listed.data.map(skill => toUiSkill(skill, catalogNames));+ const query = req?.query?.trim().toLowerCase();+ if (query === undefined || query === '') {+ return skills;+ }+ return skills.filter(+ skill => skill.name.toLowerCase().includes(query) || skill.description.toLowerCase().includes(query),+ );+ },+ createSkill: async req => {+ const body = await client.settings.skills.upsert(toHarnessManifest(req));+ const catalogId = 'catalogId' in req ? req.catalogId : undefined;+ if (catalogId !== undefined) {+ return {+ id: body.data.name,+ name: body.data.name,+ description: body.data.description,+ catalogId,+ };+ }+ return {+ id: body.data.name,+ name: body.data.name,+ description: body.data.description,+ };+ },+ };+}diff --git a/packages/frontend/tests/sandboxProviderCatalog.test.ts b/packages/frontend/tests/sandboxProviderCatalog.test.tsnew file mode 100644index 000000000..299c69d81--- /dev/null+++ b/packages/frontend/tests/sandboxProviderCatalog.test.ts@@ -0,0 +1,80 @@+import assert from 'node:assert/strict';+import { describe, it } from 'node:test';+import {+ configFromHarness,+ toHarnessManifest,+ toUiCatalogEntry,+ toUiSandboxProvider,+} from '../src/sandboxProviderCatalog';++describe('sandboxProviderCatalog mappers', () => {+ const harnessCatalog = {+ type: 'daytona' as const,+ snapshotName: 'truefoundry-platform-dev',+ execTimeoutMs: 60000,+ autoStopIntervalInMinutes: 5,+ autoArchiveIntervalInMinutes: 60,+ autoDeleteIntervalInMinutes: 7200,+ };++ const harnessConfigured = {+ ...harnessCatalog,+ auth: { apiKey: 'dtn_secret' },+ };++ it('stamps catalog identity from type and strips auth', () => {+ assert.deepEqual(toUiCatalogEntry(harnessCatalog), {+ id: 'daytona',+ name: 'Daytona',+ type: 'daytona',+ snapshotName: 'truefoundry-platform-dev',+ execTimeoutMs: 60000,+ autoStopIntervalInMinutes: 5,+ autoArchiveIntervalInMinutes: 60,+ autoDeleteIntervalInMinutes: 7200,+ });+ });++ it('maps configured provider without embedding apiKey', () => {+ assert.deepEqual(toUiSandboxProvider(harnessConfigured), {+ id: 'daytona',+ name: 'Daytona',+ catalogId: 'daytona',+ isConnected: true,+ snapshotName: 'truefoundry-platform-dev',+ execTimeoutMs: 60000,+ autoStopIntervalInMinutes: 5,+ autoArchiveIntervalInMinutes: 60,+ autoDeleteIntervalInMinutes: 7200,+ });+ assert.equal('auth' in toUiSandboxProvider(harnessConfigured), false);+ assert.equal('apiKey' in toUiSandboxProvider(harnessConfigured), false);+ });++ it('round-trips config fields into harness upsert body', () => {+ assert.deepEqual(+ toHarnessManifest({+ type: 'daytona',+ apiKey: 'dtn_secret',+ ...configFromHarness(harnessCatalog),+ }),+ harnessConfigured,+ );+ });++ it('rejects unsupported sandbox provider types', () => {+ assert.throws(+ () =>+ toHarnessManifest({+ type: 'other',+ apiKey: 'x',+ snapshotName: 'snap',+ execTimeoutMs: 1,+ autoStopIntervalInMinutes: 1,+ autoArchiveIntervalInMinutes: 1,+ autoDeleteIntervalInMinutes: 1,+ }),+ /Unsupported sandbox provider type/i,+ );+ });+});diff --git a/packages/frontend/tests/skillCatalog.test.ts b/packages/frontend/tests/skillCatalog.test.tsnew file mode 100644index 000000000..393b185d7--- /dev/null+++ b/packages/frontend/tests/skillCatalog.test.ts@@ -0,0 +1,116 @@+import assert from 'node:assert/strict';+import { describe, it } from 'node:test';+import { toHarnessManifest, toUiCatalogEntry, toUiSkill } from '../src/skillCatalog';++describe('skillCatalog mappers', () => {+ it('maps catalog presets with id = name and repoURL from url', () => {+ assert.deepEqual(+ toUiCatalogEntry({+ type: 'git',+ name: 'algorithmic-art',+ url: 'https://github.com/anthropics/skills',+ path: 'skills/algorithmic-art',+ ref: 'main',+ description: 'Create algorithmic art',+ }),+ {+ id: 'algorithmic-art',+ name: 'algorithmic-art',+ description: 'Create algorithmic art',+ repoURL: 'https://github.com/anthropics/skills',+ path: 'skills/algorithmic-art',+ ref: 'main',+ },+ );+ });++ it('uses empty path when harness omits path', () => {+ assert.equal(+ toUiCatalogEntry({+ type: 'git',+ name: 'root-skill',+ url: 'https://github.com/example/skills',+ ref: 'main',+ description: 'Root skill',+ }).path,+ '',+ );+ });++ it('omits empty path on harness upsert and maps repoURL to url', () => {+ assert.deepEqual(+ toHarnessManifest({+ name: 'root-skill',+ description: 'Root skill',+ repoURL: 'https://github.com/example/skills',+ path: ' ',+ ref: 'main',+ }),+ {+ type: 'git',+ name: 'root-skill',+ description: 'Root skill',+ url: 'https://github.com/example/skills',+ ref: 'main',+ },+ );+ assert.deepEqual(+ toHarnessManifest({+ name: 'nested',+ description: 'Nested',+ repoURL: 'https://github.com/example/skills',+ path: 'skills/nested',+ ref: 'v1',+ }),+ {+ type: 'git',+ name: 'nested',+ description: 'Nested',+ url: 'https://github.com/example/skills',+ path: 'skills/nested',+ ref: 'v1',+ },+ );+ });++ it('attaches catalogId when configured name matches a catalog preset', () => {+ const catalogNames = new Set(['algorithmic-art']);+ assert.deepEqual(+ toUiSkill(+ {+ type: 'git',+ name: 'algorithmic-art',+ url: 'https://github.com/anthropics/skills',+ path: 'skills/algorithmic-art',+ ref: 'main',+ description: 'Create algorithmic art',+ },+ catalogNames,+ ),+ {+ id: 'algorithmic-art',+ name: 'algorithmic-art',+ description: 'Create algorithmic art',+ catalogId: 'algorithmic-art',+ },+ );+ assert.deepEqual(+ toUiSkill(+ {+ type: 'git',+ name: 'house-style',+ url: 'https://github.com/example/skills',+ path: 'skills/house-style',+ ref: 'main',+ description: 'House style',+ },+ catalogNames,+ ),+ {+ id: 'house-style',+ name: 'house-style',+ description: 'House style',+ },+ );+ });+});diff --git a/packages/trueforge-ui-sdk/example/src/index.css b/packages/trueforge-ui-sdk/example/src/index.cssindex 2afc86f40..af77353c8 100644--- a/packages/trueforge-ui-sdk/example/src/index.css+++ b/packages/trueforge-ui-sdk/example/src/index.css@@ -1,5 +1,5 @@-@import "tailwindcss";-@import "@truefoundry/trueforge-ui/styles.css";+@import 'tailwindcss';+@import '@truefoundry/trueforge-ui/styles.css';*,*::before,@@ -101,7 +101,7 @@ body {}.layout-switcher__btn.is-active,-.theme-toggle[aria-pressed="true"] {+.theme-toggle[aria-pressed='true'] {background: var(--muted, #f3f4f6);border-color: var(--border, #e5e7eb);color: var(--foreground, #111827);@@ -113,7 +113,11 @@ body {height: 100%;padding: 2.5rem 2rem;background:- radial-gradient(ellipse 80% 50% at 20% 0%, color-mix(in oklab, var(--primary, #4f46e5) 12%, transparent), transparent),+ radial-gradient(+ ellipse 80% 50% at 20% 0%,+ color-mix(in oklab, var(--primary, #4f46e5) 12%, transparent),+ transparent+ ),var(--muted, #f3f4f6);}diff --git a/packages/trueforge-ui-sdk/src/build-styles.css b/packages/trueforge-ui-sdk/src/build-styles.cssindex f1c692bf7..8e66f913e 100644--- a/packages/trueforge-ui-sdk/src/build-styles.css+++ b/packages/trueforge-ui-sdk/src/build-styles.css@@ -5,8 +5,8 @@* not reset global consumer styles. `styles.css` supplies the SDK's sources,* dependencies, and semantic-token bridge.*/-@import "tailwindcss/theme" layer(tfy-agent-ui-theme);-@import "tailwindcss/utilities" layer(tfy-agent-ui-utilities);-@import "./styles.css";+@import 'tailwindcss/theme' layer(tfy-agent-ui-theme);+@import 'tailwindcss/utilities' layer(tfy-agent-ui-utilities);+@import './styles.css';@custom-variant dark (&:is(.dark *));diff --git a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/ConfigureSandboxForm.tsx b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/ConfigureSandboxForm.tsxindex 7291dc282..9013acdad 100644--- a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/ConfigureSandboxForm.tsx+++ b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/ConfigureSandboxForm.tsx@@ -5,9 +5,9 @@ import { useEffect, useState, type FormEvent } from 'react';import { Button } from '../../atoms/primitives/Button.js';import { CenteredModal } from '../../atoms/primitives/CenteredModal.js';import { Icon } from '../../icons/Icon.js';-import type { SandboxConfig } from '../../server/types.js';+import type { SandboxProviderConfig } from '../../server/types.js';-export type SandboxConfigDraft = SandboxConfig & {+export type SandboxConfigDraft = SandboxProviderConfig & {apiKey: string;};@@ -18,13 +18,13 @@ type ConfigureSandboxFormProps = {title: string;description?: string;/** Prefills config fields; apiKey is never autofilled. */- initialConfig?: SandboxConfig | null;+ initialConfig?: SandboxProviderConfig | null;/** When false (updates), empty apiKey means keep the existing key. */requireApiKey?: boolean;busy?: boolean;};-const EMPTY_CONFIG: SandboxConfig = {+const EMPTY_CONFIG: SandboxProviderConfig = {snapshotName: '',execTimeoutMs: 0,autoStopIntervalInMinutes: 0,diff --git a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.test.tsx b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.test.tsxindex b9e3578db..6d6ddb2e3 100644--- a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.test.tsx+++ b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.test.tsx@@ -6,10 +6,10 @@ import { beforeAll, describe, expect, it } from 'vitest';import { ServerProvider } from '../../server/ServerContext.js';import type {AgentUIServer,- CreateSandboxRequest,- SandboxBase,- SandboxCatalogEntry,- UpdateSandboxRequest,+ CreateSandboxProviderRequest,+ SandboxProviderBase,+ SandboxProviderCatalogEntry,+ UpdateSandboxProviderRequest,} from '../../server/types.js';import SandboxSettings from './SandboxSettings.js';@@ -22,7 +22,7 @@ beforeAll(() => {};});-const catalogEntry: SandboxCatalogEntry = {+const catalogEntry: SandboxProviderCatalogEntry = {id: 'cat-daytona',name: 'Daytona',type: 'daytona',@@ -33,17 +33,17 @@ const catalogEntry: SandboxCatalogEntry = {autoDeleteIntervalInMinutes: 43200,};-function createFakeHost(initial: SandboxBase[] = []) {- let sandboxes = [...initial];- const created: CreateSandboxRequest[] = [];- const updated: UpdateSandboxRequest[] = [];+function createFakeHost(initial: SandboxProviderBase[] = []) {+ let providers = [...initial];+ const created: CreateSandboxProviderRequest[] = [];+ const updated: UpdateSandboxProviderRequest[] = [];const sandboxCatalog = {- getSandboxCatalog: async () => [catalogEntry],- listSandboxes: async () => sandboxes,- createSandbox: async (req: CreateSandboxRequest) => {+ getSandboxProviderCatalog: async () => [catalogEntry],+ listSandboxProviders: async () => providers,+ createSandboxProvider: async (req: CreateSandboxProviderRequest) => {created.push(req);- const sandbox: SandboxBase = {+ const provider: SandboxProviderBase = {id: `sb-${req.catalogId}`,name: req.name,catalogId: req.catalogId,@@ -54,27 +54,28 @@ function createFakeHost(initial: SandboxBase[] = []) {autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes,};- sandboxes = [...sandboxes, sandbox];- return sandbox;+ providers = [...providers, provider];+ return provider;},- updateSandbox: async (req: UpdateSandboxRequest) => {+ updateSandboxProvider: async (req: UpdateSandboxProviderRequest) => {updated.push(req);- sandboxes = sandboxes.map(sandbox =>- sandbox.id === req.id+ providers = providers.map(provider =>+ provider.id === req.id? {- ...sandbox,+ ...provider,snapshotName: req.snapshotName,execTimeoutMs: req.execTimeoutMs,autoStopIntervalInMinutes: req.autoStopIntervalInMinutes,autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes,}- : sandbox,+ : provider,);- return sandboxes.find(sandbox => sandbox.id === req.id)!;- },- deleteSandbox: async ({ id }: { id: string }) => {- sandboxes = sandboxes.filter(sandbox => sandbox.id !== id);+ const next = providers.find(provider => provider.id === req.id);+ if (next === undefined) {+ throw new Error(`Sandbox provider "${req.id}" not found`);+ }+ return next;},};@@ -83,7 +84,7 @@ function createFakeHost(initial: SandboxBase[] = []) {return {created,updated,- getSandboxes: () => sandboxes,+ getProviders: () => providers,wrapper: ({ children }: { children: ReactNode }) => <ServerProvider server={server}>{children}</ServerProvider>,};}@@ -135,7 +136,7 @@ describe('SandboxSettings', () => {});it('prefills update form and allows saving without re-entering apiKey', async () => {- const existing: SandboxBase = {+ const existing: SandboxProviderBase = {id: 'sb-1',name: 'Daytona',catalogId: 'cat-daytona',@@ -157,6 +158,7 @@ describe('SandboxSettings', () => {await waitFor(() => {expect(screen.getByRole('button', { name: 'Update' })).toBeTruthy();});+ expect(screen.queryByRole('button', { name: 'Remove' })).toBeNull();fireEvent.click(screen.getByRole('button', { name: 'Update' }));diff --git a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.tsx b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.tsxindex dd0103c15..ac9786de5 100644--- a/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.tsx+++ b/packages/trueforge-ui-sdk/src/containers/SettingsBuilder/SandboxSettings.tsx@@ -5,7 +5,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';import { Button } from '../../atoms/primitives/Button.js';import { Icon } from '../../icons/Icon.js';import { useCatalogServer } from '../../server/ServerContext.js';-import type { SandboxBase, SandboxCatalogEntry, SandboxConfig } from '../../server/types.js';+import type { SandboxProviderBase, SandboxProviderCatalogEntry, SandboxProviderConfig } from '../../server/types.js';import ConfigureSandboxForm, { type SandboxConfigDraft } from './ConfigureSandboxForm.js';const configFrom = ({@@ -14,7 +14,7 @@ const configFrom = ({autoStopIntervalInMinutes,autoArchiveIntervalInMinutes,autoDeleteIntervalInMinutes,-}: SandboxConfig): SandboxConfig => ({+}: SandboxProviderConfig): SandboxProviderConfig => ({snapshotName,execTimeoutMs,autoStopIntervalInMinutes,@@ -25,14 +25,14 @@ const configFrom = ({const SandboxSettings = () => {const { sandboxCatalog } = useCatalogServer();- const [sandboxes, setSandboxes] = useState<SandboxBase[]>([]);- const [catalog, setCatalog] = useState<SandboxCatalogEntry[]>([]);+ const [providers, setProviders] = useState<SandboxProviderBase[]>([]);+ const [catalog, setCatalog] = useState<SandboxProviderCatalogEntry[]>([]);const [loading, setLoading] = useState(true);const [error, setError] = useState<string | null>(null);const [busy, setBusy] = useState(false);- const [createEntry, setCreateEntry] = useState<SandboxCatalogEntry | null>(null);- const [updateSandbox, setUpdateSandbox] = useState<SandboxBase | null>(null);+ const [createEntry, setCreateEntry] = useState<SandboxProviderCatalogEntry | null>(null);+ const [updateProvider, setUpdateProvider] = useState<SandboxProviderBase | null>(null);const refresh = useCallback(async ({ quiet = false }: { quiet?: boolean } = {}) => {@@ -41,10 +41,10 @@ const SandboxSettings = () => {setError(null);try {const [listed, available] = await Promise.all([- sandboxCatalog.listSandboxes(),- sandboxCatalog.getSandboxCatalog(),+ sandboxCatalog.listSandboxProviders(),+ sandboxCatalog.getSandboxProviderCatalog(),]);- setSandboxes(listed);+ setProviders(listed);setCatalog(available);} catch (err) {setError(err instanceof Error ? err.message : 'Failed to load sandboxes');@@ -60,13 +60,13 @@ const SandboxSettings = () => {}, [refresh]);const availableEntries = useMemo(() => {- const connectedCatalogIds = new Set(sandboxes.map(sandbox => sandbox.catalogId));+ const connectedCatalogIds = new Set(providers.map(provider => provider.catalogId));return catalog.filter(entry => !connectedCatalogIds.has(entry.id));- }, [catalog, sandboxes]);+ }, [catalog, providers]);const formInitialConfig = useMemo(- () => (updateSandbox ? configFrom(updateSandbox) : createEntry ? configFrom(createEntry) : null),- [updateSandbox, createEntry],+ () => (updateProvider ? configFrom(updateProvider) : createEntry ? configFrom(createEntry) : null),+ [updateProvider, createEntry],);if (!sandboxCatalog) {@@ -90,7 +90,7 @@ const SandboxSettings = () => {const handleCreate = async (draft: SandboxConfigDraft) => {if (!createEntry) return;await runMutation(async () => {- await sandboxCatalog.createSandbox({+ await sandboxCatalog.createSandboxProvider({catalogId: createEntry.id,name: createEntry.name,type: createEntry.type,@@ -102,27 +102,29 @@ const SandboxSettings = () => {};const handleUpdate = async (draft: SandboxConfigDraft) => {- if (!updateSandbox) return;+ if (!updateProvider) return;await runMutation(async () => {- await sandboxCatalog.updateSandbox({- id: updateSandbox.id,+ await sandboxCatalog.updateSandboxProvider({+ id: updateProvider.id,...configFrom(draft),...(draft.apiKey ? { apiKey: draft.apiKey } : {}),});});- setUpdateSandbox(null);+ setUpdateProvider(null);};- const handleRemove = (sandbox: SandboxBase) => {+ const handleRemove = (provider: SandboxProviderBase) => {+ const deleteSandboxProvider = sandboxCatalog.deleteSandboxProvider;+ if (!deleteSandboxProvider) return;void runMutation(async () => {- await sandboxCatalog.deleteSandbox({ id: sandbox.id });+ await deleteSandboxProvider({ id: provider.id });}).catch(() => {});};- const formOpen = createEntry != null || updateSandbox != null;- const isUpdate = updateSandbox != null;- const formTitle = updateSandbox- ? `Update ${updateSandbox.name}`+ const formOpen = createEntry != null || updateProvider != null;+ const isUpdate = updateProvider != null;+ const formTitle = updateProvider+ ? `Update ${updateProvider.name}`: createEntry? `Configure ${createEntry.name}`: 'Configure sandbox';@@ -145,15 +147,15 @@ const SandboxSettings = () => {<p className="text-sm text-muted-foreground">Loading sandboxes…</p>) : (<div className="space-y-6">- {sandboxes.length > 0 ? (+ {providers.length > 0 ? (<section><h4 className="mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground">- Connected · {sandboxes.length}+ Connected · {providers.length}</h4><div className="overflow-hidden rounded-xl border border-border bg-card">- {sandboxes.map(sandbox => (+ {providers.map(provider => (<article- key={sandbox.id}+ key={provider.id}className="flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center"><div className="flex min-w-0 flex-1 items-center gap-3">@@ -164,13 +166,13 @@ const SandboxSettings = () => {<Icon name="cube" className="size-4.5" /></span><div className="min-w-0">- <h5 className="truncate text-sm font-medium text-foreground">{sandbox.name}</h5>- <p className="truncate text-[0.8125rem] text-muted-foreground">{sandbox.snapshotName}</p>+ <h5 className="truncate text-sm font-medium text-foreground">{provider.name}</h5>+ <p className="truncate text-[0.8125rem] text-muted-foreground">{provider.snapshotName}</p></div></div><div className="flex flex-wrap items-center gap-2.5 sm:justify-end">- {sandbox.isConnected ? (+ {provider.isConnected ? (<span className="flex items-center gap-1.5 text-[13px] font-medium text-foreground"><span className="h-1.5 w-1.5 rounded-full bg-primary"></span>Connected@@ -183,23 +185,25 @@ const SandboxSettings = () => {disabled={busy}onClick={() => {setCreateEntry(null);- setUpdateSandbox(sandbox);+ setUpdateProvider(provider);}}>Update</Button>- <Button- variant="ghost"- size="sm"- className="text-muted-foreground"- type="button"- disabled={busy}- onClick={() => {- handleRemove(sandbox);- }}- >- Remove- </Button>+ {sandboxCatalog.deleteSandboxProvider ? (+ <Button+ variant="ghost"+ size="sm"+ className="text-muted-foreground"+ type="button"+ disabled={busy}+ onClick={() => {+ handleRemove(provider);+ }}+ >+ Remove+ </Button>+ ) : null}</div></article>))}@@ -213,7 +217,7 @@ const SandboxSettings = () => {</h4>{availableEntries.length === 0 ? (<p className="text-sm text-muted-foreground">- {sandboxes.length > 0 ? 'All catalog sandboxes are configured.' : 'No sandboxes in the catalog.'}+ {providers.length > 0 ? 'All catalog sandboxes are configured.' : 'No sandboxes in the catalog.'}</p>) : (<div className="overflow-hidden rounded-xl border border-border bg-card">@@ -242,7 +246,7 @@ const SandboxSettings = () => {type="button"disabled={busy}onClick={() => {- setUpdateSandbox(null);+ setUpdateProvider(null);setCreateEntry(entry);}}>@@ -262,7 +266,7 @@ const SandboxSettings = () => {onOpenChange={open => {if (!open) {setCreateEntry(null);- setUpdateSandbox(null);+ setUpdateProvider(null);}}}onSave={isUpdate ? handleUpdate : handleCreate}diff --git a/packages/trueforge-ui-sdk/src/github-markdown-bridge.css b/packages/trueforge-ui-sdk/src/github-markdown-bridge.cssindex cfa397dea..c25dff4cc 100644--- a/packages/trueforge-ui-sdk/src/github-markdown-bridge.css+++ b/packages/trueforge-ui-sdk/src/github-markdown-bridge.css@@ -7,115 +7,115 @@* Source: github-markdown-css (auto theme variable blocks).*/.dark .markdown-body,-[data-theme="dark"] .markdown-body {+[data-theme='dark'] .markdown-body {/*dark */- color-scheme: dark;- --fgColor-accent: #4493f8;- --bgColor-attention-muted: #bb800926;- --bgColor-default: #0d1117;- --bgColor-muted: #151b23;- --bgColor-neutral-muted: #656c7633;- --borderColor-accent-emphasis: #1f6feb;- --borderColor-attention-emphasis: #9e6a03;- --borderColor-danger-emphasis: #da3633;- --borderColor-default: #3d444d;- --borderColor-done-emphasis: #8957e5;- --borderColor-success-emphasis: #238636;- --color-prettylights-syntax-brackethighlighter-angle: #9198a1;- --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;- --color-prettylights-syntax-carriage-return-bg: #b62324;- --color-prettylights-syntax-carriage-return-text: #f0f6fc;- --color-prettylights-syntax-comment: #9198a1;- --color-prettylights-syntax-constant: #79c0ff;- --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;- --color-prettylights-syntax-entity: #d2a8ff;- --color-prettylights-syntax-entity-tag: #7ee787;- --color-prettylights-syntax-keyword: #ff7b72;- --color-prettylights-syntax-markup-bold: #f0f6fc;- --color-prettylights-syntax-markup-changed-bg: #5a1e02;- --color-prettylights-syntax-markup-changed-text: #ffdfb6;- --color-prettylights-syntax-markup-deleted-bg: #67060c;- --color-prettylights-syntax-markup-deleted-text: #ffdcd7;- --color-prettylights-syntax-markup-heading: #1f6feb;- --color-prettylights-syntax-markup-ignored-bg: #1158c7;- --color-prettylights-syntax-markup-ignored-text: #f0f6fc;- --color-prettylights-syntax-markup-inserted-bg: #033a16;- --color-prettylights-syntax-markup-inserted-text: #aff5b4;- --color-prettylights-syntax-markup-italic: #f0f6fc;- --color-prettylights-syntax-markup-list: #f2cc60;- --color-prettylights-syntax-meta-diff-range: #d2a8ff;- --color-prettylights-syntax-storage-modifier-import: #f0f6fc;- --color-prettylights-syntax-string: #a5d6ff;- --color-prettylights-syntax-string-regexp: #7ee787;- --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;- --color-prettylights-syntax-variable: #ffa657;- --fgColor-attention: #d29922;- --fgColor-danger: #f85149;- --fgColor-default: #f0f6fc;- --fgColor-done: #ab7df8;- --fgColor-muted: #9198a1;- --fgColor-success: #3fb950;- --borderColor-muted: #3d444db3;- --color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);- --color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);- --focus-outlineColor: var(--borderColor-accent-emphasis);- --borderColor-neutral-muted: var(--borderColor-muted);+ color-scheme: dark;+ --fgColor-accent: #4493f8;+ --bgColor-attention-muted: #bb800926;+ --bgColor-default: #0d1117;+ --bgColor-muted: #151b23;+ --bgColor-neutral-muted: #656c7633;+ --borderColor-accent-emphasis: #1f6feb;+ --borderColor-attention-emphasis: #9e6a03;+ --borderColor-danger-emphasis: #da3633;+ --borderColor-default: #3d444d;+ --borderColor-done-emphasis: #8957e5;+ --borderColor-success-emphasis: #238636;+ --color-prettylights-syntax-brackethighlighter-angle: #9198a1;+ --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;+ --color-prettylights-syntax-carriage-return-bg: #b62324;+ --color-prettylights-syntax-carriage-return-text: #f0f6fc;+ --color-prettylights-syntax-comment: #9198a1;+ --color-prettylights-syntax-constant: #79c0ff;+ --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;+ --color-prettylights-syntax-entity: #d2a8ff;+ --color-prettylights-syntax-entity-tag: #7ee787;+ --color-prettylights-syntax-keyword: #ff7b72;+ --color-prettylights-syntax-markup-bold: #f0f6fc;+ --color-prettylights-syntax-markup-changed-bg: #5a1e02;+ --color-prettylights-syntax-markup-changed-text: #ffdfb6;+ --color-prettylights-syntax-markup-deleted-bg: #67060c;+ --color-prettylights-syntax-markup-deleted-text: #ffdcd7;+ --color-prettylights-syntax-markup-heading: #1f6feb;+ --color-prettylights-syntax-markup-ignored-bg: #1158c7;+ --color-prettylights-syntax-markup-ignored-text: #f0f6fc;+ --color-prettylights-syntax-markup-inserted-bg: #033a16;+ --color-prettylights-syntax-markup-inserted-text: #aff5b4;+ --color-prettylights-syntax-markup-italic: #f0f6fc;+ --color-prettylights-syntax-markup-list: #f2cc60;+ --color-prettylights-syntax-meta-diff-range: #d2a8ff;+ --color-prettylights-syntax-storage-modifier-import: #f0f6fc;+ --color-prettylights-syntax-string: #a5d6ff;+ --color-prettylights-syntax-string-regexp: #7ee787;+ --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;+ --color-prettylights-syntax-variable: #ffa657;+ --fgColor-attention: #d29922;+ --fgColor-danger: #f85149;+ --fgColor-default: #f0f6fc;+ --fgColor-done: #ab7df8;+ --fgColor-muted: #9198a1;+ --fgColor-success: #3fb950;+ --borderColor-muted: #3d444db3;+ --color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);+ --color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);+ --focus-outlineColor: var(--borderColor-accent-emphasis);+ --borderColor-neutral-muted: var(--borderColor-muted);}:root:not(.dark) .markdown-body,-[data-theme="light"] .markdown-body {+[data-theme='light'] .markdown-body {/*light */- color-scheme: light;- --fgColor-danger: #d1242f;- --bgColor-attention-muted: #fff8c5;- --bgColor-muted: #f6f8fa;- --bgColor-neutral-muted: #818b981f;- --borderColor-accent-emphasis: #0969da;- --borderColor-attention-emphasis: #9a6700;- --borderColor-danger-emphasis: #cf222e;- --borderColor-default: #d1d9e0;- --borderColor-done-emphasis: #8250df;- --borderColor-success-emphasis: #1a7f37;- --color-prettylights-syntax-brackethighlighter-angle: #59636e;- --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;- --color-prettylights-syntax-carriage-return-bg: #cf222e;- --color-prettylights-syntax-carriage-return-text: #f6f8fa;- --color-prettylights-syntax-comment: #59636e;- --color-prettylights-syntax-constant: #0550ae;- --color-prettylights-syntax-constant-other-reference-link: #0a3069;- --color-prettylights-syntax-entity: #6639ba;- --color-prettylights-syntax-entity-tag: #0550ae;- --color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);- --color-prettylights-syntax-keyword: #cf222e;- --color-prettylights-syntax-markup-changed-bg: #ffd8b5;- --color-prettylights-syntax-markup-changed-text: #953800;- --color-prettylights-syntax-markup-deleted-bg: #ffebe9;- --color-prettylights-syntax-markup-deleted-text: #82071e;- --color-prettylights-syntax-markup-heading: #0550ae;- --color-prettylights-syntax-markup-ignored-bg: #0550ae;- --color-prettylights-syntax-markup-ignored-text: #d1d9e0;- --color-prettylights-syntax-markup-inserted-bg: #dafbe1;- --color-prettylights-syntax-markup-inserted-text: #116329;- --color-prettylights-syntax-markup-list: #3b2300;- --color-prettylights-syntax-meta-diff-range: #8250df;- --color-prettylights-syntax-string: #0a3069;- --color-prettylights-syntax-string-regexp: #116329;- --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;- --color-prettylights-syntax-variable: #953800;- --fgColor-accent: #0969da;- --fgColor-attention: #9a6700;- --fgColor-done: #8250df;- --fgColor-muted: #59636e;- --fgColor-success: #1a7f37;- --bgColor-default: #ffffff;- --borderColor-muted: #d1d9e0b3;- --color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);- --color-prettylights-syntax-markup-bold: #1f2328;- --color-prettylights-syntax-markup-italic: #1f2328;- --color-prettylights-syntax-storage-modifier-import: #1f2328;- --fgColor-default: #1f2328;- --focus-outlineColor: var(--borderColor-accent-emphasis);- --borderColor-neutral-muted: var(--borderColor-muted);+ color-scheme: light;+ --fgColor-danger: #d1242f;+ --bgColor-attention-muted: #fff8c5;+ --bgColor-muted: #f6f8fa;+ --bgColor-neutral-muted: #818b981f;+ --borderColor-accent-emphasis: #0969da;+ --borderColor-attention-emphasis: #9a6700;+ --borderColor-danger-emphasis: #cf222e;+ --borderColor-default: #d1d9e0;+ --borderColor-done-emphasis: #8250df;+ --borderColor-success-emphasis: #1a7f37;+ --color-prettylights-syntax-brackethighlighter-angle: #59636e;+ --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;+ --color-prettylights-syntax-carriage-return-bg: #cf222e;+ --color-prettylights-syntax-carriage-return-text: #f6f8fa;+ --color-prettylights-syntax-comment: #59636e;+ --color-prettylights-syntax-constant: #0550ae;+ --color-prettylights-syntax-constant-other-reference-link: #0a3069;+ --color-prettylights-syntax-entity: #6639ba;+ --color-prettylights-syntax-entity-tag: #0550ae;+ --color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);+ --color-prettylights-syntax-keyword: #cf222e;+ --color-prettylights-syntax-markup-changed-bg: #ffd8b5;+ --color-prettylights-syntax-markup-changed-text: #953800;+ --color-prettylights-syntax-markup-deleted-bg: #ffebe9;+ --color-prettylights-syntax-markup-deleted-text: #82071e;+ --color-prettylights-syntax-markup-heading: #0550ae;+ --color-prettylights-syntax-markup-ignored-bg: #0550ae;+ --color-prettylights-syntax-markup-ignored-text: #d1d9e0;+ --color-prettylights-syntax-markup-inserted-bg: #dafbe1;+ --color-prettylights-syntax-markup-inserted-text: #116329;+ --color-prettylights-syntax-markup-list: #3b2300;+ --color-prettylights-syntax-meta-diff-range: #8250df;+ --color-prettylights-syntax-string: #0a3069;+ --color-prettylights-syntax-string-regexp: #116329;+ --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;+ --color-prettylights-syntax-variable: #953800;+ --fgColor-accent: #0969da;+ --fgColor-attention: #9a6700;+ --fgColor-done: #8250df;+ --fgColor-muted: #59636e;+ --fgColor-success: #1a7f37;+ --bgColor-default: #ffffff;+ --borderColor-muted: #d1d9e0b3;+ --color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);+ --color-prettylights-syntax-markup-bold: #1f2328;+ --color-prettylights-syntax-markup-italic: #1f2328;+ --color-prettylights-syntax-storage-modifier-import: #1f2328;+ --fgColor-default: #1f2328;+ --focus-outlineColor: var(--borderColor-accent-emphasis);+ --borderColor-neutral-muted: var(--borderColor-muted);}/* Chat host: don't paint GitHub's page background behind message bubbles. */@@ -131,10 +131,10 @@--fontStack-monospace,ui-monospace,SFMono-Regular,- "SF Mono",+ 'SF Mono',Menlo,Consolas,- "Liberation Mono",+ 'Liberation Mono',monospace);}diff --git a/packages/trueforge-ui-sdk/src/index.ts b/packages/trueforge-ui-sdk/src/index.tsindex d80af35b0..cc5952683 100644--- a/packages/trueforge-ui-sdk/src/index.ts+++ b/packages/trueforge-ui-sdk/src/index.ts@@ -259,7 +259,7 @@ export type {ConnectorState,CreateConnectorRequest,CreateModelProviderRequest,- CreateSandboxRequest,+ CreateSandboxProviderRequest,CreateSessionRequest,CreateSkillRequest,CreateSkillRequestBase,@@ -285,10 +285,10 @@ export type {PreviousTurnIdInput,ProviderType,RegistrySkill,- SandboxBase,- SandboxCatalogEntry,SandboxCatalogServer,- SandboxConfig,+ SandboxProviderBase,+ SandboxProviderCatalogEntry,+ SandboxProviderConfig,SearchAgentsParams,SelectRegistrySkillRequest,Session,@@ -308,7 +308,7 @@ export type {TurnStreamingEvent,UpdateConnectorRequest,UpdateModelProviderRequest,- UpdateSandboxRequest,+ UpdateSandboxProviderRequest,UpdateSessionRequest,UserMessage,UserMessageContent,diff --git a/packages/trueforge-ui-sdk/src/openui.css b/packages/trueforge-ui-sdk/src/openui.cssindex 4d79f4d2a..b22b270c7 100644--- a/packages/trueforge-ui-sdk/src/openui.css+++ b/packages/trueforge-ui-sdk/src/openui.css@@ -1,5 +1,5 @@-@import "@openuidev/react-ui/defaults.css";-@import "@openuidev/react-ui/styles/index.css";+@import '@openuidev/react-ui/defaults.css';+@import '@openuidev/react-ui/styles/index.css';@source ".";/*@@ -22,10 +22,10 @@.aui-openui .recharts-responsive-container,.aui-openui .recharts-wrapper,-.aui-openui [class*="openui-card"],-.aui-openui [class*="openui-chart"],-.aui-openui [class*="openui-table"],-.aui-openui [class*="openui-scrollable"] {+.aui-openui [class*='openui-card'],+.aui-openui [class*='openui-chart'],+.aui-openui [class*='openui-table'],+.aui-openui [class*='openui-scrollable'] {max-width: 100%;}diff --git a/packages/trueforge-ui-sdk/src/server/types.ts b/packages/trueforge-ui-sdk/src/server/types.tsindex 782f010b7..1a847a19e 100644--- a/packages/trueforge-ui-sdk/src/server/types.ts+++ b/packages/trueforge-ui-sdk/src/server/types.ts@@ -583,11 +583,11 @@ export interface SkillCatalogServer<}// ----------------------------------------------------------------------------// Sandboxes catalog — public rows omit credentials; writes accept them+// Sandbox providers catalog — public rows omit credentials; writes accept them// ----------------------------------------------------------------------------/** Mutable sandbox settings shared by catalog rows, create, and update. */-export interface SandboxConfig {+/** Mutable sandbox provider settings shared by catalog rows, create, and update. */+export interface SandboxProviderConfig {snapshotName: string;execTimeoutMs: number;autoStopIntervalInMinutes: number;@@ -595,17 +595,17 @@ export interface SandboxConfig {autoDeleteIntervalInMinutes: number;}-export interface SandboxCatalogEntry extends SandboxConfig {+export interface SandboxProviderCatalogEntry extends SandboxProviderConfig {id: string;name: string;type: string;}/**- * Connected sandbox row (settings/sandboxes). No raw `apiKey`.+ * Connected sandbox provider row (settings/sandboxes). No raw `apiKey`.* Includes last-saved config so update forms can show previous values.*/-export interface SandboxBase extends SandboxConfig {+export interface SandboxProviderBase extends SandboxProviderConfig {id: string;name: string;catalogId: string;@@ -614,33 +614,33 @@ export interface SandboxBase extends SandboxConfig {/*** Create — catalog identity + config + apiKey.- * `catalogId` is `SandboxCatalogEntry.id`; the server assigns the sandbox instance `id`.+ * `catalogId` is `SandboxProviderCatalogEntry.id`; the server assigns the provider `id`.*/-export interface CreateSandboxRequest extends SandboxConfig {+export interface CreateSandboxProviderRequest extends SandboxProviderConfig {catalogId: string;name: string;type: string;apiKey: string;}-/** Update — full replace of config keyed by sandbox instance `id`. */-export interface UpdateSandboxRequest extends SandboxConfig {+/** Update — full replace of config keyed by sandbox provider `id`. */+export interface UpdateSandboxProviderRequest extends SandboxProviderConfig {id: string;/** Omit to keep the existing key; send a value to rotate. */apiKey?: string;}export interface SandboxCatalogServer<- TSandbox extends SandboxBase = SandboxBase,- TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry,- TCreate extends CreateSandboxRequest = CreateSandboxRequest,- TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest,+ TProvider extends SandboxProviderBase = SandboxProviderBase,+ TCatalogEntry extends SandboxProviderCatalogEntry = SandboxProviderCatalogEntry,+ TCreate extends CreateSandboxProviderRequest = CreateSandboxProviderRequest,+ TUpdate extends UpdateSandboxProviderRequest = UpdateSandboxProviderRequest,> {- getSandboxCatalog(): Promise<TCatalogEntry[]>;- listSandboxes(req?: { query?: string }): Promise<TSandbox[]>;- createSandbox(req: TCreate): Promise<TSandbox>;- updateSandbox(req: TUpdate): Promise<TSandbox>;- deleteSandbox(req: { id: string }): Promise<void>;+ getSandboxProviderCatalog(): Promise<TCatalogEntry[]>;+ listSandboxProviders(req?: { query?: string }): Promise<TProvider[]>;+ createSandboxProvider(req: TCreate): Promise<TProvider>;+ updateSandboxProvider(req: TUpdate): Promise<TProvider>;+ deleteSandboxProvider?(req: { id: string }): Promise<void>;}/**diff --git a/packages/trueforge-ui-sdk/src/styles.css b/packages/trueforge-ui-sdk/src/styles.cssindex 267b8d40e..09bb1b422 100644--- a/packages/trueforge-ui-sdk/src/styles.css+++ b/packages/trueforge-ui-sdk/src/styles.css@@ -34,15 +34,15 @@* Both work because the `@layer` block below has the lowest precedence —* any plain `:root` / `.aui-root` declaration in the consumer's CSS wins.*/-@import "./openui.css";+@import './openui.css';/** GitHub Markdown styles (https://github.com/sindresorhus/github-markdown-css).* Applied via `.markdown-body` on the Markdown atom. The bridge remaps light/dark* CSS variables to the SDK ThemeProvider mode (class + data-theme).*/-@import "github-markdown-css/github-markdown.css";-@import "./github-markdown-bridge.css";+@import 'github-markdown-css/github-markdown.css';+@import './github-markdown-bridge.css';/* ──────────────────────────────────────────────────────────────────────* Owned palette (minimal set used by semantic tokens + gray utilities).@@ -161,9 +161,9 @@ui-sans-serif,system-ui,-apple-system,- "Segoe UI",+ 'Segoe UI',Roboto,- "Helvetica Neue",+ 'Helvetica Neue',Arial,sans-serif);@@ -172,9 +172,9 @@ui-sans-serif,system-ui,-apple-system,- "Segoe UI",+ 'Segoe UI',Roboto,- "Helvetica Neue",+ 'Helvetica Neue',Arial,sans-serif);@@ -184,16 +184,12 @@* Clone typography: conversation copy and composer text are regular weight;* controls and headings keep their component-level medium/semibold utilities.*/-.aui-theme-root:is(- [data-preset="claude"],- [data-preset="chatgpt"],- [data-preset="gemini"]- )+.aui-theme-root:is([data-preset='claude'], [data-preset='chatgpt'], [data-preset='gemini']):is(.aui-markdown,- [data-slot="aui_user-message-content"],- [data-slot="aui_composer-input"],- [data-slot="aui_user-edit-input"]+ [data-slot='aui_user-message-content'],+ [data-slot='aui_composer-input'],+ [data-slot='aui_user-edit-input']) {font-weight: 400;}@@ -299,7 +295,7 @@}/* ChatGPT dark: transparent composer border + inset white edge */-.aui-theme-root[data-preset="chatgpt"][data-theme="dark"] [data-slot="aui_composer-shell"] {+.aui-theme-root[data-preset='chatgpt'][data-theme='dark'] [data-slot='aui_composer-shell'] {box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);}