@xpert-ai/plugin-sdk 3.23.1 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/docs/README.md +8 -0
  2. package/docs/analytics.md +42 -0
  3. package/docs/artifact-presentations.md +43 -0
  4. package/docs/mcp-client.md +63 -0
  5. package/docs/provider-credential-validation.md +34 -0
  6. package/docs/rest-client.md +24 -0
  7. package/docs/workspace-file-tools.md +6 -0
  8. package/index.cjs.js +471 -89
  9. package/index.esm.js +448 -92
  10. package/model-provider.cjs.js +10 -0
  11. package/model-provider.esm.js +9 -1
  12. package/package.json +2 -2
  13. package/src/index.d.ts +2 -0
  14. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +76 -76
  15. package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +36 -1
  16. package/src/lib/agent/runtime/dispatch.d.ts +284 -284
  17. package/src/lib/agent/runtime/index.d.ts +1 -0
  18. package/src/lib/agent/runtime/pipeline-scope.d.ts +110 -0
  19. package/src/lib/agent/runtime/types.d.ts +4 -2
  20. package/src/lib/ai-model/ai-model-provider.interface.d.ts +3 -1
  21. package/src/lib/ai-model/utils/limits.d.ts +4 -2
  22. package/src/lib/artifact-presentation/index.d.ts +35 -0
  23. package/src/lib/data/analytics/analytics-payload.d.ts +3 -0
  24. package/src/lib/data/analytics/index.d.ts +1 -0
  25. package/src/lib/data/datasource/types.d.ts +1 -1
  26. package/src/lib/project-pipeline/adapters.d.ts +87 -0
  27. package/src/lib/project-pipeline/capability.d.ts +100 -0
  28. package/src/lib/project-pipeline/index.d.ts +5 -0
  29. package/src/lib/project-pipeline/projection.d.ts +71 -0
  30. package/src/lib/project-pipeline/registry.d.ts +509 -0
  31. package/src/lib/project-pipeline/runtime-registry.d.ts +45 -0
  32. package/src/lib/project-pipeline/scoped-registry.d.ts +10 -0
  33. package/src/lib/project-task/index.d.ts +6 -0
  34. package/src/lib/project-type/index.d.ts +17 -1
  35. package/src/lib/rag/types.d.ts +1 -1
  36. package/src/lib/runtime/capabilities/artifacts.d.ts +2 -0
  37. package/src/lib/runtime/capabilities/index.d.ts +2 -0
  38. package/src/lib/runtime/capabilities/mcp-client-runtime.d.ts +41 -0
  39. package/src/lib/runtime/capabilities/rest-client-runtime.d.ts +34 -0
  40. package/src/lib/sandbox/file-edits.d.ts +4 -0
  41. package/src/lib/sandbox/protocol.d.ts +7 -1
  42. package/src/lib/sandbox/sandbox.d.ts +2 -8
  43. package/src/lib/tool-provider/adapters.d.ts +1 -1
  44. package/src/lib/tool-provider/types.d.ts +2 -0
package/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Module, applyDecorators, SetMetadata, HttpException, HttpStatus, BadRequestException, Injectable, Inject, Logger, Optional, UnauthorizedException, NotFoundException, ForbiddenException } from '@nestjs/common';
2
- import { MODULE_METADATA } from '@nestjs/common/constants';
2
+ import { MODULE_METADATA } from '@nestjs/common/constants.js';
3
3
  import { pick } from 'lodash-es';
4
4
  import { dispatchCustomEvent } from '@langchain/core/callbacks/dispatch';
5
- import { ChatMessageEventTypeEnum, createResourceCardContent, LanguagesEnum, ParameterType, AiModelTypeEnum, PriceType, FetchFrom, ModelPropertyKey, readModelConfiguration, ModelFeature, isDiscoverableModelType, configurationFromModel, projectTaskExecutionContextSchema, projectTaskExecutionReferenceSchema, agentRuntimeProgressSchema, agentInvocationTerminalStatusSchema, MCP_REQUIRED_CONTEXTS, MCP_CAPABILITY_APPROVAL_MODES, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MCP_TOOL_IDEMPOTENCY, MCP_CAPABILITY_VISIBILITIES, PLUGIN_COMPONENT_TYPE } from '@xpert-ai/contracts';
6
- export { ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, agentOutputDeliverySchema, agentResultPathSchema, configurationFromModel, createResourceCardContent, parseResourceCard, resourceCardId } from '@xpert-ai/contracts';
5
+ import { ChatMessageEventTypeEnum, createResourceCardContent, LanguagesEnum, ParameterType, AiModelTypeEnum, PriceType, FetchFrom, ModelPropertyKey, readModelConfiguration, ModelFeature, isDiscoverableModelType, configurationFromModel, projectTaskExecutionContextSchema, projectTaskExecutionReferenceSchema, agentRuntimeProgressSchema, agentInvocationTerminalStatusSchema, projectPipelineWorkContextSchema, MCP_REQUIRED_CONTEXTS, MCP_CAPABILITY_APPROVAL_MODES, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MCP_TOOL_IDEMPOTENCY, MCP_CAPABILITY_VISIBILITIES, PLUGIN_COMPONENT_TYPE, projectPipelineContributionSchema, projectPipelineRefSchema } from '@xpert-ai/contracts';
6
+ export { ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, agentOutputDeliverySchema, agentResultPathSchema, configurationFromModel, createResourceCardContent, parseResourceCard, projectPipelineContributionSchema, resourceCardId } from '@xpert-ai/contracts';
7
7
  import { DiscoveryService, Reflector } from '@nestjs/core';
8
8
  import { Subject, filter } from 'rxjs';
9
9
  import { _ as _extends } from './_extends.esm.js';
