@xpert-ai/contracts 3.12.1 → 3.14.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
@@ -2146,6 +2146,12 @@ exports.ChatMessageFeedbackRatingEnum = void 0;
2146
2146
  ChatMessageFeedbackRatingEnum["DISLIKE"] = "dislike";
2147
2147
  })(exports.ChatMessageFeedbackRatingEnum || (exports.ChatMessageFeedbackRatingEnum = {}));
2148
2148
 
2149
+ var COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = "copilotCheckpointRetentionDays";
2150
+ var COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = "copilotCheckpointRetentionEnabled";
2151
+ var MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = 1;
2152
+ var DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = 60;
2153
+ var MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = 3650;
2154
+
2149
2155
  var MEMORY_QA_PROMPT = "Summarize the experience of the above conversation and output a short question and answer.";
2150
2156
  var MEMORY_PROFILE_PROMPT = "Extract new user profile information from the above conversation in one short sentence. If no new information is available, return nothing.";
2151
2157
 
@@ -3821,6 +3827,7 @@ exports.MCPServerType = void 0;
3821
3827
  MCPServerType["CODE"] = "code";
3822
3828
  MCPServerType["HTTP"] = "http";
3823
3829
  })(exports.MCPServerType || (exports.MCPServerType = {}));
3830
+ var MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
3824
3831
 
