@xpert-ai/contracts 3.10.1 → 3.11.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/index.cjs.js CHANGED
@@ -2242,7 +2242,10 @@ exports.WorkflowNodeTypeEnum = void 0;
2242
2242
  WorkflowNodeTypeEnum["HTTP"] = "http";
2243
2243
  WorkflowNodeTypeEnum["SUBFLOW"] = "subflow";
2244
2244
  WorkflowNodeTypeEnum["TOOL"] = "tool";
2245
- WorkflowNodeTypeEnum["AGENT_TOOL"] = "agent-tool";
2245
+ WorkflowNodeTypeEnum["AGENT_WORKFLOW"] = "agent-workflow";
2246
+ /**
2247
+ * @deprecated use AGENT_WORKFLOW instead
2248
+ */ WorkflowNodeTypeEnum["AGENT_TOOL"] = "agent-tool";
2246
2249
  WorkflowNodeTypeEnum["NOTE"] = "note";
2247
2250
  /**
2248
2251
  * Task node, distribute tasks to sub-agents
@@ -2328,6 +2331,12 @@ exports.WorkflowComparisonOperator = void 0;
2328
2331
  WorkflowComparisonOperator["LIKE"] = "like";
2329
2332
  WorkflowComparisonOperator["NOT_LIKE"] = "not-like";
2330
2333
  })(exports.WorkflowComparisonOperator || (exports.WorkflowComparisonOperator = {}));
2334
+ function isAgentWorkflowNodeType(type) {
2335
+ return type === exports.WorkflowNodeTypeEnum.AGENT_WORKFLOW || type === exports.WorkflowNodeTypeEnum.AGENT_TOOL;
2336
+ }
2337
+ function isAgentWorkflowNode(node) {
2338
+ return isAgentWorkflowNodeType(node === null || node === void 0 ? void 0 : node.type);
2339
+ }
2331
2340
  function genXpertTriggerKey() {
2332
2341
  return letterStartSUID("Trigger_");
2333
2342
  }
@@ -5646,6 +5655,40 @@ var PLUGIN_LOAD_STATUS = {
5646
5655
  LOADED: "loaded",
5647
5656
  FAILED: "failed"
5648
5657
  };
5658
+ var PLUGIN_COMPONENT_TYPE = {
5659
+ SKILL: "skill",
5660
+ MCP_SERVER: "mcp_server",
5661
+ APP: "app",
5662
+ HOOK: "hook",
5663
+ ASSET: "asset"
5664
+ };
5665
+ var PLUGIN_MARKETPLACE_INSTALLATION_POLICY = {
5666
+ AVAILABLE: "AVAILABLE",
5667
+ INSTALLED_BY_DEFAULT: "INSTALLED_BY_DEFAULT",
5668
+ NOT_AVAILABLE: "NOT_AVAILABLE"
5669
+ };
5670
+ var PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY = {
5671
+ ON_INSTALL: "ON_INSTALL",
5672
+ ON_FIRST_USE: "ON_FIRST_USE",
5673
+ NONE: "NONE"
5674
+ };
5675
+ var PLUGIN_MCP_TOOL_APPROVAL_MODE = {
5676
+ PROMPT: "prompt",
5677
+ APPROVE: "approve",
5678
+ DENY: "deny"
5679
+ };
5680
+ var PLUGIN_RESOURCE_RUNTIME_TYPE = {
5681
+ SKILL_PACKAGE: "skill_package",
5682
+ TOOLSET: "toolset",
5683
+ HOOK_PROFILE: "hook_profile",
5684
+ APP_CONNECTOR: "app_connector"
5685
+ };
5686
+ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
5687
+ READY: "ready",
5688
+ PENDING_AUTH: "pending_auth",
5689
+ BLOCKED: "blocked",
5690
+ FAILED: "failed"
5691
+ };
5649
5692
 
5650
5693
  exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
5651
5694
  exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
@@ -5695,9 +5738,15 @@ exports.MEMORY_PROFILE_PROMPT = MEMORY_PROFILE_PROMPT;
5695
5738
  exports.MEMORY_QA_PROMPT = MEMORY_QA_PROMPT;
5696
5739
  exports.OllamaEmbeddingsProviders = OllamaEmbeddingsProviders;
5697
5740
  exports.OpenAIEmbeddingsProviders = OpenAIEmbeddingsProviders;
5741
+ exports.PLUGIN_COMPONENT_TYPE = PLUGIN_COMPONENT_TYPE;
5698
5742
  exports.PLUGIN_CONFIGURATION_STATUS = PLUGIN_CONFIGURATION_STATUS;
5699
5743
  exports.PLUGIN_LEVEL = PLUGIN_LEVEL;
5700
5744
  exports.PLUGIN_LOAD_STATUS = PLUGIN_LOAD_STATUS;
5745
+ exports.PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY = PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY;
5746
+ exports.PLUGIN_MARKETPLACE_INSTALLATION_POLICY = PLUGIN_MARKETPLACE_INSTALLATION_POLICY;
5747
+ exports.PLUGIN_MCP_TOOL_APPROVAL_MODE = PLUGIN_MCP_TOOL_APPROVAL_MODE;
5748
+ exports.PLUGIN_RESOURCE_INSTALLATION_STATUS = PLUGIN_RESOURCE_INSTALLATION_STATUS;
5749
+ exports.PLUGIN_RESOURCE_RUNTIME_TYPE = PLUGIN_RESOURCE_RUNTIME_TYPE;
5701
5750
  exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
5702
5751
  exports.PermissionApprovalStatus = PermissionApprovalStatus;
5703
5752
  exports.PermissionGroups = PermissionGroups;
@@ -5796,6 +5845,8 @@ exports.getXpertAgentRecursionLimit = getXpertAgentRecursionLimit;
5796
5845
  exports.getXpertWorkspaceVisibility = getXpertWorkspaceVisibility;
5797
5846
  exports.inferMessageAppendContext = inferMessageAppendContext;
5798
5847
  exports.isAgentKey = isAgentKey;
5848
+ exports.isAgentWorkflowNode = isAgentWorkflowNode;
5849
+ exports.isAgentWorkflowNodeType = isAgentWorkflowNodeType;
5799
5850
  exports.isAssistantBindingSkillEnabled = isAssistantBindingSkillEnabled;
5800
5851
  exports.isAssistantBindingToolEnabled = isAssistantBindingToolEnabled;
5801
5852
  exports.isAssistantBindingToolPreferencesEmpty = isAssistantBindingToolPreferencesEmpty;
package/index.esm.js CHANGED
@@ -2240,7 +2240,10 @@ var WorkflowNodeTypeEnum;
2240
2240
  WorkflowNodeTypeEnum["HTTP"] = "http";
2241
2241
  WorkflowNodeTypeEnum["SUBFLOW"] = "subflow";
2242
2242
  WorkflowNodeTypeEnum["TOOL"] = "tool";
2243
- WorkflowNodeTypeEnum["AGENT_TOOL"] = "agent-tool";
2243
+ WorkflowNodeTypeEnum["AGENT_WORKFLOW"] = "agent-workflow";
2244
+ /**
2245
+ * @deprecated use AGENT_WORKFLOW instead
2246
+ */ WorkflowNodeTypeEnum["AGENT_TOOL"] = "agent-tool";
2244
2247
  WorkflowNodeTypeEnum["NOTE"] = "note";
