@truefoundry/trueforge-ui 0.1.0-rc.0 → 0.1.0-rc.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/CHANGELOG.md +8 -0
- package/dist/{ConnectorSettings-CLBEWGQJ.js → ConnectorSettings-ADACLWQI.js} +6 -6
- package/dist/{DockLayout-WRF7EQLD.js → DockLayout-BH5XX2AQ.js} +8 -8
- package/dist/{DrawerLayout-X2UXYTOS.js → DrawerLayout-O2XZQCG4.js} +8 -8
- package/dist/{ModelSettings-IJ55QJQO.js → ModelSettings-LKFJVUYQ.js} +8 -8
- package/dist/{ModelSettings-IJ55QJQO.js.map → ModelSettings-LKFJVUYQ.js.map} +1 -1
- package/dist/OpenUiFenceBlock-A2CWCPOP.js +9 -0
- package/dist/{SandboxSettings-S5XGZWOL.js → SandboxSettings-H5MDAE47.js} +6 -6
- package/dist/{SettingsBuilder-64Y33NP3.js → SettingsBuilder-3JOLC56Z.js} +25 -17
- package/dist/SettingsBuilder-3JOLC56Z.js.map +1 -0
- package/dist/{SidebarLayout-M7HEOZVK.js → SidebarLayout-G6BGD7EY.js} +8 -8
- package/dist/{SkillSettings-MXK4ZEI7.js → SkillSettings-4VB42CVG.js} +6 -6
- package/dist/{WidgetLayout-7MDOKLHU.js → WidgetLayout-ABSXZUSQ.js} +8 -8
- package/dist/{chunk-UXZOL5GO.js → chunk-3PTFNAQK.js} +5 -5
- package/dist/{chunk-NBMP2XNL.js → chunk-EFGSH3MO.js} +7 -7
- package/dist/{chunk-42GF723P.js → chunk-FDBJNXH2.js} +2 -2
- package/dist/{chunk-UHGSHDBM.js → chunk-U5GBGEGN.js} +159 -4
- package/dist/chunk-U5GBGEGN.js.map +1 -0
- package/dist/{chunk-WFC3W4C3.js → chunk-VJTCFZNM.js} +4 -4
- package/dist/chunk-WMRZSULD.js +567 -0
- package/dist/chunk-WMRZSULD.js.map +1 -0
- package/dist/{chunk-XSHXH6EI.js → chunk-Z27F4LBZ.js} +380 -461
- package/dist/chunk-Z27F4LBZ.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +12 -12
- package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +5 -9
- package/dist/plugins/trueforge-agent-server-adapter/index.js +52 -31
- package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/OpenUiFenceBlock-SLLZSTMJ.js +0 -9
- package/dist/SettingsBuilder-64Y33NP3.js.map +0 -1
- package/dist/chunk-UBOFEI77.js +0 -567
- package/dist/chunk-UBOFEI77.js.map +0 -1
- package/dist/chunk-UHGSHDBM.js.map +0 -1
- package/dist/chunk-XSHXH6EI.js.map +0 -1
- /package/dist/{ConnectorSettings-CLBEWGQJ.js.map → ConnectorSettings-ADACLWQI.js.map} +0 -0
- /package/dist/{DockLayout-WRF7EQLD.js.map → DockLayout-BH5XX2AQ.js.map} +0 -0
- /package/dist/{DrawerLayout-X2UXYTOS.js.map → DrawerLayout-O2XZQCG4.js.map} +0 -0
- /package/dist/{OpenUiFenceBlock-SLLZSTMJ.js.map → OpenUiFenceBlock-A2CWCPOP.js.map} +0 -0
- /package/dist/{SandboxSettings-S5XGZWOL.js.map → SandboxSettings-H5MDAE47.js.map} +0 -0
- /package/dist/{SidebarLayout-M7HEOZVK.js.map → SidebarLayout-G6BGD7EY.js.map} +0 -0
- /package/dist/{SkillSettings-MXK4ZEI7.js.map → SkillSettings-4VB42CVG.js.map} +0 -0
- /package/dist/{WidgetLayout-7MDOKLHU.js.map → WidgetLayout-ABSXZUSQ.js.map} +0 -0
- /package/dist/{chunk-UXZOL5GO.js.map → chunk-3PTFNAQK.js.map} +0 -0
- /package/dist/{chunk-NBMP2XNL.js.map → chunk-EFGSH3MO.js.map} +0 -0
- /package/dist/{chunk-42GF723P.js.map → chunk-FDBJNXH2.js.map} +0 -0
- /package/dist/{chunk-WFC3W4C3.js.map → chunk-VJTCFZNM.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1311,6 +1311,7 @@ type SelectLibraryAgentRequest = {
|
|
|
1311
1311
|
agentName?: string;
|
|
1312
1312
|
agentSpec?: AgentSpec;
|
|
1313
1313
|
};
|
|
1314
|
+
type SettingsSection = 'models' | 'connectors' | 'skills' | 'sandbox';
|
|
1314
1315
|
type ShellModeContextValue = {
|
|
1315
1316
|
mode: ShellMode;
|
|
1316
1317
|
/** Host agentConfig mode (capabilities source). */
|
|
@@ -1322,7 +1323,8 @@ type ShellModeContextValue = {
|
|
|
1322
1323
|
/** Sidebar / list New Chat control. */
|
|
1323
1324
|
isNewChatEnabled: boolean;
|
|
1324
1325
|
settingsOpen: boolean;
|
|
1325
|
-
|
|
1326
|
+
settingsSection: SettingsSection;
|
|
1327
|
+
setSettingsOpen: (open: boolean, section?: SettingsSection) => void;
|
|
1326
1328
|
/**
|
|
1327
1329
|
* Bind from the Agents Library (Try = immutable, Edit = mutable + agentSpec).
|
|
1328
1330
|
* Prefer this over `selectAgent` / `openDraft` when both fields are available.
|
|
@@ -1558,6 +1560,8 @@ type DraftCatalogValue = {
|
|
|
1558
1560
|
error: string | null;
|
|
1559
1561
|
/** Kick off catalog fetch (idempotent). Call when a picker opens. */
|
|
1560
1562
|
ensureLoaded: () => void;
|
|
1563
|
+
/** Reload all collections after settings mutate catalog-backed configuration. */
|
|
1564
|
+
refresh: () => void;
|
|
1561
1565
|
/** Refresh connector auth state without reloading unrelated catalogs. */
|
|
1562
1566
|
refreshConnectors: () => Promise<void>;
|
|
1563
1567
|
};
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
threadHasPendingMcpAuth,
|
|
27
27
|
useComposerBusyState,
|
|
28
28
|
useComposerPauseView
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3PTFNAQK.js";
|
|
30
30
|
import {
|
|
31
31
|
useAui,
|
|
32
32
|
useAuiState
|
|
@@ -55,7 +55,6 @@ import {
|
|
|
55
55
|
ComposerRightSection,
|
|
56
56
|
ComposerSendButton,
|
|
57
57
|
ComposerShell,
|
|
58
|
-
DraftCatalogProvider,
|
|
59
58
|
DraftComposerLeftSection,
|
|
60
59
|
DraftComposerRightSection,
|
|
61
60
|
DraftCompositeSelector,
|
|
@@ -102,36 +101,37 @@ import {
|
|
|
102
101
|
UserMessageEdit,
|
|
103
102
|
WelcomeScreen,
|
|
104
103
|
defaultSlots,
|
|
105
|
-
getErrorMessage,
|
|
106
104
|
preloadMarkdownOpenUI,
|
|
107
105
|
useBrandName,
|
|
108
|
-
useDraftCatalog,
|
|
109
106
|
useMCPAuth,
|
|
110
107
|
useSlot,
|
|
111
108
|
useThemeMode,
|
|
112
109
|
useToaster,
|
|
113
110
|
useToasterOptional
|
|
114
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-Z27F4LBZ.js";
|
|
115
112
|
import {
|
|
116
113
|
DEFAULT_AGENT_CONFIG,
|
|
114
|
+
DraftCatalogProvider,
|
|
117
115
|
Icon,
|
|
118
116
|
ServerProvider,
|
|
119
117
|
ShellModeProvider,
|
|
120
118
|
Spinner,
|
|
119
|
+
getErrorMessage,
|
|
121
120
|
libraryAgentId,
|
|
122
121
|
registerIcons,
|
|
123
122
|
shellIsMutable,
|
|
124
123
|
useCatalogServer,
|
|
124
|
+
useDraftCatalog,
|
|
125
125
|
useOptionalCatalogServer,
|
|
126
126
|
useOptionalServer,
|
|
127
127
|
useOptionalShellMode,
|
|
128
128
|
useServer,
|
|
129
129
|
useServerCapabilities,
|
|
130
130
|
useShellMode
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-U5GBGEGN.js";
|
|
132
132
|
import {
|
|
133
133
|
OpenUiFenceBlock
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-FDBJNXH2.js";
|
|
135
135
|
import {
|
|
136
136
|
PRESETS,
|
|
137
137
|
ThemeProvider,
|
|
@@ -142,7 +142,7 @@ import {
|
|
|
142
142
|
useOptionalContentClassNames,
|
|
143
143
|
useTheme,
|
|
144
144
|
useThemeIcons
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-WMRZSULD.js";
|
|
146
146
|
|
|
147
147
|
// src/icons/agent-2.svg
|
|
148
148
|
import * as React from "react";
|
|
@@ -471,10 +471,10 @@ function useResolvedServer(config, onError) {
|
|
|
471
471
|
|
|
472
472
|
// src/containers/TrueforgeUI.tsx
|
|
473
473
|
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
474
|
-
var SidebarLayout = lazy(() => import("./SidebarLayout-
|
|
475
|
-
var DrawerLayout = lazy(() => import("./DrawerLayout-
|
|
476
|
-
var DockLayout = lazy(() => import("./DockLayout-
|
|
477
|
-
var WidgetLayout = lazy(() => import("./WidgetLayout-
|
|
474
|
+
var SidebarLayout = lazy(() => import("./SidebarLayout-G6BGD7EY.js").then((m) => ({ default: m.SidebarLayout })));
|
|
475
|
+
var DrawerLayout = lazy(() => import("./DrawerLayout-O2XZQCG4.js").then((m) => ({ default: m.DrawerLayout })));
|
|
476
|
+
var DockLayout = lazy(() => import("./DockLayout-BH5XX2AQ.js").then((m) => ({ default: m.DockLayout })));
|
|
477
|
+
var WidgetLayout = lazy(() => import("./WidgetLayout-ABSXZUSQ.js").then((m) => ({ default: m.WidgetLayout })));
|
|
478
478
|
function LayoutFallback({ className }) {
|
|
479
479
|
return /* @__PURE__ */ jsx12(
|
|
480
480
|
"div",
|
|
@@ -359,19 +359,15 @@ type UiConnectorAuth = ConnectorAuth$1;
|
|
|
359
359
|
type UiConnectorAuthPublic = ConnectorAuthPublic$1;
|
|
360
360
|
type UiConnector = ConnectorBase$1;
|
|
361
361
|
type UiConnectorCatalogEntry = ConnectorCatalogEntry$1;
|
|
362
|
-
declare function toHarnessAuth(auth: ConnectorAuth$1): TrueForgeApi.
|
|
362
|
+
declare function toHarnessAuth(auth: ConnectorAuth$1): TrueForgeApi.McpServerManifestAuth | undefined;
|
|
363
363
|
declare function toUiConnector(server: TrueForgeApi.ConfiguredMcpServer): UiConnector;
|
|
364
364
|
declare function toUiConnectorFromReadEntry(server: TrueForgeApi.McpServerReadEntry): UiConnector;
|
|
365
|
-
interface HarnessMcpUpsert {
|
|
366
|
-
name: string;
|
|
367
|
-
url: string;
|
|
368
|
-
auth?: TrueForgeApi.ConfiguredMcpServerAuth;
|
|
369
|
-
}
|
|
370
365
|
declare function toHarnessManifest$2(req: {
|
|
371
366
|
name: string;
|
|
372
367
|
url: string;
|
|
373
368
|
auth: ConnectorAuth$1;
|
|
374
|
-
|
|
369
|
+
description?: string;
|
|
370
|
+
}): TrueForgeApi.McpServerManifest;
|
|
375
371
|
/** Settings connector port for `createTrueFoundryServer`. Delete omitted; disconnect unsupported. */
|
|
376
372
|
declare function createConnectorCatalog(client: TrueForge): ConnectorCatalogServer$1<ToolBase$1, UiConnectorAuth, UiConnectorAuthPublic, UiConnector, UiConnectorCatalogEntry, CreateConnectorRequest$1, UpdateConnectorRequest$1>;
|
|
377
373
|
|
|
@@ -396,7 +392,7 @@ declare function toHarnessModelProvider(req: {
|
|
|
396
392
|
apiKey: string;
|
|
397
393
|
baseUrl?: string;
|
|
398
394
|
models: UiModelEntry[];
|
|
399
|
-
}): TrueForgeApi.
|
|
395
|
+
}): TrueForgeApi.ModelProviderManifest;
|
|
400
396
|
/** Settings model-catalog port for `createTrueFoundryServer`. Delete is omitted (no BE route). */
|
|
401
397
|
declare function createModelProviderCatalog(client: TrueForge): ModelCatalogServer$1<UiModelEntry, UiModelProvider, UiModelProviderCatalogEntry, CreateModelProviderRequest$1<UiModelEntry>, UpdateModelProviderRequest$1<UiModelEntry>>;
|
|
402
398
|
|
|
@@ -430,7 +426,7 @@ declare function createSandboxProviderCatalog(client: TrueForge): SandboxCatalog
|
|
|
430
426
|
|
|
431
427
|
type UiSkill = DefinedSkill;
|
|
432
428
|
declare function toHarnessManifest(req: SkillConfigBase$1): TrueForgeApi.SkillManifest;
|
|
433
|
-
declare function toUiSkill(skill: TrueForgeApi.
|
|
429
|
+
declare function toUiSkill(skill: TrueForgeApi.ConfiguredSkill, catalogNames: ReadonlySet<string>): UiSkill;
|
|
434
430
|
/** Settings skill-catalog port for `createTrueFoundryServer`. Delete omitted (no BE route). */
|
|
435
431
|
declare function createSkillCatalog(client: TrueForge): SkillCatalogServer$1<UiSkill>;
|
|
436
432
|
|
|
@@ -37,6 +37,7 @@ function toUiCatalogEntry(server) {
|
|
|
37
37
|
id: server.name,
|
|
38
38
|
name: server.name,
|
|
39
39
|
url: server.url,
|
|
40
|
+
description: server.description,
|
|
40
41
|
...server.logo === void 0 ? {} : { logo: server.logo },
|
|
41
42
|
auth: toUiAuthPublic(server.auth)
|
|
42
43
|
};
|
|
@@ -47,12 +48,12 @@ function toUiTool(tool) {
|
|
|
47
48
|
return { id: name, name, description };
|
|
48
49
|
}
|
|
49
50
|
function toUiConnector(server) {
|
|
50
|
-
const auth = toUiAuthPublic(server.auth);
|
|
51
|
+
const auth = toUiAuthPublic(server.manifest.auth);
|
|
51
52
|
return {
|
|
52
53
|
id: server.name,
|
|
53
54
|
name: server.name,
|
|
54
|
-
description: server.
|
|
55
|
-
url: server.url,
|
|
55
|
+
description: server.manifest.description,
|
|
56
|
+
url: server.manifest.url,
|
|
56
57
|
auth,
|
|
57
58
|
requiresAuth: server.authStatus.status === "auth_required",
|
|
58
59
|
authenticated: server.authStatus.status !== "auth_required"
|
|
@@ -72,9 +73,12 @@ function toUiConnectorFromReadEntry(server) {
|
|
|
72
73
|
}
|
|
73
74
|
function toHarnessManifest(req) {
|
|
74
75
|
const auth = toHarnessAuth(req.auth);
|
|
76
|
+
const trimmed = req.description?.trim();
|
|
75
77
|
return {
|
|
78
|
+
type: "remote",
|
|
76
79
|
name: req.name,
|
|
77
80
|
url: req.url,
|
|
81
|
+
description: trimmed !== void 0 && trimmed !== "" ? trimmed : `${req.name} MCP server`,
|
|
78
82
|
...auth === void 0 ? {} : { auth }
|
|
79
83
|
};
|
|
80
84
|
}
|
|
@@ -99,13 +103,13 @@ function createConnectorCatalog(client) {
|
|
|
99
103
|
throw new Error("API key is required for header-authenticated MCP servers");
|
|
100
104
|
}
|
|
101
105
|
const existing = await getConfigured(req.id);
|
|
102
|
-
if (existing.auth?.type !== "header") {
|
|
106
|
+
if (existing.manifest.auth?.type !== "header") {
|
|
103
107
|
throw new Error(`MCP server "${req.id}" has no stored header credentials to reuse`);
|
|
104
108
|
}
|
|
105
109
|
const preferredHeader = req.auth.headerName?.trim();
|
|
106
|
-
const storedHeaderName = Object.keys(existing.auth.headers)[0];
|
|
110
|
+
const storedHeaderName = Object.keys(existing.manifest.auth.headers)[0];
|
|
107
111
|
const headerName = preferredHeader !== void 0 && preferredHeader !== "" ? preferredHeader : storedHeaderName ?? DEFAULT_API_KEY_HEADER;
|
|
108
|
-
const stored = existing.auth.headers[headerName] ?? Object.values(existing.auth.headers)[0];
|
|
112
|
+
const stored = existing.manifest.auth.headers[headerName] ?? Object.values(existing.manifest.auth.headers)[0];
|
|
109
113
|
if (stored === void 0) {
|
|
110
114
|
throw new Error(`MCP server "${req.id}" has no stored header credentials to reuse`);
|
|
111
115
|
}
|
|
@@ -137,12 +141,29 @@ function createConnectorCatalog(client) {
|
|
|
137
141
|
},
|
|
138
142
|
createConnector: async (req) => {
|
|
139
143
|
const auth = await resolveWriteAuth({ auth: req.auth });
|
|
140
|
-
const
|
|
144
|
+
const catalog = await client.catalog.mcpServers.list();
|
|
145
|
+
const preset = catalog.data.find((server) => server.name === req.name);
|
|
146
|
+
const body = await client.settings.mcpServers.create({
|
|
147
|
+
manifest: toHarnessManifest({
|
|
148
|
+
name: req.name,
|
|
149
|
+
url: req.url,
|
|
150
|
+
auth,
|
|
151
|
+
description: preset?.description
|
|
152
|
+
})
|
|
153
|
+
});
|
|
141
154
|
return toUiConnector(body.data);
|
|
142
155
|
},
|
|
143
156
|
updateConnector: async (req) => {
|
|
157
|
+
const existing = await getConfigured(req.id);
|
|
144
158
|
const auth = await resolveWriteAuth({ id: req.id, auth: req.auth });
|
|
145
|
-
const body = await client.settings.mcpServers.upsert(
|
|
159
|
+
const body = await client.settings.mcpServers.upsert({
|
|
160
|
+
manifest: toHarnessManifest({
|
|
161
|
+
name: req.id,
|
|
162
|
+
url: req.url,
|
|
163
|
+
auth,
|
|
164
|
+
description: existing.manifest.description
|
|
165
|
+
})
|
|
166
|
+
});
|
|
146
167
|
return toUiConnector(body.data);
|
|
147
168
|
},
|
|
148
169
|
authenticateConnector: async (req) => {
|
|
@@ -154,7 +175,7 @@ function createConnectorCatalog(client) {
|
|
|
154
175
|
},
|
|
155
176
|
disconnectConnector: async (req) => {
|
|
156
177
|
const existing = await getConfigured(req.id);
|
|
157
|
-
if (existing.auth?.type !== "dcr") {
|
|
178
|
+
if (existing.manifest.auth?.type !== "dcr") {
|
|
158
179
|
throw new Error(`Disconnect is only supported for OAuth MCP servers`);
|
|
159
180
|
}
|
|
160
181
|
const body = await client.mcpServers.deleteAuthorize(req.id);
|
|
@@ -485,13 +506,13 @@ function toHarnessModelEntry(model) {
|
|
|
485
506
|
};
|
|
486
507
|
}
|
|
487
508
|
function toUiModelProvider(provider) {
|
|
488
|
-
const name
|
|
509
|
+
const { name, manifest } = provider;
|
|
489
510
|
return {
|
|
490
511
|
id: name,
|
|
491
|
-
type:
|
|
512
|
+
type: manifest.type,
|
|
492
513
|
name,
|
|
493
|
-
...
|
|
494
|
-
models:
|
|
514
|
+
...manifest.baseUrl === void 0 ? {} : { baseUrl: manifest.baseUrl },
|
|
515
|
+
models: manifest.models.map(toUiModelEntry)
|
|
495
516
|
};
|
|
496
517
|
}
|
|
497
518
|
function toUiCatalogModelProviderEntry(provider) {
|
|
@@ -551,11 +572,11 @@ function createModelProviderCatalog(client) {
|
|
|
551
572
|
throw new Error("API key is required");
|
|
552
573
|
}
|
|
553
574
|
const listed = await client.settings.modelProviders.list();
|
|
554
|
-
const existing = listed.data.find((provider) =>
|
|
575
|
+
const existing = listed.data.find((provider) => provider.name === req.id);
|
|
555
576
|
if (existing === void 0) {
|
|
556
577
|
throw new Error(`Model provider "${req.id}" not found`);
|
|
557
578
|
}
|
|
558
|
-
return existing.auth?.apiKey ?? "";
|
|
579
|
+
return existing.manifest.auth?.apiKey ?? "";
|
|
559
580
|
}
|
|
560
581
|
return {
|
|
561
582
|
getModelProviderCatalog: async () => {
|
|
@@ -568,28 +589,28 @@ function createModelProviderCatalog(client) {
|
|
|
568
589
|
},
|
|
569
590
|
createModelProvider: async (req) => {
|
|
570
591
|
const apiKey = await resolveApiKey({ type: req.type, apiKey: req.apiKey });
|
|
571
|
-
const body = await client.settings.modelProviders.create(
|
|
572
|
-
toHarnessModelProvider({
|
|
592
|
+
const body = await client.settings.modelProviders.create({
|
|
593
|
+
manifest: toHarnessModelProvider({
|
|
573
594
|
type: req.type,
|
|
574
595
|
name: req.name,
|
|
575
596
|
apiKey,
|
|
576
597
|
...req.baseUrl === void 0 ? {} : { baseUrl: req.baseUrl },
|
|
577
598
|
models: req.models
|
|
578
599
|
})
|
|
579
|
-
);
|
|
600
|
+
});
|
|
580
601
|
return toUiModelProvider(body.data);
|
|
581
602
|
},
|
|
582
603
|
updateModelProvider: async (req) => {
|
|
583
604
|
const apiKey = await resolveApiKey({ id: req.id, type: req.type, apiKey: req.apiKey });
|
|
584
|
-
const body = await client.settings.modelProviders.upsert(
|
|
585
|
-
toHarnessModelProvider({
|
|
605
|
+
const body = await client.settings.modelProviders.upsert({
|
|
606
|
+
manifest: toHarnessModelProvider({
|
|
586
607
|
type: req.type,
|
|
587
608
|
name: req.id,
|
|
588
609
|
apiKey,
|
|
589
610
|
...req.baseUrl === void 0 ? {} : { baseUrl: req.baseUrl },
|
|
590
611
|
models: req.models
|
|
591
612
|
})
|
|
592
|
-
);
|
|
613
|
+
});
|
|
593
614
|
return toUiModelProvider(body.data);
|
|
594
615
|
}
|
|
595
616
|
};
|
|
@@ -681,8 +702,8 @@ function createSandboxProviderCatalog(client) {
|
|
|
681
702
|
);
|
|
682
703
|
},
|
|
683
704
|
createSandboxProvider: async (req) => {
|
|
684
|
-
const body = await client.settings.sandboxProviders.upsert(
|
|
685
|
-
toHarnessManifest2({
|
|
705
|
+
const body = await client.settings.sandboxProviders.upsert({
|
|
706
|
+
manifest: toHarnessManifest2({
|
|
686
707
|
type: req.type,
|
|
687
708
|
apiKey: req.apiKey,
|
|
688
709
|
execTimeoutMs: req.execTimeoutMs,
|
|
@@ -690,13 +711,13 @@ function createSandboxProviderCatalog(client) {
|
|
|
690
711
|
autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,
|
|
691
712
|
autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes
|
|
692
713
|
})
|
|
693
|
-
);
|
|
714
|
+
});
|
|
694
715
|
return toUiSandboxProvider(body.data.manifest);
|
|
695
716
|
},
|
|
696
717
|
updateSandboxProvider: async (req) => {
|
|
697
718
|
const apiKey = await resolveApiKey(req.apiKey);
|
|
698
|
-
const body = await client.settings.sandboxProviders.upsert(
|
|
699
|
-
toHarnessManifest2({
|
|
719
|
+
const body = await client.settings.sandboxProviders.upsert({
|
|
720
|
+
manifest: toHarnessManifest2({
|
|
700
721
|
type: DAYTONA_TYPE,
|
|
701
722
|
apiKey,
|
|
702
723
|
execTimeoutMs: req.execTimeoutMs,
|
|
@@ -704,7 +725,7 @@ function createSandboxProviderCatalog(client) {
|
|
|
704
725
|
autoArchiveIntervalInMinutes: req.autoArchiveIntervalInMinutes,
|
|
705
726
|
autoDeleteIntervalInMinutes: req.autoDeleteIntervalInMinutes
|
|
706
727
|
})
|
|
707
|
-
);
|
|
728
|
+
});
|
|
708
729
|
return toUiSandboxProvider(body.data.manifest);
|
|
709
730
|
}
|
|
710
731
|
};
|
|
@@ -736,7 +757,7 @@ function toUiSkill2(skill, catalogNames) {
|
|
|
736
757
|
const base = {
|
|
737
758
|
id: skill.name,
|
|
738
759
|
name: skill.name,
|
|
739
|
-
description: skill.description
|
|
760
|
+
description: skill.manifest.description
|
|
740
761
|
};
|
|
741
762
|
if (catalogNames.has(skill.name)) {
|
|
742
763
|
return { ...base, catalogId: skill.name };
|
|
@@ -762,20 +783,20 @@ function createSkillCatalog(client) {
|
|
|
762
783
|
);
|
|
763
784
|
},
|
|
764
785
|
createSkill: async (req) => {
|
|
765
|
-
const body = await client.settings.skills.create(toHarnessManifest3(req));
|
|
786
|
+
const body = await client.settings.skills.create({ manifest: toHarnessManifest3(req) });
|
|
766
787
|
const catalogId = "catalogId" in req ? req.catalogId : void 0;
|
|
767
788
|
if (catalogId !== void 0) {
|
|
768
789
|
return {
|
|
769
790
|
id: body.data.name,
|
|
770
791
|
name: body.data.name,
|
|
771
|
-
description: body.data.description,
|
|
792
|
+
description: body.data.manifest.description,
|
|
772
793
|
catalogId
|
|
773
794
|
};
|
|
774
795
|
}
|
|
775
796
|
return {
|
|
776
797
|
id: body.data.name,
|
|
777
798
|
name: body.data.name,
|
|
778
|
-
description: body.data.description
|
|
799
|
+
description: body.data.manifest.description
|
|
779
800
|
};
|
|
780
801
|
}
|
|
781
802
|
};
|