@@ -16,7 +16,7 @@ import fs__default from 'fs';
16
16
  import http from 'http';
17
17
  import https from 'https';
18
18
  import { c as createRuntimeCapability, B as BuiltinToolset, W as WorkspaceFilesRuntimeCapability } from './model-provider.esm.js';
19
- export { A as ActorTokenRuntimeCapability, a as ActorTokenRuntimeFactoryCapability, b as ArtifactDraftsRuntimeCapability, d as ArtifactsRuntimeCapability, e as BaseTool, f as BaseToolset, D as DefaultAgentMiddlewareRuntimeCapabilityRegistry, D as DefaultRuntimeCapabilityRegistry, M as ModelProviderBuiltinToolset, P as ProjectAccessRuntimeCapability, g as ProjectProvisioningRuntimeCapability, R as RUNTIME_CAPABILITY_PROVIDER, h as RuntimeCapabilityProvider, S as SANDBOX_JOB_ERROR_CODES, i as SANDBOX_JOB_INVOCATION_PREFIX, j as SANDBOX_JOB_PROGRESS_PREFIX, k as SandboxJobRuntimeError, l as SandboxJobsRuntimeCapability, T as ToolImagesRuntimeCapability, m as WORKSPACE_FILES_SOURCE, X as XPERT_RUNTIME_CAPABILITIES_TOKEN, n as isSandboxJobRuntimeError, w as workspaceFileMutationMetadata, o as workspaceFileMutationPath, p as workspaceRelativeFilePathSchema } from './model-provider.esm.js';
19
+ export { A as ActorTokenRuntimeCapability, a as ActorTokenRuntimeFactoryCapability, b as ArtifactDraftsRuntimeCapability, d as ArtifactsRuntimeCapability, e as BaseTool, f as BaseToolset, D as DefaultAgentMiddlewareRuntimeCapabilityRegistry, D as DefaultRuntimeCapabilityRegistry, g as McpClientRuntimeCapability, M as ModelProviderBuiltinToolset, P as ProjectAccessRuntimeCapability, h as ProjectProvisioningRuntimeCapability, R as RUNTIME_CAPABILITY_PROVIDER, i as RestClientRuntimeCapability, j as RuntimeCapabilityProvider, S as SANDBOX_JOB_ERROR_CODES, k as SANDBOX_JOB_INVOCATION_PREFIX, l as SANDBOX_JOB_PROGRESS_PREFIX, m as SandboxJobRuntimeError, n as SandboxJobsRuntimeCapability, T as ToolImagesRuntimeCapability, o as WORKSPACE_FILES_SOURCE, X as XPERT_RUNTIME_CAPABILITIES_TOKEN, p as isSandboxJobRuntimeError, w as workspaceFileMutationMetadata, q as workspaceFileMutationPath, r as workspaceRelativeFilePathSchema } from './model-provider.esm.js';
20
20
  import fsPromises from 'fs/promises';
21
21
  import * as path from 'path';
22
22
  import path__default, { join } from 'path';
@@ -39,7 +39,6 @@ import { BaseChatModel } from '@langchain/core/language_models/chat_models';
39
39
  import { getEnvironmentVariable } from '@langchain/core/utils/env';
40
40
  export { ModelProviderHttpClient, ModelProviderHttpError } from './model-provider-http-client.esm.js';
41
41
  import { getEncodingNameForModel, encodingForModel, getEncoding } from 'js-tiktoken';
42
- import { getModelContextSize as getModelContextSize$1 } from '@langchain/core/language_models/base';
43
42
  import { z as z$1 } from 'zod';
44
43
  export { A as AGENT_TASK_RESULTS_FEATURE, a as agentResultItemSchema, b as agentTaskResultSchema } from './results.esm.js';
45
44
  import { assertConnectorDefinition } from './connector.esm.js';
@@ -1883,6 +1882,34 @@ AnalyticsProviderRegistry = __decorate([
1883
1882
  ])
1884
1883
  ], AnalyticsProviderRegistry);
1885
1884
 
1885
+ /** Structural feedback from the discovered provider contract. Never substitutes for provider authorization or validation. */ function validateAnalyticsPayload(payload, schema) {
1886
+ if (typeof schema !== 'boolean' && (schema === null || typeof schema !== 'object' || Array.isArray(schema))) {
1887
+ throw new Error('ANALYTICS_PAYLOAD_SCHEMA_INVALID: expected a provider JSON Schema');
1888
+ }
1889
+ // Do not coerce, remove properties, apply defaults, fetch remote refs, or treat unknown formats as authorization.
1890
+ const ajv = new Ajv({
1891
+ strict: false,
1892
+ validateFormats: false,
1893
+ allErrors: false
1894
+ });
1895
+ let validate;
1896
+ try {
1897
+ validate = ajv.compile(schema);
1898
+ } catch (e) {
1899
+ throw new Error('ANALYTICS_PAYLOAD_SCHEMA_INVALID: rediscover the provider contract; its schema could not be compiled');
1900
+ }
1901
+ if ('$async' in validate && validate.$async) {
1902
+ throw new Error('ANALYTICS_PAYLOAD_SCHEMA_INVALID: provider payload validation must use a synchronous schema');
1903
+ }
1904
+ if (!validate(payload)) {
1905
+ var _validate_errors;
1906
+ const issue = (_validate_errors = validate.errors) == null ? void 0 : _validate_errors[0];
1907
+ const location = (issue == null ? void 0 : issue.instancePath) || '/';
1908
+ var _issue_keyword;
1909
+ throw new Error(`ANALYTICS_PAYLOAD_INVALID: ${location.slice(0, 240)} (${(_issue_keyword = issue == null ? void 0 : issue.keyword) != null ? _issue_keyword : 'schema'}). Compare this field with the discovered payloadSchema and canonical Binding. Copy opaque IDs, revisions and contract hashes exactly; do not retry unchanged input.`);
1910
+ }
1911
+ }
1912
+
1886
1913
  const AI_MODEL_PROVIDER = 'AI_MODEL_PROVIDER';
