@xpert-ai/plugin-sdk 3.23.0 → 3.25.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 (88) hide show
  1. package/_object_without_properties_loose.cjs.js +16 -0
  2. package/_object_without_properties_loose.esm.js +14 -0
  3. package/analytics-result.cjs.js +212 -0
  4. package/analytics-result.esm.js +201 -0
  5. package/analytics.cjs.default.js +1 -0
  6. package/analytics.cjs.js +17 -0
  7. package/analytics.cjs.mjs +2 -0
  8. package/analytics.d.ts +1 -0
  9. package/analytics.esm.js +2 -0
  10. package/artifact-document.cjs.default.js +1 -0
  11. package/artifact-document.cjs.js +581 -0
  12. package/artifact-document.cjs.mjs +2 -0
  13. package/artifact-document.d.ts +1 -0
  14. package/artifact-document.esm.js +563 -0
  15. package/data-workbench.cjs.js +23 -6
  16. package/data-workbench.esm.js +23 -6
  17. package/docs/README.md +8 -0
  18. package/docs/analytics.md +108 -0
  19. package/docs/artifact-documents.md +74 -0
  20. package/docs/artifact-drafts.md +24 -0
  21. package/docs/artifact-presentations.md +43 -0
  22. package/docs/json-encoded-schema.md +19 -0
  23. package/docs/mcp-client.md +63 -0
  24. package/docs/provider-credential-validation.md +34 -0
  25. package/docs/rest-client.md +24 -0
  26. package/docs/workspace-dataset-pipelines.md +120 -0
  27. package/docs/workspace-file-tools.md +66 -0
  28. package/index.cjs.js +555 -108
  29. package/index.esm.js +573 -172
  30. package/model-provider-toolset.cjs.js +1 -1
  31. package/model-provider-toolset.esm.js +1 -1
  32. package/model-provider.cjs.js +47 -1
  33. package/model-provider.esm.js +41 -2
  34. package/package.json +14 -2
  35. package/src/analytics.d.ts +3 -0
  36. package/src/artifact-document.d.ts +5 -0
  37. package/src/index.d.ts +2 -0
  38. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +80 -80
  39. package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +36 -1
  40. package/src/lib/agent/runtime/dispatch.d.ts +284 -284
  41. package/src/lib/agent/runtime/index.d.ts +1 -0
  42. package/src/lib/agent/runtime/pipeline-scope.d.ts +110 -0
  43. package/src/lib/agent/runtime/types.d.ts +4 -2
  44. package/src/lib/ai-model/ai-model-provider.interface.d.ts +3 -1
  45. package/src/lib/ai-model/utils/limits.d.ts +4 -2
  46. package/src/lib/artifact-document/dependencies.d.ts +101 -0
  47. package/src/lib/artifact-document/host.d.ts +30 -0
  48. package/src/lib/artifact-document/protocol.d.ts +60 -0
  49. package/src/lib/artifact-document/runtime.d.ts +4 -0
  50. package/src/lib/artifact-document/sha256.d.ts +2 -0
  51. package/src/lib/artifact-presentation/index.d.ts +35 -0
  52. package/src/lib/core/index.d.ts +1 -0
  53. package/src/lib/core/json-encoded-schema.d.ts +15 -0
  54. package/src/lib/data/analytics/analytics-payload.d.ts +3 -0
  55. package/src/lib/data/analytics/analytics-provider.d.ts +74 -0
  56. package/src/lib/data/analytics/analytics-result.d.ts +4 -0
  57. package/src/lib/data/analytics/analytics.registry.d.ts +10 -0
  58. package/src/lib/data/analytics/analytics.schema.d.ts +206 -0
  59. package/src/lib/data/analytics/index.d.ts +5 -0
  60. package/src/lib/data/datasource/index.d.ts +1 -0
  61. package/src/lib/data/datasource/types.d.ts +1 -1
  62. package/src/lib/data/datasource/workbench-adapter.d.ts +11 -1
  63. package/src/lib/data/datasource/workbench-sql.d.ts +12 -0
  64. package/src/lib/project-pipeline/adapters.d.ts +87 -0
  65. package/src/lib/project-pipeline/capability.d.ts +100 -0
  66. package/src/lib/project-pipeline/index.d.ts +5 -0
  67. package/src/lib/project-pipeline/projection.d.ts +71 -0
  68. package/src/lib/project-pipeline/registry.d.ts +509 -0
  69. package/src/lib/project-pipeline/runtime-registry.d.ts +45 -0
  70. package/src/lib/project-pipeline/scoped-registry.d.ts +10 -0
  71. package/src/lib/project-task/index.d.ts +6 -0
  72. package/src/lib/project-type/index.d.ts +17 -1
  73. package/src/lib/rag/types.d.ts +1 -1
  74. package/src/lib/runtime/capabilities/artifact-drafts.d.ts +29 -0
  75. package/src/lib/runtime/capabilities/artifacts.d.ts +12 -0
  76. package/src/lib/runtime/capabilities/index.d.ts +3 -0
  77. package/src/lib/runtime/capabilities/mcp-client-runtime.d.ts +41 -0
  78. package/src/lib/runtime/capabilities/rest-client-runtime.d.ts +34 -0
  79. package/src/lib/runtime/capabilities/sandbox-jobs.d.ts +36 -2
  80. package/src/lib/runtime/index.d.ts +2 -0
  81. package/src/lib/runtime/mutation-evidence.d.ts +7 -0
  82. package/src/lib/runtime/workspace-file-tools.d.ts +11 -0
  83. package/src/lib/sandbox/file-edits.d.ts +4 -0
  84. package/src/lib/sandbox/protocol.d.ts +7 -1
  85. package/src/lib/sandbox/runtime-provider.d.ts +4 -0
  86. package/src/lib/sandbox/sandbox.d.ts +2 -8
  87. package/src/lib/tool-provider/adapters.d.ts +1 -1
  88. 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,10 +16,11 @@ 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 ArtifactsRuntimeCapability, d as BaseTool, e as BaseToolset, D as DefaultAgentMiddlewareRuntimeCapabilityRegistry, D as DefaultRuntimeCapabilityRegistry, M as ModelProviderBuiltinToolset, P as ProjectAccessRuntimeCapability, f as ProjectProvisioningRuntimeCapability, R as RUNTIME_CAPABILITY_PROVIDER, g as RuntimeCapabilityProvider, S as SANDBOX_JOB_ERROR_CODES, h as SANDBOX_JOB_PROGRESS_PREFIX, i as SandboxJobRuntimeError, j as SandboxJobsRuntimeCapability, T as ToolImagesRuntimeCapability, k as WORKSPACE_FILES_SOURCE, X as XPERT_RUNTIME_CAPABILITIES_TOKEN, l as isSandboxJobRuntimeError } 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';
