@xpert-ai/contracts 3.15.16 → 3.15.18
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 +15 -3
- package/index.esm.js +15 -4
- package/package.json +1 -1
- package/src/ai/middleware.model.d.ts +13 -1
- package/src/api-key.model.d.ts +4 -0
- package/src/index.d.ts +1 -0
- package/src/plugin.d.ts +22 -6
- package/src/runtime-control.d.ts +30 -0
- package/src/secret-token.model.d.ts +14 -0
package/index.cjs.js
CHANGED
|
@@ -3332,6 +3332,7 @@ function genXpertDBSqlKey() {
|
|
|
3332
3332
|
|
|
3333
3333
|
var PLUGIN_LEVEL = {
|
|
3334
3334
|
SYSTEM: "system",
|
|
3335
|
+
TENANT: "tenant",
|
|
3335
3336
|
ORGANIZATION: "organization"
|
|
3336
3337
|
};
|
|
3337
3338
|
var PLUGIN_SOURCE = {
|
|
@@ -5598,10 +5599,18 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
|
|
|
5598
5599
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
5599
5600
|
})(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
|
|
5600
5601
|
|
|
5601
|
-
|
|
5602
|
+
/**
|
|
5603
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
5604
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5605
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
5606
|
+
*/ exports.SecretTokenBindingType = void 0;
|
|
5602
5607
|
(function(SecretTokenBindingType) {
|
|
5603
|
-
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5604
|
-
|
|
5608
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */ SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5609
|
+
/**
|
|
5610
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5611
|
+
* as the acting business user for the interactive ChatKit run.
|
|
5612
|
+
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5613
|
+
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5605
5614
|
})(exports.SecretTokenBindingType || (exports.SecretTokenBindingType = {}));
|
|
5606
5615
|
|
|
5607
5616
|
exports.Visibility = void 0;
|
|
@@ -6277,6 +6286,8 @@ var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCom
|
|
|
6277
6286
|
var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
6278
6287
|
var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
6279
6288
|
|
|
6289
|
+
var RUNTIME_RESTART_CONFIRMATION = "RESTART";
|
|
6290
|
+
|
|
6280
6291
|
exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
|
|
6281
6292
|
exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
|
|
6282
6293
|
exports.ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = ASSISTANT_CHAT_SEND_MESSAGE_COMMAND;
|
|
@@ -6349,6 +6360,7 @@ exports.PLUGIN_RESOURCE_RUNTIME_TYPE = PLUGIN_RESOURCE_RUNTIME_TYPE;
|
|
|
6349
6360
|
exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
|
|
6350
6361
|
exports.PermissionApprovalStatus = PermissionApprovalStatus;
|
|
6351
6362
|
exports.PermissionGroups = PermissionGroups;
|
|
6363
|
+
exports.RUNTIME_RESTART_CONFIRMATION = RUNTIME_RESTART_CONFIRMATION;
|
|
6352
6364
|
exports.SANDBOX_MANAGED_SERVICE_STATUSES = SANDBOX_MANAGED_SERVICE_STATUSES;
|
|
6353
6365
|
exports.SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES;
|
|
6354
6366
|
exports.SANDBOX_TERMINAL_NAMESPACE = SANDBOX_TERMINAL_NAMESPACE;
|
package/index.esm.js
CHANGED
|
@@ -3330,6 +3330,7 @@ function genXpertDBSqlKey() {
|
|
|
3330
3330
|
|
|
3331
3331
|
var PLUGIN_LEVEL = {
|
|
3332
3332
|
SYSTEM: "system",
|
|
3333
|
+
TENANT: "tenant",
|
|
3333
3334
|
ORGANIZATION: "organization"
|
|
3334
3335
|
};
|
|
3335
3336
|
var PLUGIN_SOURCE = {
|
|
@@ -5596,10 +5597,18 @@ var OrganizationProjectBudgetTypeEnum;
|
|
|
5596
5597
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
5597
5598
|
})(OrganizationProjectBudgetTypeEnum || (OrganizationProjectBudgetTypeEnum = {}));
|
|
5598
5599
|
|
|
5599
|
-
|
|
5600
|
+
/**
|
|
5601
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
5602
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5603
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
5604
|
+
*/ var SecretTokenBindingType;
|
|
5600
5605
|
(function(SecretTokenBindingType) {
|
|
5601
|
-
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5602
|
-
|
|
5606
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */ SecretTokenBindingType["API_KEY"] = "api_key";
|
|
5607
|
+
/**
|
|
5608
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
5609
|
+
* as the acting business user for the interactive ChatKit run.
|
|
5610
|
+
*/ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
|
|
5611
|
+
/** entityId is a public Xpert id and public-app access rules apply. */ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
5603
5612
|
})(SecretTokenBindingType || (SecretTokenBindingType = {}));
|
|
5604
5613
|
|
|
5605
5614
|
var Visibility;
|
|
@@ -6275,4 +6284,6 @@ var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCom
|
|
|
6275
6284
|
var ASSISTANT_CITATION_OPEN_EVENT = "assistant.citation.open";
|
|
6276
6285
|
var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
|
|
6277
6286
|
|
|
6278
|
-
|
|
6287
|
+
var RUNTIME_RESTART_CONFIRMATION = "RESTART";
|
|
6288
|
+
|
|
6289
|
+
export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_CONTEXT_SET_COMMAND, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED, CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MCPServerType, MCP_APP_RESOURCE_MIME_TYPE, schema as MDX, MEMBERSHIP_TOKENS_PER_POINT_OPTIONS, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, MembershipLedgerSourceEnum, MembershipPeriodEnum, MembershipPlanStatusEnum, MembershipStatusEnum, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT, UserGroupManagedByEnum, UserGroupManagedEntityTypeEnum, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKBENCH_ASSISTANT_CONVERSATION_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, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, deriveXpertMarketplaceTechnicalProfile, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, parseGithubSkillInstallCommand, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkflowNode, WorkflowNodeTypeEnum } from './xpert-workflow.model';
|
|
2
|
-
import { I18nObject, IconDefinition } from '../types';
|
|
2
|
+
import { I18nObject, I18nText, IconDefinition } from '../types';
|
|
3
3
|
import { TXpertFeatureKey, TXpertGraph, TXpertTeamNode } from './xpert.model';
|
|
4
4
|
import { JsonSchemaObjectType } from './types';
|
|
5
5
|
import type { SkillSlashCommand } from './skill.model';
|
|
@@ -42,5 +42,17 @@ export type TAgentMiddlewareMeta = {
|
|
|
42
42
|
*/
|
|
43
43
|
deprecationMessage?: I18nObject;
|
|
44
44
|
};
|
|
45
|
+
export type TAgentMiddlewareSource = {
|
|
46
|
+
kind: 'builtin';
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'plugin';
|
|
49
|
+
pluginName: string;
|
|
50
|
+
displayName: I18nText;
|
|
51
|
+
icon?: IconDefinition;
|
|
52
|
+
};
|
|
53
|
+
export type TAgentMiddlewareDescriptor = {
|
|
54
|
+
meta: TAgentMiddlewareMeta;
|
|
55
|
+
source: TAgentMiddlewareSource;
|
|
56
|
+
};
|
|
45
57
|
export declare function isUserAddableAgentMiddleware(meta?: Pick<TAgentMiddlewareMeta, 'builtin'> | null): boolean;
|
|
46
58
|
export declare function getAgentMiddlewareNodes(graph: TXpertGraph, agentKey: string): TXpertTeamNode[];
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -53,8 +53,12 @@ export interface IApiPrincipal extends IUser {
|
|
|
53
53
|
apiKey?: IApiKey;
|
|
54
54
|
/**
|
|
55
55
|
* Binding target kind for short-lived client_secret principals.
|
|
56
|
+
* This is an authorization discriminator, not creator metadata: ownerUserId/
|
|
57
|
+
* createdById can be present for every binding type and must not be used to
|
|
58
|
+
* infer how secret_token.entityId should be resolved.
|
|
56
59
|
* Examples:
|
|
57
60
|
* - api_key => secret_token.entityId is the backing ApiKey id
|
|
61
|
+
* - user_xpert => secret_token.entityId is the user-authorized xpert id
|
|
58
62
|
* - public_xpert => secret_token.entityId is the public xpert id
|
|
59
63
|
*/
|
|
60
64
|
clientSecretBindingType?: SecretTokenBindingType | null;
|
package/src/index.d.ts
CHANGED
package/src/plugin.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IconDefinition, I18nObject } from './types';
|
|
|
7
7
|
export type PluginName = string;
|
|
8
8
|
export declare const PLUGIN_LEVEL: {
|
|
9
9
|
readonly SYSTEM: "system";
|
|
10
|
+
readonly TENANT: "tenant";
|
|
10
11
|
readonly ORGANIZATION: "organization";
|
|
11
12
|
};
|
|
12
13
|
export declare const PLUGIN_SOURCE: {
|
|
@@ -63,6 +64,7 @@ export declare const PLUGIN_RESOURCE_INSTALLATION_STATUS: {
|
|
|
63
64
|
/**
|
|
64
65
|
* Classifies plugin scope and governance.
|
|
65
66
|
* - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
|
|
67
|
+
* - `tenant`: tenant-owned plugin that may register process-global runtime artifacts and is activated after an API restart.
|
|
66
68
|
* - `organization`: tenant/org-managed plugin that can be installed and removed per organization.
|
|
67
69
|
*/
|
|
68
70
|
export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
|
|
@@ -318,8 +320,8 @@ export interface PluginMeta {
|
|
|
318
320
|
deprecationMessage?: I18nObject;
|
|
319
321
|
icon?: IconDefinition;
|
|
320
322
|
category: 'set' | 'doc-source' | 'agent' | 'tools' | 'model' | 'vlm' | 'vector-store' | 'integration' | 'datasource' | 'database' | 'middleware';
|
|
321
|
-
displayName: string;
|
|
322
|
-
description: string;
|
|
323
|
+
displayName: string | I18nObject;
|
|
324
|
+
description: string | I18nObject;
|
|
323
325
|
keywords?: string[];
|
|
324
326
|
author: string;
|
|
325
327
|
homepage?: string;
|
|
@@ -361,8 +363,8 @@ export interface PluginMarketplaceRegistryItem {
|
|
|
361
363
|
* When omitted, marketplace views may derive a default from the package name.
|
|
362
364
|
*/
|
|
363
365
|
artifactNamespace?: string | null;
|
|
364
|
-
displayName: string;
|
|
365
|
-
description: string;
|
|
366
|
+
displayName: string | I18nObject;
|
|
367
|
+
description: string | I18nObject;
|
|
366
368
|
category: string;
|
|
367
369
|
author: string;
|
|
368
370
|
icon?: IconDefinition | null;
|
|
@@ -390,8 +392,8 @@ export interface PluginMarketplaceRegistryItemInput {
|
|
|
390
392
|
* Keep it aligned with the plugin manifest/meta when the plugin declares one.
|
|
391
393
|
*/
|
|
392
394
|
artifactNamespace?: string | null;
|
|
393
|
-
displayName?: string;
|
|
394
|
-
description?: string;
|
|
395
|
+
displayName?: string | I18nObject;
|
|
396
|
+
description?: string | I18nObject;
|
|
395
397
|
category?: string;
|
|
396
398
|
author?: string;
|
|
397
399
|
icon?: IconDefinition | null;
|
|
@@ -514,12 +516,26 @@ export interface IPluginInstallResult {
|
|
|
514
516
|
packageName: string;
|
|
515
517
|
organizationId: string;
|
|
516
518
|
currentVersion?: string;
|
|
519
|
+
/**
|
|
520
|
+
* The plugin package was installed and persisted, but the running API process
|
|
521
|
+
* intentionally did not activate it. Process-level system and tenant plugins require a graceful
|
|
522
|
+
* API restart (or a blue-green process replacement) before this version takes effect.
|
|
523
|
+
*/
|
|
524
|
+
restartRequired?: boolean;
|
|
517
525
|
}
|
|
518
526
|
export interface IPluginUpdateResult extends IPluginInstallResult {
|
|
519
527
|
latestVersion?: string;
|
|
520
528
|
updated: boolean;
|
|
521
529
|
previousVersion?: string;
|
|
522
530
|
}
|
|
531
|
+
export interface IPluginUninstallResult {
|
|
532
|
+
success: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* The persisted registration was removed, but process-global Nest artifacts
|
|
535
|
+
* remain active until the API process is gracefully replaced.
|
|
536
|
+
*/
|
|
537
|
+
restartRequired?: boolean;
|
|
538
|
+
}
|
|
523
539
|
export interface IPluginDescriptor {
|
|
524
540
|
scopeKey?: string;
|
|
525
541
|
organizationId?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const RUNTIME_RESTART_CONFIRMATION: "RESTART";
|
|
2
|
+
export type RuntimeRestartMode = 'self-signal';
|
|
3
|
+
export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required';
|
|
4
|
+
export interface IRuntimeRestartCapability {
|
|
5
|
+
allowed: boolean;
|
|
6
|
+
mode: RuntimeRestartMode;
|
|
7
|
+
reason: RuntimeRestartCapabilityReason;
|
|
8
|
+
}
|
|
9
|
+
export interface IRuntimeRestartRequest {
|
|
10
|
+
/** Explicit second confirmation required for this destructive operation. */
|
|
11
|
+
confirmation: typeof RUNTIME_RESTART_CONFIRMATION;
|
|
12
|
+
/** Optional non-sensitive reason written to the structured server audit log. */
|
|
13
|
+
reason?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IRuntimeRestartResponse {
|
|
16
|
+
accepted: true;
|
|
17
|
+
restartId: string;
|
|
18
|
+
mode: RuntimeRestartMode;
|
|
19
|
+
instanceId: string;
|
|
20
|
+
requestedAt: string;
|
|
21
|
+
signalAfterMs: number;
|
|
22
|
+
drainTimeoutMs: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IRuntimeReadiness {
|
|
25
|
+
status: 'ready' | 'draining';
|
|
26
|
+
instanceId: string;
|
|
27
|
+
activeRequests: number;
|
|
28
|
+
restartId?: string;
|
|
29
|
+
requestedAt?: string;
|
|
30
|
+
}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
/**
|
|
3
|
+
* Selects how an opaque client secret is authorized and how entityId is
|
|
4
|
+
* interpreted. createdById only records provenance; it does not distinguish
|
|
5
|
+
* an API-key grant, a delegated user session, or a public assistant session.
|
|
6
|
+
*/
|
|
2
7
|
export declare enum SecretTokenBindingType {
|
|
8
|
+
/** entityId is an ApiKey id and the request runs as that API principal. */
|
|
3
9
|
API_KEY = "api_key",
|
|
10
|
+
/**
|
|
11
|
+
* entityId is the only Xpert this session may access; createdById is loaded
|
|
12
|
+
* as the acting business user for the interactive ChatKit run.
|
|
13
|
+
*/
|
|
14
|
+
USER_XPERT = "user_xpert",
|
|
15
|
+
/** entityId is a public Xpert id and public-app access rules apply. */
|
|
4
16
|
PUBLIC_XPERT = "public_xpert"
|
|
5
17
|
}
|
|
6
18
|
export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
|
|
19
|
+
/** Polymorphic binding id; interpret it only through type. */
|
|
7
20
|
entityId?: string;
|
|
21
|
+
/** Explicit grant/binding semantics for this opaque token. */
|
|
8
22
|
type?: SecretTokenBindingType;
|
|
9
23
|
token: string;
|
|
10
24
|
validUntil?: Date;
|