@agent-commons/sdk 0.5.0 → 0.6.0

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.mts CHANGED
@@ -327,6 +327,22 @@ interface CreateAgentParams {
327
327
  runtimeVersion?: string;
328
328
  runtimeConfig?: AgentRuntimeConfig;
329
329
  }
330
+ interface GenerateImageParams {
331
+ prompt: string;
332
+ n?: number;
333
+ size?: "1024x1024" | "1024x1536" | "1536x1024" | "auto";
334
+ quality?: "low" | "medium" | "high" | "auto";
335
+ sessionId?: string;
336
+ /** Stable caller-provided identifier used to make capability billing idempotent. */
337
+ operationId?: string;
338
+ }
339
+ interface GeneratedImageAsset {
340
+ fileId: string;
341
+ name: string;
342
+ url?: string;
343
+ prompt: string;
344
+ model: string;
345
+ }
330
346
  interface Session {
331
347
  sessionId: string;
332
348
  agentId: string;
@@ -748,6 +764,19 @@ interface Skill {
748
764
  sourceUrl?: string | null;
749
765
  createdAt: string;
750
766
  updatedAt: string;
767
+ assignedAgents?: SkillAgentAssignment[];
768
+ }
769
+ interface SkillAgentAssignment {
770
+ assignmentId: string;
771
+ agentId: string;
772
+ agentName: string;
773
+ agentAvatar?: string | null;
774
+ isDefault: boolean;
775
+ isEnabled: boolean;
776
+ }
777
+ interface AgentSkill extends Skill {
778
+ assignmentId?: string | null;
779
+ assigned: boolean;
751
780
  }
752
781
  interface SkillIndex {
753
782
  skillId: string;
@@ -773,6 +802,71 @@ interface CreateSkillParams {
773
802
  source?: string;
774
803
  sourceUrl?: string;
775
804
  }
805
+ type CapabilityName = "web_search" | "computer" | "wallet";
806
+ interface CapabilityProviderDefinition {
807
+ id: string;
808
+ name: string;
809
+ credentialFields: string[];
810
+ endpoint?: boolean;
811
+ }
812
+ interface CapabilityProviderConfiguration {
813
+ id: string;
814
+ capability: CapabilityName;
815
+ provider: string;
816
+ displayName?: string | null;
817
+ endpointUrl?: string | null;
818
+ settings: Record<string, unknown>;
819
+ status: "active" | "disabled";
820
+ hasCredentials: boolean;
821
+ updatedAt: string;
822
+ }
823
+ interface CapabilityProviderInput {
824
+ provider: string;
825
+ displayName?: string;
826
+ endpointUrl?: string;
827
+ settings?: Record<string, unknown>;
828
+ credentials?: Record<string, string>;
829
+ status?: "active" | "disabled";
830
+ }
831
+ type UiPluginPermission = "theme.read" | "navigation";
832
+ interface UiPluginSurface {
833
+ type: "page" | "widget";
834
+ title?: string;
835
+ width?: number;
836
+ height?: number;
837
+ }
838
+ interface UiPlugin {
839
+ pluginId: string;
840
+ ownerUserId: string;
841
+ workspaceId?: string | null;
842
+ createdByAgentId?: string | null;
843
+ codeProjectId: string;
844
+ name: string;
845
+ slug: string;
846
+ description?: string | null;
847
+ version: string;
848
+ entryUrl: string;
849
+ manifest: {
850
+ schemaVersion: "1";
851
+ surfaces: UiPluginSurface[];
852
+ permissions: UiPluginPermission[];
853
+ };
854
+ status: "draft" | "active" | "disabled";
855
+ createdAt: string;
856
+ updatedAt: string;
857
+ }
858
+ interface CreateUiPluginParams {
859
+ name: string;
860
+ slug?: string;
861
+ description?: string;
862
+ version?: string;
863
+ codeProjectId: string;
864
+ manifest: {
865
+ schemaVersion?: "1";
866
+ surfaces: UiPluginSurface[];
867
+ permissions?: UiPluginPermission[];
868
+ };
869
+ }
776
870
  type MemoryType = "episodic" | "semantic" | "procedural";
777
871
  type MemorySourceType = "auto" | "manual";
778
872
  interface AgentMemory {
@@ -1016,13 +1110,39 @@ interface FileArtifact {
1016
1110
  createdAt?: string;
1017
1111
  [key: string]: unknown;
1018
1112
  }
1113
+ interface FileContentDownload {
1114
+ itemId?: string;
1115
+ name?: string;
1116
+ mimeType?: string;
1117
+ url?: string;
1118
+ [key: string]: unknown;
1119
+ }
1120
+ interface FileContentArtifact {
1121
+ artifactId?: string;
1122
+ kind?: string;
1123
+ mimeType?: string;
1124
+ pageNumber?: number | null;
1125
+ width?: number | null;
1126
+ height?: number | null;
1127
+ url?: string;
1128
+ [key: string]: unknown;
1129
+ }
1019
1130
  interface FileContent {
1020
1131
  fileId?: string;
1132
+ name?: string;
1021
1133
  content?: string;
1022
1134
  mimeType?: string;
1135
+ kind?: string;
1136
+ status?: string;
1023
1137
  offset?: number;
1024
1138
  nextOffset?: number | null;
1139
+ totalChars?: number;
1025
1140
  truncated?: boolean;
1141
+ textPreview?: string | null;
1142
+ metadata?: Record<string, unknown>;
1143
+ download?: FileContentDownload;
1144
+ artifacts?: FileContentArtifact[];
1145
+ /** Convenience aliases returned alongside the structured fields. */
1026
1146
  imageUrls?: string[];
1027
1147
  downloadUrl?: string;
1028
1148
  [key: string]: unknown;
@@ -1128,7 +1248,9 @@ interface OAuthConnection {
1128
1248
  providerUserName?: string | null;
1129
1249
  scopes: string[];
1130
1250
  status: string;
1251
+ canRefresh?: boolean;
1131
1252
  lastUsedAt?: string | null;
1253
+ accessTokenExpiresAt?: string | null;
1132
1254
  expiresAt?: string | null;
1133
1255
  metadata?: Record<string, unknown> | null;
1134
1256
  [key: string]: unknown;
@@ -1164,6 +1286,8 @@ interface AgentWallet {
1164
1286
  label?: string | null;
1165
1287
  isActive: boolean;
1166
1288
  createdAt: string;
1289
+ provider?: string | null;
1290
+ providerWalletId?: string | null;
1167
1291
  }
1168
1292
  interface WalletBalance {
1169
1293
  address: string;
@@ -1282,6 +1406,13 @@ declare class CommonsClient {
1282
1406
  update: (agentId: string, params: Partial<CreateAgentParams>) => Promise<{
1283
1407
  data: Agent;
1284
1408
  }>;
1409
+ /**
1410
+ * Generate durable image assets for this agent without routing a
1411
+ * deterministic image operation through an LLM tool-selection turn.
1412
+ */
1413
+ generateImage: (agentId: string, params: GenerateImageParams) => Promise<{
1414
+ data: GeneratedImageAsset[];
1415
+ }>;
1285
1416
  getRuntime: (agentId: string) => Promise<{
1286
1417
  data: AgentRuntime;
1287
1418
  }>;
@@ -1893,6 +2024,12 @@ declare class CommonsClient {
1893
2024
  getIndex: (ownerId?: string) => Promise<{
1894
2025
  data: SkillIndex[];
1895
2026
  }>;
2027
+ listForAgent: (agentId: string) => Promise<{
2028
+ data: AgentSkill[];
2029
+ }>;
2030
+ setAgentAvailability: (skillIdOrSlug: string, agentId: string, isEnabled: boolean) => Promise<{
2031
+ data: unknown;
2032
+ }>;
1896
2033
  create: (params: CreateSkillParams) => Promise<{
1897
2034
  data: Skill;
1898
2035
  }>;
@@ -1902,6 +2039,41 @@ declare class CommonsClient {
1902
2039
  delete: (skillIdOrSlug: string) => Promise<{
1903
2040
  deleted: boolean;
1904
2041
  }>;
2042
+ import: (file: Blob, options?: {
2043
+ fileName?: string;
2044
+ agentId?: string;
2045
+ }) => Promise<{
2046
+ data: Skill;
2047
+ }>;
2048
+ };
2049
+ get providers(): {
2050
+ list: () => Promise<{
2051
+ catalog: Record<CapabilityName, CapabilityProviderDefinition[]>;
2052
+ configurations: CapabilityProviderConfiguration[];
2053
+ }>;
2054
+ configure: (capability: CapabilityName, input: CapabilityProviderInput) => Promise<{
2055
+ data: CapabilityProviderConfiguration;
2056
+ }>;
2057
+ remove: (capability: CapabilityName) => Promise<{
2058
+ deleted: boolean;
2059
+ }>;
2060
+ };
2061
+ get uiPlugins(): {
2062
+ list: (activeOnly?: boolean) => Promise<{
2063
+ data: UiPlugin[];
2064
+ }>;
2065
+ getBySlug: (slug: string) => Promise<{
2066
+ data: UiPlugin;
2067
+ }>;
2068
+ create: (input: CreateUiPluginParams) => Promise<{
2069
+ data: UiPlugin;
2070
+ }>;
2071
+ setStatus: (pluginId: string, status: "draft" | "active" | "disabled") => Promise<{
2072
+ data: UiPlugin;
2073
+ }>;
2074
+ delete: (pluginId: string) => Promise<{
2075
+ deleted: boolean;
2076
+ }>;
1905
2077
  };
1906
2078
  get wallets(): {
1907
2079
  /** List all wallets for an agent. */
@@ -2209,6 +2381,7 @@ declare class CommonsClient {
2209
2381
  source?: string;
2210
2382
  favorite?: boolean;
2211
2383
  sessionId?: string;
2384
+ agentId?: string;
2212
2385
  limit?: number;
2213
2386
  offset?: number;
2214
2387
  }) => Promise<{
@@ -2584,4 +2757,4 @@ declare function listWorkflowTemplates(): readonly [{
2584
2757
  }];
2585
2758
  declare function buildWorkflowTemplate(templateName: WorkflowTemplateName, ctx: WorkflowTemplateContext): WorkflowTemplateBuild;
2586
2759
 
2587
- export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type ActivityEvent, type Agent, type AgentCard, type AgentComputer, type AgentComputerBrowser, type AgentComputerConfig, type AgentComputerDesiredState, type AgentComputerEvent, type AgentComputerGpu, type AgentComputerGpuType, type AgentComputerInstance, type AgentComputerLifecycle, type AgentComputerResourceMode, type AgentComputerResourceProfile, type AgentComputerResources, type AgentComputerStatus, type AgentComputerTerminal, type AgentLog, type AgentMemory, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type BillingCatalog, type BillingInvoice, type BillingPaymentMethod, type ChatMessage, type CodeProject, type CodeProjectFile, CommonsClient, type CommonsClientConfig, CommonsError, type CommonsRequestOptions, type ComputeProfile, type ComputerActionParams, type ComputerBrowserOpenParams, type ComputerCommandParams, type ComputerConfigUpdate, type ComputerFile, type ComputerGpu, type ComputerGpuType, type ComputerLifecycle, type ComputerNetworkAccess, type ComputerPersistence, type ComputerResizeParams, type ComputerResourceMode, type ComputerResourceProfile, type ComputerResourceUpdate, type ComputerResources, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateWalletParams, type CreatedApiKey, type CreatedDeveloperApiKey, type CreditBalance, type CreditCampaign, type CreditDirection, type CreditLedgerEntry, type CreditPlatform, type CreditSummary, type CreditTransfer, type CreditWriteParams, type DeveloperApiKey, type DeveloperProject, type DeveloperProjectEnvironment, type FileArtifact, type FileContent, type FlagEvaluation, type Goal, type LibraryGrant, type LibraryItem, type LibraryShareLink, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type ModelTier, type OAuthConnection, type OAuthProvider, type OutputPresentation, type PlanEntitlements, type PlanKey, type RunParams, type Session, type Skill, type SkillIndex, type Space, type SpaceMember, type SpaceMessage, type StreamEvent, type StreamEventType, type SubscriptionInfo, type Task, type Tool, type ToolKey, type ToolPermission, type UpdateMemoryParams, type UploadFileInput, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, type WorkflowValue, type WorkflowValueKind, buildWorkflowTemplate, listWorkflowTemplates };
2760
+ export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type ActivityEvent, type Agent, type AgentCard, type AgentComputer, type AgentComputerBrowser, type AgentComputerConfig, type AgentComputerDesiredState, type AgentComputerEvent, type AgentComputerGpu, type AgentComputerGpuType, type AgentComputerInstance, type AgentComputerLifecycle, type AgentComputerResourceMode, type AgentComputerResourceProfile, type AgentComputerResources, type AgentComputerStatus, type AgentComputerTerminal, type AgentLog, type AgentMemory, type AgentSkill, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type BillingCatalog, type BillingInvoice, type BillingPaymentMethod, type CapabilityName, type CapabilityProviderConfiguration, type CapabilityProviderDefinition, type CapabilityProviderInput, type ChatMessage, type CodeProject, type CodeProjectFile, CommonsClient, type CommonsClientConfig, CommonsError, type CommonsRequestOptions, type ComputeProfile, type ComputerActionParams, type ComputerBrowserOpenParams, type ComputerCommandParams, type ComputerConfigUpdate, type ComputerFile, type ComputerGpu, type ComputerGpuType, type ComputerLifecycle, type ComputerNetworkAccess, type ComputerPersistence, type ComputerResizeParams, type ComputerResourceMode, type ComputerResourceProfile, type ComputerResourceUpdate, type ComputerResources, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateUiPluginParams, type CreateWalletParams, type CreatedApiKey, type CreatedDeveloperApiKey, type CreditBalance, type CreditCampaign, type CreditDirection, type CreditLedgerEntry, type CreditPlatform, type CreditSummary, type CreditTransfer, type CreditWriteParams, type DeveloperApiKey, type DeveloperProject, type DeveloperProjectEnvironment, type FileArtifact, type FileContent, type FileContentArtifact, type FileContentDownload, type FlagEvaluation, type GenerateImageParams, type GeneratedImageAsset, type Goal, type LibraryGrant, type LibraryItem, type LibraryShareLink, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type ModelTier, type OAuthConnection, type OAuthProvider, type OutputPresentation, type PlanEntitlements, type PlanKey, type RunParams, type Session, type Skill, type SkillAgentAssignment, type SkillIndex, type Space, type SpaceMember, type SpaceMessage, type StreamEvent, type StreamEventType, type SubscriptionInfo, type Task, type Tool, type ToolKey, type ToolPermission, type UiPlugin, type UiPluginPermission, type UiPluginSurface, type UpdateMemoryParams, type UploadFileInput, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, type WorkflowValue, type WorkflowValueKind, buildWorkflowTemplate, listWorkflowTemplates };
package/dist/index.d.ts CHANGED
@@ -327,6 +327,22 @@ interface CreateAgentParams {
327
327
  runtimeVersion?: string;
328
328
  runtimeConfig?: AgentRuntimeConfig;
329
329
  }
330
+ interface GenerateImageParams {
331
+ prompt: string;
332
+ n?: number;
333
+ size?: "1024x1024" | "1024x1536" | "1536x1024" | "auto";
334
+ quality?: "low" | "medium" | "high" | "auto";
335
+ sessionId?: string;
336
+ /** Stable caller-provided identifier used to make capability billing idempotent. */
337
+ operationId?: string;
338
+ }
339
+ interface GeneratedImageAsset {
340
+ fileId: string;
341
+ name: string;
342
+ url?: string;
343
+ prompt: string;
344
+ model: string;
345
+ }
330
346
  interface Session {
331
347
  sessionId: string;
332
348
  agentId: string;
@@ -748,6 +764,19 @@ interface Skill {
748
764
  sourceUrl?: string | null;
749
765
  createdAt: string;
750
766
  updatedAt: string;
767
+ assignedAgents?: SkillAgentAssignment[];
768
+ }
769
+ interface SkillAgentAssignment {
770
+ assignmentId: string;
771
+ agentId: string;
772
+ agentName: string;
773
+ agentAvatar?: string | null;
774
+ isDefault: boolean;
775
+ isEnabled: boolean;
776
+ }
777
+ interface AgentSkill extends Skill {
778
+ assignmentId?: string | null;
779
+ assigned: boolean;
751
780
  }
752
781
  interface SkillIndex {
753
782
  skillId: string;
@@ -773,6 +802,71 @@ interface CreateSkillParams {
773
802
  source?: string;
774
803
  sourceUrl?: string;
775
804
  }
805
+ type CapabilityName = "web_search" | "computer" | "wallet";
806
+ interface CapabilityProviderDefinition {
807
+ id: string;
808
+ name: string;
809
+ credentialFields: string[];
810
+ endpoint?: boolean;
811
+ }
812
+ interface CapabilityProviderConfiguration {
813
+ id: string;
814
+ capability: CapabilityName;
815
+ provider: string;
816
+ displayName?: string | null;
817
+ endpointUrl?: string | null;
818
+ settings: Record<string, unknown>;
819
+ status: "active" | "disabled";
820
+ hasCredentials: boolean;
821
+ updatedAt: string;
822
+ }
823
+ interface CapabilityProviderInput {
824
+ provider: string;
825
+ displayName?: string;
826
+ endpointUrl?: string;
827
+ settings?: Record<string, unknown>;
828
+ credentials?: Record<string, string>;
829
+ status?: "active" | "disabled";
830
+ }
831
+ type UiPluginPermission = "theme.read" | "navigation";
832
+ interface UiPluginSurface {
833
+ type: "page" | "widget";
834
+ title?: string;
835
+ width?: number;
836
+ height?: number;
837
+ }
838
+ interface UiPlugin {
839
+ pluginId: string;
840
+ ownerUserId: string;
841
+ workspaceId?: string | null;
842
+ createdByAgentId?: string | null;
843
+ codeProjectId: string;
844
+ name: string;
845
+ slug: string;
846
+ description?: string | null;
847
+ version: string;
848
+ entryUrl: string;
849
+ manifest: {
850
+ schemaVersion: "1";
851
+ surfaces: UiPluginSurface[];
852
+ permissions: UiPluginPermission[];
853
+ };
854
+ status: "draft" | "active" | "disabled";
855
+ createdAt: string;
856
+ updatedAt: string;
857
+ }
858
+ interface CreateUiPluginParams {
859
+ name: string;
860
+ slug?: string;
861
+ description?: string;
862
+ version?: string;
863
+ codeProjectId: string;
864
+ manifest: {
865
+ schemaVersion?: "1";
866
+ surfaces: UiPluginSurface[];
867
+ permissions?: UiPluginPermission[];
868
+ };
869
+ }
776
870
  type MemoryType = "episodic" | "semantic" | "procedural";
777
871
  type MemorySourceType = "auto" | "manual";
778
872
  interface AgentMemory {
@@ -1016,13 +1110,39 @@ interface FileArtifact {
1016
1110
  createdAt?: string;
1017
1111
  [key: string]: unknown;
1018
1112
  }
1113
+ interface FileContentDownload {
1114
+ itemId?: string;
1115
+ name?: string;
1116
+ mimeType?: string;
1117
+ url?: string;
1118
+ [key: string]: unknown;
1119
+ }
1120
+ interface FileContentArtifact {
1121
+ artifactId?: string;
1122
+ kind?: string;
1123
+ mimeType?: string;
1124
+ pageNumber?: number | null;
1125
+ width?: number | null;
1126
+ height?: number | null;
1127
+ url?: string;
1128
+ [key: string]: unknown;
1129
+ }
1019
1130
  interface FileContent {
1020
1131
  fileId?: string;
1132
+ name?: string;
1021
1133
  content?: string;
1022
1134
  mimeType?: string;
1135
+ kind?: string;
1136
+ status?: string;
1023
1137
  offset?: number;
1024
1138
  nextOffset?: number | null;
1139
+ totalChars?: number;
1025
1140
  truncated?: boolean;
1141
+ textPreview?: string | null;
1142
+ metadata?: Record<string, unknown>;
1143
+ download?: FileContentDownload;
1144
+ artifacts?: FileContentArtifact[];
1145
+ /** Convenience aliases returned alongside the structured fields. */
1026
1146
  imageUrls?: string[];
1027
1147
  downloadUrl?: string;
1028
1148
  [key: string]: unknown;
@@ -1128,7 +1248,9 @@ interface OAuthConnection {
1128
1248
  providerUserName?: string | null;
1129
1249
  scopes: string[];
1130
1250
  status: string;
1251
+ canRefresh?: boolean;
1131
1252
  lastUsedAt?: string | null;
1253
+ accessTokenExpiresAt?: string | null;
1132
1254
  expiresAt?: string | null;
1133
1255
  metadata?: Record<string, unknown> | null;
1134
1256
  [key: string]: unknown;
@@ -1164,6 +1286,8 @@ interface AgentWallet {
1164
1286
  label?: string | null;
1165
1287
  isActive: boolean;
1166
1288
  createdAt: string;
1289
+ provider?: string | null;
1290
+ providerWalletId?: string | null;
1167
1291
  }
1168
1292
  interface WalletBalance {
1169
1293
  address: string;
@@ -1282,6 +1406,13 @@ declare class CommonsClient {
1282
1406
  update: (agentId: string, params: Partial<CreateAgentParams>) => Promise<{
1283
1407
  data: Agent;
1284
1408
  }>;
1409
+ /**
1410
+ * Generate durable image assets for this agent without routing a
1411
+ * deterministic image operation through an LLM tool-selection turn.
1412
+ */
1413
+ generateImage: (agentId: string, params: GenerateImageParams) => Promise<{
1414
+ data: GeneratedImageAsset[];
1415
+ }>;
1285
1416
  getRuntime: (agentId: string) => Promise<{
1286
1417
  data: AgentRuntime;
1287
1418
  }>;
@@ -1893,6 +2024,12 @@ declare class CommonsClient {
1893
2024
  getIndex: (ownerId?: string) => Promise<{
1894
2025
  data: SkillIndex[];
1895
2026
  }>;
2027
+ listForAgent: (agentId: string) => Promise<{
2028
+ data: AgentSkill[];
2029
+ }>;
2030
+ setAgentAvailability: (skillIdOrSlug: string, agentId: string, isEnabled: boolean) => Promise<{
2031
+ data: unknown;
2032
+ }>;
1896
2033
  create: (params: CreateSkillParams) => Promise<{
1897
2034
  data: Skill;
1898
2035
  }>;
@@ -1902,6 +2039,41 @@ declare class CommonsClient {
1902
2039
  delete: (skillIdOrSlug: string) => Promise<{
1903
2040
  deleted: boolean;
1904
2041
  }>;
2042
+ import: (file: Blob, options?: {
2043
+ fileName?: string;
2044
+ agentId?: string;
2045
+ }) => Promise<{
2046
+ data: Skill;
2047
+ }>;
2048
+ };
2049
+ get providers(): {
2050
+ list: () => Promise<{
2051
+ catalog: Record<CapabilityName, CapabilityProviderDefinition[]>;
2052
+ configurations: CapabilityProviderConfiguration[];
2053
+ }>;
2054
+ configure: (capability: CapabilityName, input: CapabilityProviderInput) => Promise<{
2055
+ data: CapabilityProviderConfiguration;
2056
+ }>;
2057
+ remove: (capability: CapabilityName) => Promise<{
2058
+ deleted: boolean;
2059
+ }>;
2060
+ };
2061
+ get uiPlugins(): {
2062
+ list: (activeOnly?: boolean) => Promise<{
2063
+ data: UiPlugin[];
2064
+ }>;
2065
+ getBySlug: (slug: string) => Promise<{
2066
+ data: UiPlugin;
2067
+ }>;
2068
+ create: (input: CreateUiPluginParams) => Promise<{
2069
+ data: UiPlugin;
2070
+ }>;
2071
+ setStatus: (pluginId: string, status: "draft" | "active" | "disabled") => Promise<{
2072
+ data: UiPlugin;
2073
+ }>;
2074
+ delete: (pluginId: string) => Promise<{
2075
+ deleted: boolean;
2076
+ }>;
1905
2077
  };
1906
2078
  get wallets(): {
1907
2079
  /** List all wallets for an agent. */
@@ -2209,6 +2381,7 @@ declare class CommonsClient {
2209
2381
  source?: string;
2210
2382
  favorite?: boolean;
2211
2383
  sessionId?: string;
2384
+ agentId?: string;
2212
2385
  limit?: number;
2213
2386
  offset?: number;
2214
2387
  }) => Promise<{
@@ -2584,4 +2757,4 @@ declare function listWorkflowTemplates(): readonly [{
2584
2757
  }];
2585
2758
  declare function buildWorkflowTemplate(templateName: WorkflowTemplateName, ctx: WorkflowTemplateContext): WorkflowTemplateBuild;
2586
2759
 
2587
- export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type ActivityEvent, type Agent, type AgentCard, type AgentComputer, type AgentComputerBrowser, type AgentComputerConfig, type AgentComputerDesiredState, type AgentComputerEvent, type AgentComputerGpu, type AgentComputerGpuType, type AgentComputerInstance, type AgentComputerLifecycle, type AgentComputerResourceMode, type AgentComputerResourceProfile, type AgentComputerResources, type AgentComputerStatus, type AgentComputerTerminal, type AgentLog, type AgentMemory, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type BillingCatalog, type BillingInvoice, type BillingPaymentMethod, type ChatMessage, type CodeProject, type CodeProjectFile, CommonsClient, type CommonsClientConfig, CommonsError, type CommonsRequestOptions, type ComputeProfile, type ComputerActionParams, type ComputerBrowserOpenParams, type ComputerCommandParams, type ComputerConfigUpdate, type ComputerFile, type ComputerGpu, type ComputerGpuType, type ComputerLifecycle, type ComputerNetworkAccess, type ComputerPersistence, type ComputerResizeParams, type ComputerResourceMode, type ComputerResourceProfile, type ComputerResourceUpdate, type ComputerResources, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateWalletParams, type CreatedApiKey, type CreatedDeveloperApiKey, type CreditBalance, type CreditCampaign, type CreditDirection, type CreditLedgerEntry, type CreditPlatform, type CreditSummary, type CreditTransfer, type CreditWriteParams, type DeveloperApiKey, type DeveloperProject, type DeveloperProjectEnvironment, type FileArtifact, type FileContent, type FlagEvaluation, type Goal, type LibraryGrant, type LibraryItem, type LibraryShareLink, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type ModelTier, type OAuthConnection, type OAuthProvider, type OutputPresentation, type PlanEntitlements, type PlanKey, type RunParams, type Session, type Skill, type SkillIndex, type Space, type SpaceMember, type SpaceMessage, type StreamEvent, type StreamEventType, type SubscriptionInfo, type Task, type Tool, type ToolKey, type ToolPermission, type UpdateMemoryParams, type UploadFileInput, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, type WorkflowValue, type WorkflowValueKind, buildWorkflowTemplate, listWorkflowTemplates };
2760
+ export { type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AMessage, type A2AMessagePart, type A2ASendTaskParams, type A2ASkill, type A2ATask, type A2ATaskState, type A2ATextPart, type ActivityEvent, type Agent, type AgentCard, type AgentComputer, type AgentComputerBrowser, type AgentComputerConfig, type AgentComputerDesiredState, type AgentComputerEvent, type AgentComputerGpu, type AgentComputerGpuType, type AgentComputerInstance, type AgentComputerLifecycle, type AgentComputerResourceMode, type AgentComputerResourceProfile, type AgentComputerResources, type AgentComputerStatus, type AgentComputerTerminal, type AgentLog, type AgentMemory, type AgentSkill, type AgentWallet, type ApiKey, type ApiKeyPrincipalType, type BillingCatalog, type BillingInvoice, type BillingPaymentMethod, type CapabilityName, type CapabilityProviderConfiguration, type CapabilityProviderDefinition, type CapabilityProviderInput, type ChatMessage, type CodeProject, type CodeProjectFile, CommonsClient, type CommonsClientConfig, CommonsError, type CommonsRequestOptions, type ComputeProfile, type ComputerActionParams, type ComputerBrowserOpenParams, type ComputerCommandParams, type ComputerConfigUpdate, type ComputerFile, type ComputerGpu, type ComputerGpuType, type ComputerLifecycle, type ComputerNetworkAccess, type ComputerPersistence, type ComputerResizeParams, type ComputerResourceMode, type ComputerResourceProfile, type ComputerResourceUpdate, type ComputerResources, type CreateAgentParams, type CreateApiKeyParams, type CreateMemoryParams, type CreateSkillParams, type CreateTaskParams, type CreateToolKeyParams, type CreateToolParams, type CreateUiPluginParams, type CreateWalletParams, type CreatedApiKey, type CreatedDeveloperApiKey, type CreditBalance, type CreditCampaign, type CreditDirection, type CreditLedgerEntry, type CreditPlatform, type CreditSummary, type CreditTransfer, type CreditWriteParams, type DeveloperApiKey, type DeveloperProject, type DeveloperProjectEnvironment, type FileArtifact, type FileContent, type FileContentArtifact, type FileContentDownload, type FlagEvaluation, type GenerateImageParams, type GeneratedImageAsset, type Goal, type LibraryGrant, type LibraryItem, type LibraryShareLink, type McpConnectionType, type McpPrompt, type McpResource, type McpServer, type MemorySourceType, type MemoryStats, type MemoryType, type ModelConfig, type ModelProvider, type ModelTier, type OAuthConnection, type OAuthProvider, type OutputPresentation, type PlanEntitlements, type PlanKey, type RunParams, type Session, type Skill, type SkillAgentAssignment, type SkillIndex, type Space, type SpaceMember, type SpaceMessage, type StreamEvent, type StreamEventType, type SubscriptionInfo, type Task, type Tool, type ToolKey, type ToolPermission, type UiPlugin, type UiPluginPermission, type UiPluginSurface, type UpdateMemoryParams, type UploadFileInput, type UsageAggregation, type UsageEvent, type WalletBalance, type WalletType, type Workflow, type WorkflowDefinition, type WorkflowEdge, type WorkflowExecution, type WorkflowNode, type WorkflowNodeType, type WorkflowTemplateBuild, type WorkflowTemplateContext, type WorkflowTemplateName, type WorkflowTemplateTool, type WorkflowValue, type WorkflowValueKind, buildWorkflowTemplate, listWorkflowTemplates };
package/dist/index.mjs CHANGED
@@ -104,6 +104,15 @@ var CommonsClient = class {
104
104
  list: (owner) => this.request("GET", `/v1/agents${owner ? `?owner=${owner}` : ""}`),
105
105
  get: (agentId) => this.request("GET", `/v1/agents/${agentId}`),
106
106
  update: (agentId, params) => this.request("PUT", `/v1/agents/${agentId}`, params),
107
+ /**
108
+ * Generate durable image assets for this agent without routing a
109
+ * deterministic image operation through an LLM tool-selection turn.
110
+ */
111
+ generateImage: (agentId, params) => this.request(
112
+ "POST",
113
+ `/v1/agents/${encodeURIComponent(agentId)}/assets/images`,
114
+ params
115
+ ),
107
116
  getRuntime: (agentId) => this.request("GET", `/v1/agents/${agentId}/runtime`),
108
117
  configureRuntime: (agentId, params) => this.request("PUT", `/v1/agents/${agentId}/runtime`, params),
109
118
  deployRuntime: (agentId) => this.request("POST", `/v1/agents/${agentId}/runtime/deploy`),
@@ -595,14 +604,71 @@ var CommonsClient = class {
595
604
  const qs = params.toString();
596
605
  return this.request("GET", `/v1/skills${qs ? `?${qs}` : ""}`);
597
606
  },
598
- get: (skillIdOrSlug) => this.request("GET", `/v1/skills/${skillIdOrSlug}`),
607
+ get: (skillIdOrSlug) => this.request("GET", `/v1/skills/${encodeURIComponent(skillIdOrSlug)}`),
599
608
  getIndex: (ownerId) => {
600
609
  const qs = ownerId ? `?ownerId=${ownerId}` : "";
601
610
  return this.request("GET", `/v1/skills/index${qs}`);
602
611
  },
612
+ listForAgent: (agentId) => this.request("GET", `/v1/skills/agents/${encodeURIComponent(agentId)}`),
613
+ setAgentAvailability: (skillIdOrSlug, agentId, isEnabled) => this.request(
614
+ "PUT",
615
+ `/v1/skills/${encodeURIComponent(skillIdOrSlug)}/agents/${encodeURIComponent(agentId)}`,
616
+ { isEnabled }
617
+ ),
603
618
  create: (params) => this.request("POST", "/v1/skills", params),
604
- update: (skillIdOrSlug, updates) => this.request("PUT", `/v1/skills/${skillIdOrSlug}`, updates),
605
- delete: (skillIdOrSlug) => this.request("DELETE", `/v1/skills/${skillIdOrSlug}`)
619
+ update: (skillIdOrSlug, updates) => this.request(
620
+ "PUT",
621
+ `/v1/skills/${encodeURIComponent(skillIdOrSlug)}`,
622
+ updates
623
+ ),
624
+ delete: (skillIdOrSlug) => this.request(
625
+ "DELETE",
626
+ `/v1/skills/${encodeURIComponent(skillIdOrSlug)}`
627
+ ),
628
+ import: (file, options) => {
629
+ const body = new FormData();
630
+ body.append("file", file, options?.fileName || "SKILL.md");
631
+ if (options?.agentId) body.set("agentId", options.agentId);
632
+ return this.request("POST", "/v1/skills/import", body);
633
+ }
634
+ };
635
+ }
636
+ // ── Capability providers ─────────────────────────────────────────────────
637
+ get providers() {
638
+ return {
639
+ list: () => this.request("GET", "/v1/providers"),
640
+ configure: (capability, input) => this.request(
641
+ "PUT",
642
+ `/v1/providers/${encodeURIComponent(capability)}`,
643
+ input
644
+ ),
645
+ remove: (capability) => this.request(
646
+ "DELETE",
647
+ `/v1/providers/${encodeURIComponent(capability)}`
648
+ )
649
+ };
650
+ }
651
+ // ── Sandboxed UI plugins ─────────────────────────────────────────────────
652
+ get uiPlugins() {
653
+ return {
654
+ list: (activeOnly = false) => this.request(
655
+ "GET",
656
+ `/v1/ui-plugins${activeOnly ? "?active=true" : ""}`
657
+ ),
658
+ getBySlug: (slug) => this.request(
659
+ "GET",
660
+ `/v1/ui-plugins/slug/${encodeURIComponent(slug)}`
661
+ ),
662
+ create: (input) => this.request("PUT", "/v1/ui-plugins", input),
663
+ setStatus: (pluginId, status) => this.request(
664
+ "PUT",
665
+ `/v1/ui-plugins/${encodeURIComponent(pluginId)}/status`,
666
+ { status }
667
+ ),
668
+ delete: (pluginId) => this.request(
669
+ "DELETE",
670
+ `/v1/ui-plugins/${encodeURIComponent(pluginId)}`
671
+ )
606
672
  };
607
673
  }
608
674
  // ── Wallets ───────────────────────────────────────────────────────────────
@@ -980,6 +1046,7 @@ var CommonsClient = class {
980
1046
  if (filter?.favorite !== void 0)
981
1047
  query.set("favorite", String(filter.favorite));
982
1048
  if (filter?.sessionId) query.set("sessionId", filter.sessionId);
1049
+ if (filter?.agentId) query.set("agentId", filter.agentId);
983
1050
  if (filter?.limit !== void 0)
984
1051
  query.set("limit", String(filter.limit));
985
1052
  if (filter?.offset !== void 0)