2245
2248
  /**
2246
2249
  * Task node, distribute tasks to sub-agents
@@ -2326,6 +2329,12 @@ var WorkflowComparisonOperator;
2326
2329
  WorkflowComparisonOperator["LIKE"] = "like";
2327
2330
  WorkflowComparisonOperator["NOT_LIKE"] = "not-like";
2328
2331
  })(WorkflowComparisonOperator || (WorkflowComparisonOperator = {}));
2332
+ function isAgentWorkflowNodeType(type) {
2333
+ return type === WorkflowNodeTypeEnum.AGENT_WORKFLOW || type === WorkflowNodeTypeEnum.AGENT_TOOL;
2334
+ }
2335
+ function isAgentWorkflowNode(node) {
2336
+ return isAgentWorkflowNodeType(node === null || node === void 0 ? void 0 : node.type);
2337
+ }
2329
2338
  function genXpertTriggerKey() {
2330
2339
  return letterStartSUID("Trigger_");
2331
2340
  }
@@ -5644,5 +5653,39 @@ var PLUGIN_LOAD_STATUS = {
5644
5653
  LOADED: "loaded",
5645
5654
  FAILED: "failed"
5646
5655
  };
5656
+ var PLUGIN_COMPONENT_TYPE = {
5657
+ SKILL: "skill",
5658
+ MCP_SERVER: "mcp_server",
5659
+ APP: "app",
5660
+ HOOK: "hook",
5661
+ ASSET: "asset"
5662
+ };
5663
+ var PLUGIN_MARKETPLACE_INSTALLATION_POLICY = {
5664
+ AVAILABLE: "AVAILABLE",
5665
+ INSTALLED_BY_DEFAULT: "INSTALLED_BY_DEFAULT",
5666
+ NOT_AVAILABLE: "NOT_AVAILABLE"
5667
+ };
5668
+ var PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY = {
5669
+ ON_INSTALL: "ON_INSTALL",
5670
+ ON_FIRST_USE: "ON_FIRST_USE",
5671
+ NONE: "NONE"
5672
+ };
5673
+ var PLUGIN_MCP_TOOL_APPROVAL_MODE = {
5674
+ PROMPT: "prompt",
5675
+ APPROVE: "approve",
5676
+ DENY: "deny"
5677
+ };
5678
+ var PLUGIN_RESOURCE_RUNTIME_TYPE = {
5679
+ SKILL_PACKAGE: "skill_package",
5680
+ TOOLSET: "toolset",
5681
+ HOOK_PROFILE: "hook_profile",
5682
+ APP_CONNECTOR: "app_connector"
5683
+ };
5684
+ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
5685
+ READY: "ready",
5686
+ PENDING_AUTH: "pending_auth",
5687
+ BLOCKED: "blocked",
5688
+ FAILED: "failed"
5689
+ };
5647
5690
 
5648
- export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED, CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MCPServerType, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
5691
+ export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED, CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MCPServerType, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.10.1",
3
+ "version": "3.11.0",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "module": "./index.esm.js",
20
20
  "main": "./index.cjs.js",
21
21
  "dependencies": {
22
- "@xpert-ai/chatkit-types": "~0.3.12"
22
+ "@xpert-ai/chatkit-types": "~0.3.13"
23
23
  },
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -1,6 +1,6 @@
1
- import type { ThreadGoalStatus } from '@xpert-ai/chatkit-types';
1
+ import type { ThreadGoalSpec, ThreadGoalStatus } from '@xpert-ai/chatkit-types';
2
2
  import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
3
- export type { ThreadGoalStatus } from '@xpert-ai/chatkit-types';
3
+ export type { ThreadGoalSpec, ThreadGoalStatus } from '@xpert-ai/chatkit-types';
4
4
  export declare const THREAD_GOAL_STATUS_VALUES: readonly ["active", "paused", "blocked", "usage_limited", "budget_limited", "complete"];
5
5
  export type ThreadGoalUserStatus = Extract<ThreadGoalStatus, 'active' | 'paused'>;
6
6
  export type ThreadGoalModelStatus = Extract<ThreadGoalStatus, 'complete' | 'blocked'>;
@@ -8,6 +8,7 @@ export interface IThreadGoal extends IBasePerTenantAndOrganizationEntityModel {
8
8
  conversationId: string;
9
9
  threadId: string;
10
10
  objective: string;
11
+ goalSpec?: ThreadGoalSpec | null;
11
12
  status: ThreadGoalStatus;
12
13
  tokensUsed: number;
13
14
  elapsedSeconds: number;
@@ -3,7 +3,7 @@ import { IconDefinition, TAvatar } from '../types';
3
3
  import { TCopilotModel } from './copilot-model.model';
4
4
  import { MCPServerType, TMCPServer } from './xpert-tool-mcp.model';
5
5
  import { XpertTypeEnum } from './xpert.model';
6
- import { PluginTargetApp, PluginTargetAppMeta } from '../plugin';
6
+ import { PluginTargetApp, PluginTargetAppMeta, XpertTemplatePluginDependencies } from '../plugin';
7
7
  export interface IXpertTemplate extends IBasePerTenantEntityModel {
8
8
  key: string;
9
9
  name?: string;
@@ -93,6 +93,7 @@ export type TTemplate = {
93
93
  startPrompts?: string[];
94
94
  releaseNotes?: string;
95
95
  xpertName?: string;
96
+ dependencies?: XpertTemplatePluginDependencies;
96
97
  };
97
98
  export type TXpertTemplate = TTemplate & {
98
99
  avatar: TAvatar;
@@ -1,12 +1,13 @@
1
- import { I18nObject, IconDefinition } from "../types";
2
- import { ICopilotModel } from "./copilot-model.model";
3
- import { TKBRecallParams } from "./knowledgebase.model";
4
- import { ApiAuthType, JsonSchemaObjectType, TErrorHandling, TXpertRefParameter } from "./types";
5
- import { TKBRetrievalSettings, TStateVariable, TXpertParameter } from "./xpert.model";
1
+ import { I18nObject, IconDefinition } from '../types';
2
+ import { ICopilotModel } from './copilot-model.model';
3
+ import { TKBRecallParams } from './knowledgebase.model';
4
+ import { ApiAuthType, JsonSchemaObjectType, TErrorHandling, TXpertRefParameter } from './types';
5
+ import { TKBRetrievalSettings, TStateVariable, TXpertParameter } from './xpert.model';
6
6
  export type TWorkflowNodeMeta = {
7
7
  name: string;
8
8
  label: I18nObject;
9
9
  icon: IconDefinition;
10
+ deprecated?: boolean;
10
11
  configSchema: JsonSchemaObjectType;
11
12
  };
12
13
  export type TWorkflowTriggerMeta = TWorkflowNodeMeta;
@@ -35,6 +36,10 @@ export declare enum WorkflowNodeTypeEnum {
35
36
  HTTP = "http",
36
37
  SUBFLOW = "subflow",
37
38
  TOOL = "tool",
39
+ AGENT_WORKFLOW = "agent-workflow",
40
+ /**
41
+ * @deprecated use AGENT_WORKFLOW instead
42
+ */
38
43
  AGENT_TOOL = "agent-tool",