23
+ import { z, ZodError, ZodFirstPartyTypeKind } from 'zod/v3';
23
24
  import { createInstance } from 'i18next';
24
25
  import FsBackend from 'i18next-fs-backend';
25
26
  import * as yaml from 'yaml';
@@ -28,6 +29,7 @@ import Ajv from 'ajv';
28
29
  import schemaDraft04 from 'ajv/dist/refs/json-schema-draft-06.json';
29
30
  import * as _axios from 'axios';
30
31
  export { DataSourceRuntimeCapability, SqlDatabaseWorkbenchAdapter, quoteDatabaseIdentifier, requireReadStatement, splitWorkbenchSql } from './data-workbench.esm.js';
32
+ export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as analyticsDiscoveryRequestSchema, d as analyticsDiscoveryResultSchema, e as analyticsFieldSchema, f as analyticsOptionsSchema, g as analyticsParameterSchema, h as analyticsQueryRequestSchema, n as normalizeAnalyticsResult, r as resolveAnalyticsParameters } from './analytics-result.esm.js';
31
33
  import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
32
34
  import { ChatGenerationChunk } from '@langchain/core/outputs';
33
35
  import { isBaseMessage, isAIMessage, isAIMessageChunk, AIMessage } from '@langchain/core/messages';
@@ -37,13 +39,12 @@ import { BaseChatModel } from '@langchain/core/language_models/chat_models';
37
39
  import { getEnvironmentVariable } from '@langchain/core/utils/env';
38
40
  export { ModelProviderHttpClient, ModelProviderHttpError } from './model-provider-http-client.esm.js';
39
41
  import { getEncodingNameForModel, encodingForModel, getEncoding } from 'js-tiktoken';
