@truefoundry/assistant-ui-runtime 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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-VU3Fc17W.js';
4
- export { f as AgentBuilderCapabilitiesResponse, g as AgentBuilderServer, h as AgentCapabilityConfig, i as AgentLibraryEntry, j as AgentRuntimeConfig, k as AgentSelectorEntry, l as AgentSkill, m as AgentUIServer, n as AgentUIServerPort, o as ApprovalDecision, p as AuthenticateConnectorRequest, C as CatalogServer, q as ConnectorAuth, r as ConnectorAuthApiKey, s as ConnectorAuthNone, t as ConnectorAuthOAuth, u as ConnectorAuthPublic, v as ConnectorAuthPublicApiKey, w as ConnectorAuthPublicNone, x as ConnectorAuthPublicOAuth, y as ConnectorAuthType, z as ConnectorAuthenticationResult, B as ConnectorBase, D as ConnectorCatalogEntry, E as ConnectorCatalogServer, F as ConnectorConfigBase, G as ConnectorSelectorEntry, H as ConnectorState, I as CreateConnectorRequest, J as CreateModelProviderRequest, K as CreateSandboxProviderRequest, L as CreateSandboxRequest, N as CreateSessionRequest, O as CreateSkillRequest, P as CreateSkillRequestBase, Q as DefinedSkill, R as GithubSkill, V as ImportGithubSkillRequest, W as ListResult, X as ListSessionsOrder, Y as ListSessionsParams, Z as McpServerMount, _ as Model, $ as ModelCatalogServer, a0 as ModelEntry, a1 as ModelMessageEvent, a2 as ModelParams, a3 as ModelProperties, a4 as ModelProviderBase, a5 as ModelProviderCatalogEntry, a6 as ModelProviderConfigBase, a7 as ModelSelection, a8 as ModelSelectorEntry, a9 as PageParams, aa as PreviousTurnIdInput, ab as ProviderEntry, ac as ProviderType, ad as RegistrySkill, ae as SandboxBase, af as SandboxCatalogEntry, ag as SandboxCatalogServer, ah as SandboxConfig, ai as SandboxCreatedEvent, aj as SandboxProviderBase, ak as SandboxProviderCatalogEntry, al as SandboxProviderConfig, am as SaveAgentRequest, an as SaveAgentResult, ao as SearchAgentSelectorParams, ap as SearchAgentsParams, aq as SelectRegistrySkillRequest, ar as SessionEventItem, as as SkillBase, at as SkillCatalogEntry, au as SkillCatalogServer, av as SkillConfigBase, aw as SkillMount, ax as SkillSelectorEntry, ay as ToolApprovalRequiredEvent, az as ToolBase, aA as ToolCall, aB as ToolResponseRequiredEvent, aC as TurnState, aD as TurnStateDone, aE as TurnStreamData, aF as TurnStreamingEvent, aG as UpdateConnectorRequest, aH as UpdateModelProviderRequest, aI as UpdateSandboxProviderRequest, aJ as UpdateSandboxRequest, aK as UpdateSessionRequest, aL as UserMessage } from './types-VU3Fc17W.js';
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-CctJojlz.js';
4
+ export { f as AgentBuilderCapabilitiesResponse, g as AgentBuilderServer, h as AgentCapabilityConfig, i as AgentLibraryEntry, j as AgentRuntimeConfig, k as AgentSelectorEntry, l as AgentSkill, m as AgentUIServer, n as AgentUIServerPort, o as ApprovalDecision, p as AuthenticateConnectorRequest, C as CatalogServer, q as ConnectorAuth, r as ConnectorAuthApiKey, s as ConnectorAuthNone, t as ConnectorAuthOAuth, u as ConnectorAuthPublic, v as ConnectorAuthPublicApiKey, w as ConnectorAuthPublicNone, x as ConnectorAuthPublicOAuth, y as ConnectorAuthType, z as ConnectorAuthenticationResult, B as ConnectorBase, D as ConnectorCatalogEntry, E as ConnectorCatalogServer, F as ConnectorConfigBase, G as ConnectorSelectorEntry, H as ConnectorState, I as CreateConnectorRequest, J as CreateModelProviderRequest, K as CreateSandboxProviderRequest, L as CreateSandboxRequest, N as CreateSessionRequest, O as CreateSkillRequest, P as CreateSkillRequestBase, Q as DefinedSkill, R as GithubSkill, V as ImportGithubSkillRequest, W as ListResult, X as ListSessionsOrder, Y as ListSessionsParams, Z as McpServerMount, _ as Model, $ as ModelCatalogServer, a0 as ModelEntry, a1 as ModelMessageEvent, a2 as ModelParams, a3 as ModelProperties, a4 as ModelProviderBase, a5 as ModelProviderCatalogEntry, a6 as ModelProviderConfigBase, a7 as ModelSelection, a8 as ModelSelectorEntry, a9 as PageParams, aa as PreviousTurnIdInput, ab as ProviderEntry, ac as ProviderType, ad as RegistrySkill, ae as SandboxBase, af as SandboxCatalogEntry, ag as SandboxCatalogServer, ah as SandboxConfig, ai as SandboxCreatedEvent, aj as SandboxProviderBase, ak as SandboxProviderCatalogEntry, al as SandboxProviderConfig, am as SandboxProviderListEntry, an as SandboxSnapshotSyncStatus, ao as SaveAgentRequest, ap as SaveAgentResult, aq as SearchAgentSelectorParams, ar as SearchAgentsParams, as as SelectRegistrySkillRequest, at as SessionEventItem, au as SkillBase, av as SkillCatalogEntry, aw as SkillCatalogServer, ax as SkillConfigBase, ay as SkillMount, az as SkillSelectorEntry, aA as ToolApprovalRequiredEvent, aB as ToolBase, aC as ToolCall, aD as ToolResponseRequiredEvent, aE as TurnState, aF as TurnStateDone, aG as TurnStreamData, aH as TurnStreamingEvent, aI as UpdateConnectorRequest, aJ as UpdateModelProviderRequest, aK as UpdateSandboxProviderRequest, aL as UpdateSandboxRequest, aM as UpdateSessionRequest, aN as UserMessage } from './types-CctJojlz.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, N as CreateSessionRequest, Y as ListSessionsParams, S as Session, d as Turn, aC as TurnState, a as AgentChatServer, aK as UpdateSessionRequest, k as AgentSelectorEntry, G as ConnectorSelectorEntry, a8 as ModelSelectorEntry, ax as SkillSelectorEntry, g as AgentBuilderServer } from '../../types-VU3Fc17W.js';
3
+ import { A as AgentSpec, N as CreateSessionRequest, Y as ListSessionsParams, S as Session, d as Turn, aE as TurnState, a as AgentChatServer, aM as UpdateSessionRequest, k as AgentSelectorEntry, G as ConnectorSelectorEntry, a8 as ModelSelectorEntry, az as SkillSelectorEntry, g as AgentBuilderServer } from '../../types-CctJojlz.js';
4
4
  import { TruefoundryGatewayApi } from 'truefoundry-gateway-sdk';
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { aF as TurnStreamingEvent, aM as DeltaEvents, T as TurnEvent } from '../types-VU3Fc17W.js';
2
- export { aN as ActionRequiredEvent, f as AgentBuilderCapabilitiesResponse, g as AgentBuilderServer, h as AgentCapabilityConfig, a as AgentChatServer, aO as AgentInfo, i as AgentLibraryEntry, aP as AgentParent, j as AgentRuntimeConfig, k as AgentSelectorEntry, l as AgentSkill, A as AgentSpec, m as AgentUIServer, n as AgentUIServerPort, o as ApprovalDecision, p as AuthenticateConnectorRequest, C as CatalogServer, aQ as ChunkDeltaToolCall, q as ConnectorAuth, r as ConnectorAuthApiKey, s as ConnectorAuthNone, t as ConnectorAuthOAuth, u as ConnectorAuthPublic, v as ConnectorAuthPublicApiKey, w as ConnectorAuthPublicNone, x as ConnectorAuthPublicOAuth, y as ConnectorAuthType, z as ConnectorAuthenticationResult, B as ConnectorBase, D as ConnectorCatalogEntry, E as ConnectorCatalogServer, F as ConnectorConfigBase, G as ConnectorSelectorEntry, H as ConnectorState, I as CreateConnectorRequest, J as CreateModelProviderRequest, K as CreateSandboxProviderRequest, L as CreateSandboxRequest, N as CreateSessionRequest, O as CreateSkillRequest, P as CreateSkillRequestBase, Q as DefinedSkill, R as GithubSkill, V as ImportGithubSkillRequest, W as ListResult, X as ListSessionsOrder, Y as ListSessionsParams, M as McpAuthRequiredEvent, aR as McpInitializeEvent, aS as McpServerAuthInfo, Z as McpServerMount, _ as Model, $ as ModelCatalogServer, a0 as ModelEntry, aT as ModelMessageContentPart, aU as ModelMessageDeltaEvent, a1 as ModelMessageEvent, a2 as ModelParams, a3 as ModelProperties, a4 as ModelProviderBase, a5 as ModelProviderCatalogEntry, a6 as ModelProviderConfigBase, a7 as ModelSelection, a8 as ModelSelectorEntry, a9 as PageParams, aa as PreviousTurnIdInput, ab as ProviderEntry, ac as ProviderType, ad as RegistrySkill, ae as SandboxBase, af as SandboxCatalogEntry, ag as SandboxCatalogServer, ah as SandboxConfig, ai as SandboxCreatedEvent, aj as SandboxProviderBase, ak as SandboxProviderCatalogEntry, al as SandboxProviderConfig, am as SaveAgentRequest, an as SaveAgentResult, ao as SearchAgentSelectorParams, ap as SearchAgentsParams, aq as SelectRegistrySkillRequest, S as Session, ar as SessionEventItem, as as SkillBase, at as SkillCatalogEntry, au as SkillCatalogServer, av as SkillConfigBase, aw as SkillMount, ax as SkillSelectorEntry, b as ThreadCreatedEvent, aV as ThreadDoneEvent, ay as ToolApprovalRequiredEvent, az as ToolBase, aA as ToolCall, aW as ToolCallFunction, aX as ToolCallRef, aY as ToolInfo, aZ as ToolResponseEvent, aB as ToolResponseRequiredEvent, d as Turn, a_ as TurnCreatedEvent, a$ as TurnDoneEvent, e as TurnInputItem, aC as TurnState, b0 as TurnStateCancelled, aD as TurnStateDone, b1 as TurnStateError, b2 as TurnStateRunning, aE as TurnStreamData, aG as UpdateConnectorRequest, aH as UpdateModelProviderRequest, aI as UpdateSandboxProviderRequest, aJ as UpdateSandboxRequest, aK as UpdateSessionRequest, aL as UserMessage, b3 as UserMessageContent, c as UserToolApprovalEvent, U as UserToolResponseEvent } from '../types-VU3Fc17W.js';
1
+ import { aH as TurnStreamingEvent, aO as DeltaEvents, T as TurnEvent } from '../types-CctJojlz.js';
2
+ export { aP as ActionRequiredEvent, f as AgentBuilderCapabilitiesResponse, g as AgentBuilderServer, h as AgentCapabilityConfig, a as AgentChatServer, aQ as AgentInfo, i as AgentLibraryEntry, aR as AgentParent, j as AgentRuntimeConfig, k as AgentSelectorEntry, l as AgentSkill, A as AgentSpec, m as AgentUIServer, n as AgentUIServerPort, o as ApprovalDecision, p as AuthenticateConnectorRequest, C as CatalogServer, aS as ChunkDeltaToolCall, q as ConnectorAuth, r as ConnectorAuthApiKey, s as ConnectorAuthNone, t as ConnectorAuthOAuth, u as ConnectorAuthPublic, v as ConnectorAuthPublicApiKey, w as ConnectorAuthPublicNone, x as ConnectorAuthPublicOAuth, y as ConnectorAuthType, z as ConnectorAuthenticationResult, B as ConnectorBase, D as ConnectorCatalogEntry, E as ConnectorCatalogServer, F as ConnectorConfigBase, G as ConnectorSelectorEntry, H as ConnectorState, I as CreateConnectorRequest, J as CreateModelProviderRequest, K as CreateSandboxProviderRequest, L as CreateSandboxRequest, N as CreateSessionRequest, O as CreateSkillRequest, P as CreateSkillRequestBase, Q as DefinedSkill, R as GithubSkill, V as ImportGithubSkillRequest, W as ListResult, X as ListSessionsOrder, Y as ListSessionsParams, M as McpAuthRequiredEvent, aT as McpInitializeEvent, aU as McpServerAuthInfo, Z as McpServerMount, _ as Model, $ as ModelCatalogServer, a0 as ModelEntry, aV as ModelMessageContentPart, aW as ModelMessageDeltaEvent, a1 as ModelMessageEvent, a2 as ModelParams, a3 as ModelProperties, a4 as ModelProviderBase, a5 as ModelProviderCatalogEntry, a6 as ModelProviderConfigBase, a7 as ModelSelection, a8 as ModelSelectorEntry, a9 as PageParams, aa as PreviousTurnIdInput, ab as ProviderEntry, ac as ProviderType, ad as RegistrySkill, ae as SandboxBase, af as SandboxCatalogEntry, ag as SandboxCatalogServer, ah as SandboxConfig, ai as SandboxCreatedEvent, aj as SandboxProviderBase, ak as SandboxProviderCatalogEntry, al as SandboxProviderConfig, am as SandboxProviderListEntry, an as SandboxSnapshotSyncStatus, ao as SaveAgentRequest, ap as SaveAgentResult, aq as SearchAgentSelectorParams, ar as SearchAgentsParams, as as SelectRegistrySkillRequest, S as Session, at as SessionEventItem, au as SkillBase, av as SkillCatalogEntry, aw as SkillCatalogServer, ax as SkillConfigBase, ay as SkillMount, az as SkillSelectorEntry, b as ThreadCreatedEvent, aX as ThreadDoneEvent, aA as ToolApprovalRequiredEvent, aB as ToolBase, aC as ToolCall, aY as ToolCallFunction, aZ as ToolCallRef, a_ as ToolInfo, a$ as ToolResponseEvent, aD as ToolResponseRequiredEvent, d as Turn, b0 as TurnCreatedEvent, b1 as TurnDoneEvent, e as TurnInputItem, aE as TurnState, b2 as TurnStateCancelled, aF as TurnStateDone, b3 as TurnStateError, b4 as TurnStateRunning, aG as TurnStreamData, aI as UpdateConnectorRequest, aJ as UpdateModelProviderRequest, aK as UpdateSandboxProviderRequest, aL as UpdateSandboxRequest, aM as UpdateSessionRequest, aN as UserMessage, b5 as UserMessageContent, c as UserToolApprovalEvent, U as UserToolResponseEvent } from '../types-CctJojlz.js';
3
3
 
