@eigenpal/cli 0.10.35 → 0.10.37
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/dist/cli.js +2930 -316
- package/dist/skill/reference/step-types.md +25 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17245,8 +17245,148 @@ var init_provider_logo_data_generated = __esm(() => {
|
|
|
17245
17245
|
};
|
|
17246
17246
|
});
|
|
17247
17247
|
|
|
17248
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17249
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17250
|
+
|
|
17251
|
+
// ../../node_modules/nanoid/index.js
|
|
17252
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
17253
|
+
function fillPool(bytes) {
|
|
17254
|
+
if (!pool || pool.length < bytes) {
|
|
17255
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17256
|
+
crypto.getRandomValues(pool);
|
|
17257
|
+
poolOffset = 0;
|
|
17258
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
17259
|
+
crypto.getRandomValues(pool);
|
|
17260
|
+
poolOffset = 0;
|
|
17261
|
+
}
|
|
17262
|
+
poolOffset += bytes;
|
|
17263
|
+
}
|
|
17264
|
+
function nanoid3(size = 21) {
|
|
17265
|
+
fillPool(size |= 0);
|
|
17266
|
+
let id = "";
|
|
17267
|
+
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17268
|
+
id += urlAlphabet[pool[i] & 63];
|
|
17269
|
+
}
|
|
17270
|
+
return id;
|
|
17271
|
+
}
|
|
17272
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17273
|
+
var init_nanoid = () => {};
|
|
17274
|
+
|
|
17275
|
+
// ../types/src/core/common.ts
|
|
17276
|
+
function generateId(prefix) {
|
|
17277
|
+
const id = nanoid3();
|
|
17278
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
17279
|
+
}
|
|
17280
|
+
function toJsonSchema(schema) {
|
|
17281
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17282
|
+
}
|
|
17283
|
+
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17284
|
+
var init_common = __esm(() => {
|
|
17285
|
+
init_nanoid();
|
|
17286
|
+
init_zod();
|
|
17287
|
+
ID_PREFIXES = {
|
|
17288
|
+
WORKFLOW: "wf",
|
|
17289
|
+
WORKFLOW_VERSION: "wfv",
|
|
17290
|
+
WORKFLOW_HISTORY: "wfh",
|
|
17291
|
+
JOB: "job",
|
|
17292
|
+
EXECUTION: "exec",
|
|
17293
|
+
STEP_EXECUTION: "step",
|
|
17294
|
+
FILE: "file",
|
|
17295
|
+
TEMPLATE: "tmpl",
|
|
17296
|
+
USER: "user",
|
|
17297
|
+
TENANT: "org",
|
|
17298
|
+
TENANT_INVITE: "inv",
|
|
17299
|
+
API_KEY: "eig",
|
|
17300
|
+
PROCESSOR: "proc",
|
|
17301
|
+
AI_PROVIDER: "aip",
|
|
17302
|
+
ACCOUNT: "acct",
|
|
17303
|
+
SESSION: "sess",
|
|
17304
|
+
VERIFICATION: "vrf",
|
|
17305
|
+
DATASET: "ds",
|
|
17306
|
+
DATASET_EXAMPLE: "dex",
|
|
17307
|
+
EXPERIMENT: "exp",
|
|
17308
|
+
EXPERIMENT_RUN: "exr",
|
|
17309
|
+
EXPERIMENT_EVALUATION: "evl",
|
|
17310
|
+
EVAL_EXAMPLE: "evx",
|
|
17311
|
+
EVAL_RESULT: "evr",
|
|
17312
|
+
EVAL_BATCH: "evb",
|
|
17313
|
+
RUN_REVIEW: "rev",
|
|
17314
|
+
RUN_REVIEW_CORRECTION: "rvc",
|
|
17315
|
+
TABLE_ROW: "row",
|
|
17316
|
+
FOLDER: "fldr",
|
|
17317
|
+
AGENT_WORKFLOW: "awf",
|
|
17318
|
+
AGENT_EXECUTION: "aex",
|
|
17319
|
+
AGENT_EXAMPLE: "aeg",
|
|
17320
|
+
AGENT_VERSION: "avr",
|
|
17321
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17322
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17323
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17324
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17325
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17326
|
+
FILE_SOURCE_CONFIG: "fsc",
|
|
17327
|
+
WEBHOOK_ENDPOINT: "whep",
|
|
17328
|
+
WEBHOOK_EVENT: "whev",
|
|
17329
|
+
WEBHOOK_DELIVERY: "whdl",
|
|
17330
|
+
WEBHOOK_ATTEMPT: "what",
|
|
17331
|
+
PAID_ALLOWANCE_GRANT: "pag",
|
|
17332
|
+
PAID_ALLOWANCE_ADJUSTMENT: "paa",
|
|
17333
|
+
OCR_EXTRACTION_PIPELINE: "oep",
|
|
17334
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17335
|
+
};
|
|
17336
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17337
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17338
|
+
});
|
|
17339
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17340
|
+
BaseEntitySchema = exports_external.object({
|
|
17341
|
+
id: exports_external.string(),
|
|
17342
|
+
createdAt: TimestampSchema.optional(),
|
|
17343
|
+
updatedAt: TimestampSchema.optional()
|
|
17344
|
+
});
|
|
17345
|
+
});
|
|
17346
|
+
|
|
17347
|
+
// ../types/src/core/ids.ts
|
|
17348
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17349
|
+
var init_ids = __esm(() => {
|
|
17350
|
+
PROCESSOR_IDS = {
|
|
17351
|
+
MERGE: "builtin/merge",
|
|
17352
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17353
|
+
EXTRACT: "builtin/extract",
|
|
17354
|
+
SPLIT: "builtin/split",
|
|
17355
|
+
SEGMENT: "builtin/segment",
|
|
17356
|
+
CLASSIFY: "builtin/classify",
|
|
17357
|
+
CLASSIFY_PAGES: "builtin/classify-pages",
|
|
17358
|
+
VISION: "builtin/vision",
|
|
17359
|
+
TEMPLATE: "builtin/template",
|
|
17360
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17361
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17362
|
+
};
|
|
17363
|
+
PARSER_IDS = {
|
|
17364
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17365
|
+
OCR: "builtin/ocr",
|
|
17366
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17367
|
+
};
|
|
17368
|
+
INPUT_KINDS = {
|
|
17369
|
+
DOCUMENT: "document",
|
|
17370
|
+
PAYLOAD: "payload"
|
|
17371
|
+
};
|
|
17372
|
+
});
|
|
17373
|
+
|
|
17374
|
+
// ../types/src/core/pagination.ts
|
|
17375
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17376
|
+
var init_pagination = __esm(() => {
|
|
17377
|
+
init_zod();
|
|
17378
|
+
PaginationParamsSchema = exports_external.object({
|
|
17379
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17380
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17381
|
+
});
|
|
17382
|
+
});
|
|
17383
|
+
|
|
17248
17384
|
// ../types/src/core/index.ts
|
|
17249
|
-
var init_core3 = () => {
|
|
17385
|
+
var init_core3 = __esm(() => {
|
|
17386
|
+
init_common();
|
|
17387
|
+
init_ids();
|
|
17388
|
+
init_pagination();
|
|
17389
|
+
});
|
|
17250
17390
|
|
|
17251
17391
|
// ../types/src/files/legacy-boundary.ts
|
|
17252
17392
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17271,6 +17411,9 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17271
17411
|
function isRuntimeFileRef(input) {
|
|
17272
17412
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17273
17413
|
}
|
|
17414
|
+
function isFilePathDescriptor(input) {
|
|
17415
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17416
|
+
}
|
|
17274
17417
|
function isResolvedProcessorFile(input) {
|
|
17275
17418
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17276
17419
|
}
|
|
@@ -17493,11 +17636,2508 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17493
17636
|
]);
|
|
17494
17637
|
});
|
|
17495
17638
|
|
|
17639
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17640
|
+
var require_version = __commonJS((exports) => {
|
|
17641
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17642
|
+
exports.VERSION = undefined;
|
|
17643
|
+
exports.VERSION = "1.9.1";
|
|
17644
|
+
});
|
|
17645
|
+
|
|
17646
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17647
|
+
var require_semver = __commonJS((exports) => {
|
|
17648
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17649
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17650
|
+
var version_1 = require_version();
|
|
17651
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17652
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17653
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17654
|
+
const rejectedVersions = new Set;
|
|
17655
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17656
|
+
if (!myVersionMatch) {
|
|
17657
|
+
return () => false;
|
|
17658
|
+
}
|
|
17659
|
+
const ownVersionParsed = {
|
|
17660
|
+
major: +myVersionMatch[1],
|
|
17661
|
+
minor: +myVersionMatch[2],
|
|
17662
|
+
patch: +myVersionMatch[3],
|
|
17663
|
+
prerelease: myVersionMatch[4]
|
|
17664
|
+
};
|
|
17665
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17666
|
+
return function isExactmatch(globalVersion) {
|
|
17667
|
+
return globalVersion === ownVersion;
|
|
17668
|
+
};
|
|
17669
|
+
}
|
|
17670
|
+
function _reject(v) {
|
|
17671
|
+
rejectedVersions.add(v);
|
|
17672
|
+
return false;
|
|
17673
|
+
}
|
|
17674
|
+
function _accept(v) {
|
|
17675
|
+
acceptedVersions.add(v);
|
|
17676
|
+
return true;
|
|
17677
|
+
}
|
|
17678
|
+
return function isCompatible(globalVersion) {
|
|
17679
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17680
|
+
return true;
|
|
17681
|
+
}
|
|
17682
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17683
|
+
return false;
|
|
17684
|
+
}
|
|
17685
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17686
|
+
if (!globalVersionMatch) {
|
|
17687
|
+
return _reject(globalVersion);
|
|
17688
|
+
}
|
|
17689
|
+
const globalVersionParsed = {
|
|
17690
|
+
major: +globalVersionMatch[1],
|
|
17691
|
+
minor: +globalVersionMatch[2],
|
|
17692
|
+
patch: +globalVersionMatch[3],
|
|
17693
|
+
prerelease: globalVersionMatch[4]
|
|
17694
|
+
};
|
|
17695
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17696
|
+
return _reject(globalVersion);
|
|
17697
|
+
}
|
|
17698
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17699
|
+
return _reject(globalVersion);
|
|
17700
|
+
}
|
|
17701
|
+
if (ownVersionParsed.major === 0) {
|
|
17702
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17703
|
+
return _accept(globalVersion);
|
|
17704
|
+
}
|
|
17705
|
+
return _reject(globalVersion);
|
|
17706
|
+
}
|
|
17707
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17708
|
+
return _accept(globalVersion);
|
|
17709
|
+
}
|
|
17710
|
+
return _reject(globalVersion);
|
|
17711
|
+
};
|
|
17712
|
+
}
|
|
17713
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17714
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17715
|
+
});
|
|
17716
|
+
|
|
17717
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17718
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17719
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17720
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17721
|
+
var version_1 = require_version();
|
|
17722
|
+
var semver_1 = require_semver();
|
|
17723
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17724
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17725
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17726
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17727
|
+
var _a3;
|
|
17728
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17729
|
+
version: version_1.VERSION
|
|
17730
|
+
};
|
|
17731
|
+
if (!allowOverride && api2[type]) {
|
|
17732
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17733
|
+
diag.error(err.stack || err.message);
|
|
17734
|
+
return false;
|
|
17735
|
+
}
|
|
17736
|
+
if (api2.version !== version_1.VERSION) {
|
|
17737
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17738
|
+
diag.error(err.stack || err.message);
|
|
17739
|
+
return false;
|
|
17740
|
+
}
|
|
17741
|
+
api2[type] = instance;
|
|
17742
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17743
|
+
return true;
|
|
17744
|
+
}
|
|
17745
|
+
exports.registerGlobal = registerGlobal;
|
|
17746
|
+
function getGlobal(type) {
|
|
17747
|
+
var _a3, _b;
|
|
17748
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17749
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17750
|
+
return;
|
|
17751
|
+
}
|
|
17752
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17753
|
+
}
|
|
17754
|
+
exports.getGlobal = getGlobal;
|
|
17755
|
+
function unregisterGlobal(type, diag) {
|
|
17756
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17757
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17758
|
+
if (api2) {
|
|
17759
|
+
delete api2[type];
|
|
17760
|
+
}
|
|
17761
|
+
}
|
|
17762
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17763
|
+
});
|
|
17764
|
+
|
|
17765
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17766
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17767
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17768
|
+
exports.DiagComponentLogger = undefined;
|
|
17769
|
+
var global_utils_1 = require_global_utils();
|
|
17770
|
+
|
|
17771
|
+
class DiagComponentLogger {
|
|
17772
|
+
constructor(props) {
|
|
17773
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17774
|
+
}
|
|
17775
|
+
debug(...args) {
|
|
17776
|
+
return logProxy("debug", this._namespace, args);
|
|
17777
|
+
}
|
|
17778
|
+
error(...args) {
|
|
17779
|
+
return logProxy("error", this._namespace, args);
|
|
17780
|
+
}
|
|
17781
|
+
info(...args) {
|
|
17782
|
+
return logProxy("info", this._namespace, args);
|
|
17783
|
+
}
|
|
17784
|
+
warn(...args) {
|
|
17785
|
+
return logProxy("warn", this._namespace, args);
|
|
17786
|
+
}
|
|
17787
|
+
verbose(...args) {
|
|
17788
|
+
return logProxy("verbose", this._namespace, args);
|
|
17789
|
+
}
|
|
17790
|
+
}
|
|
17791
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17792
|
+
function logProxy(funcName, namespace, args) {
|
|
17793
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17794
|
+
if (!logger) {
|
|
17795
|
+
return;
|
|
17796
|
+
}
|
|
17797
|
+
return logger[funcName](namespace, ...args);
|
|
17798
|
+
}
|
|
17799
|
+
});
|
|
17800
|
+
|
|
17801
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17802
|
+
var require_types = __commonJS((exports) => {
|
|
17803
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17804
|
+
exports.DiagLogLevel = undefined;
|
|
17805
|
+
var DiagLogLevel;
|
|
17806
|
+
(function(DiagLogLevel2) {
|
|
17807
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17808
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17809
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17810
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17811
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17812
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17813
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17814
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17815
|
+
});
|
|
17816
|
+
|
|
17817
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17818
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17819
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17820
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17821
|
+
var types_1 = require_types();
|
|
17822
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17823
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17824
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17825
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17826
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17827
|
+
}
|
|
17828
|
+
logger = logger || {};
|
|
17829
|
+
function _filterFunc(funcName, theLevel) {
|
|
17830
|
+
const theFunc = logger[funcName];
|
|
17831
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17832
|
+
return theFunc.bind(logger);
|
|
17833
|
+
}
|
|
17834
|
+
return function() {};
|
|
17835
|
+
}
|
|
17836
|
+
return {
|
|
17837
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17838
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17839
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17840
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17841
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17842
|
+
};
|
|
17843
|
+
}
|
|
17844
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17845
|
+
});
|
|
17846
|
+
|
|
17847
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17848
|
+
var require_diag = __commonJS((exports) => {
|
|
17849
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17850
|
+
exports.DiagAPI = undefined;
|
|
17851
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17852
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17853
|
+
var types_1 = require_types();
|
|
17854
|
+
var global_utils_1 = require_global_utils();
|
|
17855
|
+
var API_NAME = "diag";
|
|
17856
|
+
|
|
17857
|
+
class DiagAPI {
|
|
17858
|
+
static instance() {
|
|
17859
|
+
if (!this._instance) {
|
|
17860
|
+
this._instance = new DiagAPI;
|
|
17861
|
+
}
|
|
17862
|
+
return this._instance;
|
|
17863
|
+
}
|
|
17864
|
+
constructor() {
|
|
17865
|
+
function _logProxy(funcName) {
|
|
17866
|
+
return function(...args) {
|
|
17867
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17868
|
+
if (!logger)
|
|
17869
|
+
return;
|
|
17870
|
+
return logger[funcName](...args);
|
|
17871
|
+
};
|
|
17872
|
+
}
|
|
17873
|
+
const self2 = this;
|
|
17874
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17875
|
+
var _a3, _b, _c;
|
|
17876
|
+
if (logger === self2) {
|
|
17877
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17878
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17879
|
+
return false;
|
|
17880
|
+
}
|
|
17881
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17882
|
+
optionsOrLogLevel = {
|
|
17883
|
+
logLevel: optionsOrLogLevel
|
|
17884
|
+
};
|
|
17885
|
+
}
|
|
17886
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17887
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17888
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17889
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17890
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17891
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17892
|
+
}
|
|
17893
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17894
|
+
};
|
|
17895
|
+
self2.setLogger = setLogger;
|
|
17896
|
+
self2.disable = () => {
|
|
17897
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17898
|
+
};
|
|
17899
|
+
self2.createComponentLogger = (options) => {
|
|
17900
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17901
|
+
};
|
|
17902
|
+
self2.verbose = _logProxy("verbose");
|
|
17903
|
+
self2.debug = _logProxy("debug");
|
|
17904
|
+
self2.info = _logProxy("info");
|
|
17905
|
+
self2.warn = _logProxy("warn");
|
|
17906
|
+
self2.error = _logProxy("error");
|
|
17907
|
+
}
|
|
17908
|
+
}
|
|
17909
|
+
exports.DiagAPI = DiagAPI;
|
|
17910
|
+
});
|
|
17911
|
+
|
|
17912
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17913
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17914
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17915
|
+
exports.BaggageImpl = undefined;
|
|
17916
|
+
|
|
17917
|
+
class BaggageImpl {
|
|
17918
|
+
constructor(entries) {
|
|
17919
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17920
|
+
}
|
|
17921
|
+
getEntry(key) {
|
|
17922
|
+
const entry = this._entries.get(key);
|
|
17923
|
+
if (!entry) {
|
|
17924
|
+
return;
|
|
17925
|
+
}
|
|
17926
|
+
return Object.assign({}, entry);
|
|
17927
|
+
}
|
|
17928
|
+
getAllEntries() {
|
|
17929
|
+
return Array.from(this._entries.entries());
|
|
17930
|
+
}
|
|
17931
|
+
setEntry(key, entry) {
|
|
17932
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17933
|
+
newBaggage._entries.set(key, entry);
|
|
17934
|
+
return newBaggage;
|
|
17935
|
+
}
|
|
17936
|
+
removeEntry(key) {
|
|
17937
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17938
|
+
newBaggage._entries.delete(key);
|
|
17939
|
+
return newBaggage;
|
|
17940
|
+
}
|
|
17941
|
+
removeEntries(...keys) {
|
|
17942
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17943
|
+
for (const key of keys) {
|
|
17944
|
+
newBaggage._entries.delete(key);
|
|
17945
|
+
}
|
|
17946
|
+
return newBaggage;
|
|
17947
|
+
}
|
|
17948
|
+
clear() {
|
|
17949
|
+
return new BaggageImpl;
|
|
17950
|
+
}
|
|
17951
|
+
}
|
|
17952
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17953
|
+
});
|
|
17954
|
+
|
|
17955
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17956
|
+
var require_symbol = __commonJS((exports) => {
|
|
17957
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17958
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17959
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17960
|
+
});
|
|
17961
|
+
|
|
17962
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17963
|
+
var require_utils = __commonJS((exports) => {
|
|
17964
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17965
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17966
|
+
var diag_1 = require_diag();
|
|
17967
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17968
|
+
var symbol_1 = require_symbol();
|
|
17969
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17970
|
+
function createBaggage(entries = {}) {
|
|
17971
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17972
|
+
}
|
|
17973
|
+
exports.createBaggage = createBaggage;
|
|
17974
|
+
function baggageEntryMetadataFromString(str) {
|
|
17975
|
+
if (typeof str !== "string") {
|
|
17976
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17977
|
+
str = "";
|
|
17978
|
+
}
|
|
17979
|
+
return {
|
|
17980
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17981
|
+
toString() {
|
|
17982
|
+
return str;
|
|
17983
|
+
}
|
|
17984
|
+
};
|
|
17985
|
+
}
|
|
17986
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17987
|
+
});
|
|
17988
|
+
|
|
17989
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17990
|
+
var require_context = __commonJS((exports) => {
|
|
17991
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17992
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17993
|
+
function createContextKey(description) {
|
|
17994
|
+
return Symbol.for(description);
|
|
17995
|
+
}
|
|
17996
|
+
exports.createContextKey = createContextKey;
|
|
17997
|
+
|
|
17998
|
+
class BaseContext {
|
|
17999
|
+
constructor(parentContext) {
|
|
18000
|
+
const self2 = this;
|
|
18001
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
18002
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
18003
|
+
self2.setValue = (key, value) => {
|
|
18004
|
+
const context = new BaseContext(self2._currentContext);
|
|
18005
|
+
context._currentContext.set(key, value);
|
|
18006
|
+
return context;
|
|
18007
|
+
};
|
|
18008
|
+
self2.deleteValue = (key) => {
|
|
18009
|
+
const context = new BaseContext(self2._currentContext);
|
|
18010
|
+
context._currentContext.delete(key);
|
|
18011
|
+
return context;
|
|
18012
|
+
};
|
|
18013
|
+
}
|
|
18014
|
+
}
|
|
18015
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
18016
|
+
});
|
|
18017
|
+
|
|
18018
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
18019
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
18020
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18021
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
18022
|
+
var consoleMap = [
|
|
18023
|
+
{ n: "error", c: "error" },
|
|
18024
|
+
{ n: "warn", c: "warn" },
|
|
18025
|
+
{ n: "info", c: "info" },
|
|
18026
|
+
{ n: "debug", c: "debug" },
|
|
18027
|
+
{ n: "verbose", c: "trace" }
|
|
18028
|
+
];
|
|
18029
|
+
exports._originalConsoleMethods = {};
|
|
18030
|
+
if (typeof console !== "undefined") {
|
|
18031
|
+
const keys = [
|
|
18032
|
+
"error",
|
|
18033
|
+
"warn",
|
|
18034
|
+
"info",
|
|
18035
|
+
"debug",
|
|
18036
|
+
"trace",
|
|
18037
|
+
"log"
|
|
18038
|
+
];
|
|
18039
|
+
for (const key of keys) {
|
|
18040
|
+
if (typeof console[key] === "function") {
|
|
18041
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
18042
|
+
}
|
|
18043
|
+
}
|
|
18044
|
+
}
|
|
18045
|
+
|
|
18046
|
+
class DiagConsoleLogger {
|
|
18047
|
+
constructor() {
|
|
18048
|
+
function _consoleFunc(funcName) {
|
|
18049
|
+
return function(...args) {
|
|
18050
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
18051
|
+
if (typeof theFunc !== "function") {
|
|
18052
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
18053
|
+
}
|
|
18054
|
+
if (typeof theFunc !== "function" && console) {
|
|
18055
|
+
theFunc = console[funcName];
|
|
18056
|
+
if (typeof theFunc !== "function") {
|
|
18057
|
+
theFunc = console.log;
|
|
18058
|
+
}
|
|
18059
|
+
}
|
|
18060
|
+
if (typeof theFunc === "function") {
|
|
18061
|
+
return theFunc.apply(console, args);
|
|
18062
|
+
}
|
|
18063
|
+
};
|
|
18064
|
+
}
|
|
18065
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
18066
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
18067
|
+
}
|
|
18068
|
+
}
|
|
18069
|
+
}
|
|
18070
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
18071
|
+
});
|
|
18072
|
+
|
|
18073
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
18074
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
18075
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18076
|
+
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
18077
|
+
|
|
18078
|
+
class NoopMeter {
|
|
18079
|
+
constructor() {}
|
|
18080
|
+
createGauge(_name, _options) {
|
|
18081
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
18082
|
+
}
|
|
18083
|
+
createHistogram(_name, _options) {
|
|
18084
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
18085
|
+
}
|
|
18086
|
+
createCounter(_name, _options) {
|
|
18087
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
18088
|
+
}
|
|
18089
|
+
createUpDownCounter(_name, _options) {
|
|
18090
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
18091
|
+
}
|
|
18092
|
+
createObservableGauge(_name, _options) {
|
|
18093
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
18094
|
+
}
|
|
18095
|
+
createObservableCounter(_name, _options) {
|
|
18096
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
18097
|
+
}
|
|
18098
|
+
createObservableUpDownCounter(_name, _options) {
|
|
18099
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
18100
|
+
}
|
|
18101
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
18102
|
+
removeBatchObservableCallback(_callback) {}
|
|
18103
|
+
}
|
|
18104
|
+
exports.NoopMeter = NoopMeter;
|
|
18105
|
+
|
|
18106
|
+
class NoopMetric {
|
|
18107
|
+
}
|
|
18108
|
+
exports.NoopMetric = NoopMetric;
|
|
18109
|
+
|
|
18110
|
+
class NoopCounterMetric extends NoopMetric {
|
|
18111
|
+
add(_value, _attributes) {}
|
|
18112
|
+
}
|
|
18113
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
18114
|
+
|
|
18115
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
18116
|
+
add(_value, _attributes) {}
|
|
18117
|
+
}
|
|
18118
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
18119
|
+
|
|
18120
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
18121
|
+
record(_value, _attributes) {}
|
|
18122
|
+
}
|
|
18123
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
18124
|
+
|
|
18125
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
18126
|
+
record(_value, _attributes) {}
|
|
18127
|
+
}
|
|
18128
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
18129
|
+
|
|
18130
|
+
class NoopObservableMetric {
|
|
18131
|
+
addCallback(_callback) {}
|
|
18132
|
+
removeCallback(_callback) {}
|
|
18133
|
+
}
|
|
18134
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
18135
|
+
|
|
18136
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
18137
|
+
}
|
|
18138
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
18139
|
+
|
|
18140
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
18141
|
+
}
|
|
18142
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
18143
|
+
|
|
18144
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
18145
|
+
}
|
|
18146
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
18147
|
+
exports.NOOP_METER = new NoopMeter;
|
|
18148
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
18149
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
18150
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
18151
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
18152
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
18153
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
18154
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
18155
|
+
function createNoopMeter() {
|
|
18156
|
+
return exports.NOOP_METER;
|
|
18157
|
+
}
|
|
18158
|
+
exports.createNoopMeter = createNoopMeter;
|
|
18159
|
+
});
|
|
18160
|
+
|
|
18161
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
18162
|
+
var require_Metric = __commonJS((exports) => {
|
|
18163
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18164
|
+
exports.ValueType = undefined;
|
|
18165
|
+
var ValueType;
|
|
18166
|
+
(function(ValueType2) {
|
|
18167
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
18168
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
18169
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
18170
|
+
});
|
|
18171
|
+
|
|
18172
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
18173
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18174
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18175
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18176
|
+
exports.defaultTextMapGetter = {
|
|
18177
|
+
get(carrier, key) {
|
|
18178
|
+
if (carrier == null) {
|
|
18179
|
+
return;
|
|
18180
|
+
}
|
|
18181
|
+
return carrier[key];
|
|
18182
|
+
},
|
|
18183
|
+
keys(carrier) {
|
|
18184
|
+
if (carrier == null) {
|
|
18185
|
+
return [];
|
|
18186
|
+
}
|
|
18187
|
+
return Object.keys(carrier);
|
|
18188
|
+
}
|
|
18189
|
+
};
|
|
18190
|
+
exports.defaultTextMapSetter = {
|
|
18191
|
+
set(carrier, key, value) {
|
|
18192
|
+
if (carrier == null) {
|
|
18193
|
+
return;
|
|
18194
|
+
}
|
|
18195
|
+
carrier[key] = value;
|
|
18196
|
+
}
|
|
18197
|
+
};
|
|
18198
|
+
});
|
|
18199
|
+
|
|
18200
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18201
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
18202
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18203
|
+
exports.NoopContextManager = undefined;
|
|
18204
|
+
var context_1 = require_context();
|
|
18205
|
+
|
|
18206
|
+
class NoopContextManager {
|
|
18207
|
+
active() {
|
|
18208
|
+
return context_1.ROOT_CONTEXT;
|
|
18209
|
+
}
|
|
18210
|
+
with(_context, fn, thisArg, ...args) {
|
|
18211
|
+
return fn.call(thisArg, ...args);
|
|
18212
|
+
}
|
|
18213
|
+
bind(_context, target) {
|
|
18214
|
+
return target;
|
|
18215
|
+
}
|
|
18216
|
+
enable() {
|
|
18217
|
+
return this;
|
|
18218
|
+
}
|
|
18219
|
+
disable() {
|
|
18220
|
+
return this;
|
|
18221
|
+
}
|
|
18222
|
+
}
|
|
18223
|
+
exports.NoopContextManager = NoopContextManager;
|
|
18224
|
+
});
|
|
18225
|
+
|
|
18226
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18227
|
+
var require_context2 = __commonJS((exports) => {
|
|
18228
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18229
|
+
exports.ContextAPI = undefined;
|
|
18230
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
18231
|
+
var global_utils_1 = require_global_utils();
|
|
18232
|
+
var diag_1 = require_diag();
|
|
18233
|
+
var API_NAME = "context";
|
|
18234
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18235
|
+
|
|
18236
|
+
class ContextAPI {
|
|
18237
|
+
constructor() {}
|
|
18238
|
+
static getInstance() {
|
|
18239
|
+
if (!this._instance) {
|
|
18240
|
+
this._instance = new ContextAPI;
|
|
18241
|
+
}
|
|
18242
|
+
return this._instance;
|
|
18243
|
+
}
|
|
18244
|
+
setGlobalContextManager(contextManager) {
|
|
18245
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18246
|
+
}
|
|
18247
|
+
active() {
|
|
18248
|
+
return this._getContextManager().active();
|
|
18249
|
+
}
|
|
18250
|
+
with(context, fn, thisArg, ...args) {
|
|
18251
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18252
|
+
}
|
|
18253
|
+
bind(context, target) {
|
|
18254
|
+
return this._getContextManager().bind(context, target);
|
|
18255
|
+
}
|
|
18256
|
+
_getContextManager() {
|
|
18257
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18258
|
+
}
|
|
18259
|
+
disable() {
|
|
18260
|
+
this._getContextManager().disable();
|
|
18261
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18262
|
+
}
|
|
18263
|
+
}
|
|
18264
|
+
exports.ContextAPI = ContextAPI;
|
|
18265
|
+
});
|
|
18266
|
+
|
|
18267
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18268
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
18269
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18270
|
+
exports.TraceFlags = undefined;
|
|
18271
|
+
var TraceFlags;
|
|
18272
|
+
(function(TraceFlags2) {
|
|
18273
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18274
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18275
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18276
|
+
});
|
|
18277
|
+
|
|
18278
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18279
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18280
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18281
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18282
|
+
var trace_flags_1 = require_trace_flags();
|
|
18283
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
18284
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18285
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
18286
|
+
traceId: exports.INVALID_TRACEID,
|
|
18287
|
+
spanId: exports.INVALID_SPANID,
|
|
18288
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18289
|
+
};
|
|
18290
|
+
});
|
|
18291
|
+
|
|
18292
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18293
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18294
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18295
|
+
exports.NonRecordingSpan = undefined;
|
|
18296
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18297
|
+
|
|
18298
|
+
class NonRecordingSpan {
|
|
18299
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18300
|
+
this._spanContext = spanContext;
|
|
18301
|
+
}
|
|
18302
|
+
spanContext() {
|
|
18303
|
+
return this._spanContext;
|
|
18304
|
+
}
|
|
18305
|
+
setAttribute(_key, _value) {
|
|
18306
|
+
return this;
|
|
18307
|
+
}
|
|
18308
|
+
setAttributes(_attributes) {
|
|
18309
|
+
return this;
|
|
18310
|
+
}
|
|
18311
|
+
addEvent(_name, _attributes) {
|
|
18312
|
+
return this;
|
|
18313
|
+
}
|
|
18314
|
+
addLink(_link) {
|
|
18315
|
+
return this;
|
|
18316
|
+
}
|
|
18317
|
+
addLinks(_links) {
|
|
18318
|
+
return this;
|
|
18319
|
+
}
|
|
18320
|
+
setStatus(_status) {
|
|
18321
|
+
return this;
|
|
18322
|
+
}
|
|
18323
|
+
updateName(_name) {
|
|
18324
|
+
return this;
|
|
18325
|
+
}
|
|
18326
|
+
end(_endTime) {}
|
|
18327
|
+
isRecording() {
|
|
18328
|
+
return false;
|
|
18329
|
+
}
|
|
18330
|
+
recordException(_exception, _time) {}
|
|
18331
|
+
}
|
|
18332
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18333
|
+
});
|
|
18334
|
+
|
|
18335
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18336
|
+
var require_context_utils = __commonJS((exports) => {
|
|
18337
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18338
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18339
|
+
var context_1 = require_context();
|
|
18340
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18341
|
+
var context_2 = require_context2();
|
|
18342
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18343
|
+
function getSpan(context) {
|
|
18344
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
18345
|
+
}
|
|
18346
|
+
exports.getSpan = getSpan;
|
|
18347
|
+
function getActiveSpan() {
|
|
18348
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18349
|
+
}
|
|
18350
|
+
exports.getActiveSpan = getActiveSpan;
|
|
18351
|
+
function setSpan(context, span) {
|
|
18352
|
+
return context.setValue(SPAN_KEY, span);
|
|
18353
|
+
}
|
|
18354
|
+
exports.setSpan = setSpan;
|
|
18355
|
+
function deleteSpan(context) {
|
|
18356
|
+
return context.deleteValue(SPAN_KEY);
|
|
18357
|
+
}
|
|
18358
|
+
exports.deleteSpan = deleteSpan;
|
|
18359
|
+
function setSpanContext(context, spanContext) {
|
|
18360
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18361
|
+
}
|
|
18362
|
+
exports.setSpanContext = setSpanContext;
|
|
18363
|
+
function getSpanContext(context) {
|
|
18364
|
+
var _a3;
|
|
18365
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18366
|
+
}
|
|
18367
|
+
exports.getSpanContext = getSpanContext;
|
|
18368
|
+
});
|
|
18369
|
+
|
|
18370
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18371
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
18372
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18373
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18374
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18375
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18376
|
+
var isHex = new Uint8Array([
|
|
18377
|
+
0,
|
|
18378
|
+
0,
|
|
18379
|
+
0,
|
|
18380
|
+
0,
|
|
18381
|
+
0,
|
|
18382
|
+
0,
|
|
18383
|
+
0,
|
|
18384
|
+
0,
|
|
18385
|
+
0,
|
|
18386
|
+
0,
|
|
18387
|
+
0,
|
|
18388
|
+
0,
|
|
18389
|
+
0,
|
|
18390
|
+
0,
|
|
18391
|
+
0,
|
|
18392
|
+
0,
|
|
18393
|
+
0,
|
|
18394
|
+
0,
|
|
18395
|
+
0,
|
|
18396
|
+
0,
|
|
18397
|
+
0,
|
|
18398
|
+
0,
|
|
18399
|
+
0,
|
|
18400
|
+
0,
|
|
18401
|
+
0,
|
|
18402
|
+
0,
|
|
18403
|
+
0,
|
|
18404
|
+
0,
|
|
18405
|
+
0,
|
|
18406
|
+
0,
|
|
18407
|
+
0,
|
|
18408
|
+
0,
|
|
18409
|
+
0,
|
|
18410
|
+
0,
|
|
18411
|
+
0,
|
|
18412
|
+
0,
|
|
18413
|
+
0,
|
|
18414
|
+
0,
|
|
18415
|
+
0,
|
|
18416
|
+
0,
|
|
18417
|
+
0,
|
|
18418
|
+
0,
|
|
18419
|
+
0,
|
|
18420
|
+
0,
|
|
18421
|
+
0,
|
|
18422
|
+
0,
|
|
18423
|
+
0,
|
|
18424
|
+
0,
|
|
18425
|
+
1,
|
|
18426
|
+
1,
|
|
18427
|
+
1,
|
|
18428
|
+
1,
|
|
18429
|
+
1,
|
|
18430
|
+
1,
|
|
18431
|
+
1,
|
|
18432
|
+
1,
|
|
18433
|
+
1,
|
|
18434
|
+
1,
|
|
18435
|
+
0,
|
|
18436
|
+
0,
|
|
18437
|
+
0,
|
|
18438
|
+
0,
|
|
18439
|
+
0,
|
|
18440
|
+
0,
|
|
18441
|
+
0,
|
|
18442
|
+
1,
|
|
18443
|
+
1,
|
|
18444
|
+
1,
|
|
18445
|
+
1,
|
|
18446
|
+
1,
|
|
18447
|
+
1,
|
|
18448
|
+
0,
|
|
18449
|
+
0,
|
|
18450
|
+
0,
|
|
18451
|
+
0,
|
|
18452
|
+
0,
|
|
18453
|
+
0,
|
|
18454
|
+
0,
|
|
18455
|
+
0,
|
|
18456
|
+
0,
|
|
18457
|
+
0,
|
|
18458
|
+
0,
|
|
18459
|
+
0,
|
|
18460
|
+
0,
|
|
18461
|
+
0,
|
|
18462
|
+
0,
|
|
18463
|
+
0,
|
|
18464
|
+
0,
|
|
18465
|
+
0,
|
|
18466
|
+
0,
|
|
18467
|
+
0,
|
|
18468
|
+
0,
|
|
18469
|
+
0,
|
|
18470
|
+
0,
|
|
18471
|
+
0,
|
|
18472
|
+
0,
|
|
18473
|
+
0,
|
|
18474
|
+
1,
|
|
18475
|
+
1,
|
|
18476
|
+
1,
|
|
18477
|
+
1,
|
|
18478
|
+
1,
|
|
18479
|
+
1
|
|
18480
|
+
]);
|
|
18481
|
+
function isValidHex(id, length) {
|
|
18482
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18483
|
+
return false;
|
|
18484
|
+
let r = 0;
|
|
18485
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18486
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18487
|
+
}
|
|
18488
|
+
return r === length;
|
|
18489
|
+
}
|
|
18490
|
+
function isValidTraceId(traceId) {
|
|
18491
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18492
|
+
}
|
|
18493
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18494
|
+
function isValidSpanId(spanId) {
|
|
18495
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18496
|
+
}
|
|
18497
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18498
|
+
function isSpanContextValid(spanContext) {
|
|
18499
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18500
|
+
}
|
|
18501
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18502
|
+
function wrapSpanContext(spanContext) {
|
|
18503
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18504
|
+
}
|
|
18505
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18506
|
+
});
|
|
18507
|
+
|
|
18508
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18509
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18510
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18511
|
+
exports.NoopTracer = undefined;
|
|
18512
|
+
var context_1 = require_context2();
|
|
18513
|
+
var context_utils_1 = require_context_utils();
|
|
18514
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18515
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18516
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18517
|
+
|
|
18518
|
+
class NoopTracer {
|
|
18519
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18520
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18521
|
+
if (root) {
|
|
18522
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18523
|
+
}
|
|
18524
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18525
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18526
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18527
|
+
} else {
|
|
18528
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18529
|
+
}
|
|
18530
|
+
}
|
|
18531
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18532
|
+
let opts;
|
|
18533
|
+
let ctx;
|
|
18534
|
+
let fn;
|
|
18535
|
+
if (arguments.length < 2) {
|
|
18536
|
+
return;
|
|
18537
|
+
} else if (arguments.length === 2) {
|
|
18538
|
+
fn = arg2;
|
|
18539
|
+
} else if (arguments.length === 3) {
|
|
18540
|
+
opts = arg2;
|
|
18541
|
+
fn = arg3;
|
|
18542
|
+
} else {
|
|
18543
|
+
opts = arg2;
|
|
18544
|
+
ctx = arg3;
|
|
18545
|
+
fn = arg4;
|
|
18546
|
+
}
|
|
18547
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18548
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18549
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18550
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18551
|
+
}
|
|
18552
|
+
}
|
|
18553
|
+
exports.NoopTracer = NoopTracer;
|
|
18554
|
+
function isSpanContext(spanContext) {
|
|
18555
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18556
|
+
}
|
|
18557
|
+
});
|
|
18558
|
+
|
|
18559
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18560
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18561
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18562
|
+
exports.ProxyTracer = undefined;
|
|
18563
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18564
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18565
|
+
|
|
18566
|
+
class ProxyTracer {
|
|
18567
|
+
constructor(provider, name, version2, options) {
|
|
18568
|
+
this._provider = provider;
|
|
18569
|
+
this.name = name;
|
|
18570
|
+
this.version = version2;
|
|
18571
|
+
this.options = options;
|
|
18572
|
+
}
|
|
18573
|
+
startSpan(name, options, context) {
|
|
18574
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18575
|
+
}
|
|
18576
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18577
|
+
const tracer = this._getTracer();
|
|
18578
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18579
|
+
}
|
|
18580
|
+
_getTracer() {
|
|
18581
|
+
if (this._delegate) {
|
|
18582
|
+
return this._delegate;
|
|
18583
|
+
}
|
|
18584
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18585
|
+
if (!tracer) {
|
|
18586
|
+
return NOOP_TRACER;
|
|
18587
|
+
}
|
|
18588
|
+
this._delegate = tracer;
|
|
18589
|
+
return this._delegate;
|
|
18590
|
+
}
|
|
18591
|
+
}
|
|
18592
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18593
|
+
});
|
|
18594
|
+
|
|
18595
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18596
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18597
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18598
|
+
exports.NoopTracerProvider = undefined;
|
|
18599
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18600
|
+
|
|
18601
|
+
class NoopTracerProvider {
|
|
18602
|
+
getTracer(_name, _version, _options) {
|
|
18603
|
+
return new NoopTracer_1.NoopTracer;
|
|
18604
|
+
}
|
|
18605
|
+
}
|
|
18606
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18607
|
+
});
|
|
18608
|
+
|
|
18609
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18610
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18611
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18612
|
+
exports.ProxyTracerProvider = undefined;
|
|
18613
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18614
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18615
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18616
|
+
|
|
18617
|
+
class ProxyTracerProvider {
|
|
18618
|
+
getTracer(name, version2, options) {
|
|
18619
|
+
var _a3;
|
|
18620
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18621
|
+
}
|
|
18622
|
+
getDelegate() {
|
|
18623
|
+
var _a3;
|
|
18624
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18625
|
+
}
|
|
18626
|
+
setDelegate(delegate) {
|
|
18627
|
+
this._delegate = delegate;
|
|
18628
|
+
}
|
|
18629
|
+
getDelegateTracer(name, version2, options) {
|
|
18630
|
+
var _a3;
|
|
18631
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18632
|
+
}
|
|
18633
|
+
}
|
|
18634
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18635
|
+
});
|
|
18636
|
+
|
|
18637
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18638
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18639
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18640
|
+
exports.SamplingDecision = undefined;
|
|
18641
|
+
var SamplingDecision;
|
|
18642
|
+
(function(SamplingDecision2) {
|
|
18643
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18644
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18645
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18646
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18647
|
+
});
|
|
18648
|
+
|
|
18649
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18650
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18651
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18652
|
+
exports.SpanKind = undefined;
|
|
18653
|
+
var SpanKind;
|
|
18654
|
+
(function(SpanKind2) {
|
|
18655
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18656
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18657
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18658
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18659
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18660
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18661
|
+
});
|
|
18662
|
+
|
|
18663
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18664
|
+
var require_status = __commonJS((exports) => {
|
|
18665
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18666
|
+
exports.SpanStatusCode = undefined;
|
|
18667
|
+
var SpanStatusCode;
|
|
18668
|
+
(function(SpanStatusCode2) {
|
|
18669
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18670
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18671
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18672
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18673
|
+
});
|
|
18674
|
+
|
|
18675
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18676
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18677
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18678
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18679
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18680
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18681
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18682
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18683
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18684
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18685
|
+
function validateKey(key) {
|
|
18686
|
+
return VALID_KEY_REGEX.test(key);
|
|
18687
|
+
}
|
|
18688
|
+
exports.validateKey = validateKey;
|
|
18689
|
+
function validateValue(value) {
|
|
18690
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18691
|
+
}
|
|
18692
|
+
exports.validateValue = validateValue;
|
|
18693
|
+
});
|
|
18694
|
+
|
|
18695
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18696
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18697
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18698
|
+
exports.TraceStateImpl = undefined;
|
|
18699
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18700
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18701
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18702
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18703
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18704
|
+
|
|
18705
|
+
class TraceStateImpl {
|
|
18706
|
+
constructor(rawTraceState) {
|
|
18707
|
+
this._internalState = new Map;
|
|
18708
|
+
if (rawTraceState)
|
|
18709
|
+
this._parse(rawTraceState);
|
|
18710
|
+
}
|
|
18711
|
+
set(key, value) {
|
|
18712
|
+
const traceState = this._clone();
|
|
18713
|
+
if (traceState._internalState.has(key)) {
|
|
18714
|
+
traceState._internalState.delete(key);
|
|
18715
|
+
}
|
|
18716
|
+
traceState._internalState.set(key, value);
|
|
18717
|
+
return traceState;
|
|
18718
|
+
}
|
|
18719
|
+
unset(key) {
|
|
18720
|
+
const traceState = this._clone();
|
|
18721
|
+
traceState._internalState.delete(key);
|
|
18722
|
+
return traceState;
|
|
18723
|
+
}
|
|
18724
|
+
get(key) {
|
|
18725
|
+
return this._internalState.get(key);
|
|
18726
|
+
}
|
|
18727
|
+
serialize() {
|
|
18728
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18729
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18730
|
+
return agg;
|
|
18731
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18732
|
+
}
|
|
18733
|
+
_parse(rawTraceState) {
|
|
18734
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18735
|
+
return;
|
|
18736
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18737
|
+
const listMember = part.trim();
|
|
18738
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18739
|
+
if (i !== -1) {
|
|
18740
|
+
const key = listMember.slice(0, i);
|
|
18741
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18742
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18743
|
+
agg.set(key, value);
|
|
18744
|
+
}
|
|
18745
|
+
}
|
|
18746
|
+
return agg;
|
|
18747
|
+
}, new Map);
|
|
18748
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18749
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18750
|
+
}
|
|
18751
|
+
}
|
|
18752
|
+
_keys() {
|
|
18753
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18754
|
+
}
|
|
18755
|
+
_clone() {
|
|
18756
|
+
const traceState = new TraceStateImpl;
|
|
18757
|
+
traceState._internalState = new Map(this._internalState);
|
|
18758
|
+
return traceState;
|
|
18759
|
+
}
|
|
18760
|
+
}
|
|
18761
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18762
|
+
});
|
|
18763
|
+
|
|
18764
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18765
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18766
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18767
|
+
exports.createTraceState = undefined;
|
|
18768
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18769
|
+
function createTraceState(rawTraceState) {
|
|
18770
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18771
|
+
}
|
|
18772
|
+
exports.createTraceState = createTraceState;
|
|
18773
|
+
});
|
|
18774
|
+
|
|
18775
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18776
|
+
var require_context_api = __commonJS((exports) => {
|
|
18777
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18778
|
+
exports.context = undefined;
|
|
18779
|
+
var context_1 = require_context2();
|
|
18780
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18781
|
+
});
|
|
18782
|
+
|
|
18783
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18784
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18785
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18786
|
+
exports.diag = undefined;
|
|
18787
|
+
var diag_1 = require_diag();
|
|
18788
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18789
|
+
});
|
|
18790
|
+
|
|
18791
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18792
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18793
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18794
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18795
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18796
|
+
|
|
18797
|
+
class NoopMeterProvider {
|
|
18798
|
+
getMeter(_name, _version, _options) {
|
|
18799
|
+
return NoopMeter_1.NOOP_METER;
|
|
18800
|
+
}
|
|
18801
|
+
}
|
|
18802
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18803
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18804
|
+
});
|
|
18805
|
+
|
|
18806
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18807
|
+
var require_metrics = __commonJS((exports) => {
|
|
18808
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18809
|
+
exports.MetricsAPI = undefined;
|
|
18810
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18811
|
+
var global_utils_1 = require_global_utils();
|
|
18812
|
+
var diag_1 = require_diag();
|
|
18813
|
+
var API_NAME = "metrics";
|
|
18814
|
+
|
|
18815
|
+
class MetricsAPI {
|
|
18816
|
+
constructor() {}
|
|
18817
|
+
static getInstance() {
|
|
18818
|
+
if (!this._instance) {
|
|
18819
|
+
this._instance = new MetricsAPI;
|
|
18820
|
+
}
|
|
18821
|
+
return this._instance;
|
|
18822
|
+
}
|
|
18823
|
+
setGlobalMeterProvider(provider) {
|
|
18824
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18825
|
+
}
|
|
18826
|
+
getMeterProvider() {
|
|
18827
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18828
|
+
}
|
|
18829
|
+
getMeter(name, version2, options) {
|
|
18830
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18831
|
+
}
|
|
18832
|
+
disable() {
|
|
18833
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18834
|
+
}
|
|
18835
|
+
}
|
|
18836
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18837
|
+
});
|
|
18838
|
+
|
|
18839
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18840
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18841
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18842
|
+
exports.metrics = undefined;
|
|
18843
|
+
var metrics_1 = require_metrics();
|
|
18844
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18845
|
+
});
|
|
18846
|
+
|
|
18847
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18848
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18849
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18850
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18851
|
+
|
|
18852
|
+
class NoopTextMapPropagator {
|
|
18853
|
+
inject(_context, _carrier) {}
|
|
18854
|
+
extract(context, _carrier) {
|
|
18855
|
+
return context;
|
|
18856
|
+
}
|
|
18857
|
+
fields() {
|
|
18858
|
+
return [];
|
|
18859
|
+
}
|
|
18860
|
+
}
|
|
18861
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18862
|
+
});
|
|
18863
|
+
|
|
18864
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18865
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18866
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18867
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18868
|
+
var context_1 = require_context2();
|
|
18869
|
+
var context_2 = require_context();
|
|
18870
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18871
|
+
function getBaggage(context) {
|
|
18872
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18873
|
+
}
|
|
18874
|
+
exports.getBaggage = getBaggage;
|
|
18875
|
+
function getActiveBaggage() {
|
|
18876
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18877
|
+
}
|
|
18878
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18879
|
+
function setBaggage(context, baggage) {
|
|
18880
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18881
|
+
}
|
|
18882
|
+
exports.setBaggage = setBaggage;
|
|
18883
|
+
function deleteBaggage(context) {
|
|
18884
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18885
|
+
}
|
|
18886
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18887
|
+
});
|
|
18888
|
+
|
|
18889
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18890
|
+
var require_propagation = __commonJS((exports) => {
|
|
18891
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18892
|
+
exports.PropagationAPI = undefined;
|
|
18893
|
+
var global_utils_1 = require_global_utils();
|
|
18894
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18895
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18896
|
+
var context_helpers_1 = require_context_helpers();
|
|
18897
|
+
var utils_1 = require_utils();
|
|
18898
|
+
var diag_1 = require_diag();
|
|
18899
|
+
var API_NAME = "propagation";
|
|
18900
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18901
|
+
|
|
18902
|
+
class PropagationAPI {
|
|
18903
|
+
constructor() {
|
|
18904
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18905
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18906
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18907
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18908
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18909
|
+
}
|
|
18910
|
+
static getInstance() {
|
|
18911
|
+
if (!this._instance) {
|
|
18912
|
+
this._instance = new PropagationAPI;
|
|
18913
|
+
}
|
|
18914
|
+
return this._instance;
|
|
18915
|
+
}
|
|
18916
|
+
setGlobalPropagator(propagator) {
|
|
18917
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18918
|
+
}
|
|
18919
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18920
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18921
|
+
}
|
|
18922
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18923
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18924
|
+
}
|
|
18925
|
+
fields() {
|
|
18926
|
+
return this._getGlobalPropagator().fields();
|
|
18927
|
+
}
|
|
18928
|
+
disable() {
|
|
18929
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18930
|
+
}
|
|
18931
|
+
_getGlobalPropagator() {
|
|
18932
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18933
|
+
}
|
|
18934
|
+
}
|
|
18935
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18936
|
+
});
|
|
18937
|
+
|
|
18938
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18939
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18940
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18941
|
+
exports.propagation = undefined;
|
|
18942
|
+
var propagation_1 = require_propagation();
|
|
18943
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18944
|
+
});
|
|
18945
|
+
|
|
18946
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18947
|
+
var require_trace = __commonJS((exports) => {
|
|
18948
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18949
|
+
exports.TraceAPI = undefined;
|
|
18950
|
+
var global_utils_1 = require_global_utils();
|
|
18951
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18952
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18953
|
+
var context_utils_1 = require_context_utils();
|
|
18954
|
+
var diag_1 = require_diag();
|
|
18955
|
+
var API_NAME = "trace";
|
|
18956
|
+
|
|
18957
|
+
class TraceAPI {
|
|
18958
|
+
constructor() {
|
|
18959
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18960
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18961
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18962
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18963
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18964
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18965
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18966
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18967
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18968
|
+
}
|
|
18969
|
+
static getInstance() {
|
|
18970
|
+
if (!this._instance) {
|
|
18971
|
+
this._instance = new TraceAPI;
|
|
18972
|
+
}
|
|
18973
|
+
return this._instance;
|
|
18974
|
+
}
|
|
18975
|
+
setGlobalTracerProvider(provider) {
|
|
18976
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18977
|
+
if (success3) {
|
|
18978
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18979
|
+
}
|
|
18980
|
+
return success3;
|
|
18981
|
+
}
|
|
18982
|
+
getTracerProvider() {
|
|
18983
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18984
|
+
}
|
|
18985
|
+
getTracer(name, version2) {
|
|
18986
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18987
|
+
}
|
|
18988
|
+
disable() {
|
|
18989
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18990
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18991
|
+
}
|
|
18992
|
+
}
|
|
18993
|
+
exports.TraceAPI = TraceAPI;
|
|
18994
|
+
});
|
|
18995
|
+
|
|
18996
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18997
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18998
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18999
|
+
exports.trace = undefined;
|
|
19000
|
+
var trace_1 = require_trace();
|
|
19001
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
19002
|
+
});
|
|
19003
|
+
|
|
19004
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
19005
|
+
var require_src = __commonJS((exports) => {
|
|
19006
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19007
|
+
exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
|
|
19008
|
+
var utils_1 = require_utils();
|
|
19009
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
19010
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
19011
|
+
} });
|
|
19012
|
+
var context_1 = require_context();
|
|
19013
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
19014
|
+
return context_1.createContextKey;
|
|
19015
|
+
} });
|
|
19016
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
19017
|
+
return context_1.ROOT_CONTEXT;
|
|
19018
|
+
} });
|
|
19019
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
19020
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
19021
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
19022
|
+
} });
|
|
19023
|
+
var types_1 = require_types();
|
|
19024
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
19025
|
+
return types_1.DiagLogLevel;
|
|
19026
|
+
} });
|
|
19027
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
19028
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
19029
|
+
return NoopMeter_1.createNoopMeter;
|
|
19030
|
+
} });
|
|
19031
|
+
var Metric_1 = require_Metric();
|
|
19032
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
19033
|
+
return Metric_1.ValueType;
|
|
19034
|
+
} });
|
|
19035
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
19036
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
19037
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
19038
|
+
} });
|
|
19039
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
19040
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
19041
|
+
} });
|
|
19042
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
19043
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
19044
|
+
return ProxyTracer_1.ProxyTracer;
|
|
19045
|
+
} });
|
|
19046
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
19047
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
19048
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
19049
|
+
} });
|
|
19050
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
19051
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
19052
|
+
return SamplingResult_1.SamplingDecision;
|
|
19053
|
+
} });
|
|
19054
|
+
var span_kind_1 = require_span_kind();
|
|
19055
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
19056
|
+
return span_kind_1.SpanKind;
|
|
19057
|
+
} });
|
|
19058
|
+
var status_1 = require_status();
|
|
19059
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
19060
|
+
return status_1.SpanStatusCode;
|
|
19061
|
+
} });
|
|
19062
|
+
var trace_flags_1 = require_trace_flags();
|
|
19063
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
19064
|
+
return trace_flags_1.TraceFlags;
|
|
19065
|
+
} });
|
|
19066
|
+
var utils_2 = require_utils2();
|
|
19067
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
19068
|
+
return utils_2.createTraceState;
|
|
19069
|
+
} });
|
|
19070
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
19071
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
19072
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
19073
|
+
} });
|
|
19074
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
19075
|
+
return spancontext_utils_1.isValidTraceId;
|
|
19076
|
+
} });
|
|
19077
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
19078
|
+
return spancontext_utils_1.isValidSpanId;
|
|
19079
|
+
} });
|
|
19080
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
19081
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
19082
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
19083
|
+
} });
|
|
19084
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
19085
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
19086
|
+
} });
|
|
19087
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
19088
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
19089
|
+
} });
|
|
19090
|
+
var context_api_1 = require_context_api();
|
|
19091
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
19092
|
+
return context_api_1.context;
|
|
19093
|
+
} });
|
|
19094
|
+
var diag_api_1 = require_diag_api();
|
|
19095
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
19096
|
+
return diag_api_1.diag;
|
|
19097
|
+
} });
|
|
19098
|
+
var metrics_api_1 = require_metrics_api();
|
|
19099
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
19100
|
+
return metrics_api_1.metrics;
|
|
19101
|
+
} });
|
|
19102
|
+
var propagation_api_1 = require_propagation_api();
|
|
19103
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
19104
|
+
return propagation_api_1.propagation;
|
|
19105
|
+
} });
|
|
19106
|
+
var trace_api_1 = require_trace_api();
|
|
19107
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
19108
|
+
return trace_api_1.trace;
|
|
19109
|
+
} });
|
|
19110
|
+
exports.default = {
|
|
19111
|
+
context: context_api_1.context,
|
|
19112
|
+
diag: diag_api_1.diag,
|
|
19113
|
+
metrics: metrics_api_1.metrics,
|
|
19114
|
+
propagation: propagation_api_1.propagation,
|
|
19115
|
+
trace: trace_api_1.trace
|
|
19116
|
+
};
|
|
19117
|
+
});
|
|
19118
|
+
|
|
19119
|
+
// ../types/src/processor/processor.ts
|
|
19120
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
19121
|
+
var init_processor = __esm(() => {
|
|
19122
|
+
init_zod();
|
|
19123
|
+
init_common();
|
|
19124
|
+
import_api = __toESM(require_src(), 1);
|
|
19125
|
+
noopTracingContext = {
|
|
19126
|
+
traceId: "",
|
|
19127
|
+
getActiveSpan() {
|
|
19128
|
+
return;
|
|
19129
|
+
},
|
|
19130
|
+
async withSpan(_name, _options, fn) {
|
|
19131
|
+
const noopSpan = {
|
|
19132
|
+
spanContext: () => ({
|
|
19133
|
+
traceId: "",
|
|
19134
|
+
spanId: "",
|
|
19135
|
+
traceFlags: 0
|
|
19136
|
+
}),
|
|
19137
|
+
setAttribute: () => noopSpan,
|
|
19138
|
+
setAttributes: () => noopSpan,
|
|
19139
|
+
addEvent: () => noopSpan,
|
|
19140
|
+
addLink: () => noopSpan,
|
|
19141
|
+
addLinks: () => noopSpan,
|
|
19142
|
+
setStatus: () => noopSpan,
|
|
19143
|
+
updateName: () => noopSpan,
|
|
19144
|
+
end: () => {},
|
|
19145
|
+
isRecording: () => false,
|
|
19146
|
+
recordException: () => {}
|
|
19147
|
+
};
|
|
19148
|
+
return fn(noopSpan);
|
|
19149
|
+
}
|
|
19150
|
+
};
|
|
19151
|
+
ProcessorPortSchema = exports_external.object({
|
|
19152
|
+
name: exports_external.string(),
|
|
19153
|
+
schema: JsonSchemaSchema,
|
|
19154
|
+
required: exports_external.boolean().default(true)
|
|
19155
|
+
});
|
|
19156
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
19157
|
+
id: exports_external.string(),
|
|
19158
|
+
name: exports_external.string(),
|
|
19159
|
+
description: exports_external.string().optional(),
|
|
19160
|
+
inputSchema: JsonSchemaSchema,
|
|
19161
|
+
outputSchema: JsonSchemaSchema,
|
|
19162
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
19163
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19164
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19165
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
19166
|
+
pluginName: exports_external.string().optional()
|
|
19167
|
+
});
|
|
19168
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
19169
|
+
jobId: exports_external.string(),
|
|
19170
|
+
stepId: exports_external.string(),
|
|
19171
|
+
tenantId: exports_external.string(),
|
|
19172
|
+
automationId: exports_external.string().optional(),
|
|
19173
|
+
workflowId: exports_external.string(),
|
|
19174
|
+
workerId: exports_external.string().optional()
|
|
19175
|
+
});
|
|
19176
|
+
((TraceStatus2) => {
|
|
19177
|
+
TraceStatus2["PENDING"] = "pending";
|
|
19178
|
+
TraceStatus2["RUNNING"] = "running";
|
|
19179
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
19180
|
+
TraceStatus2["FAILED"] = "failed";
|
|
19181
|
+
})(TraceStatus ||= {});
|
|
19182
|
+
});
|
|
19183
|
+
|
|
19184
|
+
// ../types/src/processor/normalize-extract-input.ts
|
|
19185
|
+
function normalizeExtractInputToText(input) {
|
|
19186
|
+
if (typeof input === "string") {
|
|
19187
|
+
return input;
|
|
19188
|
+
}
|
|
19189
|
+
if (input && typeof input === "object") {
|
|
19190
|
+
const obj = input;
|
|
19191
|
+
if (typeof obj.content === "string") {
|
|
19192
|
+
return obj.content;
|
|
19193
|
+
}
|
|
19194
|
+
if (typeof obj.text === "string") {
|
|
19195
|
+
return obj.text;
|
|
19196
|
+
}
|
|
19197
|
+
return JSON.stringify(input, null, 2);
|
|
19198
|
+
}
|
|
19199
|
+
return String(input ?? "");
|
|
19200
|
+
}
|
|
19201
|
+
function extractSourceTextFromResolvedConfig(config2) {
|
|
19202
|
+
if (!config2 || typeof config2 !== "object")
|
|
19203
|
+
return null;
|
|
19204
|
+
if (typeof config2.content === "string") {
|
|
19205
|
+
return normalizeExtractInputToText({ content: config2.content });
|
|
19206
|
+
}
|
|
19207
|
+
if (typeof config2.text === "string") {
|
|
19208
|
+
return normalizeExtractInputToText({ text: config2.text });
|
|
19209
|
+
}
|
|
19210
|
+
if (typeof config2.input === "string") {
|
|
19211
|
+
return normalizeExtractInputToText({ content: config2.input });
|
|
19212
|
+
}
|
|
19213
|
+
if (config2.input !== null && config2.input !== undefined) {
|
|
19214
|
+
return normalizeExtractInputToText(config2.input);
|
|
19215
|
+
}
|
|
19216
|
+
return null;
|
|
19217
|
+
}
|
|
19218
|
+
|
|
19219
|
+
// ../types/src/processor/grounding.ts
|
|
19220
|
+
function stripGroundingMetadata(value) {
|
|
19221
|
+
if (Array.isArray(value))
|
|
19222
|
+
return value.map(stripGroundingMetadata);
|
|
19223
|
+
if (value && typeof value === "object") {
|
|
19224
|
+
const out = {};
|
|
19225
|
+
for (const [k, v] of Object.entries(value)) {
|
|
19226
|
+
if (k === "_grounding")
|
|
19227
|
+
continue;
|
|
19228
|
+
out[k] = stripGroundingMetadata(v);
|
|
19229
|
+
}
|
|
19230
|
+
return out;
|
|
19231
|
+
}
|
|
19232
|
+
return value;
|
|
19233
|
+
}
|
|
19234
|
+
|
|
19235
|
+
// ../types/src/processor/execution.ts
|
|
19236
|
+
function asTuple(values) {
|
|
19237
|
+
return values;
|
|
19238
|
+
}
|
|
19239
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19240
|
+
var init_execution = __esm(() => {
|
|
19241
|
+
init_zod();
|
|
19242
|
+
WorkflowExecutionStatusValue = {
|
|
19243
|
+
CREATED: "created",
|
|
19244
|
+
PENDING: "pending",
|
|
19245
|
+
RUNNING: "running",
|
|
19246
|
+
WAITING: "waiting",
|
|
19247
|
+
COMPLETED: "completed",
|
|
19248
|
+
FAILED: "failed",
|
|
19249
|
+
CANCELLED: "cancelled"
|
|
19250
|
+
};
|
|
19251
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19252
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
19253
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
19254
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
19255
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
19256
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
19257
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
19258
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
19259
|
+
]);
|
|
19260
|
+
StepExecutionStatusValue = {
|
|
19261
|
+
PENDING: "pending",
|
|
19262
|
+
RUNNING: "running",
|
|
19263
|
+
SUCCESS: "success",
|
|
19264
|
+
FAILURE: "failure",
|
|
19265
|
+
WAITING: "waiting",
|
|
19266
|
+
SKIPPED: "skipped"
|
|
19267
|
+
};
|
|
19268
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
19269
|
+
StepExecutionStatusValue.PENDING,
|
|
19270
|
+
StepExecutionStatusValue.RUNNING,
|
|
19271
|
+
StepExecutionStatusValue.SUCCESS,
|
|
19272
|
+
StepExecutionStatusValue.FAILURE,
|
|
19273
|
+
StepExecutionStatusValue.WAITING,
|
|
19274
|
+
StepExecutionStatusValue.SKIPPED
|
|
19275
|
+
]);
|
|
19276
|
+
TriggerTypeValue = {
|
|
19277
|
+
MANUAL: "manual",
|
|
19278
|
+
API: "api",
|
|
19279
|
+
WEBHOOK: "webhook",
|
|
19280
|
+
SCHEDULE: "schedule",
|
|
19281
|
+
EMAIL: "email",
|
|
19282
|
+
EVAL: "eval",
|
|
19283
|
+
CLI: "cli"
|
|
19284
|
+
};
|
|
19285
|
+
TriggerTypeSchema = exports_external.enum([
|
|
19286
|
+
TriggerTypeValue.MANUAL,
|
|
19287
|
+
TriggerTypeValue.API,
|
|
19288
|
+
TriggerTypeValue.WEBHOOK,
|
|
19289
|
+
TriggerTypeValue.SCHEDULE,
|
|
19290
|
+
TriggerTypeValue.EMAIL,
|
|
19291
|
+
TriggerTypeValue.EVAL,
|
|
19292
|
+
TriggerTypeValue.CLI
|
|
19293
|
+
]);
|
|
19294
|
+
ExecutionTypeValue = {
|
|
19295
|
+
PROD: "prod",
|
|
19296
|
+
EVAL: "eval",
|
|
19297
|
+
PLAYGROUND: "playground"
|
|
19298
|
+
};
|
|
19299
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
19300
|
+
ExecutionTypeValue.PROD,
|
|
19301
|
+
ExecutionTypeValue.EVAL,
|
|
19302
|
+
ExecutionTypeValue.PLAYGROUND
|
|
19303
|
+
]);
|
|
19304
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19305
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19306
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19307
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19308
|
+
});
|
|
19309
|
+
|
|
19310
|
+
// ../types/src/processor/configs/classify.ts
|
|
19311
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19312
|
+
var init_classify = __esm(() => {
|
|
19313
|
+
init_zod();
|
|
19314
|
+
ClassifyInputSchema = exports_external.object({
|
|
19315
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19316
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19317
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
19318
|
+
message: "Either content or text must be provided"
|
|
19319
|
+
});
|
|
19320
|
+
ClassifyLabelSchema = exports_external.object({
|
|
19321
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19322
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19323
|
+
});
|
|
19324
|
+
ClassifyConfigSchema = exports_external.object({
|
|
19325
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19326
|
+
prompt: exports_external.string().optional().describe("Optional classification instructions appended to the system prompt. Use to clarify edge cases or emphasize evidence the model should weigh."),
|
|
19327
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19328
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
19329
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19330
|
+
});
|
|
19331
|
+
ClassifyOutputSchema = exports_external.object({
|
|
19332
|
+
label: exports_external.string().describe("The selected label name"),
|
|
19333
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19334
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19335
|
+
});
|
|
19336
|
+
});
|
|
19337
|
+
|
|
19338
|
+
// ../types/src/processor/configs/classify-pages.ts
|
|
19339
|
+
var ClassifyPagesInputSchema, ClassifyPagesLabelSchema, ClassifyPagesConfigSchema, ClassifyPagesOutputSchema;
|
|
19340
|
+
var init_classify_pages = __esm(() => {
|
|
19341
|
+
init_zod();
|
|
19342
|
+
ClassifyPagesInputSchema = exports_external.object({
|
|
19343
|
+
pages: exports_external.array(exports_external.object({
|
|
19344
|
+
pageIndex: exports_external.number().int().nonnegative().describe("0-based page index"),
|
|
19345
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19346
|
+
pageName: exports_external.string().optional()
|
|
19347
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19348
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly.");
|
|
19349
|
+
ClassifyPagesLabelSchema = exports_external.union([
|
|
19350
|
+
exports_external.string().min(1),
|
|
19351
|
+
exports_external.object({
|
|
19352
|
+
name: exports_external.string().min(1),
|
|
19353
|
+
description: exports_external.string().optional()
|
|
19354
|
+
})
|
|
19355
|
+
]);
|
|
19356
|
+
ClassifyPagesConfigSchema = exports_external.object({
|
|
19357
|
+
labels: exports_external.array(ClassifyPagesLabelSchema).min(1),
|
|
19358
|
+
prompt: exports_external.string().optional(),
|
|
19359
|
+
provider: exports_external.string().optional(),
|
|
19360
|
+
model: exports_external.string().optional(),
|
|
19361
|
+
windowTokenBudget: exports_external.number().int().positive().optional()
|
|
19362
|
+
});
|
|
19363
|
+
ClassifyPagesOutputSchema = exports_external.object({
|
|
19364
|
+
pages: exports_external.array(exports_external.object({
|
|
19365
|
+
pageIndex: exports_external.number().int(),
|
|
19366
|
+
labels: exports_external.array(exports_external.string())
|
|
19367
|
+
})),
|
|
19368
|
+
byLabel: exports_external.record(exports_external.string(), exports_external.array(exports_external.number().int()))
|
|
19369
|
+
});
|
|
19370
|
+
});
|
|
19371
|
+
|
|
19372
|
+
// ../types/src/parser/parser.ts
|
|
19373
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19374
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19375
|
+
if (!ext)
|
|
19376
|
+
return declaredMimeType;
|
|
19377
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19378
|
+
return extensionMime ?? declaredMimeType;
|
|
19379
|
+
}
|
|
19380
|
+
function mimeTypeForExtension(extension) {
|
|
19381
|
+
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19382
|
+
}
|
|
19383
|
+
function extensionForMimeType(mimeType) {
|
|
19384
|
+
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19385
|
+
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19386
|
+
}
|
|
19387
|
+
function getParserCategory(mimeType) {
|
|
19388
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
19389
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19390
|
+
return "plaintext";
|
|
19391
|
+
}
|
|
19392
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19393
|
+
return "office";
|
|
19394
|
+
}
|
|
19395
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19396
|
+
return "document";
|
|
19397
|
+
}
|
|
19398
|
+
return null;
|
|
19399
|
+
}
|
|
19400
|
+
function requiresSpecializedParser(mimeType) {
|
|
19401
|
+
return getParserCategory(mimeType) === "document";
|
|
19402
|
+
}
|
|
19403
|
+
function getAllSupportedMimeTypes() {
|
|
19404
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19405
|
+
}
|
|
19406
|
+
function getSupportedFormatsLabel() {
|
|
19407
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
19408
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19409
|
+
return labels.join(", ");
|
|
19410
|
+
}
|
|
19411
|
+
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
|
|
19412
|
+
var init_parser = __esm(() => {
|
|
19413
|
+
init_zod();
|
|
19414
|
+
OFFICE_MIME_TYPES = [
|
|
19415
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19416
|
+
"application/msword",
|
|
19417
|
+
"application/vnd.oasis.opendocument.text",
|
|
19418
|
+
"application/rtf",
|
|
19419
|
+
"text/rtf",
|
|
19420
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19421
|
+
"application/vnd.ms-excel",
|
|
19422
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19423
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19424
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19425
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19426
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19427
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19428
|
+
"application/vnd.ms-powerpoint",
|
|
19429
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
19430
|
+
"message/rfc822",
|
|
19431
|
+
"application/vnd.ms-outlook",
|
|
19432
|
+
"application/epub+zip"
|
|
19433
|
+
];
|
|
19434
|
+
ParserCategory = {
|
|
19435
|
+
PLAINTEXT: [
|
|
19436
|
+
"text/plain",
|
|
19437
|
+
"text/markdown",
|
|
19438
|
+
"text/csv",
|
|
19439
|
+
"text/tab-separated-values",
|
|
19440
|
+
"text/html",
|
|
19441
|
+
"text/xml",
|
|
19442
|
+
"application/json",
|
|
19443
|
+
"application/x-yaml",
|
|
19444
|
+
"application/toml",
|
|
19445
|
+
"image/svg+xml",
|
|
19446
|
+
"text/x-rst",
|
|
19447
|
+
"text/x-org",
|
|
19448
|
+
"application/x-latex",
|
|
19449
|
+
"application/x-ipynb+json",
|
|
19450
|
+
"application/x-bibtex",
|
|
19451
|
+
"application/docbook+xml",
|
|
19452
|
+
"application/x-fictionbook+xml"
|
|
19453
|
+
],
|
|
19454
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19455
|
+
DOCUMENT: [
|
|
19456
|
+
"application/pdf",
|
|
19457
|
+
"image/png",
|
|
19458
|
+
"image/jpeg",
|
|
19459
|
+
"image/webp",
|
|
19460
|
+
"image/tiff",
|
|
19461
|
+
"image/gif",
|
|
19462
|
+
"image/bmp"
|
|
19463
|
+
]
|
|
19464
|
+
};
|
|
19465
|
+
ParserTypeSchema = exports_external.enum([
|
|
19466
|
+
"plaintext",
|
|
19467
|
+
"office",
|
|
19468
|
+
"llm-vision",
|
|
19469
|
+
"ocr"
|
|
19470
|
+
]);
|
|
19471
|
+
DocumentMetadataSchema = exports_external.object({
|
|
19472
|
+
filename: exports_external.string(),
|
|
19473
|
+
mimeType: exports_external.string(),
|
|
19474
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
19475
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19476
|
+
});
|
|
19477
|
+
ParseUsageSchema = exports_external.object({
|
|
19478
|
+
pageCount: exports_external.number(),
|
|
19479
|
+
processingTimeMs: exports_external.number().optional()
|
|
19480
|
+
});
|
|
19481
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19482
|
+
PointSchema = exports_external.object({
|
|
19483
|
+
x: exports_external.number(),
|
|
19484
|
+
y: exports_external.number()
|
|
19485
|
+
});
|
|
19486
|
+
BoundingRegionSchema = exports_external.object({
|
|
19487
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
19488
|
+
unit: CoordinateUnitSchema,
|
|
19489
|
+
pageIndex: exports_external.number()
|
|
19490
|
+
});
|
|
19491
|
+
PositionedTextSchema = exports_external.object({
|
|
19492
|
+
text: exports_external.string(),
|
|
19493
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19494
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19495
|
+
});
|
|
19496
|
+
TableCellSchema = exports_external.object({
|
|
19497
|
+
content: exports_external.string(),
|
|
19498
|
+
rowIndex: exports_external.number(),
|
|
19499
|
+
columnIndex: exports_external.number(),
|
|
19500
|
+
rowSpan: exports_external.number().default(1),
|
|
19501
|
+
columnSpan: exports_external.number().default(1),
|
|
19502
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19503
|
+
});
|
|
19504
|
+
ExtractedTableSchema = exports_external.object({
|
|
19505
|
+
cells: exports_external.array(TableCellSchema),
|
|
19506
|
+
rowCount: exports_external.number(),
|
|
19507
|
+
columnCount: exports_external.number(),
|
|
19508
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19509
|
+
});
|
|
19510
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
19511
|
+
"paragraph",
|
|
19512
|
+
"title",
|
|
19513
|
+
"sectionHeading",
|
|
19514
|
+
"pageHeader",
|
|
19515
|
+
"pageFooter",
|
|
19516
|
+
"pageNumber",
|
|
19517
|
+
"footnote",
|
|
19518
|
+
"table",
|
|
19519
|
+
"figure",
|
|
19520
|
+
"formulaBlock"
|
|
19521
|
+
]);
|
|
19522
|
+
LayoutElementSchema = exports_external.object({
|
|
19523
|
+
type: LayoutElementTypeSchema,
|
|
19524
|
+
content: exports_external.string(),
|
|
19525
|
+
table: ExtractedTableSchema.optional(),
|
|
19526
|
+
caption: exports_external.string().optional(),
|
|
19527
|
+
figureId: exports_external.string().optional(),
|
|
19528
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19529
|
+
});
|
|
19530
|
+
PageResultSchema = exports_external.object({
|
|
19531
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19532
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19533
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19534
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19535
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19536
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19537
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19538
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19539
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19540
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19541
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19542
|
+
});
|
|
19543
|
+
ParseResultSchema = exports_external.object({
|
|
19544
|
+
document: DocumentMetadataSchema,
|
|
19545
|
+
usage: ParseUsageSchema,
|
|
19546
|
+
pages: exports_external.array(PageResultSchema),
|
|
19547
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19548
|
+
parserType: ParserTypeSchema,
|
|
19549
|
+
parserVersion: exports_external.string().optional(),
|
|
19550
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19551
|
+
rawResponse: exports_external.unknown().optional()
|
|
19552
|
+
});
|
|
19553
|
+
ParseOptionsSchema = exports_external.object({
|
|
19554
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19555
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19556
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19557
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19558
|
+
extractTables: exports_external.boolean().default(true),
|
|
19559
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19560
|
+
model: exports_external.string().optional(),
|
|
19561
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19562
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19563
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19564
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19565
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19566
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19567
|
+
tenantId: exports_external.string().optional()
|
|
19568
|
+
});
|
|
19569
|
+
ParserInputSchema = exports_external.object({
|
|
19570
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19571
|
+
filename: exports_external.string(),
|
|
19572
|
+
mimeType: exports_external.string(),
|
|
19573
|
+
options: ParseOptionsSchema.optional()
|
|
19574
|
+
});
|
|
19575
|
+
EXTENSION_TO_MIME = {
|
|
19576
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19577
|
+
doc: "application/msword",
|
|
19578
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19579
|
+
rtf: "application/rtf",
|
|
19580
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19581
|
+
xls: "application/vnd.ms-excel",
|
|
19582
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19583
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19584
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19585
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19586
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19587
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19588
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19589
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19590
|
+
eml: "message/rfc822",
|
|
19591
|
+
msg: "application/vnd.ms-outlook",
|
|
19592
|
+
epub: "application/epub+zip",
|
|
19593
|
+
pdf: "application/pdf",
|
|
19594
|
+
png: "image/png",
|
|
19595
|
+
jpg: "image/jpeg",
|
|
19596
|
+
jpeg: "image/jpeg",
|
|
19597
|
+
webp: "image/webp",
|
|
19598
|
+
tiff: "image/tiff",
|
|
19599
|
+
tif: "image/tiff",
|
|
19600
|
+
gif: "image/gif",
|
|
19601
|
+
bmp: "image/bmp",
|
|
19602
|
+
svg: "image/svg+xml",
|
|
19603
|
+
txt: "text/plain",
|
|
19604
|
+
md: "text/markdown",
|
|
19605
|
+
markdown: "text/markdown",
|
|
19606
|
+
csv: "text/csv",
|
|
19607
|
+
tsv: "text/tab-separated-values",
|
|
19608
|
+
html: "text/html",
|
|
19609
|
+
htm: "text/html",
|
|
19610
|
+
xml: "text/xml",
|
|
19611
|
+
json: "application/json",
|
|
19612
|
+
yaml: "application/x-yaml",
|
|
19613
|
+
yml: "application/x-yaml",
|
|
19614
|
+
toml: "application/toml",
|
|
19615
|
+
rst: "text/x-rst",
|
|
19616
|
+
org: "text/x-org",
|
|
19617
|
+
tex: "application/x-latex",
|
|
19618
|
+
latex: "application/x-latex",
|
|
19619
|
+
ipynb: "application/x-ipynb+json",
|
|
19620
|
+
bib: "application/x-bibtex",
|
|
19621
|
+
dbk: "application/docbook+xml",
|
|
19622
|
+
docbook: "application/docbook+xml",
|
|
19623
|
+
fb2: "application/x-fictionbook+xml"
|
|
19624
|
+
};
|
|
19625
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19626
|
+
if (!(mime in acc))
|
|
19627
|
+
acc[mime] = ext;
|
|
19628
|
+
return acc;
|
|
19629
|
+
}, {});
|
|
19630
|
+
MIME_TO_LABEL = {
|
|
19631
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19632
|
+
"application/msword": "DOC",
|
|
19633
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19634
|
+
"application/rtf": "RTF",
|
|
19635
|
+
"text/rtf": "RTF",
|
|
19636
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19637
|
+
"application/vnd.ms-excel": "XLS",
|
|
19638
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19639
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19640
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19641
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19642
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19643
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19644
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19645
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19646
|
+
"message/rfc822": "EML",
|
|
19647
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19648
|
+
"application/epub+zip": "EPUB",
|
|
19649
|
+
"application/pdf": "PDF",
|
|
19650
|
+
"image/png": "PNG",
|
|
19651
|
+
"image/jpeg": "JPEG",
|
|
19652
|
+
"image/webp": "WebP",
|
|
19653
|
+
"image/tiff": "TIFF",
|
|
19654
|
+
"image/gif": "GIF",
|
|
19655
|
+
"image/bmp": "BMP",
|
|
19656
|
+
"image/svg+xml": "SVG",
|
|
19657
|
+
"text/plain": "TXT",
|
|
19658
|
+
"text/markdown": "Markdown",
|
|
19659
|
+
"text/csv": "CSV",
|
|
19660
|
+
"text/tab-separated-values": "TSV",
|
|
19661
|
+
"text/html": "HTML",
|
|
19662
|
+
"text/xml": "XML",
|
|
19663
|
+
"application/json": "JSON",
|
|
19664
|
+
"application/x-yaml": "YAML",
|
|
19665
|
+
"application/toml": "TOML",
|
|
19666
|
+
"text/x-rst": "RST",
|
|
19667
|
+
"text/x-org": "Org",
|
|
19668
|
+
"application/x-latex": "LaTeX",
|
|
19669
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19670
|
+
"application/x-bibtex": "BibTeX",
|
|
19671
|
+
"application/docbook+xml": "DocBook",
|
|
19672
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19673
|
+
};
|
|
19674
|
+
});
|
|
19675
|
+
|
|
19676
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19677
|
+
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19678
|
+
var init_document_parser = __esm(() => {
|
|
19679
|
+
init_zod();
|
|
19680
|
+
init_runtime_file_ref();
|
|
19681
|
+
init_parser();
|
|
19682
|
+
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19683
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19684
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19685
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19686
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19687
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19688
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19689
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19690
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19691
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19692
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19693
|
+
describeFigures: exports_external.boolean().optional().describe("Opt-in (default off). After text extraction, detect figure pages with a layout model and caption them with a vision model, appending `<figure>description</figure>` to their text. Skipped for plaintext. The caption vision calls are billed."),
|
|
19694
|
+
figureInstructions: exports_external.string().optional().describe("Custom instruction for the figure-description pass."),
|
|
19695
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19696
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown").optional().describe("Format for extracted text. Only the native (Kreuzberg) parser uses this — OCR/VLM always emit markdown.")
|
|
19697
|
+
}).prefault({});
|
|
19698
|
+
});
|
|
19699
|
+
|
|
19700
|
+
// ../types/src/processor/configs/extract.ts
|
|
19701
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19702
|
+
var init_extract = __esm(() => {
|
|
19703
|
+
init_zod();
|
|
19704
|
+
ExtractInputSchema = exports_external.object({
|
|
19705
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19706
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19707
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19708
|
+
imageData: exports_external.string().optional(),
|
|
19709
|
+
imageMimeType: exports_external.string().optional()
|
|
19710
|
+
}).refine((data) => data.content || data.text, {
|
|
19711
|
+
message: "Either content or text must be provided"
|
|
19712
|
+
});
|
|
19713
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema. Unless grounding is disabled (grounded: false), the output also carries a reserved `_grounding` map keyed by field name: `_grounding.<field> = { confidence: high|medium|low, needsReview, reason?, source_span: { start, end, text, alignment } | null }`, plus reserved `_degraded: true` / `_reason` markers when the grounding LLM pass could not run.");
|
|
19714
|
+
ExtractConfigSchema = exports_external.object({
|
|
19715
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19716
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19717
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19718
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19719
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19720
|
+
grounded: exports_external.boolean().optional().describe("Grounding is ON by default: a grounding pass runs over the schema fields and attaches per-field source spans + confidence under a reserved `_grounding` output key, flagging fields whose value cannot be located in the source for human review. The pass runs through the workspace LLM (any provider) and chunks long documents automatically. Tri-state: unset (default) = on, degrading gracefully to deterministic text alignment (`_grounding._degraded: true`) if no grounding model is available; `true` = strict, the step fails when the grounding model cannot be resolved; `false` = off, no `_grounding` key at all."),
|
|
19721
|
+
groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM. Any configured provider works; the pass only fails the step when `grounded: true` is set explicitly and no model resolves."),
|
|
19722
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
19723
|
+
text: exports_external.string(),
|
|
19724
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19725
|
+
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19726
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences set needsReview on a field. Default: low_only (only fields whose value could not be located in the source). Use medium_or_low to also flag approximate and derived matches.")
|
|
19727
|
+
});
|
|
19728
|
+
});
|
|
19729
|
+
|
|
19730
|
+
// ../types/src/processor/configs/merge.ts
|
|
19731
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19732
|
+
var init_merge = __esm(() => {
|
|
19733
|
+
init_zod();
|
|
19734
|
+
MergeConfigSchema = exports_external.object({
|
|
19735
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19736
|
+
outputKey: exports_external.string().optional()
|
|
19737
|
+
});
|
|
19738
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19739
|
+
MergeOutputSchema = exports_external.object({
|
|
19740
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19741
|
+
count: exports_external.number(),
|
|
19742
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19743
|
+
});
|
|
19744
|
+
});
|
|
19745
|
+
|
|
19746
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19747
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19748
|
+
var init_pdf_embedder = __esm(() => {
|
|
19749
|
+
init_zod();
|
|
19750
|
+
init_runtime_file_ref();
|
|
19751
|
+
init_parser();
|
|
19752
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19753
|
+
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19754
|
+
parseResult: exports_external.object({
|
|
19755
|
+
pages: exports_external.array(PageResultSchema),
|
|
19756
|
+
text: exports_external.string().optional()
|
|
19757
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19758
|
+
});
|
|
19759
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19760
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19761
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19762
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19763
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19764
|
+
});
|
|
19765
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19766
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19767
|
+
confidenceThreshold: exports_external.number().min(0).max(1).default(0.7).describe("Minimum OCR confidence (0-1) to include a word. Lower = more words but more errors")
|
|
19768
|
+
}).prefault({});
|
|
19769
|
+
});
|
|
19770
|
+
|
|
19771
|
+
// ../types/src/processor/configs/segment.ts
|
|
19772
|
+
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19773
|
+
var init_segment = __esm(() => {
|
|
19774
|
+
init_zod();
|
|
19775
|
+
SegmentInputSchema = exports_external.object({
|
|
19776
|
+
pages: exports_external.array(exports_external.object({
|
|
19777
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19778
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19779
|
+
pageName: exports_external.string().optional()
|
|
19780
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19781
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19782
|
+
SegmentConfigSchema = exports_external.object({
|
|
19783
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
19784
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19785
|
+
description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the visual cues that mark its FIRST page. Fed to the LLM as guidance for both boundary detection and typing.")
|
|
19786
|
+
})).min(1).describe('The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved "unknown" type when none fit.'),
|
|
19787
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19788
|
+
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19789
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper boundaries on dense batches; larger windows when documents routinely exceed the per-window page count.")
|
|
19790
|
+
});
|
|
19791
|
+
ConfidenceLevelSchema = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19792
|
+
SegmentSummarySchema = exports_external.object({
|
|
19793
|
+
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19794
|
+
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19795
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19796
|
+
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19797
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19798
|
+
needsReview: exports_external.array(exports_external.object({
|
|
19799
|
+
index: exports_external.number().int(),
|
|
19800
|
+
type: exports_external.string(),
|
|
19801
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19802
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19803
|
+
notes: exports_external.string()
|
|
19804
|
+
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19805
|
+
});
|
|
19806
|
+
SegmentOutputSchema = exports_external.object({
|
|
19807
|
+
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19808
|
+
documents: exports_external.array(exports_external.object({
|
|
19809
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19810
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19811
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19812
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19813
|
+
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19814
|
+
evidence: exports_external.object({
|
|
19815
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19816
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19817
|
+
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19818
|
+
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19819
|
+
pages: exports_external.array(exports_external.object({
|
|
19820
|
+
pageIndex: exports_external.number().int(),
|
|
19821
|
+
text: exports_external.string(),
|
|
19822
|
+
pageName: exports_external.string().optional(),
|
|
19823
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19824
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19825
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19826
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19827
|
+
}))
|
|
19828
|
+
});
|
|
19829
|
+
});
|
|
19830
|
+
|
|
19831
|
+
// ../types/src/processor/configs/split.ts
|
|
19832
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitSectionSchema, SplitOutputSchema;
|
|
19833
|
+
var init_split = __esm(() => {
|
|
19834
|
+
init_zod();
|
|
19835
|
+
SplitInputSchema = exports_external.object({
|
|
19836
|
+
pages: exports_external.array(exports_external.object({
|
|
19837
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19838
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19839
|
+
pageName: exports_external.string().optional()
|
|
19840
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19841
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19842
|
+
SplitConfigSchema = exports_external.object({
|
|
19843
|
+
sections: exports_external.array(exports_external.object({
|
|
19844
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19845
|
+
description: exports_external.string().min(1).describe("What this section looks like in the document. Use the document's own terminology (e.g. 'Príloha 2 / Anlage 2') and visual cues."),
|
|
19846
|
+
required: exports_external.boolean().optional().describe('If true, log a warn when this section is not found, and lean the LLM toward expecting it. Default: false (Reducto-style "may be absent").'),
|
|
19847
|
+
endHints: exports_external.array(exports_external.string()).optional().describe('Natural-language hints fed to the LLM about what marks the END of this section (e.g. ["PRÍPAD PORUŠENIA ZMLUVY", "*Koniec prílohy*", "the next chapter heading"]). The LLM uses these as guidance — not a regex match — so casing variants, missing diacritics, and multilingual phrasings still close the section correctly. The LLM emits a structured end_anchor per section it judges closed; deterministic merge applies it.')
|
|
19848
|
+
})).min(1),
|
|
19849
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19850
|
+
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19851
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper anchors on contract-style documents (less competing context for the LLM to mis-anchor on); 50k–100k when sections routinely exceed per-window page count.")
|
|
19852
|
+
});
|
|
19853
|
+
ConfidenceLevelSchema2 = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19854
|
+
SplitSectionSchema = exports_external.object({
|
|
19855
|
+
name: exports_external.string(),
|
|
19856
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19857
|
+
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19858
|
+
notes: exports_external.string(),
|
|
19859
|
+
evidence: exports_external.object({
|
|
19860
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19861
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19862
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19863
|
+
end_evidence: exports_external.object({
|
|
19864
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19865
|
+
confidence: ConfidenceLevelSchema2,
|
|
19866
|
+
notes: exports_external.string().describe("LLM justification for the end. Pairs with start-anchor `notes` so a reconciliation pass can judge whether the section is correctly bounded.")
|
|
19867
|
+
}).optional().describe("Set when the LLM flagged a section close (matched against `endHints` or detected end-of-section markers). Absent when the section was closed by deterministic continuity-fill (next section start - 1)."),
|
|
19868
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19869
|
+
pages: exports_external.array(exports_external.object({
|
|
19870
|
+
pageIndex: exports_external.number().int(),
|
|
19871
|
+
text: exports_external.string(),
|
|
19872
|
+
pageName: exports_external.string().optional(),
|
|
19873
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19874
|
+
})).describe("Raw per-page records covered by this split (in page order). Use when downstream needs to iterate page-by-page rather than treating the section as one blob."),
|
|
19875
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19876
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19877
|
+
});
|
|
19878
|
+
SplitOutputSchema = exports_external.object({
|
|
19879
|
+
splits: exports_external.array(SplitSectionSchema),
|
|
19880
|
+
sections: exports_external.record(exports_external.string(), SplitSectionSchema).describe("The same sections keyed by their config name, for direct reference: `steps.<split>.output.sections.<name>.page_range`. On the rare duplicate name, the last section wins; use `splits` for the full ordered list.")
|
|
19881
|
+
});
|
|
19882
|
+
});
|
|
19883
|
+
|
|
19884
|
+
// ../types/src/processor/configs/template.ts
|
|
19885
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19886
|
+
var init_template = __esm(() => {
|
|
19887
|
+
init_zod();
|
|
19888
|
+
TemplateInputSchema = exports_external.object({
|
|
19889
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19890
|
+
});
|
|
19891
|
+
TemplateOutputSchema = exports_external.object({
|
|
19892
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19893
|
+
});
|
|
19894
|
+
TemplateConfigSchema = exports_external.object({
|
|
19895
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19896
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19897
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19898
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19899
|
+
});
|
|
19900
|
+
});
|
|
19901
|
+
|
|
19902
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19903
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19904
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19905
|
+
init_zod();
|
|
19906
|
+
init_runtime_file_ref();
|
|
19907
|
+
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19908
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19909
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19910
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19911
|
+
});
|
|
19912
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19913
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19914
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19915
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19916
|
+
});
|
|
19917
|
+
});
|
|
19918
|
+
|
|
19919
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19920
|
+
function extractFieldMetadata(schema) {
|
|
19921
|
+
const fields = [];
|
|
19922
|
+
let inner = schema;
|
|
19923
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19924
|
+
inner = inner.unwrap();
|
|
19925
|
+
}
|
|
19926
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19927
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19928
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19929
|
+
}
|
|
19930
|
+
}
|
|
19931
|
+
return fields;
|
|
19932
|
+
}
|
|
19933
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19934
|
+
let current = schema;
|
|
19935
|
+
let required2 = true;
|
|
19936
|
+
let defaultValue = undefined;
|
|
19937
|
+
let description = current.description;
|
|
19938
|
+
while (true) {
|
|
19939
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19940
|
+
required2 = false;
|
|
19941
|
+
current = current.unwrap();
|
|
19942
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19943
|
+
defaultValue = current._def.defaultValue;
|
|
19944
|
+
current = current.unwrap();
|
|
19945
|
+
} else {
|
|
19946
|
+
break;
|
|
19947
|
+
}
|
|
19948
|
+
description ??= current.description;
|
|
19949
|
+
}
|
|
19950
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19951
|
+
if (current instanceof exports_external.ZodString)
|
|
19952
|
+
return { ...base, type: "string" };
|
|
19953
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19954
|
+
let min;
|
|
19955
|
+
let max;
|
|
19956
|
+
for (const c of current._def.checks ?? []) {
|
|
19957
|
+
const def = c._zod.def;
|
|
19958
|
+
if (def.check === "greater_than")
|
|
19959
|
+
min = def.value;
|
|
19960
|
+
if (def.check === "less_than")
|
|
19961
|
+
max = def.value;
|
|
19962
|
+
}
|
|
19963
|
+
return { ...base, type: "number", min, max };
|
|
19964
|
+
}
|
|
19965
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19966
|
+
return { ...base, type: "boolean" };
|
|
19967
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19968
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19969
|
+
}
|
|
19970
|
+
if (current instanceof exports_external.ZodArray)
|
|
19971
|
+
return { ...base, type: "array" };
|
|
19972
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19973
|
+
return { ...base, type: "object" };
|
|
19974
|
+
}
|
|
19975
|
+
return base;
|
|
19976
|
+
}
|
|
19977
|
+
function getConfigFieldMetadata(processorId) {
|
|
19978
|
+
const schema = getConfigSchema(processorId);
|
|
19979
|
+
if (!schema)
|
|
19980
|
+
return;
|
|
19981
|
+
return extractFieldMetadata(schema);
|
|
19982
|
+
}
|
|
19983
|
+
function getConfigDefaults(processorId) {
|
|
19984
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19985
|
+
if (!schema)
|
|
19986
|
+
return {};
|
|
19987
|
+
try {
|
|
19988
|
+
const result = schema.safeParse({});
|
|
19989
|
+
if (result.success) {
|
|
19990
|
+
return result.data;
|
|
19991
|
+
}
|
|
19992
|
+
} catch {}
|
|
19993
|
+
const fields = extractFieldMetadata(schema);
|
|
19994
|
+
const defaults = {};
|
|
19995
|
+
for (const field of fields) {
|
|
19996
|
+
if (field.defaultValue !== undefined) {
|
|
19997
|
+
defaults[field.name] = field.defaultValue;
|
|
19998
|
+
}
|
|
19999
|
+
}
|
|
20000
|
+
return defaults;
|
|
20001
|
+
}
|
|
20002
|
+
function validateConfig(processorId, config2) {
|
|
20003
|
+
const schema = getConfigSchema(processorId);
|
|
20004
|
+
if (!schema) {
|
|
20005
|
+
return { valid: true, errors: {} };
|
|
20006
|
+
}
|
|
20007
|
+
const result = schema.safeParse(config2);
|
|
20008
|
+
if (result.success) {
|
|
20009
|
+
return { valid: true, errors: {} };
|
|
20010
|
+
}
|
|
20011
|
+
const errors3 = {};
|
|
20012
|
+
for (const issue2 of result.error.issues) {
|
|
20013
|
+
const path = issue2.path.join(".");
|
|
20014
|
+
errors3[path] = issue2.message;
|
|
20015
|
+
}
|
|
20016
|
+
return { valid: false, errors: errors3 };
|
|
20017
|
+
}
|
|
20018
|
+
var init_react_hook_form = __esm(() => {
|
|
20019
|
+
init_zod();
|
|
20020
|
+
init_configs();
|
|
20021
|
+
});
|
|
20022
|
+
|
|
20023
|
+
// ../types/src/processor/configs/index.ts
|
|
20024
|
+
function getProcessorSchemas(processorId) {
|
|
20025
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
20026
|
+
}
|
|
20027
|
+
function getConfigSchema(processorId) {
|
|
20028
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
20029
|
+
}
|
|
20030
|
+
function getAllProcessorJsonSchemas() {
|
|
20031
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
20032
|
+
id: p.id,
|
|
20033
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
20034
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
20035
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
20036
|
+
}));
|
|
20037
|
+
}
|
|
20038
|
+
function listProcessorIds() {
|
|
20039
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
20040
|
+
}
|
|
20041
|
+
var PROCESSOR_SCHEMAS;
|
|
20042
|
+
var init_configs = __esm(() => {
|
|
20043
|
+
init_common();
|
|
20044
|
+
init_ids();
|
|
20045
|
+
init_classify();
|
|
20046
|
+
init_classify_pages();
|
|
20047
|
+
init_document_parser();
|
|
20048
|
+
init_extract();
|
|
20049
|
+
init_merge();
|
|
20050
|
+
init_pdf_embedder();
|
|
20051
|
+
init_segment();
|
|
20052
|
+
init_split();
|
|
20053
|
+
init_template();
|
|
20054
|
+
init_xlsx_to_json();
|
|
20055
|
+
init_react_hook_form();
|
|
20056
|
+
init_classify();
|
|
20057
|
+
init_classify_pages();
|
|
20058
|
+
init_document_parser();
|
|
20059
|
+
init_extract();
|
|
20060
|
+
init_merge();
|
|
20061
|
+
init_pdf_embedder();
|
|
20062
|
+
init_segment();
|
|
20063
|
+
init_split();
|
|
20064
|
+
init_template();
|
|
20065
|
+
init_xlsx_to_json();
|
|
20066
|
+
PROCESSOR_SCHEMAS = {
|
|
20067
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
20068
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
20069
|
+
inputSchema: ExtractInputSchema,
|
|
20070
|
+
outputSchema: ExtractOutputSchema,
|
|
20071
|
+
configSchema: ExtractConfigSchema
|
|
20072
|
+
},
|
|
20073
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
20074
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
20075
|
+
inputSchema: DocumentParserInputSchema,
|
|
20076
|
+
outputSchema: DocumentParserOutputSchema,
|
|
20077
|
+
configSchema: DocumentParserConfigSchema
|
|
20078
|
+
},
|
|
20079
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
20080
|
+
id: PROCESSOR_IDS.MERGE,
|
|
20081
|
+
inputSchema: MergeInputSchema,
|
|
20082
|
+
outputSchema: MergeOutputSchema,
|
|
20083
|
+
configSchema: MergeConfigSchema
|
|
20084
|
+
},
|
|
20085
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
20086
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
20087
|
+
inputSchema: TemplateInputSchema,
|
|
20088
|
+
outputSchema: TemplateOutputSchema,
|
|
20089
|
+
configSchema: TemplateConfigSchema
|
|
20090
|
+
},
|
|
20091
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
20092
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
20093
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
20094
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
20095
|
+
configSchema: PdfEmbedderConfigSchema
|
|
20096
|
+
},
|
|
20097
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
20098
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
20099
|
+
inputSchema: SplitInputSchema,
|
|
20100
|
+
outputSchema: SplitOutputSchema,
|
|
20101
|
+
configSchema: SplitConfigSchema
|
|
20102
|
+
},
|
|
20103
|
+
[PROCESSOR_IDS.SEGMENT]: {
|
|
20104
|
+
id: PROCESSOR_IDS.SEGMENT,
|
|
20105
|
+
inputSchema: SegmentInputSchema,
|
|
20106
|
+
outputSchema: SegmentOutputSchema,
|
|
20107
|
+
configSchema: SegmentConfigSchema
|
|
20108
|
+
},
|
|
20109
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
20110
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
20111
|
+
inputSchema: ClassifyInputSchema,
|
|
20112
|
+
outputSchema: ClassifyOutputSchema,
|
|
20113
|
+
configSchema: ClassifyConfigSchema
|
|
20114
|
+
},
|
|
20115
|
+
[PROCESSOR_IDS.CLASSIFY_PAGES]: {
|
|
20116
|
+
id: PROCESSOR_IDS.CLASSIFY_PAGES,
|
|
20117
|
+
inputSchema: ClassifyPagesInputSchema,
|
|
20118
|
+
outputSchema: ClassifyPagesOutputSchema,
|
|
20119
|
+
configSchema: ClassifyPagesConfigSchema
|
|
20120
|
+
},
|
|
20121
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
20122
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
20123
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
20124
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
20125
|
+
configSchema: XlsxToJsonConfigSchema
|
|
20126
|
+
}
|
|
20127
|
+
};
|
|
20128
|
+
});
|
|
20129
|
+
|
|
17496
20130
|
// ../types/src/processor/index.ts
|
|
17497
|
-
var
|
|
20131
|
+
var init_processor2 = __esm(() => {
|
|
20132
|
+
init_processor();
|
|
20133
|
+
init_execution();
|
|
20134
|
+
init_configs();
|
|
20135
|
+
});
|
|
17498
20136
|
|
|
17499
20137
|
// ../types/src/parser/index.ts
|
|
17500
|
-
var
|
|
20138
|
+
var init_parser2 = __esm(() => {
|
|
20139
|
+
init_parser();
|
|
20140
|
+
});
|
|
17501
20141
|
|
|
17502
20142
|
// ../types/src/otel/semantic-conventions.ts
|
|
17503
20143
|
function mapLLMAttributes(attrs) {
|
|
@@ -20535,9 +23175,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
20535
23175
|
}
|
|
20536
23176
|
let expr = data;
|
|
20537
23177
|
const segments = jsonPointer.split("/");
|
|
20538
|
-
for (const
|
|
20539
|
-
if (
|
|
20540
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
23178
|
+
for (const segment2 of segments) {
|
|
23179
|
+
if (segment2) {
|
|
23180
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
|
|
20541
23181
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
20542
23182
|
}
|
|
20543
23183
|
}
|
|
@@ -20817,7 +23457,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20817
23457
|
});
|
|
20818
23458
|
|
|
20819
23459
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20820
|
-
var
|
|
23460
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20821
23461
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20822
23462
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
20823
23463
|
function stringArrayToHexStripped(input) {
|
|
@@ -21073,7 +23713,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
21073
23713
|
|
|
21074
23714
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
21075
23715
|
var require_schemes = __commonJS((exports, module) => {
|
|
21076
|
-
var { isUUID } =
|
|
23716
|
+
var { isUUID } = require_utils3();
|
|
21077
23717
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
21078
23718
|
var supportedSchemeNames = [
|
|
21079
23719
|
"http",
|
|
@@ -21247,7 +23887,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
21247
23887
|
|
|
21248
23888
|
// ../../node_modules/fast-uri/index.js
|
|
21249
23889
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
21250
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23890
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
21251
23891
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
21252
23892
|
function normalize(uri, options) {
|
|
21253
23893
|
if (typeof uri === "string") {
|
|
@@ -23657,7 +26297,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23657
26297
|
});
|
|
23658
26298
|
|
|
23659
26299
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23660
|
-
var
|
|
26300
|
+
var require_types2 = __commonJS((exports) => {
|
|
23661
26301
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23662
26302
|
exports.DiscrError = undefined;
|
|
23663
26303
|
var DiscrError;
|
|
@@ -23671,7 +26311,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23671
26311
|
var require_discriminator = __commonJS((exports) => {
|
|
23672
26312
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23673
26313
|
var codegen_1 = require_codegen();
|
|
23674
|
-
var types_1 =
|
|
26314
|
+
var types_1 = require_types2();
|
|
23675
26315
|
var compile_1 = require_compile();
|
|
23676
26316
|
var ref_error_1 = require_ref_error();
|
|
23677
26317
|
var util_1 = require_util();
|
|
@@ -24599,24 +27239,6 @@ var init_validation = __esm(() => {
|
|
|
24599
27239
|
init_workspace_schema();
|
|
24600
27240
|
});
|
|
24601
27241
|
|
|
24602
|
-
// ../types/src/core/common.ts
|
|
24603
|
-
function toJsonSchema2(schema) {
|
|
24604
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24605
|
-
}
|
|
24606
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24607
|
-
var init_common = __esm(() => {
|
|
24608
|
-
init_zod();
|
|
24609
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24610
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24611
|
-
});
|
|
24612
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24613
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24614
|
-
id: exports_external.string(),
|
|
24615
|
-
createdAt: TimestampSchema2.optional(),
|
|
24616
|
-
updatedAt: TimestampSchema2.optional()
|
|
24617
|
-
});
|
|
24618
|
-
});
|
|
24619
|
-
|
|
24620
27242
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24621
27243
|
var require_lib = __commonJS((exports) => {
|
|
24622
27244
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -25030,12 +27652,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
25030
27652
|
}
|
|
25031
27653
|
const ParseErrorConstructors = {};
|
|
25032
27654
|
for (const reasonCode of Object.keys(argument)) {
|
|
25033
|
-
const
|
|
25034
|
-
const _ref = typeof
|
|
25035
|
-
message: () =>
|
|
25036
|
-
} : typeof
|
|
25037
|
-
message:
|
|
25038
|
-
} :
|
|
27655
|
+
const template2 = argument[reasonCode];
|
|
27656
|
+
const _ref = typeof template2 === "string" ? {
|
|
27657
|
+
message: () => template2
|
|
27658
|
+
} : typeof template2 === "function" ? {
|
|
27659
|
+
message: template2
|
|
27660
|
+
} : template2, {
|
|
25039
27661
|
message
|
|
25040
27662
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
25041
27663
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39508,7 +42130,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39508
42130
|
});
|
|
39509
42131
|
|
|
39510
42132
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39511
|
-
var
|
|
42133
|
+
var require_types3 = __commonJS((exports) => {
|
|
39512
42134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39513
42135
|
var TokenType;
|
|
39514
42136
|
(function(TokenType2) {
|
|
@@ -39572,8 +42194,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39572
42194
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39573
42195
|
const arrow = 22528;
|
|
39574
42196
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39575
|
-
const
|
|
39576
|
-
TokenType2[TokenType2["template"] =
|
|
42197
|
+
const template2 = 23552;
|
|
42198
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39577
42199
|
const ellipsis = 24576;
|
|
39578
42200
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39579
42201
|
const backQuote = 25600;
|
|
@@ -39992,7 +42614,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39992
42614
|
var require_state = __commonJS((exports) => {
|
|
39993
42615
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39994
42616
|
var _keywords = require_keywords();
|
|
39995
|
-
var _types =
|
|
42617
|
+
var _types = require_types3();
|
|
39996
42618
|
|
|
39997
42619
|
class Scope {
|
|
39998
42620
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -40378,7 +43000,7 @@ var require_base = __commonJS((exports) => {
|
|
|
40378
43000
|
var require_util2 = __commonJS((exports) => {
|
|
40379
43001
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40380
43002
|
var _index = require_tokenizer();
|
|
40381
|
-
var _types =
|
|
43003
|
+
var _types = require_types3();
|
|
40382
43004
|
var _charcodes = require_charcodes();
|
|
40383
43005
|
var _base = require_base();
|
|
40384
43006
|
function isContextual(contextualKeyword) {
|
|
@@ -40540,7 +43162,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40540
43162
|
var require_readWordTree = __commonJS((exports) => {
|
|
40541
43163
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40542
43164
|
var _keywords = require_keywords();
|
|
40543
|
-
var _types =
|
|
43165
|
+
var _types = require_types3();
|
|
40544
43166
|
var READ_WORD_TREE = new Int32Array([
|
|
40545
43167
|
-1,
|
|
40546
43168
|
27,
|
|
@@ -49518,7 +52140,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49518
52140
|
var _identifier = require_identifier();
|
|
49519
52141
|
var _index = require_tokenizer();
|
|
49520
52142
|
var _readWordTree = require_readWordTree();
|
|
49521
|
-
var _types =
|
|
52143
|
+
var _types = require_types3();
|
|
49522
52144
|
function readWord() {
|
|
49523
52145
|
let treePos = 0;
|
|
49524
52146
|
let code = 0;
|
|
@@ -49584,7 +52206,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49584
52206
|
var _keywords = require_keywords();
|
|
49585
52207
|
var _readWord = require_readWord();
|
|
49586
52208
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49587
|
-
var _types =
|
|
52209
|
+
var _types = require_types3();
|
|
49588
52210
|
var IdentifierRole;
|
|
49589
52211
|
(function(IdentifierRole2) {
|
|
49590
52212
|
const Access = 0;
|
|
@@ -50301,7 +52923,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
50301
52923
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
50302
52924
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
50303
52925
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50304
|
-
var _types =
|
|
52926
|
+
var _types = require_types3();
|
|
50305
52927
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
50306
52928
|
let endIndex = index + 1;
|
|
50307
52929
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50654,7 +53276,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50654
53276
|
var _xhtml = require_xhtml();
|
|
50655
53277
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50656
53278
|
var _tokenizer = require_tokenizer();
|
|
50657
|
-
var _types =
|
|
53279
|
+
var _types = require_types3();
|
|
50658
53280
|
var _charcodes = require_charcodes();
|
|
50659
53281
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50660
53282
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51158,7 +53780,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
51158
53780
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
51159
53781
|
}
|
|
51160
53782
|
var _tokenizer = require_tokenizer();
|
|
51161
|
-
var _types =
|
|
53783
|
+
var _types = require_types3();
|
|
51162
53784
|
var _JSXTransformer = require_JSXTransformer();
|
|
51163
53785
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
51164
53786
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51197,7 +53819,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
51197
53819
|
}
|
|
51198
53820
|
var _tokenizer = require_tokenizer();
|
|
51199
53821
|
var _keywords = require_keywords();
|
|
51200
|
-
var _types =
|
|
53822
|
+
var _types = require_types3();
|
|
51201
53823
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
51202
53824
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
51203
53825
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -51968,18 +54590,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
51968
54590
|
continue;
|
|
51969
54591
|
let genColumn = 0;
|
|
51970
54592
|
for (let j = 0;j < line.length; j++) {
|
|
51971
|
-
const
|
|
54593
|
+
const segment2 = line[j];
|
|
51972
54594
|
if (j > 0)
|
|
51973
54595
|
writer.write(comma);
|
|
51974
|
-
genColumn = encodeInteger(writer,
|
|
51975
|
-
if (
|
|
54596
|
+
genColumn = encodeInteger(writer, segment2[0], genColumn);
|
|
54597
|
+
if (segment2.length === 1)
|
|
51976
54598
|
continue;
|
|
51977
|
-
sourcesIndex = encodeInteger(writer,
|
|
51978
|
-
sourceLine = encodeInteger(writer,
|
|
51979
|
-
sourceColumn = encodeInteger(writer,
|
|
51980
|
-
if (
|
|
54599
|
+
sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
|
|
54600
|
+
sourceLine = encodeInteger(writer, segment2[2], sourceLine);
|
|
54601
|
+
sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
|
|
54602
|
+
if (segment2.length === 4)
|
|
51981
54603
|
continue;
|
|
51982
|
-
namesIndex = encodeInteger(writer,
|
|
54604
|
+
namesIndex = encodeInteger(writer, segment2[4], namesIndex);
|
|
51983
54605
|
}
|
|
51984
54606
|
}
|
|
51985
54607
|
return writer.flush();
|
|
@@ -52534,11 +55156,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52534
55156
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
52535
55157
|
if (index === -1)
|
|
52536
55158
|
return OMapping(null, null, null, null);
|
|
52537
|
-
const
|
|
52538
|
-
if (
|
|
55159
|
+
const segment2 = segments[index];
|
|
55160
|
+
if (segment2.length === 1)
|
|
52539
55161
|
return OMapping(null, null, null, null);
|
|
52540
55162
|
const { names, resolvedSources } = map2;
|
|
52541
|
-
return OMapping(resolvedSources[
|
|
55163
|
+
return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
|
|
52542
55164
|
}
|
|
52543
55165
|
function generatedPositionFor(map2, needle) {
|
|
52544
55166
|
const { source, line, column, bias } = needle;
|
|
@@ -52651,8 +55273,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52651
55273
|
const max = upperBound(segments, matchedColumn, min);
|
|
52652
55274
|
const result = [];
|
|
52653
55275
|
for (;min <= max; min++) {
|
|
52654
|
-
const
|
|
52655
|
-
result.push(GMapping(
|
|
55276
|
+
const segment2 = segments[min];
|
|
55277
|
+
result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
|
|
52656
55278
|
}
|
|
52657
55279
|
return result;
|
|
52658
55280
|
}
|
|
@@ -52680,8 +55302,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52680
55302
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
52681
55303
|
if (index === -1)
|
|
52682
55304
|
return GMapping(null, null);
|
|
52683
|
-
const
|
|
52684
|
-
return GMapping(
|
|
55305
|
+
const segment2 = segments[index];
|
|
55306
|
+
return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
|
|
52685
55307
|
}
|
|
52686
55308
|
});
|
|
52687
55309
|
});
|
|
@@ -53232,7 +55854,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
53232
55854
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
53233
55855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53234
55856
|
var _tokenizer = require_tokenizer();
|
|
53235
|
-
var _types =
|
|
55857
|
+
var _types = require_types3();
|
|
53236
55858
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
53237
55859
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
53238
55860
|
return;
|
|
@@ -53297,7 +55919,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
53297
55919
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
53298
55920
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
53299
55921
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53300
|
-
var _types =
|
|
55922
|
+
var _types = require_types3();
|
|
53301
55923
|
function getIdentifierNames(code, tokens) {
|
|
53302
55924
|
const names = [];
|
|
53303
55925
|
for (const token of tokens) {
|
|
@@ -53473,7 +56095,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53473
56095
|
});
|
|
53474
56096
|
|
|
53475
56097
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53476
|
-
var
|
|
56098
|
+
var require_types4 = __commonJS((exports) => {
|
|
53477
56099
|
var __extends = exports && exports.__extends || function() {
|
|
53478
56100
|
var extendStatics = function(d, b) {
|
|
53479
56101
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -54073,9 +56695,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
54073
56695
|
};
|
|
54074
56696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54075
56697
|
exports.Checker = exports.createCheckers = undefined;
|
|
54076
|
-
var types_1 =
|
|
56698
|
+
var types_1 = require_types4();
|
|
54077
56699
|
var util_1 = require_util3();
|
|
54078
|
-
var types_2 =
|
|
56700
|
+
var types_2 = require_types4();
|
|
54079
56701
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
54080
56702
|
return types_2.TArray;
|
|
54081
56703
|
} });
|
|
@@ -54357,7 +56979,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
54357
56979
|
var _typescript = require_typescript();
|
|
54358
56980
|
var _index = require_tokenizer();
|
|
54359
56981
|
var _keywords = require_keywords();
|
|
54360
|
-
var _types =
|
|
56982
|
+
var _types = require_types3();
|
|
54361
56983
|
var _base = require_base();
|
|
54362
56984
|
var _expression = require_expression();
|
|
54363
56985
|
var _util = require_util2();
|
|
@@ -54489,7 +57111,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54489
57111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54490
57112
|
var _index = require_tokenizer();
|
|
54491
57113
|
var _keywords = require_keywords();
|
|
54492
|
-
var _types =
|
|
57114
|
+
var _types = require_types3();
|
|
54493
57115
|
var _base = require_base();
|
|
54494
57116
|
var _expression = require_expression();
|
|
54495
57117
|
var _lval = require_lval();
|
|
@@ -55751,7 +58373,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55751
58373
|
var require_jsx = __commonJS((exports) => {
|
|
55752
58374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55753
58375
|
var _index = require_tokenizer();
|
|
55754
|
-
var _types =
|
|
58376
|
+
var _types = require_types3();
|
|
55755
58377
|
var _base = require_base();
|
|
55756
58378
|
var _expression = require_expression();
|
|
55757
58379
|
var _util = require_util2();
|
|
@@ -56014,10 +58636,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
56014
58636
|
});
|
|
56015
58637
|
|
|
56016
58638
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
56017
|
-
var
|
|
58639
|
+
var require_types5 = __commonJS((exports) => {
|
|
56018
58640
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56019
58641
|
var _index = require_tokenizer();
|
|
56020
|
-
var _types =
|
|
58642
|
+
var _types = require_types3();
|
|
56021
58643
|
var _base = require_base();
|
|
56022
58644
|
var _expression = require_expression();
|
|
56023
58645
|
var _flow = require_flow();
|
|
@@ -56050,12 +58672,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
56050
58672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56051
58673
|
var _flow = require_flow();
|
|
56052
58674
|
var _index = require_jsx();
|
|
56053
|
-
var _types =
|
|
58675
|
+
var _types = require_types5();
|
|
56054
58676
|
var _typescript = require_typescript();
|
|
56055
58677
|
var _index3 = require_tokenizer();
|
|
56056
58678
|
var _keywords = require_keywords();
|
|
56057
58679
|
var _state = require_state();
|
|
56058
|
-
var _types3 =
|
|
58680
|
+
var _types3 = require_types3();
|
|
56059
58681
|
var _charcodes = require_charcodes();
|
|
56060
58682
|
var _identifier = require_identifier();
|
|
56061
58683
|
var _base = require_base();
|
|
@@ -56771,7 +59393,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56771
59393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56772
59394
|
var _index = require_tokenizer();
|
|
56773
59395
|
var _keywords = require_keywords();
|
|
56774
|
-
var _types =
|
|
59396
|
+
var _types = require_types3();
|
|
56775
59397
|
var _base = require_base();
|
|
56776
59398
|
var _expression = require_expression();
|
|
56777
59399
|
var _statement = require_statement();
|
|
@@ -57646,7 +60268,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57646
60268
|
var _tokenizer = require_tokenizer();
|
|
57647
60269
|
var _keywords = require_keywords();
|
|
57648
60270
|
var _state = require_state();
|
|
57649
|
-
var _types =
|
|
60271
|
+
var _types = require_types3();
|
|
57650
60272
|
var _charcodes = require_charcodes();
|
|
57651
60273
|
var _base = require_base();
|
|
57652
60274
|
var _expression = require_expression();
|
|
@@ -58681,7 +61303,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58681
61303
|
function _interopRequireDefault(obj) {
|
|
58682
61304
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58683
61305
|
}
|
|
58684
|
-
var _types =
|
|
61306
|
+
var _types = require_types3();
|
|
58685
61307
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58686
61308
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58687
61309
|
|
|
@@ -58939,7 +61561,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58939
61561
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58940
61562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58941
61563
|
var _keywords = require_keywords();
|
|
58942
|
-
var _types =
|
|
61564
|
+
var _types = require_types3();
|
|
58943
61565
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58944
61566
|
const snapshot = tokens.snapshot();
|
|
58945
61567
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -59177,7 +61799,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
59177
61799
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
59178
61800
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
59179
61801
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59180
|
-
var _types =
|
|
61802
|
+
var _types = require_types3();
|
|
59181
61803
|
function elideImportEquals(tokens) {
|
|
59182
61804
|
tokens.removeInitialToken();
|
|
59183
61805
|
tokens.removeToken();
|
|
@@ -59201,7 +61823,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
59201
61823
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
59202
61824
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59203
61825
|
var _tokenizer = require_tokenizer();
|
|
59204
|
-
var _types =
|
|
61826
|
+
var _types = require_types3();
|
|
59205
61827
|
var EMPTY_DECLARATION_INFO = {
|
|
59206
61828
|
typeDeclarations: new Set,
|
|
59207
61829
|
valueDeclarations: new Set
|
|
@@ -59229,7 +61851,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
59229
61851
|
var require_isExportFrom = __commonJS((exports) => {
|
|
59230
61852
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59231
61853
|
var _keywords = require_keywords();
|
|
59232
|
-
var _types =
|
|
61854
|
+
var _types = require_types3();
|
|
59233
61855
|
function isExportFrom(tokens) {
|
|
59234
61856
|
let closeBraceIndex = tokens.currentIndex();
|
|
59235
61857
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -59244,7 +61866,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
59244
61866
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
59245
61867
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59246
61868
|
var _keywords = require_keywords();
|
|
59247
|
-
var _types =
|
|
61869
|
+
var _types = require_types3();
|
|
59248
61870
|
function removeMaybeImportAttributes(tokens) {
|
|
59249
61871
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
59250
61872
|
tokens.removeToken();
|
|
@@ -59259,7 +61881,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
59259
61881
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
59260
61882
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
59261
61883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59262
|
-
var _types =
|
|
61884
|
+
var _types = require_types3();
|
|
59263
61885
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
59264
61886
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
59265
61887
|
return false;
|
|
@@ -59290,7 +61912,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
59290
61912
|
}
|
|
59291
61913
|
var _tokenizer = require_tokenizer();
|
|
59292
61914
|
var _keywords = require_keywords();
|
|
59293
|
-
var _types =
|
|
61915
|
+
var _types = require_types3();
|
|
59294
61916
|
var _elideImportEquals = require_elideImportEquals();
|
|
59295
61917
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59296
61918
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59932,7 +62554,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59932
62554
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59933
62555
|
}
|
|
59934
62556
|
var _keywords = require_keywords();
|
|
59935
|
-
var _types =
|
|
62557
|
+
var _types = require_types3();
|
|
59936
62558
|
var _elideImportEquals = require_elideImportEquals();
|
|
59937
62559
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59938
62560
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -60202,7 +62824,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
60202
62824
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60203
62825
|
}
|
|
60204
62826
|
var _keywords = require_keywords();
|
|
60205
|
-
var _types =
|
|
62827
|
+
var _types = require_types3();
|
|
60206
62828
|
var _Transformer = require_Transformer();
|
|
60207
62829
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60208
62830
|
|
|
@@ -60322,7 +62944,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
60322
62944
|
}
|
|
60323
62945
|
return value;
|
|
60324
62946
|
}
|
|
60325
|
-
var _types =
|
|
62947
|
+
var _types = require_types3();
|
|
60326
62948
|
var _Transformer = require_Transformer();
|
|
60327
62949
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60328
62950
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -60396,7 +63018,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
60396
63018
|
function _interopRequireDefault(obj) {
|
|
60397
63019
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60398
63020
|
}
|
|
60399
|
-
var _types =
|
|
63021
|
+
var _types = require_types3();
|
|
60400
63022
|
var _Transformer = require_Transformer();
|
|
60401
63023
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60402
63024
|
|
|
@@ -60425,7 +63047,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60425
63047
|
function _interopRequireDefault(obj) {
|
|
60426
63048
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60427
63049
|
}
|
|
60428
|
-
var _types =
|
|
63050
|
+
var _types = require_types3();
|
|
60429
63051
|
var _Transformer = require_Transformer();
|
|
60430
63052
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60431
63053
|
|
|
@@ -60453,7 +63075,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60453
63075
|
function _interopRequireDefault(obj) {
|
|
60454
63076
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60455
63077
|
}
|
|
60456
|
-
var _types =
|
|
63078
|
+
var _types = require_types3();
|
|
60457
63079
|
var _Transformer = require_Transformer();
|
|
60458
63080
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60459
63081
|
|
|
@@ -60569,7 +63191,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60569
63191
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60570
63192
|
}
|
|
60571
63193
|
var _tokenizer = require_tokenizer();
|
|
60572
|
-
var _types =
|
|
63194
|
+
var _types = require_types3();
|
|
60573
63195
|
var _Transformer = require_Transformer();
|
|
60574
63196
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60575
63197
|
|
|
@@ -60820,7 +63442,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60820
63442
|
function _interopRequireDefault(obj) {
|
|
60821
63443
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60822
63444
|
}
|
|
60823
|
-
var _types =
|
|
63445
|
+
var _types = require_types3();
|
|
60824
63446
|
var _isIdentifier = require_isIdentifier();
|
|
60825
63447
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60826
63448
|
var _Transformer = require_Transformer();
|
|
@@ -60966,7 +63588,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60966
63588
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60967
63589
|
}
|
|
60968
63590
|
var _keywords = require_keywords();
|
|
60969
|
-
var _types =
|
|
63591
|
+
var _types = require_types3();
|
|
60970
63592
|
var _getClassInfo = require_getClassInfo();
|
|
60971
63593
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60972
63594
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -61365,7 +63987,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
61365
63987
|
}
|
|
61366
63988
|
var _linesandcolumns = require_build();
|
|
61367
63989
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
61368
|
-
var _types =
|
|
63990
|
+
var _types = require_types3();
|
|
61369
63991
|
function formatTokens(code, tokens) {
|
|
61370
63992
|
if (tokens.length === 0) {
|
|
61371
63993
|
return "";
|
|
@@ -61430,7 +64052,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61430
64052
|
function _interopRequireDefault(obj) {
|
|
61431
64053
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61432
64054
|
}
|
|
61433
|
-
var _types =
|
|
64055
|
+
var _types = require_types3();
|
|
61434
64056
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61435
64057
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61436
64058
|
function getTSImportedNames(tokens) {
|
|
@@ -61815,7 +64437,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61815
64437
|
function compileTypedScript(opts) {
|
|
61816
64438
|
let ast;
|
|
61817
64439
|
try {
|
|
61818
|
-
ast =
|
|
64440
|
+
ast = import_parser4.parse(opts.source, {
|
|
61819
64441
|
sourceType: "script",
|
|
61820
64442
|
plugins: ["typescript"],
|
|
61821
64443
|
ranges: true
|
|
@@ -62067,9 +64689,9 @@ function stripCommentsAndStrings(s) {
|
|
|
62067
64689
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
62068
64690
|
return out;
|
|
62069
64691
|
}
|
|
62070
|
-
var
|
|
64692
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
62071
64693
|
var init_compile = __esm(() => {
|
|
62072
|
-
|
|
64694
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
62073
64695
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
62074
64696
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
62075
64697
|
});
|
|
@@ -62239,6 +64861,7 @@ var init_steps = __esm(() => {
|
|
|
62239
64861
|
"ai.split",
|
|
62240
64862
|
"ai.segment",
|
|
62241
64863
|
"ai.classify",
|
|
64864
|
+
"ai.classify-pages",
|
|
62242
64865
|
"ai.vision"
|
|
62243
64866
|
];
|
|
62244
64867
|
TRANSFORM_STEP_TYPES = [
|
|
@@ -62280,6 +64903,7 @@ var init_steps = __esm(() => {
|
|
|
62280
64903
|
AI_SPLIT: "ai.split",
|
|
62281
64904
|
AI_SEGMENT: "ai.segment",
|
|
62282
64905
|
AI_CLASSIFY: "ai.classify",
|
|
64906
|
+
AI_CLASSIFY_PAGES: "ai.classify-pages",
|
|
62283
64907
|
AI_VISION: "ai.vision",
|
|
62284
64908
|
TRANSFORM_SET: "transform.set",
|
|
62285
64909
|
TRANSFORM_REMOVE: "transform.remove",
|
|
@@ -62429,8 +65053,8 @@ function getAllStepJsonSchemas() {
|
|
|
62429
65053
|
category: def.category,
|
|
62430
65054
|
name: def.name,
|
|
62431
65055
|
description: def.description,
|
|
62432
|
-
configSchema:
|
|
62433
|
-
outputSchema:
|
|
65056
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
65057
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
62434
65058
|
configInWith: def.configInWith
|
|
62435
65059
|
}));
|
|
62436
65060
|
}
|
|
@@ -62480,7 +65104,7 @@ function isOutputSchemaUnknown(stepType) {
|
|
|
62480
65104
|
const def = schema._def;
|
|
62481
65105
|
return def?.typeName === "ZodUnknown";
|
|
62482
65106
|
}
|
|
62483
|
-
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, VisionPageRangeSchema, AiVisionConfigSchema, AiVisionOutputSchema, AiSplitConfigSchema, AiSplitSectionSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, AI_RETRY_CAPABILITY, DETERMINISTIC_RETRY_CAPABILITY, CONTROL_RETRY_CAPABILITY, FILE_OUTPUT_RETRY_CAPABILITY, STEP_RETRY_CAPABILITIES, STEP_SCHEMAS;
|
|
65107
|
+
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, VisionPageRangeSchema, AiVisionConfigSchema, AiVisionOutputSchema, AiSplitConfigSchema, AiSplitSectionSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, ClassifyPagesLabelSchema2, AiClassifyPagesConfigSchema, AiClassifyPagesOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, AI_RETRY_CAPABILITY, DETERMINISTIC_RETRY_CAPABILITY, CONTROL_RETRY_CAPABILITY, FILE_OUTPUT_RETRY_CAPABILITY, STEP_RETRY_CAPABILITIES, STEP_SCHEMAS;
|
|
62484
65108
|
var init_step_configs = __esm(() => {
|
|
62485
65109
|
init_zod();
|
|
62486
65110
|
init_common();
|
|
@@ -62538,7 +65162,8 @@ var init_step_configs = __esm(() => {
|
|
|
62538
65162
|
document: exports_external.string().describe("Template expression resolving to the input file (PDF, image, or Office document)."),
|
|
62539
65163
|
pageFrom: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("First page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, starts from the first page."),
|
|
62540
65164
|
pageTo: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Last page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, runs to the last page. When BOTH pageFrom and pageTo are omitted, the whole document is inspected in chunks of maxPages (divide-and-conquer, results merged)."),
|
|
62541
|
-
|
|
65165
|
+
pageIndices: exports_external.union([exports_external.array(exports_external.number().int().min(0)).min(1), exports_external.string()]).optional().describe('Explicit list of 0-based page indices to inspect — supports NON-contiguous selections, e.g. [4, 11, 19], or a template resolving to a number[] such as "{{ steps.label_pages.output.byLabel.photo }}". Highest priority: when set, pageFrom/pageTo and pages are ignored.'),
|
|
65166
|
+
pages: exports_external.union([exports_external.literal("all"), VisionPageRangeSchema, exports_external.array(VisionPageRangeSchema), exports_external.string()]).optional().describe('DEPRECATED — prefer pageIndices (scattered) or pageFrom/pageTo (contiguous). Which pages to inspect: "all", a single [start,end] range, a list of ranges, or a template expression resolving to one of those.'),
|
|
62542
65167
|
schema: exports_external.object({
|
|
62543
65168
|
type: exports_external.literal("object"),
|
|
62544
65169
|
properties: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -62656,6 +65281,56 @@ var init_step_configs = __esm(() => {
|
|
|
62656
65281
|
confidence: exports_external.enum(["low", "medium", "high"]).describe("LLM confidence in the classification. Coarse enum — numeric scores cluster meaninglessly at 0.85-0.95."),
|
|
62657
65282
|
reason: exports_external.string().describe("Short justification for the chosen label — useful for debugging.")
|
|
62658
65283
|
});
|
|
65284
|
+
ClassifyPagesLabelSchema2 = exports_external.union([
|
|
65285
|
+
exports_external.string().min(1),
|
|
65286
|
+
exports_external.object({
|
|
65287
|
+
name: exports_external.string().min(1).describe("Label value — the key in output.byLabel and an entry in pages[].labels."),
|
|
65288
|
+
description: exports_external.string().optional().describe("What a page must show to earn this label. Fed to the LLM as guidance.")
|
|
65289
|
+
})
|
|
65290
|
+
]);
|
|
65291
|
+
AiClassifyPagesConfigSchema = exports_external.object({
|
|
65292
|
+
input: exports_external.string().describe('The ai.parse output to label, e.g. "{{ steps.parse.output }}". Each page is labelled independently.'),
|
|
65293
|
+
labels: exports_external.array(ClassifyPagesLabelSchema2).min(1).describe('Labels a page can carry. A page may match ZERO, ONE, or MANY of them. Each entry is a bare name (e.g. "photo") or { name, description }. Names must be unique.'),
|
|
65294
|
+
prompt: exports_external.string().optional().describe("Extra classification guidance appended to the system prompt."),
|
|
65295
|
+
provider: exports_external.string().optional().describe("Provider ID from eigenpal.config.yaml. Falls back to the tenant default."),
|
|
65296
|
+
model: exports_external.string().optional().describe("Model override (advanced)."),
|
|
65297
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Pages are packed into windows under this budget; one LLM call per window. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET (20000).")
|
|
65298
|
+
}).superRefine((cfg, ctx) => {
|
|
65299
|
+
const RESERVED = new Set(["__proto__", "prototype", "constructor"]);
|
|
65300
|
+
const IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
65301
|
+
const names = cfg.labels.map((l) => typeof l === "string" ? l : l.name);
|
|
65302
|
+
const seen = new Set;
|
|
65303
|
+
names.forEach((name, i) => {
|
|
65304
|
+
if (!IDENTIFIER.test(name)) {
|
|
65305
|
+
ctx.addIssue({
|
|
65306
|
+
code: exports_external.ZodIssueCode.custom,
|
|
65307
|
+
message: `label name "${name}" must be a template-safe identifier (letters, digits, underscore; no dots or spaces)`,
|
|
65308
|
+
path: ["labels", i]
|
|
65309
|
+
});
|
|
65310
|
+
} else if (RESERVED.has(name)) {
|
|
65311
|
+
ctx.addIssue({
|
|
65312
|
+
code: exports_external.ZodIssueCode.custom,
|
|
65313
|
+
message: `label name "${name}" is reserved`,
|
|
65314
|
+
path: ["labels", i]
|
|
65315
|
+
});
|
|
65316
|
+
}
|
|
65317
|
+
if (seen.has(name)) {
|
|
65318
|
+
ctx.addIssue({
|
|
65319
|
+
code: exports_external.ZodIssueCode.custom,
|
|
65320
|
+
message: `duplicate label name "${name}"`,
|
|
65321
|
+
path: ["labels", i]
|
|
65322
|
+
});
|
|
65323
|
+
}
|
|
65324
|
+
seen.add(name);
|
|
65325
|
+
});
|
|
65326
|
+
});
|
|
65327
|
+
AiClassifyPagesOutputSchema = exports_external.object({
|
|
65328
|
+
pages: exports_external.array(exports_external.object({
|
|
65329
|
+
pageIndex: exports_external.number().int(),
|
|
65330
|
+
labels: exports_external.array(exports_external.string()).describe("Labels assigned to this page (possibly empty).")
|
|
65331
|
+
})).describe("Every input page, in order, with the labels the model assigned to it."),
|
|
65332
|
+
byLabel: exports_external.record(exports_external.string(), exports_external.array(exports_external.number().int())).describe("Label name -> ascending page indices carrying it. Every configured label is present (empty array when no page matched), so dot access is always safe: `{{ steps.<step>.output.byLabel.<label> }}` resolves to a number[] ready for ai.vision `pageIndices`.")
|
|
65333
|
+
});
|
|
62659
65334
|
TransformSetConfigSchema = exports_external.object({
|
|
62660
65335
|
fields: exports_external.record(exports_external.string(), exports_external.unknown()).refine((obj) => Object.keys(obj).length > 0, {
|
|
62661
65336
|
message: "At least one field must be defined"
|
|
@@ -62991,6 +65666,7 @@ var init_step_configs = __esm(() => {
|
|
|
62991
65666
|
"ai.split": AI_RETRY_CAPABILITY,
|
|
62992
65667
|
"ai.segment": AI_RETRY_CAPABILITY,
|
|
62993
65668
|
"ai.classify": AI_RETRY_CAPABILITY,
|
|
65669
|
+
"ai.classify-pages": AI_RETRY_CAPABILITY,
|
|
62994
65670
|
"ai.vision": AI_RETRY_CAPABILITY,
|
|
62995
65671
|
"transform.set": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62996
65672
|
"transform.remove": DETERMINISTIC_RETRY_CAPABILITY,
|
|
@@ -63069,6 +65745,15 @@ var init_step_configs = __esm(() => {
|
|
|
63069
65745
|
outputSchema: AiClassifyOutputSchema,
|
|
63070
65746
|
configInWith: true
|
|
63071
65747
|
},
|
|
65748
|
+
"ai.classify-pages": {
|
|
65749
|
+
type: "ai.classify-pages",
|
|
65750
|
+
category: "ai",
|
|
65751
|
+
name: "Label Pages",
|
|
65752
|
+
description: "Assign zero or more labels to each page independently (multi-label) using an LLM. Consumes ai.parse output; emits per-page labels and a byLabel map (label -> page indices) that supports NON-contiguous selections. Feed byLabel.<label> straight into ai.vision `pageIndices` to inspect scattered pages of a type (e.g. every signature or property-photo page).",
|
|
65753
|
+
configSchema: AiClassifyPagesConfigSchema,
|
|
65754
|
+
outputSchema: AiClassifyPagesOutputSchema,
|
|
65755
|
+
configInWith: true
|
|
65756
|
+
},
|
|
63072
65757
|
"ai.vision": {
|
|
63073
65758
|
type: "ai.vision",
|
|
63074
65759
|
category: "ai",
|
|
@@ -63283,81 +65968,6 @@ var init_actions = __esm(() => {
|
|
|
63283
65968
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
63284
65969
|
});
|
|
63285
65970
|
|
|
63286
|
-
// ../types/src/processor/execution.ts
|
|
63287
|
-
function asTuple(values) {
|
|
63288
|
-
return values;
|
|
63289
|
-
}
|
|
63290
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63291
|
-
var init_execution = __esm(() => {
|
|
63292
|
-
init_zod();
|
|
63293
|
-
WorkflowExecutionStatusValue2 = {
|
|
63294
|
-
CREATED: "created",
|
|
63295
|
-
PENDING: "pending",
|
|
63296
|
-
RUNNING: "running",
|
|
63297
|
-
WAITING: "waiting",
|
|
63298
|
-
COMPLETED: "completed",
|
|
63299
|
-
FAILED: "failed",
|
|
63300
|
-
CANCELLED: "cancelled"
|
|
63301
|
-
};
|
|
63302
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63303
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
63304
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
63305
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
63306
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
63307
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63308
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
63309
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
63310
|
-
]);
|
|
63311
|
-
StepExecutionStatusValue2 = {
|
|
63312
|
-
PENDING: "pending",
|
|
63313
|
-
RUNNING: "running",
|
|
63314
|
-
SUCCESS: "success",
|
|
63315
|
-
FAILURE: "failure",
|
|
63316
|
-
WAITING: "waiting",
|
|
63317
|
-
SKIPPED: "skipped"
|
|
63318
|
-
};
|
|
63319
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63320
|
-
StepExecutionStatusValue2.PENDING,
|
|
63321
|
-
StepExecutionStatusValue2.RUNNING,
|
|
63322
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
63323
|
-
StepExecutionStatusValue2.FAILURE,
|
|
63324
|
-
StepExecutionStatusValue2.WAITING,
|
|
63325
|
-
StepExecutionStatusValue2.SKIPPED
|
|
63326
|
-
]);
|
|
63327
|
-
TriggerTypeValue2 = {
|
|
63328
|
-
MANUAL: "manual",
|
|
63329
|
-
API: "api",
|
|
63330
|
-
WEBHOOK: "webhook",
|
|
63331
|
-
SCHEDULE: "schedule",
|
|
63332
|
-
EMAIL: "email",
|
|
63333
|
-
EVAL: "eval",
|
|
63334
|
-
CLI: "cli"
|
|
63335
|
-
};
|
|
63336
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
63337
|
-
TriggerTypeValue2.MANUAL,
|
|
63338
|
-
TriggerTypeValue2.API,
|
|
63339
|
-
TriggerTypeValue2.WEBHOOK,
|
|
63340
|
-
TriggerTypeValue2.SCHEDULE,
|
|
63341
|
-
TriggerTypeValue2.EMAIL,
|
|
63342
|
-
TriggerTypeValue2.EVAL,
|
|
63343
|
-
TriggerTypeValue2.CLI
|
|
63344
|
-
]);
|
|
63345
|
-
ExecutionTypeValue2 = {
|
|
63346
|
-
PROD: "prod",
|
|
63347
|
-
EVAL: "eval",
|
|
63348
|
-
PLAYGROUND: "playground"
|
|
63349
|
-
};
|
|
63350
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
63351
|
-
ExecutionTypeValue2.PROD,
|
|
63352
|
-
ExecutionTypeValue2.EVAL,
|
|
63353
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
63354
|
-
]);
|
|
63355
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63356
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63357
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63358
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63359
|
-
});
|
|
63360
|
-
|
|
63361
65971
|
// ../types/src/workflow/workflow.ts
|
|
63362
65972
|
function suggestWorkflowName(raw) {
|
|
63363
65973
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -63439,11 +66049,11 @@ var init_workflow = __esm(() => {
|
|
|
63439
66049
|
ManualTriggerMethodSchema = exports_external.object({
|
|
63440
66050
|
type: exports_external.literal("manual"),
|
|
63441
66051
|
enabled: exports_external.boolean().optional(),
|
|
63442
|
-
inputSchema:
|
|
66052
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63443
66053
|
});
|
|
63444
66054
|
ApiTriggerMethodSchema = exports_external.object({
|
|
63445
66055
|
type: exports_external.literal("api"),
|
|
63446
|
-
inputSchema:
|
|
66056
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63447
66057
|
});
|
|
63448
66058
|
EmailTriggerMethodSchema = exports_external.object({
|
|
63449
66059
|
type: exports_external.literal("email"),
|
|
@@ -63483,8 +66093,8 @@ var init_workflow = __esm(() => {
|
|
|
63483
66093
|
yamlContent: exports_external.string(),
|
|
63484
66094
|
definition: WorkflowDefinitionSchema,
|
|
63485
66095
|
isCurrent: exports_external.boolean().default(true),
|
|
63486
|
-
createdAt:
|
|
63487
|
-
updatedAt:
|
|
66096
|
+
createdAt: TimestampSchema,
|
|
66097
|
+
updatedAt: TimestampSchema.optional(),
|
|
63488
66098
|
createdBy: exports_external.string()
|
|
63489
66099
|
});
|
|
63490
66100
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -63666,15 +66276,15 @@ function isFileOutput(value) {
|
|
|
63666
66276
|
function isWorkflowResult(value) {
|
|
63667
66277
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
63668
66278
|
}
|
|
63669
|
-
var
|
|
66279
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
63670
66280
|
var init_execution2 = __esm(() => {
|
|
63671
66281
|
init_zod();
|
|
63672
66282
|
init_common();
|
|
63673
66283
|
init_execution();
|
|
63674
66284
|
init_retry();
|
|
63675
66285
|
init_workflow();
|
|
63676
|
-
|
|
63677
|
-
|
|
66286
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
66287
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
63678
66288
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
63679
66289
|
"root",
|
|
63680
66290
|
"if-then",
|
|
@@ -63697,7 +66307,7 @@ var init_execution2 = __esm(() => {
|
|
|
63697
66307
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
63698
66308
|
StepResultSchema = exports_external.object({
|
|
63699
66309
|
output: exports_external.unknown(),
|
|
63700
|
-
status:
|
|
66310
|
+
status: StepExecutionStatusSchema2
|
|
63701
66311
|
});
|
|
63702
66312
|
ExecutionContextSchema = exports_external.object({
|
|
63703
66313
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -63725,24 +66335,24 @@ var init_execution2 = __esm(() => {
|
|
|
63725
66335
|
triggerType: exports_external.string(),
|
|
63726
66336
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
63727
66337
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
63728
|
-
status:
|
|
66338
|
+
status: WorkflowExecutionStatusSchema2,
|
|
63729
66339
|
scopeStack: ScopeStackSchema,
|
|
63730
66340
|
currentStepIndex: exports_external.number(),
|
|
63731
66341
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
63732
66342
|
result: exports_external.unknown().nullable(),
|
|
63733
66343
|
error: exports_external.string().nullable(),
|
|
63734
66344
|
priority: exports_external.number().default(50),
|
|
63735
|
-
availableAt:
|
|
66345
|
+
availableAt: TimestampSchema,
|
|
63736
66346
|
leaseId: exports_external.string().nullable(),
|
|
63737
|
-
leaseExpiresAt:
|
|
66347
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
63738
66348
|
workerId: exports_external.string().nullable(),
|
|
63739
66349
|
maxRetries: exports_external.number().default(0),
|
|
63740
66350
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
63741
66351
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
63742
66352
|
retryNumber: exports_external.number().default(0),
|
|
63743
|
-
createdAt:
|
|
63744
|
-
startedAt:
|
|
63745
|
-
completedAt:
|
|
66353
|
+
createdAt: TimestampSchema,
|
|
66354
|
+
startedAt: TimestampSchema.nullable(),
|
|
66355
|
+
completedAt: TimestampSchema.nullable(),
|
|
63746
66356
|
createdBy: exports_external.string().nullable()
|
|
63747
66357
|
});
|
|
63748
66358
|
StepExecutionSchema = exports_external.object({
|
|
@@ -63761,15 +66371,15 @@ var init_execution2 = __esm(() => {
|
|
|
63761
66371
|
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
63762
66372
|
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
63763
66373
|
latestAttempt: exports_external.number().default(0),
|
|
63764
|
-
nextAttemptAt:
|
|
66374
|
+
nextAttemptAt: TimestampSchema.nullable().optional(),
|
|
63765
66375
|
inputData: exports_external.unknown().nullable(),
|
|
63766
66376
|
outputData: exports_external.unknown().nullable(),
|
|
63767
|
-
status:
|
|
66377
|
+
status: StepExecutionStatusSchema2,
|
|
63768
66378
|
error: exports_external.string().nullable(),
|
|
63769
66379
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
63770
66380
|
durationMs: exports_external.number().nullable(),
|
|
63771
|
-
startedAt:
|
|
63772
|
-
completedAt:
|
|
66381
|
+
startedAt: TimestampSchema.nullable(),
|
|
66382
|
+
completedAt: TimestampSchema.nullable()
|
|
63773
66383
|
});
|
|
63774
66384
|
StepExecutionAttemptSchema = exports_external.object({
|
|
63775
66385
|
id: exports_external.string(),
|
|
@@ -63782,8 +66392,8 @@ var init_execution2 = __esm(() => {
|
|
|
63782
66392
|
failure: ExecutionFailureSchema.nullable(),
|
|
63783
66393
|
retryDecision: RetryDecisionSchema.nullable(),
|
|
63784
66394
|
replaySafe: exports_external.boolean().nullable(),
|
|
63785
|
-
startedAt:
|
|
63786
|
-
completedAt:
|
|
66395
|
+
startedAt: TimestampSchema,
|
|
66396
|
+
completedAt: TimestampSchema.nullable(),
|
|
63787
66397
|
durationMs: exports_external.number().nullable()
|
|
63788
66398
|
});
|
|
63789
66399
|
ConnectorSchema = exports_external.object({
|
|
@@ -63795,8 +66405,8 @@ var init_execution2 = __esm(() => {
|
|
|
63795
66405
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
63796
66406
|
inputSchema: exports_external.unknown().optional(),
|
|
63797
66407
|
outputSchema: exports_external.unknown().optional(),
|
|
63798
|
-
createdAt:
|
|
63799
|
-
updatedAt:
|
|
66408
|
+
createdAt: TimestampSchema,
|
|
66409
|
+
updatedAt: TimestampSchema.optional(),
|
|
63800
66410
|
createdBy: exports_external.string()
|
|
63801
66411
|
});
|
|
63802
66412
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64762,8 +67372,8 @@ function parseRunTarget(target) {
|
|
|
64762
67372
|
if (root !== "agents") {
|
|
64763
67373
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
64764
67374
|
}
|
|
64765
|
-
for (const
|
|
64766
|
-
RunTargetSegmentSchema.parse(
|
|
67375
|
+
for (const segment2 of segments) {
|
|
67376
|
+
RunTargetSegmentSchema.parse(segment2);
|
|
64767
67377
|
}
|
|
64768
67378
|
const packagePath = packageName.split(".").join("/");
|
|
64769
67379
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -64876,9 +67486,9 @@ var init_grammar = __esm(() => {
|
|
|
64876
67486
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64877
67487
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64878
67488
|
}
|
|
64879
|
-
for (const
|
|
64880
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64881
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67489
|
+
for (const segment2 of parts.slice(1)) {
|
|
67490
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67491
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64882
67492
|
}
|
|
64883
67493
|
}
|
|
64884
67494
|
});
|
|
@@ -64894,9 +67504,9 @@ var init_grammar = __esm(() => {
|
|
|
64894
67504
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64895
67505
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64896
67506
|
}
|
|
64897
|
-
for (const
|
|
64898
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64899
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67507
|
+
for (const segment2 of parts.slice(1)) {
|
|
67508
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67509
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64900
67510
|
}
|
|
64901
67511
|
}
|
|
64902
67512
|
});
|
|
@@ -64990,9 +67600,9 @@ var init_grammar = __esm(() => {
|
|
|
64990
67600
|
});
|
|
64991
67601
|
return;
|
|
64992
67602
|
}
|
|
64993
|
-
for (const
|
|
64994
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
64995
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
67603
|
+
for (const segment2 of parts.slice(1)) {
|
|
67604
|
+
if (!RunTargetSegmentSchema.safeParse(segment2).success) {
|
|
67605
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
|
|
64996
67606
|
}
|
|
64997
67607
|
}
|
|
64998
67608
|
if (ref) {
|
|
@@ -65742,7 +68352,7 @@ function fromBig(n, le = false) {
|
|
|
65742
68352
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
65743
68353
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
65744
68354
|
}
|
|
65745
|
-
function
|
|
68355
|
+
function split2(lst, le = false) {
|
|
65746
68356
|
const len = lst.length;
|
|
65747
68357
|
let Ah = new Uint32Array(len);
|
|
65748
68358
|
let Al = new Uint32Array(len);
|
|
@@ -65922,7 +68532,7 @@ var init_sha2 = __esm(() => {
|
|
|
65922
68532
|
super(28);
|
|
65923
68533
|
}
|
|
65924
68534
|
};
|
|
65925
|
-
K512 = /* @__PURE__ */ (() =>
|
|
68535
|
+
K512 = /* @__PURE__ */ (() => split2([
|
|
65926
68536
|
"0x428a2f98d728ae22",
|
|
65927
68537
|
"0x7137449123ef65cd",
|
|
65928
68538
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68072,11 +70682,11 @@ function walkGrammar(node, parts) {
|
|
|
68072
70682
|
}
|
|
68073
70683
|
return current;
|
|
68074
70684
|
}
|
|
68075
|
-
function normalizeTemplate(
|
|
68076
|
-
return
|
|
70685
|
+
function normalizeTemplate(template2) {
|
|
70686
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
68077
70687
|
}
|
|
68078
|
-
function renderTemplate(
|
|
68079
|
-
return normalizeTemplate(
|
|
70688
|
+
function renderTemplate(template2, params) {
|
|
70689
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
68080
70690
|
if (!part.startsWith(":")) {
|
|
68081
70691
|
return [part];
|
|
68082
70692
|
}
|
|
@@ -68086,36 +70696,36 @@ function renderTemplate(template, params) {
|
|
|
68086
70696
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
68087
70697
|
}
|
|
68088
70698
|
if (name === "path") {
|
|
68089
|
-
return value.split("/").map((
|
|
70699
|
+
return value.split("/").map((segment2) => assertSegment("path", segment2));
|
|
68090
70700
|
}
|
|
68091
70701
|
return [assertSegment(String(name), value)];
|
|
68092
70702
|
});
|
|
68093
70703
|
}
|
|
68094
|
-
function buildS3Path(tenantId,
|
|
70704
|
+
function buildS3Path(tenantId, template2, params) {
|
|
68095
70705
|
const tenant = assertSegment("tenantId", tenantId);
|
|
68096
|
-
const parts = renderTemplate(
|
|
70706
|
+
const parts = renderTemplate(template2, params);
|
|
68097
70707
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68098
|
-
if (
|
|
68099
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70708
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70709
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68100
70710
|
}
|
|
68101
70711
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
68102
|
-
return
|
|
70712
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68103
70713
|
}
|
|
68104
|
-
function buildS3PathSuffix(
|
|
68105
|
-
const parts = renderTemplate(
|
|
70714
|
+
function buildS3PathSuffix(template2, params) {
|
|
70715
|
+
const parts = renderTemplate(template2, params);
|
|
68106
70716
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68107
|
-
if (
|
|
68108
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70717
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70718
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68109
70719
|
}
|
|
68110
70720
|
const path = parts.join("/");
|
|
68111
|
-
return
|
|
70721
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68112
70722
|
}
|
|
68113
70723
|
function stripTenantPrefix(key) {
|
|
68114
70724
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
68115
70725
|
}
|
|
68116
|
-
function matchS3Path(
|
|
70726
|
+
function matchS3Path(template2, key) {
|
|
68117
70727
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
68118
|
-
const templateParts = normalizeTemplate(
|
|
70728
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
68119
70729
|
const params = {};
|
|
68120
70730
|
let keyIndex = 0;
|
|
68121
70731
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -68134,7 +70744,7 @@ function matchS3Path(template, key) {
|
|
|
68134
70744
|
if (rest.length === 0)
|
|
68135
70745
|
return null;
|
|
68136
70746
|
try {
|
|
68137
|
-
params.path = rest.map((
|
|
70747
|
+
params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
|
|
68138
70748
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
68139
70749
|
} catch {
|
|
68140
70750
|
return null;
|
|
@@ -68168,23 +70778,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
68168
70778
|
}
|
|
68169
70779
|
return assertSegment("tenantId", tenantId);
|
|
68170
70780
|
};
|
|
68171
|
-
const build = (
|
|
70781
|
+
const build = (template2, params) => {
|
|
68172
70782
|
const tenant = resolveTenantId(params);
|
|
68173
|
-
const parts = renderTemplate(
|
|
70783
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
68174
70784
|
const node = walkGrammar(grammarNode, parts);
|
|
68175
|
-
if (
|
|
68176
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70785
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70786
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68177
70787
|
}
|
|
68178
70788
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
68179
|
-
return
|
|
70789
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68180
70790
|
};
|
|
68181
70791
|
const builder = build;
|
|
68182
|
-
builder.at = (
|
|
70792
|
+
builder.at = (template2, params) => {
|
|
68183
70793
|
const tenant = resolveTenantId(params);
|
|
68184
|
-
const parts = renderTemplate(
|
|
70794
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
68185
70795
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
68186
|
-
if (
|
|
68187
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70796
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
70797
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68188
70798
|
}
|
|
68189
70799
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
68190
70800
|
};
|
|
@@ -68629,7 +71239,7 @@ __export(exports_src, {
|
|
|
68629
71239
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
68630
71240
|
SpanTypes: () => SpanTypes,
|
|
68631
71241
|
SpanKindMap: () => SpanKindMap,
|
|
68632
|
-
SpanKind: () => SpanKind,
|
|
71242
|
+
SpanKind: () => import_api.SpanKind,
|
|
68633
71243
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
68634
71244
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
68635
71245
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -68837,7 +71447,7 @@ __export(exports_src, {
|
|
|
68837
71447
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
68838
71448
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
68839
71449
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
68840
|
-
FilePathDescriptorSchema: () =>
|
|
71450
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema,
|
|
68841
71451
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
68842
71452
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
68843
71453
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -68957,6 +71567,10 @@ __export(exports_src, {
|
|
|
68957
71567
|
ControlFailConfigSchema: () => ControlFailConfigSchema,
|
|
68958
71568
|
ContentKindSchema: () => ContentKindSchema,
|
|
68959
71569
|
ConnectorSchema: () => ConnectorSchema,
|
|
71570
|
+
ClassifyPagesOutputSchema: () => ClassifyPagesOutputSchema,
|
|
71571
|
+
ClassifyPagesLabelSchema: () => ClassifyPagesLabelSchema,
|
|
71572
|
+
ClassifyPagesInputSchema: () => ClassifyPagesInputSchema,
|
|
71573
|
+
ClassifyPagesConfigSchema: () => ClassifyPagesConfigSchema,
|
|
68960
71574
|
ClassifyOutputSchema: () => ClassifyOutputSchema,
|
|
68961
71575
|
ClassifyLabelSchema: () => ClassifyLabelSchema,
|
|
68962
71576
|
ClassifyInputSchema: () => ClassifyInputSchema,
|
|
@@ -68999,8 +71613,8 @@ var init_src = __esm(() => {
|
|
|
68999
71613
|
init_legacy_boundary();
|
|
69000
71614
|
init_runtime_file_ref();
|
|
69001
71615
|
init_scoped_file_ref();
|
|
69002
|
-
|
|
69003
|
-
|
|
71616
|
+
init_processor2();
|
|
71617
|
+
init_parser2();
|
|
69004
71618
|
init_otel();
|
|
69005
71619
|
init_execution_row();
|
|
69006
71620
|
init_run_expand();
|
|
@@ -69915,7 +72529,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69915
72529
|
else
|
|
69916
72530
|
end = lineWidth - indentAtStart;
|
|
69917
72531
|
}
|
|
69918
|
-
let
|
|
72532
|
+
let split3 = undefined;
|
|
69919
72533
|
let prev = undefined;
|
|
69920
72534
|
let overflow = false;
|
|
69921
72535
|
let i = -1;
|
|
@@ -69949,20 +72563,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69949
72563
|
if (mode === FOLD_BLOCK)
|
|
69950
72564
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
69951
72565
|
end = i + indent.length + endStep;
|
|
69952
|
-
|
|
72566
|
+
split3 = undefined;
|
|
69953
72567
|
} else {
|
|
69954
72568
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
69955
72569
|
` && prev !== "\t") {
|
|
69956
72570
|
const next = text[i + 1];
|
|
69957
72571
|
if (next && next !== " " && next !== `
|
|
69958
72572
|
` && next !== "\t")
|
|
69959
|
-
|
|
72573
|
+
split3 = i;
|
|
69960
72574
|
}
|
|
69961
72575
|
if (i >= end) {
|
|
69962
|
-
if (
|
|
69963
|
-
folds.push(
|
|
69964
|
-
end =
|
|
69965
|
-
|
|
72576
|
+
if (split3) {
|
|
72577
|
+
folds.push(split3);
|
|
72578
|
+
end = split3 + endStep;
|
|
72579
|
+
split3 = undefined;
|
|
69966
72580
|
} else if (mode === FOLD_QUOTED) {
|
|
69967
72581
|
while (prev === " " || prev === "\t") {
|
|
69968
72582
|
prev = ch;
|
|
@@ -69975,7 +72589,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69975
72589
|
folds.push(j);
|
|
69976
72590
|
escapedFolds[j] = true;
|
|
69977
72591
|
end = j + endStep;
|
|
69978
|
-
|
|
72592
|
+
split3 = undefined;
|
|
69979
72593
|
} else {
|
|
69980
72594
|
overflow = true;
|
|
69981
72595
|
}
|
|
@@ -70609,7 +73223,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70609
73223
|
var identity = require_identity();
|
|
70610
73224
|
var Scalar = require_Scalar();
|
|
70611
73225
|
var MERGE_KEY = "<<";
|
|
70612
|
-
var
|
|
73226
|
+
var merge3 = {
|
|
70613
73227
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
70614
73228
|
default: "key",
|
|
70615
73229
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -70619,7 +73233,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70619
73233
|
}),
|
|
70620
73234
|
stringify: () => MERGE_KEY
|
|
70621
73235
|
};
|
|
70622
|
-
var isMergeKey = (ctx, key) => (
|
|
73236
|
+
var isMergeKey = (ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
70623
73237
|
function addMergeToJSMap(ctx, map2, value) {
|
|
70624
73238
|
const source = resolveAliasValue(ctx, value);
|
|
70625
73239
|
if (identity.isSeq(source))
|
|
@@ -70658,21 +73272,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
70658
73272
|
}
|
|
70659
73273
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
70660
73274
|
exports.isMergeKey = isMergeKey;
|
|
70661
|
-
exports.merge =
|
|
73275
|
+
exports.merge = merge3;
|
|
70662
73276
|
});
|
|
70663
73277
|
|
|
70664
73278
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
70665
73279
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
70666
73280
|
var log = require_log();
|
|
70667
|
-
var
|
|
73281
|
+
var merge3 = require_merge();
|
|
70668
73282
|
var stringify = require_stringify();
|
|
70669
73283
|
var identity = require_identity();
|
|
70670
73284
|
var toJS = require_toJS();
|
|
70671
73285
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
70672
73286
|
if (identity.isNode(key) && key.addToJSMap)
|
|
70673
73287
|
key.addToJSMap(ctx, map2, value);
|
|
70674
|
-
else if (
|
|
70675
|
-
|
|
73288
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
73289
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
70676
73290
|
else {
|
|
70677
73291
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
70678
73292
|
if (map2 instanceof Map) {
|
|
@@ -71948,7 +74562,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71948
74562
|
var bool = require_bool2();
|
|
71949
74563
|
var float = require_float2();
|
|
71950
74564
|
var int2 = require_int2();
|
|
71951
|
-
var
|
|
74565
|
+
var merge3 = require_merge();
|
|
71952
74566
|
var omap = require_omap();
|
|
71953
74567
|
var pairs = require_pairs();
|
|
71954
74568
|
var set2 = require_set();
|
|
@@ -71968,7 +74582,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71968
74582
|
float.floatExp,
|
|
71969
74583
|
float.float,
|
|
71970
74584
|
binary.binary,
|
|
71971
|
-
|
|
74585
|
+
merge3.merge,
|
|
71972
74586
|
omap.omap,
|
|
71973
74587
|
pairs.pairs,
|
|
71974
74588
|
set2.set,
|
|
@@ -71991,7 +74605,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71991
74605
|
var schema = require_schema();
|
|
71992
74606
|
var schema$1 = require_schema2();
|
|
71993
74607
|
var binary = require_binary();
|
|
71994
|
-
var
|
|
74608
|
+
var merge3 = require_merge();
|
|
71995
74609
|
var omap = require_omap();
|
|
71996
74610
|
var pairs = require_pairs();
|
|
71997
74611
|
var schema$2 = require_schema3();
|
|
@@ -72016,7 +74630,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72016
74630
|
intOct: int2.intOct,
|
|
72017
74631
|
intTime: timestamp.intTime,
|
|
72018
74632
|
map: map2.map,
|
|
72019
|
-
merge:
|
|
74633
|
+
merge: merge3.merge,
|
|
72020
74634
|
null: _null4.nullTag,
|
|
72021
74635
|
omap: omap.omap,
|
|
72022
74636
|
pairs: pairs.pairs,
|
|
@@ -72026,7 +74640,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72026
74640
|
};
|
|
72027
74641
|
var coreKnownTags = {
|
|
72028
74642
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
72029
|
-
"tag:yaml.org,2002:merge":
|
|
74643
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
72030
74644
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
72031
74645
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
72032
74646
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -72035,7 +74649,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72035
74649
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
72036
74650
|
const schemaTags = schemas3.get(schemaName);
|
|
72037
74651
|
if (schemaTags && !customTags) {
|
|
72038
|
-
return addMergeTag && !schemaTags.includes(
|
|
74652
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
72039
74653
|
}
|
|
72040
74654
|
let tags = schemaTags;
|
|
72041
74655
|
if (!tags) {
|
|
@@ -72053,7 +74667,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72053
74667
|
tags = customTags(tags.slice());
|
|
72054
74668
|
}
|
|
72055
74669
|
if (addMergeTag)
|
|
72056
|
-
tags = tags.concat(
|
|
74670
|
+
tags = tags.concat(merge3.merge);
|
|
72057
74671
|
return tags.reduce((tags2, tag) => {
|
|
72058
74672
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72059
74673
|
if (!tagObj) {
|
|
@@ -72080,11 +74694,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
72080
74694
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
72081
74695
|
|
|
72082
74696
|
class Schema {
|
|
72083
|
-
constructor({ compat: compat2, customTags, merge:
|
|
74697
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
72084
74698
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
72085
74699
|
this.name = typeof schema === "string" && schema || "core";
|
|
72086
74700
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
72087
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
74701
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
72088
74702
|
this.toStringOptions = toStringDefaults ?? null;
|
|
72089
74703
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
72090
74704
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -73307,13 +75921,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
73307
75921
|
return { mode, indent, chomp, comment, length };
|
|
73308
75922
|
}
|
|
73309
75923
|
function splitLines(source) {
|
|
73310
|
-
const
|
|
73311
|
-
const first =
|
|
75924
|
+
const split3 = source.split(/\n( *)/);
|
|
75925
|
+
const first = split3[0];
|
|
73312
75926
|
const m = first.match(/^( *)/);
|
|
73313
75927
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
73314
75928
|
const lines = [line0];
|
|
73315
|
-
for (let i = 1;i <
|
|
73316
|
-
lines.push([
|
|
75929
|
+
for (let i = 1;i < split3.length; i += 2)
|
|
75930
|
+
lines.push([split3[i], split3[i + 1]]);
|
|
73317
75931
|
return lines;
|
|
73318
75932
|
}
|
|
73319
75933
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -76327,7 +78941,7 @@ var init_main = __esm(() => {
|
|
|
76327
78941
|
});
|
|
76328
78942
|
|
|
76329
78943
|
// ../../node_modules/sisteransi/src/index.js
|
|
76330
|
-
var
|
|
78944
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
76331
78945
|
var ESC2 = "\x1B";
|
|
76332
78946
|
var CSI2 = `${ESC2}[`;
|
|
76333
78947
|
var beep = "\x07";
|
|
@@ -76670,7 +79284,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
76670
79284
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
76671
79285
|
var init_dist3 = __esm(() => {
|
|
76672
79286
|
init_main();
|
|
76673
|
-
import_sisteransi = __toESM(
|
|
79287
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
76674
79288
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
76675
79289
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
76676
79290
|
h = { actions: new Set(G), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...K], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
|
|
@@ -78013,7 +80627,7 @@ var init_dist4 = __esm(() => {
|
|
|
78013
80627
|
init_dist3();
|
|
78014
80628
|
init_main();
|
|
78015
80629
|
init_dist2();
|
|
78016
|
-
import_sisteransi2 = __toESM(
|
|
80630
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
78017
80631
|
tt2 = te();
|
|
78018
80632
|
_t = w2("◆", "*");
|
|
78019
80633
|
ot2 = w2("■", "x");
|
|
@@ -171505,7 +174119,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
171505
174119
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
171506
174120
|
}
|
|
171507
174121
|
return to5;
|
|
171508
|
-
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent,
|
|
174122
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils4, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils32, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils42, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver2, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src3, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
171509
174123
|
diff(oldStr, newStr, options8 = {}) {
|
|
171510
174124
|
let callback;
|
|
171511
174125
|
if (typeof options8 === "function") {
|
|
@@ -172527,7 +175141,7 @@ var init_prettier = __esm(() => {
|
|
|
172527
175141
|
};
|
|
172528
175142
|
}
|
|
172529
175143
|
});
|
|
172530
|
-
|
|
175144
|
+
require_utils4 = __commonJS2({
|
|
172531
175145
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
172532
175146
|
exports.isInteger = (num) => {
|
|
172533
175147
|
if (typeof num === "number") {
|
|
@@ -172616,7 +175230,7 @@ var init_prettier = __esm(() => {
|
|
|
172616
175230
|
});
|
|
172617
175231
|
require_stringify2 = __commonJS2({
|
|
172618
175232
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
172619
|
-
var utils2 =
|
|
175233
|
+
var utils2 = require_utils4();
|
|
172620
175234
|
module.exports = (ast, options8 = {}) => {
|
|
172621
175235
|
const stringify2 = (node, parent = {}) => {
|
|
172622
175236
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173070,7 +175684,7 @@ var init_prettier = __esm(() => {
|
|
|
173070
175684
|
require_compile2 = __commonJS2({
|
|
173071
175685
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173072
175686
|
var fill2 = require_fill_range();
|
|
173073
|
-
var utils2 =
|
|
175687
|
+
var utils2 = require_utils4();
|
|
173074
175688
|
var compile = (ast, options8 = {}) => {
|
|
173075
175689
|
const walk = (node, parent = {}) => {
|
|
173076
175690
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -173120,7 +175734,7 @@ var init_prettier = __esm(() => {
|
|
|
173120
175734
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
173121
175735
|
var fill2 = require_fill_range();
|
|
173122
175736
|
var stringify2 = require_stringify2();
|
|
173123
|
-
var utils2 =
|
|
175737
|
+
var utils2 = require_utils4();
|
|
173124
175738
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
173125
175739
|
const result = [];
|
|
173126
175740
|
queue = [].concat(queue);
|
|
@@ -175319,8 +177933,8 @@ var init_prettier = __esm(() => {
|
|
|
175319
177933
|
var Stream = __require2("stream");
|
|
175320
177934
|
var PassThrough = Stream.PassThrough;
|
|
175321
177935
|
var slice = Array.prototype.slice;
|
|
175322
|
-
module.exports =
|
|
175323
|
-
function
|
|
177936
|
+
module.exports = merge22;
|
|
177937
|
+
function merge22() {
|
|
175324
177938
|
const streamsQueue = [];
|
|
175325
177939
|
const args = slice.call(arguments);
|
|
175326
177940
|
let merging = false;
|
|
@@ -175434,9 +178048,9 @@ var init_prettier = __esm(() => {
|
|
|
175434
178048
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
175435
178049
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175436
178050
|
exports.merge = undefined;
|
|
175437
|
-
var
|
|
178051
|
+
var merge22 = require_merge2();
|
|
175438
178052
|
function merge3(streams) {
|
|
175439
|
-
const mergedStream =
|
|
178053
|
+
const mergedStream = merge22(streams);
|
|
175440
178054
|
streams.forEach((stream) => {
|
|
175441
178055
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
175442
178056
|
});
|
|
@@ -175464,7 +178078,7 @@ var init_prettier = __esm(() => {
|
|
|
175464
178078
|
exports.isEmpty = isEmpty;
|
|
175465
178079
|
}
|
|
175466
178080
|
});
|
|
175467
|
-
|
|
178081
|
+
require_utils32 = __commonJS2({
|
|
175468
178082
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
175469
178083
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175470
178084
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -175488,7 +178102,7 @@ var init_prettier = __esm(() => {
|
|
|
175488
178102
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
175489
178103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175490
178104
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
175491
|
-
var utils2 =
|
|
178105
|
+
var utils2 = require_utils32();
|
|
175492
178106
|
function generate(input, settings) {
|
|
175493
178107
|
const patterns = processPatterns(input, settings);
|
|
175494
178108
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -175797,7 +178411,7 @@ var init_prettier = __esm(() => {
|
|
|
175797
178411
|
exports.createDirentFromStats = createDirentFromStats;
|
|
175798
178412
|
}
|
|
175799
178413
|
});
|
|
175800
|
-
|
|
178414
|
+
require_utils42 = __commonJS2({
|
|
175801
178415
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
175802
178416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175803
178417
|
exports.fs = undefined;
|
|
@@ -175825,7 +178439,7 @@ var init_prettier = __esm(() => {
|
|
|
175825
178439
|
var fsStat = require_out();
|
|
175826
178440
|
var rpl = require_run_parallel();
|
|
175827
178441
|
var constants_1 = require_constants3();
|
|
175828
|
-
var utils2 =
|
|
178442
|
+
var utils2 = require_utils42();
|
|
175829
178443
|
var common = require_common();
|
|
175830
178444
|
function read3(directory, settings, callback) {
|
|
175831
178445
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -175931,7 +178545,7 @@ var init_prettier = __esm(() => {
|
|
|
175931
178545
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
175932
178546
|
var fsStat = require_out();
|
|
175933
178547
|
var constants_1 = require_constants3();
|
|
175934
|
-
var utils2 =
|
|
178548
|
+
var utils2 = require_utils42();
|
|
175935
178549
|
var common = require_common();
|
|
175936
178550
|
function read3(directory, settings) {
|
|
175937
178551
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176711,7 +179325,7 @@ var init_prettier = __esm(() => {
|
|
|
176711
179325
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176712
179326
|
var path15 = __require2("path");
|
|
176713
179327
|
var fsStat = require_out();
|
|
176714
|
-
var utils2 =
|
|
179328
|
+
var utils2 = require_utils32();
|
|
176715
179329
|
var Reader = class {
|
|
176716
179330
|
constructor(_settings) {
|
|
176717
179331
|
this._settings = _settings;
|
|
@@ -176835,7 +179449,7 @@ var init_prettier = __esm(() => {
|
|
|
176835
179449
|
require_matcher = __commonJS2({
|
|
176836
179450
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
176837
179451
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176838
|
-
var utils2 =
|
|
179452
|
+
var utils2 = require_utils32();
|
|
176839
179453
|
var Matcher = class {
|
|
176840
179454
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
176841
179455
|
this._patterns = _patterns;
|
|
@@ -176874,7 +179488,7 @@ var init_prettier = __esm(() => {
|
|
|
176874
179488
|
});
|
|
176875
179489
|
}
|
|
176876
179490
|
_splitSegmentsIntoSections(segments) {
|
|
176877
|
-
return utils2.array.splitWhen(segments, (
|
|
179491
|
+
return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
|
|
176878
179492
|
}
|
|
176879
179493
|
};
|
|
176880
179494
|
exports.default = Matcher;
|
|
@@ -176895,11 +179509,11 @@ var init_prettier = __esm(() => {
|
|
|
176895
179509
|
return true;
|
|
176896
179510
|
}
|
|
176897
179511
|
const match = parts.every((part, index) => {
|
|
176898
|
-
const
|
|
176899
|
-
if (
|
|
179512
|
+
const segment2 = pattern.segments[index];
|
|
179513
|
+
if (segment2.dynamic && segment2.patternRe.test(part)) {
|
|
176900
179514
|
return true;
|
|
176901
179515
|
}
|
|
176902
|
-
if (!
|
|
179516
|
+
if (!segment2.dynamic && segment2.pattern === part) {
|
|
176903
179517
|
return true;
|
|
176904
179518
|
}
|
|
176905
179519
|
return false;
|
|
@@ -176917,7 +179531,7 @@ var init_prettier = __esm(() => {
|
|
|
176917
179531
|
require_deep = __commonJS2({
|
|
176918
179532
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
176919
179533
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176920
|
-
var utils2 =
|
|
179534
|
+
var utils2 = require_utils32();
|
|
176921
179535
|
var partial_1 = require_partial();
|
|
176922
179536
|
var DeepFilter = class {
|
|
176923
179537
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -176979,7 +179593,7 @@ var init_prettier = __esm(() => {
|
|
|
176979
179593
|
require_entry = __commonJS2({
|
|
176980
179594
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
176981
179595
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176982
|
-
var utils2 =
|
|
179596
|
+
var utils2 = require_utils32();
|
|
176983
179597
|
var EntryFilter = class {
|
|
176984
179598
|
constructor(_settings, _micromatchOptions) {
|
|
176985
179599
|
this._settings = _settings;
|
|
@@ -177064,7 +179678,7 @@ var init_prettier = __esm(() => {
|
|
|
177064
179678
|
require_error2 = __commonJS2({
|
|
177065
179679
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177066
179680
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177067
|
-
var utils2 =
|
|
179681
|
+
var utils2 = require_utils32();
|
|
177068
179682
|
var ErrorFilter = class {
|
|
177069
179683
|
constructor(_settings) {
|
|
177070
179684
|
this._settings = _settings;
|
|
@@ -177082,7 +179696,7 @@ var init_prettier = __esm(() => {
|
|
|
177082
179696
|
require_entry2 = __commonJS2({
|
|
177083
179697
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
177084
179698
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177085
|
-
var utils2 =
|
|
179699
|
+
var utils2 = require_utils32();
|
|
177086
179700
|
var EntryTransformer = class {
|
|
177087
179701
|
constructor(_settings) {
|
|
177088
179702
|
this._settings = _settings;
|
|
@@ -177350,7 +179964,7 @@ var init_prettier = __esm(() => {
|
|
|
177350
179964
|
var stream_1 = require_stream4();
|
|
177351
179965
|
var sync_1 = require_sync6();
|
|
177352
179966
|
var settings_1 = require_settings4();
|
|
177353
|
-
var utils2 =
|
|
179967
|
+
var utils2 = require_utils32();
|
|
177354
179968
|
async function FastGlob(source2, options8) {
|
|
177355
179969
|
assertPatternsInput(source2);
|
|
177356
179970
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -177668,7 +180282,7 @@ var init_prettier = __esm(() => {
|
|
|
177668
180282
|
};
|
|
177669
180283
|
}
|
|
177670
180284
|
});
|
|
177671
|
-
|
|
180285
|
+
require_semver2 = __commonJS2({
|
|
177672
180286
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
177673
180287
|
var debug = require_debug();
|
|
177674
180288
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -177938,7 +180552,7 @@ var init_prettier = __esm(() => {
|
|
|
177938
180552
|
});
|
|
177939
180553
|
require_compare = __commonJS2({
|
|
177940
180554
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
177941
|
-
var SemVer =
|
|
180555
|
+
var SemVer = require_semver2();
|
|
177942
180556
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
177943
180557
|
module.exports = compare;
|
|
177944
180558
|
}
|
|
@@ -179671,7 +182285,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
179671
182285
|
};
|
|
179672
182286
|
}
|
|
179673
182287
|
});
|
|
179674
|
-
|
|
182288
|
+
require_src3 = __commonJS2({
|
|
179675
182289
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
179676
182290
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
179677
182291
|
return new (P9 || (P9 = Promise))(function(resolve3, reject) {
|
|
@@ -181134,7 +183748,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
181134
183748
|
mockable_default = mockable.mocked;
|
|
181135
183749
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
181136
183750
|
partition_default = partition2;
|
|
181137
|
-
import_editorconfig = __toESM2(
|
|
183751
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
181138
183752
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
181139
183753
|
FileSearcher = class extends Searcher {
|
|
181140
183754
|
findInDirectory = findFile;
|
|
@@ -183730,7 +186344,7 @@ import { fileURLToPath as fileURLToPath9 } from "url";
|
|
|
183730
186344
|
// package.json
|
|
183731
186345
|
var package_default = {
|
|
183732
186346
|
name: "@eigenpal/cli",
|
|
183733
|
-
version: "0.10.
|
|
186347
|
+
version: "0.10.37",
|
|
183734
186348
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
183735
186349
|
keywords: [
|
|
183736
186350
|
"eigenpal",
|
|
@@ -185245,7 +187859,7 @@ async function pushCurrentBranch(input) {
|
|
|
185245
187859
|
function slugifyPackageSegment(value) {
|
|
185246
187860
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
185247
187861
|
}
|
|
185248
|
-
function packagePathForTemplate(
|
|
187862
|
+
function packagePathForTemplate(template2, name) {
|
|
185249
187863
|
const slug = slugifyPackageSegment(name);
|
|
185250
187864
|
if (!slug)
|
|
185251
187865
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -185257,7 +187871,7 @@ function packagePathForTemplate(template, name) {
|
|
|
185257
187871
|
knowledge: "resources/knowledge",
|
|
185258
187872
|
evaluator: "evaluators"
|
|
185259
187873
|
};
|
|
185260
|
-
const root = rootByTemplate[
|
|
187874
|
+
const root = rootByTemplate[template2];
|
|
185261
187875
|
if (!root)
|
|
185262
187876
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
185263
187877
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -185688,12 +188302,12 @@ function archivePackage(input) {
|
|
|
185688
188302
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
185689
188303
|
cwd: input.gitRoot
|
|
185690
188304
|
});
|
|
185691
|
-
const
|
|
188305
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185692
188306
|
cwd: input.outDir,
|
|
185693
188307
|
encoding: "utf8"
|
|
185694
188308
|
});
|
|
185695
|
-
if (
|
|
185696
|
-
throw new Error(
|
|
188309
|
+
if (extract2.status !== 0)
|
|
188310
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
185697
188311
|
} finally {
|
|
185698
188312
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
185699
188313
|
}
|
|
@@ -185722,12 +188336,12 @@ async function tryHostedArchive(input) {
|
|
|
185722
188336
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
185723
188337
|
try {
|
|
185724
188338
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
185725
|
-
const
|
|
188339
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185726
188340
|
cwd: input.outDir,
|
|
185727
188341
|
encoding: "utf8"
|
|
185728
188342
|
});
|
|
185729
|
-
if (
|
|
185730
|
-
throw new Error(
|
|
188343
|
+
if (extract2.status !== 0)
|
|
188344
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
185731
188345
|
return true;
|
|
185732
188346
|
} finally {
|
|
185733
188347
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -190708,18 +193322,18 @@ async function init(name, opts) {
|
|
|
190708
193322
|
if (existsSync13(target) && readdirSync4(target).length > 0) {
|
|
190709
193323
|
throw new Error(`Target directory ${relative2(process.cwd(), target)} exists and is not empty.`);
|
|
190710
193324
|
}
|
|
190711
|
-
let
|
|
193325
|
+
let template2;
|
|
190712
193326
|
if (opts.template) {
|
|
190713
193327
|
if (!isTemplateName(opts.template)) {
|
|
190714
193328
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
190715
193329
|
}
|
|
190716
|
-
|
|
193330
|
+
template2 = opts.template;
|
|
190717
193331
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
190718
|
-
|
|
193332
|
+
template2 = "blank";
|
|
190719
193333
|
} else {
|
|
190720
|
-
|
|
193334
|
+
template2 = await promptForTemplate();
|
|
190721
193335
|
}
|
|
190722
|
-
const sourceRoot = join7(resolveTemplatesRoot(),
|
|
193336
|
+
const sourceRoot = join7(resolveTemplatesRoot(), template2);
|
|
190723
193337
|
if (!existsSync13(sourceRoot)) {
|
|
190724
193338
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
190725
193339
|
}
|