40
- import { getModelContextSize as getModelContextSize$1 } from '@langchain/core/language_models/base';
41
- import { z } from 'zod';
42
- import { z as z$1, ZodError, ZodFirstPartyTypeKind } from 'zod/v3';
42
+ import { z as z$1 } from 'zod';
43
43
  export { A as AGENT_TASK_RESULTS_FEATURE, a as agentResultItemSchema, b as agentTaskResultSchema } from './results.esm.js';
44
44
  import { assertConnectorDefinition } from './connector.esm.js';
45
45
  export { CONNECTOR_AUTHORIZATION_MODES, CONNECTOR_SCOPE_TYPES, getConnectorAuthMethods, getConnectorAuthorizationModes } from './connector.esm.js';
46
46
  export { base64ToBytes, bytesToBase64, createCollaborationClient, createCollaborationPresenceStore, createSocketIoTransportAdapter, createYjsDocumentAdapter } from './collaboration-client.esm.js';
47
+ import { _ as _object_without_properties_loose$2 } from './_object_without_properties_loose.esm.js';
47
48
  import { tool } from '@langchain/core/tools';
48
49
 
49
50
  /**
@@ -1174,6 +1175,27 @@ ToolsetRegistry = __decorate([
1174
1175
  ])
1175
1176
  ], ToolsetRegistry);
1176
1177
 
1178
+ /** Run-scoped evidence for multi-tool writes. A file write is not a domain commit. */ function createMutationEvidence() {
1179
+ let generation = 0, committed = 0;
1180
+ let receipt;
1181
+ return {
1182
+ begin () {
1183
+ return ++generation;
1184
+ },
1185
+ accept (token, value) {
1186
+ if (token !== generation) return;
1187
+ committed = token;
1188
+ receipt = value;
1189
+ },
1190
+ get pending () {
1191
+ return generation > committed;
1192
+ },
1193
+ get receipt () {
1194
+ return receipt;
1195
+ }
1196
+ };
1197
+ }
1198
+
1177
1199
  function defineXpertTool(definition) {
1178
1200
  return Object.freeze(definition);
1179
1201
  }
@@ -1367,6 +1389,22 @@ const VIDEO_GENERATOR_FAMILIES = [
1367
1389
  const VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN = 'XPERT_PLUGIN_VIDEO_GENERATION_PERMISSION_SERVICE';
1368
1390
  const VIDEO_GENERATION_SERVICE_TOKEN = 'XPERT_VIDEO_GENERATION_SERVICE';
1369
1391
 
1392
+ /**
1393
+ * Decode JSON text at most once, then validate with the supplied schema.
1394
+ * Intended for schemas whose native input excludes strings, such as objects and arrays.
1395
+ * Failed or oversized text remains unchanged so the schema rejects it; nested strings are not decoded.
1396
+ * Callers explicitly opt in at an input boundary; domain schemas remain unchanged.
1397
+ */ function jsonEncodedSchema(schema, { maxChars = 200000 } = {}) {
1398
+ return z.preprocess((value)=>{
1399
+ if (typeof value !== 'string' || value.length > maxChars) return value;
1400
+ try {
1401
+ return JSON.parse(value);
1402
+ } catch (e) {
1403
+ return value;
1404
+ }
1405
+ }, schema);
1406
+ }
1407
+
1370
1408
  async function createI18nInstance(pluginDir, language) {
1371
1409
  const instance = createInstance();
1372
1410
  const i18nDir = path__default.join(pluginDir, 'i18n');
@@ -1825,6 +1863,53 @@ var DBTableDataAction;
1825
1863
  DBTableDataAction["BULK_INSERT"] = "bulkInsert";
1826
1864
  })(DBTableDataAction || (DBTableDataAction = {}));
1827
1865
 