4
4
  /**
5
5
  * Local implementations of streaming delta helpers.
@@ -271,19 +271,19 @@ type SearchAgentSelectorParams = {
271
271
  offset?: number;
272
272
  };
273
273
  /**
274
- * Mounts written to AgentSpec.skills[] / AgentSpec.mcpServers[].
275
- *
276
- * These are opaque to the runtime — it stores and forwards them but never reads
277
- * a field, and the backend owns the shape (the gateway identifies a skill by
278
- * `fqn`, with no `id` or `name` anywhere). So the base constrains only that a
279
- * mount is an object; hosts intersect their concrete mount type over it, as
280
- * `TfySkillMount` / `TfyMcpServerMount` do in the gateway adapter.
281
- *
282
- * Naming a field here would not just be unread, it would be wrong: a base with
283
- * required fields rejects the backend's own payloads, and one with only optional
284
- * fields is a weak type, which TypeScript rejects for a source that shares no
285
- * property with it — the gateway's registry skill shares none.
286
- */
274
+ * Mounts written to AgentSpec.skills[] / AgentSpec.mcpServers[].
275
+ *
276
+ * These are opaque to the runtime — it stores and forwards them but never reads
277
+ * a field, and the backend owns the shape (the gateway identifies a skill by
278
+ * `fqn`, with no `id` or `name` anywhere). So the base constrains only that a
279
+ * mount is an object; hosts intersect their concrete mount type over it, as
280
+ * `TfySkillMount` / `TfyMcpServerMount` do in the gateway adapter.
281
+ *
282
+ * Naming a field here would not just be unread, it would be wrong: a base with
283
+ * required fields rejects the backend's own payloads, and one with only optional
284
+ * fields is a weak type, which TypeScript rejects for a source that shares no
285
+ * property with it — the gateway's registry skill shares none.
286
+ */
287
287
  type SkillMount = object;