39
44
  NOTE = "note",
40
45
  /**
@@ -393,11 +398,27 @@ export interface IWFNTool extends IWorkflowNode {
393
398
  export interface IWFNNote extends IWorkflowNode {
394
399
  content: string;
395
400
  }
396
- export interface IWFNAgentTool extends IWorkflowNode {
397
- type: WorkflowNodeTypeEnum.AGENT_TOOL;
401
+ export type TAgentToolReturnSource = {
402
+ type: 'last_message';
403
+ } | {
404
+ type: 'variable';
405
+ variableSelector: string;
406
+ } | {
407
+ type: 'template';
408
+ template: string;
409
+ };
410
+ export type TAgentWorkflowNodeType = WorkflowNodeTypeEnum.AGENT_WORKFLOW | WorkflowNodeTypeEnum.AGENT_TOOL;
411
+ export declare function isAgentWorkflowNodeType(type: WorkflowNodeTypeEnum | string | null | undefined): type is TAgentWorkflowNodeType;
412
+ export interface IWFNAgentWorkflow extends IWorkflowNode {
413
+ type: TAgentWorkflowNodeType;
398
414
  toolName: string;
399
415
  toolDescription?: string;
400
416
  toolParameters?: TXpertParameter[];
417
+ /**
418
+ * Source used to build the ToolMessage returned to the caller agent.
419
+ * Empty means the last message in the workflow state, for backward compatibility.
420
+ */
421
+ returnSource?: TAgentToolReturnSource;
401
422
  /**
402
423
  * End point tool
403
424
  */