3825
3832
  /**
3826
3833
  * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
@@ -4976,21 +4983,6 @@ exports.RequestScopeLevel = void 0;
4976
4983
  RequestScopeLevel["ORGANIZATION"] = "organization";
4977
4984
  })(exports.RequestScopeLevel || (exports.RequestScopeLevel = {}));
4978
4985
 
4979
- var IntegrationDingTalkProvider = {
4980
- name: exports.IntegrationEnum.DINGTALK,
4981
- label: {
4982
- en_US: "DingTalk",
4983
- zh_Hans: "钉钉"
4984
- },
4985
- avatar: "dingtalk.svg",
4986
- webhook: true,
4987
- schema: {
4988
- type: "object",
4989
- properties: {}
4990
- },
4991
- pro: true
4992
- };
4993
-
4994
4986
  var IntegrationGitHubProvider = {
4995
4987
  name: exports.IntegrationEnum.GITHUB,
4996
4988
  label: {
@@ -5158,10 +5150,9 @@ function _define_property(obj, key, value) {
5158
5150
  }
5159
5151
  return obj;
5160
5152
  }
5161
- var _obj;
5162
- var INTEGRATION_PROVIDERS = (_obj = {}, // [IntegrationEnum.LARK]: IntegrationLarkProvider,
5163
- _define_property(_obj, exports.IntegrationEnum.DINGTALK, IntegrationDingTalkProvider), // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
5164
- _define_property(_obj, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider), _obj);
5153
+ var INTEGRATION_PROVIDERS = // [IntegrationEnum.LARK]: IntegrationLarkProvider,
5154
+ // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
5155
+ _define_property({}, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider);
5165
5156
 
5166
5157
  exports.AiModelTypeEnum = void 0;
5167
5158
  (function(AiModelTypeEnum) {
@@ -5697,8 +5688,17 @@ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
5697
5688
  FAILED: "failed"
5698
5689
  };
5699
5690
 
5691
+ var ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
5692
+ var ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
5693
+ var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
5694
+ var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
5695
+ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
5696
+
5700
5697
  exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
5701
5698
  exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
5699
+ exports.ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = ASSISTANT_CHAT_SEND_MESSAGE_COMMAND;
5700
+ exports.ASSISTANT_CITATION_OPEN_EVENT = ASSISTANT_CITATION_OPEN_EVENT;
5701
+ exports.ASSISTANT_CONTEXT_SET_COMMAND = ASSISTANT_CONTEXT_SET_COMMAND;
5702
5702
  exports.Attachment_Type_Options = Attachment_Type_Options;
5703
5703
  exports.CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
5704
5704
  exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
@@ -5708,6 +5708,9 @@ exports.CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = CHAT_EVENT_TYPE_THREAD_GOAL_UPDATE
5708
5708
  exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
5709
5709
  exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
5710
5710
  exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
5711
+ exports.COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING;
5712
+ exports.COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING;
5713
+ exports.DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS;
5711
5714
  exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
5712
5715
  exports.DEFAULT_DATE_FORMATS = DEFAULT_DATE_FORMATS;
5713
5716
  exports.DEFAULT_INTEGRATION_PAID_FILTERS = DEFAULT_INTEGRATION_PAID_FILTERS;
@@ -5732,6 +5735,7 @@ exports.IteratorIndexParameterName = IteratorIndexParameterName;
5732
5735
  exports.IteratorItemParameterName = IteratorItemParameterName;
5733
5736
  exports.KDocumentSourceType = KDocumentSourceType;
5734
5737
  exports.KDocumentWebTypeOptions = KDocumentWebTypeOptions;
5738
+ exports.KNOWLEDGEBASE_OPEN_CITATION_EFFECT = KNOWLEDGEBASE_OPEN_CITATION_EFFECT;
5735
5739
  exports.KNOWLEDGE_DOCUMENTS_NAME = KNOWLEDGE_DOCUMENTS_NAME;
5736
5740
  exports.KNOWLEDGE_FOLDER_ID_NAME = KNOWLEDGE_FOLDER_ID_NAME;
5737
5741
  exports.KNOWLEDGE_SOURCES_NAME = KNOWLEDGE_SOURCES_NAME;
@@ -5740,9 +5744,12 @@ exports.KnowledgeTask = KnowledgeTask;
5740
5744
  exports.KnowledgebaseChannel = KnowledgebaseChannel;
5741
5745
  exports.LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME;
5742
5746
  exports.LanguagesMap = LanguagesMap;
5747
+ exports.MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = MAX_COPILOT_CHECKPOINT_RETENTION_DAYS;
5748
+ exports.MCP_APP_RESOURCE_MIME_TYPE = MCP_APP_RESOURCE_MIME_TYPE;
5743
5749
  exports.MDX = schema;
5744
5750
  exports.MEMORY_PROFILE_PROMPT = MEMORY_PROFILE_PROMPT;
5745
5751
  exports.MEMORY_QA_PROMPT = MEMORY_QA_PROMPT;
5752
+ exports.MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = MIN_COPILOT_CHECKPOINT_RETENTION_DAYS;
5746
5753
  exports.OllamaEmbeddingsProviders = OllamaEmbeddingsProviders;
5747
5754
  exports.OpenAIEmbeddingsProviders = OpenAIEmbeddingsProviders;
5748
5755
  exports.PLUGIN_COMPONENT_TYPE = PLUGIN_COMPONENT_TYPE;
@@ -5784,6 +5791,7 @@ exports.TOOL_NAME_REGEX = TOOL_NAME_REGEX;
5784
5791
  exports.TranslationLanguageMap = TranslationLanguageMap;
5785
5792
  exports.USAGE_HOUR_FORMAT = USAGE_HOUR_FORMAT;
5786
5793
  exports.VariableOperations = VariableOperations;
5794
+ exports.WORKBENCH_NAVIGATION_OPEN_COMMAND = WORKBENCH_NAVIGATION_OPEN_COMMAND;
5787
5795
  exports.WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME;
5788
5796
  exports.WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER;
5789
5797
  exports.XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY = XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY;
package/index.esm.js CHANGED
@@ -2144,6 +2144,12 @@ var ChatMessageFeedbackRatingEnum;
2144
2144
  ChatMessageFeedbackRatingEnum["DISLIKE"] = "dislike";
2145
2145
  })(ChatMessageFeedbackRatingEnum || (ChatMessageFeedbackRatingEnum = {}));
2146
2146
 
2147
+ var COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = "copilotCheckpointRetentionDays";
2148
+ var COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = "copilotCheckpointRetentionEnabled";
2149
+ var MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = 1;
2150
+ var DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = 60;
2151
+ var MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = 3650;
2152
+
2147
2153
  var MEMORY_QA_PROMPT = "Summarize the experience of the above conversation and output a short question and answer.";
2148
2154
  var MEMORY_PROFILE_PROMPT = "Extract new user profile information from the above conversation in one short sentence. If no new information is available, return nothing.";
2149
2155
 
@@ -3819,6 +3825,7 @@ var MCPServerType;
3819
3825
  MCPServerType["CODE"] = "code";
3820
3826
  MCPServerType["HTTP"] = "http";
3821
3827
  })(MCPServerType || (MCPServerType = {}));
3828
+ var MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
3822
3829
 
3823
3830
  /**
3824
3831
  * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
@@ -4974,21 +4981,6 @@ var RequestScopeLevel;
4974
4981
  RequestScopeLevel["ORGANIZATION"] = "organization";
4975
4982
  })(RequestScopeLevel || (RequestScopeLevel = {}));
4976
4983
 
4977
- var IntegrationDingTalkProvider = {
4978
- name: IntegrationEnum.DINGTALK,
4979
- label: {
4980
- en_US: "DingTalk",
4981
- zh_Hans: "钉钉"
4982
- },
4983
- avatar: "dingtalk.svg",
4984
- webhook: true,
4985
- schema: {
4986
- type: "object",
4987
- properties: {}
4988
- },
4989
- pro: true
4990
- };
4991
-
4992
4984
  var IntegrationGitHubProvider = {
4993
4985
  name: IntegrationEnum.GITHUB,
4994
4986
  label: {
@@ -5156,10 +5148,9 @@ function _define_property(obj, key, value) {
5156
5148
  }
5157
5149
  return obj;
5158
5150
  }
5159
- var _obj;
5160
- var INTEGRATION_PROVIDERS = (_obj = {}, // [IntegrationEnum.LARK]: IntegrationLarkProvider,
5161
- _define_property(_obj, IntegrationEnum.DINGTALK, IntegrationDingTalkProvider), // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
5162
- _define_property(_obj, IntegrationEnum.GITHUB, IntegrationGitHubProvider), _obj);
5151
+ var INTEGRATION_PROVIDERS = // [IntegrationEnum.LARK]: IntegrationLarkProvider,
5152
+ // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
5153
+ _define_property({}, IntegrationEnum.GITHUB, IntegrationGitHubProvider);
5163
5154
 
5164
5155
  var AiModelTypeEnum;
5165
5156
  (function(AiModelTypeEnum) {
@@ -5695,4 +5686,10 @@ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
5695
5686
  FAILED: "failed"
5696
5687
  };
5697
5688
 
5698
- 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, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, 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 };
5689
+ var ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
5690
+ var ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
5691
+ var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
5692
+ var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
5693
+ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
5694
+
5695
+ export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_CONTEXT_SET_COMMAND, 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, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS, 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, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, 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, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MCPServerType, MCP_APP_RESOURCE_MIME_TYPE, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, 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, WORKBENCH_NAVIGATION_OPEN_COMMAND, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, 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.12.1",
3
+ "version": "3.14.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.13"
22
+ "@xpert-ai/chatkit-types": "~0.4.2"
23
23
  },
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -29,9 +29,14 @@ export type TChatConversationOptions = {
29
29
  sandboxEnvironmentId?: string;
30
30
  runtimeCapabilities?: RuntimeCapabilitiesSelection;
31
31
  };
32
+ export type TChatConversationSourceAudit = {
33
+ sourceIntegrationId?: string | null;
34
+ channelType?: string | null;
35
+ sourceMessageLogIds?: string[];
36
+ };
32
37
  export type TChatConversationStatus = 'idle' | 'busy' | 'interrupted' | 'error';
33
38
  export type TToolCallType = 'agent' | 'tool';
34
- export type TChatFrom = 'platform' | 'webapp' | 'debugger' | 'knowledge' | 'job' | 'api' | 'feishu' | 'lark' | 'dingtalk' | 'wecom';
39
+ export type TChatFrom = 'platform' | 'webapp' | 'debugger' | 'knowledge' | 'job' | 'schedule' | 'api' | 'feishu' | 'lark' | 'dingtalk' | 'wechat';
35
40
  /**
36
41
  * Operation for interrupt
37
42
  */
