@xpert-ai/contracts 3.9.0 → 3.9.2
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 +45 -3
- package/index.esm.js +38 -2
- package/package.json +2 -2
- package/src/ai/chat-event.model.d.ts +1 -10
- package/src/ai/chat-message.model.d.ts +19 -17
- package/src/ai/index.d.ts +2 -0
- package/src/ai/sandbox-service.model.d.ts +62 -0
- package/src/ai/xpert-workspace.model.d.ts +14 -0
- package/src/ai/xpert.model.d.ts +1 -1
- package/src/storage-file.model.d.ts +1 -0
- package/src/tenant.model.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var ShortUniqueId = require('short-unique-id');
|
|
4
|
+
var chatkitTypes = require('@xpert-ai/chatkit-types');
|
|
4
5
|
|
|
5
6
|
function _array_like_to_array$7(arr, len) {
|
|
6
7
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -1920,7 +1921,6 @@ function _object_spread$7(target) {
|
|
|
1920
1921
|
}
|
|
1921
1922
|
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1922
1923
|
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1923
|
-
var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
|
|
1924
1924
|
function createConversationTitleSummaryEvent(event) {
|
|
1925
1925
|
return _object_spread$7({
|
|
1926
1926
|
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
@@ -1928,7 +1928,7 @@ function createConversationTitleSummaryEvent(event) {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
function createFollowUpConsumedEvent(event) {
|
|
1930
1930
|
return _object_spread$7({
|
|
1931
|
-
type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1931
|
+
type: chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1932
1932
|
}, event);
|
|
1933
1933
|
}
|
|
1934
1934
|
|
|
@@ -2894,6 +2894,33 @@ exports.SandboxTerminalErrorCode = void 0;
|
|
|
2894
2894
|
SandboxTerminalErrorCode["UnsupportedProvider"] = "unsupported_provider";
|
|
2895
2895
|
})(exports.SandboxTerminalErrorCode || (exports.SandboxTerminalErrorCode = {}));
|
|
2896
2896
|
|
|
2897
|
+
var SANDBOX_MANAGED_SERVICE_STATUSES = [
|
|
2898
|
+
"starting",
|
|
2899
|
+
"running",
|
|
2900
|
+
"stopping",
|
|
2901
|
+
"stopped",
|
|
2902
|
+
"failed",
|
|
2903
|
+
"lost"
|
|
2904
|
+
];
|
|
2905
|
+
var SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = [
|
|
2906
|
+
"none",
|
|
2907
|
+
"http"
|
|
2908
|
+
];
|
|
2909
|
+
exports.SandboxManagedServiceErrorCode = void 0;
|
|
2910
|
+
(function(SandboxManagedServiceErrorCode) {
|
|
2911
|
+
SandboxManagedServiceErrorCode["ConversationNotFound"] = "conversation_not_found";
|
|
2912
|
+
SandboxManagedServiceErrorCode["ConversationRequired"] = "conversation_required";
|
|
2913
|
+
SandboxManagedServiceErrorCode["PortRequired"] = "port_required";
|
|
2914
|
+
SandboxManagedServiceErrorCode["ProviderUnavailable"] = "provider_unavailable";
|
|
2915
|
+
SandboxManagedServiceErrorCode["PreviewUnavailable"] = "preview_unavailable";
|
|
2916
|
+
SandboxManagedServiceErrorCode["SandboxDisabled"] = "sandbox_disabled";
|
|
2917
|
+
SandboxManagedServiceErrorCode["ServiceNameConflict"] = "service_name_conflict";
|
|
2918
|
+
SandboxManagedServiceErrorCode["ServiceNotFound"] = "service_not_found";
|
|
2919
|
+
SandboxManagedServiceErrorCode["ServiceStartFailed"] = "service_start_failed";
|
|
2920
|
+
SandboxManagedServiceErrorCode["ServiceStopFailed"] = "service_stop_failed";
|
|
2921
|
+
SandboxManagedServiceErrorCode["UnsupportedProvider"] = "unsupported_provider";
|
|
2922
|
+
})(exports.SandboxManagedServiceErrorCode || (exports.SandboxManagedServiceErrorCode = {}));
|
|
2923
|
+
|
|
2897
2924
|
exports.ToolParameterType = void 0;
|
|
2898
2925
|
(function(ToolParameterType) {
|
|
2899
2926
|
ToolParameterType["STRING"] = "string";
|
|
@@ -3024,6 +3051,14 @@ exports.ToolTagEnum = void 0;
|
|
|
3024
3051
|
ToolTagEnum["OTHER"] = "other";
|
|
3025
3052
|
})(exports.ToolTagEnum || (exports.ToolTagEnum = {}));
|
|
3026
3053
|
|
|
3054
|
+
function getXpertWorkspaceVisibility(workspace) {
|
|
3055
|
+
var _workspace_settings_access, _workspace_settings;
|
|
3056
|
+
return (workspace === null || workspace === void 0 ? void 0 : (_workspace_settings = workspace.settings) === null || _workspace_settings === void 0 ? void 0 : (_workspace_settings_access = _workspace_settings.access) === null || _workspace_settings_access === void 0 ? void 0 : _workspace_settings_access.visibility) === "tenant-shared" ? "tenant-shared" : "private";
|
|
3057
|
+
}
|
|
3058
|
+
function isTenantSharedXpertWorkspace(workspace) {
|
|
3059
|
+
return getXpertWorkspaceVisibility(workspace) === "tenant-shared";
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3027
3062
|
/**
|
|
3028
3063
|
* Table status
|
|
3029
3064
|
*/ exports.XpertTableStatus = void 0;
|
|
@@ -5368,11 +5403,14 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5368
5403
|
FAILED: "failed"
|
|
5369
5404
|
};
|
|
5370
5405
|
|
|
5406
|
+
Object.defineProperty(exports, "CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED", {
|
|
5407
|
+
enumerable: true,
|
|
5408
|
+
get: function () { return chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED; }
|
|
5409
|
+
});
|
|
5371
5410
|
exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
|
|
5372
5411
|
exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
|
|
5373
5412
|
exports.Attachment_Type_Options = Attachment_Type_Options;
|
|
5374
5413
|
exports.CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
|
|
5375
|
-
exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
|
|
5376
5414
|
exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
|
|
5377
5415
|
exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
|
|
5378
5416
|
exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
|
|
@@ -5420,6 +5458,8 @@ exports.PLUGIN_LOAD_STATUS = PLUGIN_LOAD_STATUS;
|
|
|
5420
5458
|
exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
|
|
5421
5459
|
exports.PermissionApprovalStatus = PermissionApprovalStatus;
|
|
5422
5460
|
exports.PermissionGroups = PermissionGroups;
|
|
5461
|
+
exports.SANDBOX_MANAGED_SERVICE_STATUSES = SANDBOX_MANAGED_SERVICE_STATUSES;
|
|
5462
|
+
exports.SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES;
|
|
5423
5463
|
exports.SANDBOX_TERMINAL_NAMESPACE = SANDBOX_TERMINAL_NAMESPACE;
|
|
5424
5464
|
exports.SANDBOX_WORK_FOR_TYPES = SANDBOX_WORK_FOR_TYPES;
|
|
5425
5465
|
exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
|
|
@@ -5502,6 +5542,7 @@ exports.getVariableSchema = getVariableSchema;
|
|
|
5502
5542
|
exports.getWorkflowTriggers = getWorkflowTriggers;
|
|
5503
5543
|
exports.getWorkspaceFromRunnable = getWorkspaceFromRunnable;
|
|
5504
5544
|
exports.getXpertAgentRecursionLimit = getXpertAgentRecursionLimit;
|
|
5545
|
+
exports.getXpertWorkspaceVisibility = getXpertWorkspaceVisibility;
|
|
5505
5546
|
exports.inferMessageAppendContext = inferMessageAppendContext;
|
|
5506
5547
|
exports.isAgentKey = isAgentKey;
|
|
5507
5548
|
exports.isAssistantBindingSkillEnabled = isAssistantBindingSkillEnabled;
|
|
@@ -5519,6 +5560,7 @@ exports.isMessageGroup = isMessageGroup;
|
|
|
5519
5560
|
exports.isMiddlewareToolEnabled = isMiddlewareToolEnabled;
|
|
5520
5561
|
exports.isRouterKey = isRouterKey;
|
|
5521
5562
|
exports.isSystemManagedAssistant = isSystemManagedAssistant;
|
|
5563
|
+
exports.isTenantSharedXpertWorkspace = isTenantSharedXpertWorkspace;
|
|
5522
5564
|
exports.isToolEnabled = isToolEnabled;
|
|
5523
5565
|
exports.isUserManagedAssistant = isUserManagedAssistant;
|
|
5524
5566
|
exports.isVideoType = isVideoType;
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import ShortUniqueId from 'short-unique-id';
|
|
2
|
+
import { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
|
|
3
|
+
export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
|
|
2
4
|
|
|
3
5
|
function _array_like_to_array$7(arr, len) {
|
|
4
6
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -1918,7 +1920,6 @@ function _object_spread$7(target) {
|
|
|
1918
1920
|
}
|
|
1919
1921
|
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1920
1922
|
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1921
|
-
var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
|
|
1922
1923
|
function createConversationTitleSummaryEvent(event) {
|
|
1923
1924
|
return _object_spread$7({
|
|
1924
1925
|
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
@@ -2892,6 +2893,33 @@ var SandboxTerminalErrorCode;
|
|
|
2892
2893
|
SandboxTerminalErrorCode["UnsupportedProvider"] = "unsupported_provider";
|
|
2893
2894
|
})(SandboxTerminalErrorCode || (SandboxTerminalErrorCode = {}));
|
|
2894
2895
|
|
|
2896
|
+
var SANDBOX_MANAGED_SERVICE_STATUSES = [
|
|
2897
|
+
"starting",
|
|
2898
|
+
"running",
|
|
2899
|
+
"stopping",
|
|
2900
|
+
"stopped",
|
|
2901
|
+
"failed",
|
|
2902
|
+
"lost"
|
|
2903
|
+
];
|
|
2904
|
+
var SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = [
|
|
2905
|
+
"none",
|
|
2906
|
+
"http"
|
|
2907
|
+
];
|
|
2908
|
+
var SandboxManagedServiceErrorCode;
|
|
2909
|
+
(function(SandboxManagedServiceErrorCode) {
|
|
2910
|
+
SandboxManagedServiceErrorCode["ConversationNotFound"] = "conversation_not_found";
|
|
2911
|
+
SandboxManagedServiceErrorCode["ConversationRequired"] = "conversation_required";
|
|
2912
|
+
SandboxManagedServiceErrorCode["PortRequired"] = "port_required";
|
|
2913
|
+
SandboxManagedServiceErrorCode["ProviderUnavailable"] = "provider_unavailable";
|
|
2914
|
+
SandboxManagedServiceErrorCode["PreviewUnavailable"] = "preview_unavailable";
|
|
2915
|
+
SandboxManagedServiceErrorCode["SandboxDisabled"] = "sandbox_disabled";
|
|
2916
|
+
SandboxManagedServiceErrorCode["ServiceNameConflict"] = "service_name_conflict";
|
|
2917
|
+
SandboxManagedServiceErrorCode["ServiceNotFound"] = "service_not_found";
|
|
2918
|
+
SandboxManagedServiceErrorCode["ServiceStartFailed"] = "service_start_failed";
|
|
2919
|
+
SandboxManagedServiceErrorCode["ServiceStopFailed"] = "service_stop_failed";
|
|
2920
|
+
SandboxManagedServiceErrorCode["UnsupportedProvider"] = "unsupported_provider";
|
|
2921
|
+
})(SandboxManagedServiceErrorCode || (SandboxManagedServiceErrorCode = {}));
|
|
2922
|
+
|
|
2895
2923
|
var ToolParameterType;
|
|
2896
2924
|
(function(ToolParameterType) {
|
|
2897
2925
|
ToolParameterType["STRING"] = "string";
|
|
@@ -3022,6 +3050,14 @@ var ToolTagEnum;
|
|
|
3022
3050
|
ToolTagEnum["OTHER"] = "other";
|
|
3023
3051
|
})(ToolTagEnum || (ToolTagEnum = {}));
|
|
3024
3052
|
|
|
3053
|
+
function getXpertWorkspaceVisibility(workspace) {
|
|
3054
|
+
var _workspace_settings_access, _workspace_settings;
|
|
3055
|
+
return (workspace === null || workspace === void 0 ? void 0 : (_workspace_settings = workspace.settings) === null || _workspace_settings === void 0 ? void 0 : (_workspace_settings_access = _workspace_settings.access) === null || _workspace_settings_access === void 0 ? void 0 : _workspace_settings_access.visibility) === "tenant-shared" ? "tenant-shared" : "private";
|
|
3056
|
+
}
|
|
3057
|
+
function isTenantSharedXpertWorkspace(workspace) {
|
|
3058
|
+
return getXpertWorkspaceVisibility(workspace) === "tenant-shared";
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3025
3061
|
/**
|
|
3026
3062
|
* Table status
|
|
3027
3063
|
*/ var XpertTableStatus;
|
|
@@ -5366,4 +5402,4 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5366
5402
|
FAILED: "failed"
|
|
5367
5403
|
};
|
|
5368
5404
|
|
|
5369
|
-
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,
|
|
5405
|
+
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_THREAD_CONTEXT_USAGE, 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, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MCPServerType, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, 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, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRouterKey, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveMessageAppendContext, 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.9.
|
|
3
|
+
"version": "3.9.2",
|
|
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.
|
|
22
|
+
"@xpert-ai/chatkit-types": "^0.2.1"
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts"
|
|
25
25
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TFollowUpConsumedEvent, type TChatEventMessage } from '@xpert-ai/chatkit-types';
|
|
2
2
|
export declare const CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE: "thread_context_usage";
|
|
3
3
|
export declare const CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY: "conversation_title_summary";
|
|
4
|
-
export declare const CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED: "follow_up_consumed";
|
|
5
4
|
export type TConversationTitleSummaryEvent = TChatEventMessage & {
|
|
6
5
|
id?: string;
|
|
7
6
|
type: typeof CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
|
|
8
7
|
};
|
|
9
|
-
export type TFollowUpConsumedEvent = TChatEventMessage & {
|
|
10
|
-
type: typeof CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
|
|
11
|
-
mode: 'queue' | 'steer';
|
|
12
|
-
messageIds: string[];
|
|
13
|
-
clientMessageIds?: string[];
|
|
14
|
-
executionId?: string | null;
|
|
15
|
-
visibleAt?: string | null;
|
|
16
|
-
};
|
|
17
8
|
export declare function createConversationTitleSummaryEvent(event: Omit<TConversationTitleSummaryEvent, 'type'>): TConversationTitleSummaryEvent;
|
|
18
9
|
export declare function createFollowUpConsumedEvent(event: Omit<TFollowUpConsumedEvent, 'type'>): TFollowUpConsumedEvent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageType } from '@langchain/core/messages';
|
|
2
|
-
import type { TChatMessageStep, TMessageContent, TMessageContentReasoning } from '@xpert-ai/chatkit-types';
|
|
2
|
+
import type { ChatKitReference, ChatKitReferenceBase, TChatMessageStep, TMessageContent, TMessageContentReasoning } from '@xpert-ai/chatkit-types';
|
|
3
3
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
4
4
|
import { IChatConversation } from './chat.model';
|
|
5
5
|
import { LongTermMemoryTypeEnum } from './xpert.model';
|
|
@@ -12,25 +12,27 @@ export type TSummaryJob = Record<LongTermMemoryTypeEnum, {
|
|
|
12
12
|
progress?: number;
|
|
13
13
|
memoryKey?: string;
|
|
14
14
|
}>;
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
export type TChatElementAttribute = {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
export type TChatElementReferenceFields = {
|
|
20
|
+
attributes: TChatElementAttribute[];
|
|
21
|
+
outerHtml: string;
|
|
22
|
+
pageTitle?: string;
|
|
23
|
+
pageUrl: string;
|
|
24
|
+
role?: string;
|
|
25
|
+
selector: string;
|
|
26
|
+
serviceId: string;
|
|
27
|
+
tagName: string;
|
|
19
28
|
};
|
|
20
|
-
export type
|
|
21
|
-
|
|
22
|
-
path: string;
|
|
23
|
-
startLine: number;
|
|
24
|
-
endLine: number;
|
|
25
|
-
language?: string;
|
|
26
|
-
taskId?: string;
|
|
29
|
+
export type TChatElementReferenceCandidateFields = {
|
|
30
|
+
[Property in keyof TChatElementReferenceFields]?: unknown;
|
|
27
31
|
};
|
|
28
|
-
export type
|
|
29
|
-
type: '
|
|
30
|
-
messageId?: string;
|
|
31
|
-
source?: string;
|
|
32
|
+
export type TChatElementReference = ChatKitReferenceBase & TChatElementReferenceFields & {
|
|
33
|
+
type: 'element';
|
|
32
34
|
};
|
|
33
|
-
export type TChatReference =
|
|
35
|
+
export type TChatReference = ChatKitReference | TChatElementReference;
|
|
34
36
|
/**
|
|
35
37
|
* Chat message entity type
|
|
36
38
|
*/
|
package/src/ai/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare enum ChatMessageStepCategory {
|
|
|
34
34
|
Knowledges = "knowledges"
|
|
35
35
|
}
|
|
36
36
|
export type * from '@xpert-ai/chatkit-types';
|
|
37
|
+
export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
|
|
37
38
|
export type { TChatRequest } from './xpert-chat.model';
|
|
38
39
|
export * from './assistant-binding.model';
|
|
39
40
|
export * from './ai-model.model';
|
|
@@ -59,6 +60,7 @@ export * from './knowledge-doc-page.model';
|
|
|
59
60
|
export * from './role-permissions';
|
|
60
61
|
export * from './xpert-agent-execution.model';
|
|
61
62
|
export * from './sandbox-terminal.model';
|
|
63
|
+
export * from './sandbox-service.model';
|
|
62
64
|
export * from './xpert-agent.model';
|
|
63
65
|
export * from './xpert-chat.model';
|
|
64
66
|
export * from './xpert-tool.model';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { JSONValue } from '../core.model';
|
|
2
|
+
export declare const SANDBOX_MANAGED_SERVICE_STATUSES: readonly ["starting", "running", "stopping", "stopped", "failed", "lost"];
|
|
3
|
+
export type TSandboxManagedServiceStatus = (typeof SANDBOX_MANAGED_SERVICE_STATUSES)[number];
|
|
4
|
+
export declare const SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES: readonly ["none", "http"];
|
|
5
|
+
export type TSandboxManagedServiceTransportMode = (typeof SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES)[number];
|
|
6
|
+
export type TSandboxManagedServiceEnvEntry = {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
export interface ISandboxManagedService {
|
|
11
|
+
id?: string;
|
|
12
|
+
conversationId: string;
|
|
13
|
+
provider: string;
|
|
14
|
+
name: string;
|
|
15
|
+
command: string;
|
|
16
|
+
workingDirectory: string;
|
|
17
|
+
requestedPort?: number | null;
|
|
18
|
+
actualPort?: number | null;
|
|
19
|
+
previewPath?: string | null;
|
|
20
|
+
status: TSandboxManagedServiceStatus;
|
|
21
|
+
runtimeRef?: JSONValue | null;
|
|
22
|
+
transportMode?: TSandboxManagedServiceTransportMode | null;
|
|
23
|
+
ownerExecutionId?: string | null;
|
|
24
|
+
ownerAgentKey?: string | null;
|
|
25
|
+
startedAt?: Date | string | null;
|
|
26
|
+
stoppedAt?: Date | string | null;
|
|
27
|
+
exitCode?: number | null;
|
|
28
|
+
signal?: string | null;
|
|
29
|
+
metadata?: JSONValue | null;
|
|
30
|
+
previewUrl?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export type TSandboxManagedServicePreviewSession = {
|
|
33
|
+
expiresAt: string;
|
|
34
|
+
previewUrl: string;
|
|
35
|
+
};
|
|
36
|
+
export type TSandboxManagedServiceStartInput = {
|
|
37
|
+
name: string;
|
|
38
|
+
command: string;
|
|
39
|
+
cwd?: string | null;
|
|
40
|
+
port?: number | null;
|
|
41
|
+
previewPath?: string | null;
|
|
42
|
+
readyPattern?: string | null;
|
|
43
|
+
env?: TSandboxManagedServiceEnvEntry[];
|
|
44
|
+
replaceExisting?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type TSandboxManagedServiceLogs = {
|
|
47
|
+
stderr: string;
|
|
48
|
+
stdout: string;
|
|
49
|
+
};
|
|
50
|
+
export declare enum SandboxManagedServiceErrorCode {
|
|
51
|
+
ConversationNotFound = "conversation_not_found",
|
|
52
|
+
ConversationRequired = "conversation_required",
|
|
53
|
+
PortRequired = "port_required",
|
|
54
|
+
ProviderUnavailable = "provider_unavailable",
|
|
55
|
+
PreviewUnavailable = "preview_unavailable",
|
|
56
|
+
SandboxDisabled = "sandbox_disabled",
|
|
57
|
+
ServiceNameConflict = "service_name_conflict",
|
|
58
|
+
ServiceNotFound = "service_not_found",
|
|
59
|
+
ServiceStartFailed = "service_start_failed",
|
|
60
|
+
ServiceStopFailed = "service_stop_failed",
|
|
61
|
+
UnsupportedProvider = "unsupported_provider"
|
|
62
|
+
}
|
|
@@ -10,6 +10,8 @@ export interface IXpertWorkspace extends IBasePerTenantAndOrganizationEntityMode
|
|
|
10
10
|
description?: string;
|
|
11
11
|
status: TXpertWorkspaceStatus;
|
|
12
12
|
settings?: TXpertWorkspaceSettings;
|
|
13
|
+
capabilities?: TXpertWorkspaceCapabilities;
|
|
14
|
+
isTenantShared?: boolean;
|
|
13
15
|
ownerId: string;
|
|
14
16
|
owner?: IUser;
|
|
15
17
|
xperts?: IXpert[];
|
|
@@ -17,12 +19,24 @@ export interface IXpertWorkspace extends IBasePerTenantAndOrganizationEntityMode
|
|
|
17
19
|
members?: IUser[];
|
|
18
20
|
}
|
|
19
21
|
export type TXpertWorkspaceSettings = {
|
|
22
|
+
access?: {
|
|
23
|
+
visibility?: TXpertWorkspaceVisibility;
|
|
24
|
+
};
|
|
20
25
|
system?: {
|
|
21
26
|
kind?: 'org-default' | 'tenant-default' | 'user-default';
|
|
22
27
|
userId?: string;
|
|
23
28
|
};
|
|
24
29
|
};
|
|
25
30
|
export type TXpertWorkspaceStatus = 'active' | 'deprecated' | 'archived';
|
|
31
|
+
export type TXpertWorkspaceVisibility = 'private' | 'tenant-shared';
|
|
32
|
+
export type TXpertWorkspaceCapabilities = {
|
|
33
|
+
canRead: boolean;
|
|
34
|
+
canRun: boolean;
|
|
35
|
+
canWrite: boolean;
|
|
36
|
+
canManage: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare function getXpertWorkspaceVisibility(workspace?: Pick<IXpertWorkspace, 'settings'> | null): TXpertWorkspaceVisibility;
|
|
39
|
+
export declare function isTenantSharedXpertWorkspace(workspace?: Pick<IXpertWorkspace, 'settings'> | null): boolean;
|
|
26
40
|
export interface IBasePerWorkspaceEntityModel extends IBasePerTenantAndOrganizationEntityModel {
|
|
27
41
|
workspaceId?: string;
|
|
28
42
|
workspace?: IXpertWorkspace;
|
package/src/ai/xpert.model.d.ts
CHANGED
package/src/tenant.model.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IUserCreateInput } from './user.model';
|
|
|
7
7
|
export interface ITenant {
|
|
8
8
|
id?: string;
|
|
9
9
|
name?: string;
|
|
10
|
+
subdomain?: string | null;
|
|
10
11
|
readonly createdAt?: Date;
|
|
11
12
|
readonly updatedAt?: Date;
|
|
12
13
|
organizations?: IOrganization[];
|
|
@@ -17,6 +18,7 @@ export interface ITenant {
|
|
|
17
18
|
}
|
|
18
19
|
export interface ITenantCreateInput {
|
|
19
20
|
name: string;
|
|
21
|
+
subdomain?: string;
|
|
20
22
|
isImporting?: boolean;
|
|
21
23
|
sourceId?: string;
|
|
22
24
|
userSourceId?: string;
|