288
288
  type McpServerMount = object;
289
289
  interface ModelParams {
@@ -303,10 +303,10 @@ interface AgentRuntimeConfig {
303
303
  askUserQuestions?: AgentCapabilityConfig;
304
304
  }
305
305
  /**
306
- * SDK-owned agent definition — fields the FE reads/writes.
307
- * Host widens `model` / `skills` / `mcpServers` / `config` via type params,
308
- * and adds extra fields via `TSpec extends AgentSpec<...>`.
309
- */
306
+ * SDK-owned agent definition — fields the FE reads/writes.
307
+ * Host widens `model` / `skills` / `mcpServers` / `config` via type params,
308
+ * and adds extra fields via `TSpec extends AgentSpec<...>`.
309
+ */
310
310
  interface AgentSpec<TModel extends Model = Model, TSkill extends SkillMount = SkillMount, TMcp extends McpServerMount = McpServerMount, TConfig extends AgentRuntimeConfig = AgentRuntimeConfig> {
311
311
  model: TModel;
312
312
  skills?: TSkill[];
@@ -413,11 +413,11 @@ interface Turn {
413
413
  createdAt: string;
414
414
  }
415
415
  /**
416
- * Chat / session port — the runtime calls these.
417
- *
418
- * All session ops are flat (sessionId param). No gateway client dependency.
419
- * `createTrueFoundryServer` is one possible implementation (TFY adapter).
420
- */
416
+ * Chat / session port — the runtime calls these.
417
+ *
418
+ * All session ops are flat (sessionId param). No gateway client dependency.
419
+ * `createTrueFoundryServer` is one possible implementation (TFY adapter).
420
+ */
421
421
  interface AgentChatServer<TSpec extends AgentSpec = AgentSpec, TSession extends Session<TSpec> = Session<TSpec>, TCreate extends CreateSessionRequest<TSpec> = CreateSessionRequest<TSpec>, TList extends ListSessionsParams = ListSessionsParams, TUpdate extends UpdateSessionRequest<TSpec> = UpdateSessionRequest<TSpec>, TTurn extends Turn = Turn> {
422
422
  createSession(req: TCreate): Promise<TSession>;
423
423
  listSessions(req?: TList): Promise<ListResult<TSession>>;
@@ -512,9 +512,9 @@ interface AgentBuilderCapabilitiesResponse {
512
512
  };
513
513
  }
514
514
  /**
515
- * Builder catalog + persist port — atoms call these.
516
- * Passed separately from the runtime's chat server.
517
- */
515
+ * Builder catalog + persist port — atoms call these.
516
+ * Passed separately from the runtime's chat server.
517
+ */
518
518
  interface AgentBuilderServer<TSpec extends AgentSpec = AgentSpec, TModel extends ModelSelectorEntry = ModelSelectorEntry, TSkill extends SkillSelectorEntry = SkillSelectorEntry, TMcp extends ConnectorSelectorEntry = ConnectorSelectorEntry, TAgent extends AgentSelectorEntry = AgentSelectorEntry, TSave = SaveAgentResult, TCapabilities extends AgentBuilderCapabilitiesResponse = AgentBuilderCapabilitiesResponse> {
519
519
  getCapabilities(): Promise<TCapabilities>;
520
520
  getModels(): Promise<TModel[]>;
@@ -527,25 +527,25 @@ interface AgentBuilderServer<TSpec extends AgentSpec = AgentSpec, TModel extends
527
527
  }): Promise<void>;
528
528
  }