1887
1914
  function AIModelProviderStrategy(provider) {
1888
1915
  var _err_stack;
@@ -4029,35 +4056,61 @@ function getModelContextSize(input) {
4029
4056
  var _input_options;
4030
4057
  return normalizeContextSize((_input_options = input.options) == null ? void 0 : _input_options[ModelPropertyKey.CONTEXT_SIZE]);
4031
4058
  }
4032
- // Backward compatibility for langchain <1.0.0
4033
- if (input.metadata && "profile" in input.metadata) {
4034
- const profile = input.metadata['profile'];
4035
- if ("maxInputTokens" in profile && (typeof profile.maxInputTokens === "number" || profile.maxInputTokens == null)) {
4036
- var _profile_maxInputTokens;
4037
- return (_profile_maxInputTokens = profile.maxInputTokens) != null ? _profile_maxInputTokens : undefined;
4038
- }
4039
- }
4040
- // Langchain v1.0.0+
4041
- if ("profile" in input && typeof input.profile === "object" && input.profile && "maxInputTokens" in input.profile && (typeof input.profile.maxInputTokens === "number" || input.profile.maxInputTokens == null)) {
4042
- var _input_profile_maxInputTokens;
4043
- return (_input_profile_maxInputTokens = input.profile.maxInputTokens) != null ? _input_profile_maxInputTokens : undefined;
4044
- }
4045
- if ("model" in input && typeof input.model === "string") {
4046
- return getModelContextSize$1(input.model);
4047
- }
4048
- if ("modelName" in input && typeof input.modelName === "string") {
4049
- return getModelContextSize$1(input.modelName);
4050
- }
4051
- return undefined;
4059
+ return getClientContextSize(input);
4060
+ }
4061
+ /** Bind the effective window to the runtime configuration and client without guessing from model names. */ function applyModelContextSize(model, configuration) {
4062
+ var _configuration_options;
4063
+ const configuredLimit = normalizeContextSize((_configuration_options = configuration.options) == null ? void 0 : _configuration_options[ModelPropertyKey.CONTEXT_SIZE]);
4064
+ const providerLimit = getClientContextSize(model);
4065
+ const limits = [
4066
+ configuredLimit,
4067
+ providerLimit
4068
+ ].filter((value)=>value !== undefined);
4069
+ if (!limits.length) return model;
4070
+ const contextSize = Math.min(...limits);
4071
+ configuration.options = _extends({}, configuration.options, {
4072
+ [ModelPropertyKey.CONTEXT_SIZE]: contextSize
4073
+ });
4074
+ const metadata = 'metadata' in model && typeof model.metadata === 'object' && model.metadata !== null ? model.metadata : {};
4075
+ const legacyProfile = 'profile' in metadata && typeof metadata.profile === 'object' && metadata.profile !== null ? metadata.profile : {};
4076
+ const profile = 'profile' in model && typeof model.profile === 'object' && model.profile !== null ? model.profile : {};
4077
+ Object.assign(model, {
4078
+ metadata: _extends({}, metadata, {
4079
+ profile: _extends({}, legacyProfile, {
4080
+ maxInputTokens: contextSize
4081
+ })
4082
+ })
4083
+ });
4084
+ Object.defineProperty(model, 'profile', {
4085
+ configurable: true,
4086
+ enumerable: true,
4087
+ writable: true,
4088
+ value: _extends({}, legacyProfile, profile, {
4089
+ maxInputTokens: contextSize
4090
+ })
4091
+ });
4092
+ return model;
4093
+ }
4094
+ function getClientContextSize(model) {
4095
+ const metadata = 'metadata' in model ? model.metadata : undefined;
4096
+ const legacyProfile = metadata && typeof metadata === 'object' && 'profile' in metadata ? metadata.profile : undefined;
4097
+ const limits = [
4098
+ readProfileContextSize(legacyProfile),
4099
+ readProfileContextSize('profile' in model ? model.profile : undefined)
4100
+ ].filter((value)=>value !== undefined);
4101
+ return limits.length ? Math.min(...limits) : undefined;
4102
+ }
4103
+ function readProfileContextSize(profile) {
4104
+ return profile && typeof profile === 'object' && 'maxInputTokens' in profile ? normalizeContextSize(profile.maxInputTokens) : undefined;
4052
4105
  }
4053
4106
  function isCopilotModel(input) {
4054
- return typeof input === "object" && input !== null && !("invoke" in input);
4107
+ return typeof input === 'object' && input !== null && !('invoke' in input);
4055
4108
  }
