@xpert-ai/contracts 3.17.1 → 3.17.3
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 +17 -2
- package/index.esm.js +15 -3
- package/package.json +2 -2
- package/src/agent/token.d.ts +9 -0
- package/src/agent/utils.d.ts +6 -2
- package/src/ai/ai-model.model.d.ts +77 -1
- package/src/ai/copilot-usage.model.d.ts +40 -0
- package/src/ai/knowledge-doc.model.d.ts +21 -1
- package/src/ai/membership.model.d.ts +7 -1
- package/src/ai/model-usage.model.d.ts +30 -6
- package/src/ai/xpert.model.d.ts +54 -0
- package/src/api-key.model.d.ts +3 -1
- package/src/integration.model.d.ts +9 -0
- package/src/secret-token.model.d.ts +13 -0
- package/src/view-extension/model.d.ts +17 -1
package/index.cjs.js
CHANGED
|
@@ -2393,6 +2393,12 @@ exports.XpertParameterTypeEnum = void 0;
|
|
|
2393
2393
|
XpertParameterTypeEnum["BOOLEAN"] = "boolean";
|
|
2394
2394
|
XpertParameterTypeEnum["SECRET"] = "secret";
|
|
2395
2395
|
})(exports.XpertParameterTypeEnum || (exports.XpertParameterTypeEnum = {}));
|
|
2396
|
+
var ENTERPRISE_H5_PLATFORMS = [
|
|
2397
|
+
"dingtalk"
|
|
2398
|
+
];
|
|
2399
|
+
function isEnterpriseH5Platform(value) {
|
|
2400
|
+
return typeof value === "string" && ENTERPRISE_H5_PLATFORMS.includes(value);
|
|
2401
|
+
}
|
|
2396
2402
|
// Helper guards
|
|
2397
2403
|
function isXpertNodeType(type) {
|
|
2398
2404
|
return function(node) {
|
|
@@ -5536,6 +5542,10 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
|
|
|
5536
5542
|
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5537
5543
|
* as the acting business user for the interactive ChatKit run.
|
|
5538
5544
|
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5545
|
+
/**
|
|
5546
|
+
* entityId is the only Xpert this verified enterprise identity may access;
|
|
5547
|
+
* createdById is the AccountBinding-resolved Xpert user.
|
|
5548
|
+
*/ SecretTokenBindingType["ENTERPRISE_XPERT"] = "enterprise_xpert";
|
|
5539
5549
|
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5540
5550
|
})(exports.SecretTokenBindingType || (exports.SecretTokenBindingType = {}));
|
|
5541
5551
|
|
|
@@ -5798,9 +5808,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
|
|
|
5798
5808
|
}
|
|
5799
5809
|
function findStartNodes(graph, key) {
|
|
5800
5810
|
var toMap = new Map();
|
|
5811
|
+
var _graph_connections;
|
|
5801
5812
|
// Consider only horizontal processes
|
|
5802
|
-
var connections = graph.connections.filter(function(
|
|
5803
|
-
return
|
|
5813
|
+
var connections = ((_graph_connections = graph.connections) !== null && _graph_connections !== void 0 ? _graph_connections : []).filter(function(connection) {
|
|
5814
|
+
return connection.type === "edge" && typeof connection.from === "string" && typeof connection.to === "string";
|
|
5804
5815
|
});
|
|
5805
5816
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5806
5817
|
try {
|
|
@@ -6210,6 +6221,7 @@ var WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
|
6210
6221
|
var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
6211
6222
|
var WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
6212
6223
|
var WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
6224
|
+
/** Opens the current Assistant inside a Project-scoped workbench route. */ var WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
|
|
6213
6225
|
var WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
|
|
6214
6226
|
var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
6215
6227
|
var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
@@ -6249,6 +6261,7 @@ exports.DEFAULT_SYSTEM_ROLES = DEFAULT_SYSTEM_ROLES;
|
|
|
6249
6261
|
exports.DEFAULT_TENANT = DEFAULT_TENANT;
|
|
6250
6262
|
exports.DEFAULT_TIME_FORMATS = DEFAULT_TIME_FORMATS;
|
|
6251
6263
|
exports.DEFAULT_XPERT_AGENT_RECURSION_LIMIT = DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
|
|
6264
|
+
exports.ENTERPRISE_H5_PLATFORMS = ENTERPRISE_H5_PLATFORMS;
|
|
6252
6265
|
exports.FILE_VARIABLES = FILE_VARIABLES;
|
|
6253
6266
|
exports.GRAPH_NODE_SUMMARIZE_CONVERSATION = GRAPH_NODE_SUMMARIZE_CONVERSATION;
|
|
6254
6267
|
exports.GRAPH_NODE_TITLE_CONVERSATION = GRAPH_NODE_TITLE_CONVERSATION;
|
|
@@ -6339,6 +6352,7 @@ exports.USAGE_HOUR_FORMAT = USAGE_HOUR_FORMAT;
|
|
|
6339
6352
|
exports.USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT = USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT;
|
|
6340
6353
|
exports.VariableOperations = VariableOperations;
|
|
6341
6354
|
exports.WORKBENCH_ASSISTANT_CONVERSATION_TARGET = WORKBENCH_ASSISTANT_CONVERSATION_TARGET;
|
|
6355
|
+
exports.WORKBENCH_ASSISTANT_PROJECT_TARGET = WORKBENCH_ASSISTANT_PROJECT_TARGET;
|
|
6342
6356
|
exports.WORKBENCH_EXTENSION_VIEW_TARGET = WORKBENCH_EXTENSION_VIEW_TARGET;
|
|
6343
6357
|
exports.WORKBENCH_FILE_OPEN_COMMAND = WORKBENCH_FILE_OPEN_COMMAND;
|
|
6344
6358
|
exports.WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET;
|
|
@@ -6427,6 +6441,7 @@ exports.isBlank = isBlank;
|
|
|
6427
6441
|
exports.isContextCompressionComponentData = isContextCompressionComponentData;
|
|
6428
6442
|
exports.isDocumentSheet = isDocumentSheet;
|
|
6429
6443
|
exports.isEnableTool = isEnableTool;
|
|
6444
|
+
exports.isEnterpriseH5Platform = isEnterpriseH5Platform;
|
|
6430
6445
|
exports.isImageType = isImageType;
|
|
6431
6446
|
exports.isInterruptMessage = isInterruptMessage;
|
|
6432
6447
|
exports.isIteratingKey = isIteratingKey;
|
package/index.esm.js
CHANGED
|
@@ -2391,6 +2391,12 @@ var XpertParameterTypeEnum;
|
|
|
2391
2391
|
XpertParameterTypeEnum["BOOLEAN"] = "boolean";
|
|
2392
2392
|
XpertParameterTypeEnum["SECRET"] = "secret";
|
|
2393
2393
|
})(XpertParameterTypeEnum || (XpertParameterTypeEnum = {}));
|
|
2394
|
+
var ENTERPRISE_H5_PLATFORMS = [
|
|
2395
|
+
"dingtalk"
|
|
2396
|
+
];
|
|
2397
|
+
function isEnterpriseH5Platform(value) {
|
|
2398
|
+
return typeof value === "string" && ENTERPRISE_H5_PLATFORMS.includes(value);
|
|
2399
|
+
}
|
|
2394
2400
|
// Helper guards
|
|
2395
2401
|
function isXpertNodeType(type) {
|
|
2396
2402
|
return function(node) {
|
|
@@ -5534,6 +5540,10 @@ var OrganizationProjectBudgetTypeEnum;
|
|
|
5534
5540
|
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5535
5541
|
* as the acting business user for the interactive ChatKit run.
|
|
5536
5542
|
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5543
|
+
/**
|
|
5544
|
+
* entityId is the only Xpert this verified enterprise identity may access;
|
|
5545
|
+
* createdById is the AccountBinding-resolved Xpert user.
|
|
5546
|
+
*/ SecretTokenBindingType["ENTERPRISE_XPERT"] = "enterprise_xpert";
|
|
5537
5547
|
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5538
5548
|
})(SecretTokenBindingType || (SecretTokenBindingType = {}));
|
|
5539
5549
|
|
|
@@ -5796,9 +5806,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
|
|
|
5796
5806
|
}
|
|
5797
5807
|
function findStartNodes(graph, key) {
|
|
5798
5808
|
var toMap = new Map();
|
|
5809
|
+
var _graph_connections;
|
|
5799
5810
|
// Consider only horizontal processes
|
|
5800
|
-
var connections = graph.connections.filter(function(
|
|
5801
|
-
return
|
|
5811
|
+
var connections = ((_graph_connections = graph.connections) !== null && _graph_connections !== void 0 ? _graph_connections : []).filter(function(connection) {
|
|
5812
|
+
return connection.type === "edge" && typeof connection.from === "string" && typeof connection.to === "string";
|
|
5802
5813
|
});
|
|
5803
5814
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5804
5815
|
try {
|
|
@@ -6208,6 +6219,7 @@ var WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
|
6208
6219
|
var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
6209
6220
|
var WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
6210
6221
|
var WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
6222
|
+
/** Opens the current Assistant inside a Project-scoped workbench route. */ var WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
|
|
6211
6223
|
var WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
|
|
6212
6224
|
var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
6213
6225
|
var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
@@ -6215,4 +6227,4 @@ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
|
6215
6227
|
|
|
6216
6228
|
var RUNTIME_RESTART_CONFIRMATION = "RESTART";
|
|
6217
6229
|
|
|
6218
|
-
export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_CONTEXT_SET_COMMAND, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BonusTypeEnum, 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, 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_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, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, 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_OPEN_CITATION_EFFECT, KNOWLEDGE_DOCUMENTS_NAME, 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_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, 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_APP_RESOURCE_MIME_TYPE, 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_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_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, 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, 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_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, 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, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, 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, isBlank, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isNil$1 as isNil, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, parseGithubSkillInstallCommand, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
|
|
6230
|
+
export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_CONTEXT_SET_COMMAND, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BonusTypeEnum, 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, 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_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, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, ENTERPRISE_H5_PLATFORMS, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, 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_OPEN_CITATION_EFFECT, KNOWLEDGE_DOCUMENTS_NAME, 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_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, 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_APP_RESOURCE_MIME_TYPE, 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_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_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, 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, 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_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_ASSISTANT_PROJECT_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, 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, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, 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, isBlank, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isEnterpriseH5Platform, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isNil$1 as isNil, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, parseGithubSkillInstallCommand, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, 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.17.
|
|
3
|
+
"version": "3.17.3",
|
|
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.
|
|
24
|
+
"@xpert-ai/chatkit-types": "~0.5.0",
|
|
25
25
|
"zod-to-json-schema": "^3.25.2"
|
|
26
26
|
},
|
|
27
27
|
"types": "./index.d.ts"
|
package/src/agent/token.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { LLMPriceAuthority, LLMPriceBreakdownItem } from '../ai/ai-model.model';
|
|
2
|
+
import type { ModelUsagePricingStatus } from '../ai/model-usage.model';
|
|
1
3
|
export type TTokenUsage = {
|
|
2
4
|
promptTokens: number;
|
|
3
5
|
completionTokens: number;
|
|
4
6
|
totalTokens: number;
|
|
7
|
+
cacheReadInputTokens?: number;
|
|
8
|
+
cacheWriteInputTokens?: number;
|
|
5
9
|
};
|
|
6
10
|
export interface IModelUsage {
|
|
7
11
|
totalTokens: number;
|
|
@@ -18,4 +22,9 @@ export interface ILLMUsage extends IModelUsage {
|
|
|
18
22
|
completionUnitPrice: number;
|
|
19
23
|
completionPriceUnit: number;
|
|
20
24
|
completionPrice: number;
|
|
25
|
+
cacheReadInputTokens?: number;
|
|
26
|
+
cacheWriteInputTokens?: number;
|
|
27
|
+
pricingStatus?: ModelUsagePricingStatus;
|
|
28
|
+
priceAuthority?: LLMPriceAuthority;
|
|
29
|
+
pricingBreakdown?: LLMPriceBreakdownItem[];
|
|
21
30
|
}
|
package/src/agent/utils.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TXpertGraph } from '../ai/xpert.model';
|
|
2
|
-
|
|
2
|
+
type TStartNodeConnection = Partial<Pick<TXpertGraph['connections'][number], 'type' | 'from' | 'to'>>;
|
|
3
|
+
type TStartNodeGraph = {
|
|
4
|
+
connections?: TStartNodeConnection[];
|
|
5
|
+
};
|
|
3
6
|
/**
|
|
4
7
|
* Channels of all upstream and downstream nodes relative to the starting point startKey.
|
|
5
8
|
*
|
|
@@ -7,7 +10,7 @@ import { DeepPartial } from '../types';
|
|
|
7
10
|
* @param startKey
|
|
8
11
|
*/
|
|
9
12
|
export declare function allChannels(graph: TXpertGraph, startKey: string): string[];
|
|
10
|
-
export declare function findStartNodes(graph:
|
|
13
|
+
export declare function findStartNodes(graph: TStartNodeGraph, key: string): string[];
|
|
11
14
|
/**
|
|
12
15
|
* Keep the content in the same graph as the key node (including the node, its connected nodes, and the 'edge' type connections between them)
|
|
13
16
|
*
|
|
@@ -17,3 +20,4 @@ export declare function findStartNodes(graph: DeepPartial<TXpertGraph>, key: str
|
|
|
17
20
|
*/
|
|
18
21
|
export declare function getCurrentGraph(graph: TXpertGraph, key: string): TXpertGraph;
|
|
19
22
|
export declare function shortTitle(input: string): string;
|
|
23
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { AiModelTypeEnum } from '../agent/index';
|
|
|
2
2
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
3
3
|
import { I18nObject } from '../types';
|
|
4
4
|
import { ICopilot } from './copilot.model';
|
|
5
|
-
import type { ModelUsagePricingConfig } from './model-usage.model';
|
|
5
|
+
import type { ModelUsagePricingConfig, ModelUsagePricingStatus } from './model-usage.model';
|
|
6
6
|
export interface IAiModel extends IBasePerTenantAndOrganizationEntityModel {
|
|
7
7
|
/**
|
|
8
8
|
* Model name
|
|
@@ -177,12 +177,88 @@ export interface PriceTierConfig {
|
|
|
177
177
|
output?: number;
|
|
178
178
|
max_tokens: number;
|
|
179
179
|
}
|
|
180
|
+
export type LLMPriceComponent = 'input' | 'output' | 'cache_read_input' | 'cache_write_input' | 'request' | 'cache_storage';
|
|
181
|
+
export type LLMPriceAddOn = 'web_search' | 'grounding';
|
|
182
|
+
export type LLMCacheWriteTtl = '5m' | '1h';
|
|
183
|
+
export interface LLMPriceRule {
|
|
184
|
+
component: LLMPriceComponent;
|
|
185
|
+
unit_price: number;
|
|
186
|
+
unit_size: number;
|
|
187
|
+
currency?: string;
|
|
188
|
+
min_input_tokens?: number;
|
|
189
|
+
max_input_tokens?: number;
|
|
190
|
+
min_output_tokens?: number;
|
|
191
|
+
max_output_tokens?: number;
|
|
192
|
+
mode?: string;
|
|
193
|
+
region?: string;
|
|
194
|
+
service_tier?: string;
|
|
195
|
+
add_on?: LLMPriceAddOn;
|
|
196
|
+
cache_ttl?: LLMCacheWriteTtl;
|
|
197
|
+
daily_time_window?: ModelPriceDailyTimeWindow;
|
|
198
|
+
}
|
|
199
|
+
export interface LLMPriceAddOnUsage {
|
|
200
|
+
type: LLMPriceAddOn;
|
|
201
|
+
quantity: number;
|
|
202
|
+
}
|
|
203
|
+
export interface LLMUnpricedAddOnUsage extends LLMPriceAddOnUsage {
|
|
204
|
+
authority: 'request';
|
|
205
|
+
}
|
|
206
|
+
export type LLMPriceAuthority = 'catalog' | 'provider';
|
|
207
|
+
export interface ModelPriceDailyTimeWindow {
|
|
208
|
+
/** IANA time zone, for example Asia/Shanghai. */
|
|
209
|
+
time_zone: string;
|
|
210
|
+
/** Inclusive local wall-clock time in HH:mm or HH:mm:ss format. */
|
|
211
|
+
start_time: string;
|
|
212
|
+
/** Exclusive local wall-clock time in HH:mm or HH:mm:ss format. */
|
|
213
|
+
end_time: string;
|
|
214
|
+
}
|
|
215
|
+
export interface LLMReportedPrice {
|
|
216
|
+
amount: number;
|
|
217
|
+
currency: string;
|
|
218
|
+
}
|
|
219
|
+
export interface LLMPriceContext {
|
|
220
|
+
mode?: string;
|
|
221
|
+
region?: string;
|
|
222
|
+
serviceTier?: string;
|
|
223
|
+
cacheWriteTtl?: LLMCacheWriteTtl;
|
|
224
|
+
/** Provider-reported cache write token counts when one response contains multiple TTLs. */
|
|
225
|
+
cacheWriteInputTokensByTtl?: Partial<Record<LLMCacheWriteTtl, number>>;
|
|
226
|
+
/** Whether promptTokens already includes cache read and write tokens. */
|
|
227
|
+
inputTokensIncludeCache?: boolean;
|
|
228
|
+
addOns?: LLMPriceAddOnUsage[];
|
|
229
|
+
/** Requested add-ons whose actual provider usage is unavailable in the response. */
|
|
230
|
+
unpricedAddOns?: LLMUnpricedAddOnUsage[];
|
|
231
|
+
/** Stored cache volume multiplied by storage duration in hours. */
|
|
232
|
+
cacheStorageTokenHours?: number;
|
|
233
|
+
/** Wall-clock instant used to select recurring price windows. */
|
|
234
|
+
pricingTime?: Date | string;
|
|
235
|
+
}
|
|
236
|
+
export interface LLMPriceBreakdownItem {
|
|
237
|
+
component: LLMPriceComponent;
|
|
238
|
+
quantity: number;
|
|
239
|
+
pricingStatus: ModelUsagePricingStatus;
|
|
240
|
+
unitPrice?: number;
|
|
241
|
+
unit?: number;
|
|
242
|
+
amount?: number;
|
|
243
|
+
currency?: string;
|
|
244
|
+
addOn?: LLMPriceAddOn;
|
|
245
|
+
addOnAuthority?: LLMUnpricedAddOnUsage['authority'];
|
|
246
|
+
cacheTtl?: LLMCacheWriteTtl;
|
|
247
|
+
rule?: LLMPriceRule;
|
|
248
|
+
}
|
|
249
|
+
export interface LLMPriceCalculation {
|
|
250
|
+
pricingStatus: ModelUsagePricingStatus;
|
|
251
|
+
totalAmount: number;
|
|
252
|
+
currency: string;
|
|
253
|
+
breakdown: LLMPriceBreakdownItem[];
|
|
254
|
+
}
|
|
180
255
|
export interface PriceConfig {
|
|
181
256
|
input: number;
|
|
182
257
|
output?: number;
|
|
183
258
|
unit: number;
|
|
184
259
|
currency: string;
|
|
185
260
|
tiered_pricing?: PriceTierConfig[];
|
|
261
|
+
rules?: LLMPriceRule[];
|
|
186
262
|
}
|
|
187
263
|
export interface AIModelEntity extends ProviderModel {
|
|
188
264
|
parameter_rules?: ParameterRule[];
|
|
@@ -52,6 +52,45 @@ export interface ICopilotUsageTotals {
|
|
|
52
52
|
priceTotalUsed: number;
|
|
53
53
|
priceGrandTotal: number;
|
|
54
54
|
}
|
|
55
|
+
export interface ICopilotUsageOverviewBucket {
|
|
56
|
+
date: string;
|
|
57
|
+
provider?: string | null;
|
|
58
|
+
model?: string | null;
|
|
59
|
+
tokenUsed: number;
|
|
60
|
+
membershipPointsUsed: number;
|
|
61
|
+
callCount: number;
|
|
62
|
+
}
|
|
63
|
+
export interface ICopilotUsageOverviewDaily {
|
|
64
|
+
date: string;
|
|
65
|
+
tokenUsed: number;
|
|
66
|
+
membershipPointsUsed: number;
|
|
67
|
+
callCount: number;
|
|
68
|
+
activeUsers: number;
|
|
69
|
+
conversationCount: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ICopilotUsageOverviewModel {
|
|
72
|
+
provider?: string | null;
|
|
73
|
+
model?: string | null;
|
|
74
|
+
tokenUsed: number;
|
|
75
|
+
membershipPointsUsed: number;
|
|
76
|
+
callCount: number;
|
|
77
|
+
}
|
|
78
|
+
export interface ICopilotUsageOverviewModelOption {
|
|
79
|
+
provider?: string | null;
|
|
80
|
+
model: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ICopilotUsageOverview {
|
|
83
|
+
totalTokens: number;
|
|
84
|
+
totalMembershipPoints: number;
|
|
85
|
+
totalCalls: number;
|
|
86
|
+
activeUsers: number;
|
|
87
|
+
totalConversations: number;
|
|
88
|
+
activeDays: number;
|
|
89
|
+
buckets: ICopilotUsageOverviewBucket[];
|
|
90
|
+
daily: ICopilotUsageOverviewDaily[];
|
|
91
|
+
modelUsage: ICopilotUsageOverviewModel[];
|
|
92
|
+
availableModels: ICopilotUsageOverviewModelOption[];
|
|
93
|
+
}
|
|
55
94
|
export interface ICopilotUsageQuery {
|
|
56
95
|
dimension?: TCopilotUsageDimension;
|
|
57
96
|
start?: string;
|
|
@@ -59,6 +98,7 @@ export interface ICopilotUsageQuery {
|
|
|
59
98
|
provider?: string;
|
|
60
99
|
model?: string;
|
|
61
100
|
userId?: string;
|
|
101
|
+
xpertId?: string;
|
|
62
102
|
organizationId?: string;
|
|
63
103
|
currency?: string;
|
|
64
104
|
}
|
|
@@ -34,9 +34,29 @@ export type DocumentTextParserConfig = DocumentParserConfig & {
|
|
|
34
34
|
chunkSize?: number | null;
|
|
35
35
|
chunkOverlap?: number | null;
|
|
36
36
|
};
|
|
37
|
+
export type SpreadsheetInterpretation = 'records' | 'form_document';
|
|
38
|
+
export type SpreadsheetContextUnit = 'row' | 'sheet' | 'workbook';
|
|
39
|
+
export type SpreadsheetOversizePolicy = 'sheet' | 'reject';
|
|
40
|
+
export type SpreadsheetOutputFormat = 'anchored_markdown';
|
|
41
|
+
/**
|
|
42
|
+
* Spreadsheet-specific behavior used by the platform default parser.
|
|
43
|
+
* Custom document transformers take precedence over this configuration.
|
|
44
|
+
*/
|
|
45
|
+
export type DocumentSpreadsheetParserConfig = {
|
|
46
|
+
interpretation?: SpreadsheetInterpretation;
|
|
47
|
+
contextUnit?: SpreadsheetContextUnit;
|
|
48
|
+
oversizePolicy?: SpreadsheetOversizePolicy;
|
|
49
|
+
maxChunkTokens?: number;
|
|
50
|
+
includeSheets?: string[];
|
|
51
|
+
includeHiddenSheets?: boolean;
|
|
52
|
+
preserveMergedCells?: boolean;
|
|
53
|
+
emitCellAnchors?: boolean;
|
|
54
|
+
outputFormat?: SpreadsheetOutputFormat;
|
|
55
|
+
};
|
|
37
56
|
export type DocumentSheetParserConfig = DocumentParserConfig & {
|
|
38
57
|
fields?: string[];
|
|
39
58
|
indexedFields?: string[];
|
|
59
|
+
spreadsheet?: DocumentSpreadsheetParserConfig;
|
|
40
60
|
};
|
|
41
61
|
/**
|
|
42
62
|
* Import Type:
|
|
@@ -168,7 +188,7 @@ export type TKnowledgeDocument = {
|
|
|
168
188
|
* @deprecated unused
|
|
169
189
|
*/
|
|
170
190
|
parserId: string;
|
|
171
|
-
parserConfig: DocumentTextParserConfig
|
|
191
|
+
parserConfig: DocumentTextParserConfig & Partial<DocumentSheetParserConfig>;
|
|
172
192
|
/**
|
|
173
193
|
* where dose this document come from
|
|
174
194
|
*/
|
|
@@ -3,7 +3,8 @@ import { IUser } from '../user.model';
|
|
|
3
3
|
import { AiModelTypeEnum } from '../agent';
|
|
4
4
|
import { ModelAccessSourceEnum } from './model-access.model';
|
|
5
5
|
import { ModelGatewayUsageChannelEnum } from './model-gateway.model';
|
|
6
|
-
import type {
|
|
6
|
+
import type { LLMPriceAuthority, LLMPriceBreakdownItem } from './ai-model.model';
|
|
7
|
+
import type { ModelUsageMetric, ModelUsageMetricComponent, ModelUsageLedgerModality, ModelUsageLedgerOperation, ModelUsageOriginType, ModelUsagePriceRule, ModelUsagePricingDimensions, ModelUsagePricingStatus } from './model-usage.model';
|
|
7
8
|
export declare enum MembershipPlanStatusEnum {
|
|
8
9
|
Active = "active",
|
|
9
10
|
Archived = "archived"
|
|
@@ -183,6 +184,9 @@ export interface IMembershipPointLedger extends IBasePerTenantEntityModel {
|
|
|
183
184
|
toolName?: string | null;
|
|
184
185
|
modality?: ModelUsageLedgerModality | null;
|
|
185
186
|
operation?: ModelUsageLedgerOperation | null;
|
|
187
|
+
metricKey?: string | null;
|
|
188
|
+
component?: ModelUsageMetricComponent | null;
|
|
189
|
+
pricingDimensions?: ModelUsagePricingDimensions | null;
|
|
186
190
|
unit?: ModelUsageMetric['unit'] | null;
|
|
187
191
|
authority?: ModelUsageMetric['authority'] | null;
|
|
188
192
|
quantity?: number | null;
|
|
@@ -198,7 +202,9 @@ export interface IMembershipPointLedger extends IBasePerTenantEntityModel {
|
|
|
198
202
|
unitPrice?: number | null;
|
|
199
203
|
priceCurrency?: string | null;
|
|
200
204
|
priceAmount?: number | null;
|
|
205
|
+
priceAuthority?: LLMPriceAuthority | null;
|
|
201
206
|
pricingRule?: ModelUsagePriceRule | null;
|
|
207
|
+
pricingBreakdown?: LLMPriceBreakdownItem[] | null;
|
|
202
208
|
chargedAt?: Date | string | null;
|
|
203
209
|
settlementCurrency?: string | null;
|
|
204
210
|
settlementAmount?: number | null;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
2
|
import type { AiModelTypeEnum } from '../agent';
|
|
3
|
-
|
|
4
|
-
export type
|
|
3
|
+
import type { LLMPriceAuthority, LLMPriceBreakdownItem, ModelPriceDailyTimeWindow } from './ai-model.model';
|
|
4
|
+
export type ModelUsageModality = 'text' | 'audio' | 'image' | 'video';
|
|
5
|
+
export type ModelUsageLedgerModality = ModelUsageModality;
|
|
5
6
|
export type ImageGenerationOperation = 'text_to_image' | 'image_to_image' | 'multi_image_to_image';
|
|
6
7
|
export type VideoGenerationOperation = 'text_to_video' | 'image_to_video' | 'first_last_frame_to_video' | 'reference_to_video';
|
|
7
|
-
export type ModelUsageOperation = ImageGenerationOperation | VideoGenerationOperation;
|
|
8
|
-
export type ModelUsageLedgerOperation =
|
|
8
|
+
export type ModelUsageOperation = AiModelTypeEnum | ImageGenerationOperation | VideoGenerationOperation;
|
|
9
|
+
export type ModelUsageLedgerOperation = ModelUsageOperation;
|
|
9
10
|
export type ModelUsageOriginType = 'execution' | 'tool' | 'model';
|
|
10
11
|
export type ModelUsagePricingDimensions = {
|
|
11
12
|
resolution?: string;
|
|
@@ -17,6 +18,7 @@ export type ModelUsagePricingDimensions = {
|
|
|
17
18
|
export type ModelUsagePricingStatus = 'priced' | 'free' | 'unpriced';
|
|
18
19
|
export type ModelUsageChargeType = 'paid' | 'free';
|
|
19
20
|
export type ModelUsageTokenType = 'prompt' | 'completion' | 'total';
|
|
21
|
+
export type ModelUsageMetricComponent = 'input' | 'output' | 'request';
|
|
20
22
|
export type ModelUsagePriceRule = {
|
|
21
23
|
id: string;
|
|
22
24
|
version: string;
|
|
@@ -28,8 +30,10 @@ export type ModelUsagePriceRule = {
|
|
|
28
30
|
unit_price?: number;
|
|
29
31
|
currency?: string;
|
|
30
32
|
charge_type: ModelUsageChargeType;
|
|
33
|
+
component?: ModelUsageMetricComponent;
|
|
31
34
|
operations?: ModelUsageOperation[];
|
|
32
35
|
dimensions?: Partial<Omit<ModelUsagePricingDimensions, 'durationSeconds'>>;
|
|
36
|
+
daily_time_window?: ModelPriceDailyTimeWindow;
|
|
33
37
|
source_url?: string;
|
|
34
38
|
};
|
|
35
39
|
export type ModelUsagePricingConfig = {
|
|
@@ -45,9 +49,16 @@ export type ModelUsagePricingContext = {
|
|
|
45
49
|
};
|
|
46
50
|
export type ModelUsagePricingSnapshot = {
|
|
47
51
|
capturedAt: string;
|
|
52
|
+
pricingDimensions?: ModelUsagePricingDimensions;
|
|
48
53
|
rules: ModelUsagePriceRule[];
|
|
49
54
|
};
|
|
50
|
-
export type
|
|
55
|
+
export type ModelUsageMetricQualifiers = {
|
|
56
|
+
/** Stable identity inside one request. Required when component and unit are not unique. */
|
|
57
|
+
key?: string;
|
|
58
|
+
component?: ModelUsageMetricComponent;
|
|
59
|
+
pricingDimensions?: ModelUsagePricingDimensions;
|
|
60
|
+
};
|
|
61
|
+
export type ModelUsageMetric = ModelUsageMetricQualifiers & ({
|
|
51
62
|
unit: 'token';
|
|
52
63
|
promptTokens?: number;
|
|
53
64
|
completionTokens?: number;
|
|
@@ -61,7 +72,15 @@ export type ModelUsageMetric = {
|
|
|
61
72
|
unit: 'second';
|
|
62
73
|
quantity: number;
|
|
63
74
|
authority: 'provider' | 'request';
|
|
64
|
-
}
|
|
75
|
+
} | {
|
|
76
|
+
unit: 'character';
|
|
77
|
+
quantity: number;
|
|
78
|
+
authority: 'provider' | 'request';
|
|
79
|
+
} | {
|
|
80
|
+
unit: 'request';
|
|
81
|
+
quantity: number;
|
|
82
|
+
authority: 'provider' | 'contract';
|
|
83
|
+
});
|
|
65
84
|
/** Final, authoritative usage emitted after a model request has completed. */
|
|
66
85
|
export type ModelUsageReport = {
|
|
67
86
|
requestId: string;
|
|
@@ -96,6 +115,9 @@ export interface IModelUsageLedger extends IBasePerTenantAndOrganizationEntityMo
|
|
|
96
115
|
toolName?: string | null;
|
|
97
116
|
modality: ModelUsageLedgerModality;
|
|
98
117
|
operation: ModelUsageLedgerOperation;
|
|
118
|
+
metricKey: string;
|
|
119
|
+
component?: ModelUsageMetricComponent | null;
|
|
120
|
+
pricingDimensions?: ModelUsagePricingDimensions | null;
|
|
99
121
|
unit: ModelUsageMetric['unit'];
|
|
100
122
|
authority: ModelUsageMetric['authority'];
|
|
101
123
|
quantity?: number | null;
|
|
@@ -129,7 +151,9 @@ export interface IModelChargeLedger extends IBasePerTenantAndOrganizationEntityM
|
|
|
129
151
|
unitPrice?: number | null;
|
|
130
152
|
currency?: string | null;
|
|
131
153
|
amount?: number | null;
|
|
154
|
+
priceAuthority?: LLMPriceAuthority | null;
|
|
132
155
|
pricingRule?: ModelUsagePriceRule | null;
|
|
156
|
+
pricingBreakdown?: LLMPriceBreakdownItem[] | null;
|
|
133
157
|
chargedAt: Date;
|
|
134
158
|
settlementCurrency?: string | null;
|
|
135
159
|
settlementAmount?: number | null;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -249,7 +249,46 @@ export type TXpertWorkbenchOptions = {
|
|
|
249
249
|
/** Public extension view key selected when the Workbench first loads. */
|
|
250
250
|
defaultViewKey?: string;
|
|
251
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* Stable lineage for an Xpert created or updated from an Assistant template.
|
|
254
|
+
* `templateId` is the canonical lookup key. Plugin templates use
|
|
255
|
+
* `<plugin package>:<template key>` so a later sync resolves the same provider.
|
|
256
|
+
*/
|
|
257
|
+
export type TXpertTemplateSource = {
|
|
258
|
+
templateId: string;
|
|
259
|
+
templateKey: string;
|
|
260
|
+
pluginName?: string;
|
|
261
|
+
pluginDisplayName?: string;
|
|
262
|
+
source?: 'builtin' | 'plugin' | string;
|
|
263
|
+
installedAt?: string;
|
|
264
|
+
lastSyncedAt?: string;
|
|
265
|
+
releaseNotes?: string;
|
|
266
|
+
};
|
|
267
|
+
export type TXpertTemplateSyncResult = {
|
|
268
|
+
xpertId: string;
|
|
269
|
+
templateSource: TXpertTemplateSource;
|
|
270
|
+
templateTitle: string;
|
|
271
|
+
releaseNotes?: string;
|
|
272
|
+
};
|
|
273
|
+
export type TXpertDataXpertOptions = {
|
|
274
|
+
managedBy?: string;
|
|
275
|
+
templateKey?: string;
|
|
276
|
+
requiredPlugin?: string;
|
|
277
|
+
requiredPlugins?: string[];
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
};
|
|
252
280
|
export type TXpertOptions = {
|
|
281
|
+
/** Declares how an Assistant resolves the workspace used by files and Agent runs. */
|
|
282
|
+
workspaceScope?: {
|
|
283
|
+
/** Require an explicit Project, or prefer one while preserving the legacy fallback. */
|
|
284
|
+
mode: 'project-required' | 'project-preferred';
|
|
285
|
+
};
|
|
286
|
+
/** Legacy template key retained for existing plugin-authored DSL files. */
|
|
287
|
+
templateKey?: string;
|
|
288
|
+
/** Legacy Agentic App descriptor retained for backward-compatible source discovery. */
|
|
289
|
+
dataXpert?: TXpertDataXpertOptions;
|
|
290
|
+
/** Canonical source used by Studio's update-from-template operation. */
|
|
291
|
+
templateSource?: TXpertTemplateSource;
|
|
253
292
|
bootstrap?: {
|
|
254
293
|
source: 'template';
|
|
255
294
|
templateKey: string;
|
|
@@ -447,6 +486,21 @@ export type TXpertParameter = {
|
|
|
447
486
|
export type TChatApp = {
|
|
448
487
|
enabled?: boolean;
|
|
449
488
|
public?: boolean;
|
|
489
|
+
channels?: Partial<Record<TEnterpriseH5Platform, TEnterpriseH5ChannelConfig>>;
|
|
490
|
+
};
|
|
491
|
+
export declare const ENTERPRISE_H5_PLATFORMS: readonly ["dingtalk"];
|
|
492
|
+
/** Allowlisted enterprise platforms that can host an Xpert ChatKit application. */
|
|
493
|
+
export type TEnterpriseH5Platform = (typeof ENTERPRISE_H5_PLATFORMS)[number];
|
|
494
|
+
export declare function isEnterpriseH5Platform(value: unknown): value is TEnterpriseH5Platform;
|
|
495
|
+
/** Per-platform publishing configuration for an enterprise H5 ChatKit channel. */
|
|
496
|
+
export type TEnterpriseH5ChannelConfig = {
|
|
497
|
+
enabled?: boolean;
|
|
498
|
+
integrationId?: string;
|
|
499
|
+
};
|
|
500
|
+
/** Short-lived proof supplied by an enterprise H5 client for identity exchange. */
|
|
501
|
+
export type TEnterpriseH5IdentityGrant = {
|
|
502
|
+
type: 'authorization_code';
|
|
503
|
+
code: string;
|
|
450
504
|
};
|
|
451
505
|
export type TChatApi = {
|
|
452
506
|
disabled?: boolean;
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
-
import { SecretTokenBindingType } from './secret-token.model';
|
|
2
|
+
import { SecretTokenBindingType, TEnterpriseH5TokenScope } from './secret-token.model';
|
|
3
3
|
import { IUser } from './user.model';
|
|
4
4
|
/**
|
|
5
5
|
* Represents an API key used for authentication and authorization.
|
|
@@ -63,6 +63,8 @@ export interface IApiPrincipal extends IUser {
|
|
|
63
63
|
*/
|
|
64
64
|
clientSecretBindingType?: SecretTokenBindingType | null;
|
|
65
65
|
clientSecretId?: string | null;
|
|
66
|
+
/** Exact enterprise H5 channel carried by an enterprise client secret. */
|
|
67
|
+
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
66
68
|
/**
|
|
67
69
|
* Resource owner / key creator. Used for audit and ownership metadata.
|
|
68
70
|
*/
|
|
@@ -87,6 +87,15 @@ export type TIntegrationProvider = {
|
|
|
87
87
|
webhook?: boolean;
|
|
88
88
|
schema?: TParameterSchema;
|
|
89
89
|
features?: IntegrationFeatureEnum[];
|
|
90
|
+
/**
|
|
91
|
+
* Declares that this integration can exchange an enterprise H5 employee identity.
|
|
92
|
+
* The host uses these stable discriminators instead of matching provider names.
|
|
93
|
+
*/
|
|
94
|
+
enterpriseH5?: {
|
|
95
|
+
platform: string;
|
|
96
|
+
externalIdentityProvider: string;
|
|
97
|
+
accountBindingProvider?: string;
|
|
98
|
+
};
|
|
90
99
|
helpUrl?: string;
|
|
91
100
|
helpLabel?: I18nObject;
|
|
92
101
|
helpLinks?: Array<{
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
import type { TEnterpriseH5Platform } from './ai/xpert.model';
|
|
3
|
+
/** Enterprise channel and integration to which an H5 session token is bound. */
|
|
4
|
+
export type TEnterpriseH5TokenScope = {
|
|
5
|
+
platform: TEnterpriseH5Platform;
|
|
6
|
+
integrationId: string;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Selects how an opaque client secret is authorized and how entityId is
|
|
4
10
|
* interpreted. createdById only records provenance; it does not distinguish
|
|
@@ -12,6 +18,11 @@ export declare enum SecretTokenBindingType {
|
|
|
12
18
|
* as the acting business user for the interactive ChatKit run.
|
|
13
19
|
*/
|
|
14
20
|
USER_XPERT = "user_xpert",
|
|
21
|
+
/**
|
|
22
|
+
* entityId is the only Xpert this verified enterprise identity may access;
|
|
23
|
+
* createdById is the AccountBinding-resolved Xpert user.
|
|
24
|
+
*/
|
|
25
|
+
ENTERPRISE_XPERT = "enterprise_xpert",
|
|
15
26
|
/** entityId is a public Xpert id and public-app access rules apply. */
|
|
16
27
|
PUBLIC_XPERT = "public_xpert"
|
|
17
28
|
}
|
|
@@ -21,6 +32,8 @@ export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
21
32
|
/** Explicit grant/binding semantics for this opaque token. */
|
|
22
33
|
type?: SecretTokenBindingType;
|
|
23
34
|
token: string;
|
|
35
|
+
/** Exact enterprise channel that issued an ENTERPRISE_XPERT token. */
|
|
36
|
+
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
24
37
|
validUntil?: Date;
|
|
25
38
|
expired?: boolean;
|
|
26
39
|
}
|
|
@@ -254,6 +254,8 @@ export declare const WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
|
|
|
254
254
|
export declare const WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
|
|
255
255
|
export declare const WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
|
|
256
256
|
export declare const WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
|
|
257
|
+
/** Opens the current Assistant inside a Project-scoped workbench route. */
|
|
258
|
+
export declare const WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
|
|
257
259
|
export declare const WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
|
|
258
260
|
export declare const XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
|
|
259
261
|
export interface WorkbenchOpenFileEvidenceBox {
|
|
@@ -292,15 +294,25 @@ export interface WorkbenchOpenFile {
|
|
|
292
294
|
previewUrl?: string;
|
|
293
295
|
evidence?: WorkbenchOpenFileEvidence;
|
|
294
296
|
}
|
|
295
|
-
export type WorkbenchNavigationOpenTarget = typeof WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET | typeof WORKBENCH_ASSISTANT_CONVERSATION_TARGET | typeof WORKBENCH_EXTENSION_VIEW_TARGET;
|
|
297
|
+
export type WorkbenchNavigationOpenTarget = typeof WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET | typeof WORKBENCH_ASSISTANT_CONVERSATION_TARGET | typeof WORKBENCH_ASSISTANT_PROJECT_TARGET | typeof WORKBENCH_EXTENSION_VIEW_TARGET;
|
|
296
298
|
export interface WorkbenchNavigationOpenPayload {
|
|
297
299
|
target: WorkbenchNavigationOpenTarget;
|
|
298
300
|
knowledgebaseId?: string;
|
|
299
301
|
documentId?: string;
|
|
300
302
|
parentId?: string;
|
|
303
|
+
/** Exact KnowledgeDocument chunk anchor for evidence navigation. */
|
|
304
|
+
chunkId?: string;
|
|
305
|
+
/** One-based source page anchor when the document has an analysis preview. */
|
|
306
|
+
page?: number;
|
|
307
|
+
/** Parser/OCR block anchors within the source page. */
|
|
308
|
+
sourceBlockIds?: string[];
|
|
309
|
+
/** Transient source excerpt used for context/highlighting; the host must not place it in the URL. */
|
|
310
|
+
evidenceText?: string;
|
|
301
311
|
conversationId?: string;
|
|
302
312
|
threadId?: string;
|
|
303
313
|
executionId?: string;
|
|
314
|
+
/** Platform Chat Project selected for Project-scoped Assistant navigation. */
|
|
315
|
+
projectId?: string;
|
|
304
316
|
viewKey?: string;
|
|
305
317
|
selectionId?: string;
|
|
306
318
|
parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
|
|
@@ -310,6 +322,10 @@ export interface WorkbenchAssistantConversationOpenRequest {
|
|
|
310
322
|
threadId?: string;
|
|
311
323
|
executionId?: string;
|
|
312
324
|
}
|
|
325
|
+
export interface WorkbenchAssistantProjectOpenRequest {
|
|
326
|
+
/** Trusted platform Chat Project id; this is distinct from plugin business ids. */
|
|
327
|
+
projectId: string;
|
|
328
|
+
}
|
|
313
329
|
export interface WorkbenchExtensionViewOpenRequest {
|
|
314
330
|
viewKey: string;
|
|
315
331
|
selectionId?: string;
|