@truefoundry/assistant-ui-runtime 0.1.8 → 0.1.9
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 +13 -5
- package/dist/index.d.ts +2 -2
- package/dist/plugins/truefoundry-agent-server-adapter/index.d.ts +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/{types-B_z-FsDS.d.ts → types-6yWuWHzK.d.ts} +83 -13
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/src/server/index.ts +14 -0
- package/src/server/types.ts +101 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.9
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Sandboxes catalog** — new `SandboxCatalogServer` port and DTOs (`SandboxConfig`, `SandboxCatalogEntry`, `SandboxBase`, `CreateSandboxRequest`, `UpdateSandboxRequest`). Exposed as the optional `CatalogServer.sandboxCatalog` sub-port. `SandboxConfig` holds the mutable settings (`snapshotName`, `execTimeoutMs`, `autoStopIntervalInMinutes`, `autoArchiveIntervalInMinutes`, `autoDeleteIntervalInMinutes`) shared by catalog rows, create, and update; create adds `apiKey`.
|
|
8
|
+
- **Skills catalog** — `SkillCatalogServer.getSkillCatalog()` plus registry/github skill DTOs (`RegistrySkill`, `GithubSkill`, `DefinedSkill`, `SkillConfigBase`, `SkillCatalogEntry`, `CreateSkillRequestBase`, `SelectRegistrySkillRequest`, `ImportGithubSkillRequest`). Registry vs github is distinguished by `catalogId` presence, not a `type` field.
|
|
9
|
+
- **`ModelSelectorEntry.reasoningEfforts?: string[]`** and **`ToolBase.description: string`**.
|
|
10
|
+
|
|
3
11
|
## 0.1.8
|
|
4
12
|
|
|
5
13
|
### Breaking
|
|
@@ -7,12 +15,12 @@
|
|
|
7
15
|
- **`AgentChatServer.prepareAndExecuteTurn` → `createTurn`**
|
|
8
16
|
Rename the method on every `AgentChatServer` implementation and mock. Signature and return type are unchanged.
|
|
9
17
|
|
|
10
|
-
- **`ConnectorAuthType` is now `"
|
|
11
|
-
Previously an open `string` with documented display labels (`"None"`, `"OAuth"`, `"API Key"`). Map host/wire values to these
|
|
18
|
+
- **`ConnectorAuthType` is now `"dcr" | "header" | "none"`**
|
|
19
|
+
Previously an open `string` with documented display labels (`"None"`, `"OAuth"`, `"API Key"`). Map host/wire values to these literals.
|
|
12
20
|
|
|
13
21
|
- **`ConnectorAuth` / `ConnectorAuthPublic` are discriminated unions**
|
|
14
|
-
- Write: `{ type: "
|
|
15
|
-
- Public:
|
|
22
|
+
- Write: `{ type: "dcr"; authUrl?: string } | { type: "header"; apiKey?: string; headerName?: string } | { type: "none" }`
|
|
23
|
+
- Public: dcr branch requires `authUrl: string` (no secrets).
|
|
16
24
|
Branch types (`ConnectorAuthOAuth`, `ConnectorAuthPublicOAuth`, …) are exported so hosts can intersect extras and re-union, e.g. `ConnectorAuthPublicOAuth & { custom: string }`.
|
|
17
25
|
|
|
18
26
|
- **`ConnectorBase.requiresAuth: boolean`**
|
|
@@ -20,4 +28,4 @@
|
|
|
20
28
|
|
|
21
29
|
### Notes
|
|
22
30
|
|
|
23
|
-
- After `authenticateConnector`,
|
|
31
|
+
- After `authenticateConnector`, the authorize URL is on `connector.auth.authUrl` when `auth.type === "dcr"` (not a separate widened return field).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _assistant_ui_core from '@assistant-ui/core';
|
|
2
2
|
import { ExternalStoreSharedOptions, AttachmentAdapter, SpeechSynthesisAdapter, DictationAdapter, RealtimeVoiceAdapter, FeedbackAdapter, ThreadAssistantMessagePart, ThreadMessage, AppendMessage, ExportedMessageRepositoryItem, RemoteThreadListAdapter } from '@assistant-ui/core';
|
|
3
|
-
import { A as AgentSpec, a as AgentChatServer, T as TurnEvent, b as ThreadCreatedEvent, U as UserToolResponseEvent, M as McpAuthRequiredEvent, c as UserToolApprovalEvent, d as Turn, e as TurnInputItem, S as Session } from './types-
|
|
4
|
-
export { f as AgentBuilderServer, g as AgentUIServerPort, C as CatalogServer, h as ConnectorAuth, i as ConnectorAuthApiKey, j as ConnectorAuthNone, k as ConnectorAuthOAuth, l as ConnectorAuthPublic, m as ConnectorAuthPublicApiKey, n as ConnectorAuthPublicNone, o as ConnectorAuthPublicOAuth, p as ConnectorAuthType, q as ConnectorBase, r as ConnectorCatalogEntry, s as ConnectorCatalogServer, t as ConnectorConfigBase, u as CreateConnectorRequest, v as CreateModelProviderRequest, w as
|
|
3
|
+
import { A as AgentSpec, a as AgentChatServer, T as TurnEvent, b as ThreadCreatedEvent, U as UserToolResponseEvent, M as McpAuthRequiredEvent, c as UserToolApprovalEvent, d as Turn, e as TurnInputItem, S as Session } from './types-6yWuWHzK.js';
|
|
4
|
+
export { f as AgentBuilderServer, g as AgentUIServerPort, C as CatalogServer, h as ConnectorAuth, i as ConnectorAuthApiKey, j as ConnectorAuthNone, k as ConnectorAuthOAuth, l as ConnectorAuthPublic, m as ConnectorAuthPublicApiKey, n as ConnectorAuthPublicNone, o as ConnectorAuthPublicOAuth, p as ConnectorAuthType, q as ConnectorBase, r as ConnectorCatalogEntry, s as ConnectorCatalogServer, t as ConnectorConfigBase, u as CreateConnectorRequest, v as CreateModelProviderRequest, w as CreateSandboxRequest, x as CreateSessionRequest, y as CreateSkillRequest, z as CreateSkillRequestBase, D as DefinedSkill, G as GithubSkill, I as ImportGithubSkillRequest, L as ListResult, B as ListSessionsParams, E as ModelCatalogServer, F as ModelEntry, H as ModelMessageEvent, J as ModelProviderBase, K as ModelProviderCatalogEntry, N as ModelProviderConfigBase, P as PreviousTurnIdInput, O as ProviderType, R as RegistrySkill, Q as SandboxBase, V as SandboxCatalogEntry, W as SandboxCatalogServer, X as SandboxConfig, Y as SandboxCreatedEvent, Z as SelectRegistrySkillRequest, _ as SessionEventItem, $ as SkillBase, a0 as SkillCatalogEntry, a1 as SkillCatalogServer, a2 as SkillConfigBase, a3 as ToolApprovalRequiredEvent, a4 as ToolBase, a5 as ToolCall, a6 as ToolResponseRequiredEvent, a7 as TurnState, a8 as TurnStateDone, a9 as TurnStreamData, aa as TurnStreamingEvent, ab as UpdateConnectorRequest, ac as UpdateModelProviderRequest, ad as UpdateSandboxRequest, ae as UpdateSessionRequest, af as UserMessage } from './types-6yWuWHzK.js';
|
|
5
5
|
import * as _assistant_ui_core_internal from '@assistant-ui/core/internal';
|
|
6
6
|
export { isEventDelta, mergeEventDelta } from './server/index.js';
|
|
7
7
|
export { CreateTrueFoundryAgentUIServerOptions, CreateTrueFoundryChatServerOptions, RequireApprovalToolSelectorItem, RequireApprovalToolsSelectorTag, TfyAgentSelectorEntry, TfyAgentSpec, TfyConnectorSelectorEntry, TfyCreateSessionRequest, TfyFinishReason, TfyListSessionsParams, TfyMcpServerInitInfo, TfyMcpServerMount, TfyMcpToolInfo, TfyModelMessageUsage, TfyModelParams, TfyModelSelectorEntry, TfyResponseFormat, TfyRuntimeConfig, TfySession, TfySkillMount, TfySkillSelectorEntry, TfySubject, TfySystemToolInfo, TfyThreadState, TfyToolInfo, TfyTurn, TfyTurnCancelledReason, TfyTurnState, TfyTurnStateDoneOutput, ToolsSelectorItem, ToolsSelectorTag, TrueFoundryAgentUIServer, TrueFoundryChatServer, createTrueFoundryAgentUIServer, createTrueFoundryChatServer, getTfyMcpInitServers, getTfyThreadState, getTfyUsage, isTfyMcpToolInfo, isTfySystemToolInfo, isTfyToolInfo } from './plugins/truefoundry-agent-server-adapter/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentSessionClient } from 'truefoundry-gateway-sdk/agents';
|
|
2
2
|
import { PrivateAgentSessionClient } from 'truefoundry-gateway-sdk/agents/private';
|
|
3
|
-
import { A as AgentSpec,
|
|
3
|
+
import { A as AgentSpec, x as CreateSessionRequest, B as ListSessionsParams, S as Session, d as Turn, a7 as TurnState, a as AgentChatServer, ae as UpdateSessionRequest, ag as AgentSelectorEntry, ah as ConnectorSelectorEntry, ai as ModelSelectorEntry, aj as SkillSelectorEntry, f as AgentBuilderServer } from '../../types-6yWuWHzK.js';
|
|
4
4
|
import { TruefoundryGatewayApi } from 'truefoundry-gateway-sdk';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { aa as TurnStreamingEvent, ak as DeltaEvents, T as TurnEvent } from '../types-6yWuWHzK.js';
|
|
2
|
+
export { al as ActionRequiredEvent, f as AgentBuilderServer, a as AgentChatServer, am as AgentInfo, an as AgentParent, ag as AgentSelectorEntry, A as AgentSpec, g as AgentUIServerPort, ao as ApprovalDecision, C as CatalogServer, ap as ChunkDeltaToolCall, h as ConnectorAuth, i as ConnectorAuthApiKey, j as ConnectorAuthNone, k as ConnectorAuthOAuth, l as ConnectorAuthPublic, m as ConnectorAuthPublicApiKey, n as ConnectorAuthPublicNone, o as ConnectorAuthPublicOAuth, p as ConnectorAuthType, q as ConnectorBase, r as ConnectorCatalogEntry, s as ConnectorCatalogServer, t as ConnectorConfigBase, ah as ConnectorSelectorEntry, u as CreateConnectorRequest, v as CreateModelProviderRequest, w as CreateSandboxRequest, x as CreateSessionRequest, y as CreateSkillRequest, z as CreateSkillRequestBase, D as DefinedSkill, G as GithubSkill, I as ImportGithubSkillRequest, L as ListResult, aq as ListSessionsOrder, B as ListSessionsParams, M as McpAuthRequiredEvent, ar as McpInitializeEvent, as as McpServerAuthInfo, at as McpServerMount, au as Model, E as ModelCatalogServer, F as ModelEntry, av as ModelMessageContentPart, aw as ModelMessageDeltaEvent, H as ModelMessageEvent, ax as ModelParams, J as ModelProviderBase, K as ModelProviderCatalogEntry, N as ModelProviderConfigBase, ai as ModelSelectorEntry, ay as PageParams, P as PreviousTurnIdInput, O as ProviderType, R as RegistrySkill, Q as SandboxBase, V as SandboxCatalogEntry, W as SandboxCatalogServer, X as SandboxConfig, Y as SandboxCreatedEvent, az as SearchAgentSelectorParams, Z as SelectRegistrySkillRequest, S as Session, _ as SessionEventItem, $ as SkillBase, a0 as SkillCatalogEntry, a1 as SkillCatalogServer, a2 as SkillConfigBase, aA as SkillMount, aj as SkillSelectorEntry, b as ThreadCreatedEvent, aB as ThreadDoneEvent, a3 as ToolApprovalRequiredEvent, a4 as ToolBase, a5 as ToolCall, aC as ToolCallFunction, aD as ToolCallRef, aE as ToolInfo, aF as ToolResponseEvent, a6 as ToolResponseRequiredEvent, d as Turn, aG as TurnCreatedEvent, aH as TurnDoneEvent, e as TurnInputItem, a7 as TurnState, aI as TurnStateCancelled, a8 as TurnStateDone, aJ as TurnStateError, aK as TurnStateRunning, a9 as TurnStreamData, ab as UpdateConnectorRequest, ac as UpdateModelProviderRequest, ad as UpdateSandboxRequest, ae as UpdateSessionRequest, af as UserMessage, aL as UserMessageContent, c as UserToolApprovalEvent, U as UserToolResponseEvent } from '../types-6yWuWHzK.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Local implementations of streaming delta helpers.
|
|
@@ -231,6 +231,7 @@ type DeltaEvents = ModelMessageDeltaEvent;
|
|
|
231
231
|
interface ModelSelectorEntry {
|
|
232
232
|
name: string;
|
|
233
233
|
provider: string;
|
|
234
|
+
reasoningEfforts?: string[];
|
|
234
235
|
}
|
|
235
236
|
/** Skill selector row. Host extends for fqn, preload, etc. */
|
|
236
237
|
interface SkillSelectorEntry {
|
|
@@ -532,15 +533,16 @@ interface ModelCatalogServer<TModel extends ModelEntry = ModelEntry, TProvider e
|
|
|
532
533
|
interface ToolBase {
|
|
533
534
|
id: string;
|
|
534
535
|
name: string;
|
|
536
|
+
description: string;
|
|
535
537
|
}
|
|
536
538
|
/** Strict auth type id. Hosts widen branches via intersection + re-union. */
|
|
537
|
-
type ConnectorAuthType = "
|
|
539
|
+
type ConnectorAuthType = "dcr" | "header" | "none";
|
|
538
540
|
type ConnectorAuthOAuth = {
|
|
539
|
-
type: "
|
|
541
|
+
type: "dcr";
|
|
540
542
|
authUrl?: string;
|
|
541
543
|
};
|
|
542
544
|
type ConnectorAuthApiKey = {
|
|
543
|
-
type: "
|
|
545
|
+
type: "header";
|
|
544
546
|
apiKey?: string;
|
|
545
547
|
headerName?: string;
|
|
546
548
|
};
|
|
@@ -549,11 +551,11 @@ type ConnectorAuthNone = {
|
|
|
549
551
|
};
|
|
550
552
|
type ConnectorAuth = ConnectorAuthOAuth | ConnectorAuthApiKey | ConnectorAuthNone;
|
|
551
553
|
type ConnectorAuthPublicOAuth = {
|
|
552
|
-
type: "
|
|
554
|
+
type: "dcr";
|
|
553
555
|
authUrl: string;
|
|
554
556
|
};
|
|
555
557
|
type ConnectorAuthPublicApiKey = {
|
|
556
|
-
type: "
|
|
558
|
+
type: "header";
|
|
557
559
|
headerName?: string;
|
|
558
560
|
};
|
|
559
561
|
type ConnectorAuthPublicNone = {
|
|
@@ -626,12 +628,36 @@ interface SkillBase {
|
|
|
626
628
|
name: string;
|
|
627
629
|
description: string;
|
|
628
630
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
interface RegistrySkill extends SkillBase {
|
|
632
|
+
/** `SkillCatalogEntry.id` this skill was created from. */
|
|
633
|
+
catalogId: string;
|
|
634
|
+
}
|
|
635
|
+
interface GithubSkill extends SkillBase {
|
|
636
|
+
}
|
|
637
|
+
type DefinedSkill = RegistrySkill | GithubSkill;
|
|
638
|
+
/** Git source fields shared by catalog entries and create requests. */
|
|
639
|
+
interface SkillConfigBase {
|
|
640
|
+
name: string;
|
|
641
|
+
description: string;
|
|
642
|
+
repoURL: string;
|
|
643
|
+
path: string;
|
|
644
|
+
ref: string;
|
|
645
|
+
}
|
|
646
|
+
interface SkillCatalogEntry extends SkillConfigBase {
|
|
647
|
+
id: string;
|
|
648
|
+
}
|
|
649
|
+
/** Create-skill base. Hosts may intersect extra fields and re-union. */
|
|
650
|
+
interface CreateSkillRequestBase extends SkillConfigBase {
|
|
633
651
|
}
|
|
634
|
-
interface
|
|
652
|
+
interface SelectRegistrySkillRequest extends CreateSkillRequestBase {
|
|
653
|
+
/** `SkillCatalogEntry.id`, persisted so the created skill links back to it. */
|
|
654
|
+
catalogId: string;
|
|
655
|
+
}
|
|
656
|
+
interface ImportGithubSkillRequest extends CreateSkillRequestBase {
|
|
657
|
+
}
|
|
658
|
+
type CreateSkillRequest = SelectRegistrySkillRequest | ImportGithubSkillRequest;
|
|
659
|
+
interface SkillCatalogServer<TSkill extends SkillBase = SkillBase, TCatalogEntry extends SkillCatalogEntry = SkillCatalogEntry, TCreate extends CreateSkillRequest = CreateSkillRequest> {
|
|
660
|
+
getSkillCatalog(): Promise<TCatalogEntry[]>;
|
|
635
661
|
listSkills(req?: {
|
|
636
662
|
query?: string;
|
|
637
663
|
}): Promise<TSkill[]>;
|
|
@@ -640,15 +666,59 @@ interface SkillCatalogServer<TSkill extends SkillBase = SkillBase, TCreate exten
|
|
|
640
666
|
id: string;
|
|
641
667
|
}): Promise<void>;
|
|
642
668
|
}
|
|
669
|
+
/** Mutable sandbox settings shared by catalog rows, create, and update. */
|
|
670
|
+
interface SandboxConfig {
|
|
671
|
+
snapshotName: string;
|
|
672
|
+
execTimeoutMs: number;
|
|
673
|
+
autoStopIntervalInMinutes: number;
|
|
674
|
+
autoArchiveIntervalInMinutes: number;
|
|
675
|
+
autoDeleteIntervalInMinutes: number;
|
|
676
|
+
}
|
|
677
|
+
interface SandboxCatalogEntry extends SandboxConfig {
|
|
678
|
+
id: string;
|
|
679
|
+
name: string;
|
|
680
|
+
type: string;
|
|
681
|
+
}
|
|
682
|
+
interface SandboxBase {
|
|
683
|
+
id: string;
|
|
684
|
+
name: string;
|
|
685
|
+
catalogId: string;
|
|
686
|
+
isConnected: boolean;
|
|
687
|
+
}
|
|
688
|
+
interface CreateSandboxRequest extends SandboxConfig {
|
|
689
|
+
/** `SandboxCatalogEntry.id` used to create this sandbox. */
|
|
690
|
+
catalogId: string;
|
|
691
|
+
name: string;
|
|
692
|
+
type: string;
|
|
693
|
+
apiKey: string;
|
|
694
|
+
}
|
|
695
|
+
interface UpdateSandboxRequest extends SandboxConfig {
|
|
696
|
+
id: string;
|
|
697
|
+
apiKey: string;
|
|
698
|
+
}
|
|
699
|
+
interface SandboxCatalogServer<TSandbox extends SandboxBase = SandboxBase, TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry, TCreate extends CreateSandboxRequest = CreateSandboxRequest, TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest> {
|
|
700
|
+
getSandboxCatalog(): Promise<TCatalogEntry[]>;
|
|
701
|
+
listSandboxes(req?: {
|
|
702
|
+
query?: string;
|
|
703
|
+
}): Promise<TSandbox[]>;
|
|
704
|
+
createSandbox(req: TCreate): Promise<TSandbox>;
|
|
705
|
+
updateSandbox(req: TUpdate): Promise<TSandbox>;
|
|
706
|
+
deleteSandbox(req: {
|
|
707
|
+
id: string;
|
|
708
|
+
}): Promise<void>;
|
|
709
|
+
}
|
|
643
710
|
/**
|
|
644
|
-
* Settings management aggregate — modelCatalog + connectorCatalog + optional
|
|
711
|
+
* Settings management aggregate — modelCatalog + connectorCatalog + optional
|
|
712
|
+
* skill and sandbox catalogs.
|
|
645
713
|
* Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
|
|
646
714
|
*/
|
|
647
|
-
interface CatalogServer<TModelCatalog extends ModelCatalogServer = ModelCatalogServer, TConnectorCatalog extends ConnectorCatalogServer = ConnectorCatalogServer, TSkillCatalog extends SkillCatalogServer = SkillCatalogServer> {
|
|
715
|
+
interface CatalogServer<TModelCatalog extends ModelCatalogServer = ModelCatalogServer, TConnectorCatalog extends ConnectorCatalogServer = ConnectorCatalogServer, TSkillCatalog extends SkillCatalogServer = SkillCatalogServer, TSandboxCatalog extends SandboxCatalogServer = SandboxCatalogServer> {
|
|
648
716
|
modelCatalog: TModelCatalog;
|
|
649
717
|
connectorCatalog: TConnectorCatalog;
|
|
650
718
|
/** Optional — omit when the host has no skills settings surface. */
|
|
651
719
|
skillCatalog?: TSkillCatalog;
|
|
720
|
+
/** Optional — omit when the host has no sandboxes settings surface. */
|
|
721
|
+
sandboxCatalog?: TSandboxCatalog;
|
|
652
722
|
}
|
|
653
723
|
/**
|
|
654
724
|
* Composed host port: chat + builder + optional settings catalog.
|
|
@@ -663,4 +733,4 @@ type AgentUIServerPort<TChat extends AgentChatServer = AgentChatServer, TBuilder
|
|
|
663
733
|
catalog?: TCatalog;
|
|
664
734
|
};
|
|
665
735
|
|
|
666
|
-
export type {
|
|
736
|
+
export type { SkillBase as $, AgentSpec as A, ListSessionsParams as B, CatalogServer as C, DefinedSkill as D, ModelCatalogServer as E, ModelEntry as F, GithubSkill as G, ModelMessageEvent as H, ImportGithubSkillRequest as I, ModelProviderBase as J, ModelProviderCatalogEntry as K, ListResult as L, McpAuthRequiredEvent as M, ModelProviderConfigBase as N, ProviderType as O, PreviousTurnIdInput as P, SandboxBase as Q, RegistrySkill as R, Session as S, TurnEvent as T, UserToolResponseEvent as U, SandboxCatalogEntry as V, SandboxCatalogServer as W, SandboxConfig as X, SandboxCreatedEvent as Y, SelectRegistrySkillRequest as Z, SessionEventItem as _, AgentChatServer as a, SkillCatalogEntry as a0, SkillCatalogServer as a1, SkillConfigBase as a2, ToolApprovalRequiredEvent as a3, ToolBase as a4, ToolCall as a5, ToolResponseRequiredEvent as a6, TurnState as a7, TurnStateDone as a8, TurnStreamData as a9, SkillMount as aA, ThreadDoneEvent as aB, ToolCallFunction as aC, ToolCallRef as aD, ToolInfo as aE, ToolResponseEvent as aF, TurnCreatedEvent as aG, TurnDoneEvent as aH, TurnStateCancelled as aI, TurnStateError as aJ, TurnStateRunning as aK, UserMessageContent as aL, TurnStreamingEvent as aa, UpdateConnectorRequest as ab, UpdateModelProviderRequest as ac, UpdateSandboxRequest as ad, UpdateSessionRequest as ae, UserMessage as af, AgentSelectorEntry as ag, ConnectorSelectorEntry as ah, ModelSelectorEntry as ai, SkillSelectorEntry as aj, DeltaEvents as ak, ActionRequiredEvent as al, AgentInfo as am, AgentParent as an, ApprovalDecision as ao, ChunkDeltaToolCall as ap, ListSessionsOrder as aq, McpInitializeEvent as ar, McpServerAuthInfo as as, McpServerMount as at, Model as au, ModelMessageContentPart as av, ModelMessageDeltaEvent as aw, ModelParams as ax, PageParams as ay, SearchAgentSelectorParams as az, ThreadCreatedEvent as b, UserToolApprovalEvent as c, Turn as d, TurnInputItem as e, AgentBuilderServer as f, AgentUIServerPort as g, ConnectorAuth as h, ConnectorAuthApiKey as i, ConnectorAuthNone as j, ConnectorAuthOAuth as k, ConnectorAuthPublic as l, ConnectorAuthPublicApiKey as m, ConnectorAuthPublicNone as n, ConnectorAuthPublicOAuth as o, ConnectorAuthType as p, ConnectorBase as q, ConnectorCatalogEntry as r, ConnectorCatalogServer as s, ConnectorConfigBase as t, CreateConnectorRequest as u, CreateModelProviderRequest as v, CreateSandboxRequest as w, CreateSessionRequest as x, CreateSkillRequest as y, CreateSkillRequestBase as z };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -116,8 +116,22 @@ export type {
|
|
|
116
116
|
UpdateConnectorRequest,
|
|
117
117
|
ConnectorCatalogServer,
|
|
118
118
|
SkillBase,
|
|
119
|
+
RegistrySkill,
|
|
120
|
+
GithubSkill,
|
|
121
|
+
DefinedSkill,
|
|
122
|
+
SkillConfigBase,
|
|
123
|
+
SkillCatalogEntry,
|
|
124
|
+
CreateSkillRequestBase,
|
|
125
|
+
SelectRegistrySkillRequest,
|
|
126
|
+
ImportGithubSkillRequest,
|
|
119
127
|
CreateSkillRequest,
|
|
120
128
|
SkillCatalogServer,
|
|
129
|
+
SandboxConfig,
|
|
130
|
+
SandboxCatalogEntry,
|
|
131
|
+
SandboxBase,
|
|
132
|
+
CreateSandboxRequest,
|
|
133
|
+
UpdateSandboxRequest,
|
|
134
|
+
SandboxCatalogServer,
|
|
121
135
|
CatalogServer,
|
|
122
136
|
AgentUIServerPort,
|
|
123
137
|
} from "./server/index.js";
|
package/src/server/index.ts
CHANGED
|
@@ -56,8 +56,22 @@ export type {
|
|
|
56
56
|
UpdateConnectorRequest,
|
|
57
57
|
ConnectorCatalogServer,
|
|
58
58
|
SkillBase,
|
|
59
|
+
RegistrySkill,
|
|
60
|
+
GithubSkill,
|
|
61
|
+
DefinedSkill,
|
|
62
|
+
SkillConfigBase,
|
|
63
|
+
SkillCatalogEntry,
|
|
64
|
+
CreateSkillRequestBase,
|
|
65
|
+
SelectRegistrySkillRequest,
|
|
66
|
+
ImportGithubSkillRequest,
|
|
59
67
|
CreateSkillRequest,
|
|
60
68
|
SkillCatalogServer,
|
|
69
|
+
SandboxConfig,
|
|
70
|
+
SandboxCatalogEntry,
|
|
71
|
+
SandboxBase,
|
|
72
|
+
CreateSandboxRequest,
|
|
73
|
+
UpdateSandboxRequest,
|
|
74
|
+
SandboxCatalogServer,
|
|
61
75
|
CatalogServer,
|
|
62
76
|
AgentUIServerPort,
|
|
63
77
|
} from "./types.js";
|
package/src/server/types.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
export interface ModelSelectorEntry {
|
|
22
22
|
name: string;
|
|
23
23
|
provider: string;
|
|
24
|
+
reasoningEfforts?: string[];
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/** Skill selector row. Host extends for fqn, preload, etc. */
|
|
@@ -405,15 +406,16 @@ export interface ModelCatalogServer<
|
|
|
405
406
|
export interface ToolBase {
|
|
406
407
|
id: string;
|
|
407
408
|
name: string;
|
|
409
|
+
description: string;
|
|
408
410
|
}
|
|
409
411
|
|
|
410
412
|
/** Strict auth type id. Hosts widen branches via intersection + re-union. */
|
|
411
|
-
export type ConnectorAuthType = "
|
|
413
|
+
export type ConnectorAuthType = "dcr" | "header" | "none";
|
|
412
414
|
|
|
413
415
|
// Write (create/update) — export branches so hosts can intersect extras
|
|
414
|
-
export type ConnectorAuthOAuth = { type: "
|
|
416
|
+
export type ConnectorAuthOAuth = { type: "dcr"; authUrl?: string };
|
|
415
417
|
export type ConnectorAuthApiKey = {
|
|
416
|
-
type: "
|
|
418
|
+
type: "header";
|
|
417
419
|
apiKey?: string;
|
|
418
420
|
headerName?: string;
|
|
419
421
|
};
|
|
@@ -423,10 +425,10 @@ export type ConnectorAuth =
|
|
|
423
425
|
| ConnectorAuthApiKey
|
|
424
426
|
| ConnectorAuthNone;
|
|
425
427
|
|
|
426
|
-
// Public (list/detail) — no secrets;
|
|
427
|
-
export type ConnectorAuthPublicOAuth = { type: "
|
|
428
|
+
// Public (list/detail) — no secrets; dcr requires authUrl
|
|
429
|
+
export type ConnectorAuthPublicOAuth = { type: "dcr"; authUrl: string };
|
|
428
430
|
export type ConnectorAuthPublicApiKey = {
|
|
429
|
-
type: "
|
|
431
|
+
type: "header";
|
|
430
432
|
headerName?: string;
|
|
431
433
|
};
|
|
432
434
|
export type ConnectorAuthPublicNone = { type: "none" };
|
|
@@ -525,34 +527,122 @@ export interface SkillBase {
|
|
|
525
527
|
description: string;
|
|
526
528
|
}
|
|
527
529
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
export interface RegistrySkill extends SkillBase {
|
|
531
|
+
/** `SkillCatalogEntry.id` this skill was created from. */
|
|
532
|
+
catalogId: string;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export interface GithubSkill extends SkillBase {}
|
|
536
|
+
|
|
537
|
+
export type DefinedSkill = RegistrySkill | GithubSkill;
|
|
538
|
+
|
|
539
|
+
/** Git source fields shared by catalog entries and create requests. */
|
|
540
|
+
export interface SkillConfigBase {
|
|
541
|
+
name: string;
|
|
542
|
+
description: string;
|
|
543
|
+
repoURL: string;
|
|
544
|
+
path: string;
|
|
545
|
+
ref: string;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export interface SkillCatalogEntry extends SkillConfigBase {
|
|
549
|
+
id: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/** Create-skill base. Hosts may intersect extra fields and re-union. */
|
|
553
|
+
export interface CreateSkillRequestBase extends SkillConfigBase {}
|
|
554
|
+
|
|
555
|
+
export interface SelectRegistrySkillRequest extends CreateSkillRequestBase {
|
|
556
|
+
/** `SkillCatalogEntry.id`, persisted so the created skill links back to it. */
|
|
557
|
+
catalogId: string;
|
|
532
558
|
}
|
|
533
559
|
|
|
560
|
+
export interface ImportGithubSkillRequest extends CreateSkillRequestBase {}
|
|
561
|
+
|
|
562
|
+
export type CreateSkillRequest =
|
|
563
|
+
| SelectRegistrySkillRequest
|
|
564
|
+
| ImportGithubSkillRequest;
|
|
565
|
+
|
|
534
566
|
export interface SkillCatalogServer<
|
|
535
567
|
TSkill extends SkillBase = SkillBase,
|
|
568
|
+
TCatalogEntry extends SkillCatalogEntry = SkillCatalogEntry,
|
|
536
569
|
TCreate extends CreateSkillRequest = CreateSkillRequest,
|
|
537
570
|
> {
|
|
571
|
+
getSkillCatalog(): Promise<TCatalogEntry[]>;
|
|
538
572
|
listSkills(req?: { query?: string }): Promise<TSkill[]>;
|
|
539
573
|
createSkill(req: TCreate): Promise<TSkill>;
|
|
540
574
|
deleteSkill?(req: { id: string }): Promise<void>;
|
|
541
575
|
}
|
|
542
576
|
|
|
577
|
+
// ---------------------------------------------------------------------------
|
|
578
|
+
// Sandboxes catalog — public rows omit credentials; writes accept them
|
|
579
|
+
// ---------------------------------------------------------------------------
|
|
580
|
+
|
|
581
|
+
/** Mutable sandbox settings shared by catalog rows, create, and update. */
|
|
582
|
+
export interface SandboxConfig {
|
|
583
|
+
snapshotName: string;
|
|
584
|
+
execTimeoutMs: number;
|
|
585
|
+
autoStopIntervalInMinutes: number;
|
|
586
|
+
autoArchiveIntervalInMinutes: number;
|
|
587
|
+
autoDeleteIntervalInMinutes: number;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export interface SandboxCatalogEntry extends SandboxConfig {
|
|
591
|
+
id: string;
|
|
592
|
+
name: string;
|
|
593
|
+
type: string;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export interface SandboxBase {
|
|
597
|
+
id: string;
|
|
598
|
+
name: string;
|
|
599
|
+
catalogId: string;
|
|
600
|
+
isConnected: boolean;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export interface CreateSandboxRequest extends SandboxConfig {
|
|
604
|
+
/** `SandboxCatalogEntry.id` used to create this sandbox. */
|
|
605
|
+
catalogId: string;
|
|
606
|
+
name: string;
|
|
607
|
+
type: string;
|
|
608
|
+
apiKey: string;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface UpdateSandboxRequest extends SandboxConfig {
|
|
612
|
+
id: string;
|
|
613
|
+
apiKey: string;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface SandboxCatalogServer<
|
|
617
|
+
TSandbox extends SandboxBase = SandboxBase,
|
|
618
|
+
TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry,
|
|
619
|
+
TCreate extends CreateSandboxRequest = CreateSandboxRequest,
|
|
620
|
+
TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest,
|
|
621
|
+
> {
|
|
622
|
+
getSandboxCatalog(): Promise<TCatalogEntry[]>;
|
|
623
|
+
listSandboxes(req?: { query?: string }): Promise<TSandbox[]>;
|
|
624
|
+
createSandbox(req: TCreate): Promise<TSandbox>;
|
|
625
|
+
updateSandbox(req: TUpdate): Promise<TSandbox>;
|
|
626
|
+
deleteSandbox(req: { id: string }): Promise<void>;
|
|
627
|
+
}
|
|
628
|
+
|
|
543
629
|
/**
|
|
544
|
-
* Settings management aggregate — modelCatalog + connectorCatalog + optional
|
|
630
|
+
* Settings management aggregate — modelCatalog + connectorCatalog + optional
|
|
631
|
+
* skill and sandbox catalogs.
|
|
545
632
|
* Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
|
|
546
633
|
*/
|
|
547
634
|
export interface CatalogServer<
|
|
548
635
|
TModelCatalog extends ModelCatalogServer = ModelCatalogServer,
|
|
549
636
|
TConnectorCatalog extends ConnectorCatalogServer = ConnectorCatalogServer,
|
|
550
637
|
TSkillCatalog extends SkillCatalogServer = SkillCatalogServer,
|
|
638
|
+
TSandboxCatalog extends SandboxCatalogServer = SandboxCatalogServer,
|
|
551
639
|
> {
|
|
552
640
|
modelCatalog: TModelCatalog;
|
|
553
641
|
connectorCatalog: TConnectorCatalog;
|
|
554
642
|
/** Optional — omit when the host has no skills settings surface. */
|
|
555
643
|
skillCatalog?: TSkillCatalog;
|
|
644
|
+
/** Optional — omit when the host has no sandboxes settings surface. */
|
|
645
|
+
sandboxCatalog?: TSandboxCatalog;
|
|
556
646
|
}
|
|
557
647
|
|
|
558
648
|
/**
|