4056
4109
  function normalizeContextSize(value) {
4057
- if (typeof value === "number" && Number.isFinite(value) && value > 0) {
4110
+ if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
4058
4111
  return Math.floor(value);
4059
4112
  }
4060
- if (typeof value === "string") {
4113
+ if (typeof value === 'string') {
4061
4114
  const parsed = Number.parseInt(value, 10);
4062
4115
  if (Number.isFinite(parsed) && parsed > 0) {
4063
4116
  return parsed;
@@ -4488,6 +4541,23 @@ function taskWaitReason(states, mode) {
4488
4541
  const AgentExecutionRunnerCapability = createRuntimeCapability('platform.agent_execution.runner');
4489
4542
  const AgentExecutionRunnerFactoryCapability = createRuntimeCapability('platform.agent_execution.runner.factory');
4490
4543
 
4544
+ /** Host-only provenance. This describes a saved operation; it never grants access by itself. */ const projectPipelineInvocationScopeSchema = z.object({
4545
+ tenantId: z.string().uuid(),
4546
+ organizationId: z.string().uuid(),
4547
+ userId: z.string().uuid(),
4548
+ projectId: z.string().uuid(),
4549
+ workspaceId: z.string().uuid(),
4550
+ callerType: z.literal('project_pipeline'),
4551
+ callerAgentKey: z.literal('pipeline_node'),
4552
+ parentExecutionId: z.string(),
4553
+ pipelineOrigin: projectPipelineWorkContextSchema
4554
+ }).strict().superRefine((value, context)=>{
4555
+ if (value.parentExecutionId !== `pipeline-operation:${value.pipelineOrigin.operationId}`) context.addIssue({
4556
+ code: 'custom',
4557
+ message: 'PIPELINE_PARENT_IDENTITY_MISMATCH'
4558
+ });
4559
+ });
4560
+
4491
4561
  /** Older runtime plugins can still send this event; new emissions use ON_CHAT_EVENT. */ const RESOURCE_CARD_EVENT = 'xpert.resource_card';
4492
4562
 
4493
4563
  const ASSISTANT_CAPABILITY_PROVIDER = 'ASSISTANT_CAPABILITY_PROVIDER';
@@ -4852,6 +4922,67 @@ function resolveSandboxBackend(sandbox) {
4852
4922
  return isSandboxBackend(candidate) ? candidate : null;
4853
4923
  }
4854
4924
 
4925
+ function editCommandResult(filePath, result) {
4926
+ switch(result.exitCode){
4927
+ case 0:
4928
+ return {
4929
+ path: filePath,
4930
+ filesUpdate: null,
4931
+ occurrences: parseInt(result.output.trim(), 10) || 1
4932
+ };
4933
+ case 1:
4934
+ return {
4935
+ error: `String not found in file '${filePath}'`
4936
+ };
4937
+ case 2:
4938
+ return {
4939
+ error: `Multiple occurrences found in '${filePath}'. Use replaceAll=true to replace all.`
4940
+ };
4941
+ case 3:
4942
+ return {
4943
+ error: `Error: File '${filePath}' not found`
4944
+ };
4945
+ default:
4946
+ return {
4947
+ error: `Unknown error editing file '${filePath}'`
4948
+ };
4949
+ }
4950
+ }
4951
+ /** Stops on failure; never promises rollback or silently reapplies completed edits. */ async function sequentialFileEdits(filePath, edits, apply) {
4952
+ const results = [];
4953
+ if (!(edits == null ? void 0 : edits.length)) return {
4954
+ error: 'No edits provided',
4955
+ progress: {
4956
+ mode: 'sequential',
4957
+ appliedEdits: 0
4958
+ }
4959
+ };
4960
+ for (const edit of edits){
4961
+ const result = await apply(edit);
4962
+ results.push(result);
4963
+ if (result.error) return {
4964
+ error: `Multi-edit failed at edit ${results.length}: ${result.error}`,
4965
+ path: filePath,
4966
+ filesUpdate: null,
4967
+ results,
4968
+ progress: {
4969
+ mode: 'sequential',
4970
+ appliedEdits: results.length - 1,
4971
+ failedEdit: results.length
4972
+ }
4973
+ };
4974
+ }
4975
+ return {
4976
+ path: filePath,
4977
+ filesUpdate: null,
4978
+ results,
4979
+ progress: {
4980
+ mode: 'sequential',
4981
+ appliedEdits: results.length
4982
+ }
4983
+ };
4984
+ }
4985
+
4855
4986
  const MAX_LINE_LENGTH = 500;
4856
4987
  const MAX_GREP_LINE_LENGTH = 2000;
4857
4988
  const GREP_RESULT_LIMIT = 100;
@@ -5691,70 +5822,16 @@ try {
5691
5822
  filesUpdate: null
5692
5823
  };
5693
5824
  }
5694
- /**
5695
- * Edit a file by replacing string occurrences.
5696
- */ async edit(filePath, oldString, newString, replaceAll = false) {
5825
+ /** Edit a file by replacing string occurrences. */ async edit(filePath, oldString, newString, replaceAll = false) {
5697
5826
  const command = buildEditCommand(filePath, oldString, newString, replaceAll);
5698
5827
  const result = await this.executeOperation(command, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS);
5699
- switch(result.exitCode){
5700
- case 0:
5701
- {
5702
- const occurrences = parseInt(result.output.trim(), 10) || 1;
5703
- return {
5704
- path: filePath,
5705
- filesUpdate: null,
5706
- occurrences
5707
- };
5708
- }
5709
- case 1:
5710
- return {
5711
- error: `String not found in file '${filePath}'`
5712
- };
5713
- case 2:
5714
- return {
5715
- error: `Multiple occurrences found in '${filePath}'. Use replaceAll=true to replace all.`
5716
- };
5717
- case 3:
5718
- return {
5719
- error: `Error: File '${filePath}' not found`
5720
- };
5721
- default:
5722
- return {
5723
- error: `Unknown error editing file '${filePath}'`
5724
- };
5725
- }
5828
+ return editCommandResult(filePath, result);
5726
5829
  }
5727
- /**
5728
- * Perform multiple sequential edits on a single file.
5729
- * All edits are applied sequentially, with each edit operating on the result of the previous edit.
5730
- * All edits must succeed for the operation to succeed (atomic).
5731
- */ async multiEdit(filePath, edits) {
5732
- if (!edits || edits.length === 0) {
5733
- return {
5734
- error: 'No edits provided'
5735
- };
5736
- }
5737
- const results = [];
5738
- for (const edit of edits){
5830
+ /** Earlier successful edits remain persisted if a later edit fails. */ multiEdit(filePath, edits) {
5831
+ return sequentialFileEdits(filePath, edits, (edit)=>{
5739
5832
  var _edit_replaceAll;
5740
- const result = await this.edit(filePath, edit.oldString, edit.newString, (_edit_replaceAll = edit.replaceAll) != null ? _edit_replaceAll : false);
5741
- results.push(result);
5742
- // If any edit fails, return immediately with error
5743
- if (result.error) {
5744
- return {
5745
- error: `Multi-edit failed at edit ${results.length}: ${result.error}`,
5746
- path: filePath,
5747
- filesUpdate: null,
5748
- results
5749
- };
5750
- }
5751
- }
5752
- // All edits succeeded
5753
- return {
5754
- path: filePath,
5755
- filesUpdate: null,
5756
- results
5757
- };
5833
+ return this.edit(filePath, edit.oldString, edit.newString, (_edit_replaceAll = edit.replaceAll) != null ? _edit_replaceAll : false);
5834
+ });
5758
5835
  }
5759
5836
  }
5760
5837
 
@@ -6427,6 +6504,22 @@ const ViewMiddlewareRuntimeCapability = createRuntimeCapability('platform.view.m
6427
6504
  description: 'Resolve a View capability through its authorized Assistant middleware and scoped runtime.'
6428
6505
  });
6429
6506
 
6507
+ const ARTIFACT_PRESENTATION_PROVIDER = 'ARTIFACT_PRESENTATION_PROVIDER';
6508
+ const artifactPresentationKey = (source)=>`${source.pluginName}:${source.resourceType}`;
6509
+ /** Registers a read-only renderer for an explicit Artifact source, independently of Workbench actions. */ const ArtifactPresentationProvider = (source)=>applyDecorators(SetMetadata(ARTIFACT_PRESENTATION_PROVIDER, artifactPresentationKey(source)), SetMetadata(STRATEGY_META_KEY, ARTIFACT_PRESENTATION_PROVIDER));
6510
+ let ArtifactPresentationRegistry = class ArtifactPresentationRegistry extends BaseStrategyRegistry {
6511
+ constructor(discovery, reflector){
6512
+ super(ARTIFACT_PRESENTATION_PROVIDER, discovery, reflector);
6513
+ }
6514
+ };
6515
+ ArtifactPresentationRegistry = __decorate([
6516
+ Injectable(),
6517
+ __metadata("design:paramtypes", [
6518
+ DiscoveryService,
6519
+ Reflector
6520
+ ])
6521
+ ], ArtifactPresentationRegistry);
6522
+
6430
6523
  /** Platform-owned real-time collaboration capability available to scoped plugin runtimes. */ const CollaborationRuntimeCapability = createRuntimeCapability('platform.collaboration', {
6431
6524
  description: 'Create, synchronize, persist, authorize, and observe platform-managed real-time collaboration documents.'
6432
6525
  });
@@ -7056,8 +7149,8 @@ function agentContent(content) {
7056
7149
  }
7057
7150
 
7058
7151
  class DecoratedToolsetStrategy {
7059
- validateConfig() {
7060
- return Promise.resolve();
7152
+ async validateConfig(config) {
7153
+ await (this.instance.validateConfig == null ? void 0 : this.instance.validateConfig.call(this.instance, config));
7061
7154
  }
7062
7155
  async create(toolset, params) {
7063
7156
  return new DecoratedBuiltinToolset(this.instance, this.descriptor, toolset, params, this.pluginName, this.pluginVersion);
@@ -10303,9 +10396,272 @@ ProjectTaskProviderRegistry = __decorate([
10303
10396
  ])
10304
10397
  ], ProjectTaskProviderRegistry);
10305
10398
  const ProjectTasksRuntimeCapability = createRuntimeCapability('platform.project.tasks', {
10306
- description: 'Read project task graphs, manage schedules, and resolve exact execution conversations.'
10399
+ description: 'Read project task graphs, request background synchronization, manage schedules, and resolve exact execution conversations.'
10307
10400
  });
10308
10401
 
10402
+ const PROJECT_PIPELINE_CONTRIBUTION = 'PROJECT_PIPELINE_CONTRIBUTION';
10403
+ const ProjectPipelineContributor = (key)=>applyDecorators(SetMetadata(PROJECT_PIPELINE_CONTRIBUTION, key), SetMetadata(STRATEGY_META_KEY, PROJECT_PIPELINE_CONTRIBUTION));
10404
+ let ProjectPipelineContributionRegistry = class ProjectPipelineContributionRegistry extends BaseStrategyRegistry {
10405
+ upsert(instance) {
10406
+ const target = resolveStrategyMetadataTarget(instance);
10407
+ const key = target ? this.reflector.get(PROJECT_PIPELINE_CONTRIBUTION, target) : undefined;
10408
+ if (!key) return;
10409
+ const contribution = projectPipelineContributionSchema.parse(instance);
10410
+ if (key !== contribution.key) throw new Error('PIPELINE_CONTRIBUTION_KEY_MISMATCH');
10411
+ // Parsing above validates the original object's public fields before preserving loader provenance.
10412
+ const original = instance;
10413
+ this.registerParsed(key, original, contribution, this.getSource(original));
10414
+ }
10415
+ register(key, contribution, source) {
10416
+ return this.registerParsed(key, contribution, projectPipelineContributionSchema.parse(contribution), source);
10417
+ }
10418
+ registerParsed(key, contribution, validated, source) {
10419
+ // Parsed metadata is immutable and source-local: sharing a cached object would overwrite
10420
+ // the loader provenance held by the base registry when another scope registers it.
10421
+ const identity = JSON.stringify([
10422
+ source.kind,
10423
+ source.scopeKey,
10424
+ source.kind === 'plugin' ? source.pluginName : null
10425
+ ]);
10426
+ var _this_parsedContributions_get;
10427
+ const cache = (_this_parsedContributions_get = this.parsedContributions.get(contribution)) != null ? _this_parsedContributions_get : new Map();
10428
+ const cached = cache.get(identity);
10429
+ const parsed = cached && JSON.stringify(cached) === JSON.stringify(validated) ? cached : validated;
10430
+ if (parsed.key !== key) throw new Error('PIPELINE_CONTRIBUTION_KEY_MISMATCH');
10431
+ freezeMetadata(parsed);
10432
+ const previous = super.register(key, parsed, source);
10433
+ cache.set(identity, parsed);
10434
+ this.parsedContributions.set(contribution, cache);
10435
+ return previous;
10436
+ }
10437
+ assertCanRegister(key, contribution, source) {
10438
+ var _this_strategies_get;
10439
+ const existing = (_this_strategies_get = this.strategies.get(source.scopeKey)) == null ? void 0 : _this_strategies_get.get(key);
10440
+ if (existing) {
10441
+ const owner = this.getSource(existing);
10442
+ if (owner.kind !== source.kind || owner.kind === 'plugin' && source.kind === 'plugin' && owner.pluginName !== source.pluginName) {
10443
+ throw new Error('PIPELINE_CONTRIBUTION_OWNER_CONFLICT');
10444
+ }
10445
+ for (const previous of existing.configurations){
10446
+ const replacement = contribution.configurations.find((item)=>item.template.key === previous.template.key && item.template.version === previous.template.version);
10447
+ if (replacement && canonicalJson(previous.template) !== canonicalJson(replacement.template)) {
10448
+ throw new Error('PIPELINE_DEFINITION_VERSION_IMMUTABLE');
10449
+ }
10450
+ }
10451
+ }
10452
+ super.assertCanRegister(key, contribution, source);
10453
+ }
10454
+ /** Explicit actor scope prevents a delegated call from inheriting an unrelated ambient tenant. */ listForActor(actor) {
10455
+ if (!actor.tenantId) return [];
10456
+ const tenantScope = actor.tenantId === getDefaultTenantId() ? GLOBAL_ORGANIZATION_SCOPE : getTenantGlobalScopeKey(actor.tenantId);
10457
+ const scopes = [
10458
+ ...new Set([
10459
+ actor.organizationId || tenantScope,
10460
+ tenantScope,
10461
+ SYSTEM_GLOBAL_SCOPE,
10462
+ BUILTIN_GLOBAL_SCOPE
10463
+ ])
10464
+ ];
10465
+ const effective = new Map();
10466
+ for (const scope of scopes){
10467
+ var _this_strategies_get;
10468
+ for (const [key, value] of (_this_strategies_get = this.strategies.get(scope)) != null ? _this_strategies_get : []){
10469
+ if (!effective.has(key)) effective.set(key, value);
10470
+ }
10471
+ }
10472
+ return Array.from(effective.values());
10473
+ }
10474
+ constructor(discovery, reflector){
10475
+ super(PROJECT_PIPELINE_CONTRIBUTION, discovery, reflector);
10476
+ this.parsedContributions = new WeakMap();
10477
+ }
10478
+ };
10479
+ ProjectPipelineContributionRegistry = __decorate([
10480
+ Injectable(),
10481
+ __metadata("design:paramtypes", [
10482
+ DiscoveryService,
10483
+ Reflector
10484
+ ])
10485
+ ], ProjectPipelineContributionRegistry);
10486
+ /** Only validated JSON metadata is frozen; live adapter instances retain their own lifecycle. */ function freezeMetadata(value) {
10487
+ if (value === null || typeof value !== 'object' || Object.isFrozen(value)) return;
10488
+ for (const child of Object.values(value))freezeMetadata(child);
10489
+ Object.freeze(value);
10490
+ }
10491
+ function canonicalJson(value) {
10492
+ if (value === null || typeof value !== 'object') return JSON.stringify(value);
10493
+ if (Array.isArray(value)) return `[${value.map(canonicalJson).join(',')}]`;
10494
+ return `{${Object.keys(value).sort().filter((key)=>value[key] !== undefined).map((key)=>`${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(',')}}`;
10495
+ }
10496
+
10497
+ const ProjectPipelinePortfolioRuntimeCapability = createRuntimeCapability('platform.project.pipeline_portfolio', {
10498
+ description: 'Compare explicitly selected authorized Projects in one consistent snapshot.'
10499
+ });
10500
+ const ProjectPipelineAnalyticsRuntimeCapability = createRuntimeCapability('platform.project.pipeline_analytics', {
10501
+ description: 'Read Project-scoped cross-instance execution cohorts without replaying provider callbacks.'
10502
+ });
10503
+ const ProjectPipelineProviderActionsRuntimeCapability = createRuntimeCapability('platform.project.pipeline_provider_actions', {
10504
+ description: 'Submit version-bound provider actions through a durable, inspect-only recovery outbox.'
10505
+ });
10506
+ const ProjectPipelineEvidenceRuntimeCapability = createRuntimeCapability('platform.project.pipeline_evidence', {
10507
+ description: 'Read authorized, versioned pipeline evidence through its registered resolver.'
10508
+ });
10509
+ const ProjectPipelineCatalogRuntimeCapability = createRuntimeCapability('platform.project.pipeline_catalog', {
10510
+ description: 'Discover plugin-declared configuration forms and save authorized Project bindings.'
10511
+ });
10512
+ const ProjectPipelineConfigurationRuntimeCapability = createRuntimeCapability('platform.project.pipeline_configuration', {
10513
+ description: 'Check generic project pipeline configuration and registered extension dependencies without starting work.'
10514
+ });
10515
+ const ProjectPipelinesRuntimeCapability = createRuntimeCapability('platform.project.pipelines', {
10516
+ description: 'Read saved pipeline graphs and enqueue instance-scoped provider projections.'
10517
+ });
10518
+ const ProjectPipelineCommandsRuntimeCapability = createRuntimeCapability('platform.project.pipeline_commands', {
10519
+ description: 'Configure and start managed pipelines, and submit authorized version-bound human decisions.'
10520
+ });
10521
+
10522
+ function pipelineActorScopeKeys(actor) {
10523
+ if (!actor.tenantId) return [];
10524
+ const tenant = actor.tenantId === getDefaultTenantId() ? GLOBAL_ORGANIZATION_SCOPE : getTenantGlobalScopeKey(actor.tenantId);
10525
+ return [
10526
+ ...new Set([
10527
+ actor.organizationId || tenant,
10528
+ tenant,
10529
+ SYSTEM_GLOBAL_SCOPE,
10530
+ BUILTIN_GLOBAL_SCOPE
10531
+ ])
10532
+ ];
10533
+ }
10534
+ /** Public capabilities resolve from their explicit, authorized actor, never another ambient request. */ class ProjectPipelineScopedRegistry extends BaseStrategyRegistry {
10535
+ assertCanRegister(key, instance, source) {
10536
+ var _this_strategies_get;
10537
+ const existing = (_this_strategies_get = this.strategies.get(source.scopeKey)) == null ? void 0 : _this_strategies_get.get(key);
10538
+ if (existing) {
10539
+ const owner = this.getSource(existing);
10540
+ if (owner.kind !== source.kind || owner.kind === 'plugin' && source.kind === 'plugin' && owner.pluginName !== source.pluginName) throw new Error('PIPELINE_ADAPTER_OWNER_CONFLICT');
10541
+ }
10542
+ // Live adapters cannot be cloned safely. Require a distinct instance for each provenance
10543
+ // so registration in one scope cannot silently change ownership in another.
10544
+ for (const [scope, entries] of this.strategies){
10545
+ if (![
10546
+ ...entries.values()
10547
+ ].includes(instance)) continue;
10548
+ const owner = this.getSource(instance);
10549
+ if (scope !== source.scopeKey || owner.kind !== source.kind || owner.kind === 'plugin' && source.kind === 'plugin' && owner.pluginName !== source.pluginName) throw new Error('PIPELINE_ADAPTER_SOURCE_CONFLICT');
10550
+ }
10551
+ super.assertCanRegister(key, instance, source);
10552
+ }
10553
+ upsert(instance) {
10554
+ const target = resolveStrategyMetadataTarget(instance);
10555
+ const key = target ? this.reflector.get(this.strategyKey, target) : undefined;
10556
+ if (key) this.register(key, instance, this.getSource(instance));
10557
+ }
10558
+ listForActor(actor) {
10559
+ const effective = new Map();
10560
+ var _this_strategies_get;
10561
+ for (const scope of pipelineActorScopeKeys(actor))for (const [key, adapter] of (_this_strategies_get = this.strategies.get(scope)) != null ? _this_strategies_get : []){
10562
+ if (!effective.has(key)) effective.set(key, adapter);
10563
+ }
10564
+ return [
10565
+ ...effective.values()
10566
+ ];
10567
+ }
10568
+ getForActor(key, actor) {
10569
+ for (const scope of pipelineActorScopeKeys(actor)){
10570
+ var _this_strategies_get;
10571
+ const adapter = (_this_strategies_get = this.strategies.get(scope)) == null ? void 0 : _this_strategies_get.get(key);
10572
+ if (adapter) return adapter;
10573
+ }
10574
+ throw new Error('PIPELINE_ADAPTER_UNAVAILABLE');
10575
+ }
10576
+ }
10577
+
10578
+ const PROJECT_PIPELINE_PROJECTION_PROVIDER = 'PROJECT_PIPELINE_PROJECTION_PROVIDER';
10579
+ const ProjectPipelineProjectionProvider = (key)=>applyDecorators(SetMetadata(PROJECT_PIPELINE_PROJECTION_PROVIDER, key), SetMetadata(STRATEGY_META_KEY, PROJECT_PIPELINE_PROJECTION_PROVIDER));
10580
+ let ProjectPipelineProjectionProviderRegistry = class ProjectPipelineProjectionProviderRegistry extends ProjectPipelineScopedRegistry {
10581
+ register(key, provider, source) {
10582
+ projectPipelineRefSchema.parse(key);
10583
+ if (provider.key !== key) throw new Error('PIPELINE_PROVIDER_KEY_MISMATCH');
10584
+ // Registration checks the extension shape without executing business callbacks. A future
10585
+ // protocol must be negotiated explicitly rather than silently treated as a legacy provider.
10586
+ if (provider.nativeTaskProtocol !== undefined && provider.nativeTaskProtocol !== 1) throw new Error('PIPELINE_PROVIDER_PROTOCOL_UNSUPPORTED');
10587
+ if (typeof provider.snapshot !== 'function') throw new Error('PIPELINE_PROVIDER_CONTRACT_INVALID');
10588
+ for (const name of [
10589
+ 'linked',
10590
+ 'describeNode',
10591
+ 'actions',
10592
+ 'executeAction',
10593
+ 'inspectAction'
10594
+ ]){
10595
+ if (provider[name] !== undefined && typeof provider[name] !== 'function') throw new Error('PIPELINE_PROVIDER_CONTRACT_INVALID');
10596
+ }
10597
+ if (provider.executeAction === undefined !== (provider.inspectAction === undefined) || provider.actions !== undefined && provider.executeAction === undefined) throw new Error('PIPELINE_PROVIDER_CONTRACT_INVALID');
10598
+ return super.register(key, provider, source);
10599
+ }
10600
+ constructor(discovery, reflector){
10601
+ super(PROJECT_PIPELINE_PROJECTION_PROVIDER, discovery, reflector);
10602
+ }
10603
+ };
10604
+ ProjectPipelineProjectionProviderRegistry = __decorate([
10605
+ Injectable(),
10606
+ __metadata("design:paramtypes", [
10607
+ DiscoveryService,
10608
+ Reflector
10609
+ ])
10610
+ ], ProjectPipelineProjectionProviderRegistry);
10611
+
10612
+ const PROJECT_PIPELINE_RUNTIME_ADAPTER = 'PROJECT_PIPELINE_RUNTIME_ADAPTER';
10613
+ const ProjectPipelineRuntimeAdapterProvider = (kind, ref)=>applyDecorators(SetMetadata(PROJECT_PIPELINE_RUNTIME_ADAPTER, `${kind}:${projectPipelineRefSchema.parse(ref)}`), SetMetadata(STRATEGY_META_KEY, PROJECT_PIPELINE_RUNTIME_ADAPTER));
10614
+ let ProjectPipelineRuntimeAdapterRegistry = class ProjectPipelineRuntimeAdapterRegistry extends ProjectPipelineScopedRegistry {
10615
+ register(key, adapter, source) {
10616
+ projectPipelineRefSchema.parse(adapter.ref);
10617
+ if (key !== `${adapter.kind}:${adapter.ref}`) throw new Error('PIPELINE_ADAPTER_KEY_MISMATCH');
10618
+ switch(adapter.kind){
10619
+ case 'resource':
10620
+ if (typeof adapter.resolve !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10621
+ break;
10622
+ case 'assistant_operation':
10623
+ case 'runtime_operation':
10624
+ if (typeof adapter.prepare !== 'function' || typeof adapter.collect !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10625
+ break;
10626
+ case 'schema':
10627
+ if (typeof adapter.parse !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10628
+ break;
10629
+ case 'subject':
10630
+ if (typeof adapter.resolve !== 'function' || typeof adapter.checkCurrent !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10631
+ break;
10632
+ case 'evidence':
10633
+ if (typeof adapter.read !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10634
+ break;
10635
+ case 'operation':
10636
+ case 'subscription':
10637
+ if (typeof adapter.execute !== 'function' || typeof adapter.inspect !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10638
+ break;
10639
+ case 'completion':
10640
+ case 'policy':
10641
+ if (typeof adapter.evaluate !== 'function') throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10642
+ break;
10643
+ default:
10644
+ throw new Error('PIPELINE_ADAPTER_CONTRACT_INVALID');
10645
+ }
10646
+ return super.register(key, adapter, source);
10647
+ }
10648
+ resolve(kind, ref, actor) {
10649
+ const adapter = this.getForActor(`${kind}:${ref}`, actor);
10650
+ if (adapter.kind !== kind || adapter.ref !== ref) throw new Error('PIPELINE_ADAPTER_KEY_MISMATCH');
10651
+ return adapter;
10652
+ }
10653
+ constructor(discovery, reflector){
10654
+ super(PROJECT_PIPELINE_RUNTIME_ADAPTER, discovery, reflector);
10655
+ }
10656
+ };
10657
+ ProjectPipelineRuntimeAdapterRegistry = __decorate([
10658
+ Injectable(),
10659
+ __metadata("design:paramtypes", [
10660
+ DiscoveryService,
10661
+ Reflector
10662
+ ])
10663
+ ], ProjectPipelineRuntimeAdapterRegistry);
10664
+
10309
10665
  /** Import official resource packages for the authenticated organization administrator. Does not authorize workspaces. */ class ImportDefaultAgentPluginsCommand extends Command {
10310
10666
  }
10311
10667
  ImportDefaultAgentPluginsCommand.type = '[Agent Plugins] Import defaults';
@@ -10313,4 +10669,4 @@ Reflect.defineMetadata('__command__', {
10313
10669
  id: ImportDefaultAgentPluginsCommand.type
10314
10670
  }, ImportDefaultAgentPluginsCommand);
10315
10671
 
10316
- 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, ANALYTICS_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, 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, createMutationEvidence, 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, jsonEncodedSchema, 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 };
10672
+ 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, ANALYTICS_PROVIDER, ARTIFACT_PRESENTATION_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, ArtifactPresentationProvider, ArtifactPresentationRegistry, 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_PIPELINE_CONTRIBUTION, PROJECT_PIPELINE_PROJECTION_PROVIDER, PROJECT_PIPELINE_RUNTIME_ADAPTER, 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, ProjectPipelineAnalyticsRuntimeCapability, ProjectPipelineCatalogRuntimeCapability, ProjectPipelineCommandsRuntimeCapability, ProjectPipelineConfigurationRuntimeCapability, ProjectPipelineContributionRegistry, ProjectPipelineContributor, ProjectPipelineEvidenceRuntimeCapability, ProjectPipelinePortfolioRuntimeCapability, ProjectPipelineProjectionProvider, ProjectPipelineProjectionProviderRegistry, ProjectPipelineProviderActionsRuntimeCapability, ProjectPipelineRuntimeAdapterProvider, ProjectPipelineRuntimeAdapterRegistry, ProjectPipelinesRuntimeCapability, 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, applyModelContextSize, artifactPresentationKey, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createMutationEvidence, 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, jsonEncodedSchema, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, projectPipelineInvocationScopeSchema, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries, validateAnalyticsPayload };