1866
+ const AnalyticsRuntimeCapability = createRuntimeCapability('platform.datasource.analytics', {
1867
+ description: 'Execute scoped read-only provider queries and validate their dataset contracts.'
1868
+ });
1869
+
1870
+ const ANALYTICS_PROVIDER = 'ANALYTICS_QUERY_PROVIDER';
1871
+ /** Mark a Nest provider registered by a plugin module; id must match its descriptor.id. */ const AnalyticsProvider = (id)=>applyDecorators(SetMetadata(ANALYTICS_PROVIDER, id), SetMetadata(STRATEGY_META_KEY, ANALYTICS_PROVIDER));
1872
+ /** Uses shared plugin scoping; execution callers list providers for the current actor's organization. */ let AnalyticsProviderRegistry = class AnalyticsProviderRegistry extends BaseStrategyRegistry {
1873
+ constructor(discovery, reflector){
1874
+ super(ANALYTICS_PROVIDER, discovery, reflector);
1875
+ }
1876
+ };
1877
+ AnalyticsProviderRegistry = __decorate([
1878
+ Injectable(),
1879
+ __metadata("design:paramtypes", [
1880
+ DiscoveryService,
1881
+ Reflector
1882
+ ])
1883
+ ], AnalyticsProviderRegistry);
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
+
1828
1913
  const AI_MODEL_PROVIDER = 'AI_MODEL_PROVIDER';
1829
1914
  function AIModelProviderStrategy(provider) {
1830
1915
  var _err_stack;
@@ -3971,35 +4056,61 @@ function getModelContextSize(input) {
3971
4056
  var _input_options;
3972
4057
  return normalizeContextSize((_input_options = input.options) == null ? void 0 : _input_options[ModelPropertyKey.CONTEXT_SIZE]);
3973
4058
  }
3974
- // Backward compatibility for langchain <1.0.0
3975
- if (input.metadata && "profile" in input.metadata) {
3976
- const profile = input.metadata['profile'];
3977
- if ("maxInputTokens" in profile && (typeof profile.maxInputTokens === "number" || profile.maxInputTokens == null)) {
3978
- var _profile_maxInputTokens;
3979
- return (_profile_maxInputTokens = profile.maxInputTokens) != null ? _profile_maxInputTokens : undefined;
3980
- }
3981
- }
3982
- // Langchain v1.0.0+
3983
- if ("profile" in input && typeof input.profile === "object" && input.profile && "maxInputTokens" in input.profile && (typeof input.profile.maxInputTokens === "number" || input.profile.maxInputTokens == null)) {
3984
- var _input_profile_maxInputTokens;
3985
- return (_input_profile_maxInputTokens = input.profile.maxInputTokens) != null ? _input_profile_maxInputTokens : undefined;
3986
- }
3987
- if ("model" in input && typeof input.model === "string") {
3988
- return getModelContextSize$1(input.model);
3989
- }
3990
- if ("modelName" in input && typeof input.modelName === "string") {
3991
- return getModelContextSize$1(input.modelName);
3992
- }
3993
- 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;
3994
4105
  }
3995
4106
  function isCopilotModel(input) {
3996
- return typeof input === "object" && input !== null && !("invoke" in input);
4107
+ return typeof input === 'object' && input !== null && !('invoke' in input);
3997
4108
  }
