@xpert-ai/contracts 3.20.0 → 3.21.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
@@ -4062,6 +4062,7 @@ exports.SandboxTerminalClosedReason = void 0;
4062
4062
  exports.SandboxTerminalErrorCode = void 0;
4063
4063
  (function(SandboxTerminalErrorCode) {
4064
4064
  SandboxTerminalErrorCode["CloseFailed"] = "close_failed";
4065
+ SandboxTerminalErrorCode["ComputerDesktopRequired"] = "computer_desktop_required";
4065
4066
  SandboxTerminalErrorCode["ConversationNotFound"] = "conversation_not_found";
4066
4067
  SandboxTerminalErrorCode["ConversationRequired"] = "conversation_required";
4067
4068
  SandboxTerminalErrorCode["InputFailed"] = "input_failed";
@@ -4273,6 +4274,23 @@ function genXpertDBSqlKey() {
4273
4274
  return letterStartSUID("DBSql_");
4274
4275
  }
4275
4276
 
4277
+ /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4278
+ TENANT: "tenant",
4279
+ ORGANIZATION: "organization",
4280
+ PERSONAL: "personal"
4281
+ };
4282
+ /**
4283
+ * Lifecycle states persisted for a governed plugin application installation.
4284
+ * `degraded` means the installation record exists but one or more managed
4285
+ * resources failed the host health check.
4286
+ */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4287
+ CONFIGURING: "configuring",
4288
+ INITIALIZING: "initializing",
4289
+ READY: "ready",
4290
+ FAILED: "failed",
4291
+ DEGRADED: "degraded"
4292
+ };
4293
+
4276
4294
  var PLUGIN_LEVEL = {
4277
4295
  SYSTEM: "system",
4278
4296
  TENANT: "tenant",
@@ -4333,21 +4351,6 @@ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
4333
4351
  var PLUGIN_RESOURCE_ERROR_CODE = {
4334
4352
  NO_MATCHING_COMPONENTS: "PLUGIN_RESOURCE_NO_MATCHING_COMPONENTS"
4335
4353
  };
4336
- /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4337
- TENANT: "tenant",
4338
- ORGANIZATION: "organization",
4339
- PERSONAL: "personal"
4340
- };
4341
- /**
4342
- * Lifecycle states persisted for a governed plugin application installation.
4343
- * `degraded` means the installation record exists but one or more managed
4344
- * resources failed the host health check.
4345
- */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4346
- INITIALIZING: "initializing",
4347
- READY: "ready",
4348
- FAILED: "failed",
4349
- DEGRADED: "degraded"
4350
- };
4351
4354
  var PLUGIN_MARKETPLACE_CATEGORIES = [
4352
4355
  "featured",
4353
4356
  "business-operations",
@@ -7295,7 +7298,7 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
7295
7298
 
7296
7299
  /**
7297
7300
  * Selects how an opaque client secret is authorized and how entityId is
7298
- * interpreted. createdById only records provenance; it does not distinguish
7301
+ * interpreted. createdById alone does not distinguish
7299
7302
  * an API-key grant, a delegated user session, or a public assistant session.
7300
7303
  */ exports.SecretTokenBindingType = void 0;
7301
7304
  (function(SecretTokenBindingType) {
@@ -7304,6 +7307,11 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
7304
7307
  * entityId is the only Xpert this session may access; createdById is loaded
7305
7308
  * as the acting business user for the interactive ChatKit run.
7306
7309
  */ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
7310
+ /**
7311
+ * entityId is one conversation, initially a group. createdById is the real
7312
+ * authenticated human. This grant never authorizes unrelated conversations,
7313
+ * direct Assistant APIs or session issuance; live domain access still applies.
7314
+ */ SecretTokenBindingType["USER_CONVERSATION"] = "user_conversation";
7307
7315
  /**
7308
7316
  * entityId is the only Xpert this verified enterprise identity may access;
7309
7317
  * createdById is the AccountBinding-resolved Xpert user.
@@ -8212,6 +8220,13 @@ var executionActivityBatchSchema = v3.z.object({
8212
8220
  ])).max(5).optional()
8213
8221
  }).strict();
8214
8222
 
8223
+ /** Official resource packages imported into the selected organization, without publishing workspace bindings. */ var DEFAULT_AGENT_PLUGINS_SOURCE = {
8224
+ url: "https://github.com/xpert-ai/xpert-plugins.git",
8225
+ ref: "main",
8226
+ subdirectory: "agent-plugins",
8227
+ browseUrl: "https://github.com/xpert-ai/xpert-plugins/tree/main/agent-plugins"
8228
+ };
8229
+
8215
8230
  Object.defineProperty(exports, "createResourceCardContent", {
8216
8231
  enumerable: true,
8217
8232
  get: function () { return chatkitTypes.createResourceCardContent; }
@@ -8261,6 +8276,7 @@ exports.CONVERSATION_MAP_FEATURE = CONVERSATION_MAP_FEATURE;
8261
8276
  exports.COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING;
8262
8277
  exports.COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING;
8263
8278
  exports.ChatThreadPurpose = ChatThreadPurpose;
8279
+ exports.DEFAULT_AGENT_PLUGINS_SOURCE = DEFAULT_AGENT_PLUGINS_SOURCE;
8264
8280
  exports.DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS;
8265
8281
  exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
8266
8282
  exports.DEFAULT_DATE_FORMATS = DEFAULT_DATE_FORMATS;
package/index.esm.js CHANGED
@@ -4061,6 +4061,7 @@ var SandboxTerminalClosedReason;
4061
4061
  var SandboxTerminalErrorCode;
4062
4062
  (function(SandboxTerminalErrorCode) {
4063
4063
  SandboxTerminalErrorCode["CloseFailed"] = "close_failed";
4064
+ SandboxTerminalErrorCode["ComputerDesktopRequired"] = "computer_desktop_required";
4064
4065
  SandboxTerminalErrorCode["ConversationNotFound"] = "conversation_not_found";
4065
4066
  SandboxTerminalErrorCode["ConversationRequired"] = "conversation_required";
4066
4067
  SandboxTerminalErrorCode["InputFailed"] = "input_failed";
@@ -4272,6 +4273,23 @@ function genXpertDBSqlKey() {
4272
4273
  return letterStartSUID("DBSql_");
4273
4274
  }
4274
4275
 
4276
+ /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4277
+ TENANT: "tenant",
4278
+ ORGANIZATION: "organization",
4279
+ PERSONAL: "personal"
4280
+ };
4281
+ /**
4282
+ * Lifecycle states persisted for a governed plugin application installation.
4283
+ * `degraded` means the installation record exists but one or more managed
4284
+ * resources failed the host health check.
4285
+ */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4286
+ CONFIGURING: "configuring",
4287
+ INITIALIZING: "initializing",
4288
+ READY: "ready",
4289
+ FAILED: "failed",
4290
+ DEGRADED: "degraded"
4291
+ };
4292
+
4275
4293
  var PLUGIN_LEVEL = {
4276
4294
  SYSTEM: "system",
4277
4295
  TENANT: "tenant",
@@ -4332,21 +4350,6 @@ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
4332
4350
  var PLUGIN_RESOURCE_ERROR_CODE = {
4333
4351
  NO_MATCHING_COMPONENTS: "PLUGIN_RESOURCE_NO_MATCHING_COMPONENTS"
4334
4352
  };
4335
- /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4336
- TENANT: "tenant",
4337
- ORGANIZATION: "organization",
4338
- PERSONAL: "personal"
4339
- };
4340
- /**
4341
- * Lifecycle states persisted for a governed plugin application installation.
4342
- * `degraded` means the installation record exists but one or more managed
4343
- * resources failed the host health check.
4344
- */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4345
- INITIALIZING: "initializing",
4346
- READY: "ready",
4347
- FAILED: "failed",
4348
- DEGRADED: "degraded"
4349
- };
4350
4353
  var PLUGIN_MARKETPLACE_CATEGORIES = [
4351
4354
  "featured",
4352
4355
  "business-operations",
@@ -7294,7 +7297,7 @@ var OrganizationProjectBudgetTypeEnum;
7294
7297
 
7295
7298
  /**
7296
7299
  * Selects how an opaque client secret is authorized and how entityId is
7297
- * interpreted. createdById only records provenance; it does not distinguish
7300
+ * interpreted. createdById alone does not distinguish
7298
7301
  * an API-key grant, a delegated user session, or a public assistant session.
7299
7302
  */ var SecretTokenBindingType;
7300
7303
  (function(SecretTokenBindingType) {
@@ -7303,6 +7306,11 @@ var OrganizationProjectBudgetTypeEnum;
7303
7306
  * entityId is the only Xpert this session may access; createdById is loaded
7304
7307
  * as the acting business user for the interactive ChatKit run.
7305
7308
  */ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
7309
+ /**
7310
+ * entityId is one conversation, initially a group. createdById is the real
7311
+ * authenticated human. This grant never authorizes unrelated conversations,
7312
+ * direct Assistant APIs or session issuance; live domain access still applies.
7313
+ */ SecretTokenBindingType["USER_CONVERSATION"] = "user_conversation";
7306
7314
  /**
7307
7315
  * entityId is the only Xpert this verified enterprise identity may access;
7308
7316
  * createdById is the AccountBinding-resolved Xpert user.
@@ -8211,4 +8219,11 @@ var executionActivityBatchSchema = z.object({
8211
8219
  ])).max(5).optional()
8212
8220
  }).strict();
8213
8221
 
8214
- export { AGENT_OUTPUT_MAX_PATHS, AGENT_PROFILE_TABS_SLOT, AGENT_WORKBENCH_SLOT, AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, ASSISTANT_USER_PREFERENCES_VERSION, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BUILTIN_KNOWLEDGE_FILE_TYPES, BUILTIN_KNOWLEDGE_PARSER, BonusTypeEnum, 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, CONVERSATION_MAP_FEATURE, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ChatThreadPurpose, 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_KNOWLEDGEBASE_FAQ_CONFIG, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG, DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER, DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT, DEFAULT_KNOWLEDGE_RRF_WEIGHTS, DEFAULT_KNOWLEDGE_TEXT_SPLITTER, DEFAULT_MEMBERSHIP_CNY_PER_POINT, DEFAULT_MODEL_GATEWAY_BODY_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_CALL_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DEFAULT_XPERT_WORKSPACE_DATA_SCOPE, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, ENTERPRISE_H5_PLATFORMS, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FEEDBACK_LEARNING_STRATEGY, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GENERAL_PROJECT_TYPE, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HUMAN_PROPOSAL_STRATEGY, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES, KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM, KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET, KNOWLEDGE_CHUNKING_ALGORITHM_VERSION, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_DOCUMENT_AGENT_WRITER_TYPE, KNOWLEDGE_FAQ_ANSWER_BLOCK_MAX_COUNT, KNOWLEDGE_FAQ_ANSWER_TOTAL_MAX_LENGTH, KNOWLEDGE_FAQ_MAX_LOGICAL_VECTOR_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_STANDARD_QUESTION_MAX_LENGTH, KNOWLEDGE_FILTER_MAX_CONDITIONS, KNOWLEDGE_FILTER_MAX_DEPTH, KNOWLEDGE_FILTER_MAX_SET_VALUES, KNOWLEDGE_FILTER_MAX_STRING_LENGTH, KNOWLEDGE_FILTER_VERSION, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KNOWLEDGE_WIKI_DEFAULT_PAGE_SIZE, KNOWLEDGE_WIKI_DELETION_RECEIPT_RETENTION_DAYS, KNOWLEDGE_WIKI_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_WIKI_FAILED_CONTENT_RETENTION_DAYS, KNOWLEDGE_WIKI_MAX_ALIASES, KNOWLEDGE_WIKI_MAX_CANONICAL_NAME_LENGTH, KNOWLEDGE_WIKI_MAX_CUSTOM_INSTRUCTION_LENGTH, KNOWLEDGE_WIKI_MAX_FACTS, KNOWLEDGE_WIKI_MAX_FACT_LENGTH, KNOWLEDGE_WIKI_MAX_PAGE_SIZE, KNOWLEDGE_WIKI_MAX_SEARCH_LENGTH, KNOWLEDGE_WIKI_MAX_SOURCE_CHUNKS_PER_FACT, KNOWLEDGE_WIKI_MAX_SUGGESTED_LINKS, KNOWLEDGE_WIKI_MAX_SUMMARY_LENGTH, KNOWLEDGE_WIKI_OPERATION_RETENTION_DAYS, KNOWLEDGE_WIKI_SCHEMA_VERSION, KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_AGENT_WORKBENCH_SLOTS, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LongTermMemoryTypeEnum, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MAX_MODEL_GATEWAY_BODY_RETENTION_DAYS, MAX_MODEL_GATEWAY_CALL_RETENTION_DAYS, MAX_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MCPServerType, MCP_API_KEY_SUBJECT_TYPES, MCP_APP_RESOURCE_MIME_TYPE, MCP_AUTH_METHODS, MCP_CAPABILITY_APPROVAL_MODES, MCP_CAPABILITY_DESCRIPTOR_VERSION, MCP_CAPABILITY_TYPES, MCP_CAPABILITY_VISIBILITIES, MCP_CONSUMER_AUTH_TYPES, MCP_HTTP_CORS_EXPOSED_HEADERS, MCP_HTTP_CORS_REQUEST_HEADERS, MCP_INVOCATION_STATUSES, MCP_PROTOCOL_VERSION, MCP_PUBLICATION_REVIEW_STATUSES, MCP_PUBLICATION_STATUSES, MCP_REQUIRED_CONTEXTS, MCP_TASK_EXTENSION_ID, MCP_TASK_STATUSES, MCP_TOOL_IDEMPOTENCY, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MEMBERSHIP_CNY_PER_POINT_SETTING, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS, MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS, MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MODEL_EXECUTION_POLICY_SETTING, MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING, MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING, MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING, MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING, MembershipAdminUserStatusEnum, MembershipBulkActionEnum, MembershipLedgerSourceEnum, MembershipPeriodEnum, MembershipPeriodStatusEnum, MembershipPlanStatusEnum, MembershipRenewalModeEnum, MembershipSourceEnum, MembershipStatusEnum, MinimumProjectSizeEnum, ModelAccessActorTypeEnum, ModelAccessChannelEnum, ModelAccessClosedReasonCodeEnum, ModelAccessEventTypeEnum, ModelAccessOwnershipScopeEnum, ModelAccessRequestStatusEnum, ModelAccessSourceEnum, ModelAccessUnavailableReasonEnum, ModelFeature, ModelGatewayApiKeyLifetimeEnum, ModelGatewayApiKeyStatusEnum, ModelGatewayCallStatusEnum, ModelGatewayUsageChannelEnum, ModelGatewayUsageSourceEnum, ModelPropertyKey, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_APPLICATION_INSTALLATION_STATUS, PLUGIN_APPLICATION_SCOPE, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MARKETPLACE_SUBCATEGORIES, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, PROJECT_TASK_ICON_NAMES, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RolesEnum, SANDBOX_FILE_OUTPUT_RULES, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SKILLS_MIDDLEWARE_NAME, 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, TAG_TARGETS, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT, UserGroupManagedByEnum, UserGroupManagedEntityTypeEnum, UserModelGrantStatusEnum, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET, WORKBENCH_AGENT_EVOLUTION_TARGET, WORKBENCH_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_ASSISTANT_EXECUTION_TARGET, WORKBENCH_ASSISTANT_PROJECT_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, WORKBENCH_VIEW_OPEN_EVENT, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, XPERT_VIEW_CONVERSATION_ID_HEADER, XPERT_VIEW_PROJECT_ID_HEADER, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertProjectAssetSourceEnum, XpertProjectAutomationRunStatusEnum, XpertProjectAutomationTriggerEnum, XpertProjectPlanViewEnum, XpertProjectTaskPriorityEnum, XpertProjectTaskStatusEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentInvocationStatusSchema, agentInvocationTerminalStatusSchema, agentLabel, agentOutputDeliverySchema, agentResultPathSchema, agentRuntimeModelSourceSchema, agentRuntimeProgressSchema, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, canAllowMcpToolDirectly, channelName, chatMessagePresentation, classificateDocumentCategory, codingExecutionViewKey, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createRuntimeSkillCapabilityId, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, decodeKnowledgeSeparators, defaultMcpToolApprovalMode, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, evidenceDrivenStrategy, executionActivityBatchSchema, executionActivityCapabilitiesSchema, executionActivityItemSchema, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, forecastProjectTasks, 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, getTagTargets, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, hasEnabledKnowledgeRetrievalSource, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isBlank, isContextCompressionComponentData, isDocumentKnowledgebaseType, isDocumentSheet, isEnableTool, isEnterpriseH5Platform, isEvidenceProposal, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isKnowledgeDocumentVisible, isKnowledgeTableMetadata, isKnowledgeWikiChunkMetadata, isKnowledgeWikiPageContributionPayload, isKnowledgeWikiPageSourcePayload, isLearningProposal, isMessageGroup, isMiddlewareToolEnabled, isNativeKnowledgeTableDocument, isNil$1 as isNil, isOrganizationSharedXpertWorkspace, isOutputTokenParameter, isPreparedCandidate, isPromptWorkflowScenarios, isProviderEvaluation, isProviderRelease, isReplayEvaluation, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isRuntimeChatMessage, isScopedPromptCapabilityConfig, isStagedRelease, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, knowledgeDocumentFileType, knowledgeUploadFileTypes, knowledgebaseDocumentParserDefaults, knowledgebaseParserSelection, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, modelExecutionEntry, modelExecutionSourceId, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeKnowledgebaseFAQRecall, normalizeKnowledgebaseWikiConfig, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, orderAssistantXperts, parseGithubSkillInstallCommand, parsePromptCapabilityConfig, parsePromptCapabilitySelection, parseRuntimeSkillCapabilityId, parseWorkbenchViewOpenEvent, projectTaskDecisionInputSchema, projectTaskDecisionSchema, projectTaskDispatchInputSchema, projectTaskDispatchReceiptSchema, projectTaskEvidenceReferenceSchema, projectTaskExecutionContextSchema, projectTaskExecutionPurposeSchema, projectTaskExecutionReferenceSchema, projectTaskReviewReportSchema, projectTaskSpecificationDigestSchema, projectTaskSpecificationSchema, projectTaskSpecificationSnapshotSchema, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, resolvePromptWorkflowCapabilities, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, validateProjectTaskGraph, workflowNodeIdentifier, xpertLabel };
8222
+ /** Official resource packages imported into the selected organization, without publishing workspace bindings. */ var DEFAULT_AGENT_PLUGINS_SOURCE = {
8223
+ url: "https://github.com/xpert-ai/xpert-plugins.git",
8224
+ ref: "main",
8225
+ subdirectory: "agent-plugins",
8226
+ browseUrl: "https://github.com/xpert-ai/xpert-plugins/tree/main/agent-plugins"
8227
+ };
8228
+
8229
+ export { AGENT_OUTPUT_MAX_PATHS, AGENT_PROFILE_TABS_SLOT, AGENT_WORKBENCH_SLOT, AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, ASSISTANT_USER_PREFERENCES_VERSION, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BUILTIN_KNOWLEDGE_FILE_TYPES, BUILTIN_KNOWLEDGE_PARSER, BonusTypeEnum, 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, CONVERSATION_MAP_FEATURE, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ChatThreadPurpose, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_AGENT_PLUGINS_SOURCE, DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG, DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER, DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT, DEFAULT_KNOWLEDGE_RRF_WEIGHTS, DEFAULT_KNOWLEDGE_TEXT_SPLITTER, DEFAULT_MEMBERSHIP_CNY_PER_POINT, DEFAULT_MODEL_GATEWAY_BODY_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_CALL_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DEFAULT_XPERT_WORKSPACE_DATA_SCOPE, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, ENTERPRISE_H5_PLATFORMS, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FEEDBACK_LEARNING_STRATEGY, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GENERAL_PROJECT_TYPE, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HUMAN_PROPOSAL_STRATEGY, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES, KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM, KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET, KNOWLEDGE_CHUNKING_ALGORITHM_VERSION, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_DOCUMENT_AGENT_WRITER_TYPE, KNOWLEDGE_FAQ_ANSWER_BLOCK_MAX_COUNT, KNOWLEDGE_FAQ_ANSWER_TOTAL_MAX_LENGTH, KNOWLEDGE_FAQ_MAX_LOGICAL_VECTOR_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_STANDARD_QUESTION_MAX_LENGTH, KNOWLEDGE_FILTER_MAX_CONDITIONS, KNOWLEDGE_FILTER_MAX_DEPTH, KNOWLEDGE_FILTER_MAX_SET_VALUES, KNOWLEDGE_FILTER_MAX_STRING_LENGTH, KNOWLEDGE_FILTER_VERSION, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KNOWLEDGE_WIKI_DEFAULT_PAGE_SIZE, KNOWLEDGE_WIKI_DELETION_RECEIPT_RETENTION_DAYS, KNOWLEDGE_WIKI_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_WIKI_FAILED_CONTENT_RETENTION_DAYS, KNOWLEDGE_WIKI_MAX_ALIASES, KNOWLEDGE_WIKI_MAX_CANONICAL_NAME_LENGTH, KNOWLEDGE_WIKI_MAX_CUSTOM_INSTRUCTION_LENGTH, KNOWLEDGE_WIKI_MAX_FACTS, KNOWLEDGE_WIKI_MAX_FACT_LENGTH, KNOWLEDGE_WIKI_MAX_PAGE_SIZE, KNOWLEDGE_WIKI_MAX_SEARCH_LENGTH, KNOWLEDGE_WIKI_MAX_SOURCE_CHUNKS_PER_FACT, KNOWLEDGE_WIKI_MAX_SUGGESTED_LINKS, KNOWLEDGE_WIKI_MAX_SUMMARY_LENGTH, KNOWLEDGE_WIKI_OPERATION_RETENTION_DAYS, KNOWLEDGE_WIKI_SCHEMA_VERSION, KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_AGENT_WORKBENCH_SLOTS, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LongTermMemoryTypeEnum, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MAX_MODEL_GATEWAY_BODY_RETENTION_DAYS, MAX_MODEL_GATEWAY_CALL_RETENTION_DAYS, MAX_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MCPServerType, MCP_API_KEY_SUBJECT_TYPES, MCP_APP_RESOURCE_MIME_TYPE, MCP_AUTH_METHODS, MCP_CAPABILITY_APPROVAL_MODES, MCP_CAPABILITY_DESCRIPTOR_VERSION, MCP_CAPABILITY_TYPES, MCP_CAPABILITY_VISIBILITIES, MCP_CONSUMER_AUTH_TYPES, MCP_HTTP_CORS_EXPOSED_HEADERS, MCP_HTTP_CORS_REQUEST_HEADERS, MCP_INVOCATION_STATUSES, MCP_PROTOCOL_VERSION, MCP_PUBLICATION_REVIEW_STATUSES, MCP_PUBLICATION_STATUSES, MCP_REQUIRED_CONTEXTS, MCP_TASK_EXTENSION_ID, MCP_TASK_STATUSES, MCP_TOOL_IDEMPOTENCY, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MEMBERSHIP_CNY_PER_POINT_SETTING, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS, MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS, MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MODEL_EXECUTION_POLICY_SETTING, MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING, MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING, MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING, MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING, MembershipAdminUserStatusEnum, MembershipBulkActionEnum, MembershipLedgerSourceEnum, MembershipPeriodEnum, MembershipPeriodStatusEnum, MembershipPlanStatusEnum, MembershipRenewalModeEnum, MembershipSourceEnum, MembershipStatusEnum, MinimumProjectSizeEnum, ModelAccessActorTypeEnum, ModelAccessChannelEnum, ModelAccessClosedReasonCodeEnum, ModelAccessEventTypeEnum, ModelAccessOwnershipScopeEnum, ModelAccessRequestStatusEnum, ModelAccessSourceEnum, ModelAccessUnavailableReasonEnum, ModelFeature, ModelGatewayApiKeyLifetimeEnum, ModelGatewayApiKeyStatusEnum, ModelGatewayCallStatusEnum, ModelGatewayUsageChannelEnum, ModelGatewayUsageSourceEnum, ModelPropertyKey, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_APPLICATION_INSTALLATION_STATUS, PLUGIN_APPLICATION_SCOPE, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MARKETPLACE_SUBCATEGORIES, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, PROJECT_TASK_ICON_NAMES, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RolesEnum, SANDBOX_FILE_OUTPUT_RULES, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SKILLS_MIDDLEWARE_NAME, 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, TAG_TARGETS, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT, UserGroupManagedByEnum, UserGroupManagedEntityTypeEnum, UserModelGrantStatusEnum, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET, WORKBENCH_AGENT_EVOLUTION_TARGET, WORKBENCH_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_ASSISTANT_EXECUTION_TARGET, WORKBENCH_ASSISTANT_PROJECT_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, WORKBENCH_VIEW_OPEN_EVENT, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, XPERT_VIEW_CONVERSATION_ID_HEADER, XPERT_VIEW_PROJECT_ID_HEADER, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertProjectAssetSourceEnum, XpertProjectAutomationRunStatusEnum, XpertProjectAutomationTriggerEnum, XpertProjectPlanViewEnum, XpertProjectTaskPriorityEnum, XpertProjectTaskStatusEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentInvocationStatusSchema, agentInvocationTerminalStatusSchema, agentLabel, agentOutputDeliverySchema, agentResultPathSchema, agentRuntimeModelSourceSchema, agentRuntimeProgressSchema, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, canAllowMcpToolDirectly, channelName, chatMessagePresentation, classificateDocumentCategory, codingExecutionViewKey, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createRuntimeSkillCapabilityId, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, decodeKnowledgeSeparators, defaultMcpToolApprovalMode, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, evidenceDrivenStrategy, executionActivityBatchSchema, executionActivityCapabilitiesSchema, executionActivityItemSchema, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, forecastProjectTasks, 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, getTagTargets, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, hasEnabledKnowledgeRetrievalSource, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isBlank, isContextCompressionComponentData, isDocumentKnowledgebaseType, isDocumentSheet, isEnableTool, isEnterpriseH5Platform, isEvidenceProposal, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isKnowledgeDocumentVisible, isKnowledgeTableMetadata, isKnowledgeWikiChunkMetadata, isKnowledgeWikiPageContributionPayload, isKnowledgeWikiPageSourcePayload, isLearningProposal, isMessageGroup, isMiddlewareToolEnabled, isNativeKnowledgeTableDocument, isNil$1 as isNil, isOrganizationSharedXpertWorkspace, isOutputTokenParameter, isPreparedCandidate, isPromptWorkflowScenarios, isProviderEvaluation, isProviderRelease, isReplayEvaluation, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isRuntimeChatMessage, isScopedPromptCapabilityConfig, isStagedRelease, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, knowledgeDocumentFileType, knowledgeUploadFileTypes, knowledgebaseDocumentParserDefaults, knowledgebaseParserSelection, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, modelExecutionEntry, modelExecutionSourceId, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeKnowledgebaseFAQRecall, normalizeKnowledgebaseWikiConfig, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, orderAssistantXperts, parseGithubSkillInstallCommand, parsePromptCapabilityConfig, parsePromptCapabilitySelection, parseRuntimeSkillCapabilityId, parseWorkbenchViewOpenEvent, projectTaskDecisionInputSchema, projectTaskDecisionSchema, projectTaskDispatchInputSchema, projectTaskDispatchReceiptSchema, projectTaskEvidenceReferenceSchema, projectTaskExecutionContextSchema, projectTaskExecutionPurposeSchema, projectTaskExecutionReferenceSchema, projectTaskReviewReportSchema, projectTaskSpecificationDigestSchema, projectTaskSpecificationSchema, projectTaskSpecificationSnapshotSchema, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, resolvePromptWorkflowCapabilities, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, validateProjectTaskGraph, workflowNodeIdentifier, xpertLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.20.0",
3
+ "version": "3.21.0",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@octokit/types": "13.10.0",
23
23
  "@types/json-schema": "^7.0.15",
24
- "@xpert-ai/chatkit-types": "0.12.1",
24
+ "@xpert-ai/chatkit-types": "0.13.0",
25
25
  "zod-to-json-schema": "^3.25.2"
26
26
  },
27
27
  "peerDependencies": {
@@ -0,0 +1,93 @@
1
+ import type { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import type { ChatGroupDeliveryStatus, ChatGroupInteraction, ChatGroupParticipant } from './chat-group.model';
3
+ /**
4
+ * Persistence contracts for group collaboration. These contain internal state and must not be
5
+ * returned as public DTOs; use the explicit projections in chat-group.model.ts for group APIs.
6
+ * All records belong to a tenant and organization. groupId references ChatConversation(purpose='group').
7
+ */
8
+ /** Membership identity, Assistant runtime binding and per-member reading/context positions. */
9
+ export interface IGroupParticipant extends IBasePerTenantAndOrganizationEntityModel {
10
+ groupId: string;
11
+ kind: ChatGroupParticipant['kind'];
12
+ /** User Account ID for a human; Xpert ID for an Assistant. */
13
+ subjectId: string;
14
+ /** Display label; never use this as an identity or authorization key. */
15
+ name: string;
16
+ /** Management role; the primary Assistant is identified by the group's xpertId instead. */
17
+ role: ChatGroupParticipant['role'];
18
+ /** Removed members retain their record for message attribution. */
19
+ active: boolean;
20
+ /** Assistant-only execution conversation, with purpose='group_assistant_runtime'. */
21
+ runtimeConversationId?: string;
22
+ /** Assistant-only execution thread, separate from the public group thread. */
23
+ runtimeThreadId?: string;
24
+ /** Assistant's technical principal; execution creators must still use the real human initiator. */
25
+ principalUserId?: string;
26
+ /** Highest public message sequence incorporated into this Assistant's completed context. */
27
+ contextSequence: number;
28
+ /** Human member's last read public message sequence. */
29
+ readSequence: number;
30
+ /** Per-member list preferences, not group-wide settings. */
31
+ pinned: boolean;
32
+ archived: boolean;
33
+ }
34
+ /** Delivery/consumption receipt for one public message and recipient; not a second execution queue. */
35
+ export interface IGroupMessageRecipient extends IBasePerTenantAndOrganizationEntityModel {
36
+ groupId: string;
37
+ /** Public group ChatMessage ID. */
38
+ messageId: string;
39
+ /** Recipient membership ID, not its User/Xpert subject ID. */
40
+ participantId: string;
41
+ status: ChatGroupDeliveryStatus;
42
+ /** Whether this delivery should invoke the recipient Assistant via the existing message queue. */
43
+ wake: boolean;
44
+ /** Public group reply that fulfills this request. */
45
+ replyMessageId?: string | null;
46
+ /** Recorded Assistant execution and its runtime input message. */
47
+ executionId?: string | null;
48
+ inputMessageId?: string | null;
49
+ /** Internal admission/recovery checkpoint; separate from the public delivery status. */
50
+ phase?: 'reserved' | 'started' | 'finalized' | null;
51
+ /** Internal failure reason; not public error copy. */
52
+ error?: string | null;
53
+ /** Dispatch attempts tracked by the receipt retry policy. */
54
+ attempts: number;
55
+ /** Public context sequence included in this delivery, used to advance the member's context position. */
56
+ contextSequence: number;
57
+ nextAttemptAt: Date;
58
+ /** Persisted run admission time, used for recovery and attribution. */
59
+ startedAt?: Date | null;
60
+ /** Dispatch lease prevents workers from claiming the same receipt concurrently. */
61
+ leaseToken?: string | null;
62
+ leaseUntil?: Date | null;
63
+ /** Server-authorized continuation command retained while a paused run is resumed. */
64
+ control?: {
65
+ /** Real User Account ID authorizing the control operation. */
66
+ actorId: string;
67
+ pauseId?: string;
68
+ decision: {
69
+ type: 'confirm' | 'reject';
70
+ payload?: unknown;
71
+ };
72
+ } | null;
73
+ }
74
+ /** Persisted human interaction and claim state for an Assistant runtime interruption. */
75
+ export interface IGroupInteraction extends IBasePerTenantAndOrganizationEntityModel {
76
+ groupId: string;
77
+ /** Server-generated deduplication key; distinct from this entity's primary ID. */
78
+ interactionId: string;
79
+ /** Assistant membership owning the interrupted runtime. */
80
+ participantId: string;
81
+ /** Real User Account designated to handle the interaction. */
82
+ assignedUserId: string;
83
+ /** User Account that successfully claimed the interaction. */
84
+ claimedBy?: string | null;
85
+ status: ChatGroupInteraction['status'];
86
+ /** Delivery receipt that triggered the interrupted execution. */
87
+ recipientId: string;
88
+ runId: string;
89
+ /** Client claim UUID; binds a response/retry to the successful claim. */
90
+ claimId?: string | null;
91
+ /** Stored tool/approval requests; validate with the interaction protocol before consuming. */
92
+ payload: unknown;
93
+ }
@@ -0,0 +1,298 @@
1
+ import type { RuntimeCapabilitiesSelection } from '@xpert-ai/chatkit-types';
2
+ import type { RuntimeResourcesSelection } from '../agent-plugin';
3
+ import type { TAvatar } from '../types';
4
+ /**
5
+ * Public group protocol for ChatConversation(purpose='group'). Each Assistant has a separate runtime.
6
+ * Participant IDs identify membership within this group; subject IDs identify User or Xpert records.
7
+ * These DTOs do not grant access: validate inputs and resolve identity/permissions on the server.
8
+ * Extend machine-readable discriminants and their validators/consumers together; never infer kind from names.
9
+ */
10
+ /**
11
+ * Server-resolved communication intent, independent of whether the sender is human or an Assistant.
12
+ * `request` addresses members and may wake an Assistant; `reply` answers an existing request and
13
+ * routes back to its sender; `message` publishes information without waking addressed Assistants.
14
+ */
15
+ export type ChatGroupIntent = 'request' | 'reply' | 'message';
16
+ /** Per-recipient delivery progress, not a read receipt or the overall Assistant run status. */
17
+ export type ChatGroupDeliveryStatus =
18
+ /** Accepted for delivery; dispatch may still be pending. */
19
+ 'pending'
20
+ /** Starting an Assistant run for this message. */
21
+ | 'starting'
22
+ /** Submitted to an active run through the existing steer/follow-up mechanism. */
23
+ | 'steering'
24
+ /** Consumed by the runtime; does not by itself mean a reply has been published. */
25
+ | 'consumed'
26
+ /** Delivery cannot proceed under the current authorization or runtime state. */
27
+ | 'blocked'
28
+ /** Delivery was canceled. */
29
+ | 'canceled'
30
+ /** Dispatch failed after its retry policy was exhausted. */
31
+ | 'failed';
32
+ /** Public member profile; runtime conversation IDs and private account data are excluded. */
33
+ export interface ChatGroupParticipant {
34
+ /** GroupParticipant ID used by mentions, senders, recipients and runtime projections. */
35
+ id: string;
36
+ /** Selects the entity namespace of subjectId; also drives member-specific UI and routing. */
37
+ kind: 'user' | 'assistant';
38
+ /** User Account ID for `user`, Xpert ID for `assistant`; not a membership ID. */
39
+ subjectId: string;
40
+ /** Display label only; use IDs for identity and authorization. */
41
+ name: string;
42
+ /** Public User/Xpert avatar; absence permits a display fallback. */
43
+ avatar?: TAvatar | null;
44
+ /** Group management role; `owner` does not identify the primary Assistant. */
45
+ role: 'owner' | 'member';
46
+ /** Inactive members may remain in snapshots to identify historical message authors. */
47
+ active: boolean;
48
+ }
49
+ /** Invite candidate before membership exists; submit kind + subjectId to add the member. */
50
+ export type ChatGroupCandidate = Pick<ChatGroupParticipant, 'kind' | 'subjectId' | 'name' | 'avatar'>;
51
+ /**
52
+ * Per-message selections from the shared Composer, scoped to one addressed Assistant.
53
+ * This does not choose the recipient: the server requires a single matching Assistant recipient
54
+ * and validates project/file/capability access within that scope.
55
+ */
56
+ export interface ChatGroupComposerInput {
57
+ /** Membership ID of the Assistant whose Composer resources were selected. */
58
+ participantId: string;
59
+ /** Optional project context for this Assistant, subject to server-side access checks. */
60
+ projectId?: string;
61
+ /** Workspace file references, not file contents or arbitrary download URLs. */
62
+ files?: {
63
+ /** Workspace-relative path; currently must match workspacePath. */
64
+ filePath: string;
65
+ /** Authorized path in the target workspace; absolute paths and traversal are rejected. */
66
+ workspacePath: string;
67
+ originalName?: string;
68
+ mimeType?: string;
69
+ /** File size in bytes, when available. */
70
+ size?: number;
71
+ purpose: 'workspace';
72
+ }[];
73
+ /** Shared runtime-resource selection contract, including its own catalog revision. */
74
+ runtimeResources?: RuntimeResourcesSelection;
75
+ /** Shared capability selection contract; selection does not confer permission to use a capability. */
76
+ runtimeCapabilities?: RuntimeCapabilitiesSelection;
77
+ }
78
+ /** Server-authored routing and causality metadata; public senders cannot supply or override identity. */
79
+ export interface ChatGroupCommunication {
80
+ /** Validated Composer selections for this message, when supplied by a human sender. */
81
+ composer?: ChatGroupComposerInput;
82
+ intent: ChatGroupIntent;
83
+ /** Authenticated human or verified runtime author's membership ID. */
84
+ senderId: string;
85
+ /** Resolved membership IDs, including the original sender when intent is `reply`. */
86
+ recipientIds: string[];
87
+ /** Public group request being answered; a protocol relationship, not a required UI quote. */
88
+ replyToMessageId?: string;
89
+ /** Public group message that caused this runtime output; independent of explicit reply intent. */
90
+ causedByMessageId?: string;
91
+ /** First public message ID in the causal chain, inherited across Assistant handoffs/replies. */
92
+ rootMessageId: string;
93
+ /** Real initiating User Account ID, inherited for execution attribution; never an Assistant principal. */
94
+ rootUserId: string;
95
+ /** Causal depth: roots start at zero; inherited messages increment it for server loop limits. */
96
+ hop: number;
97
+ }
98
+ /** Public message in the shared group transcript, separate from private runtime ChatMessages. */
99
+ export interface ChatGroupMessage {
100
+ /** Persisted ChatMessage ID in the group conversation. */
101
+ id: string;
102
+ /** Correlation/idempotency key of the original submission; not the persisted message ID. */
103
+ clientMessageId: string;
104
+ /** Server-assigned order within this conversation; unchanged when this message is updated. */
105
+ sequence: number;
106
+ text: string;
107
+ /** ISO 8601 creation timestamp; sequence, not this timestamp, defines transcript order. */
108
+ createdAt: string;
109
+ communication: ChatGroupCommunication;
110
+ /** Members with linked execution records; opening one still requires separate runtime-view authorization. */
111
+ runtimeParticipantIds?: string[];
112
+ /** Delivery state per addressed member; an empty list does not imply unread or failed delivery. */
113
+ deliveries: {
114
+ participantId: string;
115
+ status: ChatGroupDeliveryStatus;
116
+ }[];
117
+ }
118
+ /**
119
+ * Binds a member to an exact `@name` span in the submitted text. Offsets use JavaScript UTF-16
120
+ * string indices: [start, end). Spans must not overlap; membership and displayed name are validated.
121
+ */
122
+ export interface ChatGroupMention {
123
+ /** Membership ID, not the User/Xpert subject ID. */
124
+ participantId: string;
125
+ /** Inclusive offset of `@`. */
126
+ start: number;
127
+ /** Exclusive offset after the member name. */
128
+ end: number;
129
+ }
130
+ /**
131
+ * Public human-message input. The server derives author, intent and recipients from trusted context
132
+ * and validated mentions. No mentions routes to the primary Assistant (conversation.xpertId);
133
+ * explicit mentions route only to those members. Busy Assistants receive input through steer.
134
+ */
135
+ export type ChatGroupSendInput = {
136
+ composer?: ChatGroupComposerInput;
137
+ /** Client-generated UUID; reuse for retries of the same submission, scoped to group and sender. */
138
+ clientMessageId: string;
139
+ /** Message text against which mention offsets are validated. */
140
+ text: string;
141
+ mentions?: ChatGroupMention[];
142
+ /** Reply candidate; it does not override @ routing or the primary-Assistant fallback. */
143
+ replyToMessageId?: string;
144
+ };
145
+ /** Identity to invite; the server resolves display data, access and the new membership ID. */
146
+ export type ChatGroupMemberInput = {
147
+ kind: 'user' | 'assistant';
148
+ subjectId: string;
149
+ };
150
+ /** Creates the shared conversation with the authenticated human as owner. */
151
+ export interface ChatGroupCreateInput {
152
+ title: string;
153
+ /** Xpert ID stored as conversation.xpertId and enrolled as the primary Assistant. */
154
+ assistantId: string;
155
+ }
156
+ /** Lightweight list entry; use a snapshot for full membership and message history. */
157
+ export interface ChatGroupSummary {
158
+ /** Stable discriminator for the shared Assistant/conversation list. */
159
+ purpose: 'group';
160
+ /** Shared ChatConversation ID, also used as groupId by APIs. */
161
+ id: string;
162
+ /** Shared conversation thread ID, not an individual Assistant runtime thread. */
163
+ threadId: string;
164
+ title: string;
165
+ /** ISO 8601 list activity time, using the latest message time when available. */
166
+ updatedAt: string;
167
+ /** Truncated preview only; never use it as the full message or for routing. */
168
+ lastMessage: string;
169
+ /** Total active members; may exceed the avatar preview count in members. */
170
+ memberCount: number;
171
+ /** Bounded active-member preview for composite avatars, not the complete roster. */
172
+ members: Pick<ChatGroupParticipant, 'id' | 'kind' | 'name' | 'avatar'>[];
173
+ /** Current viewer's unread state, based on their read sequence. */
174
+ unread: boolean;
175
+ /** Current viewer's list preference, not a group-wide setting. */
176
+ pinned: boolean;
177
+ /** Current viewer's list preference; does not archive the group for other members. */
178
+ archived: boolean;
179
+ }
180
+ /** Authorized public state plus one page of persisted messages; excludes private runtime configuration. */
181
+ export interface ChatGroupSnapshot {
182
+ /** Shared ChatConversation ID, also used as groupId by APIs. */
183
+ id: string;
184
+ /** Shared conversation thread ID; Assistant execution threads are separate. */
185
+ threadId: string;
186
+ title: string;
187
+ /** Current viewer's membership ID; compare with communication.senderId for own-message presentation. */
188
+ viewerParticipantId: string;
189
+ /** Primary Assistant's Xpert ID; match an assistant member's subjectId, not its id or role. */
190
+ xpertId: string;
191
+ /** Includes inactive members so older messages can retain their authors' identities. */
192
+ members: ChatGroupParticipant[];
193
+ /** One history page in ascending sequence order, not necessarily the full transcript. */
194
+ messages: ChatGroupMessage[];
195
+ /** Older messages exist before this page; paginate using its earliest message sequence. */
196
+ hasMore: boolean;
197
+ /** Server state version covering message, membership and delivery changes; not a message count or SSE cursor. */
198
+ revision: number;
199
+ /** Public runtime state for member threads with a recorded run, including completed/idle runs. */
200
+ runs: ChatGroupRun[];
201
+ /** Pending/claimed human interactions; full request payloads are returned only to an authorized claimant. */
202
+ interactions?: ChatGroupInteraction[];
203
+ }
204
+ /** Public summary of a runtime pause requiring a designated human's approval or client tool execution. */
205
+ export interface ChatGroupInteraction {
206
+ id: string;
207
+ /** Run that produced this interaction. */
208
+ runId: string;
209
+ /** Assistant membership ID owning the run. */
210
+ participantId: string;
211
+ /** User Account ID allowed to claim/respond; not a group membership ID. */
212
+ assignedUserId: string;
213
+ /** Claim/response lifecycle; claiming does not itself complete or resume the interaction. */
214
+ status: 'pending' | 'claimed' | 'completed' | 'canceled';
215
+ }
216
+ /** Returned after the assigned human claims an interaction; observing the group stream does not claim it. */
217
+ export interface ChatGroupInteractionClaim {
218
+ /** Interaction ID, matching ChatGroupInteraction.id. */
219
+ id: string;
220
+ /** Client claim identifier bound by the server; reuse it when responding or retrying the same claim. */
221
+ claimId: string;
222
+ /** Discriminate by kind, then validate request with the existing client-tool or approval protocol. */
223
+ requests: ({
224
+ kind: 'client_tool';
225
+ request: unknown;
226
+ } | {
227
+ kind: 'approval';
228
+ request: unknown;
229
+ })[];
230
+ }
231
+ /** Public projection of one Assistant runtime's current thread/run control state. */
232
+ export interface ChatGroupRun {
233
+ /** Assistant membership ID. */
234
+ participantId: string;
235
+ /** Execution/run identifier; not the shared group thread ID. */
236
+ runId: string;
237
+ /** Thread state, distinct from individual message delivery statuses. */
238
+ status: 'busy' | 'pausing' | 'paused' | 'interrupted' | 'idle' | 'error';
239
+ }
240
+ /**
241
+ * Public group SSE payload. Transport event IDs are opaque replay cursors, separate from revision/sequence.
242
+ * Extend this union together with stream validation and reducers; private runtime events do not belong here.
243
+ */
244
+ export type ChatGroupEvent =
245
+ /** Refresh public state and reconcile its history page by message ID. */
246
+ {
247
+ type: 'snapshot';
248
+ snapshot: ChatGroupSnapshot;
249
+ }
250
+ /** Append a text delta to a runtime output; messageId is the runtime output ID, not yet the group message ID. */
251
+ | {
252
+ type: 'text';
253
+ participantId: string;
254
+ runId: string;
255
+ messageId: string;
256
+ text: string;
257
+ }
258
+ /** Replay continuity was lost; recover from a fresh snapshot rather than trusting accumulated deltas. */
259
+ | {
260
+ type: 'resync';
261
+ };
262
+ /**
263
+ * Workspace-authorized view of the execution linked to a public group message.
264
+ * Opens in the existing external-Assistant Workbench view; group membership alone grants no runtime access.
265
+ * Contains selected display messages, never checkpoints or runtime configuration.
266
+ */
267
+ export interface ChatGroupRuntimeView {
268
+ /** Assistant's ChatConversation(purpose='group_assistant_runtime'), not the shared group conversation. */
269
+ conversationId: string;
270
+ /** Assistant runtime thread ID. */
271
+ threadId: string;
272
+ /** Xpert ID owning the execution. */
273
+ xpertId: string;
274
+ /** Corresponding Assistant membership ID in the shared group. */
275
+ participantId: string;
276
+ title: string;
277
+ avatar?: TAvatar | null;
278
+ /** Recorded execution selected by the public group message and participant. */
279
+ executionId: string;
280
+ /** Optional runtime input/output message to focus when opening the view. */
281
+ messageId?: string;
282
+ /** Execution status, distinct from the group's delivery and thread statuses. */
283
+ status: string;
284
+ /** Display projection for this execution; human runtime context is replaced with the public question. */
285
+ messages: {
286
+ /** Runtime ChatMessage ID, not the public group message ID. */
287
+ id: string;
288
+ role: string;
289
+ /** Existing message-content payload; narrow with its renderer/protocol before use. */
290
+ content: unknown;
291
+ /** Optional reasoning payload; likewise requires the existing message protocol's narrowing. */
292
+ reasoning?: unknown;
293
+ status?: string;
294
+ executionId?: string;
295
+ /** ISO 8601 timestamp. */
296
+ createdAt: string;
297
+ }[];
298
+ }