@@ -79,6 +84,10 @@ export interface IChatConversation extends IBasePerTenantAndOrganizationEntityMo
79
84
  * Options
80
85
  */
81
86
  options?: TChatConversationOptions;
87
+ /**
88
+ * Stable source audit information for background/channel-triggered conversations.
89
+ */
90
+ sourceAudit?: TChatConversationSourceAudit | null;
82
91
  /**
83
92
  * Error message when status is error
84
93
  */
@@ -121,7 +130,30 @@ export interface IChatConversation extends IBasePerTenantAndOrganizationEntityMo
121
130
  }
122
131
  export type TChatConversationLog = IChatConversation & {
123
132
  messageCount: number;
133
+ sourceIntegrationId?: string | null;
134
+ channelType?: string | null;
135
+ sourceMessageLogIds?: string[];
124
136
  };
137
+ export interface IChatConversationReadState extends IBasePerTenantAndOrganizationEntityModel {
138
+ conversationId: string;
139
+ userId: string;
140
+ lastReadAt: Date | string;
141
+ lastReadMessageId?: string | null;
142
+ }
143
+ export interface IChatConversationMarkReadRequest {
144
+ lastReadMessageId?: string | null;
145
+ }
146
+ export interface IChatConversationUnreadXpertsRequest {
147
+ xpertIds: string[];
148
+ }
149
+ export interface IChatConversationUnreadXpertSummary {
150
+ xpertId: string;
151
+ unreadMessages: number;
152
+ unreadConversations: number;
153
+ latestUnreadAt?: Date | string | null;
154
+ latestUnreadConversationId?: string | null;
155
+ latestUnreadThreadId?: string | null;
156
+ }
125
157
  export type ChatMessage = {
126
158
  conversationId: string;
127
159
  id: string;
@@ -1,4 +1,9 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ export declare const COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = "copilotCheckpointRetentionDays";
3
+ export declare const COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = "copilotCheckpointRetentionEnabled";
4
+ export declare const MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = 1;
5
+ export declare const DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = 60;
6
+ export declare const MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = 3650;
2
7
  /**
3
8
  * Checkpoints for copilot, for langgraph framework
4
9
  */
package/src/ai/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export declare const STATE_VARIABLE_HUMAN = "human";
2
2
  export { ChatMessageEventTypeEnum, ChatMessageStepCategory, ChatMessageTypeEnum } from './ai.model';
3
3
  export type * from '@xpert-ai/chatkit-types';
4
- export type { TThreadGoalClearedEvent, TThreadGoalUpdatedEvent, ThreadGoalStatus } from '@xpert-ai/chatkit-types';
4
+ export type { IconDefinition, IconType } from '../types';
5
5
  export type { TChatRequest } from './xpert-chat.model';
6
6
  export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from './chat-event.model';
7
7
  export * from './assistant-binding.model';
@@ -36,6 +36,8 @@ export interface IDocChunkMetadata {
36
36
  * Segmented chunk of a knowledge document
37
37
  */
38
38
  export interface IKnowledgeDocumentChunk<Metadata extends IDocChunkMetadata = any> extends DocumentInterface<Metadata>, IBasePerTenantAndOrganizationEntityModel {
39
+ contentHash?: string | null;
40
+ version?: number;
39
41
  documentId?: string;
40
42
  document?: IKnowledgeDocument;
41
43
  knowledgebaseId?: string;
@@ -87,6 +87,17 @@ export declare enum KBDocumentStatusEnum {
87
87
  FINISH = "finish",
88
88
  ERROR = "error"
89
89
  }
90
+ export type KnowledgeDocumentIncrementalSyncMode = 'incremental' | 'full' | 'skipped';
91
+ export type KnowledgeDocumentLastIncrementalSync = {
92
+ mode: KnowledgeDocumentIncrementalSyncMode;
93
+ total: number;
94
+ skipped: number;
95
+ added: number;
96
+ updated: number;
97
+ deleted: number;
98
+ embeddingTokens: number;
99
+ processedAt: string;
100
+ };
90
101
  export type TDocumentWebOptions = TRagWebOptions & {};
91
102
  export type TDocSourceConfig = {
92
103
  key?: string;
@@ -117,6 +128,26 @@ export type TKnowledgeDocument = {
117
128
  */
118
129
  sourceType?: DocumentSourceProviderCategoryEnum | DocumentTypeEnum;
119
130
  sourceConfig?: TDocSourceConfig;
131
+ /**
132
+ * Stable source identity used for ingestion-time incremental sync.
133
+ */
134
+ sourceKey?: string | null;
135
+ /**
136
+ * Stable hash of the original source bytes or external source content.
137
+ */
138
+ sourceHash?: string | null;
139
+ /**
140
+ * Stable hash of sourceHash and parser/source processing configuration.
141
+ */
142
+ processingHash?: string | null;
143
+ /**
144
+ * Stable aggregate hash of the ordered processed chunks.
145
+ */
146
+ contentHash?: string | null;
147
+ /**
148
+ * Optimistic-lock version for user edits.
149
+ */
150
+ version?: number;
120
151
  /**
121
152
  * document type category
122
153
  */
@@ -196,6 +227,7 @@ export interface StandardDocumentMetadata {
196
227
  embedTime?: string;
197
228
  embedCost?: string | null;
198
229
  tokens?: number;
230
+ lastIncrementalSync?: KnowledgeDocumentLastIncrementalSync;
199
231
  }
200
232
  export interface KnowledgeDocumentMetadata extends StandardDocumentMetadata {
201
233
  [key: string]: any;
@@ -125,6 +125,10 @@ export type TKnowledgebase = {
125
125
  * API service enabled
126
126
  */
127
127
  apiEnabled?: boolean;
128
+ /**
129
+ * Enable source matching for newly ingested documents.
130
+ */
131
+ incrementalSyncEnabled?: boolean;
128
132
  documents?: IKnowledgeDocument[];
129
133
  integrationId?: string;
130
134
  extKnowledgebaseId?: string;
package/src/ai/types.d.ts CHANGED
@@ -39,6 +39,14 @@ export declare enum EmbeddingStatusEnum {
39
39
  }
40
40
  export declare const Attachment_Type_Options: TSelectOption<string, TXpertAttachmentType>[];
41
41
  export type JsonSchemaUIExtensions = {
42
+ /**
43
+ * Field title used by generic JSON-schema forms.
44
+ */
45
+ title?: I18nObject | string;
46
+ /**
47
+ * Field description used by generic JSON-schema forms.
48
+ */
49
+ description?: I18nObject | string;
42
50
  /**
43
51
  * UI component variant, or custom component name
44
52
  */
@@ -97,9 +97,30 @@ export type TAgentExecutionMetadata = {
97
97
  /**
98
98
  * AI model provider
99
99
  */
100
- provider: string;
100
+ provider?: string;
101
101
  /**
102
102
  * AI Model
103
103
  */
104
- model: string;
104
+ model?: string;
105
+ triggerSource?: 'integration' | 'channel' | 'api' | 'job' | 'trigger' | string;
106
+ sourceIntegrationId?: string;
107
+ integrationId?: string;
108
+ channelType?: string;
109
+ channelSource?: string;
110
+ from?: string;
111
+ fromEndUserId?: string;
112
+ channelUserId?: string;
113
+ uuid?: string;
114
+ ownerWxid?: string;
115
+ contactId?: string;
116
+ chatId?: string;
117
+ chatType?: string;
118
+ senderId?: string;
119
+ sourceMessageLogIds?: string[];
120
+ handoffMessageId?: string;
121
+ handoffTraceId?: string;
122
+ handoffParentMessageId?: string;
123
+ runtimePrincipalType?: string;
124
+ runtimePrincipalXpertId?: string;
125
+ [key: string]: unknown;
105
126
  };
@@ -1,3 +1,6 @@
1
+ import type { TMcpAppCsp, TMcpAppPermissions, TMcpAppToolResult, TMcpAppVisibility } from '@xpert-ai/chatkit-types';
2
+ import type { I18nObject } from '../i18n.model';
3
+ import type { IconDefinition } from '../types';
1
4
  export declare enum MCPServerType {
2
5
  SSE = "sse",
3
6
  STDIO = "stdio",
@@ -8,18 +11,19 @@ export declare enum MCPServerType {
8
11
  * Configuration for stdio transport connection
9
12
  */
10
13
  export interface StdioConnection {
11
- transport: "stdio";
14
+ transport: 'stdio';
12
15
  command: string;
13
16
  args: string[];
14
17
  env?: Record<string, string>;
18
+ stderr?: 'pipe' | 'inherit' | 'ignore' | string;
15
19
  encoding?: string;
16
- encodingErrorHandler?: "strict" | "ignore" | "replace";
20
+ encodingErrorHandler?: 'strict' | 'ignore' | 'replace';
17
21
  }
18
22
  /**
19
23
  * Configuration for SSE transport connection
20
24
  */
21
25
  export interface SSEConnection {
22
- transport: "sse";
26
+ transport: 'sse';
23
27
  url: string;
24
28
  headers?: Record<string, string>;
25
29
  useNodeEventSource?: boolean;
@@ -28,7 +32,7 @@ export interface SSEConnection {
28
32
  * Configuration for Streamable HTTP transport connection
29
33
  */
30
34
  export interface HttpConnection {
31
- transport: "http";
35
+ transport: 'http';
32
36
  url: string;
33
37
  headers?: Record<string, string>;
34
38
  /**
@@ -43,19 +47,44 @@ export type TMCPServerReconnect = {
43
47
  */
44
48
  enabled?: boolean;
45
49
  /**
46
- * Maximum number of restart attempts
47
- */
50
+ * Maximum number of restart attempts
51
+ */
48
52
  maxAttempts?: number;
49
53
  /**
50
- * Delay in milliseconds between restart attempts
51
- */
54
+ * Delay in milliseconds between restart attempts
55
+ */
52
56
  delayMs?: number;
53
57
  };
58
+ export type TMcpStdioRuntimePolicy = {
59
+ /**
60
+ * Runtime provider requested by the toolset or plugin. v1 supports
61
+ * local-process; sandbox and sidecar are reserved extension points.
62
+ */
63
+ provider?: 'local-process' | 'sandbox' | 'sidecar' | string;
64
+ /**
65
+ * Maximum startup wait time in milliseconds.
66
+ */
67
+ startupTimeoutMs?: number;
68
+ /**
69
+ * Maximum idle lifetime in milliseconds before the host may close the runtime.
70
+ */
71
+ idleTimeoutMs?: number;
72
+ /**
73
+ * Maximum total lifetime in milliseconds.
74
+ */
75
+ maxLifetimeMs?: number;
76
+ /**
77
+ * Optional command allow-list requested by the plugin/toolset. The platform
78
+ * allow-list remains authoritative.
79
+ */
80
+ allowedCommands?: string[];
81
+ };
54
82
  export type TMCPServer = {
55
83
  type: MCPServerType;
56
84
  command?: string;
57
85
  args?: string[];
58
86
  env?: Record<string, string>;
87
+ stderr?: 'pipe' | 'inherit' | 'ignore' | string;
59
88
  encoding?: string;
60
89
  encodingErrorHandler?: string;
61
90
  /**
@@ -84,8 +113,74 @@ export type TMCPServer = {
84
113
  * Init scripts for sandbox
85
114
  */
86
115
  initScripts?: string;
116
+ /**
117
+ * Requested stdio runtime policy. The platform clamps this policy before use.
118
+ */
119
+ runtime?: TMcpStdioRuntimePolicy;
87
120
  };
88
121
  export type TMCPSchema = {
89
122
  servers?: Record<string, TMCPServer>;
90
123
  mcpServers?: Record<string, TMCPServer>;
91
124
  };
125
+ export declare const MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
126
+ export type TMcpAppUiMeta = {
127
+ resourceUri: string;
128
+ title?: string | I18nObject;
129
+ description?: string | I18nObject;
130
+ icon?: IconDefinition;
131
+ /**
132
+ * @deprecated MCP Apps resource security metadata belongs on the resource
133
+ * content item `_meta.ui`. Tool-level values are kept only as a legacy
134
+ * fallback while older plugins migrate.
135
+ */
136
+ csp?: TMcpAppCsp;
137
+ /**
138
+ * @deprecated MCP Apps resource security metadata belongs on the resource
139
+ * content item `_meta.ui`. Tool-level values are kept only as a legacy
140
+ * fallback while older plugins migrate.
141
+ */
142
+ permissions?: TMcpAppPermissions;
143
+ domain?: string;
144
+ prefersBorder?: boolean;
145
+ };
146
+ export type TMcpToolAppMeta = {
147
+ serverName: string;
148
+ name: string;
149
+ displayName: string;
150
+ inputSchema?: Record<string, unknown>;
151
+ visibility: TMcpAppVisibility[];
152
+ ui?: TMcpAppUiMeta;
153
+ annotations?: Record<string, unknown>;
154
+ _meta?: Record<string, unknown>;
155
+ };
156
+ export type TMcpAppComponentData = {
157
+ type: 'McpApp';
158
+ appInstanceId: string;
159
+ appInstanceToken?: string;
160
+ resourceUri: string;
161
+ toolName: string;
162
+ toolCallId?: string;
163
+ toolsetId?: string;
164
+ serverName?: string;
165
+ executionId?: string;
166
+ title?: string | I18nObject;
167
+ description?: string | I18nObject;
168
+ icon?: IconDefinition;
169
+ csp?: TMcpAppCsp;
170
+ permissions?: TMcpAppPermissions;
171
+ domain?: string;
172
+ prefersBorder?: boolean;
173
+ toolInput?: Record<string, unknown>;
174
+ /**
175
+ * Standardized initial CallToolResult used to replay MCP App history without
176
+ * re-running the originating tool. Raw app HTML is never persisted here.
177
+ */
178
+ toolResult?: TMcpAppToolResult;
179
+ /** Serialized byte size of the initial tool result when known. */
180
+ toolResultSize?: number;
181
+ /** True when the initial tool result was too large to inline in chat history. */
182
+ toolResultTruncated?: boolean;
183
+ visibility?: TMcpAppVisibility[];
184
+ status?: 'running' | 'success' | 'fail';
185
+ error?: string;
186
+ };
@@ -6,6 +6,7 @@ import { ITag } from '../tag-entity.model';
6
6
  import { TCopilotModel } from './copilot-model.model';
7
7
  import { Subscriber } from 'rxjs';
8
8
  import { I18nObject } from '../types';
9
+ import { TMcpStdioRuntimePolicy } from './xpert-tool-mcp.model';
9
10
  export declare enum XpertToolsetCategoryEnum {
10
11
  BUILTIN = "builtin",
11
12
  API = "api",
@@ -63,6 +64,11 @@ export type TXpertToolsetOptions = {
63
64
  toolPositions?: Record<string, number>;
64
65
  disableToolDefault?: boolean;
65
66
  needSandbox?: boolean;
67
+ /**
68
+ * Runtime policy requested for MCP stdio toolsets. The server clamps this
69
+ * policy against platform and tenant-level security settings.
70
+ */
71
+ mcpRuntime?: TMcpStdioRuntimePolicy;
66
72
  [key: string]: any;
67
73
  };
68
74
  /**
@@ -187,6 +193,8 @@ export type TToolsetParams = {
187
193
  xpertId?: string;
188
194
  conversationId?: string;
189
195
  agentKey?: string;
196
+ executionId?: string;
197
+ appInstanceId?: string;
190
198
  signal?: AbortSignal;
191
199
  env: Record<string, unknown>;
192
200
  };
@@ -435,7 +435,7 @@ export interface IWFNAgentTool extends IWFNAgentWorkflow {
435
435
  }
436
436
  export interface IWFNTrigger extends IWorkflowNode {
437
437
  type: WorkflowNodeTypeEnum.TRIGGER;
438
- from: 'chat' | 'integration' | 'scheduler';
438
+ from: string;
439
439
  parameters?: TXpertParameter[];
440
440
  config?: any;
441
441
  }
@@ -544,6 +544,39 @@ export type TChatOptions = {
544
544
  */
545
545
  context?: Record<string, unknown>;
546
546
  };
547
+ export type TChatRuntimePrincipal = {
548
+ type: 'assistant';
549
+ xpertId?: string;
550
+ sourceIntegrationId?: string | null;
551
+ };
552
+ export type TChatSourceAuditOptions = {
553
+ runtimePrincipal?: TChatRuntimePrincipal;
554
+ /**
555
+ * Integration that caused this background run. Kept separate from the
556
+ * execution principal, which is normally the assistant technical account.
557
+ */
558
+ sourceIntegrationId?: string | null;
559
+ integrationId?: string | null;
560
+ channelType?: string | null;
561
+ channelSource?: string | null;
562
+ channel_source?: string | null;
563
+ channelUserId?: string | null;
564
+ uuid?: string | null;
565
+ ownerWxid?: string | null;
566
+ contactId?: string | null;
567
+ contact_id?: string | null;
568
+ chatId?: string | null;
569
+ chat_id?: string | null;
570
+ chatType?: string | null;
571
+ chat_type?: string | null;
572
+ senderId?: string | null;
573
+ sender_id?: string | null;
574
+ sourceMessageLogIds?: string[];
575
+ currentInboundLogIds?: string[];
576
+ handoffMessageId?: string | null;
577
+ handoffTraceId?: string | null;
578
+ handoffParentMessageId?: string | null;
579
+ };
547
580
  /**
548
581
  * Knowledgebase retrieval settings
549
582
  */
@@ -88,6 +88,7 @@ export type TIntegrationProvider = {
88
88
  schema?: TParameterSchema;
89
89
  features?: IntegrationFeatureEnum[];
90
90
  helpUrl?: string;
91
+ helpLabel?: I18nObject;
91
92
  /**
92
93
  * Declarative setup hints consumed by the host integration configuration UI.
93
94
  *
package/src/plugin.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
2
  import { JsonSchemaObjectType } from './ai/types';
3
3
  import type { IXpert } from './ai/xpert.model';
4
+ import type { TMcpStdioRuntimePolicy } from './ai/xpert-tool-mcp.model';
4
5
  import type { JSONValue } from './core.model';
5
6
  import { IconDefinition, I18nObject } from './types';
6
7
  export type PluginName = string;
@@ -120,6 +121,7 @@ export interface XpertPluginMcpServerPolicy {
120
121
  enabled?: boolean;
121
122
  defaultToolsApprovalMode?: PluginMcpToolApprovalMode;
122
123
  enabledTools?: string[];
124
+ runtime?: TMcpStdioRuntimePolicy;
123
125
  tools?: {
124
126
  [toolName: string]: {
125
127
  approvalMode?: PluginMcpToolApprovalMode;
@@ -173,12 +175,20 @@ export interface XpertTemplatePluginAppDependency {
173
175
  componentKey: string;
174
176
  auth?: 'on_install' | 'on_first_use';
175
177
  }
178
+ export interface XpertTemplatePluginToolsetDependency {
179
+ pluginName?: PluginName;
180
+ provider: string;
181
+ templateNodeKey: string;
182
+ targetAgentKey?: string;
183
+ instanceName?: string;
184
+ }
176
185
  export interface XpertTemplatePluginDependencies {
177
186
  plugins?: PluginName[];
178
187
  skills?: XpertTemplatePluginSkillDependency[];
179
188
  mcpServers?: XpertTemplatePluginMcpServerDependency[];
180
189
  hooks?: XpertTemplatePluginHookDependency[];
181
190
  apps?: XpertTemplatePluginAppDependency[];
191
+ toolsets?: XpertTemplatePluginToolsetDependency[];
182
192
  }
183
193
  export interface PluginMarketplaceContribution {
184
194
  id?: string;
@@ -389,6 +399,18 @@ export interface PluginMarketplaceItem {
389
399
  marketplacePlugin?: JSONValue | null;
390
400
  section?: PluginMarketplaceRegistrySection | string;
391
401
  }
402
+ export type PluginMarketplaceReadmeSource = 'installed-package' | 'npm-package' | 'marketplace-metadata' | 'description';
403
+ export interface PluginMarketplaceReadme {
404
+ locale: string;
405
+ requestedLocale?: string | null;
406
+ fileName?: string | null;
407
+ content: string;
408
+ source: PluginMarketplaceReadmeSource;
409
+ }
410
+ export interface PluginMarketplaceDetailItem extends PluginMarketplaceItem {
411
+ readme: PluginMarketplaceReadme;
412
+ availableReadmeLocales?: string[];
413
+ }
392
414
  export interface PluginMarketplaceResponse {
393
415
  updatedAt: string | null;
394
416
  total: number;
@@ -31,6 +31,8 @@ export interface ISetting {
31
31
  }
32
32
  export interface ITenantSetting extends S3FileStorageProviderConfig {
33
33
  fileStorageProvider?: string;
34
+ copilotCheckpointRetentionEnabled?: string | null;
35
+ copilotCheckpointRetentionDays?: string | null;
34
36
  tenant_title?: string;
35
37
  tenant_title_en?: string;
36
38
  tenant_enable_feishu?: boolean;
@@ -227,6 +227,11 @@ export interface XpertViewClientCommandDefinition {
227
227
  description?: I18nObject;
228
228
  permissions?: string[];
229
229
  }
230
+ export declare const ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
231
+ export declare const ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
232
+ export declare const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
233
+ export declare const ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
234
+ export declare const KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
230
235
  /**
231
236
  * Action a host should take when a view host event matches a manifest subscription.
232
237
  */
@@ -1,2 +0,0 @@
1
- import { TIntegrationProvider } from '../integration.model';
2
- export declare const IntegrationDingTalkProvider: TIntegrationProvider;