529
529
  /**
530
- * Provider type id. Reserved literal: `"custom"` for user-defined providers;
531
- * any other string is a builtin (e.g. `"openai"`, `"anthropic"`).
532
- *
533
- * Note: `string | "custom"` is useless in TypeScript (`"custom"` ⊆ `string`),
534
- * so this stays `string` and `"custom"` is a documented convention.
535
- */
530
+ * Provider type id. Reserved literal: `"custom"` for user-defined providers;
531
+ * any other string is a builtin (e.g. `"openai"`, `"anthropic"`).
532
+ *
533
+ * Note: `string | "custom"` is useless in TypeScript (`"custom"` ⊆ `string`),
534
+ * so this stays `string` and `"custom"` is a documented convention.
535
+ */
536
536
  type ProviderType = string;
537
537
  /**
538
- * Model row — form "Model ID" + "Display name".
539
- * Host extends for properties, etc.
540
- */
538
+ * Model row — form "Model ID" + "Display name".
539
+ * Host extends for properties, etc.
540
+ */
541
541
  interface ModelEntry {
542
542
  id: string;
543
543
  name: string;
544
544
  }
545
545
  /**
546
- * Write config for create/update (custom form + catalog "Save key").
547
- * Host extends. `baseUrl` present iff `type === "custom"`.
548
- */
546
+ * Write config for create/update (custom form + catalog "Save key").
547
+ * Host extends. `baseUrl` present iff `type === "custom"`.
548
+ */
549
549
  interface ModelProviderConfigBase<TModel extends ModelEntry = ModelEntry> {
550
550
  type: ProviderType;
551
551
  name: string;
@@ -555,9 +555,9 @@ interface ModelProviderConfigBase<TModel extends ModelEntry = ModelEntry> {
555
555
  models: TModel[];
556
556
  }
557
557
  /**
558
- * Configured provider card (list/read). No raw `apiKey`.
559
- * Host extends for apiKeySet, timestamps, etc.
560
- */
558
+ * Configured provider card (list/read). No raw `apiKey`.
559
+ * Host extends for apiKeySet, timestamps, etc.
560
+ */
561
561
  interface ModelProviderBase<TModel extends ModelEntry = ModelEntry> {
562
562
  id: string;
563
563
  type: ProviderType;
@@ -567,10 +567,10 @@ interface ModelProviderBase<TModel extends ModelEntry = ModelEntry> {
567
567
  models: TModel[];
568
568
  }
569
569
  /**
570
- * Discovery-only catalog provider (AVAILABLE list).
571
- * `type` must not be `"custom"` — custom providers use the custom form.
572
- * Host extends for richer model rows.
573
- */
570
+ * Discovery-only catalog provider (AVAILABLE list).
571
+ * `type` must not be `"custom"` — custom providers use the custom form.
572
+ * Host extends for richer model rows.
573
+ */
574
574
  interface ModelProviderCatalogEntry<TModel extends ModelEntry = ModelEntry> {
575
575
  type: ProviderType;
576
576
  name: string;
@@ -628,8 +628,8 @@ type ConnectorAuthPublicNone = {
628
628
  };
629
629
  type ConnectorAuthPublic = ConnectorAuthPublicOAuth | ConnectorAuthPublicApiKey | ConnectorAuthPublicNone;
630
630
  /**
631
- * MCP / connector create-edit config. Host extends for extra fields, etc.
632
- */
631
+ * MCP / connector create-edit config. Host extends for extra fields, etc.
632
+ */
633
633
  interface ConnectorConfigBase<TAuth extends ConnectorAuth = ConnectorAuth> {
634
634
  name: string;
635
635
  url: string;
@@ -749,7 +749,6 @@ interface SkillCatalogServer<TSkill extends SkillBase = SkillBase, TCatalogEntry
749
749
  }
750
750
  /** Mutable sandbox provider settings shared by catalog rows, create, and update. */
751
751
  interface SandboxConfig {
752
- snapshotName: string;
753
752
  execTimeoutMs: number;
754
753
  autoStopIntervalInMinutes: number;
755
754
  autoArchiveIntervalInMinutes: number;
@@ -770,6 +769,14 @@ interface SandboxBase extends SandboxConfig {
770
769
  catalogId: string;
771
770
  isConnected: boolean;
772
771
  }
772
+ type SandboxSnapshotSyncStatus = {
773
+ status: "pending" | "ready" | "failed";
774
+ statusReason?: string | null;
775
+ };
776
+ interface SandboxProviderListEntry<TSandbox extends SandboxBase = SandboxBase> {
777
+ data: TSandbox;
778
+ snapshotSyncStatus: SandboxSnapshotSyncStatus;
779
+ }
773
780
  interface CreateSandboxRequest extends SandboxConfig {
774
781
  /** `SandboxCatalogEntry.id` used to create this sandbox provider. */
775
782
  catalogId: string;
@@ -788,11 +795,11 @@ type SandboxProviderCatalogEntry = SandboxCatalogEntry;
788
795
  type SandboxProviderBase = SandboxBase;
789
796
  type CreateSandboxProviderRequest = CreateSandboxRequest;
790
797
  type UpdateSandboxProviderRequest = UpdateSandboxRequest;
791
- interface SandboxCatalogServer<TProvider extends SandboxBase = SandboxBase, TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry, TCreate extends CreateSandboxRequest = CreateSandboxRequest, TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest> {
798
+ interface SandboxCatalogServer<TProvider extends SandboxBase = SandboxBase, TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry, TCreate extends CreateSandboxRequest = CreateSandboxRequest, TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest, TListEntry extends SandboxProviderListEntry<TProvider> = SandboxProviderListEntry<TProvider>> {
792
799
  getSandboxProviderCatalog(): Promise<TCatalogEntry[]>;
793
800
  listSandboxProviders(req?: {
794
801
  query?: string;
795
- }): Promise<TProvider[]>;
802
+ }): Promise<TListEntry[]>;
796
803
  createSandboxProvider(req: TCreate): Promise<TProvider>;
797
804
  updateSandboxProvider(req: TUpdate): Promise<TProvider>;
798
805
  deleteSandboxProvider?(req: {
@@ -806,10 +813,10 @@ type ConnectorState = ConnectorSelectorEntry;
806
813
  type AgentLibraryEntry = AgentSelectorEntry;
807
814
  type SearchAgentsParams = SearchAgentSelectorParams;
808
815
  /**
809
- * Settings management aggregate — modelCatalog + connectorCatalog + optional
810
- * skill and sandbox catalogs.
811
- * Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
812
- */
816
+ * Settings management aggregate — modelCatalog + connectorCatalog + optional
817
+ * skill and sandbox catalogs.
818
+ * Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
819
+ */
813
820
  interface CatalogServer<TModelCatalog extends ModelCatalogServer = ModelCatalogServer, TConnectorCatalog extends ConnectorCatalogServer = ConnectorCatalogServer, TSkillCatalog extends SkillCatalogServer = SkillCatalogServer, TSandboxCatalog extends SandboxCatalogServer = SandboxCatalogServer> {
814
821
  modelCatalog: TModelCatalog;
815
822
  connectorCatalog: TConnectorCatalog;
@@ -833,4 +840,4 @@ type AgentUIServerPort<TChat extends AgentChatServer = AgentChatServer, TBuilder
833
840
  /** Host-facing alias used by trueforge-ui. */
834
841
  type AgentUIServer = AgentUIServerPort;
835
842
 
836
- export type { ModelCatalogServer as $, AgentSpec as A, ConnectorBase as B, CatalogServer as C, ConnectorCatalogEntry as D, ConnectorCatalogServer as E, ConnectorConfigBase as F, ConnectorSelectorEntry as G, ConnectorState as H, CreateConnectorRequest as I, CreateModelProviderRequest as J, CreateSandboxProviderRequest as K, CreateSandboxRequest as L, McpAuthRequiredEvent as M, CreateSessionRequest as N, CreateSkillRequest as O, CreateSkillRequestBase as P, DefinedSkill as Q, GithubSkill as R, Session as S, TurnEvent as T, UserToolResponseEvent as U, ImportGithubSkillRequest as V, ListResult as W, ListSessionsOrder as X, ListSessionsParams as Y, McpServerMount as Z, Model as _, AgentChatServer as a, TurnDoneEvent as a$, ModelEntry as a0, ModelMessageEvent as a1, ModelParams as a2, ModelProperties as a3, ModelProviderBase as a4, ModelProviderCatalogEntry as a5, ModelProviderConfigBase as a6, ModelSelection as a7, ModelSelectorEntry as a8, PageParams as a9, ToolCall as aA, ToolResponseRequiredEvent as aB, TurnState as aC, TurnStateDone as aD, TurnStreamData as aE, TurnStreamingEvent as aF, UpdateConnectorRequest as aG, UpdateModelProviderRequest as aH, UpdateSandboxProviderRequest as aI, UpdateSandboxRequest as aJ, UpdateSessionRequest as aK, UserMessage as aL, DeltaEvents as aM, ActionRequiredEvent as aN, AgentInfo as aO, AgentParent as aP, ChunkDeltaToolCall as aQ, McpInitializeEvent as aR, McpServerAuthInfo as aS, ModelMessageContentPart as aT, ModelMessageDeltaEvent as aU, ThreadDoneEvent as aV, ToolCallFunction as aW, ToolCallRef as aX, ToolInfo as aY, ToolResponseEvent as aZ, TurnCreatedEvent as a_, PreviousTurnIdInput as aa, ProviderEntry as ab, ProviderType as ac, RegistrySkill as ad, SandboxBase as ae, SandboxCatalogEntry as af, SandboxCatalogServer as ag, SandboxConfig as ah, SandboxCreatedEvent as ai, SandboxProviderBase as aj, SandboxProviderCatalogEntry as ak, SandboxProviderConfig as al, SaveAgentRequest as am, SaveAgentResult as an, SearchAgentSelectorParams as ao, SearchAgentsParams as ap, SelectRegistrySkillRequest as aq, SessionEventItem as ar, SkillBase as as, SkillCatalogEntry as at, SkillCatalogServer as au, SkillConfigBase as av, SkillMount as aw, SkillSelectorEntry as ax, ToolApprovalRequiredEvent as ay, ToolBase as az, ThreadCreatedEvent as b, TurnStateCancelled as b0, TurnStateError as b1, TurnStateRunning as b2, UserMessageContent as b3, UserToolApprovalEvent as c, Turn as d, TurnInputItem as e, AgentBuilderCapabilitiesResponse as f, AgentBuilderServer as g, AgentCapabilityConfig as h, AgentLibraryEntry as i, AgentRuntimeConfig as j, AgentSelectorEntry as k, AgentSkill as l, AgentUIServer as m, AgentUIServerPort as n, ApprovalDecision as o, AuthenticateConnectorRequest as p, ConnectorAuth as q, ConnectorAuthApiKey as r, ConnectorAuthNone as s, ConnectorAuthOAuth as t, ConnectorAuthPublic as u, ConnectorAuthPublicApiKey as v, ConnectorAuthPublicNone as w, ConnectorAuthPublicOAuth as x, ConnectorAuthType as y, ConnectorAuthenticationResult as z };
843
+ export type { ModelCatalogServer as $, AgentSpec as A, ConnectorBase as B, CatalogServer as C, ConnectorCatalogEntry as D, ConnectorCatalogServer as E, ConnectorConfigBase as F, ConnectorSelectorEntry as G, ConnectorState as H, CreateConnectorRequest as I, CreateModelProviderRequest as J, CreateSandboxProviderRequest as K, CreateSandboxRequest as L, McpAuthRequiredEvent as M, CreateSessionRequest as N, CreateSkillRequest as O, CreateSkillRequestBase as P, DefinedSkill as Q, GithubSkill as R, Session as S, TurnEvent as T, UserToolResponseEvent as U, ImportGithubSkillRequest as V, ListResult as W, ListSessionsOrder as X, ListSessionsParams as Y, McpServerMount as Z, Model as _, AgentChatServer as a, ToolResponseEvent as a$, ModelEntry as a0, ModelMessageEvent as a1, ModelParams as a2, ModelProperties as a3, ModelProviderBase as a4, ModelProviderCatalogEntry as a5, ModelProviderConfigBase as a6, ModelSelection as a7, ModelSelectorEntry as a8, PageParams as a9, ToolApprovalRequiredEvent as aA, ToolBase as aB, ToolCall as aC, ToolResponseRequiredEvent as aD, TurnState as aE, TurnStateDone as aF, TurnStreamData as aG, TurnStreamingEvent as aH, UpdateConnectorRequest as aI, UpdateModelProviderRequest as aJ, UpdateSandboxProviderRequest as aK, UpdateSandboxRequest as aL, UpdateSessionRequest as aM, UserMessage as aN, DeltaEvents as aO, ActionRequiredEvent as aP, AgentInfo as aQ, AgentParent as aR, ChunkDeltaToolCall as aS, McpInitializeEvent as aT, McpServerAuthInfo as aU, ModelMessageContentPart as aV, ModelMessageDeltaEvent as aW, ThreadDoneEvent as aX, ToolCallFunction as aY, ToolCallRef as aZ, ToolInfo as a_, PreviousTurnIdInput as aa, ProviderEntry as ab, ProviderType as ac, RegistrySkill as ad, SandboxBase as ae, SandboxCatalogEntry as af, SandboxCatalogServer as ag, SandboxConfig as ah, SandboxCreatedEvent as ai, SandboxProviderBase as aj, SandboxProviderCatalogEntry as ak, SandboxProviderConfig as al, SandboxProviderListEntry as am, SandboxSnapshotSyncStatus as an, SaveAgentRequest as ao, SaveAgentResult as ap, SearchAgentSelectorParams as aq, SearchAgentsParams as ar, SelectRegistrySkillRequest as as, SessionEventItem as at, SkillBase as au, SkillCatalogEntry as av, SkillCatalogServer as aw, SkillConfigBase as ax, SkillMount as ay, SkillSelectorEntry as az, ThreadCreatedEvent as b, TurnCreatedEvent as b0, TurnDoneEvent as b1, TurnStateCancelled as b2, TurnStateError as b3, TurnStateRunning as b4, UserMessageContent as b5, UserToolApprovalEvent as c, Turn as d, TurnInputItem as e, AgentBuilderCapabilitiesResponse as f, AgentBuilderServer as g, AgentCapabilityConfig as h, AgentLibraryEntry as i, AgentRuntimeConfig as j, AgentSelectorEntry as k, AgentSkill as l, AgentUIServer as m, AgentUIServerPort as n, ApprovalDecision as o, AuthenticateConnectorRequest as p, ConnectorAuth as q, ConnectorAuthApiKey as r, ConnectorAuthNone as s, ConnectorAuthOAuth as t, ConnectorAuthPublic as u, ConnectorAuthPublicApiKey as v, ConnectorAuthPublicNone as w, ConnectorAuthPublicOAuth as x, ConnectorAuthType as y, ConnectorAuthenticationResult as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truefoundry/assistant-ui-runtime",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "TrueFoundry Gateway agent runtime adapter for assistant-ui",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -143,6 +143,8 @@ export type {
143
143
  SandboxConfig,
144
144
  SandboxCatalogEntry,
145
145
  SandboxBase,
146
+ SandboxSnapshotSyncStatus,
147
+ SandboxProviderListEntry,
146
148
  CreateSandboxRequest,
147
149
  UpdateSandboxRequest,
148
150
  SandboxProviderConfig,
@@ -83,6 +83,8 @@ export type {
83
83
  SandboxConfig,
84
84
  SandboxCatalogEntry,
85
85
  SandboxBase,
86
+ SandboxSnapshotSyncStatus,
87
+ SandboxProviderListEntry,
86
88
  CreateSandboxRequest,
87
89
  UpdateSandboxRequest,
88
90
  SandboxProviderConfig,
@@ -10,7 +10,7 @@ import type {
10
10
  ActionRequiredEvent,
11
11
  SessionEventItem,
12
12
  TurnEvent,
13
- TurnStreamData
13
+ TurnStreamData,
14
14
  } from "./events.js";
15
15
 
16
16
  // ---------------------------------------------------------------------------
@@ -74,19 +74,19 @@ export type SearchAgentSelectorParams = {
74
74
  // ---------------------------------------------------------------------------
75
75
 
76
76
  /**
77
- * Mounts written to AgentSpec.skills[] / AgentSpec.mcpServers[].
78
- *
79
- * These are opaque to the runtime — it stores and forwards them but never reads
80
- * a field, and the backend owns the shape (the gateway identifies a skill by
81
- * `fqn`, with no `id` or `name` anywhere). So the base constrains only that a
82
- * mount is an object; hosts intersect their concrete mount type over it, as
83
- * `TfySkillMount` / `TfyMcpServerMount` do in the gateway adapter.
84
- *
85
- * Naming a field here would not just be unread, it would be wrong: a base with
86
- * required fields rejects the backend's own payloads, and one with only optional
87
- * fields is a weak type, which TypeScript rejects for a source that shares no
88
- * property with it — the gateway's registry skill shares none.
89
- */
77
+ * Mounts written to AgentSpec.skills[] / AgentSpec.mcpServers[].
78
+ *
79
+ * These are opaque to the runtime — it stores and forwards them but never reads
80
+ * a field, and the backend owns the shape (the gateway identifies a skill by
81
+ * `fqn`, with no `id` or `name` anywhere). So the base constrains only that a
82
+ * mount is an object; hosts intersect their concrete mount type over it, as
83
+ * `TfySkillMount` / `TfyMcpServerMount` do in the gateway adapter.
84
+ *
85
+ * Naming a field here would not just be unread, it would be wrong: a base with
86
+ * required fields rejects the backend's own payloads, and one with only optional
87
+ * fields is a weak type, which TypeScript rejects for a source that shares no
88
+ * property with it — the gateway's registry skill shares none.
89
+ */
90
90
  export type SkillMount = object;
91
91
 
92
92
  export type McpServerMount = object;
@@ -116,10 +116,10 @@ export interface AgentRuntimeConfig {
116
116
  }
117
117
 
118
118
  /**
119
- * SDK-owned agent definition — fields the FE reads/writes.
120
- * Host widens `model` / `skills` / `mcpServers` / `config` via type params,
121
- * and adds extra fields via `TSpec extends AgentSpec<...>`.
122
- */
119
+ * SDK-owned agent definition — fields the FE reads/writes.
120
+ * Host widens `model` / `skills` / `mcpServers` / `config` via type params,
121
+ * and adds extra fields via `TSpec extends AgentSpec<...>`.
122
+ */
123
123
  export interface AgentSpec<
124
124
  TModel extends Model = Model,
125
125
  TSkill extends SkillMount = SkillMount,
@@ -193,7 +193,10 @@ export type PreviousTurnIdInput = "auto" | "none" | string;
193
193
 
194
194
  export type UserMessageContent =
195
195
  | string
196
- | Array<{ type: "text"; text: string } | { type: "file"; name: string; data: string }>;
196
+ | Array<
197
+ | { type: "text"; text: string }
198
+ | { type: "file"; name: string; data: string }
199
+ >;
197
200
 
198
201
  export interface UserMessage {
199
202
  type: "user.message";
@@ -265,11 +268,11 @@ export interface Turn {
265
268
  // ---------------------------------------------------------------------------
266
269
 
267
270
  /**
268
- * Chat / session port — the runtime calls these.
269
- *
270
- * All session ops are flat (sessionId param). No gateway client dependency.
271
- * `createTrueFoundryServer` is one possible implementation (TFY adapter).
272
- */
271
+ * Chat / session port — the runtime calls these.
272
+ *
273
+ * All session ops are flat (sessionId param). No gateway client dependency.
274
+ * `createTrueFoundryServer` is one possible implementation (TFY adapter).
275
+ */
273
276
  export interface AgentChatServer<
274
277
  TSpec extends AgentSpec = AgentSpec,
275
278
  TSession extends Session<TSpec> = Session<TSpec>,
@@ -284,44 +287,44 @@ export interface AgentChatServer<
284
287
  updateSession(req: TUpdate): Promise<TSession>;
285
288
 
286
289
  createTurn(req: {
287
- sessionId: string;
288
- input?: TurnInputItem[];
289
- previousTurnId?: PreviousTurnIdInput;
290
- abortSignal?: AbortSignal;
291
- headers?: Record<string, string>;
290
+ sessionId: string;
291
+ input?: TurnInputItem[];
292
+ previousTurnId?: PreviousTurnIdInput;
293
+ abortSignal?: AbortSignal;
294
+ headers?: Record<string, string>;
292
295
  }): AsyncIterable<TurnStreamData>;
293
296
 
294
297
  cancelSession(req: { sessionId: string }): Promise<void>;
295
298
  deleteSession?(req: { sessionId: string }): Promise<void>;
296
299
 
297
300
  listTurns(req: {
298
- sessionId: string;
299
- limit?: number;
300
- pageToken?: string;
301
- order?: ListSessionsOrder;
301
+ sessionId: string;
302
+ limit?: number;
303
+ pageToken?: string;
304
+ order?: ListSessionsOrder;
302
305
  }): Promise<ListResult<TTurn>>;
303
306
  getTurn(req: { sessionId: string; turnId: string }): Promise<TTurn>;
304
307
  listEvents(req: {
305
- sessionId: string;
306
- pageToken?: string;
307
- lastTurnId?: string;
308
- limit?: number;
308
+ sessionId: string;
309
+ pageToken?: string;
310
+ lastTurnId?: string;
311
+ limit?: number;
309
312
  }): Promise<ListResult<SessionEventItem>>;
310
313
 
311
314
  /** Optional per-turn event listing (hydrate in-flight turn content). */
312
315
  listTurnEvents?(req: {
313
- sessionId: string;
314
- turnId: string;
315
- limit?: number;
316
- pageToken?: string;
317
- order?: ListSessionsOrder;
316
+ sessionId: string;
317
+ turnId: string;
318
+ limit?: number;
319
+ pageToken?: string;
320
+ order?: ListSessionsOrder;
318
321
  }): Promise<ListResult<TurnEvent>>;
319
322
 
320
323
  subscribeToTurn?(req: {
321
- sessionId: string;
322
- turnId: string;
323
- afterSequenceNumber?: number;
324
- abortSignal?: AbortSignal;
324
+ sessionId: string;
325
+ turnId: string;
326
+ afterSequenceNumber?: number;
327
+ abortSignal?: AbortSignal;
325
328
  }): AsyncIterable<TurnStreamData>;
326
329
 
327
330
  /**
@@ -330,10 +333,10 @@ export interface AgentChatServer<
330
333
  * directly use `sandboxId`.
331
334
  */
332
335
  downloadSandboxFile?(req: {
333
- sessionId: string;
334
- turnId: string;
335
- sandboxId: string;
336
- path: string;
336
+ sessionId: string;
337
+ turnId: string;
338
+ sandboxId: string;
339
+ path: string;
337
340
  }): Promise<Blob>;
338
341
  }
339
342
 
@@ -365,9 +368,9 @@ export interface AgentBuilderCapabilitiesResponse {
365
368
  }
366
369
 
367
370
  /**
368
- * Builder catalog + persist port — atoms call these.
369
- * Passed separately from the runtime's chat server.
370
- */
371
+ * Builder catalog + persist port — atoms call these.
372
+ * Passed separately from the runtime's chat server.
373
+ */
371
374
  export interface AgentBuilderServer<
372
375
  TSpec extends AgentSpec = AgentSpec,
373
376
  TModel extends ModelSelectorEntry = ModelSelectorEntry,
@@ -375,7 +378,8 @@ export interface AgentBuilderServer<
375
378
  TMcp extends ConnectorSelectorEntry = ConnectorSelectorEntry,
376
379
  TAgent extends AgentSelectorEntry = AgentSelectorEntry,
377
380
  TSave = SaveAgentResult,
378
- TCapabilities extends AgentBuilderCapabilitiesResponse = AgentBuilderCapabilitiesResponse,
381
+ TCapabilities extends AgentBuilderCapabilitiesResponse =
382
+ AgentBuilderCapabilitiesResponse,
379
383
  > {
380
384
  getCapabilities(): Promise<TCapabilities>;
381
385
  getModels(): Promise<TModel[]>;
@@ -391,28 +395,30 @@ export interface AgentBuilderServer<
391
395
  // ---------------------------------------------------------------------------
392
396
 
393
397
  /**
394
- * Provider type id. Reserved literal: `"custom"` for user-defined providers;
395
- * any other string is a builtin (e.g. `"openai"`, `"anthropic"`).
396
- *
397
- * Note: `string | "custom"` is useless in TypeScript (`"custom"` ⊆ `string`),
398
- * so this stays `string` and `"custom"` is a documented convention.
399
- */
398
+ * Provider type id. Reserved literal: `"custom"` for user-defined providers;
399
+ * any other string is a builtin (e.g. `"openai"`, `"anthropic"`).
400
+ *
401
+ * Note: `string | "custom"` is useless in TypeScript (`"custom"` ⊆ `string`),
402
+ * so this stays `string` and `"custom"` is a documented convention.
403
+ */
400
404
  export type ProviderType = string;
401
405
 
402
406
  /**
403
- * Model row — form "Model ID" + "Display name".
404
- * Host extends for properties, etc.
405
- */
407
+ * Model row — form "Model ID" + "Display name".
408
+ * Host extends for properties, etc.
409
+ */
406
410
  export interface ModelEntry {
407
411
  id: string;
408
412
  name: string;
409
413
  }
410
414
 
411
415
  /**
412
- * Write config for create/update (custom form + catalog "Save key").
413
- * Host extends. `baseUrl` present iff `type === "custom"`.
414
- */
415
- export interface ModelProviderConfigBase<TModel extends ModelEntry = ModelEntry> {
416
+ * Write config for create/update (custom form + catalog "Save key").
417
+ * Host extends. `baseUrl` present iff `type === "custom"`.
418
+ */
419
+ export interface ModelProviderConfigBase<
420
+ TModel extends ModelEntry = ModelEntry,
421
+ > {
416
422
  type: ProviderType;
417
423
  name: string;
418
424
  /** Present iff `type === "custom"`. */
@@ -422,9 +428,9 @@ export interface ModelProviderConfigBase<TModel extends ModelEntry = ModelEntry>
422
428
  }
423
429
 
424
430
  /**
425
- * Configured provider card (list/read). No raw `apiKey`.
426
- * Host extends for apiKeySet, timestamps, etc.
427
- */
431
+ * Configured provider card (list/read). No raw `apiKey`.
432
+ * Host extends for apiKeySet, timestamps, etc.
433
+ */
428
434
  export interface ModelProviderBase<TModel extends ModelEntry = ModelEntry> {
429
435
  id: string;
430
436
  type: ProviderType;
@@ -435,11 +441,13 @@ export interface ModelProviderBase<TModel extends ModelEntry = ModelEntry> {
435
441
  }
436
442
 
437
443
  /**
438
- * Discovery-only catalog provider (AVAILABLE list).
439
- * `type` must not be `"custom"` — custom providers use the custom form.
440
- * Host extends for richer model rows.
441
- */
442
- export interface ModelProviderCatalogEntry<TModel extends ModelEntry = ModelEntry> {
444
+ * Discovery-only catalog provider (AVAILABLE list).
445
+ * `type` must not be `"custom"` — custom providers use the custom form.
446
+ * Host extends for richer model rows.
447
+ */
448
+ export interface ModelProviderCatalogEntry<
449
+ TModel extends ModelEntry = ModelEntry,
450
+ > {
443
451
  type: ProviderType;
444
452
  name: string;
445
453
  models: TModel[];
@@ -458,9 +466,12 @@ export type UpdateModelProviderRequest<TModel extends ModelEntry = ModelEntry> =
458
466
  export interface ModelCatalogServer<
459
467
  TModel extends ModelEntry = ModelEntry,
460
468
  TProvider extends ModelProviderBase<TModel> = ModelProviderBase<TModel>,
461
- TCatalogProvider extends ModelProviderCatalogEntry<TModel> = ModelProviderCatalogEntry<TModel>,
462
- TCreate extends CreateModelProviderRequest<TModel> = CreateModelProviderRequest<TModel>,
463
- TUpdate extends UpdateModelProviderRequest<TModel> = UpdateModelProviderRequest<TModel>,
469
+ TCatalogProvider extends ModelProviderCatalogEntry<TModel> =
470
+ ModelProviderCatalogEntry<TModel>,
471
+ TCreate extends CreateModelProviderRequest<TModel> =
472
+ CreateModelProviderRequest<TModel>,
473
+ TUpdate extends UpdateModelProviderRequest<TModel> =
474
+ UpdateModelProviderRequest<TModel>,
464
475
  > {
465
476
  getModelProviderCatalog(): Promise<TCatalogProvider[]>;
466
477
  listModelProviders(): Promise<TProvider[]>;
@@ -506,8 +517,8 @@ export type ConnectorAuthPublic =
506
517
  | ConnectorAuthPublicNone;
507
518
 
508
519
  /**
509
- * MCP / connector create-edit config. Host extends for extra fields, etc.
510
- */
520
+ * MCP / connector create-edit config. Host extends for extra fields, etc.
521
+ */
511
522
  export interface ConnectorConfigBase<
512
523
  TAuth extends ConnectorAuth = ConnectorAuth,
513
524
  > {
@@ -547,12 +558,14 @@ export interface ConnectorCatalogEntry<
547
558
  }
548
559
 
549
560
  /** Create connector — no `id`; server assigns it. Host extends. */
550
- export type CreateConnectorRequest<TAuth extends ConnectorAuth = ConnectorAuth> =
551
- ConnectorConfigBase<TAuth>;
561
+ export type CreateConnectorRequest<
562
+ TAuth extends ConnectorAuth = ConnectorAuth,
563
+ > = ConnectorConfigBase<TAuth>;
552
564
 
553
565
  /** Update connector — `id` required. Host extends. */
554
- export type UpdateConnectorRequest<TAuth extends ConnectorAuth = ConnectorAuth> =
555
- ConnectorConfigBase<TAuth> & { id: string };
566
+ export type UpdateConnectorRequest<
567
+ TAuth extends ConnectorAuth = ConnectorAuth,
568
+ > = ConnectorConfigBase<TAuth> & { id: string };
556
569
 
557
570
  export interface AuthenticateConnectorRequest {
558
571
  id: string;
@@ -664,7 +677,6 @@ export interface SkillCatalogServer<
664
677
 
665
678
  /** Mutable sandbox provider settings shared by catalog rows, create, and update. */
666
679
  export interface SandboxConfig {
667
- snapshotName: string;
668
680
  execTimeoutMs: number;
669
681
  autoStopIntervalInMinutes: number;
670
682
  autoArchiveIntervalInMinutes: number;
@@ -688,6 +700,18 @@ export interface SandboxBase extends SandboxConfig {
688
700
  isConnected: boolean;
689
701
  }
690
702
 
703
+ export type SandboxSnapshotSyncStatus = {
704
+ status: "pending" | "ready" | "failed";
705
+ statusReason?: string | null;
706
+ };
707
+
708
+ export interface SandboxProviderListEntry<
709
+ TSandbox extends SandboxBase = SandboxBase,
710
+ > {
711
+ data: TSandbox;
712
+ snapshotSyncStatus: SandboxSnapshotSyncStatus;
713
+ }
714
+
691
715
  export interface CreateSandboxRequest extends SandboxConfig {
692
716
  /** `SandboxCatalogEntry.id` used to create this sandbox provider. */
693
717
  catalogId: string;
@@ -714,9 +738,11 @@ export interface SandboxCatalogServer<
714
738
  TCatalogEntry extends SandboxCatalogEntry = SandboxCatalogEntry,
715
739
  TCreate extends CreateSandboxRequest = CreateSandboxRequest,
716
740
  TUpdate extends UpdateSandboxRequest = UpdateSandboxRequest,
741
+ TListEntry extends SandboxProviderListEntry<TProvider> =
742
+ SandboxProviderListEntry<TProvider>,
717
743
  > {
718
744
  getSandboxProviderCatalog(): Promise<TCatalogEntry[]>;
719
- listSandboxProviders(req?: { query?: string }): Promise<TProvider[]>;
745
+ listSandboxProviders(req?: { query?: string }): Promise<TListEntry[]>;
720
746
  createSandboxProvider(req: TCreate): Promise<TProvider>;
721
747
  updateSandboxProvider(req: TUpdate): Promise<TProvider>;
722
748
  deleteSandboxProvider?(req: { id: string }): Promise<void>;
@@ -730,10 +756,10 @@ export type AgentLibraryEntry = AgentSelectorEntry;
730
756
  export type SearchAgentsParams = SearchAgentSelectorParams;
731
757
 
732
758
  /**
733
- * Settings management aggregate — modelCatalog + connectorCatalog + optional
734
- * skill and sandbox catalogs.
735
- * Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
736
- */
759
+ * Settings management aggregate — modelCatalog + connectorCatalog + optional
760
+ * skill and sandbox catalogs.
761
+ * Hosts may pass the whole object to an app shell, or a focused sub-port to a page.
762
+ */
737
763
  export interface CatalogServer<
738
764
  TModelCatalog extends ModelCatalogServer = ModelCatalogServer,
739
765
  TConnectorCatalog extends ConnectorCatalogServer = ConnectorCatalogServer,