@xpert-ai/plugin-sdk 3.22.1 → 3.22.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 +14 -0
- package/index.esm.js +15 -2
- package/package.json +2 -2
- package/src/connector.d.ts +1 -0
- package/src/lib/agent/runtime/dispatch.d.ts +51 -51
- package/src/lib/connector/index.d.ts +1 -0
- package/src/lib/connector/integration.interface.d.ts +20 -0
- package/src/lib/connector/strategy.interface.d.ts +24 -0
- package/src/lib/core/permissions/general.d.ts +5 -0
- package/src/lib/integration/index.d.ts +1 -0
- package/src/lib/integration/resolve-connector-integration.query.d.ts +16 -0
- package/src/lib/runtime/capabilities/project-provisioning.d.ts +3 -3
- package/src/lib/types.d.ts +3 -2
package/index.cjs.js
CHANGED
|
@@ -869,6 +869,19 @@ exports.IntegrationStrategyRegistry = __decorate([
|
|
|
869
869
|
])
|
|
870
870
|
], exports.IntegrationStrategyRegistry);
|
|
871
871
|
|
|
872
|
+
/** Read an app for an authorized connector using its persisted scope, including public OAuth callbacks. */ class ResolveConnectorIntegrationQuery extends cqrs.Query {
|
|
873
|
+
constructor(id, provider, scope){
|
|
874
|
+
super();
|
|
875
|
+
this.id = id;
|
|
876
|
+
this.provider = provider;
|
|
877
|
+
this.scope = scope;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
ResolveConnectorIntegrationQuery.type = '[Integration] Resolve connector application';
|
|
881
|
+
Reflect.defineMetadata('__query__', {
|
|
882
|
+
id: ResolveConnectorIntegrationQuery.type
|
|
883
|
+
}, ResolveConnectorIntegrationQuery);
|
|
884
|
+
|
|
872
885
|
const WORKFLOW_TRIGGER_STRATEGY = 'WORKFLOW_TRIGGER_STRATEGY';
|
|
873
886
|
const WorkflowTriggerStrategy = (provider)=>common.applyDecorators(common.SetMetadata(WORKFLOW_TRIGGER_STRATEGY, provider), common.SetMetadata(STRATEGY_META_KEY, WORKFLOW_TRIGGER_STRATEGY));
|
|
874
887
|
|
|
@@ -10486,6 +10499,7 @@ exports.RETRIEVER_STRATEGY = RETRIEVER_STRATEGY;
|
|
|
10486
10499
|
exports.RequestContext = RequestContext;
|
|
10487
10500
|
exports.RequirePermissionOperation = RequirePermissionOperation;
|
|
10488
10501
|
exports.RerankModel = RerankModel;
|
|
10502
|
+
exports.ResolveConnectorIntegrationQuery = ResolveConnectorIntegrationQuery;
|
|
10489
10503
|
exports.ResourceCardProvider = ResourceCardProvider;
|
|
10490
10504
|
exports.RetrieverStrategy = RetrieverStrategy;
|
|
10491
10505
|
exports.SANDBOX_PROVIDER = SANDBOX_PROVIDER;
|
package/index.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ import { _ as _extends } from './_extends.esm.js';
|
|
|
10
10
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
11
11
|
import { ExtractJwt } from 'passport-jwt';
|
|
12
12
|
import { randomUUID, createHash } from 'node:crypto';
|
|
13
|
-
import { Command } from '@nestjs/cqrs';
|
|
13
|
+
import { Query, Command } from '@nestjs/cqrs';
|
|
14
14
|
import * as fs from 'fs';
|
|
15
15
|
import fs__default from 'fs';
|
|
16
16
|
import http from 'http';
|
|
@@ -851,6 +851,19 @@ IntegrationStrategyRegistry = __decorate([
|
|
|
851
851
|
])
|
|
852
852
|
], IntegrationStrategyRegistry);
|
|
853
853
|
|
|
854
|
+
/** Read an app for an authorized connector using its persisted scope, including public OAuth callbacks. */ class ResolveConnectorIntegrationQuery extends Query {
|
|
855
|
+
constructor(id, provider, scope){
|
|
856
|
+
super();
|
|
857
|
+
this.id = id;
|
|
858
|
+
this.provider = provider;
|
|
859
|
+
this.scope = scope;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
ResolveConnectorIntegrationQuery.type = '[Integration] Resolve connector application';
|
|
863
|
+
Reflect.defineMetadata('__query__', {
|
|
864
|
+
id: ResolveConnectorIntegrationQuery.type
|
|
865
|
+
}, ResolveConnectorIntegrationQuery);
|
|
866
|
+
|
|
854
867
|
const WORKFLOW_TRIGGER_STRATEGY = 'WORKFLOW_TRIGGER_STRATEGY';
|
|
855
868
|
const WorkflowTriggerStrategy = (provider)=>applyDecorators(SetMetadata(WORKFLOW_TRIGGER_STRATEGY, provider), SetMetadata(STRATEGY_META_KEY, WORKFLOW_TRIGGER_STRATEGY));
|
|
856
869
|
|
|
@@ -10255,4 +10268,4 @@ Reflect.defineMetadata('__command__', {
|
|
|
10255
10268
|
id: ImportDefaultAgentPluginsCommand.type
|
|
10256
10269
|
}, ImportDefaultAgentPluginsCommand);
|
|
10257
10270
|
|
|
10258
|
-
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, ViewMiddlewareRuntimeCapability, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyModelConfiguration, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, discoverOpenAIModels, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries };
|
|
10271
|
+
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResolveConnectorIntegrationQuery, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, ViewMiddlewareRuntimeCapability, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyModelConfiguration, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, discoverOpenAIModels, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/plugin-sdk",
|
|
3
|
-
"version": "3.22.
|
|
3
|
+
"version": "3.22.2",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@langchain/openai": "0.6.9",
|
|
65
|
-
"@xpert-ai/contracts": "3.21.
|
|
65
|
+
"@xpert-ai/contracts": "3.21.3",
|
|
66
66
|
"express": "^4.22.1",
|
|
67
67
|
"js-tiktoken": "^1.0.21"
|
|
68
68
|
},
|
package/src/connector.d.ts
CHANGED
|
@@ -250,21 +250,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
250
250
|
}>]>;
|
|
251
251
|
}, "strict", z.ZodTypeAny, {
|
|
252
252
|
projectId?: string;
|
|
253
|
-
specification?: {
|
|
254
|
-
digest?: string;
|
|
255
|
-
specification?: {
|
|
256
|
-
description?: string;
|
|
257
|
-
version?: 1;
|
|
258
|
-
title?: string;
|
|
259
|
-
steps?: {
|
|
260
|
-
description?: string;
|
|
261
|
-
stepIndex?: number;
|
|
262
|
-
}[];
|
|
263
|
-
requirements?: string[];
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
projectTaskId?: string;
|
|
267
|
-
taskExecutionId?: string;
|
|
268
253
|
purpose?: {
|
|
269
254
|
type?: "implementation";
|
|
270
255
|
} | {
|
|
@@ -286,8 +271,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
286
271
|
snapshotId?: string;
|
|
287
272
|
})[];
|
|
288
273
|
};
|
|
289
|
-
}, {
|
|
290
|
-
projectId?: string;
|
|
291
274
|
specification?: {
|
|
292
275
|
digest?: string;
|
|
293
276
|
specification?: {
|
|
@@ -303,6 +286,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
303
286
|
};
|
|
304
287
|
projectTaskId?: string;
|
|
305
288
|
taskExecutionId?: string;
|
|
289
|
+
}, {
|
|
290
|
+
projectId?: string;
|
|
306
291
|
purpose?: {
|
|
307
292
|
type?: "implementation";
|
|
308
293
|
} | {
|
|
@@ -324,8 +309,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
324
309
|
snapshotId?: string;
|
|
325
310
|
})[];
|
|
326
311
|
};
|
|
327
|
-
}>, {
|
|
328
|
-
projectId?: string;
|
|
329
312
|
specification?: {
|
|
330
313
|
digest?: string;
|
|
331
314
|
specification?: {
|
|
@@ -341,6 +324,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
341
324
|
};
|
|
342
325
|
projectTaskId?: string;
|
|
343
326
|
taskExecutionId?: string;
|
|
327
|
+
}>, {
|
|
328
|
+
projectId?: string;
|
|
344
329
|
purpose?: {
|
|
345
330
|
type?: "implementation";
|
|
346
331
|
} | {
|
|
@@ -362,8 +347,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
362
347
|
snapshotId?: string;
|
|
363
348
|
})[];
|
|
364
349
|
};
|
|
365
|
-
}, {
|
|
366
|
-
projectId?: string;
|
|
367
350
|
specification?: {
|
|
368
351
|
digest?: string;
|
|
369
352
|
specification?: {
|
|
@@ -379,6 +362,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
379
362
|
};
|
|
380
363
|
projectTaskId?: string;
|
|
381
364
|
taskExecutionId?: string;
|
|
365
|
+
}, {
|
|
366
|
+
projectId?: string;
|
|
382
367
|
purpose?: {
|
|
383
368
|
type?: "implementation";
|
|
384
369
|
} | {
|
|
@@ -400,6 +385,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
400
385
|
snapshotId?: string;
|
|
401
386
|
})[];
|
|
402
387
|
};
|
|
388
|
+
specification?: {
|
|
389
|
+
digest?: string;
|
|
390
|
+
specification?: {
|
|
391
|
+
description?: string;
|
|
392
|
+
version?: 1;
|
|
393
|
+
title?: string;
|
|
394
|
+
steps?: {
|
|
395
|
+
description?: string;
|
|
396
|
+
stepIndex?: number;
|
|
397
|
+
}[];
|
|
398
|
+
requirements?: string[];
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
projectTaskId?: string;
|
|
402
|
+
taskExecutionId?: string;
|
|
403
403
|
}>>;
|
|
404
404
|
}, "strict", z.ZodTypeAny, {
|
|
405
405
|
version?: 1;
|
|
@@ -420,21 +420,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
420
420
|
};
|
|
421
421
|
projectTask?: {
|
|
422
422
|
projectId?: string;
|
|
423
|
-
specification?: {
|
|
424
|
-
digest?: string;
|
|
425
|
-
specification?: {
|
|
426
|
-
description?: string;
|
|
427
|
-
version?: 1;
|
|
428
|
-
title?: string;
|
|
429
|
-
steps?: {
|
|
430
|
-
description?: string;
|
|
431
|
-
stepIndex?: number;
|
|
432
|
-
}[];
|
|
433
|
-
requirements?: string[];
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
|
-
projectTaskId?: string;
|
|
437
|
-
taskExecutionId?: string;
|
|
438
423
|
purpose?: {
|
|
439
424
|
type?: "implementation";
|
|
440
425
|
} | {
|
|
@@ -456,6 +441,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
456
441
|
snapshotId?: string;
|
|
457
442
|
})[];
|
|
458
443
|
};
|
|
444
|
+
specification?: {
|
|
445
|
+
digest?: string;
|
|
446
|
+
specification?: {
|
|
447
|
+
description?: string;
|
|
448
|
+
version?: 1;
|
|
449
|
+
title?: string;
|
|
450
|
+
steps?: {
|
|
451
|
+
description?: string;
|
|
452
|
+
stepIndex?: number;
|
|
453
|
+
}[];
|
|
454
|
+
requirements?: string[];
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
projectTaskId?: string;
|
|
458
|
+
taskExecutionId?: string;
|
|
459
459
|
};
|
|
460
460
|
}, {
|
|
461
461
|
version?: 1;
|
|
@@ -476,21 +476,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
476
476
|
};
|
|
477
477
|
projectTask?: {
|
|
478
478
|
projectId?: string;
|
|
479
|
-
specification?: {
|
|
480
|
-
digest?: string;
|
|
481
|
-
specification?: {
|
|
482
|
-
description?: string;
|
|
483
|
-
version?: 1;
|
|
484
|
-
title?: string;
|
|
485
|
-
steps?: {
|
|
486
|
-
description?: string;
|
|
487
|
-
stepIndex?: number;
|
|
488
|
-
}[];
|
|
489
|
-
requirements?: string[];
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
projectTaskId?: string;
|
|
493
|
-
taskExecutionId?: string;
|
|
494
479
|
purpose?: {
|
|
495
480
|
type?: "implementation";
|
|
496
481
|
} | {
|
|
@@ -512,6 +497,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
|
|
|
512
497
|
snapshotId?: string;
|
|
513
498
|
})[];
|
|
514
499
|
};
|
|
500
|
+
specification?: {
|
|
501
|
+
digest?: string;
|
|
502
|
+
specification?: {
|
|
503
|
+
description?: string;
|
|
504
|
+
version?: 1;
|
|
505
|
+
title?: string;
|
|
506
|
+
steps?: {
|
|
507
|
+
description?: string;
|
|
508
|
+
stepIndex?: number;
|
|
509
|
+
}[];
|
|
510
|
+
requirements?: string[];
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
projectTaskId?: string;
|
|
514
|
+
taskExecutionId?: string;
|
|
515
515
|
};
|
|
516
516
|
}>;
|
|
517
517
|
export type AgentInvocationDispatchContext = z.output<typeof agentInvocationDispatchContextSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ConnectorIntegrationOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
organizationId: string | null;
|
|
5
|
+
};
|
|
6
|
+
export type ConnectorIntegrationSelection = {
|
|
7
|
+
type: 'existing';
|
|
8
|
+
integrationId: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'new';
|
|
11
|
+
requestId: string;
|
|
12
|
+
name: string;
|
|
13
|
+
values: {
|
|
14
|
+
[field: string]: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type ConnectorIntegrationRequest = {
|
|
18
|
+
authMethodId: string;
|
|
19
|
+
selection: ConnectorIntegrationSelection;
|
|
20
|
+
};
|
|
@@ -32,6 +32,11 @@ export type ConnectorAppCredentialField = {
|
|
|
32
32
|
};
|
|
33
33
|
export type ConnectorAppCredentialsConfig = {
|
|
34
34
|
fields?: ConnectorAppCredentialField[];
|
|
35
|
+
/** Persist application credentials in a system integration; connections only retain its ID. */
|
|
36
|
+
integration?: {
|
|
37
|
+
provider: string;
|
|
38
|
+
fields: ConnectorAppCredentialField[];
|
|
39
|
+
};
|
|
35
40
|
help?: {
|
|
36
41
|
label: RuntimeI18nText;
|
|
37
42
|
url: string;
|
|
@@ -52,6 +57,8 @@ export type ConnectorAuthorizationPresentation = {
|
|
|
52
57
|
type ConnectorAuthMethodBase = {
|
|
53
58
|
id: string;
|
|
54
59
|
label: RuntimeI18nText;
|
|
60
|
+
/** Retained for stored credentials and in-flight callbacks, not new authorizations. */
|
|
61
|
+
deprecated?: boolean;
|
|
55
62
|
authorizationPresentation?: ConnectorAuthorizationPresentation;
|
|
56
63
|
};
|
|
57
64
|
export type ConnectorAuthMethodDefinition = ConnectorAuthMethodBase & ({
|
|
@@ -72,6 +79,12 @@ export type ConnectorPermissionDeclaration = {
|
|
|
72
79
|
required?: boolean;
|
|
73
80
|
};
|
|
74
81
|
export type ConnectorDefinitionBase = {
|
|
82
|
+
/** Explicit MCP resources whose old generic OAuth connections this provider can replace. */
|
|
83
|
+
mcpOAuthResources?: string[];
|
|
84
|
+
/** Native provider used by a compatibility definition that retains its old provider ID. */
|
|
85
|
+
canonicalProvider?: string;
|
|
86
|
+
/** Imported dependency is visible but its provider is not installed in this scope. */
|
|
87
|
+
unavailable?: string;
|
|
75
88
|
runtimeUsage?: 'middleware' | 'credential';
|
|
76
89
|
provider: string;
|
|
77
90
|
label: RuntimeI18nText;
|
|
@@ -116,6 +129,8 @@ export type ConnectorInstance = {
|
|
|
116
129
|
authorizationMode?: ConnectorAuthorizationMode;
|
|
117
130
|
provider: string;
|
|
118
131
|
authMethodId?: string | null;
|
|
132
|
+
/** Selected application configuration, never its secrets. */
|
|
133
|
+
appIntegrationId?: string | null;
|
|
119
134
|
status: ConnectorStatus;
|
|
120
135
|
profile?: ConnectorProfile | null;
|
|
121
136
|
scopes?: string[];
|
|
@@ -140,6 +155,7 @@ export type ConnectorBindingCreateRequest = {
|
|
|
140
155
|
authorizationMode: ConnectorAuthorizationMode;
|
|
141
156
|
};
|
|
142
157
|
export type ConnectorRuntimeOption = {
|
|
158
|
+
canonicalProvider?: string;
|
|
143
159
|
scope?: ConnectorScope;
|
|
144
160
|
canManage?: boolean;
|
|
145
161
|
managementUrl?: string;
|
|
@@ -303,7 +319,12 @@ export type ConnectorCredential = {
|
|
|
303
319
|
scopes?: string[];
|
|
304
320
|
profile?: ConnectorProfile | null;
|
|
305
321
|
};
|
|
322
|
+
export type ConnectorProviderScope = {
|
|
323
|
+
tenantId: string;
|
|
324
|
+
organizationId: string | null;
|
|
325
|
+
};
|
|
306
326
|
export type ConnectorConnectInput = {
|
|
327
|
+
scope?: ConnectorProviderScope;
|
|
307
328
|
authMethodId: string;
|
|
308
329
|
values?: ConnectorAppCredentialPayload;
|
|
309
330
|
redirectUri: string;
|
|
@@ -321,6 +342,7 @@ export type ConnectorConnectResult = {
|
|
|
321
342
|
credential: ConnectorCredential;
|
|
322
343
|
};
|
|
323
344
|
export type ConnectorAuthorizationCodeInput = {
|
|
345
|
+
scope?: ConnectorProviderScope;
|
|
324
346
|
authMethodId: string;
|
|
325
347
|
values?: ConnectorAppCredentialPayload;
|
|
326
348
|
metadata?: Record<string, unknown> | null;
|
|
@@ -351,6 +373,7 @@ export type ConnectorConnectionPollResult = {
|
|
|
351
373
|
metadata?: Record<string, unknown>;
|
|
352
374
|
};
|
|
353
375
|
export type ConnectorCredentialRefreshInput = {
|
|
376
|
+
scope?: ConnectorProviderScope;
|
|
354
377
|
authMethodId: string;
|
|
355
378
|
credential: ConnectorCredential;
|
|
356
379
|
};
|
|
@@ -361,6 +384,7 @@ export type ConnectorCredentialRevokeInput = {
|
|
|
361
384
|
reason: ConnectorCredentialRevokeReason;
|
|
362
385
|
};
|
|
363
386
|
export type ConnectorRuntimeCredentialResolveInput = {
|
|
387
|
+
scope?: ConnectorProviderScope;
|
|
364
388
|
authMethodId: string;
|
|
365
389
|
credential: ConnectorCredential;
|
|
366
390
|
};
|
|
@@ -68,6 +68,11 @@ export declare const INTEGRATION_PERMISSION_SERVICE_TOKEN = "XPERT_PLUGIN_INTEGR
|
|
|
68
68
|
* Read-only integration permission service exposed to plugins.
|
|
69
69
|
*/
|
|
70
70
|
export interface IntegrationPermissionService {
|
|
71
|
+
/** Exact lookup for a connector whose actor and persisted scope have been authorized by the host. */
|
|
72
|
+
readForConnector?(id: string, provider: string, scope: {
|
|
73
|
+
tenantId: string;
|
|
74
|
+
organizationId: string | null;
|
|
75
|
+
}): Promise<IIntegration | null>;
|
|
71
76
|
read<TIntegration = IIntegration>(id: string, options?: Record<string, any>): Promise<TIntegration | null>;
|
|
72
77
|
findAll<TIntegration = IIntegration>(options?: Record<string, any>): Promise<IPagination<TIntegration>>;
|
|
73
78
|
findAllWithInheritance?<TIntegration = IIntegration>(options?: Record<string, any>): Promise<IPagination<TIntegration>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Query } from '@nestjs/cqrs';
|
|
2
|
+
import type { IIntegration } from '@xpert-ai/contracts';
|
|
3
|
+
/** Read an app for an authorized connector using its persisted scope, including public OAuth callbacks. */
|
|
4
|
+
export declare class ResolveConnectorIntegrationQuery extends Query<IIntegration | null> {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly provider: string;
|
|
7
|
+
readonly scope: {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
organizationId: string | null;
|
|
10
|
+
};
|
|
11
|
+
static readonly type = "[Integration] Resolve connector application";
|
|
12
|
+
constructor(id: string, provider: string, scope: {
|
|
13
|
+
tenantId: string;
|
|
14
|
+
organizationId: string | null;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { XpertProjectTypeRef } from '@xpert-ai/contracts';
|
|
2
2
|
/** Lifecycle states that plugin-managed Projects may synchronize to the platform. */
|
|
3
3
|
export type ProjectProvisioningStatus = 'active' | 'archived';
|
|
4
|
-
/** Portable identity of one
|
|
4
|
+
/** Portable identity of one expected direct External Assistant binding. */
|
|
5
5
|
export type ProjectExternalAssistantExpectation = {
|
|
6
6
|
pluginName: string;
|
|
7
7
|
templateKey: string;
|
|
@@ -15,7 +15,7 @@ export type ProjectEnsureInput = {
|
|
|
15
15
|
projectId: string;
|
|
16
16
|
/** @deprecated Projects no longer belong to a Workspace. Accepted only for legacy callers. */
|
|
17
17
|
workspaceId?: string;
|
|
18
|
-
/** Assistant
|
|
18
|
+
/** Creation seed: this Assistant and all recursive External Assistants join a new Project. Existing membership is preserved. */
|
|
19
19
|
xpertId: string;
|
|
20
20
|
/** Primary requester Agent used as the trust anchor for direct External Assistants. */
|
|
21
21
|
requesterAgentKey?: string;
|
|
@@ -31,7 +31,7 @@ export type ProjectEnsureResult = {
|
|
|
31
31
|
projectId: string;
|
|
32
32
|
/** @deprecated Echoed only when supplied by a legacy caller. */
|
|
33
33
|
workspaceId?: string;
|
|
34
|
-
/**
|
|
34
|
+
/** Persisted Assistant members; ensure never restores removed members or adds new graph dependencies to an existing Project. */
|
|
35
35
|
xpertIds: string[];
|
|
36
36
|
/** Whether this call inserted the Project or reconciled an existing one. */
|
|
37
37
|
operation: 'created' | 'updated';
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssistantCapabilityDeclaration, IconDefinition, I18nObject, JsonSchemaObjectType, PluginMeta, PluginTargetApp, PluginTargetAppMeta, TAvatar, type TPromptWorkflow,
|
|
1
|
+
import { AssistantCapabilityDeclaration, IconDefinition, I18nObject, JsonSchemaObjectType, PluginMeta, PluginTargetApp, PluginTargetAppMeta, TAvatar, type TPromptWorkflow, XpertTypeEnum } from '@xpert-ai/contracts';
|
|
2
2
|
import type { DynamicModule, INestApplicationContext } from '@nestjs/common';
|
|
3
3
|
import { ModuleRef } from '@nestjs/core';
|
|
4
4
|
import type { ZodSchema } from 'zod/v3';
|
|
@@ -58,6 +58,7 @@ export interface XpertPlugin<TConfig extends object = any> extends PluginLifecyc
|
|
|
58
58
|
register(ctx: PluginContext<TConfig>): DynamicModule;
|
|
59
59
|
}
|
|
60
60
|
export interface XpertTemplateContribution {
|
|
61
|
+
manifest?: import('@xpert-ai/contracts').TemplateManifest;
|
|
61
62
|
key: string;
|
|
62
63
|
id?: string;
|
|
63
64
|
name?: string;
|
|
@@ -85,7 +86,7 @@ export interface XpertTemplateContribution {
|
|
|
85
86
|
contentHash?: string;
|
|
86
87
|
xpertName?: string;
|
|
87
88
|
capabilities?: AssistantCapabilityDeclaration[];
|
|
88
|
-
dependencies?:
|
|
89
|
+
dependencies?: import('@xpert-ai/contracts').AssistantTemplateDependencies;
|
|
89
90
|
[key: string]: unknown;
|
|
90
91
|
}
|
|
91
92
|
export interface XpertTemplateProvider {
|