@@ -408,6 +429,10 @@ export interface IWFNAgentTool extends IWorkflowNode {
408
429
  */
409
430
  errorHandling?: TErrorHandling;
410
431
  }
432
+ export declare function isAgentWorkflowNode(node: IWorkflowNode | null | undefined): node is IWFNAgentWorkflow;
433
+ export interface IWFNAgentTool extends IWFNAgentWorkflow {
434
+ type: WorkflowNodeTypeEnum.AGENT_TOOL;
435
+ }
411
436
  export interface IWFNTrigger extends IWorkflowNode {
412
437
  type: WorkflowNodeTypeEnum.TRIGGER;
413
438
  from: 'chat' | 'integration' | 'scheduler';
@@ -1,7 +1,7 @@
1
1
  import { IStorageFile } from './storage-file.model';
2
2
  export type FileAssetStatus = 'success' | 'partial_success' | 'failed';
3
3
  export type FileAssetDestinationKind = 'storage' | 'volume' | 'sandbox';
4
- export type FileAssetSourceKind = 'multipart' | 'storage_file' | 'local_file';
4
+ export type FileAssetSourceKind = 'multipart' | 'storage_file' | 'local_file' | 'buffer';
5
5
  export type FileUploadVolumeCatalog = 'projects' | 'users' | 'knowledges' | 'skills' | 'xperts';
6
6
  export type FileUploadSandboxMode = 'mounted_workspace' | 'backend_upload';
7
7
  export interface IFileAssetSource {
package/src/plugin.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
2
  import { JsonSchemaObjectType } from './ai/types';
3
+ import type { IXpert } from './ai/xpert.model';
4
+ import type { JSONValue } from './core.model';
3
5
  import { IconDefinition, I18nObject } from './types';
4
6
  export type PluginName = string;
5
7
  export declare const PLUGIN_LEVEL: {
@@ -23,6 +25,40 @@ export declare const PLUGIN_LOAD_STATUS: {
23
25
  readonly LOADED: "loaded";
24
26
  readonly FAILED: "failed";
25
27
  };
28
+ export declare const PLUGIN_COMPONENT_TYPE: {
29
+ readonly SKILL: "skill";
30
+ readonly MCP_SERVER: "mcp_server";
31
+ readonly APP: "app";
32
+ readonly HOOK: "hook";
33
+ readonly ASSET: "asset";
34
+ };
35
+ export declare const PLUGIN_MARKETPLACE_INSTALLATION_POLICY: {
36
+ readonly AVAILABLE: "AVAILABLE";
37
+ readonly INSTALLED_BY_DEFAULT: "INSTALLED_BY_DEFAULT";
38
+ readonly NOT_AVAILABLE: "NOT_AVAILABLE";
39
+ };
40
+ export declare const PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY: {
41
+ readonly ON_INSTALL: "ON_INSTALL";
42
+ readonly ON_FIRST_USE: "ON_FIRST_USE";
43
+ readonly NONE: "NONE";
44
+ };
45
+ export declare const PLUGIN_MCP_TOOL_APPROVAL_MODE: {
46
+ readonly PROMPT: "prompt";
47
+ readonly APPROVE: "approve";
48
+ readonly DENY: "deny";
49
+ };
50
+ export declare const PLUGIN_RESOURCE_RUNTIME_TYPE: {
51
+ readonly SKILL_PACKAGE: "skill_package";
52
+ readonly TOOLSET: "toolset";
53
+ readonly HOOK_PROFILE: "hook_profile";
54
+ readonly APP_CONNECTOR: "app_connector";
55
+ };
56
+ export declare const PLUGIN_RESOURCE_INSTALLATION_STATUS: {
57
+ readonly READY: "ready";
58
+ readonly PENDING_AUTH: "pending_auth";
59
+ readonly BLOCKED: "blocked";
60
+ readonly FAILED: "failed";
61
+ };
26
62
  /**
27
63
  * Classifies plugin scope and governance.
28
64
  * - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
@@ -32,6 +68,12 @@ export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
32
68
  export type PluginSource = (typeof PLUGIN_SOURCE)[keyof typeof PLUGIN_SOURCE];
33
69
  export type PluginConfigurationStatus = (typeof PLUGIN_CONFIGURATION_STATUS)[keyof typeof PLUGIN_CONFIGURATION_STATUS];
34
70
  export type PluginLoadStatus = (typeof PLUGIN_LOAD_STATUS)[keyof typeof PLUGIN_LOAD_STATUS];
71
+ export type PluginComponentType = (typeof PLUGIN_COMPONENT_TYPE)[keyof typeof PLUGIN_COMPONENT_TYPE];
72
+ export type PluginMarketplaceInstallationPolicy = (typeof PLUGIN_MARKETPLACE_INSTALLATION_POLICY)[keyof typeof PLUGIN_MARKETPLACE_INSTALLATION_POLICY];
73
+ export type PluginMarketplaceAuthenticationPolicy = (typeof PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY)[keyof typeof PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY];
74
+ export type PluginMcpToolApprovalMode = (typeof PLUGIN_MCP_TOOL_APPROVAL_MODE)[keyof typeof PLUGIN_MCP_TOOL_APPROVAL_MODE];
75
+ export type PluginResourceRuntimeType = (typeof PLUGIN_RESOURCE_RUNTIME_TYPE)[keyof typeof PLUGIN_RESOURCE_RUNTIME_TYPE];
76
+ export type PluginResourceInstallationStatus = (typeof PLUGIN_RESOURCE_INSTALLATION_STATUS)[keyof typeof PLUGIN_RESOURCE_INSTALLATION_STATUS];
35
77
  export type PluginScopeRelation = 'none' | 'overrides-global' | 'shadowed-by-organization';
36
78
  export type PluginTargetApp = 'xpert' | 'data-xpert' | (string & {});
37
79
  export type PluginSdkCompatibilityWarningCode = 'plugin-sdk-peer-dependency-missing' | 'plugin-sdk-peer-range-invalid' | 'plugin-sdk-peer-range-incompatible' | 'plugin-sdk-peer-range-spans-major';
@@ -44,6 +86,100 @@ export interface PluginMarketplaceOperation {
44
86
  access?: PluginMarketplaceOperationAccess;
45
87
  tags?: string[];
46
88
  }
89
+ export interface XpertPluginMarketplacePolicy {
90
+ installation?: PluginMarketplaceInstallationPolicy;
91
+ authentication?: PluginMarketplaceAuthenticationPolicy;
92
+ pluginSharing?: boolean;
93
+ }
94
+ export interface XpertPluginMarketplaceSource {
95
+ source?: 'local' | 'url' | 'git-subdir' | 'github' | 'git' | 'npm' | 'marketplace' | (string & {});
96
+ path?: string;
97
+ url?: string;
98
+ ref?: string;
99
+ sha?: string;
100
+ sparsePath?: string;
101
+ packageName?: string;
102
+ }
103
+ export interface XpertPluginInstallInterface {
104
+ displayName?: string;
105
+ shortDescription?: string;
106
+ longDescription?: string;
107
+ developerName?: string;
108
+ category?: string;
109
+ capabilities?: string[];
110
+ websiteURL?: string;
111
+ privacyPolicyURL?: string;
112
+ termsOfServiceURL?: string;
113
+ defaultPrompt?: string[];
114
+ brandColor?: string;
115
+ composerIcon?: string;
116
+ logo?: string;
117
+ screenshots?: string[];
118
+ }
119
+ export interface XpertPluginMcpServerPolicy {
120
+ enabled?: boolean;
121
+ defaultToolsApprovalMode?: PluginMcpToolApprovalMode;
122
+ enabledTools?: string[];
123
+ tools?: {
124
+ [toolName: string]: {
125
+ approvalMode?: PluginMcpToolApprovalMode;
126
+ };
127
+ };
128
+ }
129
+ export interface XpertPluginBundleManifest {
130
+ name: string;
131
+ version?: string;
132
+ description?: string;
133
+ author?: string;
134
+ homepage?: string;
135
+ repository?: JSONValue;
136
+ license?: string;
137
+ keywords?: string[];
138
+ skills?: string | string[];
139
+ mcpServers?: string | string[] | JSONValue;
140
+ apps?: string | string[] | JSONValue;
141
+ connectors?: string | string[] | JSONValue;
142
+ hooks?: string | string[] | JSONValue | JSONValue[];
143
+ interface?: XpertPluginInstallInterface;
144
+ policy?: XpertPluginMarketplacePolicy;
145
+ source?: XpertPluginMarketplaceSource;
146
+ assets?: {
147
+ composerIcon?: string;
148
+ logo?: string;
149
+ screenshots?: string[];
150
+ };
151
+ targetApps?: PluginTargetApp[];
152
+ targetAppMeta?: PluginTargetAppMeta;
153
+ }
154
+ export interface XpertTemplatePluginSkillDependency {
155
+ pluginName?: PluginName;
156
+ componentKey: string;
157
+ targetAgentKey?: string;
158
+ }
159
+ export interface XpertTemplatePluginMcpServerDependency {
160
+ pluginName?: PluginName;
161
+ componentKey: string;
162
+ targetAgentKey?: string;
163
+ policyOverrides?: XpertPluginMcpServerPolicy;
164
+ }
165
+ export interface XpertTemplatePluginHookDependency {
166
+ pluginName?: PluginName;
167
+ componentKey: string;
168
+ targetAgentKey?: string;
169
+ events?: string[];
170
+ }
171
+ export interface XpertTemplatePluginAppDependency {
172
+ pluginName?: PluginName;
173
+ componentKey: string;
174
+ auth?: 'on_install' | 'on_first_use';
175
+ }
176
+ export interface XpertTemplatePluginDependencies {
177
+ plugins?: PluginName[];
178
+ skills?: XpertTemplatePluginSkillDependency[];
179
+ mcpServers?: XpertTemplatePluginMcpServerDependency[];
180
+ hooks?: XpertTemplatePluginHookDependency[];
181
+ apps?: XpertTemplatePluginAppDependency[];
182
+ }
47
183
  export interface PluginMarketplaceContribution {
48
184
  id?: string;
49
185
  type: PluginMarketplaceContributionType;
@@ -182,6 +318,7 @@ export interface IPluginDescriptor {
182
318
  loadError?: string | null;
183
319
  effectiveInCurrentScope: boolean;
184
320
  scopeRelation?: PluginScopeRelation;
321
+ componentSummary?: PluginComponentSummary;
185
322
  }
186
323
  export interface IPluginLatestVersionStatus {
187
324
  organizationId?: string;
@@ -197,3 +334,76 @@ export interface IPluginConfiguration<TConfig extends Record<string, any> = Reco
197
334
  configurationStatus?: PluginConfigurationStatus | null;
198
335
  configurationError?: string | null;
199
336
  }
337
+ export interface PluginComponentSummary {
338
+ total: number;
339
+ skills: number;
340
+ mcpServers: number;
341
+ apps: number;
342
+ hooks: number;
343
+ }
344
+ export interface IPluginComponentDefinition {
345
+ componentType: PluginComponentType;
346
+ componentKey: string;
347
+ sourcePath?: string | null;
348
+ config?: JSONValue | null;
349
+ metadata?: JSONValue | null;
350
+ definitionHash: string;
351
+ }
352
+ export interface IPluginResourceComponentState {
353
+ componentType: PluginComponentType;
354
+ componentKey: string;
355
+ installed: boolean;
356
+ staleDefinition: boolean;
357
+ runtimeType?: PluginResourceRuntimeType | null;
358
+ runtimeId?: string | null;
359
+ status?: PluginResourceInstallationStatus | null;
360
+ installation?: IPluginResourceInstallation | null;
361
+ }
362
+ export interface PluginResourceComponentSelector {
363
+ componentType?: PluginComponentType;
364
+ componentKey: string;
365
+ pluginName?: PluginName;
366
+ targetAgentKey?: string;
367
+ policyOverrides?: XpertPluginMcpServerPolicy;
368
+ events?: string[];
369
+ auth?: 'on_install' | 'on_first_use';
370
+ }
371
+ export interface IPluginResourceInstallation extends IBasePerTenantAndOrganizationEntityModel {
372
+ pluginName: PluginName;
373
+ componentType: PluginComponentType;
374
+ componentKey: string;
375
+ workspaceId: string;
376
+ xpertId?: string | null;
377
+ agentKey?: string | null;
378
+ runtimeType: PluginResourceRuntimeType;
379
+ runtimeId?: string | null;
380
+ runtimeNodeKey?: string | null;
381
+ definitionHash: string;
382
+ status: PluginResourceInstallationStatus;
383
+ config?: JSONValue | null;
384
+ enabled: boolean;
385
+ }
386
+ export interface IPluginResourceInstallResult {
387
+ installations: IPluginResourceInstallation[];
388
+ pendingAuth: IPluginResourceInstallation[];
389
+ xpert?: IXpert;
390
+ }
391
+ export interface PluginResourceInstallWorkspaceInput {
392
+ workspaceId: string;
393
+ components?: PluginResourceComponentSelector[];
394
+ }
395
+ export interface PluginResourceInstallXpertInput {
396
+ xpertId: string;
397
+ components?: PluginResourceComponentSelector[];
398
+ agentKey?: string;
399
+ }
400
+ export interface XpertTemplateInstallInput {
401
+ workspaceId: string;
402
+ basic?: {
403
+ name?: string;
404
+ title?: string;
405
+ description?: string;
406
+ avatar?: JSONValue | null;
407
+ copilotModel?: JSONValue | null;
408
+ };
409
+ }