@xpert-ai/plugin-sdk 3.29.1 → 3.30.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/artifact-document.cjs.js +26 -0
- package/artifact-document.esm.js +26 -0
- package/docs/README.md +4 -0
- package/docs/artifact-drafts.md +1 -1
- package/docs/artifact-types.md +8 -0
- package/docs/openai-compatible-embeddings.md +21 -0
- package/index.cjs.js +216 -119
- package/index.esm.js +216 -122
- package/model-provider.cjs.js +10 -0
- package/model-provider.esm.js +9 -1
- package/package.json +2 -2
- package/src/lib/ai-model/openai-compatible/embeddings.d.ts +8 -0
- package/src/lib/ai-model/openai-compatible/index.d.ts +1 -0
- package/src/lib/artifact-document/host.d.ts +1 -1
- package/src/lib/artifact-document/network.d.ts +3 -0
- package/src/lib/artifact-type/definition.schema.d.ts +79 -1
- package/src/lib/artifact-type/index.d.ts +12 -0
- package/src/lib/core/permissions/general.d.ts +3 -0
- package/src/lib/runtime/capabilities/artifact-content.d.ts +11 -0
- package/src/lib/runtime/capabilities/index.d.ts +1 -0
- package/src/lib/runtime/capabilities/workspace-storage.d.ts +2 -0
- package/src/lib/runtime/workspace-file-tools.d.ts +2 -0
- package/src/lib/sandbox/directory-listing-command.d.ts +4 -0
- package/src/lib/sandbox/runtime-provider.d.ts +1 -1
- package/src/lib/sandbox/sandbox.d.ts +3 -3
- package/src/lib/sandbox/workspace-path-display.d.ts +2 -0
- package/src/lib/workflow/trigger/strategy.interface.d.ts +5 -0
- package/docs/workspace-file-tools.md +0 -66
package/index.esm.js
CHANGED
|
@@ -16,7 +16,7 @@ import fs__default from 'fs';
|
|
|
16
16
|
import http from 'http';
|
|
17
17
|
import https from 'https';
|
|
18
18
|
import { c as createRuntimeCapability, B as BuiltinToolset, W as WorkspaceFilesRuntimeCapability } from './model-provider.esm.js';
|
|
19
|
-
export { A as ActorTokenRuntimeCapability, a as ActorTokenRuntimeFactoryCapability, b as
|
|
19
|
+
export { A as ActorTokenRuntimeCapability, a as ActorTokenRuntimeFactoryCapability, b as ArtifactContentRuntimeCapability, d as ArtifactDraftsRuntimeCapability, e as ArtifactLibraryRuntimeCapability, f as ArtifactsRuntimeCapability, g as AssistantMiddlewareAccessRuntimeCapability, h as BaseTool, i as BaseToolset, D as DefaultAgentMiddlewareRuntimeCapabilityRegistry, D as DefaultRuntimeCapabilityRegistry, j as McpClientRuntimeCapability, M as ModelProviderBuiltinToolset, P as ProjectAccessRuntimeCapability, k as ProjectFilesRuntimeCapability, l as ProjectKnowledgeRuntimeCapability, m as ProjectProvisioningRuntimeCapability, R as RUNTIME_CAPABILITY_PROVIDER, n as RestClientRuntimeCapability, o as RuntimeCapabilityProvider, S as SANDBOX_JOB_ERROR_CODES, p as SANDBOX_JOB_INVOCATION_PREFIX, q as SANDBOX_JOB_PROGRESS_PREFIX, r as SandboxJobRuntimeError, s as SandboxJobsRuntimeCapability, T as ToolImagesRuntimeCapability, t as WORKSPACE_FILES_SOURCE, X as XPERT_RUNTIME_CAPABILITIES_TOKEN, u as isSandboxJobRuntimeError, w as workspaceFileMutationMetadata, v as workspaceFileMutationPath, x as workspaceRelativeDirectoryPathSchema, y 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';
|
|
@@ -33,7 +33,7 @@ export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as an
|
|
|
33
33
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
34
34
|
import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
35
35
|
import { isBaseMessage, isAIMessage, isAIMessageChunk, AIMessage } from '@langchain/core/messages';
|
|
36
|
-
import { ChatOpenAICompletions } from '@langchain/openai';
|
|
36
|
+
import { ChatOpenAICompletions, OpenAIEmbeddings } from '@langchain/openai';
|
|
37
37
|
import { Document } from '@langchain/core/documents';
|
|
38
38
|
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
39
39
|
import { getEnvironmentVariable } from '@langchain/core/utils/env';
|
|
@@ -43,6 +43,7 @@ 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
|
+
import { isAbsolute, relative, resolve, sep } from 'node:path';
|
|
46
47
|
import { _ as _object_without_properties_loose$2 } from './_object_without_properties_loose.esm.js';
|
|
47
48
|
export { base64ToBytes, bytesToBase64, createCollaborationClient, createCollaborationPresenceStore, createSocketIoTransportAdapter, createYjsDocumentAdapter } from './collaboration-client.esm.js';
|
|
48
49
|
import { tool } from '@langchain/core/tools';
|
|
@@ -2913,7 +2914,33 @@ let AIModel = AIModel_1 = class AIModel {
|
|
|
2913
2914
|
}
|
|
2914
2915
|
getUsagePricingSnapshot(model, credentials, context) {
|
|
2915
2916
|
var _this_getModelSchema;
|
|
2916
|
-
|
|
2917
|
+
const pricing = (_this_getModelSchema = this.getModelSchema(model, credentials)) == null ? void 0 : _this_getModelSchema.pricing;
|
|
2918
|
+
if (this.modelType === AiModelTypeEnum.TEXT_EMBEDDING && pricing && !isModelUsagePricingConfig(pricing)) {
|
|
2919
|
+
var _pricing_tiered_pricing, _pricing_rules, _pricing_currency;
|
|
2920
|
+
// Only flat input prices can be converted without the invocation's actual token count.
|
|
2921
|
+
// Invalid or conditional prices must remain unpriced, never silently become free.
|
|
2922
|
+
const input = Number(pricing.input), unit = Number(pricing.unit);
|
|
2923
|
+
if (((_pricing_tiered_pricing = pricing.tiered_pricing) == null ? void 0 : _pricing_tiered_pricing.length) || ((_pricing_rules = pricing.rules) == null ? void 0 : _pricing_rules.length) || !Number.isFinite(input) || input < 0 || !Number.isFinite(unit) || unit <= 0 || !((_pricing_currency = pricing.currency) == null ? void 0 : _pricing_currency.trim())) {
|
|
2924
|
+
return resolveModelUsagePricingSnapshot(undefined, context);
|
|
2925
|
+
}
|
|
2926
|
+
return resolveModelUsagePricingSnapshot({
|
|
2927
|
+
type: 'usage',
|
|
2928
|
+
rules: [
|
|
2929
|
+
{
|
|
2930
|
+
id: `${model}:embedding-input`,
|
|
2931
|
+
version: 'catalog',
|
|
2932
|
+
effective_from: '1970-01-01T00:00:00.000Z',
|
|
2933
|
+
unit: 'token',
|
|
2934
|
+
token_type: 'prompt',
|
|
2935
|
+
unit_size: 1,
|
|
2936
|
+
unit_price: input * unit,
|
|
2937
|
+
currency: pricing.currency,
|
|
2938
|
+
charge_type: input === 0 ? 'free' : 'paid'
|
|
2939
|
+
}
|
|
2940
|
+
]
|
|
2941
|
+
}, context);
|
|
2942
|
+
}
|
|
2943
|
+
return resolveModelUsagePricingSnapshot(pricing, context);
|
|
2917
2944
|
}
|
|
2918
2945
|
getModelPath() {
|
|
2919
2946
|
const modelType = this.modelType.toLowerCase();
|
|
@@ -3972,6 +3999,47 @@ class Speech2TextChatModel extends BaseChatModel {
|
|
|
3972
3999
|
}
|
|
3973
4000
|
}
|
|
3974
4001
|
|
|
4002
|
+
/** OpenAI-compatible embeddings with authoritative, per-request usage callbacks. */ class OpenAICompatibleEmbeddings extends OpenAIEmbeddings {
|
|
4003
|
+
async embeddingWithRetry(request) {
|
|
4004
|
+
var _this_usageCallbacks, _this_usageCallbacks_resolveUsagePricingSnapshot, _this_usageCallbacks1, _response_usage, _response_usage1;
|
|
4005
|
+
const requestId = randomUUID();
|
|
4006
|
+
const context = {
|
|
4007
|
+
model: request.model,
|
|
4008
|
+
modelType: AiModelTypeEnum.TEXT_EMBEDDING,
|
|
4009
|
+
operation: AiModelTypeEnum.TEXT_EMBEDDING,
|
|
4010
|
+
modality: 'text',
|
|
4011
|
+
startedAt: new Date().toISOString()
|
|
4012
|
+
};
|
|
4013
|
+
const reportUsage = (_this_usageCallbacks = this.usageCallbacks) == null ? void 0 : _this_usageCallbacks.handleModelUsage;
|
|
4014
|
+
const pricingSnapshot = reportUsage ? await ((_this_usageCallbacks1 = this.usageCallbacks) == null ? void 0 : (_this_usageCallbacks_resolveUsagePricingSnapshot = _this_usageCallbacks1.resolveUsagePricingSnapshot) == null ? void 0 : _this_usageCallbacks_resolveUsagePricingSnapshot.call(_this_usageCallbacks1, context)) : undefined;
|
|
4015
|
+
const response = await super.embeddingWithRetry(request);
|
|
4016
|
+
const usage = normalizeTokenUsage({
|
|
4017
|
+
promptTokens: (_response_usage = response.usage) == null ? void 0 : _response_usage.prompt_tokens,
|
|
4018
|
+
completionTokens: 0,
|
|
4019
|
+
totalTokens: (_response_usage1 = response.usage) == null ? void 0 : _response_usage1.total_tokens
|
|
4020
|
+
});
|
|
4021
|
+
// Stay outside the transport retry loop: accounting failure must not repeat a billable request.
|
|
4022
|
+
if (usage && reportUsage) {
|
|
4023
|
+
await reportUsage(_extends({}, context, {
|
|
4024
|
+
requestId,
|
|
4025
|
+
pricingSnapshot,
|
|
4026
|
+
recordedAt: new Date().toISOString(),
|
|
4027
|
+
metrics: [
|
|
4028
|
+
_extends({
|
|
4029
|
+
unit: 'token',
|
|
4030
|
+
authority: 'provider'
|
|
4031
|
+
}, usage)
|
|
4032
|
+
]
|
|
4033
|
+
}));
|
|
4034
|
+
}
|
|
4035
|
+
return response;
|
|
4036
|
+
}
|
|
4037
|
+
constructor(input, usageCallbacks){
|
|
4038
|
+
super(input);
|
|
4039
|
+
this.usageCallbacks = usageCallbacks;
|
|
4040
|
+
}
|
|
4041
|
+
}
|
|
4042
|
+
|
|
3975
4043
|
const encodingCache = new Map();
|
|
3976
4044
|
/** Exact, model-independent text count for hard chunk limits. Treat special-token spellings as literal document text. */ function textEncoding() {
|
|
3977
4045
|
const cacheKey = 'encoding:cl100k_base';
|
|
@@ -5289,6 +5357,120 @@ console.log(JSON.stringify({ ...metrics, occurrences, changed }));
|
|
|
5289
5357
|
return `node -e '${script.replace(/'/g, "'\\''")}'`;
|
|
5290
5358
|
}
|
|
5291
5359
|
|
|
5360
|
+
const INDENTATION_SPACES = 2;
|
|
5361
|
+
/**
|
|
5362
|
+
* Node.js command template for recursive directory listing with depth control.
|
|
5363
|
+
*/ function buildListDirCommand(dirPath, displayPath, offset, limit, depth) {
|
|
5364
|
+
const pathB64 = Buffer.from(dirPath, 'utf-8').toString('base64');
|
|
5365
|
+
const displayPathB64 = Buffer.from(displayPath, 'utf-8').toString('base64');
|
|
5366
|
+
const safeOffset = Number.isFinite(offset) && offset > 0 ? Math.floor(offset) : 1;
|
|
5367
|
+
const safeLimit = Number.isFinite(limit) && limit > 0 ? Math.floor(limit) : 25;
|
|
5368
|
+
const safeDepth = Number.isFinite(depth) && depth > 0 ? Math.floor(depth) : 2;
|
|
5369
|
+
return `node -e "
|
|
5370
|
+
const fs = require('fs');
|
|
5371
|
+
const path = require('path');
|
|
5372
|
+
|
|
5373
|
+
const dirPath = Buffer.from('${pathB64}', 'base64').toString('utf-8');
|
|
5374
|
+
const displayPath = Buffer.from('${displayPathB64}', 'base64').toString('utf-8');
|
|
5375
|
+
const offset = ${safeOffset};
|
|
5376
|
+
const limit = ${safeLimit};
|
|
5377
|
+
const maxDepth = ${safeDepth};
|
|
5378
|
+
const INDENTATION_SPACES = ${INDENTATION_SPACES};
|
|
5379
|
+
|
|
5380
|
+
if (!path.isAbsolute(dirPath)) {
|
|
5381
|
+
console.error('Error: dir_path must be an absolute path');
|
|
5382
|
+
process.exit(1);
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
if (!fs.existsSync(dirPath)) {
|
|
5386
|
+
console.error('Error: Directory not found');
|
|
5387
|
+
process.exit(1);
|
|
5388
|
+
}
|
|
5389
|
+
|
|
5390
|
+
if (!fs.statSync(dirPath).isDirectory()) {
|
|
5391
|
+
console.error('Error: Path is not a directory');
|
|
5392
|
+
process.exit(1);
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
function collectEntries(currentPath, relativePrefix, remainingDepth, entries) {
|
|
5396
|
+
if (remainingDepth === 0) return;
|
|
5397
|
+
|
|
5398
|
+
try {
|
|
5399
|
+
const dirEntries = fs.readdirSync(currentPath, { withFileTypes: true });
|
|
5400
|
+
const sortedEntries = dirEntries
|
|
5401
|
+
.map(entry => {
|
|
5402
|
+
const fullPath = path.join(currentPath, entry.name);
|
|
5403
|
+
const relativePath = path.join(relativePrefix, entry.name);
|
|
5404
|
+
|
|
5405
|
+
let kind = 'file';
|
|
5406
|
+
if (entry.isSymbolicLink()) kind = 'symlink';
|
|
5407
|
+
else if (entry.isDirectory()) kind = 'directory';
|
|
5408
|
+
|
|
5409
|
+
return {
|
|
5410
|
+
fullPath,
|
|
5411
|
+
relativePath,
|
|
5412
|
+
kind,
|
|
5413
|
+
depth: relativePrefix.split(path.sep).filter(Boolean).length
|
|
5414
|
+
};
|
|
5415
|
+
})
|
|
5416
|
+
.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
5417
|
+
|
|
5418
|
+
for (const entry of sortedEntries) {
|
|
5419
|
+
entries.push(entry);
|
|
5420
|
+
if (entry.kind === 'directory' && remainingDepth > 1) {
|
|
5421
|
+
collectEntries(entry.fullPath, entry.relativePath, remainingDepth - 1, entries);
|
|
5422
|
+
}
|
|
5423
|
+
}
|
|
5424
|
+
} catch (e) {
|
|
5425
|
+
// Skip unreadable directories
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
const allEntries = [];
|
|
5430
|
+
collectEntries(dirPath, '', maxDepth, allEntries);
|
|
5431
|
+
|
|
5432
|
+
if (allEntries.length === 0) {
|
|
5433
|
+
console.log('Workspace-relative directory: ' + displayPath);
|
|
5434
|
+
console.log('(Empty directory)');
|
|
5435
|
+
process.exit(0);
|
|
5436
|
+
}
|
|
5437
|
+
|
|
5438
|
+
const startIndex = offset - 1;
|
|
5439
|
+
if (startIndex >= allEntries.length) {
|
|
5440
|
+
console.error('Error: offset exceeds directory entry count');
|
|
5441
|
+
process.exit(1);
|
|
5442
|
+
}
|
|
5443
|
+
|
|
5444
|
+
const endIndex = Math.min(startIndex + limit, allEntries.length);
|
|
5445
|
+
const selectedEntries = allEntries.slice(startIndex, endIndex);
|
|
5446
|
+
|
|
5447
|
+
console.log('Workspace-relative directory: ' + displayPath);
|
|
5448
|
+
|
|
5449
|
+
for (const entry of selectedEntries) {
|
|
5450
|
+
const indent = ' '.repeat(entry.depth * INDENTATION_SPACES);
|
|
5451
|
+
let name = path.posix.join(displayPath, entry.relativePath.split(path.sep).join('/'));
|
|
5452
|
+
if (entry.kind === 'directory') name += '/';
|
|
5453
|
+
else if (entry.kind === 'symlink') name += '@';
|
|
5454
|
+
console.log(indent + name);
|
|
5455
|
+
}
|
|
5456
|
+
|
|
5457
|
+
if (endIndex < allEntries.length) {
|
|
5458
|
+
console.log('More than ' + limit + ' entries found');
|
|
5459
|
+
}
|
|
5460
|
+
"`;
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5463
|
+
/** Format tool-owned paths only; file contents and backend filesystem authorization stay unchanged. */ function workspaceRelativeDisplayPath(workingDirectory, filePath) {
|
|
5464
|
+
if (!workingDirectory || !isAbsolute(workingDirectory)) {
|
|
5465
|
+
throw new Error('Sandbox working directory is not available.');
|
|
5466
|
+
}
|
|
5467
|
+
const value = relative(workingDirectory, resolve(workingDirectory, filePath));
|
|
5468
|
+
if (isAbsolute(value) || value === '..' || value.startsWith(`..${sep}`)) {
|
|
5469
|
+
throw new Error('Sandbox discovery path is outside the workspace.');
|
|
5470
|
+
}
|
|
5471
|
+
return value.split(sep).join('/') || '.';
|
|
5472
|
+
}
|
|
5473
|
+
|
|
5292
5474
|
const MAX_LINE_LENGTH = 500;
|
|
5293
5475
|
const MAX_GREP_LINE_LENGTH = 2000;
|
|
5294
5476
|
const GREP_RESULT_LIMIT = 100;
|
|
@@ -5430,112 +5612,6 @@ try {
|
|
|
5430
5612
|
}
|
|
5431
5613
|
"`;
|
|
5432
5614
|
}
|
|
5433
|
-
const INDENTATION_SPACES = 2;
|
|
5434
|
-
const MAX_ENTRY_LENGTH = 500;
|
|
5435
|
-
/**
|
|
5436
|
-
* Node.js command template for recursive directory listing with depth control.
|
|
5437
|
-
*/ function buildListDirCommand(dirPath, offset, limit, depth) {
|
|
5438
|
-
const pathB64 = utf8ToBase64(dirPath);
|
|
5439
|
-
const safeOffset = Number.isFinite(offset) && offset > 0 ? Math.floor(offset) : 1;
|
|
5440
|
-
const safeLimit = Number.isFinite(limit) && limit > 0 ? Math.floor(limit) : 25;
|
|
5441
|
-
const safeDepth = Number.isFinite(depth) && depth > 0 ? Math.floor(depth) : 2;
|
|
5442
|
-
return `node -e "
|
|
5443
|
-
const fs = require('fs');
|
|
5444
|
-
const path = require('path');
|
|
5445
|
-
|
|
5446
|
-
const dirPath = Buffer.from('${pathB64}', 'base64').toString('utf-8');
|
|
5447
|
-
const offset = ${safeOffset};
|
|
5448
|
-
const limit = ${safeLimit};
|
|
5449
|
-
const maxDepth = ${safeDepth};
|
|
5450
|
-
const INDENTATION_SPACES = ${INDENTATION_SPACES};
|
|
5451
|
-
const MAX_ENTRY_LENGTH = ${MAX_ENTRY_LENGTH};
|
|
5452
|
-
|
|
5453
|
-
if (!path.isAbsolute(dirPath)) {
|
|
5454
|
-
console.error('Error: dir_path must be an absolute path');
|
|
5455
|
-
process.exit(1);
|
|
5456
|
-
}
|
|
5457
|
-
|
|
5458
|
-
if (!fs.existsSync(dirPath)) {
|
|
5459
|
-
console.error('Error: Directory not found');
|
|
5460
|
-
process.exit(1);
|
|
5461
|
-
}
|
|
5462
|
-
|
|
5463
|
-
if (!fs.statSync(dirPath).isDirectory()) {
|
|
5464
|
-
console.error('Error: Path is not a directory');
|
|
5465
|
-
process.exit(1);
|
|
5466
|
-
}
|
|
5467
|
-
|
|
5468
|
-
function collectEntries(currentPath, relativePrefix, remainingDepth, entries) {
|
|
5469
|
-
if (remainingDepth === 0) return;
|
|
5470
|
-
|
|
5471
|
-
try {
|
|
5472
|
-
const dirEntries = fs.readdirSync(currentPath, { withFileTypes: true });
|
|
5473
|
-
const sortedEntries = dirEntries
|
|
5474
|
-
.map(entry => {
|
|
5475
|
-
const fullPath = path.join(currentPath, entry.name);
|
|
5476
|
-
const relativePath = path.join(relativePrefix, entry.name);
|
|
5477
|
-
const displayName = entry.name.length > MAX_ENTRY_LENGTH
|
|
5478
|
-
? entry.name.substring(0, MAX_ENTRY_LENGTH)
|
|
5479
|
-
: entry.name;
|
|
5480
|
-
|
|
5481
|
-
let kind = 'file';
|
|
5482
|
-
if (entry.isSymbolicLink()) kind = 'symlink';
|
|
5483
|
-
else if (entry.isDirectory()) kind = 'directory';
|
|
5484
|
-
|
|
5485
|
-
return {
|
|
5486
|
-
fullPath,
|
|
5487
|
-
relativePath,
|
|
5488
|
-
displayName,
|
|
5489
|
-
kind,
|
|
5490
|
-
depth: relativePrefix.split(path.sep).filter(Boolean).length
|
|
5491
|
-
};
|
|
5492
|
-
})
|
|
5493
|
-
.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
5494
|
-
|
|
5495
|
-
for (const entry of sortedEntries) {
|
|
5496
|
-
entries.push(entry);
|
|
5497
|
-
if (entry.kind === 'directory' && remainingDepth > 1) {
|
|
5498
|
-
collectEntries(entry.fullPath, entry.relativePath, remainingDepth - 1, entries);
|
|
5499
|
-
}
|
|
5500
|
-
}
|
|
5501
|
-
} catch (e) {
|
|
5502
|
-
// Skip unreadable directories
|
|
5503
|
-
}
|
|
5504
|
-
}
|
|
5505
|
-
|
|
5506
|
-
const allEntries = [];
|
|
5507
|
-
collectEntries(dirPath, '', maxDepth, allEntries);
|
|
5508
|
-
|
|
5509
|
-
if (allEntries.length === 0) {
|
|
5510
|
-
console.log('Absolute path: ' + dirPath);
|
|
5511
|
-
console.log('(Empty directory)');
|
|
5512
|
-
process.exit(0);
|
|
5513
|
-
}
|
|
5514
|
-
|
|
5515
|
-
const startIndex = offset - 1;
|
|
5516
|
-
if (startIndex >= allEntries.length) {
|
|
5517
|
-
console.error('Error: offset exceeds directory entry count');
|
|
5518
|
-
process.exit(1);
|
|
5519
|
-
}
|
|
5520
|
-
|
|
5521
|
-
const endIndex = Math.min(startIndex + limit, allEntries.length);
|
|
5522
|
-
const selectedEntries = allEntries.slice(startIndex, endIndex);
|
|
5523
|
-
|
|
5524
|
-
console.log('Absolute path: ' + dirPath);
|
|
5525
|
-
|
|
5526
|
-
for (const entry of selectedEntries) {
|
|
5527
|
-
const indent = ' '.repeat(entry.depth * INDENTATION_SPACES);
|
|
5528
|
-
let name = entry.displayName;
|
|
5529
|
-
if (entry.kind === 'directory') name += '/';
|
|
5530
|
-
else if (entry.kind === 'symlink') name += '@';
|
|
5531
|
-
console.log(indent + name);
|
|
5532
|
-
}
|
|
5533
|
-
|
|
5534
|
-
if (endIndex < allEntries.length) {
|
|
5535
|
-
console.log('More than ' + limit + ' entries found');
|
|
5536
|
-
}
|
|
5537
|
-
"`;
|
|
5538
|
-
}
|
|
5539
5615
|
const TAB_WIDTH = 4;
|
|
5540
5616
|
const COMMENT_PREFIXES = [
|
|
5541
5617
|
'#',
|
|
@@ -5918,7 +5994,7 @@ try {
|
|
|
5918
5994
|
* @param offset - 1-indexed entry number to start from (default: 1)
|
|
5919
5995
|
* @param limit - Maximum number of entries to return (default: 25)
|
|
5920
5996
|
* @param depth - Maximum depth to traverse (default: 2)
|
|
5921
|
-
* @returns
|
|
5997
|
+
* @returns Directory tree whose entries are relative to the sandbox working directory
|
|
5922
5998
|
*/ async listDir(dirPath, offset = 1, limit = 25, depth = 2) {
|
|
5923
5999
|
if (offset < 1) {
|
|
5924
6000
|
return 'Error: offset must be a 1-indexed entry number';
|
|
@@ -5929,10 +6005,11 @@ try {
|
|
|
5929
6005
|
if (depth < 1) {
|
|
5930
6006
|
return 'Error: depth must be greater than zero';
|
|
5931
6007
|
}
|
|
5932
|
-
const
|
|
6008
|
+
const displayPath = workspaceRelativeDisplayPath(this.workingDirectory, dirPath);
|
|
6009
|
+
const command = buildListDirCommand(dirPath, displayPath, offset, limit, depth);
|
|
5933
6010
|
const result = await this.executeOperation(command, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS);
|
|
5934
6011
|
if (result.exitCode !== 0) {
|
|
5935
|
-
return result.output || `Error: Failed to list directory '${
|
|
6012
|
+
return result.output || `Error: Failed to list directory '${displayPath}'`;
|
|
5936
6013
|
}
|
|
5937
6014
|
return result.output;
|
|
5938
6015
|
}
|
|
@@ -5981,16 +6058,19 @@ try {
|
|
|
5981
6058
|
return matches;
|
|
5982
6059
|
}
|
|
5983
6060
|
/**
|
|
5984
|
-
* Search file contents for a regex pattern, returning
|
|
5985
|
-
*/ async grep(pattern, path =
|
|
5986
|
-
const
|
|
6061
|
+
* Search file contents for a regex pattern, returning workspace-relative path labels.
|
|
6062
|
+
*/ async grep(pattern, path = this.workingDirectory, include = null) {
|
|
6063
|
+
const displayPath = workspaceRelativeDisplayPath(this.workingDirectory, path);
|
|
6064
|
+
const result = await this.grepRaw(pattern, resolve(this.workingDirectory, displayPath), include);
|
|
5987
6065
|
if (typeof result === 'string') {
|
|
5988
6066
|
return result;
|
|
5989
6067
|
}
|
|
5990
6068
|
if (result.length === 0) {
|
|
5991
6069
|
return 'No matches found';
|
|
5992
6070
|
}
|
|
5993
|
-
return formatGrepOutput(result)
|
|
6071
|
+
return formatGrepOutput(result.map((match)=>_extends({}, match, {
|
|
6072
|
+
path: workspaceRelativeDisplayPath(this.workingDirectory, match.path)
|
|
6073
|
+
})));
|
|
5994
6074
|
}
|
|
5995
6075
|
/**
|
|
5996
6076
|
* Structured glob matching returning FileInfo objects.
|
|
@@ -6015,13 +6095,17 @@ try {
|
|
|
6015
6095
|
return infos;
|
|
6016
6096
|
}
|
|
6017
6097
|
/**
|
|
6018
|
-
* Find files matching a glob pattern, returning
|
|
6019
|
-
*/ async glob(pattern, path =
|
|
6020
|
-
const
|
|
6098
|
+
* Find files matching a glob pattern, returning workspace-relative paths.
|
|
6099
|
+
*/ async glob(pattern, path = this.workingDirectory) {
|
|
6100
|
+
const displayPath = workspaceRelativeDisplayPath(this.workingDirectory, path);
|
|
6101
|
+
const searchPath = resolve(this.workingDirectory, displayPath);
|
|
6102
|
+
const files = await this.globInfo(pattern, searchPath);
|
|
6021
6103
|
if (files.length === 0) {
|
|
6022
6104
|
return 'No files found';
|
|
6023
6105
|
}
|
|
6024
|
-
return formatGlobOutput(files)
|
|
6106
|
+
return formatGlobOutput(files.map((file)=>_extends({}, file, {
|
|
6107
|
+
path: workspaceRelativeDisplayPath(this.workingDirectory, resolve(searchPath, file.path))
|
|
6108
|
+
})));
|
|
6025
6109
|
}
|
|
6026
6110
|
/**
|
|
6027
6111
|
* Create a new file with content.
|
|
@@ -6812,11 +6896,15 @@ ArtifactPresentationRegistry = __decorate([
|
|
|
6812
6896
|
collection: z.object({
|
|
6813
6897
|
allowCopy: z.boolean()
|
|
6814
6898
|
}).strict().optional(),
|
|
6899
|
+
versioning: z.object({
|
|
6900
|
+
mode: z.literal('draft-only')
|
|
6901
|
+
}).strict().optional(),
|
|
6815
6902
|
content: z.object({
|
|
6816
6903
|
mimeTypes: z.array(z.string().min(1)).min(1),
|
|
6817
6904
|
maxBytes: z.number().int().positive()
|
|
6818
6905
|
}).strict().optional(),
|
|
6819
6906
|
sharing: z.object({
|
|
6907
|
+
projectAccess: z.literal('link-audience').optional(),
|
|
6820
6908
|
accessModes: z.array(z.enum([
|
|
6821
6909
|
'owner_only',
|
|
6822
6910
|
'workspace_all',
|
|
@@ -6842,7 +6930,13 @@ ArtifactPresentationRegistry = __decorate([
|
|
|
6842
6930
|
'authenticated'
|
|
6843
6931
|
])
|
|
6844
6932
|
}).strict()
|
|
6845
|
-
}).strict()
|
|
6933
|
+
}).strict().refine((definition)=>{
|
|
6934
|
+
var _definition_sharing;
|
|
6935
|
+
return ((_definition_sharing = definition.sharing) == null ? void 0 : _definition_sharing.projectAccess) !== 'link-audience' || definition.presentation.mode === 'authenticated' && definition.sharing.accessModes.every((mode)=>[
|
|
6936
|
+
'organization_all',
|
|
6937
|
+
'workspace_all'
|
|
6938
|
+
].includes(mode));
|
|
6939
|
+
}, 'Project link audiences require authenticated organization or workspace sharing');
|
|
6846
6940
|
|
|
6847
6941
|
const artifactTypeKey = (type)=>JSON.stringify([
|
|
6848
6942
|
type.pluginName,
|
|
@@ -11248,4 +11342,4 @@ Reflect.defineMetadata('__command__', {
|
|
|
11248
11342
|
id: ImportDefaultAgentPluginsCommand.type
|
|
11249
11343
|
}, ImportDefaultAgentPluginsCommand);
|
|
11250
11344
|
|
|
11251
|
-
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_PROCESS_SUPERVISOR, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ANALYTICS_PROVIDER, ARTIFACT_PRESENTATION_PROVIDER, ARTIFACT_TYPE_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeDeploymentCapability, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsDefinitionAuthoringCapability, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, ArtifactPresentationProvider, ArtifactPresentationRegistry, ArtifactTypeProvider, ArtifactTypeRegistry, 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, CONTENT_RESOURCE_PROVIDER, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorDocumentsRuntimeCapability, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, ContentDocumentsRuntimeCapability, ContentEditorProvider, ContentEditorRegistry, ContentEditorsRuntimeCapability, ContentReferencesRuntimeCapability, ContentResourceProvider, ContentResourceProviderRegistry, ContentResourcesRuntimeCapability, 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, ExecutionObservabilityRuntimeCapability, FILE_ARTIFACT_TYPE, 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, ListAnalyticsSourcesCommand, 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, ResolveAnalyticsSourceCommand, 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, agentRuntimeDeploymentSpecSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyAssistantMiddleware, applyModelConfiguration, applyModelContextSize, artifactPresentationKey, artifactTypeKey, 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, hasAssistantMiddleware, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isExecutionObservationSession, isFileContentEditor, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isResourceContentEditor, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, isTextContentEditor, jsonEncodedSchema, knowledgebaseActions, loadYamlFile, managedAgentRuntimeSchema, 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, supportsContentModel, taskWaitReason, textTokenBoundaries, validateAnalyticsPayload };
|
|
11345
|
+
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_PROCESS_SUPERVISOR, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ANALYTICS_PROVIDER, ARTIFACT_PRESENTATION_PROVIDER, ARTIFACT_TYPE_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeDeploymentCapability, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsDefinitionAuthoringCapability, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, ArtifactPresentationProvider, ArtifactPresentationRegistry, ArtifactTypeProvider, ArtifactTypeRegistry, 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, CONTENT_RESOURCE_PROVIDER, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorDocumentsRuntimeCapability, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, ContentDocumentsRuntimeCapability, ContentEditorProvider, ContentEditorRegistry, ContentEditorsRuntimeCapability, ContentReferencesRuntimeCapability, ContentResourceProvider, ContentResourceProviderRegistry, ContentResourcesRuntimeCapability, 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, ExecutionObservabilityRuntimeCapability, FILE_ARTIFACT_TYPE, 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, ListAnalyticsSourcesCommand, 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, OpenAICompatibleEmbeddings, 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, ResolveAnalyticsSourceCommand, 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, agentRuntimeDeploymentSpecSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyAssistantMiddleware, applyModelConfiguration, applyModelContextSize, artifactPresentationKey, artifactTypeKey, 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, hasAssistantMiddleware, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isExecutionObservationSession, isFileContentEditor, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isResourceContentEditor, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, isTextContentEditor, jsonEncodedSchema, knowledgebaseActions, loadYamlFile, managedAgentRuntimeSchema, 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, supportsContentModel, taskWaitReason, textTokenBoundaries, validateAnalyticsPayload };
|
package/model-provider.cjs.js
CHANGED
|
@@ -206,6 +206,10 @@ const ArtifactDraftsRuntimeCapability = createRuntimeCapability('platform.artifa
|
|
|
206
206
|
description: 'Persist working copies with optimistic concurrency; atomically publish a confirmed revision as an immutable Artifact version.'
|
|
207
207
|
});
|
|
208
208
|
|
|
209
|
+
const ArtifactContentRuntimeCapability = createRuntimeCapability('platform.artifact-content', {
|
|
210
|
+
description: 'Store Artifact content outside ordinary workspace files and authorize reads against its published version or draft.'
|
|
211
|
+
});
|
|
212
|
+
|
|
209
213
|
/** Stable source identifier for portable workspace file references. */ const WORKSPACE_FILES_SOURCE = 'platform.workspace.files';
|
|
210
214
|
const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.workspace.files', {
|
|
211
215
|
description: 'Upload, understand, search parsed chunks, resolve, read, and delete files in Xpert workspace volumes.'
|
|
@@ -294,6 +298,10 @@ const RestClientRuntimeCapability = createRuntimeCapability('platform.rest.clien
|
|
|
294
298
|
});
|
|
295
299
|
|
|
296
300
|
/** Portable Agent input; filesystem containment and authorization remain with the host. */ const workspaceRelativeFilePathSchema = v3.z.string().min(1).max(1024).refine((value)=>!/[\\\x00-\x1f\x7f]/.test(value) && !/^[A-Za-z]:/.test(value) && value.split('/').every((part)=>part.length > 0 && part === part.trim() && part !== '.' && part !== '..'), 'Use a workspace-relative file path with non-empty segments; no absolute paths, traversal or surrounding whitespace.');
|
|
301
|
+
/** Directory discovery also accepts the workspace root and a trailing directory slash. */ const workspaceRelativeDirectoryPathSchema = v3.z.string().transform((value)=>value.endsWith('/') ? value.slice(0, -1) : value).pipe(v3.z.union([
|
|
302
|
+
v3.z.literal('.'),
|
|
303
|
+
workspaceRelativeFilePathSchema
|
|
304
|
+
]));
|
|
297
305
|
/** Host-owned metadata lets plugins observe file intent without guessing tool names. */ const workspaceFileMutationMetadata = {
|
|
298
306
|
workspaceFileOperation: {
|
|
299
307
|
type: 'mutation',
|
|
@@ -429,6 +437,7 @@ function normalizeWorkspaceScope(scope) {
|
|
|
429
437
|
|
|
430
438
|
exports.ActorTokenRuntimeCapability = ActorTokenRuntimeCapability;
|
|
431
439
|
exports.ActorTokenRuntimeFactoryCapability = ActorTokenRuntimeFactoryCapability;
|
|
440
|
+
exports.ArtifactContentRuntimeCapability = ArtifactContentRuntimeCapability;
|
|
432
441
|
exports.ArtifactDraftsRuntimeCapability = ArtifactDraftsRuntimeCapability;
|
|
433
442
|
exports.ArtifactLibraryRuntimeCapability = ArtifactLibraryRuntimeCapability;
|
|
434
443
|
exports.ArtifactsRuntimeCapability = ArtifactsRuntimeCapability;
|
|
@@ -459,4 +468,5 @@ exports.createRuntimeCapability = createRuntimeCapability;
|
|
|
459
468
|
exports.isSandboxJobRuntimeError = isSandboxJobRuntimeError;
|
|
460
469
|
exports.workspaceFileMutationMetadata = workspaceFileMutationMetadata;
|
|
461
470
|
exports.workspaceFileMutationPath = workspaceFileMutationPath;
|
|
471
|
+
exports.workspaceRelativeDirectoryPathSchema = workspaceRelativeDirectoryPathSchema;
|
|
462
472
|
exports.workspaceRelativeFilePathSchema = workspaceRelativeFilePathSchema;
|
package/model-provider.esm.js
CHANGED
|
@@ -204,6 +204,10 @@ const ArtifactDraftsRuntimeCapability = createRuntimeCapability('platform.artifa
|
|
|
204
204
|
description: 'Persist working copies with optimistic concurrency; atomically publish a confirmed revision as an immutable Artifact version.'
|
|
205
205
|
});
|
|
206
206
|
|
|
207
|
+
const ArtifactContentRuntimeCapability = createRuntimeCapability('platform.artifact-content', {
|
|
208
|
+
description: 'Store Artifact content outside ordinary workspace files and authorize reads against its published version or draft.'
|
|
209
|
+
});
|
|
210
|
+
|
|
207
211
|
/** Stable source identifier for portable workspace file references. */ const WORKSPACE_FILES_SOURCE = 'platform.workspace.files';
|
|
208
212
|
const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.workspace.files', {
|
|
209
213
|
description: 'Upload, understand, search parsed chunks, resolve, read, and delete files in Xpert workspace volumes.'
|
|
@@ -292,6 +296,10 @@ const RestClientRuntimeCapability = createRuntimeCapability('platform.rest.clien
|
|
|
292
296
|
});
|
|
293
297
|
|
|
294
298
|
/** Portable Agent input; filesystem containment and authorization remain with the host. */ const workspaceRelativeFilePathSchema = z.string().min(1).max(1024).refine((value)=>!/[\\\x00-\x1f\x7f]/.test(value) && !/^[A-Za-z]:/.test(value) && value.split('/').every((part)=>part.length > 0 && part === part.trim() && part !== '.' && part !== '..'), 'Use a workspace-relative file path with non-empty segments; no absolute paths, traversal or surrounding whitespace.');
|
|
299
|
+
/** Directory discovery also accepts the workspace root and a trailing directory slash. */ const workspaceRelativeDirectoryPathSchema = z.string().transform((value)=>value.endsWith('/') ? value.slice(0, -1) : value).pipe(z.union([
|
|
300
|
+
z.literal('.'),
|
|
301
|
+
workspaceRelativeFilePathSchema
|
|
302
|
+
]));
|
|
295
303
|
/** Host-owned metadata lets plugins observe file intent without guessing tool names. */ const workspaceFileMutationMetadata = {
|
|
296
304
|
workspaceFileOperation: {
|
|
297
305
|
type: 'mutation',
|
|
@@ -425,4 +433,4 @@ function normalizeWorkspaceScope(scope) {
|
|
|
425
433
|
} : {});
|
|
426
434
|
}
|
|
427
435
|
|
|
428
|
-
export { ActorTokenRuntimeCapability as A, BuiltinToolset as B, DefaultRuntimeCapabilityRegistry as D, ModelProviderBuiltinToolset as M, ProjectAccessRuntimeCapability as P, RUNTIME_CAPABILITY_PROVIDER as R, SANDBOX_JOB_ERROR_CODES as S, ToolImagesRuntimeCapability as T, WorkspaceFilesRuntimeCapability as W, XPERT_RUNTIME_CAPABILITIES_TOKEN as X, ActorTokenRuntimeFactoryCapability as a,
|
|
436
|
+
export { ActorTokenRuntimeCapability as A, BuiltinToolset as B, DefaultRuntimeCapabilityRegistry as D, ModelProviderBuiltinToolset as M, ProjectAccessRuntimeCapability as P, RUNTIME_CAPABILITY_PROVIDER as R, SANDBOX_JOB_ERROR_CODES as S, ToolImagesRuntimeCapability as T, WorkspaceFilesRuntimeCapability as W, XPERT_RUNTIME_CAPABILITIES_TOKEN as X, ActorTokenRuntimeFactoryCapability as a, ArtifactContentRuntimeCapability as b, createRuntimeCapability as c, ArtifactDraftsRuntimeCapability as d, ArtifactLibraryRuntimeCapability as e, ArtifactsRuntimeCapability as f, AssistantMiddlewareAccessRuntimeCapability as g, BaseTool as h, BaseToolset as i, McpClientRuntimeCapability as j, ProjectFilesRuntimeCapability as k, ProjectKnowledgeRuntimeCapability as l, ProjectProvisioningRuntimeCapability as m, RestClientRuntimeCapability as n, RuntimeCapabilityProvider as o, SANDBOX_JOB_INVOCATION_PREFIX as p, SANDBOX_JOB_PROGRESS_PREFIX as q, SandboxJobRuntimeError as r, SandboxJobsRuntimeCapability as s, WORKSPACE_FILES_SOURCE as t, isSandboxJobRuntimeError as u, workspaceFileMutationPath as v, workspaceFileMutationMetadata as w, workspaceRelativeDirectoryPathSchema as x, workspaceRelativeFilePathSchema as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/plugin-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@langchain/openai": "0.6.9",
|
|
77
|
-
"@xpert-ai/contracts": "3.
|
|
77
|
+
"@xpert-ai/contracts": "3.30.0",
|
|
78
78
|
"express": "^4.22.1",
|
|
79
79
|
"js-tiktoken": "^1.0.21"
|
|
80
80
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OpenAIEmbeddings } from '@langchain/openai';
|
|
2
|
+
import type { TChatModelOptions } from '../types/model';
|
|
3
|
+
/** OpenAI-compatible embeddings with authoritative, per-request usage callbacks. */
|
|
4
|
+
export declare class OpenAICompatibleEmbeddings extends OpenAIEmbeddings {
|
|
5
|
+
private readonly usageCallbacks?;
|
|
6
|
+
constructor(input: ConstructorParameters<typeof OpenAIEmbeddings>[0], usageCallbacks?: Pick<TChatModelOptions, 'handleModelUsage' | 'resolveUsagePricingSnapshot'>);
|
|
7
|
+
protected embeddingWithRetry(request: Parameters<OpenAIEmbeddings['embeddingWithRetry']>[0]): ReturnType<OpenAIEmbeddings['embeddingWithRetry']>;
|
|
8
|
+
}
|
|
@@ -7,7 +7,7 @@ export interface ArtifactDocumentHostOptions<T> {
|
|
|
7
7
|
html: string;
|
|
8
8
|
/** Exact packaged bytes pinned to this Artifact version, never URLs or library names from the document. */
|
|
9
9
|
dependencies?: ArtifactDocumentDependencyAsset[];
|
|
10
|
-
/**
|
|
10
|
+
/** Trusted resource policy; unrestricted mode permits networking. Omit to block external resources. */
|
|
11
11
|
networkPolicy?: ArtifactDocumentNetworkPolicy;
|
|
12
12
|
/** Public binding IDs and presentation defaults for this document generation. */
|
|
13
13
|
context: ArtifactDocumentContext;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
2
|
export declare const artifactDocumentNetworkPolicy: z.ZodObject<{
|
|
3
|
+
mode: z.ZodOptional<z.ZodEnum<["restricted", "unrestricted"]>>;
|
|
3
4
|
scripts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
4
5
|
styles: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
5
6
|
fonts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
6
7
|
images: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
7
8
|
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
mode?: "restricted" | "unrestricted";
|
|
8
10
|
scripts?: string[];
|
|
9
11
|
styles?: string[];
|
|
10
12
|
fonts?: string[];
|
|
11
13
|
images?: string[];
|
|
12
14
|
}, {
|
|
15
|
+
mode?: "restricted" | "unrestricted";
|
|
13
16
|
scripts?: string[];
|
|
14
17
|
styles?: string[];
|
|
15
18
|
fonts?: string[];
|