3998
4109
  function normalizeContextSize(value) {
3999
- if (typeof value === "number" && Number.isFinite(value) && value > 0) {
4110
+ if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
4000
4111
  return Math.floor(value);
4001
4112
  }
4002
- if (typeof value === "string") {
4113
+ if (typeof value === 'string') {
4003
4114
  const parsed = Number.parseInt(value, 10);
4004
4115
  if (Number.isFinite(parsed) && parsed > 0) {
4005
4116
  return parsed;
@@ -4056,12 +4167,12 @@ Reflect.defineMetadata(COMMAND_METADATA$1, {
4056
4167
  };
4057
4168
  }
4058
4169
 
4059
- const modelListSchema = z.object({
4060
- data: z.array(z.object({
4061
- id: z.string().trim().min(1).max(512),
4062
- active: z.boolean().optional(),
4063
- name: z.string().optional(),
4064
- model_type: z.string().optional()
4170
+ const modelListSchema = z$1.object({
4171
+ data: z$1.array(z$1.object({
4172
+ id: z$1.string().trim().min(1).max(512),
4173
+ active: z$1.boolean().optional(),
4174
+ name: z$1.string().optional(),
4175
+ model_type: z$1.string().optional()
4065
4176
  }))
4066
4177
  });
4067
4178
  /** OpenAI-compatible discovery transport and import suggestions, never runtime routing. */ async function discoverOpenAIModels(options) {
@@ -4244,79 +4355,79 @@ const AGENT_CHAT_DISPATCH_MESSAGE_TYPE = defineAgentMessageType('chat_dispatch',
4244
4355
  const AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING = 'steer_target_not_running';
4245
4356
 
4246
4357
  /** Captured by an authorized host command. Describing a recipient never authorizes delivery. */ const replyConversation = {
4247
- conversationId: z$1.string().uuid(),
4248
- threadId: z$1.string().trim().min(1).max(256)
4358
+ conversationId: z.string().uuid(),
4359
+ threadId: z.string().trim().min(1).max(256)
4249
4360
  };
4250
- const agentRuntimeReplyTargetSchema = z$1.discriminatedUnion('type', [
4251
- z$1.object(_extends({}, replyConversation, {
4252
- type: z$1.literal('xpert').optional(),
4253
- xpertId: z$1.string().uuid(),
4254
- agentKey: z$1.string().trim().min(1).max(256)
4361
+ const agentRuntimeReplyTargetSchema = z.discriminatedUnion('type', [
4362
+ z.object(_extends({}, replyConversation, {
4363
+ type: z.literal('xpert').optional(),
4364
+ xpertId: z.string().uuid(),
4365
+ agentKey: z.string().trim().min(1).max(256)
4255
4366
  })).strict(),
4256
- z$1.object(_extends({}, replyConversation, {
4257
- type: z$1.literal('project_agent'),
4258
- projectId: z$1.string().uuid(),
4259
- agentKey: z$1.literal('general_agent')
4367
+ z.object(_extends({}, replyConversation, {
4368
+ type: z.literal('project_agent'),
4369
+ projectId: z.string().uuid(),
4370
+ agentKey: z.literal('general_agent')
4260
4371
  })).strict()
4261
4372
  ]);
4262
- /** Persist with the immutable invocation request before launch. No credentials or arbitrary routing headers. */ const agentInvocationDispatchContextSchema = z$1.object({
4263
- version: z$1.literal(1),
4264
- requestId: z$1.string().uuid(),
4265
- sourceMessageId: z$1.string().trim().min(1).max(256),
4373
+ /** Persist with the immutable invocation request before launch. No credentials or arbitrary routing headers. */ const agentInvocationDispatchContextSchema = z.object({
4374
+ version: z.literal(1),
4375
+ requestId: z.string().uuid(),
4376
+ sourceMessageId: z.string().trim().min(1).max(256),
4266
4377
  replyTo: agentRuntimeReplyTargetSchema,
4267
4378
  projectTask: projectTaskExecutionContextSchema.optional()
4268
4379
  }).strict();
4269
4380
 
4270
4381
  const AGENT_RUNTIME_EVENT_MESSAGE_TYPE = defineAgentMessageType('runtime_event', 1);
4271
4382
  const reference = {
4272
- version: z$1.literal(1),
4273
- invocationId: z$1.string().uuid(),
4274
- /** Revision of the persisted observation, never a queue delivery attempt. */ revision: z$1.number().int().nonnegative(),
4383
+ version: z.literal(1),
4384
+ invocationId: z.string().uuid(),
4385
+ /** Revision of the persisted observation, never a queue delivery attempt. */ revision: z.number().int().nonnegative(),
4275
4386
  projectTask: projectTaskExecutionReferenceSchema.optional()
4276
4387
  };
4277
- /** Host-produced references. Consumers reload and authorize the invocation and its pinned observation. */ const agentRuntimeEventSchema = z$1.discriminatedUnion('kind', [
4278
- z$1.object(_extends({}, reference, {
4279
- kind: z$1.literal('progress'),
4388
+ /** Host-produced references. Consumers reload and authorize the invocation and its pinned observation. */ const agentRuntimeEventSchema = z.discriminatedUnion('kind', [
4389
+ z.object(_extends({}, reference, {
4390
+ kind: z.literal('progress'),
4280
4391
  progress: agentRuntimeProgressSchema
4281
4392
  })).strict(),
4282
- z$1.object(_extends({}, reference, {
4283
- kind: z$1.literal('result'),
4393
+ z.object(_extends({}, reference, {
4394
+ kind: z.literal('result'),
4284
4395
  status: agentInvocationTerminalStatusSchema
4285
4396
  })).strict(),
4286
- z$1.object(_extends({}, reference, {
4287
- kind: z$1.literal('input_request'),
4288
- interactionId: z$1.string().trim().min(1).max(256)
4397
+ z.object(_extends({}, reference, {
4398
+ kind: z.literal('input_request'),
4399
+ interactionId: z.string().trim().min(1).max(256)
4289
4400
  })).strict()
4290
4401
  ]);
4291
4402
  /** Same observation always has the same HandoffMessage.id across retries and process restarts. */ function agentRuntimeEventMessageId(event) {
4292
4403
  return `runtime-${event.invocationId}-${event.kind}-${event.revision}`;
4293
4404
  }
4294
- /** Transport states are deliberately separate from Task and Invocation status. */ const agentRuntimeDeliveryStateSchema = z$1.enum([
4405
+ /** Transport states are deliberately separate from Task and Invocation status. */ const agentRuntimeDeliveryStateSchema = z.enum([
4295
4406
  'pending',
4296
4407
  'received',
4297
4408
  'blocked',
4298
4409
  'failed'
4299
4410
  ]);
4300
- const agentRuntimeConsumptionStateSchema = z$1.enum([
4411
+ const agentRuntimeConsumptionStateSchema = z.enum([
4301
4412
  'pending',
4302
4413
  'processing',
4303
4414
  'processed',
4304
4415
  'blocked',
4305
4416
  'failed'
4306
4417
  ]);
4307
- /** Store under a unique scoped key in the same transaction as the continuation reservation. */ const agentRuntimeResultClaimSchema = z$1.object({
4308
- invocationId: z$1.string().uuid(),
4309
- resultRevision: z$1.number().int().nonnegative(),
4418
+ /** Store under a unique scoped key in the same transaction as the continuation reservation. */ const agentRuntimeResultClaimSchema = z.object({
4419
+ invocationId: z.string().uuid(),
4420
+ resultRevision: z.number().int().nonnegative(),
4310
4421
  recipient: agentRuntimeReplyTargetSchema,
4311
- consumer: z$1.discriminatedUnion('type', [
4312
- z$1.object({
4313
- type: z$1.literal('follow_up'),
4314
- executionId: z$1.string().uuid()
4422
+ consumer: z.discriminatedUnion('type', [
4423
+ z.object({
4424
+ type: z.literal('follow_up'),
4425
+ executionId: z.string().uuid()
4315
4426
  }).strict(),
4316
- z$1.object({
4317
- type: z$1.literal('wait'),
4318
- executionId: z$1.string().uuid(),
4319
- callId: z$1.string().trim().min(1).max(1024)
4427
+ z.object({
4428
+ type: z.literal('wait'),
4429
+ executionId: z.string().uuid(),
4430
+ callId: z.string().trim().min(1).max(1024)
4320
4431
  }).strict()
4321
4432
  ])
4322
4433
  }).strict();
@@ -4430,6 +4541,23 @@ function taskWaitReason(states, mode) {
4430
4541
  const AgentExecutionRunnerCapability = createRuntimeCapability('platform.agent_execution.runner');
4431
4542
  const AgentExecutionRunnerFactoryCapability = createRuntimeCapability('platform.agent_execution.runner.factory');
4432
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
+
4433
4561
  /** Older runtime plugins can still send this event; new emissions use ON_CHAT_EVENT. */ const RESOURCE_CARD_EVENT = 'xpert.resource_card';
4434
4562
 
4435
4563
  const ASSISTANT_CAPABILITY_PROVIDER = 'ASSISTANT_CAPABILITY_PROVIDER';
@@ -4794,6 +4922,67 @@ function resolveSandboxBackend(sandbox) {
4794
4922
  return isSandboxBackend(candidate) ? candidate : null;
4795
4923
  }
4796
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
+
4797
4986
  const MAX_LINE_LENGTH = 500;
4798
4987
  const MAX_GREP_LINE_LENGTH = 2000;
4799
4988
  const GREP_RESULT_LIMIT = 100;
@@ -5633,70 +5822,16 @@ try {
5633
5822
  filesUpdate: null
5634
5823
  };
5635
5824
  }
5636
- /**
5637
- * Edit a file by replacing string occurrences.
5638
- */ async edit(filePath, oldString, newString, replaceAll = false) {
5825
+ /** Edit a file by replacing string occurrences. */ async edit(filePath, oldString, newString, replaceAll = false) {
5639
5826
  const command = buildEditCommand(filePath, oldString, newString, replaceAll);
5640
5827
  const result = await this.executeOperation(command, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS);
5641
- switch(result.exitCode){
5642
- case 0:
5643
- {
5644
- const occurrences = parseInt(result.output.trim(), 10) || 1;
5645
- return {
5646
- path: filePath,
5647
- filesUpdate: null,
5648
- occurrences
5649
- };
5650
- }
5651
- case 1:
5652
- return {
5653
- error: `String not found in file '${filePath}'`
5654
- };
5655
- case 2:
5656
- return {
5657
- error: `Multiple occurrences found in '${filePath}'. Use replaceAll=true to replace all.`
5658
- };
5659
- case 3:
5660
- return {
5661
- error: `Error: File '${filePath}' not found`
5662
- };
5663
- default:
5664
- return {
5665
- error: `Unknown error editing file '${filePath}'`
5666
- };
5667
- }
5828
+ return editCommandResult(filePath, result);
5668
5829
  }
5669
- /**
5670
- * Perform multiple sequential edits on a single file.
5671
- * All edits are applied sequentially, with each edit operating on the result of the previous edit.
5672
- * All edits must succeed for the operation to succeed (atomic).
5673
- */ async multiEdit(filePath, edits) {
5674
- if (!edits || edits.length === 0) {
5675
- return {
5676
- error: 'No edits provided'
5677
- };
5678
- }
5679
- const results = [];
5680
- 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)=>{
5681
5832
  var _edit_replaceAll;
5682
- const result = await this.edit(filePath, edit.oldString, edit.newString, (_edit_replaceAll = edit.replaceAll) != null ? _edit_replaceAll : false);
5683
- results.push(result);
5684
- // If any edit fails, return immediately with error
5685
- if (result.error) {
5686
- return {
5687
- error: `Multi-edit failed at edit ${results.length}: ${result.error}`,
5688
- path: filePath,
5689
- filesUpdate: null,
5690
- results
5691
- };
5692
- }
5693
- }
5694
- // All edits succeeded
5695
- return {
5696
- path: filePath,
5697
- filesUpdate: null,
5698
- results
5699
- };
5833
+ return this.edit(filePath, edit.oldString, edit.newString, (_edit_replaceAll = edit.replaceAll) != null ? _edit_replaceAll : false);
5834
+ });
5700
5835
  }
5701
5836
  }
5702
5837
 
@@ -6369,6 +6504,22 @@ const ViewMiddlewareRuntimeCapability = createRuntimeCapability('platform.view.m
6369
6504
  description: 'Resolve a View capability through its authorized Assistant middleware and scoped runtime.'
6370
6505
  });
6371
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
+
6372
6523
  /** Platform-owned real-time collaboration capability available to scoped plugin runtimes. */ const CollaborationRuntimeCapability = createRuntimeCapability('platform.collaboration', {
6373
6524
  description: 'Create, synchronize, persist, authorize, and observe platform-managed real-time collaboration documents.'
6374
6525
  });
@@ -6485,19 +6636,6 @@ const XPERT_TOOL_METHOD_METADATA = 'XPERT_TOOL_METHOD_METADATA';
6485
6636
  return methods;
6486
6637
  }
6487
6638
 
6488
- function _object_without_properties_loose$2(source, excluded) {
6489
- if (source == null) return {};
6490
- var target = {};
6491
- var sourceKeys = Object.keys(source);
6492
- var key, i;
6493
- for(i = 0; i < sourceKeys.length; i++){
6494
- key = sourceKeys[i];
6495
- if (excluded.indexOf(key) >= 0) continue;
6496
- target[key] = source[key];
6497
- }
6498
- return target;
6499
- }
6500
-
6501
6639
  const MCP_METHOD_METADATA = 'XPERT_MCP_METHOD_METADATA';
6502
6640
  /** The decorated method receives ResourceReadContext and returns McpResourceReadResult. */ const XpertResource = (options)=>SetMetadata(MCP_METHOD_METADATA, {
6503
6641
  kind: 'resource',
@@ -6912,38 +7050,38 @@ async function resolveToolResult(value, validate) {
6912
7050
  // Validate metadata with the declared output schema, preserve bounded media blocks,
6913
7051
  // and include the same DTO in text for clients that hide structuredContent.
6914
7052
  const XPERT_TOOL_RESULT_FORMAT_VERSION = 1;
6915
- const contentSchema = z$1.discriminatedUnion('type', [
6916
- z$1.object({
6917
- type: z$1.literal('text'),
6918
- text: z$1.string().max(2 * 1024 * 1024)
7053
+ const contentSchema = z.discriminatedUnion('type', [
7054
+ z.object({
7055
+ type: z.literal('text'),
7056
+ text: z.string().max(2 * 1024 * 1024)
6919
7057
  }).strict(),
6920
- z$1.object({
6921
- type: z$1.literal('image'),
6922
- data: z$1.string().min(1).max(8 * 1024 * 1024),
6923
- mimeType: z$1.enum([
7058
+ z.object({
7059
+ type: z.literal('image'),
7060
+ data: z.string().min(1).max(8 * 1024 * 1024),
7061
+ mimeType: z.enum([
6924
7062
  'image/png',
6925
7063
  'image/jpeg',
6926
7064
  'image/webp',
6927
7065
  'image/gif'
6928
7066
  ])
6929
7067
  }).strict(),
6930
- z$1.object({
6931
- type: z$1.literal('audio'),
6932
- data: z$1.string().min(1).max(8 * 1024 * 1024),
6933
- mimeType: z$1.string().min(1).max(100)
7068
+ z.object({
7069
+ type: z.literal('audio'),
7070
+ data: z.string().min(1).max(8 * 1024 * 1024),
7071
+ mimeType: z.string().min(1).max(100)
6934
7072
  }).strict(),
6935
- z$1.object({
6936
- type: z$1.literal('resource_link'),
6937
- uri: z$1.string().min(1).max(4096),
6938
- name: z$1.string().max(240).optional()
7073
+ z.object({
7074
+ type: z.literal('resource_link'),
7075
+ uri: z.string().min(1).max(4096),
7076
+ name: z.string().max(240).optional()
6939
7077
  }).strict()
6940
7078
  ]);
6941
7079
  /** Validate the envelope separately so binary content never enters the business DTO. */ async function parseDecoratedToolResult(value, outputSchema) {
6942
7080
  var _result_content;
6943
- const envelope = z$1.object({
6944
- content: z$1.array(contentSchema).max(32).optional(),
6945
- structuredContent: outputSchema != null ? outputSchema : z$1.unknown().optional(),
6946
- isError: z$1.boolean().optional()
7081
+ const envelope = z.object({
7082
+ content: z.array(contentSchema).max(32).optional(),
7083
+ structuredContent: outputSchema != null ? outputSchema : z.unknown().optional(),
7084
+ isError: z.boolean().optional()
6947
7085
  }).strict();
6948
7086
  const result = await envelope.parseAsync(value);
6949
7087
  var _result_content_map;
@@ -7011,8 +7149,8 @@ function agentContent(content) {
7011
7149
  }
7012
7150
 
7013
7151
  class DecoratedToolsetStrategy {
7014
- validateConfig() {
7015
- return Promise.resolve();
7152
+ async validateConfig(config) {
7153
+ await (this.instance.validateConfig == null ? void 0 : this.instance.validateConfig.call(this.instance, config));
7016
7154
  }
7017
7155
  async create(toolset, params) {
7018
7156
  return new DecoratedBuiltinToolset(this.instance, this.descriptor, toolset, params, this.pluginName, this.pluginVersion);
@@ -10258,8 +10396,271 @@ ProjectTaskProviderRegistry = __decorate([
10258
10396
  ])
10259
10397
  ], ProjectTaskProviderRegistry);
10260
10398
  const ProjectTasksRuntimeCapability = createRuntimeCapability('platform.project.tasks', {
10261
- 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.'
10400
+ });
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.'
10262
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);
10263
10664
 
10264
10665
  /** Import official resource packages for the authenticated organization administrator. Does not authorize workspaces. */ class ImportDefaultAgentPluginsCommand extends Command {
10265
10666
  }
@@ -10268,4 +10669,4 @@ Reflect.defineMetadata('__command__', {
10268
10669
  id: ImportDefaultAgentPluginsCommand.type
10269
10670
  }, ImportDefaultAgentPluginsCommand);
10270
10671
 
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 };
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 };