@xpert-ai/plugin-sdk 3.19.0 → 3.21.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.
- package/CHANGELOG.md +124 -0
- package/README.md +55 -0
- package/RESOURCE-CARDS-VALIDATION.md +51 -0
- package/RESOURCE-CARDS.md +361 -0
- package/TOOL-IMAGES.md +85 -0
- package/agent-results.cjs.default.js +1 -0
- package/agent-results.cjs.js +20 -0
- package/agent-results.cjs.mjs +2 -0
- package/agent-results.d.ts +1 -0
- package/agent-results.esm.js +4 -0
- package/index.cjs.js +494 -115
- package/index.esm.js +444 -114
- package/model-provider.cjs.js +45 -68
- package/model-provider.esm.js +46 -64
- package/package.json +8 -2
- package/results.cjs.js +50 -0
- package/results.esm.js +46 -0
- package/src/agent-results.d.ts +2 -0
- package/src/index.d.ts +3 -0
- package/src/lib/agent/handoff/agent-chat.contract.d.ts +10 -1
- package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +319 -0
- package/src/lib/agent/handoff/index.d.ts +1 -0
- package/src/lib/agent/index.d.ts +1 -0
- package/src/lib/agent/middleware/index.d.ts +1 -0
- package/src/lib/agent/middleware/model-requirements.d.ts +9 -0
- package/src/lib/agent/middleware/strategy.interface.d.ts +4 -0
- package/src/lib/agent/middleware/types.d.ts +7 -0
- package/src/lib/agent/resource-card.d.ts +3 -0
- package/src/lib/agent/runtime/activity.d.ts +6 -0
- package/src/lib/agent/runtime/capability.d.ts +13 -5
- package/src/lib/agent/runtime/cli-model-profile.d.ts +62 -0
- package/src/lib/agent/runtime/dispatch.d.ts +517 -0
- package/src/lib/agent/runtime/execution-runner.d.ts +66 -0
- package/src/lib/agent/runtime/index.d.ts +7 -0
- package/src/lib/agent/runtime/model-execution.d.ts +15 -0
- package/src/lib/agent/runtime/results.d.ts +335 -0
- package/src/lib/agent/runtime/strategy.d.ts +3 -0
- package/src/lib/agent/runtime/task-wait.d.ts +35 -0
- package/src/lib/agent/runtime/types.d.ts +35 -11
- package/src/lib/agent-plugin/import-default-agent-plugins.command.d.ts +6 -0
- package/src/lib/ai-model/ai-model-provider.interface.d.ts +2 -0
- package/src/lib/ai-model/ai-model.d.ts +2 -0
- package/src/lib/ai-model/index.d.ts +3 -0
- package/src/lib/ai-model/llm.d.ts +4 -2
- package/src/lib/ai-model/native-model.d.ts +22 -0
- package/src/lib/ai-model/realtime.d.ts +36 -0
- package/src/lib/ai-model/token-usage.d.ts +13 -0
- package/src/lib/core/context/request-context.d.ts +1 -0
- package/src/lib/mcp/app.d.ts +4 -1
- package/src/lib/project-task/index.d.ts +8 -1
- package/src/lib/project-type/index.d.ts +8 -1
- package/src/lib/rag/capability/index.d.ts +5 -0
- package/src/lib/{runtime/capabilities → rag/capability}/knowledge-document-visual-assets.d.ts +2 -2
- package/src/lib/rag/capability/knowledge-upload-sessions.d.ts +71 -0
- package/src/lib/{runtime/capabilities → rag/capability}/knowledgebase-documents.d.ts +9 -1
- package/src/lib/{runtime/capabilities → rag/capability}/knowledgebase.d.ts +4 -0
- package/src/lib/rag/index.d.ts +1 -0
- package/src/lib/resource-card-provider/index.d.ts +3 -0
- package/src/lib/resource-card-provider/provider.decorator.d.ts +4 -0
- package/src/lib/resource-card-provider/provider.registry.d.ts +14 -0
- package/src/lib/resource-card-provider/types.d.ts +36 -0
- package/src/lib/resource-card.d.ts +6 -0
- package/src/lib/runtime/capabilities/index.d.ts +1 -4
- package/src/lib/runtime/capabilities/project-provisioning.d.ts +10 -0
- package/src/lib/runtime/capabilities/tool-images.d.ts +24 -0
- package/src/lib/runtime/capabilities/workspace-files.d.ts +8 -2
- package/src/lib/sandbox/execution-environment.d.ts +2 -0
- package/src/lib/sandbox/execution.d.ts +10 -0
- package/src/lib/sandbox/managed-service.d.ts +1 -0
- /package/src/lib/{runtime/capabilities → rag/capability}/knowledge-graph.d.ts +0 -0
package/index.cjs.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var common = require('@nestjs/common');
|
|
4
4
|
var constants = require('@nestjs/common/constants');
|
|
5
5
|
var lodashEs = require('lodash-es');
|
|
6
|
-
var
|
|
6
|
+
var dispatch = require('@langchain/core/callbacks/dispatch');
|
|
7
|
+
var contracts = require('@xpert-ai/contracts');
|
|
7
8
|
var core = require('@nestjs/core');
|
|
8
9
|
var rxjs = require('rxjs');
|
|
9
|
-
var
|
|
10
|
+
var _extends = require('./_extends.cjs.js');
|
|
10
11
|
var node_async_hooks = require('node:async_hooks');
|
|
11
12
|
var passportJwt = require('passport-jwt');
|
|
12
13
|
var node_crypto = require('node:crypto');
|
|
@@ -34,10 +35,11 @@ var env = require('@langchain/core/utils/env');
|
|
|
34
35
|
var modelProviderHttpClient = require('./model-provider-http-client.cjs.js');
|
|
35
36
|
var jsTiktoken = require('js-tiktoken');
|
|
36
37
|
var base$1 = require('@langchain/core/language_models/base');
|
|
38
|
+
var v3 = require('zod/v3');
|
|
39
|
+
var results = require('./results.cjs.js');
|
|
37
40
|
var connector = require('./connector.cjs.js');
|
|
38
41
|
var collaborationClient = require('./collaboration-client.cjs.js');
|
|
39
42
|
var tools = require('@langchain/core/tools');
|
|
40
|
-
var v3 = require('zod/v3');
|
|
41
43
|
|
|
42
44
|
function _interopNamespaceDefault(e) {
|
|
43
45
|
var n = Object.create(null);
|
|
@@ -123,6 +125,10 @@ function assertPluginArtifactNamePart(value, label) {
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
|
|
128
|
+
/** Call after the business mutation commits. A display failure must not retry that mutation. */ async function emitResourceCard(card, config) {
|
|
129
|
+
await dispatch.dispatchCustomEvent(contracts.ChatMessageEventTypeEnum.ON_CHAT_EVENT, contracts.createResourceCardContent(card), config);
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
const ORGANIZATION_METADATA_KEY = 'xpert:organizationId';
|
|
127
133
|
const PLUGIN_METADATA_KEY = 'xpert:pluginName';
|
|
128
134
|
const PLUGIN_VERSION_METADATA_KEY = 'xpert:pluginVersion';
|
|
@@ -159,27 +165,13 @@ function resolveTenantGlobalScopeKey(tenantId) {
|
|
|
159
165
|
return GLOBAL_ORGANIZATION_SCOPE;
|
|
160
166
|
}
|
|
161
167
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
};
|
|
170
|
-
return {
|
|
171
|
-
child (meta) {
|
|
172
|
-
return createPluginLogger(scope, _extends._extends({}, baseMeta, meta));
|
|
173
|
-
},
|
|
174
|
-
debug: (msg, meta)=>wrap('debug', msg, meta),
|
|
175
|
-
log: (msg, meta)=>wrap('log', msg, meta),
|
|
176
|
-
warn: (msg, meta)=>wrap('warn', msg, meta),
|
|
177
|
-
error: (msg, meta)=>wrap('error', msg, meta)
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const INTEGRATION_STRATEGY = 'INTEGRATION_STRATEGY';
|
|
182
|
-
const IntegrationStrategyKey = (provider)=>common.applyDecorators(common.SetMetadata(INTEGRATION_STRATEGY, provider), common.SetMetadata(STRATEGY_META_KEY, INTEGRATION_STRATEGY));
|
|
168
|
+
const RESOURCE_CARD_PROVIDER = 'RESOURCE_CARD_PROVIDER';
|
|
169
|
+
/** Register exact resource types whose message cards opt in to live refresh. */ const ResourceCardProvider = (...resources)=>{
|
|
170
|
+
if (!resources.length || resources.some(({ namespace, type })=>!(namespace == null ? void 0 : namespace.trim()) || !(type == null ? void 0 : type.trim()))) {
|
|
171
|
+
throw new Error('ResourceCardProvider requires explicit resource namespaces and types');
|
|
172
|
+
}
|
|
173
|
+
return common.applyDecorators(common.SetMetadata(RESOURCE_CARD_PROVIDER, resources), common.SetMetadata(STRATEGY_META_KEY, RESOURCE_CARD_PROVIDER));
|
|
174
|
+
};
|
|
183
175
|
|
|
184
176
|
function __decorate(decorators, target, key, desc) {
|
|
185
177
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -208,14 +200,15 @@ class RequestContext {
|
|
|
208
200
|
const session = getRequestContext();
|
|
209
201
|
return session;
|
|
210
202
|
}
|
|
211
|
-
static currentApiKey() {
|
|
203
|
+
/** @deprecated For resource authorization use currentApiPrincipal()?.resourceScope; retained for credential metadata. */ static currentApiKey() {
|
|
212
204
|
var _RequestContext_currentApiPrincipal;
|
|
213
205
|
var _RequestContext_currentApiPrincipal_apiKey;
|
|
214
206
|
return (_RequestContext_currentApiPrincipal_apiKey = (_RequestContext_currentApiPrincipal = RequestContext.currentApiPrincipal()) == null ? void 0 : _RequestContext_currentApiPrincipal.apiKey) != null ? _RequestContext_currentApiPrincipal_apiKey : null;
|
|
215
207
|
}
|
|
216
208
|
static currentApiPrincipal() {
|
|
217
209
|
const user = RequestContext.currentUser();
|
|
218
|
-
|
|
210
|
+
// Conversation-scoped client secrets carry no synthetic API key.
|
|
211
|
+
return (user == null ? void 0 : user.apiKey) || (user == null ? void 0 : user.principalType) === 'client_secret' || (user == null ? void 0 : user.principalType) === 'api_key' ? user : null;
|
|
219
212
|
}
|
|
220
213
|
static currentRequest() {
|
|
221
214
|
const requestContext = RequestContext.currentRequestContext();
|
|
@@ -764,6 +757,102 @@ __decorate([
|
|
|
764
757
|
return typeof constructor === 'function' ? constructor : null;
|
|
765
758
|
}
|
|
766
759
|
|
|
760
|
+
var ResourceCardProviderRegistry_1;
|
|
761
|
+
const resourceTypeKey = ({ namespace, type })=>JSON.stringify([
|
|
762
|
+
namespace,
|
|
763
|
+
type
|
|
764
|
+
]);
|
|
765
|
+
function isProvider(value) {
|
|
766
|
+
return !!value && typeof value === 'object' && 'resolveMany' in value && typeof value.resolveMany === 'function';
|
|
767
|
+
}
|
|
768
|
+
exports.ResourceCardProviderRegistry = ResourceCardProviderRegistry_1 = class ResourceCardProviderRegistry extends BaseStrategyRegistry {
|
|
769
|
+
onModuleInit() {
|
|
770
|
+
this.subscription = this.bus.events$.pipe(rxjs.filter((event)=>!event.strategyType || event.strategyType === RESOURCE_CARD_PROVIDER)).subscribe((event)=>{
|
|
771
|
+
try {
|
|
772
|
+
if (event.type === 'UPSERT') this.upsert(event.entry.instance);
|
|
773
|
+
else this.remove(event.orgId, event.pluginName);
|
|
774
|
+
} catch (e) {
|
|
775
|
+
// Reject the conflicting provider without terminating the lifecycle subscription.
|
|
776
|
+
this.resourceLogger.warn('Rejected invalid or conflicting resource card provider registration');
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
for (const { instance } of this.discoveryService.getProviders())if (instance) this.upsert(instance);
|
|
780
|
+
}
|
|
781
|
+
onModuleDestroy() {
|
|
782
|
+
var _this_subscription;
|
|
783
|
+
(_this_subscription = this.subscription) == null ? void 0 : _this_subscription.unsubscribe();
|
|
784
|
+
}
|
|
785
|
+
remove(scopeKey, pluginName) {
|
|
786
|
+
for (const entry of this.listAllRegistrations()){
|
|
787
|
+
if (entry.source.kind === 'plugin' && entry.source.pluginName === pluginName && entry.source.scopeKey === scopeKey) {
|
|
788
|
+
this.unregister(entry.type, entry.source, entry.strategy);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
upsert(instance) {
|
|
793
|
+
const target = resolveStrategyMetadataTarget(instance);
|
|
794
|
+
const resources = target && this.reflector.get(RESOURCE_CARD_PROVIDER, target);
|
|
795
|
+
if (!resources) return;
|
|
796
|
+
if (!isProvider(instance)) throw new Error('ResourceCardProvider must implement resolveMany');
|
|
797
|
+
const source = this.getSource(instance);
|
|
798
|
+
const keys = resources.map(resourceTypeKey);
|
|
799
|
+
// A route belongs to one plugin across scopes; a different plugin cannot shadow it.
|
|
800
|
+
// Preflight the whole batch so a conflicting multi-type provider is never partly installed.
|
|
801
|
+
for (const key of keys){
|
|
802
|
+
for (const existing of this.listAllRegistrations().filter((entry)=>entry.type === key)){
|
|
803
|
+
const samePlugin = source.kind === 'plugin' && existing.source.kind === 'plugin' && source.pluginName === existing.source.pluginName;
|
|
804
|
+
if (existing.strategy !== instance && !samePlugin) {
|
|
805
|
+
throw new Error(`Resource card type ${key} is already registered`);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
this.assertCanRegister(key, instance, source);
|
|
809
|
+
}
|
|
810
|
+
for (const key of keys)this.register(key, instance, source);
|
|
811
|
+
}
|
|
812
|
+
find(resource, organizationId) {
|
|
813
|
+
const key = resourceTypeKey(resource);
|
|
814
|
+
for (const scopeKey of this.resolveStrategyScopeKeys(organizationId)){
|
|
815
|
+
var _this_strategies_get;
|
|
816
|
+
const provider = (_this_strategies_get = this.strategies.get(scopeKey)) == null ? void 0 : _this_strategies_get.get(key);
|
|
817
|
+
if (provider) return provider;
|
|
818
|
+
}
|
|
819
|
+
return undefined;
|
|
820
|
+
}
|
|
821
|
+
constructor(discovery, reflector){
|
|
822
|
+
super(RESOURCE_CARD_PROVIDER, discovery, reflector);
|
|
823
|
+
this.resourceLogger = new common.Logger(ResourceCardProviderRegistry_1.name);
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
exports.ResourceCardProviderRegistry = ResourceCardProviderRegistry_1 = __decorate([
|
|
827
|
+
common.Injectable(),
|
|
828
|
+
__metadata("design:paramtypes", [
|
|
829
|
+
core.DiscoveryService,
|
|
830
|
+
core.Reflector
|
|
831
|
+
])
|
|
832
|
+
], exports.ResourceCardProviderRegistry);
|
|
833
|
+
|
|
834
|
+
function createPluginLogger(scope, baseMeta = {}) {
|
|
835
|
+
const nestLogger = new common.Logger(scope);
|
|
836
|
+
const wrap = (level, msg, meta)=>{
|
|
837
|
+
var // Maintain alignment with the Nest Logger interface
|
|
838
|
+
_nestLogger_level;
|
|
839
|
+
const payload = meta ? _extends._extends({}, baseMeta, meta) : baseMeta;
|
|
840
|
+
(_nestLogger_level = nestLogger[level]) == null ? void 0 : _nestLogger_level.call(nestLogger, msg + (Object.keys(payload).length ? ` ${JSON.stringify(payload)}` : ''));
|
|
841
|
+
};
|
|
842
|
+
return {
|
|
843
|
+
child (meta) {
|
|
844
|
+
return createPluginLogger(scope, _extends._extends({}, baseMeta, meta));
|
|
845
|
+
},
|
|
846
|
+
debug: (msg, meta)=>wrap('debug', msg, meta),
|
|
847
|
+
log: (msg, meta)=>wrap('log', msg, meta),
|
|
848
|
+
warn: (msg, meta)=>wrap('warn', msg, meta),
|
|
849
|
+
error: (msg, meta)=>wrap('error', msg, meta)
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
const INTEGRATION_STRATEGY = 'INTEGRATION_STRATEGY';
|
|
854
|
+
const IntegrationStrategyKey = (provider)=>common.applyDecorators(common.SetMetadata(INTEGRATION_STRATEGY, provider), common.SetMetadata(STRATEGY_META_KEY, INTEGRATION_STRATEGY));
|
|
855
|
+
|
|
767
856
|
exports.IntegrationStrategyRegistry = class IntegrationStrategyRegistry extends BaseStrategyRegistry {
|
|
768
857
|
constructor(discoveryService, reflector){
|
|
769
858
|
super(INTEGRATION_STRATEGY, discoveryService, reflector);
|
|
@@ -1034,6 +1123,28 @@ exports.KeywordAnalyzerRegistry = __decorate([
|
|
|
1034
1123
|
])
|
|
1035
1124
|
], exports.KeywordAnalyzerRegistry);
|
|
1036
1125
|
|
|
1126
|
+
const KnowledgebaseRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledgebase', {
|
|
1127
|
+
description: 'List, search, and write chunks in platform knowledgebases.'
|
|
1128
|
+
});
|
|
1129
|
+
const KnowledgebaseProvisioningRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledgebase.provisioning', {
|
|
1130
|
+
description: 'Idempotently provision managed platform knowledgebases and connect them to an Agent.'
|
|
1131
|
+
});
|
|
1132
|
+
|
|
1133
|
+
const KnowledgeGraphRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledge-graph', {
|
|
1134
|
+
description: 'Publish, inspect, and retract source-owned structured knowledge graphs without model extraction.'
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
const KnowledgebaseDocumentsRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledgebase.documents', {
|
|
1138
|
+
description: 'Upload, import, create, process, reprocess, inspect, and delete persistent knowledgebase documents.'
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
const KnowledgeDocumentVisualAssetsRuntimeCapability = modelProvider.createRuntimeCapability('platform.knowledgebase.visual-assets', {
|
|
1142
|
+
description: 'Issue execution-scoped logical KnowledgeDocument image paths and inject validated images without exposing host storage paths.'
|
|
1143
|
+
});
|
|
1144
|
+
const KnowledgeDocumentVisualAssetsRuntimeFactoryCapability = modelProvider.createRuntimeCapability('platform.knowledge-document.visual-assets.factory', {
|
|
1145
|
+
description: 'Create a visual-assets API with an execution-local image allow-list and authorized workspace writer.'
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1037
1148
|
const TOOLSET_STRATEGY = 'TOOLSET_STRATEGY';
|
|
1038
1149
|
/**
|
|
1039
1150
|
* Decorator to mark a provider as a Toolset Strategy
|
|
@@ -2616,6 +2727,9 @@ function normalizeCurrency(currency) {
|
|
|
2616
2727
|
|
|
2617
2728
|
var AIModel_1;
|
|
2618
2729
|
exports.AIModel = AIModel_1 = class AIModel {
|
|
2730
|
+
getRealtimeModel(_copilotModel) {
|
|
2731
|
+
throw new Error('Unsupported realtime model');
|
|
2732
|
+
}
|
|
2619
2733
|
getChatModel(copilotModel, options) {
|
|
2620
2734
|
throw new Error(`Unsupport chat model!`);
|
|
2621
2735
|
}
|
|
@@ -2859,6 +2973,75 @@ function _class_private_field_loose_key(name) {
|
|
|
2859
2973
|
return "__private_" + id++ + "_" + name;
|
|
2860
2974
|
}
|
|
2861
2975
|
|
|
2976
|
+
function resolveTokenUsageCandidates(input) {
|
|
2977
|
+
const candidates = [
|
|
2978
|
+
{
|
|
2979
|
+
value: input.canonical,
|
|
2980
|
+
source: 'provider'
|
|
2981
|
+
},
|
|
2982
|
+
{
|
|
2983
|
+
value: input.actual,
|
|
2984
|
+
source: 'provider'
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
value: input.estimated,
|
|
2988
|
+
source: 'estimated'
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
value: {
|
|
2992
|
+
totalTokens: input.legacyTotal
|
|
2993
|
+
},
|
|
2994
|
+
source: 'legacy'
|
|
2995
|
+
}
|
|
2996
|
+
];
|
|
2997
|
+
for (const candidate of candidates){
|
|
2998
|
+
const usage = normalizeTokenUsage(candidate.value);
|
|
2999
|
+
if (usage) return {
|
|
3000
|
+
usage,
|
|
3001
|
+
source: candidate.source
|
|
3002
|
+
};
|
|
3003
|
+
}
|
|
3004
|
+
return {
|
|
3005
|
+
usage: {
|
|
3006
|
+
promptTokens: 0,
|
|
3007
|
+
completionTokens: 0,
|
|
3008
|
+
totalTokens: 0
|
|
3009
|
+
},
|
|
3010
|
+
source: 'unavailable'
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
function normalizeTokenUsage(candidate) {
|
|
3014
|
+
if (!candidate) return null;
|
|
3015
|
+
const counts = [
|
|
3016
|
+
candidate.promptTokens,
|
|
3017
|
+
candidate.completionTokens,
|
|
3018
|
+
candidate.totalTokens,
|
|
3019
|
+
candidate.cacheReadInputTokens,
|
|
3020
|
+
candidate.cacheWriteInputTokens,
|
|
3021
|
+
candidate.reasoningTokens
|
|
3022
|
+
];
|
|
3023
|
+
if (counts.some((count)=>count !== undefined && (!Number.isSafeInteger(count) || count < 0))) return null;
|
|
3024
|
+
var _candidate_promptTokens;
|
|
3025
|
+
const promptTokens = (_candidate_promptTokens = candidate.promptTokens) != null ? _candidate_promptTokens : 0;
|
|
3026
|
+
var _candidate_completionTokens;
|
|
3027
|
+
const completionTokens = (_candidate_completionTokens = candidate.completionTokens) != null ? _candidate_completionTokens : 0;
|
|
3028
|
+
const totalTokens = candidate.totalTokens || promptTokens + completionTokens;
|
|
3029
|
+
if (!Number.isSafeInteger(totalTokens) || totalTokens <= 0 || totalTokens < promptTokens + completionTokens) return null;
|
|
3030
|
+
var _candidate_cacheReadInputTokens, _candidate_cacheWriteInputTokens, _candidate_reasoningTokens;
|
|
3031
|
+
if (((_candidate_cacheReadInputTokens = candidate.cacheReadInputTokens) != null ? _candidate_cacheReadInputTokens : 0) + ((_candidate_cacheWriteInputTokens = candidate.cacheWriteInputTokens) != null ? _candidate_cacheWriteInputTokens : 0) > promptTokens || ((_candidate_reasoningTokens = candidate.reasoningTokens) != null ? _candidate_reasoningTokens : 0) > completionTokens) return null;
|
|
3032
|
+
return _extends._extends({
|
|
3033
|
+
promptTokens,
|
|
3034
|
+
completionTokens,
|
|
3035
|
+
totalTokens
|
|
3036
|
+
}, candidate.cacheReadInputTokens ? {
|
|
3037
|
+
cacheReadInputTokens: candidate.cacheReadInputTokens
|
|
3038
|
+
} : {}, candidate.cacheWriteInputTokens ? {
|
|
3039
|
+
cacheWriteInputTokens: candidate.cacheWriteInputTokens
|
|
3040
|
+
} : {}, candidate.reasoningTokens ? {
|
|
3041
|
+
reasoningTokens: candidate.reasoningTokens
|
|
3042
|
+
} : {});
|
|
3043
|
+
}
|
|
3044
|
+
|
|
2862
3045
|
var _a;
|
|
2863
3046
|
class LLMUsage {
|
|
2864
3047
|
static emptyUsage() {
|
|
@@ -2904,6 +3087,18 @@ class LargeLanguageModel extends exports.AIModel {
|
|
|
2904
3087
|
_commonParameterRules(model) {
|
|
2905
3088
|
return CommonParameterRules;
|
|
2906
3089
|
}
|
|
3090
|
+
/** Price already normalized provider facts without starting another inference or writing a ledger. */ priceActualTokenUsage(model, tokenUsage, context = {}) {
|
|
3091
|
+
var _this_getModelSchema;
|
|
3092
|
+
const usage = normalizeTokenUsage(tokenUsage);
|
|
3093
|
+
if (!usage) throw new Error('Actual token usage is required');
|
|
3094
|
+
const priced = this.calcResponseUsage(model, {}, usage.promptTokens, usage.completionTokens, performance.now(), usage, _extends._extends({}, context, {
|
|
3095
|
+
inputTokensIncludeCache: true
|
|
3096
|
+
}));
|
|
3097
|
+
return _extends._extends({}, priced, usage, !((_this_getModelSchema = this.getModelSchema(model, {})) == null ? void 0 : _this_getModelSchema.pricing) ? {
|
|
3098
|
+
pricingStatus: 'unpriced',
|
|
3099
|
+
totalPrice: undefined
|
|
3100
|
+
} : {});
|
|
3101
|
+
}
|
|
2907
3102
|
calcResponseUsage(model, credentials, promptTokens, completionTokens, startedAt = this.startedAt, tokenUsage, pricingContext = {}) {
|
|
2908
3103
|
var _this_getModelSchema;
|
|
2909
3104
|
const resolvedTokenUsage = tokenUsage != null ? tokenUsage : {
|
|
@@ -3051,12 +3246,15 @@ class LargeLanguageModel extends exports.AIModel {
|
|
|
3051
3246
|
callback
|
|
3052
3247
|
];
|
|
3053
3248
|
}
|
|
3054
|
-
createHandleLLMErrorCallbacks(
|
|
3249
|
+
createHandleLLMErrorCallbacks(_fields, logger) {
|
|
3055
3250
|
return {
|
|
3056
|
-
handleLLMError: (
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
(logger != null ? logger : _class_private_field_loose_base(this, _logger)[_logger]).error(
|
|
3251
|
+
handleLLMError: (error)=>{
|
|
3252
|
+
// Provider errors and constructor fields can contain credentials or request bodies.
|
|
3253
|
+
const errorType = error instanceof Error && /^[A-Za-z]{1,60}$/.test(error.name) ? error.name : 'Error';
|
|
3254
|
+
(logger != null ? logger : _class_private_field_loose_base(this, _logger)[_logger]).error({
|
|
3255
|
+
event: 'model_provider_request_failed',
|
|
3256
|
+
errorType
|
|
3257
|
+
});
|
|
3060
3258
|
}
|
|
3061
3259
|
};
|
|
3062
3260
|
}
|
|
@@ -3266,97 +3464,59 @@ function isAbortError(error) {
|
|
|
3266
3464
|
return error.name === 'AbortError' || /\babort(?:ed)?\b/i.test(error.message);
|
|
3267
3465
|
}
|
|
3268
3466
|
function calcTokenUsage(output) {
|
|
3269
|
-
|
|
3270
|
-
const tokenUsage = {
|
|
3467
|
+
const result = {
|
|
3271
3468
|
promptTokens: 0,
|
|
3272
3469
|
completionTokens: 0,
|
|
3273
3470
|
totalTokens: 0
|
|
3274
3471
|
};
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
if (message.
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
cacheReadInputTokens
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
}
|
|
3290
|
-
});
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3472
|
+
var _output_generations;
|
|
3473
|
+
for (const choices of (_output_generations = output.generations) != null ? _output_generations : []){
|
|
3474
|
+
// Each inner array contains choices from one request, not independent provider attempts.
|
|
3475
|
+
const usage = choices.map((choice)=>{
|
|
3476
|
+
var _metadata_input_token_details, _metadata_input_token_details1, _metadata_output_token_details;
|
|
3477
|
+
if (!('message' in choice) || !messages.isBaseMessage(choice.message) || !messages.isAIMessage(choice.message)) return null;
|
|
3478
|
+
const metadata = choice.message.usage_metadata;
|
|
3479
|
+
return metadata ? normalizeTokenUsage({
|
|
3480
|
+
promptTokens: metadata.input_tokens,
|
|
3481
|
+
completionTokens: metadata.output_tokens,
|
|
3482
|
+
totalTokens: metadata.total_tokens,
|
|
3483
|
+
cacheReadInputTokens: (_metadata_input_token_details = metadata.input_token_details) == null ? void 0 : _metadata_input_token_details.cache_read,
|
|
3484
|
+
cacheWriteInputTokens: (_metadata_input_token_details1 = metadata.input_token_details) == null ? void 0 : _metadata_input_token_details1.cache_creation,
|
|
3485
|
+
reasoningTokens: (_metadata_output_token_details = metadata.output_token_details) == null ? void 0 : _metadata_output_token_details.reasoning
|
|
3486
|
+
}) : null;
|
|
3487
|
+
}).find((candidate)=>candidate !== null);
|
|
3488
|
+
if (!usage) continue;
|
|
3489
|
+
result.promptTokens += usage.promptTokens;
|
|
3490
|
+
result.completionTokens += usage.completionTokens;
|
|
3491
|
+
result.totalTokens += usage.totalTokens;
|
|
3492
|
+
for (const key of [
|
|
3493
|
+
'cacheReadInputTokens',
|
|
3494
|
+
'cacheWriteInputTokens',
|
|
3495
|
+
'reasoningTokens'
|
|
3496
|
+
]){
|
|
3497
|
+
var _result_key;
|
|
3498
|
+
if (usage[key] !== undefined) result[key] = ((_result_key = result[key]) != null ? _result_key : 0) + usage[key];
|
|
3499
|
+
}
|
|
3500
|
+
}
|
|
3501
|
+
return result;
|
|
3295
3502
|
}
|
|
3296
3503
|
function resolveTokenUsage(output) {
|
|
3297
3504
|
return resolveTokenUsageWithAuthority(output).usage;
|
|
3298
3505
|
}
|
|
3299
3506
|
function resolveTokenUsageWithAuthority(output) {
|
|
3300
3507
|
var _output_llmOutput, _output_llmOutput1, _output_llmOutput2;
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3508
|
+
const resolved = resolveTokenUsageCandidates({
|
|
3509
|
+
canonical: calcTokenUsage(output),
|
|
3510
|
+
actual: (_output_llmOutput = output.llmOutput) == null ? void 0 : _output_llmOutput['tokenUsage'],
|
|
3511
|
+
estimated: (_output_llmOutput1 = output.llmOutput) == null ? void 0 : _output_llmOutput1['estimatedTokenUsage'],
|
|
3512
|
+
legacyTotal: (_output_llmOutput2 = output.llmOutput) == null ? void 0 : _output_llmOutput2['totalTokens']
|
|
3304
3513
|
});
|
|
3305
|
-
if (actualUsage) {
|
|
3306
|
-
return {
|
|
3307
|
-
usage: actualUsage
|
|
3308
|
-
};
|
|
3309
|
-
}
|
|
3310
|
-
const estimatedUsage = normalizeTokenUsage((_output_llmOutput2 = output.llmOutput) == null ? void 0 : _output_llmOutput2['estimatedTokenUsage']);
|
|
3311
|
-
if (estimatedUsage) {
|
|
3312
|
-
return {
|
|
3313
|
-
usage: estimatedUsage,
|
|
3314
|
-
type: 'estimated'
|
|
3315
|
-
};
|
|
3316
|
-
}
|
|
3317
|
-
return {
|
|
3318
|
-
usage: {
|
|
3319
|
-
promptTokens: 0,
|
|
3320
|
-
completionTokens: 0,
|
|
3321
|
-
totalTokens: 0
|
|
3322
|
-
}
|
|
3323
|
-
};
|
|
3324
|
-
}
|
|
3325
|
-
function normalizeTokenUsage(candidate) {
|
|
3326
|
-
if (!candidate) {
|
|
3327
|
-
return null;
|
|
3328
|
-
}
|
|
3329
|
-
if (!isValidTokenCount(candidate.promptTokens) || !isValidTokenCount(candidate.completionTokens) || !isValidTokenCount(candidate.totalTokens)) {
|
|
3330
|
-
return null;
|
|
3331
|
-
}
|
|
3332
|
-
var _candidate_promptTokens;
|
|
3333
|
-
const promptTokens = (_candidate_promptTokens = candidate.promptTokens) != null ? _candidate_promptTokens : 0;
|
|
3334
|
-
var _candidate_completionTokens;
|
|
3335
|
-
const completionTokens = (_candidate_completionTokens = candidate.completionTokens) != null ? _candidate_completionTokens : 0;
|
|
3336
|
-
const totalTokens = candidate.totalTokens || promptTokens + completionTokens;
|
|
3337
|
-
if (promptTokens === 0 && completionTokens === 0 && totalTokens === 0) {
|
|
3338
|
-
return null;
|
|
3339
|
-
}
|
|
3340
|
-
var _candidate_cacheReadInputTokens;
|
|
3341
|
-
const cacheReadInputTokens = (_candidate_cacheReadInputTokens = candidate.cacheReadInputTokens) != null ? _candidate_cacheReadInputTokens : 0;
|
|
3342
|
-
var _candidate_cacheWriteInputTokens;
|
|
3343
|
-
const cacheWriteInputTokens = (_candidate_cacheWriteInputTokens = candidate.cacheWriteInputTokens) != null ? _candidate_cacheWriteInputTokens : 0;
|
|
3344
|
-
if (!isValidTokenCount(cacheReadInputTokens) || !isValidTokenCount(cacheWriteInputTokens)) {
|
|
3345
|
-
return null;
|
|
3346
|
-
}
|
|
3347
3514
|
return _extends._extends({
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
}, cacheReadInputTokens > 0 ? {
|
|
3352
|
-
cacheReadInputTokens
|
|
3353
|
-
} : {}, cacheWriteInputTokens > 0 ? {
|
|
3354
|
-
cacheWriteInputTokens
|
|
3515
|
+
usage: resolved.usage
|
|
3516
|
+
}, resolved.source === 'estimated' ? {
|
|
3517
|
+
type: 'estimated'
|
|
3355
3518
|
} : {});
|
|
3356
3519
|
}
|
|
3357
|
-
function isValidTokenCount(value) {
|
|
3358
|
-
return value === undefined || Number.isFinite(value) && value >= 0;
|
|
3359
|
-
}
|
|
3360
3520
|
function normalizeCacheTokenAccounting(tokenUsage, context) {
|
|
3361
3521
|
if (context.inputTokensIncludeCache !== false) return tokenUsage;
|
|
3362
3522
|
var _tokenUsage_cacheReadInputTokens, _tokenUsage_cacheWriteInputTokens;
|
|
@@ -3807,6 +3967,37 @@ Reflect.defineMetadata(COMMAND_METADATA$1, {
|
|
|
3807
3967
|
id: CreateModelClientCommand.type
|
|
3808
3968
|
}, CreateModelClientCommand);
|
|
3809
3969
|
|
|
3970
|
+
/** A single fetch is one billable attempt. No SDK retries or redirects to another credential origin. */ function nativeModelTransport(input) {
|
|
3971
|
+
const base = new URL(input.baseUrl);
|
|
3972
|
+
if (![
|
|
3973
|
+
'http:',
|
|
3974
|
+
'https:'
|
|
3975
|
+
].includes(base.protocol) || base.username || base.password || base.search || base.hash) throw new Error('Invalid native model endpoint');
|
|
3976
|
+
const suffix = input.protocol === 'openai_responses' ? '/responses' : '/v1/messages';
|
|
3977
|
+
const url = `${base.href.replace(/\/$/, '')}${suffix}`;
|
|
3978
|
+
return (body, forwarded, signal)=>{
|
|
3979
|
+
const headers = new Headers({
|
|
3980
|
+
'content-type': 'application/json'
|
|
3981
|
+
});
|
|
3982
|
+
if (input.protocol === 'anthropic_messages') {
|
|
3983
|
+
headers.set('anthropic-version', '2023-06-01');
|
|
3984
|
+
for (const [name, value] of Object.entries(forwarded)){
|
|
3985
|
+
// Native Anthropic feature/version headers must survive protocol evolution.
|
|
3986
|
+
if (/^anthropic-[a-z0-9-]+$/.test(name)) headers.set(name, value);
|
|
3987
|
+
}
|
|
3988
|
+
headers.set('x-api-key', input.authorization);
|
|
3989
|
+
} else headers.set('authorization', input.authorization);
|
|
3990
|
+
var _input_fetch;
|
|
3991
|
+
return ((_input_fetch = input.fetch) != null ? _input_fetch : fetch)(url, {
|
|
3992
|
+
method: 'POST',
|
|
3993
|
+
headers,
|
|
3994
|
+
body: JSON.stringify(body),
|
|
3995
|
+
signal,
|
|
3996
|
+
redirect: 'error'
|
|
3997
|
+
});
|
|
3998
|
+
};
|
|
3999
|
+
}
|
|
4000
|
+
|
|
3810
4001
|
const SKILL_SOURCE_PROVIDER = 'SKILL_SOURCE_PROVIDER';
|
|
3811
4002
|
const SkillSourceProviderStrategy = (provider)=>common.applyDecorators(common.SetMetadata(SKILL_SOURCE_PROVIDER, provider), common.SetMetadata(STRATEGY_META_KEY, SKILL_SOURCE_PROVIDER));
|
|
3812
4003
|
|
|
@@ -3881,6 +4072,18 @@ function isModelOutputValidationError(error) {
|
|
|
3881
4072
|
return candidate.code === MODEL_OUTPUT_VALIDATION_ERROR_CODE && candidate.retryable === true && ((_candidate_repairContext = candidate.repairContext) == null ? void 0 : _candidate_repairContext.kind) === 'invalid_tool_calls' && Array.isArray(candidate.repairContext.issues);
|
|
3882
4073
|
}
|
|
3883
4074
|
|
|
4075
|
+
/** Combine middleware contributions without mutating or weakening existing requirements. */ function mergeModelRequirements(...requirements) {
|
|
4076
|
+
const features = [
|
|
4077
|
+
...new Set(requirements.flatMap((item)=>{
|
|
4078
|
+
var _item_features;
|
|
4079
|
+
return (_item_features = item == null ? void 0 : item.features) != null ? _item_features : [];
|
|
4080
|
+
}))
|
|
4081
|
+
];
|
|
4082
|
+
return features.length ? {
|
|
4083
|
+
features
|
|
4084
|
+
} : undefined;
|
|
4085
|
+
}
|
|
4086
|
+
|
|
3884
4087
|
const SEGMENT_PATTERN = /^[a-z][a-z0-9_-]*$/i;
|
|
3885
4088
|
const VERSION_PATTERN = /^v[1-9][0-9]*$/;
|
|
3886
4089
|
function assertSegment(input, name) {
|
|
@@ -3926,6 +4129,96 @@ function assertSegment(input, name) {
|
|
|
3926
4129
|
const AGENT_CHAT_DISPATCH_MESSAGE_TYPE = defineAgentMessageType('chat_dispatch', 1);
|
|
3927
4130
|
const AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING = 'steer_target_not_running';
|
|
3928
4131
|
|
|
4132
|
+
/** Captured by an authorized host command. Describing a recipient never authorizes delivery. */ const replyConversation = {
|
|
4133
|
+
conversationId: v3.z.string().uuid(),
|
|
4134
|
+
threadId: v3.z.string().trim().min(1).max(256)
|
|
4135
|
+
};
|
|
4136
|
+
const agentRuntimeReplyTargetSchema = v3.z.discriminatedUnion('type', [
|
|
4137
|
+
v3.z.object(_extends._extends({}, replyConversation, {
|
|
4138
|
+
type: v3.z.literal('xpert').optional(),
|
|
4139
|
+
xpertId: v3.z.string().uuid(),
|
|
4140
|
+
agentKey: v3.z.string().trim().min(1).max(256)
|
|
4141
|
+
})).strict(),
|
|
4142
|
+
v3.z.object(_extends._extends({}, replyConversation, {
|
|
4143
|
+
type: v3.z.literal('project_agent'),
|
|
4144
|
+
projectId: v3.z.string().uuid(),
|
|
4145
|
+
agentKey: v3.z.literal('general_agent')
|
|
4146
|
+
})).strict()
|
|
4147
|
+
]);
|
|
4148
|
+
/** Persist with the immutable invocation request before launch. No credentials or arbitrary routing headers. */ const agentInvocationDispatchContextSchema = v3.z.object({
|
|
4149
|
+
version: v3.z.literal(1),
|
|
4150
|
+
requestId: v3.z.string().uuid(),
|
|
4151
|
+
sourceMessageId: v3.z.string().trim().min(1).max(256),
|
|
4152
|
+
replyTo: agentRuntimeReplyTargetSchema,
|
|
4153
|
+
projectTask: contracts.projectTaskExecutionContextSchema.optional()
|
|
4154
|
+
}).strict();
|
|
4155
|
+
|
|
4156
|
+
const AGENT_RUNTIME_EVENT_MESSAGE_TYPE = defineAgentMessageType('runtime_event', 1);
|
|
4157
|
+
const reference = {
|
|
4158
|
+
version: v3.z.literal(1),
|
|
4159
|
+
invocationId: v3.z.string().uuid(),
|
|
4160
|
+
/** Revision of the persisted observation, never a queue delivery attempt. */ revision: v3.z.number().int().nonnegative(),
|
|
4161
|
+
projectTask: contracts.projectTaskExecutionReferenceSchema.optional()
|
|
4162
|
+
};
|
|
4163
|
+
/** Host-produced references. Consumers reload and authorize the invocation and its pinned observation. */ const agentRuntimeEventSchema = v3.z.discriminatedUnion('kind', [
|
|
4164
|
+
v3.z.object(_extends._extends({}, reference, {
|
|
4165
|
+
kind: v3.z.literal('progress'),
|
|
4166
|
+
progress: contracts.agentRuntimeProgressSchema
|
|
4167
|
+
})).strict(),
|
|
4168
|
+
v3.z.object(_extends._extends({}, reference, {
|
|
4169
|
+
kind: v3.z.literal('result'),
|
|
4170
|
+
status: contracts.agentInvocationTerminalStatusSchema
|
|
4171
|
+
})).strict(),
|
|
4172
|
+
v3.z.object(_extends._extends({}, reference, {
|
|
4173
|
+
kind: v3.z.literal('input_request'),
|
|
4174
|
+
interactionId: v3.z.string().trim().min(1).max(256)
|
|
4175
|
+
})).strict()
|
|
4176
|
+
]);
|
|
4177
|
+
/** Same observation always has the same HandoffMessage.id across retries and process restarts. */ function agentRuntimeEventMessageId(event) {
|
|
4178
|
+
return `runtime-${event.invocationId}-${event.kind}-${event.revision}`;
|
|
4179
|
+
}
|
|
4180
|
+
/** Transport states are deliberately separate from Task and Invocation status. */ const agentRuntimeDeliveryStateSchema = v3.z.enum([
|
|
4181
|
+
'pending',
|
|
4182
|
+
'received',
|
|
4183
|
+
'blocked',
|
|
4184
|
+
'failed'
|
|
4185
|
+
]);
|
|
4186
|
+
const agentRuntimeConsumptionStateSchema = v3.z.enum([
|
|
4187
|
+
'pending',
|
|
4188
|
+
'processing',
|
|
4189
|
+
'processed',
|
|
4190
|
+
'blocked',
|
|
4191
|
+
'failed'
|
|
4192
|
+
]);
|
|
4193
|
+
/** Store under a unique scoped key in the same transaction as the continuation reservation. */ const agentRuntimeResultClaimSchema = v3.z.object({
|
|
4194
|
+
invocationId: v3.z.string().uuid(),
|
|
4195
|
+
resultRevision: v3.z.number().int().nonnegative(),
|
|
4196
|
+
recipient: agentRuntimeReplyTargetSchema,
|
|
4197
|
+
consumer: v3.z.discriminatedUnion('type', [
|
|
4198
|
+
v3.z.object({
|
|
4199
|
+
type: v3.z.literal('follow_up'),
|
|
4200
|
+
executionId: v3.z.string().uuid()
|
|
4201
|
+
}).strict(),
|
|
4202
|
+
v3.z.object({
|
|
4203
|
+
type: v3.z.literal('wait'),
|
|
4204
|
+
executionId: v3.z.string().uuid(),
|
|
4205
|
+
callId: v3.z.string().trim().min(1).max(1024)
|
|
4206
|
+
}).strict()
|
|
4207
|
+
])
|
|
4208
|
+
}).strict();
|
|
4209
|
+
/**
|
|
4210
|
+
* Wait and asynchronous reply compete for this same key, regardless of delivery revision.
|
|
4211
|
+
* The storage key must additionally include tenant, organization and owner from trusted scope.
|
|
4212
|
+
*/ function agentRuntimeResultConsumptionKey(invocationId, recipient) {
|
|
4213
|
+
return JSON.stringify([
|
|
4214
|
+
invocationId,
|
|
4215
|
+
recipient.conversationId,
|
|
4216
|
+
recipient.threadId,
|
|
4217
|
+
recipient.type === 'project_agent' ? `project:${recipient.projectId}` : recipient.xpertId,
|
|
4218
|
+
recipient.agentKey
|
|
4219
|
+
]);
|
|
4220
|
+
}
|
|
4221
|
+
|
|
3929
4222
|
/**
|
|
3930
4223
|
* Handoff Processor meta key。
|
|
3931
4224
|
*/ const HANDOFF_PROCESSOR_STRATEGY = 'HANDOFF_PROCESSOR_STRATEGY';
|
|
@@ -4001,6 +4294,30 @@ exports.AgentRuntimeRegistry = __decorate([
|
|
|
4001
4294
|
});
|
|
4002
4295
|
/** Platform factory capability. The wire key is stable across SDK naming changes. */ const AgentRuntimeFactoryCapability = modelProvider.createRuntimeCapability('platform.agent_invocation.factory');
|
|
4003
4296
|
|
|
4297
|
+
/**
|
|
4298
|
+
* Keeps shared OS model authorization independent of Pro Computer/Docker lifecycle details.
|
|
4299
|
+
* Grant issuance, authentication, revalidation and renewal delegate environment checks to this host adapter.
|
|
4300
|
+
* Implementations validate ownership and instance identity so a replaced runtime cannot keep its old grant.
|
|
4301
|
+
* Execution validity is independent of desktop viewing sessions; managed runners may also require an operation lease.
|
|
4302
|
+
* Other environments can supply their own checks without changing the grant service.
|
|
4303
|
+
* This capability validates the bound environment; model selection and usage accounting remain separate concerns.
|
|
4304
|
+
*/ const ModelExecutionEnvironmentCapability = modelProvider.createRuntimeCapability('platform.model_execution.environment');
|
|
4305
|
+
|
|
4306
|
+
/** Configuration adapters describe secrets by reference; only the host materializes credentials. */ const CLI_MODEL_TOKEN_REFERENCE = '${XPERT_EXECUTION_TOKEN}';
|
|
4307
|
+
const CliModelProfilesCapability = modelProvider.createRuntimeCapability('platform.cli_model_profiles');
|
|
4308
|
+
/** Additional execution sources can validate lifecycle without making OS depend on Pro entities. */ const ShellModelExecutionSourceCapability = modelProvider.createRuntimeCapability('platform.model_execution.shell_source');
|
|
4309
|
+
|
|
4310
|
+
function taskWaitReason(states, mode) {
|
|
4311
|
+
if (states.length && (mode === 'all' ? states.every((state)=>state === 'completed') : states.includes('completed'))) return 'completed';
|
|
4312
|
+
if (states.includes('attention')) return 'attention';
|
|
4313
|
+
return undefined;
|
|
4314
|
+
}
|
|
4315
|
+
|
|
4316
|
+
const AgentExecutionRunnerCapability = modelProvider.createRuntimeCapability('platform.agent_execution.runner');
|
|
4317
|
+
const AgentExecutionRunnerFactoryCapability = modelProvider.createRuntimeCapability('platform.agent_execution.runner.factory');
|
|
4318
|
+
|
|
4319
|
+
/** Older runtime plugins can still send this event; new emissions use ON_CHAT_EVENT. */ const RESOURCE_CARD_EVENT = 'xpert.resource_card';
|
|
4320
|
+
|
|
4004
4321
|
const ASSISTANT_CAPABILITY_PROVIDER = 'ASSISTANT_CAPABILITY_PROVIDER';
|
|
4005
4322
|
const AssistantCapabilityProvider = (key)=>common.applyDecorators(common.SetMetadata(ASSISTANT_CAPABILITY_PROVIDER, key), common.SetMetadata(STRATEGY_META_KEY, ASSISTANT_CAPABILITY_PROVIDER));
|
|
4006
4323
|
exports.AssistantCapabilityProviderRegistry = class AssistantCapabilityProviderRegistry extends BaseStrategyRegistry {
|
|
@@ -4313,7 +4630,9 @@ function resolveSandboxExecutionOptions(options, defaults = DEFAULT_SANDBOX_SHEL
|
|
|
4313
4630
|
return _extends._extends({
|
|
4314
4631
|
timeoutMs,
|
|
4315
4632
|
maxOutputBytes
|
|
4316
|
-
}, (options == null ? void 0 : options.
|
|
4633
|
+
}, (options == null ? void 0 : options.executionScope) ? {
|
|
4634
|
+
executionScope: options.executionScope
|
|
4635
|
+
} : {}, (options == null ? void 0 : options.signal) ? {
|
|
4317
4636
|
signal: options.signal
|
|
4318
4637
|
} : {});
|
|
4319
4638
|
}
|
|
@@ -5454,6 +5773,7 @@ exports.ViewExtensionProviderRegistry = __decorate([
|
|
|
5454
5773
|
|
|
5455
5774
|
const XPERT_REMOTE_UI_CSS = `
|
|
5456
5775
|
:root {
|
|
5776
|
+
font-size: var(--xui-density-root-font-size, 16px);
|
|
5457
5777
|
color-scheme: light;
|
|
5458
5778
|
--xui-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
5459
5779
|
--xui-color-background: #fff;
|
|
@@ -5488,6 +5808,7 @@ const XPERT_REMOTE_UI_CSS = `
|
|
|
5488
5808
|
--xui-radius-sm: 6px;
|
|
5489
5809
|
--xui-radius-md: 8px;
|
|
5490
5810
|
--xui-radius-lg: 10px;
|
|
5811
|
+
--xui-font-size: 14px;
|
|
5491
5812
|
--xui-font-size-xs: 0.75rem;
|
|
5492
5813
|
--xui-font-size-sm: 0.8125rem;
|
|
5493
5814
|
--xui-font-size-md: 0.875rem;
|
|
@@ -5775,6 +6096,7 @@ const XPERT_REMOTE_UI_BOOTSTRAP = `
|
|
|
5775
6096
|
var VERSION = 1
|
|
5776
6097
|
var TOKEN_MAP = {
|
|
5777
6098
|
fontFamily: '--xui-font-family',
|
|
6099
|
+
densityRootFontSize: '--xui-density-root-font-size',
|
|
5778
6100
|
colorBackground: '--xui-color-background',
|
|
5779
6101
|
colorForeground: '--xui-color-foreground',
|
|
5780
6102
|
colorCard: '--xui-color-card',
|
|
@@ -5807,6 +6129,7 @@ const XPERT_REMOTE_UI_BOOTSTRAP = `
|
|
|
5807
6129
|
radiusSm: '--xui-radius-sm',
|
|
5808
6130
|
radiusMd: '--xui-radius-md',
|
|
5809
6131
|
radiusLg: '--xui-radius-lg',
|
|
6132
|
+
fontSize: '--xui-font-size',
|
|
5810
6133
|
fontSizeXs: '--xui-font-size-xs',
|
|
5811
6134
|
fontSizeSm: '--xui-font-size-sm',
|
|
5812
6135
|
fontSizeMd: '--xui-font-size-md',
|
|
@@ -9820,6 +10143,13 @@ const ProjectTasksRuntimeCapability = modelProvider.createRuntimeCapability('pla
|
|
|
9820
10143
|
description: 'Read project task graphs, manage schedules, and resolve exact execution conversations.'
|
|
9821
10144
|
});
|
|
9822
10145
|
|
|
10146
|
+
/** Import official resource packages for the authenticated organization administrator. Does not authorize workspaces. */ class ImportDefaultAgentPluginsCommand extends cqrs.Command {
|
|
10147
|
+
}
|
|
10148
|
+
ImportDefaultAgentPluginsCommand.type = '[Agent Plugins] Import defaults';
|
|
10149
|
+
Reflect.defineMetadata('__command__', {
|
|
10150
|
+
id: ImportDefaultAgentPluginsCommand.type
|
|
10151
|
+
}, ImportDefaultAgentPluginsCommand);
|
|
10152
|
+
|
|
9823
10153
|
Object.defineProperty(exports, "ASSISTANT_CHAT_SEND_MESSAGE_COMMAND", {
|
|
9824
10154
|
enumerable: true,
|
|
9825
10155
|
get: function () { return contracts.ASSISTANT_CHAT_SEND_MESSAGE_COMMAND; }
|
|
@@ -9828,6 +10158,26 @@ Object.defineProperty(exports, "ASSISTANT_CONTEXT_SET_COMMAND", {
|
|
|
9828
10158
|
enumerable: true,
|
|
9829
10159
|
get: function () { return contracts.ASSISTANT_CONTEXT_SET_COMMAND; }
|
|
9830
10160
|
});
|
|
10161
|
+
Object.defineProperty(exports, "agentOutputDeliverySchema", {
|
|
10162
|
+
enumerable: true,
|
|
10163
|
+
get: function () { return contracts.agentOutputDeliverySchema; }
|
|
10164
|
+
});
|
|
10165
|
+
Object.defineProperty(exports, "agentResultPathSchema", {
|
|
10166
|
+
enumerable: true,
|
|
10167
|
+
get: function () { return contracts.agentResultPathSchema; }
|
|
10168
|
+
});
|
|
10169
|
+
Object.defineProperty(exports, "createResourceCardContent", {
|
|
10170
|
+
enumerable: true,
|
|
10171
|
+
get: function () { return contracts.createResourceCardContent; }
|
|
10172
|
+
});
|
|
10173
|
+
Object.defineProperty(exports, "parseResourceCard", {
|
|
10174
|
+
enumerable: true,
|
|
10175
|
+
get: function () { return contracts.parseResourceCard; }
|
|
10176
|
+
});
|
|
10177
|
+
Object.defineProperty(exports, "resourceCardId", {
|
|
10178
|
+
enumerable: true,
|
|
10179
|
+
get: function () { return contracts.resourceCardId; }
|
|
10180
|
+
});
|
|
9831
10181
|
exports.ActorTokenRuntimeCapability = modelProvider.ActorTokenRuntimeCapability;
|
|
9832
10182
|
exports.ActorTokenRuntimeFactoryCapability = modelProvider.ActorTokenRuntimeFactoryCapability;
|
|
9833
10183
|
exports.ArtifactsRuntimeCapability = modelProvider.ArtifactsRuntimeCapability;
|
|
@@ -9836,12 +10186,6 @@ exports.BaseToolset = modelProvider.BaseToolset;
|
|
|
9836
10186
|
exports.BuiltinToolset = modelProvider.BuiltinToolset;
|
|
9837
10187
|
exports.DefaultAgentMiddlewareRuntimeCapabilityRegistry = modelProvider.DefaultRuntimeCapabilityRegistry;
|
|
9838
10188
|
exports.DefaultRuntimeCapabilityRegistry = modelProvider.DefaultRuntimeCapabilityRegistry;
|
|
9839
|
-
exports.KnowledgeDocumentVisualAssetsRuntimeCapability = modelProvider.KnowledgeDocumentVisualAssetsRuntimeCapability;
|
|
9840
|
-
exports.KnowledgeDocumentVisualAssetsRuntimeFactoryCapability = modelProvider.KnowledgeDocumentVisualAssetsRuntimeFactoryCapability;
|
|
9841
|
-
exports.KnowledgeGraphRuntimeCapability = modelProvider.KnowledgeGraphRuntimeCapability;
|
|
9842
|
-
exports.KnowledgebaseDocumentsRuntimeCapability = modelProvider.KnowledgebaseDocumentsRuntimeCapability;
|
|
9843
|
-
exports.KnowledgebaseProvisioningRuntimeCapability = modelProvider.KnowledgebaseProvisioningRuntimeCapability;
|
|
9844
|
-
exports.KnowledgebaseRuntimeCapability = modelProvider.KnowledgebaseRuntimeCapability;
|
|
9845
10189
|
exports.ModelProviderBuiltinToolset = modelProvider.ModelProviderBuiltinToolset;
|
|
9846
10190
|
exports.ProjectAccessRuntimeCapability = modelProvider.ProjectAccessRuntimeCapability;
|
|
9847
10191
|
exports.ProjectProvisioningRuntimeCapability = modelProvider.ProjectProvisioningRuntimeCapability;
|
|
@@ -9851,6 +10195,7 @@ exports.SANDBOX_JOB_ERROR_CODES = modelProvider.SANDBOX_JOB_ERROR_CODES;
|
|
|
9851
10195
|
exports.SANDBOX_JOB_PROGRESS_PREFIX = modelProvider.SANDBOX_JOB_PROGRESS_PREFIX;
|
|
9852
10196
|
exports.SandboxJobRuntimeError = modelProvider.SandboxJobRuntimeError;
|
|
9853
10197
|
exports.SandboxJobsRuntimeCapability = modelProvider.SandboxJobsRuntimeCapability;
|
|
10198
|
+
exports.ToolImagesRuntimeCapability = modelProvider.ToolImagesRuntimeCapability;
|
|
9854
10199
|
exports.WORKSPACE_FILES_SOURCE = modelProvider.WORKSPACE_FILES_SOURCE;
|
|
9855
10200
|
exports.WorkspaceFilesRuntimeCapability = modelProvider.WorkspaceFilesRuntimeCapability;
|
|
9856
10201
|
exports.XPERT_RUNTIME_CAPABILITIES_TOKEN = modelProvider.XPERT_RUNTIME_CAPABILITIES_TOKEN;
|
|
@@ -9863,6 +10208,9 @@ exports.requireReadStatement = dataWorkbench.requireReadStatement;
|
|
|
9863
10208
|
exports.splitWorkbenchSql = dataWorkbench.splitWorkbenchSql;
|
|
9864
10209
|
exports.ModelProviderHttpClient = modelProviderHttpClient.ModelProviderHttpClient;
|
|
9865
10210
|
exports.ModelProviderHttpError = modelProviderHttpClient.ModelProviderHttpError;
|
|
10211
|
+
exports.AGENT_TASK_RESULTS_FEATURE = results.AGENT_TASK_RESULTS_FEATURE;
|
|
10212
|
+
exports.agentResultItemSchema = results.agentResultItemSchema;
|
|
10213
|
+
exports.agentTaskResultSchema = results.agentTaskResultSchema;
|
|
9866
10214
|
exports.CONNECTOR_AUTHORIZATION_MODES = connector.CONNECTOR_AUTHORIZATION_MODES;
|
|
9867
10215
|
exports.CONNECTOR_SCOPE_TYPES = connector.CONNECTOR_SCOPE_TYPES;
|
|
9868
10216
|
exports.assertConnectorDefinition = connector.assertConnectorDefinition;
|
|
@@ -9878,12 +10226,15 @@ exports.ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN = ACCOUNT_BINDING_PERMISSION_SE
|
|
|
9878
10226
|
exports.AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING = AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING;
|
|
9879
10227
|
exports.AGENT_CHAT_DISPATCH_MESSAGE_TYPE = AGENT_CHAT_DISPATCH_MESSAGE_TYPE;
|
|
9880
10228
|
exports.AGENT_MIDDLEWARE_STRATEGY = AGENT_MIDDLEWARE_STRATEGY;
|
|
10229
|
+
exports.AGENT_RUNTIME_EVENT_MESSAGE_TYPE = AGENT_RUNTIME_EVENT_MESSAGE_TYPE;
|
|
9881
10230
|
exports.AGENT_RUNTIME_STRATEGY = AGENT_RUNTIME_STRATEGY;
|
|
9882
10231
|
exports.AIModelProviderNotFoundException = AIModelProviderNotFoundException;
|
|
9883
10232
|
exports.AIModelProviderStrategy = AIModelProviderStrategy;
|
|
9884
10233
|
exports.AI_MODEL_PROVIDER = AI_MODEL_PROVIDER;
|
|
9885
10234
|
exports.ASSISTANT_CAPABILITY_PROVIDER = ASSISTANT_CAPABILITY_PROVIDER;
|
|
9886
10235
|
exports.AdapterDataSourceStrategy = AdapterDataSourceStrategy;
|
|
10236
|
+
exports.AgentExecutionRunnerCapability = AgentExecutionRunnerCapability;
|
|
10237
|
+
exports.AgentExecutionRunnerFactoryCapability = AgentExecutionRunnerFactoryCapability;
|
|
9887
10238
|
exports.AgentInvocationRuntimeCapability = AgentInvocationRuntimeCapability;
|
|
9888
10239
|
exports.AgentMiddlewareStrategy = AgentMiddlewareStrategy;
|
|
9889
10240
|
exports.AgentRuntimeFactoryCapability = AgentRuntimeFactoryCapability;
|
|
@@ -9900,12 +10251,14 @@ exports.BaseSandbox = BaseSandbox;
|
|
|
9900
10251
|
exports.BaseStrategyRegistry = BaseStrategyRegistry;
|
|
9901
10252
|
exports.CHAT_CHANNEL = CHAT_CHANNEL;
|
|
9902
10253
|
exports.CHAT_CHANNEL_TEXT_LIMITS = CHAT_CHANNEL_TEXT_LIMITS;
|
|
10254
|
+
exports.CLI_MODEL_TOKEN_REFERENCE = CLI_MODEL_TOKEN_REFERENCE;
|
|
9903
10255
|
exports.COLLABORATION_DOCUMENT_PROVIDER = COLLABORATION_DOCUMENT_PROVIDER;
|
|
9904
10256
|
exports.CONNECTION_COMMAND_ROUTER_TOKEN = CONNECTION_COMMAND_ROUTER_TOKEN;
|
|
9905
10257
|
exports.CONNECTOR_STRATEGY = CONNECTOR_STRATEGY;
|
|
9906
10258
|
exports.CancelConversationCommand = CancelConversationCommand;
|
|
9907
10259
|
exports.ChatChannel = ChatChannel;
|
|
9908
10260
|
exports.ChatOAICompatReasoningModel = ChatOAICompatReasoningModel;
|
|
10261
|
+
exports.CliModelProfilesCapability = CliModelProfilesCapability;
|
|
9909
10262
|
exports.CollaborationDocumentProvider = CollaborationDocumentProvider;
|
|
9910
10263
|
exports.CollaborationRuntimeCapability = CollaborationRuntimeCapability;
|
|
9911
10264
|
exports.CommonParameterRules = CommonParameterRules;
|
|
@@ -9954,13 +10307,20 @@ exports.INTEGRATION_PERMISSION_SERVICE_TOKEN = INTEGRATION_PERMISSION_SERVICE_TO
|
|
|
9954
10307
|
exports.INTEGRATION_STRATEGY = INTEGRATION_STRATEGY;
|
|
9955
10308
|
exports.ImageGenerationModel = ImageGenerationModel;
|
|
9956
10309
|
exports.ImageUnderstandingStrategy = ImageUnderstandingStrategy;
|
|
10310
|
+
exports.ImportDefaultAgentPluginsCommand = ImportDefaultAgentPluginsCommand;
|
|
9957
10311
|
exports.IntegrationStrategyKey = IntegrationStrategyKey;
|
|
9958
10312
|
exports.JUMP_TO_TARGETS = JUMP_TO_TARGETS;
|
|
9959
10313
|
exports.JsonSchemaValidator = JsonSchemaValidator;
|
|
9960
10314
|
exports.KEYWORD_ANALYZER_STRATEGY = KEYWORD_ANALYZER_STRATEGY;
|
|
9961
10315
|
exports.KNOWLEDGE_STRATEGY = KNOWLEDGE_STRATEGY;
|
|
9962
10316
|
exports.KeywordAnalyzerStrategy = KeywordAnalyzerStrategy;
|
|
10317
|
+
exports.KnowledgeDocumentVisualAssetsRuntimeCapability = KnowledgeDocumentVisualAssetsRuntimeCapability;
|
|
10318
|
+
exports.KnowledgeDocumentVisualAssetsRuntimeFactoryCapability = KnowledgeDocumentVisualAssetsRuntimeFactoryCapability;
|
|
10319
|
+
exports.KnowledgeGraphRuntimeCapability = KnowledgeGraphRuntimeCapability;
|
|
9963
10320
|
exports.KnowledgeStrategyKey = KnowledgeStrategyKey;
|
|
10321
|
+
exports.KnowledgebaseDocumentsRuntimeCapability = KnowledgebaseDocumentsRuntimeCapability;
|
|
10322
|
+
exports.KnowledgebaseProvisioningRuntimeCapability = KnowledgebaseProvisioningRuntimeCapability;
|
|
10323
|
+
exports.KnowledgebaseRuntimeCapability = KnowledgebaseRuntimeCapability;
|
|
9964
10324
|
exports.LLMUsage = LLMUsage;
|
|
9965
10325
|
exports.LargeLanguageModel = LargeLanguageModel;
|
|
9966
10326
|
exports.MANAGED_CONNECTION_REGISTRY_TOKEN = MANAGED_CONNECTION_REGISTRY_TOKEN;
|
|
@@ -9968,6 +10328,7 @@ exports.MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN = MANAGED_QUEUE_HANDLER_REGISTRY_TO
|
|
|
9968
10328
|
exports.MANAGED_QUEUE_SERVICE_TOKEN = MANAGED_QUEUE_SERVICE_TOKEN;
|
|
9969
10329
|
exports.MCP_CAPABILITY_CHANGE_EVENT_TYPES = MCP_CAPABILITY_CHANGE_EVENT_TYPES;
|
|
9970
10330
|
exports.MODEL_OUTPUT_VALIDATION_ERROR_CODE = MODEL_OUTPUT_VALIDATION_ERROR_CODE;
|
|
10331
|
+
exports.ModelExecutionEnvironmentCapability = ModelExecutionEnvironmentCapability;
|
|
9971
10332
|
exports.ModelOutputValidationError = ModelOutputValidationError;
|
|
9972
10333
|
exports.ORGANIZATION_METADATA_KEY = ORGANIZATION_METADATA_KEY;
|
|
9973
10334
|
exports.OpenAICompatibleReranker = OpenAICompatibleReranker;
|
|
@@ -9992,10 +10353,13 @@ exports.PluginWebhookAuth = PluginWebhookAuth;
|
|
|
9992
10353
|
exports.ProjectTaskProvider = ProjectTaskProvider;
|
|
9993
10354
|
exports.ProjectTasksRuntimeCapability = ProjectTasksRuntimeCapability;
|
|
9994
10355
|
exports.ProjectTypeProvider = ProjectTypeProvider;
|
|
10356
|
+
exports.RESOURCE_CARD_EVENT = RESOURCE_CARD_EVENT;
|
|
10357
|
+
exports.RESOURCE_CARD_PROVIDER = RESOURCE_CARD_PROVIDER;
|
|
9995
10358
|
exports.RETRIEVER_STRATEGY = RETRIEVER_STRATEGY;
|
|
9996
10359
|
exports.RequestContext = RequestContext;
|
|
9997
10360
|
exports.RequirePermissionOperation = RequirePermissionOperation;
|
|
9998
10361
|
exports.RerankModel = RerankModel;
|
|
10362
|
+
exports.ResourceCardProvider = ResourceCardProvider;
|
|
9999
10363
|
exports.RetrieverStrategy = RetrieverStrategy;
|
|
10000
10364
|
exports.SANDBOX_PROVIDER = SANDBOX_PROVIDER;
|
|
10001
10365
|
exports.SANDBOX_RUNTIME_PROVIDER = SANDBOX_RUNTIME_PROVIDER;
|
|
@@ -10012,6 +10376,7 @@ exports.SYSTEM_GLOBAL_SCOPE = SYSTEM_GLOBAL_SCOPE;
|
|
|
10012
10376
|
exports.SandboxProviderStrategy = SandboxProviderStrategy;
|
|
10013
10377
|
exports.SandboxRuntimeProviderStrategy = SandboxRuntimeProviderStrategy;
|
|
10014
10378
|
exports.SandboxWorkspaceMapperStrategy = SandboxWorkspaceMapperStrategy;
|
|
10379
|
+
exports.ShellModelExecutionSourceCapability = ShellModelExecutionSourceCapability;
|
|
10015
10380
|
exports.SkillSourceProviderStrategy = SkillSourceProviderStrategy;
|
|
10016
10381
|
exports.Speech2TextChatModel = Speech2TextChatModel;
|
|
10017
10382
|
exports.SpeechToTextModel = SpeechToTextModel;
|
|
@@ -10050,6 +10415,14 @@ exports.XpertResourceTemplate = XpertResourceTemplate;
|
|
|
10050
10415
|
exports.XpertServerPlugin = XpertServerPlugin;
|
|
10051
10416
|
exports.XpertTool = XpertTool;
|
|
10052
10417
|
exports.XpertToolProvider = XpertToolProvider;
|
|
10418
|
+
exports.agentInvocationDispatchContextSchema = agentInvocationDispatchContextSchema;
|
|
10419
|
+
exports.agentRuntimeConsumptionStateSchema = agentRuntimeConsumptionStateSchema;
|
|
10420
|
+
exports.agentRuntimeDeliveryStateSchema = agentRuntimeDeliveryStateSchema;
|
|
10421
|
+
exports.agentRuntimeEventMessageId = agentRuntimeEventMessageId;
|
|
10422
|
+
exports.agentRuntimeEventSchema = agentRuntimeEventSchema;
|
|
10423
|
+
exports.agentRuntimeReplyTargetSchema = agentRuntimeReplyTargetSchema;
|
|
10424
|
+
exports.agentRuntimeResultClaimSchema = agentRuntimeResultClaimSchema;
|
|
10425
|
+
exports.agentRuntimeResultConsumptionKey = agentRuntimeResultConsumptionKey;
|
|
10053
10426
|
exports.als = als;
|
|
10054
10427
|
exports.appendSandboxMessage = appendSandboxMessage;
|
|
10055
10428
|
exports.buildSandboxTimeoutMessage = buildSandboxTimeoutMessage;
|
|
@@ -10073,6 +10446,7 @@ exports.defineXpertTool = defineXpertTool;
|
|
|
10073
10446
|
exports.derivePluginArtifactNamespace = derivePluginArtifactNamespace;
|
|
10074
10447
|
exports.describeXpertToolProvider = describeXpertToolProvider;
|
|
10075
10448
|
exports.downloadRemoteFile = downloadRemoteFile;
|
|
10449
|
+
exports.emitResourceCard = emitResourceCard;
|
|
10076
10450
|
exports.formatSandboxTimeout = formatSandboxTimeout;
|
|
10077
10451
|
exports.getDefaultTenantId = getDefaultTenantId;
|
|
10078
10452
|
exports.getErrorMessage = getErrorMessage;
|
|
@@ -10098,8 +10472,11 @@ exports.isStructuredMessageType = isStructuredMessageType;
|
|
|
10098
10472
|
exports.isTenantGlobalScopeKey = isTenantGlobalScopeKey;
|
|
10099
10473
|
exports.loadYamlFile = loadYamlFile;
|
|
10100
10474
|
exports.mergeCredentials = mergeCredentials;
|
|
10475
|
+
exports.mergeModelRequirements = mergeModelRequirements;
|
|
10101
10476
|
exports.mergeParentChildChunks = mergeParentChildChunks;
|
|
10477
|
+
exports.nativeModelTransport = nativeModelTransport;
|
|
10102
10478
|
exports.normalizeContextSize = normalizeContextSize;
|
|
10479
|
+
exports.normalizeTokenUsage = normalizeTokenUsage;
|
|
10103
10480
|
exports.pluginArtifactTableName = pluginArtifactTableName;
|
|
10104
10481
|
exports.prepareToolResult = prepareToolResult;
|
|
10105
10482
|
exports.processAsyncAIGCManagedJob = processAsyncAIGCManagedJob;
|
|
@@ -10115,10 +10492,12 @@ exports.resolveSandboxTerminalAdapter = resolveSandboxTerminalAdapter;
|
|
|
10115
10492
|
exports.resolveStrategyMetadataTarget = resolveStrategyMetadataTarget;
|
|
10116
10493
|
exports.resolveTenantGlobalScopeKey = resolveTenantGlobalScopeKey;
|
|
10117
10494
|
exports.resolveTokenUsage = resolveTokenUsage;
|
|
10495
|
+
exports.resolveTokenUsageCandidates = resolveTokenUsageCandidates;
|
|
10118
10496
|
exports.resolveXpertMcpExtensions = resolveXpertMcpExtensions;
|
|
10119
10497
|
exports.runWithRequestContext = runWithRequestContext;
|
|
10120
10498
|
exports.runtimeToolProviderComponent = runtimeToolProviderComponent;
|
|
10121
10499
|
exports.secondsToMilliseconds = secondsToMilliseconds;
|
|
10122
10500
|
exports.setDefaultTenantId = setDefaultTenantId;
|
|
10123
10501
|
exports.sumTokenUsage = sumTokenUsage;
|
|
10502
|
+
exports.taskWaitReason = taskWaitReason;
|
|
10124
10503
|
exports.textTokenBoundaries = textTokenBoundaries;
|