@eigenpal/cli 0.10.44 → 0.10.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cli.js +542 -2872
- package/dist/skill/reference/step-types.md +10 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17245,149 +17245,8 @@ 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: "oppl",
|
|
17334
|
-
OCR_JOB: "opj",
|
|
17335
|
-
SANDBOX_WS_TOKEN: "sws"
|
|
17336
|
-
};
|
|
17337
|
-
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17338
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
17339
|
-
});
|
|
17340
|
-
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17341
|
-
BaseEntitySchema = exports_external.object({
|
|
17342
|
-
id: exports_external.string(),
|
|
17343
|
-
createdAt: TimestampSchema.optional(),
|
|
17344
|
-
updatedAt: TimestampSchema.optional()
|
|
17345
|
-
});
|
|
17346
|
-
});
|
|
17347
|
-
|
|
17348
|
-
// ../types/src/core/ids.ts
|
|
17349
|
-
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17350
|
-
var init_ids = __esm(() => {
|
|
17351
|
-
PROCESSOR_IDS = {
|
|
17352
|
-
MERGE: "builtin/merge",
|
|
17353
|
-
DOCUMENT_PARSER: "builtin/parser",
|
|
17354
|
-
EXTRACT: "builtin/extract",
|
|
17355
|
-
SPLIT: "builtin/split",
|
|
17356
|
-
SEGMENT: "builtin/segment",
|
|
17357
|
-
CLASSIFY: "builtin/classify",
|
|
17358
|
-
CLASSIFY_PAGES: "builtin/classify-pages",
|
|
17359
|
-
VISION: "builtin/vision",
|
|
17360
|
-
TEMPLATE: "builtin/template",
|
|
17361
|
-
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17362
|
-
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17363
|
-
};
|
|
17364
|
-
PARSER_IDS = {
|
|
17365
|
-
KREUZBERG: "builtin/kreuzberg",
|
|
17366
|
-
OCR: "builtin/ocr",
|
|
17367
|
-
LLM_VISION: "builtin/llm-vision"
|
|
17368
|
-
};
|
|
17369
|
-
INPUT_KINDS = {
|
|
17370
|
-
DOCUMENT: "document",
|
|
17371
|
-
PAYLOAD: "payload"
|
|
17372
|
-
};
|
|
17373
|
-
});
|
|
17374
|
-
|
|
17375
|
-
// ../types/src/core/pagination.ts
|
|
17376
|
-
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17377
|
-
var init_pagination = __esm(() => {
|
|
17378
|
-
init_zod();
|
|
17379
|
-
PaginationParamsSchema = exports_external.object({
|
|
17380
|
-
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17381
|
-
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17382
|
-
});
|
|
17383
|
-
});
|
|
17384
|
-
|
|
17385
17248
|
// ../types/src/core/index.ts
|
|
17386
|
-
var init_core3 =
|
|
17387
|
-
init_common();
|
|
17388
|
-
init_ids();
|
|
17389
|
-
init_pagination();
|
|
17390
|
-
});
|
|
17249
|
+
var init_core3 = () => {};
|
|
17391
17250
|
|
|
17392
17251
|
// ../types/src/files/legacy-boundary.ts
|
|
17393
17252
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17412,9 +17271,6 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17412
17271
|
function isRuntimeFileRef(input) {
|
|
17413
17272
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17414
17273
|
}
|
|
17415
|
-
function isFilePathDescriptor(input) {
|
|
17416
|
-
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17417
|
-
}
|
|
17418
17274
|
function isResolvedProcessorFile(input) {
|
|
17419
17275
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17420
17276
|
}
|
|
@@ -17637,2508 +17493,11 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17637
17493
|
]);
|
|
17638
17494
|
});
|
|
17639
17495
|
|
|
17640
|
-
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17641
|
-
var require_version = __commonJS((exports) => {
|
|
17642
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17643
|
-
exports.VERSION = undefined;
|
|
17644
|
-
exports.VERSION = "1.9.1";
|
|
17645
|
-
});
|
|
17646
|
-
|
|
17647
|
-
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17648
|
-
var require_semver = __commonJS((exports) => {
|
|
17649
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17650
|
-
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17651
|
-
var version_1 = require_version();
|
|
17652
|
-
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17653
|
-
function _makeCompatibilityCheck(ownVersion) {
|
|
17654
|
-
const acceptedVersions = new Set([ownVersion]);
|
|
17655
|
-
const rejectedVersions = new Set;
|
|
17656
|
-
const myVersionMatch = ownVersion.match(re);
|
|
17657
|
-
if (!myVersionMatch) {
|
|
17658
|
-
return () => false;
|
|
17659
|
-
}
|
|
17660
|
-
const ownVersionParsed = {
|
|
17661
|
-
major: +myVersionMatch[1],
|
|
17662
|
-
minor: +myVersionMatch[2],
|
|
17663
|
-
patch: +myVersionMatch[3],
|
|
17664
|
-
prerelease: myVersionMatch[4]
|
|
17665
|
-
};
|
|
17666
|
-
if (ownVersionParsed.prerelease != null) {
|
|
17667
|
-
return function isExactmatch(globalVersion) {
|
|
17668
|
-
return globalVersion === ownVersion;
|
|
17669
|
-
};
|
|
17670
|
-
}
|
|
17671
|
-
function _reject(v) {
|
|
17672
|
-
rejectedVersions.add(v);
|
|
17673
|
-
return false;
|
|
17674
|
-
}
|
|
17675
|
-
function _accept(v) {
|
|
17676
|
-
acceptedVersions.add(v);
|
|
17677
|
-
return true;
|
|
17678
|
-
}
|
|
17679
|
-
return function isCompatible(globalVersion) {
|
|
17680
|
-
if (acceptedVersions.has(globalVersion)) {
|
|
17681
|
-
return true;
|
|
17682
|
-
}
|
|
17683
|
-
if (rejectedVersions.has(globalVersion)) {
|
|
17684
|
-
return false;
|
|
17685
|
-
}
|
|
17686
|
-
const globalVersionMatch = globalVersion.match(re);
|
|
17687
|
-
if (!globalVersionMatch) {
|
|
17688
|
-
return _reject(globalVersion);
|
|
17689
|
-
}
|
|
17690
|
-
const globalVersionParsed = {
|
|
17691
|
-
major: +globalVersionMatch[1],
|
|
17692
|
-
minor: +globalVersionMatch[2],
|
|
17693
|
-
patch: +globalVersionMatch[3],
|
|
17694
|
-
prerelease: globalVersionMatch[4]
|
|
17695
|
-
};
|
|
17696
|
-
if (globalVersionParsed.prerelease != null) {
|
|
17697
|
-
return _reject(globalVersion);
|
|
17698
|
-
}
|
|
17699
|
-
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17700
|
-
return _reject(globalVersion);
|
|
17701
|
-
}
|
|
17702
|
-
if (ownVersionParsed.major === 0) {
|
|
17703
|
-
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17704
|
-
return _accept(globalVersion);
|
|
17705
|
-
}
|
|
17706
|
-
return _reject(globalVersion);
|
|
17707
|
-
}
|
|
17708
|
-
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17709
|
-
return _accept(globalVersion);
|
|
17710
|
-
}
|
|
17711
|
-
return _reject(globalVersion);
|
|
17712
|
-
};
|
|
17713
|
-
}
|
|
17714
|
-
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17715
|
-
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17716
|
-
});
|
|
17717
|
-
|
|
17718
|
-
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17719
|
-
var require_global_utils = __commonJS((exports) => {
|
|
17720
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17721
|
-
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17722
|
-
var version_1 = require_version();
|
|
17723
|
-
var semver_1 = require_semver();
|
|
17724
|
-
var major = version_1.VERSION.split(".")[0];
|
|
17725
|
-
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17726
|
-
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17727
|
-
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17728
|
-
var _a3;
|
|
17729
|
-
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17730
|
-
version: version_1.VERSION
|
|
17731
|
-
};
|
|
17732
|
-
if (!allowOverride && api2[type]) {
|
|
17733
|
-
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17734
|
-
diag.error(err.stack || err.message);
|
|
17735
|
-
return false;
|
|
17736
|
-
}
|
|
17737
|
-
if (api2.version !== version_1.VERSION) {
|
|
17738
|
-
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17739
|
-
diag.error(err.stack || err.message);
|
|
17740
|
-
return false;
|
|
17741
|
-
}
|
|
17742
|
-
api2[type] = instance;
|
|
17743
|
-
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17744
|
-
return true;
|
|
17745
|
-
}
|
|
17746
|
-
exports.registerGlobal = registerGlobal;
|
|
17747
|
-
function getGlobal(type) {
|
|
17748
|
-
var _a3, _b;
|
|
17749
|
-
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17750
|
-
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17751
|
-
return;
|
|
17752
|
-
}
|
|
17753
|
-
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17754
|
-
}
|
|
17755
|
-
exports.getGlobal = getGlobal;
|
|
17756
|
-
function unregisterGlobal(type, diag) {
|
|
17757
|
-
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17758
|
-
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17759
|
-
if (api2) {
|
|
17760
|
-
delete api2[type];
|
|
17761
|
-
}
|
|
17762
|
-
}
|
|
17763
|
-
exports.unregisterGlobal = unregisterGlobal;
|
|
17764
|
-
});
|
|
17765
|
-
|
|
17766
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17767
|
-
var require_ComponentLogger = __commonJS((exports) => {
|
|
17768
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17769
|
-
exports.DiagComponentLogger = undefined;
|
|
17770
|
-
var global_utils_1 = require_global_utils();
|
|
17771
|
-
|
|
17772
|
-
class DiagComponentLogger {
|
|
17773
|
-
constructor(props) {
|
|
17774
|
-
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17775
|
-
}
|
|
17776
|
-
debug(...args) {
|
|
17777
|
-
return logProxy("debug", this._namespace, args);
|
|
17778
|
-
}
|
|
17779
|
-
error(...args) {
|
|
17780
|
-
return logProxy("error", this._namespace, args);
|
|
17781
|
-
}
|
|
17782
|
-
info(...args) {
|
|
17783
|
-
return logProxy("info", this._namespace, args);
|
|
17784
|
-
}
|
|
17785
|
-
warn(...args) {
|
|
17786
|
-
return logProxy("warn", this._namespace, args);
|
|
17787
|
-
}
|
|
17788
|
-
verbose(...args) {
|
|
17789
|
-
return logProxy("verbose", this._namespace, args);
|
|
17790
|
-
}
|
|
17791
|
-
}
|
|
17792
|
-
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17793
|
-
function logProxy(funcName, namespace, args) {
|
|
17794
|
-
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17795
|
-
if (!logger) {
|
|
17796
|
-
return;
|
|
17797
|
-
}
|
|
17798
|
-
return logger[funcName](namespace, ...args);
|
|
17799
|
-
}
|
|
17800
|
-
});
|
|
17801
|
-
|
|
17802
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17803
|
-
var require_types = __commonJS((exports) => {
|
|
17804
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17805
|
-
exports.DiagLogLevel = undefined;
|
|
17806
|
-
var DiagLogLevel;
|
|
17807
|
-
(function(DiagLogLevel2) {
|
|
17808
|
-
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17809
|
-
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17810
|
-
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17811
|
-
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17812
|
-
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17813
|
-
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17814
|
-
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17815
|
-
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17816
|
-
});
|
|
17817
|
-
|
|
17818
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17819
|
-
var require_logLevelLogger = __commonJS((exports) => {
|
|
17820
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17821
|
-
exports.createLogLevelDiagLogger = undefined;
|
|
17822
|
-
var types_1 = require_types();
|
|
17823
|
-
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17824
|
-
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17825
|
-
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17826
|
-
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17827
|
-
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17828
|
-
}
|
|
17829
|
-
logger = logger || {};
|
|
17830
|
-
function _filterFunc(funcName, theLevel) {
|
|
17831
|
-
const theFunc = logger[funcName];
|
|
17832
|
-
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17833
|
-
return theFunc.bind(logger);
|
|
17834
|
-
}
|
|
17835
|
-
return function() {};
|
|
17836
|
-
}
|
|
17837
|
-
return {
|
|
17838
|
-
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17839
|
-
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17840
|
-
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17841
|
-
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17842
|
-
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17843
|
-
};
|
|
17844
|
-
}
|
|
17845
|
-
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17846
|
-
});
|
|
17847
|
-
|
|
17848
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17849
|
-
var require_diag = __commonJS((exports) => {
|
|
17850
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17851
|
-
exports.DiagAPI = undefined;
|
|
17852
|
-
var ComponentLogger_1 = require_ComponentLogger();
|
|
17853
|
-
var logLevelLogger_1 = require_logLevelLogger();
|
|
17854
|
-
var types_1 = require_types();
|
|
17855
|
-
var global_utils_1 = require_global_utils();
|
|
17856
|
-
var API_NAME = "diag";
|
|
17857
|
-
|
|
17858
|
-
class DiagAPI {
|
|
17859
|
-
static instance() {
|
|
17860
|
-
if (!this._instance) {
|
|
17861
|
-
this._instance = new DiagAPI;
|
|
17862
|
-
}
|
|
17863
|
-
return this._instance;
|
|
17864
|
-
}
|
|
17865
|
-
constructor() {
|
|
17866
|
-
function _logProxy(funcName) {
|
|
17867
|
-
return function(...args) {
|
|
17868
|
-
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17869
|
-
if (!logger)
|
|
17870
|
-
return;
|
|
17871
|
-
return logger[funcName](...args);
|
|
17872
|
-
};
|
|
17873
|
-
}
|
|
17874
|
-
const self2 = this;
|
|
17875
|
-
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17876
|
-
var _a3, _b, _c;
|
|
17877
|
-
if (logger === self2) {
|
|
17878
|
-
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17879
|
-
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17880
|
-
return false;
|
|
17881
|
-
}
|
|
17882
|
-
if (typeof optionsOrLogLevel === "number") {
|
|
17883
|
-
optionsOrLogLevel = {
|
|
17884
|
-
logLevel: optionsOrLogLevel
|
|
17885
|
-
};
|
|
17886
|
-
}
|
|
17887
|
-
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17888
|
-
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17889
|
-
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17890
|
-
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17891
|
-
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17892
|
-
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17893
|
-
}
|
|
17894
|
-
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17895
|
-
};
|
|
17896
|
-
self2.setLogger = setLogger;
|
|
17897
|
-
self2.disable = () => {
|
|
17898
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17899
|
-
};
|
|
17900
|
-
self2.createComponentLogger = (options) => {
|
|
17901
|
-
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17902
|
-
};
|
|
17903
|
-
self2.verbose = _logProxy("verbose");
|
|
17904
|
-
self2.debug = _logProxy("debug");
|
|
17905
|
-
self2.info = _logProxy("info");
|
|
17906
|
-
self2.warn = _logProxy("warn");
|
|
17907
|
-
self2.error = _logProxy("error");
|
|
17908
|
-
}
|
|
17909
|
-
}
|
|
17910
|
-
exports.DiagAPI = DiagAPI;
|
|
17911
|
-
});
|
|
17912
|
-
|
|
17913
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17914
|
-
var require_baggage_impl = __commonJS((exports) => {
|
|
17915
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17916
|
-
exports.BaggageImpl = undefined;
|
|
17917
|
-
|
|
17918
|
-
class BaggageImpl {
|
|
17919
|
-
constructor(entries) {
|
|
17920
|
-
this._entries = entries ? new Map(entries) : new Map;
|
|
17921
|
-
}
|
|
17922
|
-
getEntry(key) {
|
|
17923
|
-
const entry = this._entries.get(key);
|
|
17924
|
-
if (!entry) {
|
|
17925
|
-
return;
|
|
17926
|
-
}
|
|
17927
|
-
return Object.assign({}, entry);
|
|
17928
|
-
}
|
|
17929
|
-
getAllEntries() {
|
|
17930
|
-
return Array.from(this._entries.entries());
|
|
17931
|
-
}
|
|
17932
|
-
setEntry(key, entry) {
|
|
17933
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17934
|
-
newBaggage._entries.set(key, entry);
|
|
17935
|
-
return newBaggage;
|
|
17936
|
-
}
|
|
17937
|
-
removeEntry(key) {
|
|
17938
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17939
|
-
newBaggage._entries.delete(key);
|
|
17940
|
-
return newBaggage;
|
|
17941
|
-
}
|
|
17942
|
-
removeEntries(...keys) {
|
|
17943
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17944
|
-
for (const key of keys) {
|
|
17945
|
-
newBaggage._entries.delete(key);
|
|
17946
|
-
}
|
|
17947
|
-
return newBaggage;
|
|
17948
|
-
}
|
|
17949
|
-
clear() {
|
|
17950
|
-
return new BaggageImpl;
|
|
17951
|
-
}
|
|
17952
|
-
}
|
|
17953
|
-
exports.BaggageImpl = BaggageImpl;
|
|
17954
|
-
});
|
|
17955
|
-
|
|
17956
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17957
|
-
var require_symbol = __commonJS((exports) => {
|
|
17958
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17959
|
-
exports.baggageEntryMetadataSymbol = undefined;
|
|
17960
|
-
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17961
|
-
});
|
|
17962
|
-
|
|
17963
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17964
|
-
var require_utils = __commonJS((exports) => {
|
|
17965
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17966
|
-
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17967
|
-
var diag_1 = require_diag();
|
|
17968
|
-
var baggage_impl_1 = require_baggage_impl();
|
|
17969
|
-
var symbol_1 = require_symbol();
|
|
17970
|
-
var diag = diag_1.DiagAPI.instance();
|
|
17971
|
-
function createBaggage(entries = {}) {
|
|
17972
|
-
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17973
|
-
}
|
|
17974
|
-
exports.createBaggage = createBaggage;
|
|
17975
|
-
function baggageEntryMetadataFromString(str) {
|
|
17976
|
-
if (typeof str !== "string") {
|
|
17977
|
-
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17978
|
-
str = "";
|
|
17979
|
-
}
|
|
17980
|
-
return {
|
|
17981
|
-
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17982
|
-
toString() {
|
|
17983
|
-
return str;
|
|
17984
|
-
}
|
|
17985
|
-
};
|
|
17986
|
-
}
|
|
17987
|
-
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17988
|
-
});
|
|
17989
|
-
|
|
17990
|
-
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17991
|
-
var require_context = __commonJS((exports) => {
|
|
17992
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17993
|
-
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17994
|
-
function createContextKey(description) {
|
|
17995
|
-
return Symbol.for(description);
|
|
17996
|
-
}
|
|
17997
|
-
exports.createContextKey = createContextKey;
|
|
17998
|
-
|
|
17999
|
-
class BaseContext {
|
|
18000
|
-
constructor(parentContext) {
|
|
18001
|
-
const self2 = this;
|
|
18002
|
-
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
18003
|
-
self2.getValue = (key) => self2._currentContext.get(key);
|
|
18004
|
-
self2.setValue = (key, value) => {
|
|
18005
|
-
const context = new BaseContext(self2._currentContext);
|
|
18006
|
-
context._currentContext.set(key, value);
|
|
18007
|
-
return context;
|
|
18008
|
-
};
|
|
18009
|
-
self2.deleteValue = (key) => {
|
|
18010
|
-
const context = new BaseContext(self2._currentContext);
|
|
18011
|
-
context._currentContext.delete(key);
|
|
18012
|
-
return context;
|
|
18013
|
-
};
|
|
18014
|
-
}
|
|
18015
|
-
}
|
|
18016
|
-
exports.ROOT_CONTEXT = new BaseContext;
|
|
18017
|
-
});
|
|
18018
|
-
|
|
18019
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
18020
|
-
var require_consoleLogger = __commonJS((exports) => {
|
|
18021
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18022
|
-
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
18023
|
-
var consoleMap = [
|
|
18024
|
-
{ n: "error", c: "error" },
|
|
18025
|
-
{ n: "warn", c: "warn" },
|
|
18026
|
-
{ n: "info", c: "info" },
|
|
18027
|
-
{ n: "debug", c: "debug" },
|
|
18028
|
-
{ n: "verbose", c: "trace" }
|
|
18029
|
-
];
|
|
18030
|
-
exports._originalConsoleMethods = {};
|
|
18031
|
-
if (typeof console !== "undefined") {
|
|
18032
|
-
const keys = [
|
|
18033
|
-
"error",
|
|
18034
|
-
"warn",
|
|
18035
|
-
"info",
|
|
18036
|
-
"debug",
|
|
18037
|
-
"trace",
|
|
18038
|
-
"log"
|
|
18039
|
-
];
|
|
18040
|
-
for (const key of keys) {
|
|
18041
|
-
if (typeof console[key] === "function") {
|
|
18042
|
-
exports._originalConsoleMethods[key] = console[key];
|
|
18043
|
-
}
|
|
18044
|
-
}
|
|
18045
|
-
}
|
|
18046
|
-
|
|
18047
|
-
class DiagConsoleLogger {
|
|
18048
|
-
constructor() {
|
|
18049
|
-
function _consoleFunc(funcName) {
|
|
18050
|
-
return function(...args) {
|
|
18051
|
-
let theFunc = exports._originalConsoleMethods[funcName];
|
|
18052
|
-
if (typeof theFunc !== "function") {
|
|
18053
|
-
theFunc = exports._originalConsoleMethods["log"];
|
|
18054
|
-
}
|
|
18055
|
-
if (typeof theFunc !== "function" && console) {
|
|
18056
|
-
theFunc = console[funcName];
|
|
18057
|
-
if (typeof theFunc !== "function") {
|
|
18058
|
-
theFunc = console.log;
|
|
18059
|
-
}
|
|
18060
|
-
}
|
|
18061
|
-
if (typeof theFunc === "function") {
|
|
18062
|
-
return theFunc.apply(console, args);
|
|
18063
|
-
}
|
|
18064
|
-
};
|
|
18065
|
-
}
|
|
18066
|
-
for (let i = 0;i < consoleMap.length; i++) {
|
|
18067
|
-
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
18068
|
-
}
|
|
18069
|
-
}
|
|
18070
|
-
}
|
|
18071
|
-
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
18072
|
-
});
|
|
18073
|
-
|
|
18074
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
18075
|
-
var require_NoopMeter = __commonJS((exports) => {
|
|
18076
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18077
|
-
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;
|
|
18078
|
-
|
|
18079
|
-
class NoopMeter {
|
|
18080
|
-
constructor() {}
|
|
18081
|
-
createGauge(_name, _options) {
|
|
18082
|
-
return exports.NOOP_GAUGE_METRIC;
|
|
18083
|
-
}
|
|
18084
|
-
createHistogram(_name, _options) {
|
|
18085
|
-
return exports.NOOP_HISTOGRAM_METRIC;
|
|
18086
|
-
}
|
|
18087
|
-
createCounter(_name, _options) {
|
|
18088
|
-
return exports.NOOP_COUNTER_METRIC;
|
|
18089
|
-
}
|
|
18090
|
-
createUpDownCounter(_name, _options) {
|
|
18091
|
-
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
18092
|
-
}
|
|
18093
|
-
createObservableGauge(_name, _options) {
|
|
18094
|
-
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
18095
|
-
}
|
|
18096
|
-
createObservableCounter(_name, _options) {
|
|
18097
|
-
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
18098
|
-
}
|
|
18099
|
-
createObservableUpDownCounter(_name, _options) {
|
|
18100
|
-
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
18101
|
-
}
|
|
18102
|
-
addBatchObservableCallback(_callback, _observables) {}
|
|
18103
|
-
removeBatchObservableCallback(_callback) {}
|
|
18104
|
-
}
|
|
18105
|
-
exports.NoopMeter = NoopMeter;
|
|
18106
|
-
|
|
18107
|
-
class NoopMetric {
|
|
18108
|
-
}
|
|
18109
|
-
exports.NoopMetric = NoopMetric;
|
|
18110
|
-
|
|
18111
|
-
class NoopCounterMetric extends NoopMetric {
|
|
18112
|
-
add(_value, _attributes) {}
|
|
18113
|
-
}
|
|
18114
|
-
exports.NoopCounterMetric = NoopCounterMetric;
|
|
18115
|
-
|
|
18116
|
-
class NoopUpDownCounterMetric extends NoopMetric {
|
|
18117
|
-
add(_value, _attributes) {}
|
|
18118
|
-
}
|
|
18119
|
-
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
18120
|
-
|
|
18121
|
-
class NoopGaugeMetric extends NoopMetric {
|
|
18122
|
-
record(_value, _attributes) {}
|
|
18123
|
-
}
|
|
18124
|
-
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
18125
|
-
|
|
18126
|
-
class NoopHistogramMetric extends NoopMetric {
|
|
18127
|
-
record(_value, _attributes) {}
|
|
18128
|
-
}
|
|
18129
|
-
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
18130
|
-
|
|
18131
|
-
class NoopObservableMetric {
|
|
18132
|
-
addCallback(_callback) {}
|
|
18133
|
-
removeCallback(_callback) {}
|
|
18134
|
-
}
|
|
18135
|
-
exports.NoopObservableMetric = NoopObservableMetric;
|
|
18136
|
-
|
|
18137
|
-
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
18138
|
-
}
|
|
18139
|
-
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
18140
|
-
|
|
18141
|
-
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
18142
|
-
}
|
|
18143
|
-
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
18144
|
-
|
|
18145
|
-
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
18146
|
-
}
|
|
18147
|
-
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
18148
|
-
exports.NOOP_METER = new NoopMeter;
|
|
18149
|
-
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
18150
|
-
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
18151
|
-
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
18152
|
-
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
18153
|
-
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
18154
|
-
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
18155
|
-
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
18156
|
-
function createNoopMeter() {
|
|
18157
|
-
return exports.NOOP_METER;
|
|
18158
|
-
}
|
|
18159
|
-
exports.createNoopMeter = createNoopMeter;
|
|
18160
|
-
});
|
|
18161
|
-
|
|
18162
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
18163
|
-
var require_Metric = __commonJS((exports) => {
|
|
18164
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18165
|
-
exports.ValueType = undefined;
|
|
18166
|
-
var ValueType;
|
|
18167
|
-
(function(ValueType2) {
|
|
18168
|
-
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
18169
|
-
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
18170
|
-
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
18171
|
-
});
|
|
18172
|
-
|
|
18173
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
18174
|
-
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18175
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18176
|
-
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18177
|
-
exports.defaultTextMapGetter = {
|
|
18178
|
-
get(carrier, key) {
|
|
18179
|
-
if (carrier == null) {
|
|
18180
|
-
return;
|
|
18181
|
-
}
|
|
18182
|
-
return carrier[key];
|
|
18183
|
-
},
|
|
18184
|
-
keys(carrier) {
|
|
18185
|
-
if (carrier == null) {
|
|
18186
|
-
return [];
|
|
18187
|
-
}
|
|
18188
|
-
return Object.keys(carrier);
|
|
18189
|
-
}
|
|
18190
|
-
};
|
|
18191
|
-
exports.defaultTextMapSetter = {
|
|
18192
|
-
set(carrier, key, value) {
|
|
18193
|
-
if (carrier == null) {
|
|
18194
|
-
return;
|
|
18195
|
-
}
|
|
18196
|
-
carrier[key] = value;
|
|
18197
|
-
}
|
|
18198
|
-
};
|
|
18199
|
-
});
|
|
18200
|
-
|
|
18201
|
-
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18202
|
-
var require_NoopContextManager = __commonJS((exports) => {
|
|
18203
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18204
|
-
exports.NoopContextManager = undefined;
|
|
18205
|
-
var context_1 = require_context();
|
|
18206
|
-
|
|
18207
|
-
class NoopContextManager {
|
|
18208
|
-
active() {
|
|
18209
|
-
return context_1.ROOT_CONTEXT;
|
|
18210
|
-
}
|
|
18211
|
-
with(_context, fn, thisArg, ...args) {
|
|
18212
|
-
return fn.call(thisArg, ...args);
|
|
18213
|
-
}
|
|
18214
|
-
bind(_context, target) {
|
|
18215
|
-
return target;
|
|
18216
|
-
}
|
|
18217
|
-
enable() {
|
|
18218
|
-
return this;
|
|
18219
|
-
}
|
|
18220
|
-
disable() {
|
|
18221
|
-
return this;
|
|
18222
|
-
}
|
|
18223
|
-
}
|
|
18224
|
-
exports.NoopContextManager = NoopContextManager;
|
|
18225
|
-
});
|
|
18226
|
-
|
|
18227
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18228
|
-
var require_context2 = __commonJS((exports) => {
|
|
18229
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18230
|
-
exports.ContextAPI = undefined;
|
|
18231
|
-
var NoopContextManager_1 = require_NoopContextManager();
|
|
18232
|
-
var global_utils_1 = require_global_utils();
|
|
18233
|
-
var diag_1 = require_diag();
|
|
18234
|
-
var API_NAME = "context";
|
|
18235
|
-
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18236
|
-
|
|
18237
|
-
class ContextAPI {
|
|
18238
|
-
constructor() {}
|
|
18239
|
-
static getInstance() {
|
|
18240
|
-
if (!this._instance) {
|
|
18241
|
-
this._instance = new ContextAPI;
|
|
18242
|
-
}
|
|
18243
|
-
return this._instance;
|
|
18244
|
-
}
|
|
18245
|
-
setGlobalContextManager(contextManager) {
|
|
18246
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18247
|
-
}
|
|
18248
|
-
active() {
|
|
18249
|
-
return this._getContextManager().active();
|
|
18250
|
-
}
|
|
18251
|
-
with(context, fn, thisArg, ...args) {
|
|
18252
|
-
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18253
|
-
}
|
|
18254
|
-
bind(context, target) {
|
|
18255
|
-
return this._getContextManager().bind(context, target);
|
|
18256
|
-
}
|
|
18257
|
-
_getContextManager() {
|
|
18258
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18259
|
-
}
|
|
18260
|
-
disable() {
|
|
18261
|
-
this._getContextManager().disable();
|
|
18262
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18263
|
-
}
|
|
18264
|
-
}
|
|
18265
|
-
exports.ContextAPI = ContextAPI;
|
|
18266
|
-
});
|
|
18267
|
-
|
|
18268
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18269
|
-
var require_trace_flags = __commonJS((exports) => {
|
|
18270
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18271
|
-
exports.TraceFlags = undefined;
|
|
18272
|
-
var TraceFlags;
|
|
18273
|
-
(function(TraceFlags2) {
|
|
18274
|
-
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18275
|
-
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18276
|
-
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18277
|
-
});
|
|
18278
|
-
|
|
18279
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18280
|
-
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18281
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18282
|
-
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18283
|
-
var trace_flags_1 = require_trace_flags();
|
|
18284
|
-
exports.INVALID_SPANID = "0000000000000000";
|
|
18285
|
-
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18286
|
-
exports.INVALID_SPAN_CONTEXT = {
|
|
18287
|
-
traceId: exports.INVALID_TRACEID,
|
|
18288
|
-
spanId: exports.INVALID_SPANID,
|
|
18289
|
-
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18290
|
-
};
|
|
18291
|
-
});
|
|
18292
|
-
|
|
18293
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18294
|
-
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18295
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18296
|
-
exports.NonRecordingSpan = undefined;
|
|
18297
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18298
|
-
|
|
18299
|
-
class NonRecordingSpan {
|
|
18300
|
-
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18301
|
-
this._spanContext = spanContext;
|
|
18302
|
-
}
|
|
18303
|
-
spanContext() {
|
|
18304
|
-
return this._spanContext;
|
|
18305
|
-
}
|
|
18306
|
-
setAttribute(_key, _value) {
|
|
18307
|
-
return this;
|
|
18308
|
-
}
|
|
18309
|
-
setAttributes(_attributes) {
|
|
18310
|
-
return this;
|
|
18311
|
-
}
|
|
18312
|
-
addEvent(_name, _attributes) {
|
|
18313
|
-
return this;
|
|
18314
|
-
}
|
|
18315
|
-
addLink(_link) {
|
|
18316
|
-
return this;
|
|
18317
|
-
}
|
|
18318
|
-
addLinks(_links) {
|
|
18319
|
-
return this;
|
|
18320
|
-
}
|
|
18321
|
-
setStatus(_status) {
|
|
18322
|
-
return this;
|
|
18323
|
-
}
|
|
18324
|
-
updateName(_name) {
|
|
18325
|
-
return this;
|
|
18326
|
-
}
|
|
18327
|
-
end(_endTime) {}
|
|
18328
|
-
isRecording() {
|
|
18329
|
-
return false;
|
|
18330
|
-
}
|
|
18331
|
-
recordException(_exception, _time) {}
|
|
18332
|
-
}
|
|
18333
|
-
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18334
|
-
});
|
|
18335
|
-
|
|
18336
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18337
|
-
var require_context_utils = __commonJS((exports) => {
|
|
18338
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18339
|
-
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18340
|
-
var context_1 = require_context();
|
|
18341
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18342
|
-
var context_2 = require_context2();
|
|
18343
|
-
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18344
|
-
function getSpan(context) {
|
|
18345
|
-
return context.getValue(SPAN_KEY) || undefined;
|
|
18346
|
-
}
|
|
18347
|
-
exports.getSpan = getSpan;
|
|
18348
|
-
function getActiveSpan() {
|
|
18349
|
-
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18350
|
-
}
|
|
18351
|
-
exports.getActiveSpan = getActiveSpan;
|
|
18352
|
-
function setSpan(context, span) {
|
|
18353
|
-
return context.setValue(SPAN_KEY, span);
|
|
18354
|
-
}
|
|
18355
|
-
exports.setSpan = setSpan;
|
|
18356
|
-
function deleteSpan(context) {
|
|
18357
|
-
return context.deleteValue(SPAN_KEY);
|
|
18358
|
-
}
|
|
18359
|
-
exports.deleteSpan = deleteSpan;
|
|
18360
|
-
function setSpanContext(context, spanContext) {
|
|
18361
|
-
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18362
|
-
}
|
|
18363
|
-
exports.setSpanContext = setSpanContext;
|
|
18364
|
-
function getSpanContext(context) {
|
|
18365
|
-
var _a3;
|
|
18366
|
-
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18367
|
-
}
|
|
18368
|
-
exports.getSpanContext = getSpanContext;
|
|
18369
|
-
});
|
|
18370
|
-
|
|
18371
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18372
|
-
var require_spancontext_utils = __commonJS((exports) => {
|
|
18373
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18374
|
-
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18375
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18376
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18377
|
-
var isHex = new Uint8Array([
|
|
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
|
-
0,
|
|
18426
|
-
1,
|
|
18427
|
-
1,
|
|
18428
|
-
1,
|
|
18429
|
-
1,
|
|
18430
|
-
1,
|
|
18431
|
-
1,
|
|
18432
|
-
1,
|
|
18433
|
-
1,
|
|
18434
|
-
1,
|
|
18435
|
-
1,
|
|
18436
|
-
0,
|
|
18437
|
-
0,
|
|
18438
|
-
0,
|
|
18439
|
-
0,
|
|
18440
|
-
0,
|
|
18441
|
-
0,
|
|
18442
|
-
0,
|
|
18443
|
-
1,
|
|
18444
|
-
1,
|
|
18445
|
-
1,
|
|
18446
|
-
1,
|
|
18447
|
-
1,
|
|
18448
|
-
1,
|
|
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
|
-
0,
|
|
18475
|
-
1,
|
|
18476
|
-
1,
|
|
18477
|
-
1,
|
|
18478
|
-
1,
|
|
18479
|
-
1,
|
|
18480
|
-
1
|
|
18481
|
-
]);
|
|
18482
|
-
function isValidHex(id, length) {
|
|
18483
|
-
if (typeof id !== "string" || id.length !== length)
|
|
18484
|
-
return false;
|
|
18485
|
-
let r = 0;
|
|
18486
|
-
for (let i = 0;i < id.length; i += 4) {
|
|
18487
|
-
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18488
|
-
}
|
|
18489
|
-
return r === length;
|
|
18490
|
-
}
|
|
18491
|
-
function isValidTraceId(traceId) {
|
|
18492
|
-
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18493
|
-
}
|
|
18494
|
-
exports.isValidTraceId = isValidTraceId;
|
|
18495
|
-
function isValidSpanId(spanId) {
|
|
18496
|
-
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18497
|
-
}
|
|
18498
|
-
exports.isValidSpanId = isValidSpanId;
|
|
18499
|
-
function isSpanContextValid(spanContext) {
|
|
18500
|
-
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18501
|
-
}
|
|
18502
|
-
exports.isSpanContextValid = isSpanContextValid;
|
|
18503
|
-
function wrapSpanContext(spanContext) {
|
|
18504
|
-
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18505
|
-
}
|
|
18506
|
-
exports.wrapSpanContext = wrapSpanContext;
|
|
18507
|
-
});
|
|
18508
|
-
|
|
18509
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18510
|
-
var require_NoopTracer = __commonJS((exports) => {
|
|
18511
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18512
|
-
exports.NoopTracer = undefined;
|
|
18513
|
-
var context_1 = require_context2();
|
|
18514
|
-
var context_utils_1 = require_context_utils();
|
|
18515
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18516
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
18517
|
-
var contextApi = context_1.ContextAPI.getInstance();
|
|
18518
|
-
|
|
18519
|
-
class NoopTracer {
|
|
18520
|
-
startSpan(name, options, context = contextApi.active()) {
|
|
18521
|
-
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18522
|
-
if (root) {
|
|
18523
|
-
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18524
|
-
}
|
|
18525
|
-
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18526
|
-
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18527
|
-
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18528
|
-
} else {
|
|
18529
|
-
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18530
|
-
}
|
|
18531
|
-
}
|
|
18532
|
-
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18533
|
-
let opts;
|
|
18534
|
-
let ctx;
|
|
18535
|
-
let fn;
|
|
18536
|
-
if (arguments.length < 2) {
|
|
18537
|
-
return;
|
|
18538
|
-
} else if (arguments.length === 2) {
|
|
18539
|
-
fn = arg2;
|
|
18540
|
-
} else if (arguments.length === 3) {
|
|
18541
|
-
opts = arg2;
|
|
18542
|
-
fn = arg3;
|
|
18543
|
-
} else {
|
|
18544
|
-
opts = arg2;
|
|
18545
|
-
ctx = arg3;
|
|
18546
|
-
fn = arg4;
|
|
18547
|
-
}
|
|
18548
|
-
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18549
|
-
const span = this.startSpan(name, opts, parentContext);
|
|
18550
|
-
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18551
|
-
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18552
|
-
}
|
|
18553
|
-
}
|
|
18554
|
-
exports.NoopTracer = NoopTracer;
|
|
18555
|
-
function isSpanContext(spanContext) {
|
|
18556
|
-
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";
|
|
18557
|
-
}
|
|
18558
|
-
});
|
|
18559
|
-
|
|
18560
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18561
|
-
var require_ProxyTracer = __commonJS((exports) => {
|
|
18562
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18563
|
-
exports.ProxyTracer = undefined;
|
|
18564
|
-
var NoopTracer_1 = require_NoopTracer();
|
|
18565
|
-
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18566
|
-
|
|
18567
|
-
class ProxyTracer {
|
|
18568
|
-
constructor(provider, name, version2, options) {
|
|
18569
|
-
this._provider = provider;
|
|
18570
|
-
this.name = name;
|
|
18571
|
-
this.version = version2;
|
|
18572
|
-
this.options = options;
|
|
18573
|
-
}
|
|
18574
|
-
startSpan(name, options, context) {
|
|
18575
|
-
return this._getTracer().startSpan(name, options, context);
|
|
18576
|
-
}
|
|
18577
|
-
startActiveSpan(_name, _options, _context, _fn) {
|
|
18578
|
-
const tracer = this._getTracer();
|
|
18579
|
-
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18580
|
-
}
|
|
18581
|
-
_getTracer() {
|
|
18582
|
-
if (this._delegate) {
|
|
18583
|
-
return this._delegate;
|
|
18584
|
-
}
|
|
18585
|
-
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18586
|
-
if (!tracer) {
|
|
18587
|
-
return NOOP_TRACER;
|
|
18588
|
-
}
|
|
18589
|
-
this._delegate = tracer;
|
|
18590
|
-
return this._delegate;
|
|
18591
|
-
}
|
|
18592
|
-
}
|
|
18593
|
-
exports.ProxyTracer = ProxyTracer;
|
|
18594
|
-
});
|
|
18595
|
-
|
|
18596
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18597
|
-
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18598
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18599
|
-
exports.NoopTracerProvider = undefined;
|
|
18600
|
-
var NoopTracer_1 = require_NoopTracer();
|
|
18601
|
-
|
|
18602
|
-
class NoopTracerProvider {
|
|
18603
|
-
getTracer(_name, _version, _options) {
|
|
18604
|
-
return new NoopTracer_1.NoopTracer;
|
|
18605
|
-
}
|
|
18606
|
-
}
|
|
18607
|
-
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18608
|
-
});
|
|
18609
|
-
|
|
18610
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18611
|
-
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18612
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18613
|
-
exports.ProxyTracerProvider = undefined;
|
|
18614
|
-
var ProxyTracer_1 = require_ProxyTracer();
|
|
18615
|
-
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18616
|
-
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18617
|
-
|
|
18618
|
-
class ProxyTracerProvider {
|
|
18619
|
-
getTracer(name, version2, options) {
|
|
18620
|
-
var _a3;
|
|
18621
|
-
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18622
|
-
}
|
|
18623
|
-
getDelegate() {
|
|
18624
|
-
var _a3;
|
|
18625
|
-
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18626
|
-
}
|
|
18627
|
-
setDelegate(delegate) {
|
|
18628
|
-
this._delegate = delegate;
|
|
18629
|
-
}
|
|
18630
|
-
getDelegateTracer(name, version2, options) {
|
|
18631
|
-
var _a3;
|
|
18632
|
-
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18633
|
-
}
|
|
18634
|
-
}
|
|
18635
|
-
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18636
|
-
});
|
|
18637
|
-
|
|
18638
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18639
|
-
var require_SamplingResult = __commonJS((exports) => {
|
|
18640
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18641
|
-
exports.SamplingDecision = undefined;
|
|
18642
|
-
var SamplingDecision;
|
|
18643
|
-
(function(SamplingDecision2) {
|
|
18644
|
-
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18645
|
-
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18646
|
-
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18647
|
-
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18648
|
-
});
|
|
18649
|
-
|
|
18650
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18651
|
-
var require_span_kind = __commonJS((exports) => {
|
|
18652
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18653
|
-
exports.SpanKind = undefined;
|
|
18654
|
-
var SpanKind;
|
|
18655
|
-
(function(SpanKind2) {
|
|
18656
|
-
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18657
|
-
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18658
|
-
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18659
|
-
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18660
|
-
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18661
|
-
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18662
|
-
});
|
|
18663
|
-
|
|
18664
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18665
|
-
var require_status = __commonJS((exports) => {
|
|
18666
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18667
|
-
exports.SpanStatusCode = undefined;
|
|
18668
|
-
var SpanStatusCode;
|
|
18669
|
-
(function(SpanStatusCode2) {
|
|
18670
|
-
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18671
|
-
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18672
|
-
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18673
|
-
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18674
|
-
});
|
|
18675
|
-
|
|
18676
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18677
|
-
var require_tracestate_validators = __commonJS((exports) => {
|
|
18678
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18679
|
-
exports.validateValue = exports.validateKey = undefined;
|
|
18680
|
-
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18681
|
-
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18682
|
-
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18683
|
-
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18684
|
-
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18685
|
-
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18686
|
-
function validateKey(key) {
|
|
18687
|
-
return VALID_KEY_REGEX.test(key);
|
|
18688
|
-
}
|
|
18689
|
-
exports.validateKey = validateKey;
|
|
18690
|
-
function validateValue(value) {
|
|
18691
|
-
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18692
|
-
}
|
|
18693
|
-
exports.validateValue = validateValue;
|
|
18694
|
-
});
|
|
18695
|
-
|
|
18696
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18697
|
-
var require_tracestate_impl = __commonJS((exports) => {
|
|
18698
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18699
|
-
exports.TraceStateImpl = undefined;
|
|
18700
|
-
var tracestate_validators_1 = require_tracestate_validators();
|
|
18701
|
-
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18702
|
-
var MAX_TRACE_STATE_LEN = 512;
|
|
18703
|
-
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18704
|
-
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18705
|
-
|
|
18706
|
-
class TraceStateImpl {
|
|
18707
|
-
constructor(rawTraceState) {
|
|
18708
|
-
this._internalState = new Map;
|
|
18709
|
-
if (rawTraceState)
|
|
18710
|
-
this._parse(rawTraceState);
|
|
18711
|
-
}
|
|
18712
|
-
set(key, value) {
|
|
18713
|
-
const traceState = this._clone();
|
|
18714
|
-
if (traceState._internalState.has(key)) {
|
|
18715
|
-
traceState._internalState.delete(key);
|
|
18716
|
-
}
|
|
18717
|
-
traceState._internalState.set(key, value);
|
|
18718
|
-
return traceState;
|
|
18719
|
-
}
|
|
18720
|
-
unset(key) {
|
|
18721
|
-
const traceState = this._clone();
|
|
18722
|
-
traceState._internalState.delete(key);
|
|
18723
|
-
return traceState;
|
|
18724
|
-
}
|
|
18725
|
-
get(key) {
|
|
18726
|
-
return this._internalState.get(key);
|
|
18727
|
-
}
|
|
18728
|
-
serialize() {
|
|
18729
|
-
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18730
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18731
|
-
return agg;
|
|
18732
|
-
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18733
|
-
}
|
|
18734
|
-
_parse(rawTraceState) {
|
|
18735
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18736
|
-
return;
|
|
18737
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18738
|
-
const listMember = part.trim();
|
|
18739
|
-
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18740
|
-
if (i !== -1) {
|
|
18741
|
-
const key = listMember.slice(0, i);
|
|
18742
|
-
const value = listMember.slice(i + 1, part.length);
|
|
18743
|
-
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18744
|
-
agg.set(key, value);
|
|
18745
|
-
}
|
|
18746
|
-
}
|
|
18747
|
-
return agg;
|
|
18748
|
-
}, new Map);
|
|
18749
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18750
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18751
|
-
}
|
|
18752
|
-
}
|
|
18753
|
-
_keys() {
|
|
18754
|
-
return Array.from(this._internalState.keys()).reverse();
|
|
18755
|
-
}
|
|
18756
|
-
_clone() {
|
|
18757
|
-
const traceState = new TraceStateImpl;
|
|
18758
|
-
traceState._internalState = new Map(this._internalState);
|
|
18759
|
-
return traceState;
|
|
18760
|
-
}
|
|
18761
|
-
}
|
|
18762
|
-
exports.TraceStateImpl = TraceStateImpl;
|
|
18763
|
-
});
|
|
18764
|
-
|
|
18765
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18766
|
-
var require_utils2 = __commonJS((exports) => {
|
|
18767
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18768
|
-
exports.createTraceState = undefined;
|
|
18769
|
-
var tracestate_impl_1 = require_tracestate_impl();
|
|
18770
|
-
function createTraceState(rawTraceState) {
|
|
18771
|
-
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18772
|
-
}
|
|
18773
|
-
exports.createTraceState = createTraceState;
|
|
18774
|
-
});
|
|
18775
|
-
|
|
18776
|
-
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18777
|
-
var require_context_api = __commonJS((exports) => {
|
|
18778
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18779
|
-
exports.context = undefined;
|
|
18780
|
-
var context_1 = require_context2();
|
|
18781
|
-
exports.context = context_1.ContextAPI.getInstance();
|
|
18782
|
-
});
|
|
18783
|
-
|
|
18784
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18785
|
-
var require_diag_api = __commonJS((exports) => {
|
|
18786
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18787
|
-
exports.diag = undefined;
|
|
18788
|
-
var diag_1 = require_diag();
|
|
18789
|
-
exports.diag = diag_1.DiagAPI.instance();
|
|
18790
|
-
});
|
|
18791
|
-
|
|
18792
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18793
|
-
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18794
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18795
|
-
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18796
|
-
var NoopMeter_1 = require_NoopMeter();
|
|
18797
|
-
|
|
18798
|
-
class NoopMeterProvider {
|
|
18799
|
-
getMeter(_name, _version, _options) {
|
|
18800
|
-
return NoopMeter_1.NOOP_METER;
|
|
18801
|
-
}
|
|
18802
|
-
}
|
|
18803
|
-
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18804
|
-
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18805
|
-
});
|
|
18806
|
-
|
|
18807
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18808
|
-
var require_metrics = __commonJS((exports) => {
|
|
18809
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18810
|
-
exports.MetricsAPI = undefined;
|
|
18811
|
-
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18812
|
-
var global_utils_1 = require_global_utils();
|
|
18813
|
-
var diag_1 = require_diag();
|
|
18814
|
-
var API_NAME = "metrics";
|
|
18815
|
-
|
|
18816
|
-
class MetricsAPI {
|
|
18817
|
-
constructor() {}
|
|
18818
|
-
static getInstance() {
|
|
18819
|
-
if (!this._instance) {
|
|
18820
|
-
this._instance = new MetricsAPI;
|
|
18821
|
-
}
|
|
18822
|
-
return this._instance;
|
|
18823
|
-
}
|
|
18824
|
-
setGlobalMeterProvider(provider) {
|
|
18825
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18826
|
-
}
|
|
18827
|
-
getMeterProvider() {
|
|
18828
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18829
|
-
}
|
|
18830
|
-
getMeter(name, version2, options) {
|
|
18831
|
-
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18832
|
-
}
|
|
18833
|
-
disable() {
|
|
18834
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18835
|
-
}
|
|
18836
|
-
}
|
|
18837
|
-
exports.MetricsAPI = MetricsAPI;
|
|
18838
|
-
});
|
|
18839
|
-
|
|
18840
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18841
|
-
var require_metrics_api = __commonJS((exports) => {
|
|
18842
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18843
|
-
exports.metrics = undefined;
|
|
18844
|
-
var metrics_1 = require_metrics();
|
|
18845
|
-
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18846
|
-
});
|
|
18847
|
-
|
|
18848
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18849
|
-
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18850
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18851
|
-
exports.NoopTextMapPropagator = undefined;
|
|
18852
|
-
|
|
18853
|
-
class NoopTextMapPropagator {
|
|
18854
|
-
inject(_context, _carrier) {}
|
|
18855
|
-
extract(context, _carrier) {
|
|
18856
|
-
return context;
|
|
18857
|
-
}
|
|
18858
|
-
fields() {
|
|
18859
|
-
return [];
|
|
18860
|
-
}
|
|
18861
|
-
}
|
|
18862
|
-
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18863
|
-
});
|
|
18864
|
-
|
|
18865
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18866
|
-
var require_context_helpers = __commonJS((exports) => {
|
|
18867
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18868
|
-
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18869
|
-
var context_1 = require_context2();
|
|
18870
|
-
var context_2 = require_context();
|
|
18871
|
-
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18872
|
-
function getBaggage(context) {
|
|
18873
|
-
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18874
|
-
}
|
|
18875
|
-
exports.getBaggage = getBaggage;
|
|
18876
|
-
function getActiveBaggage() {
|
|
18877
|
-
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18878
|
-
}
|
|
18879
|
-
exports.getActiveBaggage = getActiveBaggage;
|
|
18880
|
-
function setBaggage(context, baggage) {
|
|
18881
|
-
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18882
|
-
}
|
|
18883
|
-
exports.setBaggage = setBaggage;
|
|
18884
|
-
function deleteBaggage(context) {
|
|
18885
|
-
return context.deleteValue(BAGGAGE_KEY);
|
|
18886
|
-
}
|
|
18887
|
-
exports.deleteBaggage = deleteBaggage;
|
|
18888
|
-
});
|
|
18889
|
-
|
|
18890
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18891
|
-
var require_propagation = __commonJS((exports) => {
|
|
18892
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18893
|
-
exports.PropagationAPI = undefined;
|
|
18894
|
-
var global_utils_1 = require_global_utils();
|
|
18895
|
-
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18896
|
-
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18897
|
-
var context_helpers_1 = require_context_helpers();
|
|
18898
|
-
var utils_1 = require_utils();
|
|
18899
|
-
var diag_1 = require_diag();
|
|
18900
|
-
var API_NAME = "propagation";
|
|
18901
|
-
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18902
|
-
|
|
18903
|
-
class PropagationAPI {
|
|
18904
|
-
constructor() {
|
|
18905
|
-
this.createBaggage = utils_1.createBaggage;
|
|
18906
|
-
this.getBaggage = context_helpers_1.getBaggage;
|
|
18907
|
-
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18908
|
-
this.setBaggage = context_helpers_1.setBaggage;
|
|
18909
|
-
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18910
|
-
}
|
|
18911
|
-
static getInstance() {
|
|
18912
|
-
if (!this._instance) {
|
|
18913
|
-
this._instance = new PropagationAPI;
|
|
18914
|
-
}
|
|
18915
|
-
return this._instance;
|
|
18916
|
-
}
|
|
18917
|
-
setGlobalPropagator(propagator) {
|
|
18918
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18919
|
-
}
|
|
18920
|
-
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18921
|
-
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18922
|
-
}
|
|
18923
|
-
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18924
|
-
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18925
|
-
}
|
|
18926
|
-
fields() {
|
|
18927
|
-
return this._getGlobalPropagator().fields();
|
|
18928
|
-
}
|
|
18929
|
-
disable() {
|
|
18930
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18931
|
-
}
|
|
18932
|
-
_getGlobalPropagator() {
|
|
18933
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18934
|
-
}
|
|
18935
|
-
}
|
|
18936
|
-
exports.PropagationAPI = PropagationAPI;
|
|
18937
|
-
});
|
|
18938
|
-
|
|
18939
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18940
|
-
var require_propagation_api = __commonJS((exports) => {
|
|
18941
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18942
|
-
exports.propagation = undefined;
|
|
18943
|
-
var propagation_1 = require_propagation();
|
|
18944
|
-
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18945
|
-
});
|
|
18946
|
-
|
|
18947
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18948
|
-
var require_trace = __commonJS((exports) => {
|
|
18949
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18950
|
-
exports.TraceAPI = undefined;
|
|
18951
|
-
var global_utils_1 = require_global_utils();
|
|
18952
|
-
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18953
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
18954
|
-
var context_utils_1 = require_context_utils();
|
|
18955
|
-
var diag_1 = require_diag();
|
|
18956
|
-
var API_NAME = "trace";
|
|
18957
|
-
|
|
18958
|
-
class TraceAPI {
|
|
18959
|
-
constructor() {
|
|
18960
|
-
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18961
|
-
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18962
|
-
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18963
|
-
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18964
|
-
this.getSpan = context_utils_1.getSpan;
|
|
18965
|
-
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18966
|
-
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18967
|
-
this.setSpan = context_utils_1.setSpan;
|
|
18968
|
-
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18969
|
-
}
|
|
18970
|
-
static getInstance() {
|
|
18971
|
-
if (!this._instance) {
|
|
18972
|
-
this._instance = new TraceAPI;
|
|
18973
|
-
}
|
|
18974
|
-
return this._instance;
|
|
18975
|
-
}
|
|
18976
|
-
setGlobalTracerProvider(provider) {
|
|
18977
|
-
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18978
|
-
if (success3) {
|
|
18979
|
-
this._proxyTracerProvider.setDelegate(provider);
|
|
18980
|
-
}
|
|
18981
|
-
return success3;
|
|
18982
|
-
}
|
|
18983
|
-
getTracerProvider() {
|
|
18984
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18985
|
-
}
|
|
18986
|
-
getTracer(name, version2) {
|
|
18987
|
-
return this.getTracerProvider().getTracer(name, version2);
|
|
18988
|
-
}
|
|
18989
|
-
disable() {
|
|
18990
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18991
|
-
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18992
|
-
}
|
|
18993
|
-
}
|
|
18994
|
-
exports.TraceAPI = TraceAPI;
|
|
18995
|
-
});
|
|
18996
|
-
|
|
18997
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18998
|
-
var require_trace_api = __commonJS((exports) => {
|
|
18999
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19000
|
-
exports.trace = undefined;
|
|
19001
|
-
var trace_1 = require_trace();
|
|
19002
|
-
exports.trace = trace_1.TraceAPI.getInstance();
|
|
19003
|
-
});
|
|
19004
|
-
|
|
19005
|
-
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
19006
|
-
var require_src = __commonJS((exports) => {
|
|
19007
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19008
|
-
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;
|
|
19009
|
-
var utils_1 = require_utils();
|
|
19010
|
-
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
19011
|
-
return utils_1.baggageEntryMetadataFromString;
|
|
19012
|
-
} });
|
|
19013
|
-
var context_1 = require_context();
|
|
19014
|
-
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
19015
|
-
return context_1.createContextKey;
|
|
19016
|
-
} });
|
|
19017
|
-
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
19018
|
-
return context_1.ROOT_CONTEXT;
|
|
19019
|
-
} });
|
|
19020
|
-
var consoleLogger_1 = require_consoleLogger();
|
|
19021
|
-
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
19022
|
-
return consoleLogger_1.DiagConsoleLogger;
|
|
19023
|
-
} });
|
|
19024
|
-
var types_1 = require_types();
|
|
19025
|
-
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
19026
|
-
return types_1.DiagLogLevel;
|
|
19027
|
-
} });
|
|
19028
|
-
var NoopMeter_1 = require_NoopMeter();
|
|
19029
|
-
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
19030
|
-
return NoopMeter_1.createNoopMeter;
|
|
19031
|
-
} });
|
|
19032
|
-
var Metric_1 = require_Metric();
|
|
19033
|
-
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
19034
|
-
return Metric_1.ValueType;
|
|
19035
|
-
} });
|
|
19036
|
-
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
19037
|
-
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
19038
|
-
return TextMapPropagator_1.defaultTextMapGetter;
|
|
19039
|
-
} });
|
|
19040
|
-
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
19041
|
-
return TextMapPropagator_1.defaultTextMapSetter;
|
|
19042
|
-
} });
|
|
19043
|
-
var ProxyTracer_1 = require_ProxyTracer();
|
|
19044
|
-
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
19045
|
-
return ProxyTracer_1.ProxyTracer;
|
|
19046
|
-
} });
|
|
19047
|
-
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
19048
|
-
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
19049
|
-
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
19050
|
-
} });
|
|
19051
|
-
var SamplingResult_1 = require_SamplingResult();
|
|
19052
|
-
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
19053
|
-
return SamplingResult_1.SamplingDecision;
|
|
19054
|
-
} });
|
|
19055
|
-
var span_kind_1 = require_span_kind();
|
|
19056
|
-
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
19057
|
-
return span_kind_1.SpanKind;
|
|
19058
|
-
} });
|
|
19059
|
-
var status_1 = require_status();
|
|
19060
|
-
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
19061
|
-
return status_1.SpanStatusCode;
|
|
19062
|
-
} });
|
|
19063
|
-
var trace_flags_1 = require_trace_flags();
|
|
19064
|
-
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
19065
|
-
return trace_flags_1.TraceFlags;
|
|
19066
|
-
} });
|
|
19067
|
-
var utils_2 = require_utils2();
|
|
19068
|
-
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
19069
|
-
return utils_2.createTraceState;
|
|
19070
|
-
} });
|
|
19071
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
19072
|
-
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
19073
|
-
return spancontext_utils_1.isSpanContextValid;
|
|
19074
|
-
} });
|
|
19075
|
-
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
19076
|
-
return spancontext_utils_1.isValidTraceId;
|
|
19077
|
-
} });
|
|
19078
|
-
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
19079
|
-
return spancontext_utils_1.isValidSpanId;
|
|
19080
|
-
} });
|
|
19081
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
19082
|
-
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
19083
|
-
return invalid_span_constants_1.INVALID_SPANID;
|
|
19084
|
-
} });
|
|
19085
|
-
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
19086
|
-
return invalid_span_constants_1.INVALID_TRACEID;
|
|
19087
|
-
} });
|
|
19088
|
-
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
19089
|
-
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
19090
|
-
} });
|
|
19091
|
-
var context_api_1 = require_context_api();
|
|
19092
|
-
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
19093
|
-
return context_api_1.context;
|
|
19094
|
-
} });
|
|
19095
|
-
var diag_api_1 = require_diag_api();
|
|
19096
|
-
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
19097
|
-
return diag_api_1.diag;
|
|
19098
|
-
} });
|
|
19099
|
-
var metrics_api_1 = require_metrics_api();
|
|
19100
|
-
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
19101
|
-
return metrics_api_1.metrics;
|
|
19102
|
-
} });
|
|
19103
|
-
var propagation_api_1 = require_propagation_api();
|
|
19104
|
-
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
19105
|
-
return propagation_api_1.propagation;
|
|
19106
|
-
} });
|
|
19107
|
-
var trace_api_1 = require_trace_api();
|
|
19108
|
-
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
19109
|
-
return trace_api_1.trace;
|
|
19110
|
-
} });
|
|
19111
|
-
exports.default = {
|
|
19112
|
-
context: context_api_1.context,
|
|
19113
|
-
diag: diag_api_1.diag,
|
|
19114
|
-
metrics: metrics_api_1.metrics,
|
|
19115
|
-
propagation: propagation_api_1.propagation,
|
|
19116
|
-
trace: trace_api_1.trace
|
|
19117
|
-
};
|
|
19118
|
-
});
|
|
19119
|
-
|
|
19120
|
-
// ../types/src/processor/processor.ts
|
|
19121
|
-
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
19122
|
-
var init_processor = __esm(() => {
|
|
19123
|
-
init_zod();
|
|
19124
|
-
init_common();
|
|
19125
|
-
import_api = __toESM(require_src(), 1);
|
|
19126
|
-
noopTracingContext = {
|
|
19127
|
-
traceId: "",
|
|
19128
|
-
getActiveSpan() {
|
|
19129
|
-
return;
|
|
19130
|
-
},
|
|
19131
|
-
async withSpan(_name, _options, fn) {
|
|
19132
|
-
const noopSpan = {
|
|
19133
|
-
spanContext: () => ({
|
|
19134
|
-
traceId: "",
|
|
19135
|
-
spanId: "",
|
|
19136
|
-
traceFlags: 0
|
|
19137
|
-
}),
|
|
19138
|
-
setAttribute: () => noopSpan,
|
|
19139
|
-
setAttributes: () => noopSpan,
|
|
19140
|
-
addEvent: () => noopSpan,
|
|
19141
|
-
addLink: () => noopSpan,
|
|
19142
|
-
addLinks: () => noopSpan,
|
|
19143
|
-
setStatus: () => noopSpan,
|
|
19144
|
-
updateName: () => noopSpan,
|
|
19145
|
-
end: () => {},
|
|
19146
|
-
isRecording: () => false,
|
|
19147
|
-
recordException: () => {}
|
|
19148
|
-
};
|
|
19149
|
-
return fn(noopSpan);
|
|
19150
|
-
}
|
|
19151
|
-
};
|
|
19152
|
-
ProcessorPortSchema = exports_external.object({
|
|
19153
|
-
name: exports_external.string(),
|
|
19154
|
-
schema: JsonSchemaSchema,
|
|
19155
|
-
required: exports_external.boolean().default(true)
|
|
19156
|
-
});
|
|
19157
|
-
ProcessorDefinitionSchema = exports_external.object({
|
|
19158
|
-
id: exports_external.string(),
|
|
19159
|
-
name: exports_external.string(),
|
|
19160
|
-
description: exports_external.string().optional(),
|
|
19161
|
-
inputSchema: JsonSchemaSchema,
|
|
19162
|
-
outputSchema: JsonSchemaSchema,
|
|
19163
|
-
configSchema: JsonSchemaSchema.optional(),
|
|
19164
|
-
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19165
|
-
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19166
|
-
isBuiltin: exports_external.boolean().default(true),
|
|
19167
|
-
pluginName: exports_external.string().optional()
|
|
19168
|
-
});
|
|
19169
|
-
ProcessorExecutionContextSchema = exports_external.object({
|
|
19170
|
-
jobId: exports_external.string(),
|
|
19171
|
-
stepId: exports_external.string(),
|
|
19172
|
-
tenantId: exports_external.string(),
|
|
19173
|
-
automationId: exports_external.string().optional(),
|
|
19174
|
-
workflowId: exports_external.string(),
|
|
19175
|
-
workerId: exports_external.string().optional()
|
|
19176
|
-
});
|
|
19177
|
-
((TraceStatus2) => {
|
|
19178
|
-
TraceStatus2["PENDING"] = "pending";
|
|
19179
|
-
TraceStatus2["RUNNING"] = "running";
|
|
19180
|
-
TraceStatus2["COMPLETED"] = "completed";
|
|
19181
|
-
TraceStatus2["FAILED"] = "failed";
|
|
19182
|
-
})(TraceStatus ||= {});
|
|
19183
|
-
});
|
|
19184
|
-
|
|
19185
|
-
// ../types/src/processor/normalize-extract-input.ts
|
|
19186
|
-
function normalizeExtractInputToText(input) {
|
|
19187
|
-
if (typeof input === "string") {
|
|
19188
|
-
return input;
|
|
19189
|
-
}
|
|
19190
|
-
if (input && typeof input === "object") {
|
|
19191
|
-
const obj = input;
|
|
19192
|
-
if (typeof obj.content === "string") {
|
|
19193
|
-
return obj.content;
|
|
19194
|
-
}
|
|
19195
|
-
if (typeof obj.text === "string") {
|
|
19196
|
-
return obj.text;
|
|
19197
|
-
}
|
|
19198
|
-
return JSON.stringify(input, null, 2);
|
|
19199
|
-
}
|
|
19200
|
-
return String(input ?? "");
|
|
19201
|
-
}
|
|
19202
|
-
function extractSourceTextFromResolvedConfig(config2) {
|
|
19203
|
-
if (!config2 || typeof config2 !== "object")
|
|
19204
|
-
return null;
|
|
19205
|
-
if (typeof config2.content === "string") {
|
|
19206
|
-
return normalizeExtractInputToText({ content: config2.content });
|
|
19207
|
-
}
|
|
19208
|
-
if (typeof config2.text === "string") {
|
|
19209
|
-
return normalizeExtractInputToText({ text: config2.text });
|
|
19210
|
-
}
|
|
19211
|
-
if (typeof config2.input === "string") {
|
|
19212
|
-
return normalizeExtractInputToText({ content: config2.input });
|
|
19213
|
-
}
|
|
19214
|
-
if (config2.input !== null && config2.input !== undefined) {
|
|
19215
|
-
return normalizeExtractInputToText(config2.input);
|
|
19216
|
-
}
|
|
19217
|
-
return null;
|
|
19218
|
-
}
|
|
19219
|
-
|
|
19220
|
-
// ../types/src/processor/grounding.ts
|
|
19221
|
-
function stripGroundingMetadata(value) {
|
|
19222
|
-
if (Array.isArray(value))
|
|
19223
|
-
return value.map(stripGroundingMetadata);
|
|
19224
|
-
if (value && typeof value === "object") {
|
|
19225
|
-
const out = {};
|
|
19226
|
-
for (const [k, v] of Object.entries(value)) {
|
|
19227
|
-
if (k === "_grounding")
|
|
19228
|
-
continue;
|
|
19229
|
-
out[k] = stripGroundingMetadata(v);
|
|
19230
|
-
}
|
|
19231
|
-
return out;
|
|
19232
|
-
}
|
|
19233
|
-
return value;
|
|
19234
|
-
}
|
|
19235
|
-
|
|
19236
|
-
// ../types/src/processor/execution.ts
|
|
19237
|
-
function asTuple(values) {
|
|
19238
|
-
return values;
|
|
19239
|
-
}
|
|
19240
|
-
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19241
|
-
var init_execution = __esm(() => {
|
|
19242
|
-
init_zod();
|
|
19243
|
-
WorkflowExecutionStatusValue = {
|
|
19244
|
-
CREATED: "created",
|
|
19245
|
-
PENDING: "pending",
|
|
19246
|
-
RUNNING: "running",
|
|
19247
|
-
WAITING: "waiting",
|
|
19248
|
-
COMPLETED: "completed",
|
|
19249
|
-
FAILED: "failed",
|
|
19250
|
-
CANCELLED: "cancelled"
|
|
19251
|
-
};
|
|
19252
|
-
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19253
|
-
WorkflowExecutionStatusValue.CREATED,
|
|
19254
|
-
WorkflowExecutionStatusValue.PENDING,
|
|
19255
|
-
WorkflowExecutionStatusValue.RUNNING,
|
|
19256
|
-
WorkflowExecutionStatusValue.WAITING,
|
|
19257
|
-
WorkflowExecutionStatusValue.COMPLETED,
|
|
19258
|
-
WorkflowExecutionStatusValue.FAILED,
|
|
19259
|
-
WorkflowExecutionStatusValue.CANCELLED
|
|
19260
|
-
]);
|
|
19261
|
-
StepExecutionStatusValue = {
|
|
19262
|
-
PENDING: "pending",
|
|
19263
|
-
RUNNING: "running",
|
|
19264
|
-
SUCCESS: "success",
|
|
19265
|
-
FAILURE: "failure",
|
|
19266
|
-
WAITING: "waiting",
|
|
19267
|
-
SKIPPED: "skipped"
|
|
19268
|
-
};
|
|
19269
|
-
StepExecutionStatusSchema = exports_external.enum([
|
|
19270
|
-
StepExecutionStatusValue.PENDING,
|
|
19271
|
-
StepExecutionStatusValue.RUNNING,
|
|
19272
|
-
StepExecutionStatusValue.SUCCESS,
|
|
19273
|
-
StepExecutionStatusValue.FAILURE,
|
|
19274
|
-
StepExecutionStatusValue.WAITING,
|
|
19275
|
-
StepExecutionStatusValue.SKIPPED
|
|
19276
|
-
]);
|
|
19277
|
-
TriggerTypeValue = {
|
|
19278
|
-
MANUAL: "manual",
|
|
19279
|
-
API: "api",
|
|
19280
|
-
WEBHOOK: "webhook",
|
|
19281
|
-
SCHEDULE: "schedule",
|
|
19282
|
-
EMAIL: "email",
|
|
19283
|
-
EVAL: "eval",
|
|
19284
|
-
CLI: "cli"
|
|
19285
|
-
};
|
|
19286
|
-
TriggerTypeSchema = exports_external.enum([
|
|
19287
|
-
TriggerTypeValue.MANUAL,
|
|
19288
|
-
TriggerTypeValue.API,
|
|
19289
|
-
TriggerTypeValue.WEBHOOK,
|
|
19290
|
-
TriggerTypeValue.SCHEDULE,
|
|
19291
|
-
TriggerTypeValue.EMAIL,
|
|
19292
|
-
TriggerTypeValue.EVAL,
|
|
19293
|
-
TriggerTypeValue.CLI
|
|
19294
|
-
]);
|
|
19295
|
-
ExecutionTypeValue = {
|
|
19296
|
-
PROD: "prod",
|
|
19297
|
-
EVAL: "eval",
|
|
19298
|
-
PLAYGROUND: "playground"
|
|
19299
|
-
};
|
|
19300
|
-
ExecutionTypeSchema = exports_external.enum([
|
|
19301
|
-
ExecutionTypeValue.PROD,
|
|
19302
|
-
ExecutionTypeValue.EVAL,
|
|
19303
|
-
ExecutionTypeValue.PLAYGROUND
|
|
19304
|
-
]);
|
|
19305
|
-
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19306
|
-
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19307
|
-
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19308
|
-
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19309
|
-
});
|
|
19310
|
-
|
|
19311
|
-
// ../types/src/processor/configs/classify.ts
|
|
19312
|
-
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19313
|
-
var init_classify = __esm(() => {
|
|
19314
|
-
init_zod();
|
|
19315
|
-
ClassifyInputSchema = exports_external.object({
|
|
19316
|
-
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19317
|
-
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19318
|
-
}).refine((data) => !!(data.content || data.text), {
|
|
19319
|
-
message: "Either content or text must be provided"
|
|
19320
|
-
});
|
|
19321
|
-
ClassifyLabelSchema = exports_external.object({
|
|
19322
|
-
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19323
|
-
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19324
|
-
});
|
|
19325
|
-
ClassifyConfigSchema = exports_external.object({
|
|
19326
|
-
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19327
|
-
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."),
|
|
19328
|
-
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19329
|
-
model: exports_external.string().optional().describe("Model override"),
|
|
19330
|
-
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19331
|
-
});
|
|
19332
|
-
ClassifyOutputSchema = exports_external.object({
|
|
19333
|
-
label: exports_external.string().describe("The selected label name"),
|
|
19334
|
-
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19335
|
-
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19336
|
-
});
|
|
19337
|
-
});
|
|
19338
|
-
|
|
19339
|
-
// ../types/src/processor/configs/classify-pages.ts
|
|
19340
|
-
var ClassifyPagesInputSchema, ClassifyPagesLabelSchema, ClassifyPagesConfigSchema, ClassifyPagesOutputSchema;
|
|
19341
|
-
var init_classify_pages = __esm(() => {
|
|
19342
|
-
init_zod();
|
|
19343
|
-
ClassifyPagesInputSchema = exports_external.object({
|
|
19344
|
-
pages: exports_external.array(exports_external.object({
|
|
19345
|
-
pageIndex: exports_external.number().int().nonnegative().describe("0-based page index"),
|
|
19346
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
19347
|
-
pageName: exports_external.string().optional()
|
|
19348
|
-
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19349
|
-
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly.");
|
|
19350
|
-
ClassifyPagesLabelSchema = exports_external.union([
|
|
19351
|
-
exports_external.string().min(1),
|
|
19352
|
-
exports_external.object({
|
|
19353
|
-
name: exports_external.string().min(1),
|
|
19354
|
-
description: exports_external.string().optional()
|
|
19355
|
-
})
|
|
19356
|
-
]);
|
|
19357
|
-
ClassifyPagesConfigSchema = exports_external.object({
|
|
19358
|
-
labels: exports_external.array(ClassifyPagesLabelSchema).min(1),
|
|
19359
|
-
prompt: exports_external.string().optional(),
|
|
19360
|
-
provider: exports_external.string().optional(),
|
|
19361
|
-
model: exports_external.string().optional(),
|
|
19362
|
-
windowTokenBudget: exports_external.number().int().positive().optional()
|
|
19363
|
-
});
|
|
19364
|
-
ClassifyPagesOutputSchema = exports_external.object({
|
|
19365
|
-
pages: exports_external.array(exports_external.object({
|
|
19366
|
-
pageIndex: exports_external.number().int(),
|
|
19367
|
-
labels: exports_external.array(exports_external.string())
|
|
19368
|
-
})),
|
|
19369
|
-
byLabel: exports_external.record(exports_external.string(), exports_external.array(exports_external.number().int()))
|
|
19370
|
-
});
|
|
19371
|
-
});
|
|
19372
|
-
|
|
19373
|
-
// ../types/src/parser/parser.ts
|
|
19374
|
-
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19375
|
-
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19376
|
-
if (!ext)
|
|
19377
|
-
return declaredMimeType;
|
|
19378
|
-
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19379
|
-
return extensionMime ?? declaredMimeType;
|
|
19380
|
-
}
|
|
19381
|
-
function mimeTypeForExtension(extension) {
|
|
19382
|
-
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19383
|
-
}
|
|
19384
|
-
function extensionForMimeType(mimeType) {
|
|
19385
|
-
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19386
|
-
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19387
|
-
}
|
|
19388
|
-
function getParserCategory(mimeType) {
|
|
19389
|
-
const normalized = mimeType.toLowerCase().trim();
|
|
19390
|
-
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19391
|
-
return "plaintext";
|
|
19392
|
-
}
|
|
19393
|
-
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19394
|
-
return "office";
|
|
19395
|
-
}
|
|
19396
|
-
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19397
|
-
return "document";
|
|
19398
|
-
}
|
|
19399
|
-
return null;
|
|
19400
|
-
}
|
|
19401
|
-
function requiresSpecializedParser(mimeType) {
|
|
19402
|
-
return getParserCategory(mimeType) === "document";
|
|
19403
|
-
}
|
|
19404
|
-
function getAllSupportedMimeTypes() {
|
|
19405
|
-
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19406
|
-
}
|
|
19407
|
-
function getSupportedFormatsLabel() {
|
|
19408
|
-
const allMimes = getAllSupportedMimeTypes();
|
|
19409
|
-
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19410
|
-
return labels.join(", ");
|
|
19411
|
-
}
|
|
19412
|
-
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;
|
|
19413
|
-
var init_parser = __esm(() => {
|
|
19414
|
-
init_zod();
|
|
19415
|
-
OFFICE_MIME_TYPES = [
|
|
19416
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19417
|
-
"application/msword",
|
|
19418
|
-
"application/vnd.oasis.opendocument.text",
|
|
19419
|
-
"application/rtf",
|
|
19420
|
-
"text/rtf",
|
|
19421
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19422
|
-
"application/vnd.ms-excel",
|
|
19423
|
-
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19424
|
-
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19425
|
-
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19426
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19427
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19428
|
-
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19429
|
-
"application/vnd.ms-powerpoint",
|
|
19430
|
-
"application/vnd.oasis.opendocument.presentation",
|
|
19431
|
-
"message/rfc822",
|
|
19432
|
-
"application/vnd.ms-outlook",
|
|
19433
|
-
"application/epub+zip"
|
|
19434
|
-
];
|
|
19435
|
-
ParserCategory = {
|
|
19436
|
-
PLAINTEXT: [
|
|
19437
|
-
"text/plain",
|
|
19438
|
-
"text/markdown",
|
|
19439
|
-
"text/csv",
|
|
19440
|
-
"text/tab-separated-values",
|
|
19441
|
-
"text/html",
|
|
19442
|
-
"text/xml",
|
|
19443
|
-
"application/json",
|
|
19444
|
-
"application/x-yaml",
|
|
19445
|
-
"application/toml",
|
|
19446
|
-
"image/svg+xml",
|
|
19447
|
-
"text/x-rst",
|
|
19448
|
-
"text/x-org",
|
|
19449
|
-
"application/x-latex",
|
|
19450
|
-
"application/x-ipynb+json",
|
|
19451
|
-
"application/x-bibtex",
|
|
19452
|
-
"application/docbook+xml",
|
|
19453
|
-
"application/x-fictionbook+xml"
|
|
19454
|
-
],
|
|
19455
|
-
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19456
|
-
DOCUMENT: [
|
|
19457
|
-
"application/pdf",
|
|
19458
|
-
"image/png",
|
|
19459
|
-
"image/jpeg",
|
|
19460
|
-
"image/webp",
|
|
19461
|
-
"image/tiff",
|
|
19462
|
-
"image/gif",
|
|
19463
|
-
"image/bmp"
|
|
19464
|
-
]
|
|
19465
|
-
};
|
|
19466
|
-
ParserTypeSchema = exports_external.enum([
|
|
19467
|
-
"plaintext",
|
|
19468
|
-
"office",
|
|
19469
|
-
"llm-vision",
|
|
19470
|
-
"ocr"
|
|
19471
|
-
]);
|
|
19472
|
-
DocumentMetadataSchema = exports_external.object({
|
|
19473
|
-
filename: exports_external.string(),
|
|
19474
|
-
mimeType: exports_external.string(),
|
|
19475
|
-
size: exports_external.number().describe("File size in bytes"),
|
|
19476
|
-
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19477
|
-
});
|
|
19478
|
-
ParseUsageSchema = exports_external.object({
|
|
19479
|
-
pageCount: exports_external.number(),
|
|
19480
|
-
processingTimeMs: exports_external.number().optional()
|
|
19481
|
-
});
|
|
19482
|
-
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19483
|
-
PointSchema = exports_external.object({
|
|
19484
|
-
x: exports_external.number(),
|
|
19485
|
-
y: exports_external.number()
|
|
19486
|
-
});
|
|
19487
|
-
BoundingRegionSchema = exports_external.object({
|
|
19488
|
-
polygon: exports_external.array(PointSchema).min(3),
|
|
19489
|
-
unit: CoordinateUnitSchema,
|
|
19490
|
-
pageIndex: exports_external.number()
|
|
19491
|
-
});
|
|
19492
|
-
PositionedTextSchema = exports_external.object({
|
|
19493
|
-
text: exports_external.string(),
|
|
19494
|
-
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19495
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19496
|
-
});
|
|
19497
|
-
TableCellSchema = exports_external.object({
|
|
19498
|
-
content: exports_external.string(),
|
|
19499
|
-
rowIndex: exports_external.number(),
|
|
19500
|
-
columnIndex: exports_external.number(),
|
|
19501
|
-
rowSpan: exports_external.number().default(1),
|
|
19502
|
-
columnSpan: exports_external.number().default(1),
|
|
19503
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19504
|
-
});
|
|
19505
|
-
ExtractedTableSchema = exports_external.object({
|
|
19506
|
-
cells: exports_external.array(TableCellSchema),
|
|
19507
|
-
rowCount: exports_external.number(),
|
|
19508
|
-
columnCount: exports_external.number(),
|
|
19509
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19510
|
-
});
|
|
19511
|
-
LayoutElementTypeSchema = exports_external.enum([
|
|
19512
|
-
"paragraph",
|
|
19513
|
-
"title",
|
|
19514
|
-
"sectionHeading",
|
|
19515
|
-
"pageHeader",
|
|
19516
|
-
"pageFooter",
|
|
19517
|
-
"pageNumber",
|
|
19518
|
-
"footnote",
|
|
19519
|
-
"table",
|
|
19520
|
-
"figure",
|
|
19521
|
-
"formulaBlock"
|
|
19522
|
-
]);
|
|
19523
|
-
LayoutElementSchema = exports_external.object({
|
|
19524
|
-
type: LayoutElementTypeSchema,
|
|
19525
|
-
content: exports_external.string(),
|
|
19526
|
-
table: ExtractedTableSchema.optional(),
|
|
19527
|
-
caption: exports_external.string().optional(),
|
|
19528
|
-
figureId: exports_external.string().optional(),
|
|
19529
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19530
|
-
});
|
|
19531
|
-
PageResultSchema = exports_external.object({
|
|
19532
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19533
|
-
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19534
|
-
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19535
|
-
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19536
|
-
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19537
|
-
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19538
|
-
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19539
|
-
width: exports_external.number().optional().describe("Page width"),
|
|
19540
|
-
height: exports_external.number().optional().describe("Page height"),
|
|
19541
|
-
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19542
|
-
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19543
|
-
});
|
|
19544
|
-
ParseResultSchema = exports_external.object({
|
|
19545
|
-
document: DocumentMetadataSchema,
|
|
19546
|
-
usage: ParseUsageSchema,
|
|
19547
|
-
pages: exports_external.array(PageResultSchema),
|
|
19548
|
-
text: exports_external.string().describe("Combined text from all pages"),
|
|
19549
|
-
parserType: ParserTypeSchema,
|
|
19550
|
-
parserVersion: exports_external.string().optional(),
|
|
19551
|
-
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19552
|
-
rawResponse: exports_external.unknown().optional()
|
|
19553
|
-
});
|
|
19554
|
-
ParseOptionsSchema = exports_external.object({
|
|
19555
|
-
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19556
|
-
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19557
|
-
includeWordPositions: exports_external.boolean().default(false),
|
|
19558
|
-
includeLinePositions: exports_external.boolean().default(false),
|
|
19559
|
-
extractTables: exports_external.boolean().default(true),
|
|
19560
|
-
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19561
|
-
model: exports_external.string().optional(),
|
|
19562
|
-
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19563
|
-
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19564
|
-
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19565
|
-
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19566
|
-
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19567
|
-
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19568
|
-
tenantId: exports_external.string().optional()
|
|
19569
|
-
});
|
|
19570
|
-
ParserInputSchema = exports_external.object({
|
|
19571
|
-
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19572
|
-
filename: exports_external.string(),
|
|
19573
|
-
mimeType: exports_external.string(),
|
|
19574
|
-
options: ParseOptionsSchema.optional()
|
|
19575
|
-
});
|
|
19576
|
-
EXTENSION_TO_MIME = {
|
|
19577
|
-
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19578
|
-
doc: "application/msword",
|
|
19579
|
-
odt: "application/vnd.oasis.opendocument.text",
|
|
19580
|
-
rtf: "application/rtf",
|
|
19581
|
-
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19582
|
-
xls: "application/vnd.ms-excel",
|
|
19583
|
-
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19584
|
-
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19585
|
-
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19586
|
-
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19587
|
-
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19588
|
-
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19589
|
-
ppt: "application/vnd.ms-powerpoint",
|
|
19590
|
-
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19591
|
-
eml: "message/rfc822",
|
|
19592
|
-
msg: "application/vnd.ms-outlook",
|
|
19593
|
-
epub: "application/epub+zip",
|
|
19594
|
-
pdf: "application/pdf",
|
|
19595
|
-
png: "image/png",
|
|
19596
|
-
jpg: "image/jpeg",
|
|
19597
|
-
jpeg: "image/jpeg",
|
|
19598
|
-
webp: "image/webp",
|
|
19599
|
-
tiff: "image/tiff",
|
|
19600
|
-
tif: "image/tiff",
|
|
19601
|
-
gif: "image/gif",
|
|
19602
|
-
bmp: "image/bmp",
|
|
19603
|
-
svg: "image/svg+xml",
|
|
19604
|
-
txt: "text/plain",
|
|
19605
|
-
md: "text/markdown",
|
|
19606
|
-
markdown: "text/markdown",
|
|
19607
|
-
csv: "text/csv",
|
|
19608
|
-
tsv: "text/tab-separated-values",
|
|
19609
|
-
html: "text/html",
|
|
19610
|
-
htm: "text/html",
|
|
19611
|
-
xml: "text/xml",
|
|
19612
|
-
json: "application/json",
|
|
19613
|
-
yaml: "application/x-yaml",
|
|
19614
|
-
yml: "application/x-yaml",
|
|
19615
|
-
toml: "application/toml",
|
|
19616
|
-
rst: "text/x-rst",
|
|
19617
|
-
org: "text/x-org",
|
|
19618
|
-
tex: "application/x-latex",
|
|
19619
|
-
latex: "application/x-latex",
|
|
19620
|
-
ipynb: "application/x-ipynb+json",
|
|
19621
|
-
bib: "application/x-bibtex",
|
|
19622
|
-
dbk: "application/docbook+xml",
|
|
19623
|
-
docbook: "application/docbook+xml",
|
|
19624
|
-
fb2: "application/x-fictionbook+xml"
|
|
19625
|
-
};
|
|
19626
|
-
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19627
|
-
if (!(mime in acc))
|
|
19628
|
-
acc[mime] = ext;
|
|
19629
|
-
return acc;
|
|
19630
|
-
}, {});
|
|
19631
|
-
MIME_TO_LABEL = {
|
|
19632
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19633
|
-
"application/msword": "DOC",
|
|
19634
|
-
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19635
|
-
"application/rtf": "RTF",
|
|
19636
|
-
"text/rtf": "RTF",
|
|
19637
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19638
|
-
"application/vnd.ms-excel": "XLS",
|
|
19639
|
-
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19640
|
-
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19641
|
-
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19642
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19643
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19644
|
-
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19645
|
-
"application/vnd.ms-powerpoint": "PPT",
|
|
19646
|
-
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19647
|
-
"message/rfc822": "EML",
|
|
19648
|
-
"application/vnd.ms-outlook": "MSG",
|
|
19649
|
-
"application/epub+zip": "EPUB",
|
|
19650
|
-
"application/pdf": "PDF",
|
|
19651
|
-
"image/png": "PNG",
|
|
19652
|
-
"image/jpeg": "JPEG",
|
|
19653
|
-
"image/webp": "WebP",
|
|
19654
|
-
"image/tiff": "TIFF",
|
|
19655
|
-
"image/gif": "GIF",
|
|
19656
|
-
"image/bmp": "BMP",
|
|
19657
|
-
"image/svg+xml": "SVG",
|
|
19658
|
-
"text/plain": "TXT",
|
|
19659
|
-
"text/markdown": "Markdown",
|
|
19660
|
-
"text/csv": "CSV",
|
|
19661
|
-
"text/tab-separated-values": "TSV",
|
|
19662
|
-
"text/html": "HTML",
|
|
19663
|
-
"text/xml": "XML",
|
|
19664
|
-
"application/json": "JSON",
|
|
19665
|
-
"application/x-yaml": "YAML",
|
|
19666
|
-
"application/toml": "TOML",
|
|
19667
|
-
"text/x-rst": "RST",
|
|
19668
|
-
"text/x-org": "Org",
|
|
19669
|
-
"application/x-latex": "LaTeX",
|
|
19670
|
-
"application/x-ipynb+json": "Jupyter",
|
|
19671
|
-
"application/x-bibtex": "BibTeX",
|
|
19672
|
-
"application/docbook+xml": "DocBook",
|
|
19673
|
-
"application/x-fictionbook+xml": "FB2"
|
|
19674
|
-
};
|
|
19675
|
-
});
|
|
19676
|
-
|
|
19677
|
-
// ../types/src/processor/configs/document-parser.ts
|
|
19678
|
-
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19679
|
-
var init_document_parser = __esm(() => {
|
|
19680
|
-
init_zod();
|
|
19681
|
-
init_runtime_file_ref();
|
|
19682
|
-
init_parser();
|
|
19683
|
-
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19684
|
-
DocumentParserOutputSchema = ParseResultSchema;
|
|
19685
|
-
DocumentParserConfigSchema = exports_external.object({
|
|
19686
|
-
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19687
|
-
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19688
|
-
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19689
|
-
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19690
|
-
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19691
|
-
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19692
|
-
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19693
|
-
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19694
|
-
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."),
|
|
19695
|
-
figureInstructions: exports_external.string().optional().describe("Custom instruction for the figure-description pass."),
|
|
19696
|
-
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19697
|
-
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.")
|
|
19698
|
-
}).prefault({});
|
|
19699
|
-
});
|
|
19700
|
-
|
|
19701
|
-
// ../types/src/processor/configs/extract.ts
|
|
19702
|
-
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19703
|
-
var init_extract = __esm(() => {
|
|
19704
|
-
init_zod();
|
|
19705
|
-
ExtractInputSchema = exports_external.object({
|
|
19706
|
-
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19707
|
-
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19708
|
-
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19709
|
-
imageData: exports_external.string().optional(),
|
|
19710
|
-
imageMimeType: exports_external.string().optional()
|
|
19711
|
-
}).refine((data) => data.content || data.text, {
|
|
19712
|
-
message: "Either content or text must be provided"
|
|
19713
|
-
});
|
|
19714
|
-
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.");
|
|
19715
|
-
ExtractConfigSchema = exports_external.object({
|
|
19716
|
-
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19717
|
-
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19718
|
-
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19719
|
-
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19720
|
-
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19721
|
-
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."),
|
|
19722
|
-
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."),
|
|
19723
|
-
groundingExamples: exports_external.array(exports_external.object({
|
|
19724
|
-
text: exports_external.string(),
|
|
19725
|
-
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19726
|
-
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19727
|
-
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.")
|
|
19728
|
-
});
|
|
19729
|
-
});
|
|
19730
|
-
|
|
19731
|
-
// ../types/src/processor/configs/merge.ts
|
|
19732
|
-
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19733
|
-
var init_merge = __esm(() => {
|
|
19734
|
-
init_zod();
|
|
19735
|
-
MergeConfigSchema = exports_external.object({
|
|
19736
|
-
preservePortNames: exports_external.boolean().default(true),
|
|
19737
|
-
outputKey: exports_external.string().optional()
|
|
19738
|
-
});
|
|
19739
|
-
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19740
|
-
MergeOutputSchema = exports_external.object({
|
|
19741
|
-
items: exports_external.array(exports_external.unknown()),
|
|
19742
|
-
count: exports_external.number(),
|
|
19743
|
-
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19744
|
-
});
|
|
19745
|
-
});
|
|
19746
|
-
|
|
19747
|
-
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19748
|
-
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19749
|
-
var init_pdf_embedder = __esm(() => {
|
|
19750
|
-
init_zod();
|
|
19751
|
-
init_runtime_file_ref();
|
|
19752
|
-
init_parser();
|
|
19753
|
-
PdfEmbedderInputSchema = exports_external.object({
|
|
19754
|
-
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19755
|
-
parseResult: exports_external.object({
|
|
19756
|
-
pages: exports_external.array(PageResultSchema),
|
|
19757
|
-
text: exports_external.string().optional()
|
|
19758
|
-
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19759
|
-
});
|
|
19760
|
-
PdfEmbedderOutputSchema = exports_external.object({
|
|
19761
|
-
fileId: exports_external.string().describe("File ID from files table"),
|
|
19762
|
-
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19763
|
-
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19764
|
-
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19765
|
-
});
|
|
19766
|
-
PdfEmbedderConfigSchema = exports_external.object({
|
|
19767
|
-
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19768
|
-
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")
|
|
19769
|
-
}).prefault({});
|
|
19770
|
-
});
|
|
19771
|
-
|
|
19772
|
-
// ../types/src/processor/configs/segment.ts
|
|
19773
|
-
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19774
|
-
var init_segment = __esm(() => {
|
|
19775
|
-
init_zod();
|
|
19776
|
-
SegmentInputSchema = exports_external.object({
|
|
19777
|
-
pages: exports_external.array(exports_external.object({
|
|
19778
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19779
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
19780
|
-
pageName: exports_external.string().optional()
|
|
19781
|
-
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19782
|
-
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19783
|
-
SegmentConfigSchema = exports_external.object({
|
|
19784
|
-
documentTypes: exports_external.array(exports_external.object({
|
|
19785
|
-
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19786
|
-
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.")
|
|
19787
|
-
})).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.'),
|
|
19788
|
-
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19789
|
-
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.'),
|
|
19790
|
-
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.")
|
|
19791
|
-
});
|
|
19792
|
-
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.");
|
|
19793
|
-
SegmentSummarySchema = exports_external.object({
|
|
19794
|
-
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19795
|
-
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19796
|
-
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19797
|
-
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19798
|
-
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19799
|
-
needsReview: exports_external.array(exports_external.object({
|
|
19800
|
-
index: exports_external.number().int(),
|
|
19801
|
-
type: exports_external.string(),
|
|
19802
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19803
|
-
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19804
|
-
notes: exports_external.string()
|
|
19805
|
-
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19806
|
-
});
|
|
19807
|
-
SegmentOutputSchema = exports_external.object({
|
|
19808
|
-
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19809
|
-
documents: exports_external.array(exports_external.object({
|
|
19810
|
-
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19811
|
-
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19812
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19813
|
-
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19814
|
-
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19815
|
-
evidence: exports_external.object({
|
|
19816
|
-
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19817
|
-
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19818
|
-
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19819
|
-
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19820
|
-
pages: exports_external.array(exports_external.object({
|
|
19821
|
-
pageIndex: exports_external.number().int(),
|
|
19822
|
-
text: exports_external.string(),
|
|
19823
|
-
pageName: exports_external.string().optional(),
|
|
19824
|
-
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19825
|
-
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19826
|
-
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19827
|
-
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19828
|
-
}))
|
|
19829
|
-
});
|
|
19830
|
-
});
|
|
19831
|
-
|
|
19832
|
-
// ../types/src/processor/configs/split.ts
|
|
19833
|
-
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitSectionSchema, SplitOutputSchema;
|
|
19834
|
-
var init_split = __esm(() => {
|
|
19835
|
-
init_zod();
|
|
19836
|
-
SplitInputSchema = exports_external.object({
|
|
19837
|
-
pages: exports_external.array(exports_external.object({
|
|
19838
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19839
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
19840
|
-
pageName: exports_external.string().optional()
|
|
19841
|
-
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19842
|
-
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19843
|
-
SplitConfigSchema = exports_external.object({
|
|
19844
|
-
sections: exports_external.array(exports_external.object({
|
|
19845
|
-
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19846
|
-
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."),
|
|
19847
|
-
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").'),
|
|
19848
|
-
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.')
|
|
19849
|
-
})).min(1),
|
|
19850
|
-
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19851
|
-
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.'),
|
|
19852
|
-
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.")
|
|
19853
|
-
});
|
|
19854
|
-
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.");
|
|
19855
|
-
SplitSectionSchema = exports_external.object({
|
|
19856
|
-
name: exports_external.string(),
|
|
19857
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19858
|
-
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19859
|
-
notes: exports_external.string(),
|
|
19860
|
-
evidence: exports_external.object({
|
|
19861
|
-
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19862
|
-
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19863
|
-
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19864
|
-
end_evidence: exports_external.object({
|
|
19865
|
-
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19866
|
-
confidence: ConfidenceLevelSchema2,
|
|
19867
|
-
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.")
|
|
19868
|
-
}).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)."),
|
|
19869
|
-
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19870
|
-
pages: exports_external.array(exports_external.object({
|
|
19871
|
-
pageIndex: exports_external.number().int(),
|
|
19872
|
-
text: exports_external.string(),
|
|
19873
|
-
pageName: exports_external.string().optional(),
|
|
19874
|
-
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19875
|
-
})).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."),
|
|
19876
|
-
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19877
|
-
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19878
|
-
});
|
|
19879
|
-
SplitOutputSchema = exports_external.object({
|
|
19880
|
-
splits: exports_external.array(SplitSectionSchema),
|
|
19881
|
-
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.")
|
|
19882
|
-
});
|
|
19883
|
-
});
|
|
19884
|
-
|
|
19885
|
-
// ../types/src/processor/configs/template.ts
|
|
19886
|
-
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19887
|
-
var init_template = __esm(() => {
|
|
19888
|
-
init_zod();
|
|
19889
|
-
TemplateInputSchema = exports_external.object({
|
|
19890
|
-
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19891
|
-
});
|
|
19892
|
-
TemplateOutputSchema = exports_external.object({
|
|
19893
|
-
fileId: exports_external.string().describe("File ID from files table")
|
|
19894
|
-
});
|
|
19895
|
-
TemplateConfigSchema = exports_external.object({
|
|
19896
|
-
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19897
|
-
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19898
|
-
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19899
|
-
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19900
|
-
});
|
|
19901
|
-
});
|
|
19902
|
-
|
|
19903
|
-
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19904
|
-
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19905
|
-
var init_xlsx_to_json = __esm(() => {
|
|
19906
|
-
init_zod();
|
|
19907
|
-
init_runtime_file_ref();
|
|
19908
|
-
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19909
|
-
XlsxToJsonOutputSchema = exports_external.object({
|
|
19910
|
-
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19911
|
-
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19912
|
-
});
|
|
19913
|
-
XlsxToJsonConfigSchema = exports_external.object({
|
|
19914
|
-
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19915
|
-
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19916
|
-
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19917
|
-
});
|
|
19918
|
-
});
|
|
19919
|
-
|
|
19920
|
-
// ../types/src/processor/configs/react-hook-form.ts
|
|
19921
|
-
function extractFieldMetadata(schema) {
|
|
19922
|
-
const fields = [];
|
|
19923
|
-
let inner = schema;
|
|
19924
|
-
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19925
|
-
inner = inner.unwrap();
|
|
19926
|
-
}
|
|
19927
|
-
if (inner instanceof exports_external.ZodObject) {
|
|
19928
|
-
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19929
|
-
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19930
|
-
}
|
|
19931
|
-
}
|
|
19932
|
-
return fields;
|
|
19933
|
-
}
|
|
19934
|
-
function extractSingleFieldMetadata(name, schema) {
|
|
19935
|
-
let current = schema;
|
|
19936
|
-
let required2 = true;
|
|
19937
|
-
let defaultValue = undefined;
|
|
19938
|
-
let description = current.description;
|
|
19939
|
-
while (true) {
|
|
19940
|
-
if (current instanceof exports_external.ZodOptional) {
|
|
19941
|
-
required2 = false;
|
|
19942
|
-
current = current.unwrap();
|
|
19943
|
-
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19944
|
-
defaultValue = current._def.defaultValue;
|
|
19945
|
-
current = current.unwrap();
|
|
19946
|
-
} else {
|
|
19947
|
-
break;
|
|
19948
|
-
}
|
|
19949
|
-
description ??= current.description;
|
|
19950
|
-
}
|
|
19951
|
-
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19952
|
-
if (current instanceof exports_external.ZodString)
|
|
19953
|
-
return { ...base, type: "string" };
|
|
19954
|
-
if (current instanceof exports_external.ZodNumber) {
|
|
19955
|
-
let min;
|
|
19956
|
-
let max;
|
|
19957
|
-
for (const c of current._def.checks ?? []) {
|
|
19958
|
-
const def = c._zod.def;
|
|
19959
|
-
if (def.check === "greater_than")
|
|
19960
|
-
min = def.value;
|
|
19961
|
-
if (def.check === "less_than")
|
|
19962
|
-
max = def.value;
|
|
19963
|
-
}
|
|
19964
|
-
return { ...base, type: "number", min, max };
|
|
19965
|
-
}
|
|
19966
|
-
if (current instanceof exports_external.ZodBoolean)
|
|
19967
|
-
return { ...base, type: "boolean" };
|
|
19968
|
-
if (current instanceof exports_external.ZodEnum) {
|
|
19969
|
-
return { ...base, type: "enum", enumValues: current.options };
|
|
19970
|
-
}
|
|
19971
|
-
if (current instanceof exports_external.ZodArray)
|
|
19972
|
-
return { ...base, type: "array" };
|
|
19973
|
-
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19974
|
-
return { ...base, type: "object" };
|
|
19975
|
-
}
|
|
19976
|
-
return base;
|
|
19977
|
-
}
|
|
19978
|
-
function getConfigFieldMetadata(processorId) {
|
|
19979
|
-
const schema = getConfigSchema(processorId);
|
|
19980
|
-
if (!schema)
|
|
19981
|
-
return;
|
|
19982
|
-
return extractFieldMetadata(schema);
|
|
19983
|
-
}
|
|
19984
|
-
function getConfigDefaults(processorId) {
|
|
19985
|
-
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19986
|
-
if (!schema)
|
|
19987
|
-
return {};
|
|
19988
|
-
try {
|
|
19989
|
-
const result = schema.safeParse({});
|
|
19990
|
-
if (result.success) {
|
|
19991
|
-
return result.data;
|
|
19992
|
-
}
|
|
19993
|
-
} catch {}
|
|
19994
|
-
const fields = extractFieldMetadata(schema);
|
|
19995
|
-
const defaults = {};
|
|
19996
|
-
for (const field of fields) {
|
|
19997
|
-
if (field.defaultValue !== undefined) {
|
|
19998
|
-
defaults[field.name] = field.defaultValue;
|
|
19999
|
-
}
|
|
20000
|
-
}
|
|
20001
|
-
return defaults;
|
|
20002
|
-
}
|
|
20003
|
-
function validateConfig(processorId, config2) {
|
|
20004
|
-
const schema = getConfigSchema(processorId);
|
|
20005
|
-
if (!schema) {
|
|
20006
|
-
return { valid: true, errors: {} };
|
|
20007
|
-
}
|
|
20008
|
-
const result = schema.safeParse(config2);
|
|
20009
|
-
if (result.success) {
|
|
20010
|
-
return { valid: true, errors: {} };
|
|
20011
|
-
}
|
|
20012
|
-
const errors3 = {};
|
|
20013
|
-
for (const issue2 of result.error.issues) {
|
|
20014
|
-
const path = issue2.path.join(".");
|
|
20015
|
-
errors3[path] = issue2.message;
|
|
20016
|
-
}
|
|
20017
|
-
return { valid: false, errors: errors3 };
|
|
20018
|
-
}
|
|
20019
|
-
var init_react_hook_form = __esm(() => {
|
|
20020
|
-
init_zod();
|
|
20021
|
-
init_configs();
|
|
20022
|
-
});
|
|
20023
|
-
|
|
20024
|
-
// ../types/src/processor/configs/index.ts
|
|
20025
|
-
function getProcessorSchemas(processorId) {
|
|
20026
|
-
return PROCESSOR_SCHEMAS[processorId];
|
|
20027
|
-
}
|
|
20028
|
-
function getConfigSchema(processorId) {
|
|
20029
|
-
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
20030
|
-
}
|
|
20031
|
-
function getAllProcessorJsonSchemas() {
|
|
20032
|
-
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
20033
|
-
id: p.id,
|
|
20034
|
-
inputSchema: toJsonSchema(p.inputSchema),
|
|
20035
|
-
outputSchema: toJsonSchema(p.outputSchema),
|
|
20036
|
-
configSchema: toJsonSchema(p.configSchema)
|
|
20037
|
-
}));
|
|
20038
|
-
}
|
|
20039
|
-
function listProcessorIds() {
|
|
20040
|
-
return Object.keys(PROCESSOR_SCHEMAS);
|
|
20041
|
-
}
|
|
20042
|
-
var PROCESSOR_SCHEMAS;
|
|
20043
|
-
var init_configs = __esm(() => {
|
|
20044
|
-
init_common();
|
|
20045
|
-
init_ids();
|
|
20046
|
-
init_classify();
|
|
20047
|
-
init_classify_pages();
|
|
20048
|
-
init_document_parser();
|
|
20049
|
-
init_extract();
|
|
20050
|
-
init_merge();
|
|
20051
|
-
init_pdf_embedder();
|
|
20052
|
-
init_segment();
|
|
20053
|
-
init_split();
|
|
20054
|
-
init_template();
|
|
20055
|
-
init_xlsx_to_json();
|
|
20056
|
-
init_react_hook_form();
|
|
20057
|
-
init_classify();
|
|
20058
|
-
init_classify_pages();
|
|
20059
|
-
init_document_parser();
|
|
20060
|
-
init_extract();
|
|
20061
|
-
init_merge();
|
|
20062
|
-
init_pdf_embedder();
|
|
20063
|
-
init_segment();
|
|
20064
|
-
init_split();
|
|
20065
|
-
init_template();
|
|
20066
|
-
init_xlsx_to_json();
|
|
20067
|
-
PROCESSOR_SCHEMAS = {
|
|
20068
|
-
[PROCESSOR_IDS.EXTRACT]: {
|
|
20069
|
-
id: PROCESSOR_IDS.EXTRACT,
|
|
20070
|
-
inputSchema: ExtractInputSchema,
|
|
20071
|
-
outputSchema: ExtractOutputSchema,
|
|
20072
|
-
configSchema: ExtractConfigSchema
|
|
20073
|
-
},
|
|
20074
|
-
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
20075
|
-
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
20076
|
-
inputSchema: DocumentParserInputSchema,
|
|
20077
|
-
outputSchema: DocumentParserOutputSchema,
|
|
20078
|
-
configSchema: DocumentParserConfigSchema
|
|
20079
|
-
},
|
|
20080
|
-
[PROCESSOR_IDS.MERGE]: {
|
|
20081
|
-
id: PROCESSOR_IDS.MERGE,
|
|
20082
|
-
inputSchema: MergeInputSchema,
|
|
20083
|
-
outputSchema: MergeOutputSchema,
|
|
20084
|
-
configSchema: MergeConfigSchema
|
|
20085
|
-
},
|
|
20086
|
-
[PROCESSOR_IDS.TEMPLATE]: {
|
|
20087
|
-
id: PROCESSOR_IDS.TEMPLATE,
|
|
20088
|
-
inputSchema: TemplateInputSchema,
|
|
20089
|
-
outputSchema: TemplateOutputSchema,
|
|
20090
|
-
configSchema: TemplateConfigSchema
|
|
20091
|
-
},
|
|
20092
|
-
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
20093
|
-
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
20094
|
-
inputSchema: PdfEmbedderInputSchema,
|
|
20095
|
-
outputSchema: PdfEmbedderOutputSchema,
|
|
20096
|
-
configSchema: PdfEmbedderConfigSchema
|
|
20097
|
-
},
|
|
20098
|
-
[PROCESSOR_IDS.SPLIT]: {
|
|
20099
|
-
id: PROCESSOR_IDS.SPLIT,
|
|
20100
|
-
inputSchema: SplitInputSchema,
|
|
20101
|
-
outputSchema: SplitOutputSchema,
|
|
20102
|
-
configSchema: SplitConfigSchema
|
|
20103
|
-
},
|
|
20104
|
-
[PROCESSOR_IDS.SEGMENT]: {
|
|
20105
|
-
id: PROCESSOR_IDS.SEGMENT,
|
|
20106
|
-
inputSchema: SegmentInputSchema,
|
|
20107
|
-
outputSchema: SegmentOutputSchema,
|
|
20108
|
-
configSchema: SegmentConfigSchema
|
|
20109
|
-
},
|
|
20110
|
-
[PROCESSOR_IDS.CLASSIFY]: {
|
|
20111
|
-
id: PROCESSOR_IDS.CLASSIFY,
|
|
20112
|
-
inputSchema: ClassifyInputSchema,
|
|
20113
|
-
outputSchema: ClassifyOutputSchema,
|
|
20114
|
-
configSchema: ClassifyConfigSchema
|
|
20115
|
-
},
|
|
20116
|
-
[PROCESSOR_IDS.CLASSIFY_PAGES]: {
|
|
20117
|
-
id: PROCESSOR_IDS.CLASSIFY_PAGES,
|
|
20118
|
-
inputSchema: ClassifyPagesInputSchema,
|
|
20119
|
-
outputSchema: ClassifyPagesOutputSchema,
|
|
20120
|
-
configSchema: ClassifyPagesConfigSchema
|
|
20121
|
-
},
|
|
20122
|
-
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
20123
|
-
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
20124
|
-
inputSchema: XlsxToJsonInputSchema,
|
|
20125
|
-
outputSchema: XlsxToJsonOutputSchema,
|
|
20126
|
-
configSchema: XlsxToJsonConfigSchema
|
|
20127
|
-
}
|
|
20128
|
-
};
|
|
20129
|
-
});
|
|
20130
|
-
|
|
20131
17496
|
// ../types/src/processor/index.ts
|
|
20132
|
-
var
|
|
20133
|
-
init_processor();
|
|
20134
|
-
init_execution();
|
|
20135
|
-
init_configs();
|
|
20136
|
-
});
|
|
17497
|
+
var init_processor = () => {};
|
|
20137
17498
|
|
|
20138
17499
|
// ../types/src/parser/index.ts
|
|
20139
|
-
var
|
|
20140
|
-
init_parser();
|
|
20141
|
-
});
|
|
17500
|
+
var init_parser = () => {};
|
|
20142
17501
|
|
|
20143
17502
|
// ../types/src/otel/semantic-conventions.ts
|
|
20144
17503
|
function mapLLMAttributes(attrs) {
|
|
@@ -23185,9 +20544,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
23185
20544
|
}
|
|
23186
20545
|
let expr = data;
|
|
23187
20546
|
const segments = jsonPointer.split("/");
|
|
23188
|
-
for (const
|
|
23189
|
-
if (
|
|
23190
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
20547
|
+
for (const segment of segments) {
|
|
20548
|
+
if (segment) {
|
|
20549
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
|
|
23191
20550
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
23192
20551
|
}
|
|
23193
20552
|
}
|
|
@@ -23467,7 +20826,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
23467
20826
|
});
|
|
23468
20827
|
|
|
23469
20828
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
23470
|
-
var
|
|
20829
|
+
var require_utils = __commonJS((exports, module) => {
|
|
23471
20830
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
23472
20831
|
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);
|
|
23473
20832
|
function stringArrayToHexStripped(input) {
|
|
@@ -23723,7 +21082,7 @@ var require_utils3 = __commonJS((exports, module) => {
|
|
|
23723
21082
|
|
|
23724
21083
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
23725
21084
|
var require_schemes = __commonJS((exports, module) => {
|
|
23726
|
-
var { isUUID } =
|
|
21085
|
+
var { isUUID } = require_utils();
|
|
23727
21086
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
23728
21087
|
var supportedSchemeNames = [
|
|
23729
21088
|
"http",
|
|
@@ -23897,7 +21256,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
23897
21256
|
|
|
23898
21257
|
// ../../node_modules/fast-uri/index.js
|
|
23899
21258
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
23900
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
21259
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
23901
21260
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
23902
21261
|
function normalize(uri, options) {
|
|
23903
21262
|
if (typeof uri === "string") {
|
|
@@ -26307,7 +23666,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
26307
23666
|
});
|
|
26308
23667
|
|
|
26309
23668
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
26310
|
-
var
|
|
23669
|
+
var require_types = __commonJS((exports) => {
|
|
26311
23670
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26312
23671
|
exports.DiscrError = undefined;
|
|
26313
23672
|
var DiscrError;
|
|
@@ -26321,7 +23680,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
26321
23680
|
var require_discriminator = __commonJS((exports) => {
|
|
26322
23681
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26323
23682
|
var codegen_1 = require_codegen();
|
|
26324
|
-
var types_1 =
|
|
23683
|
+
var types_1 = require_types();
|
|
26325
23684
|
var compile_1 = require_compile();
|
|
26326
23685
|
var ref_error_1 = require_ref_error();
|
|
26327
23686
|
var util_1 = require_util();
|
|
@@ -27249,6 +24608,248 @@ var init_validation = __esm(() => {
|
|
|
27249
24608
|
init_workspace_schema();
|
|
27250
24609
|
});
|
|
27251
24610
|
|
|
24611
|
+
// ../types/src/core/common.ts
|
|
24612
|
+
function toJsonSchema2(schema) {
|
|
24613
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24614
|
+
}
|
|
24615
|
+
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24616
|
+
var init_common = __esm(() => {
|
|
24617
|
+
init_zod();
|
|
24618
|
+
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24619
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
24620
|
+
});
|
|
24621
|
+
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24622
|
+
BaseEntitySchema2 = exports_external.object({
|
|
24623
|
+
id: exports_external.string(),
|
|
24624
|
+
createdAt: TimestampSchema2.optional(),
|
|
24625
|
+
updatedAt: TimestampSchema2.optional()
|
|
24626
|
+
});
|
|
24627
|
+
});
|
|
24628
|
+
|
|
24629
|
+
// ../types/src/parser/parser.ts
|
|
24630
|
+
var OFFICE_MIME_TYPES2, ParserCategory2, ParserTypeSchema2, DocumentMetadataSchema2, ParseUsageSchema2, StructuredDocumentSchema, CoordinateUnitSchema2, PointSchema2, BoundingRegionSchema2, PositionedTextSchema2, TableCellSchema2, ExtractedTableSchema2, LayoutElementTypeSchema2, LayoutElementSchema2, PageResultSchema2, ParseResultSchema2, ParseOptionsSchema2, ParserInputSchema2, EXTENSION_TO_MIME, MIME_TO_EXTENSION;
|
|
24631
|
+
var init_parser2 = __esm(() => {
|
|
24632
|
+
init_zod();
|
|
24633
|
+
OFFICE_MIME_TYPES2 = [
|
|
24634
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
24635
|
+
"application/msword",
|
|
24636
|
+
"application/vnd.oasis.opendocument.text",
|
|
24637
|
+
"application/rtf",
|
|
24638
|
+
"text/rtf",
|
|
24639
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
24640
|
+
"application/vnd.ms-excel",
|
|
24641
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
24642
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
24643
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
24644
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
24645
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
24646
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
24647
|
+
"application/vnd.ms-powerpoint",
|
|
24648
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
24649
|
+
"message/rfc822",
|
|
24650
|
+
"application/vnd.ms-outlook",
|
|
24651
|
+
"application/epub+zip"
|
|
24652
|
+
];
|
|
24653
|
+
ParserCategory2 = {
|
|
24654
|
+
PLAINTEXT: [
|
|
24655
|
+
"text/plain",
|
|
24656
|
+
"text/markdown",
|
|
24657
|
+
"text/csv",
|
|
24658
|
+
"text/tab-separated-values",
|
|
24659
|
+
"text/html",
|
|
24660
|
+
"text/xml",
|
|
24661
|
+
"application/json",
|
|
24662
|
+
"application/x-yaml",
|
|
24663
|
+
"application/toml",
|
|
24664
|
+
"image/svg+xml",
|
|
24665
|
+
"text/x-rst",
|
|
24666
|
+
"text/x-org",
|
|
24667
|
+
"application/x-latex",
|
|
24668
|
+
"application/x-ipynb+json",
|
|
24669
|
+
"application/x-bibtex",
|
|
24670
|
+
"application/docbook+xml",
|
|
24671
|
+
"application/x-fictionbook+xml"
|
|
24672
|
+
],
|
|
24673
|
+
OFFICE: [...OFFICE_MIME_TYPES2],
|
|
24674
|
+
DOCUMENT: [
|
|
24675
|
+
"application/pdf",
|
|
24676
|
+
"image/png",
|
|
24677
|
+
"image/jpeg",
|
|
24678
|
+
"image/webp",
|
|
24679
|
+
"image/tiff",
|
|
24680
|
+
"image/gif",
|
|
24681
|
+
"image/bmp"
|
|
24682
|
+
]
|
|
24683
|
+
};
|
|
24684
|
+
ParserTypeSchema2 = exports_external.enum([
|
|
24685
|
+
"plaintext",
|
|
24686
|
+
"office",
|
|
24687
|
+
"llm-vision",
|
|
24688
|
+
"ocr"
|
|
24689
|
+
]);
|
|
24690
|
+
DocumentMetadataSchema2 = exports_external.object({
|
|
24691
|
+
filename: exports_external.string(),
|
|
24692
|
+
mimeType: exports_external.string(),
|
|
24693
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
24694
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
24695
|
+
});
|
|
24696
|
+
ParseUsageSchema2 = exports_external.object({
|
|
24697
|
+
pageCount: exports_external.number(),
|
|
24698
|
+
processingTimeMs: exports_external.number().optional()
|
|
24699
|
+
});
|
|
24700
|
+
StructuredDocumentSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24701
|
+
CoordinateUnitSchema2 = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
24702
|
+
PointSchema2 = exports_external.object({
|
|
24703
|
+
x: exports_external.number(),
|
|
24704
|
+
y: exports_external.number()
|
|
24705
|
+
});
|
|
24706
|
+
BoundingRegionSchema2 = exports_external.object({
|
|
24707
|
+
polygon: exports_external.array(PointSchema2).min(3),
|
|
24708
|
+
unit: CoordinateUnitSchema2,
|
|
24709
|
+
pageIndex: exports_external.number()
|
|
24710
|
+
});
|
|
24711
|
+
PositionedTextSchema2 = exports_external.object({
|
|
24712
|
+
text: exports_external.string(),
|
|
24713
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
24714
|
+
boundingRegion: BoundingRegionSchema2.optional()
|
|
24715
|
+
});
|
|
24716
|
+
TableCellSchema2 = exports_external.object({
|
|
24717
|
+
content: exports_external.string(),
|
|
24718
|
+
rowIndex: exports_external.number(),
|
|
24719
|
+
columnIndex: exports_external.number(),
|
|
24720
|
+
rowSpan: exports_external.number().default(1),
|
|
24721
|
+
columnSpan: exports_external.number().default(1),
|
|
24722
|
+
boundingRegion: BoundingRegionSchema2.optional()
|
|
24723
|
+
});
|
|
24724
|
+
ExtractedTableSchema2 = exports_external.object({
|
|
24725
|
+
cells: exports_external.array(TableCellSchema2),
|
|
24726
|
+
rowCount: exports_external.number(),
|
|
24727
|
+
columnCount: exports_external.number(),
|
|
24728
|
+
boundingRegion: BoundingRegionSchema2.optional()
|
|
24729
|
+
});
|
|
24730
|
+
LayoutElementTypeSchema2 = exports_external.enum([
|
|
24731
|
+
"paragraph",
|
|
24732
|
+
"title",
|
|
24733
|
+
"sectionHeading",
|
|
24734
|
+
"pageHeader",
|
|
24735
|
+
"pageFooter",
|
|
24736
|
+
"pageNumber",
|
|
24737
|
+
"footnote",
|
|
24738
|
+
"table",
|
|
24739
|
+
"figure",
|
|
24740
|
+
"formulaBlock"
|
|
24741
|
+
]);
|
|
24742
|
+
LayoutElementSchema2 = exports_external.object({
|
|
24743
|
+
type: LayoutElementTypeSchema2,
|
|
24744
|
+
content: exports_external.string(),
|
|
24745
|
+
table: ExtractedTableSchema2.optional(),
|
|
24746
|
+
caption: exports_external.string().optional(),
|
|
24747
|
+
figureId: exports_external.string().optional(),
|
|
24748
|
+
boundingRegion: BoundingRegionSchema2.optional()
|
|
24749
|
+
});
|
|
24750
|
+
PageResultSchema2 = exports_external.object({
|
|
24751
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
24752
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
24753
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
24754
|
+
layoutElements: exports_external.array(LayoutElementSchema2).optional().describe("Semantic layout elements in reading order"),
|
|
24755
|
+
words: exports_external.array(PositionedTextSchema2).optional().describe("Word-level positions"),
|
|
24756
|
+
lines: exports_external.array(PositionedTextSchema2).optional().describe("Line-level positions"),
|
|
24757
|
+
tables: exports_external.array(ExtractedTableSchema2).optional().describe("Extracted tables"),
|
|
24758
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
24759
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
24760
|
+
unit: CoordinateUnitSchema2.optional().describe("Unit for width/height and bounding regions"),
|
|
24761
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
24762
|
+
});
|
|
24763
|
+
ParseResultSchema2 = exports_external.object({
|
|
24764
|
+
document: DocumentMetadataSchema2,
|
|
24765
|
+
usage: ParseUsageSchema2,
|
|
24766
|
+
pages: exports_external.array(PageResultSchema2),
|
|
24767
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
24768
|
+
parserType: ParserTypeSchema2,
|
|
24769
|
+
parserVersion: exports_external.string().optional(),
|
|
24770
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
24771
|
+
structured: StructuredDocumentSchema.optional().describe("Canonical structured document with ordered blocks, regions, bounding boxes, tables, figures, and chunks when supported by the parser"),
|
|
24772
|
+
rawResponse: exports_external.unknown().optional()
|
|
24773
|
+
});
|
|
24774
|
+
ParseOptionsSchema2 = exports_external.object({
|
|
24775
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
24776
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
24777
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
24778
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
24779
|
+
extractTables: exports_external.boolean().default(true),
|
|
24780
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
24781
|
+
model: exports_external.string().optional(),
|
|
24782
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
24783
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
24784
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
24785
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
24786
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
24787
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
24788
|
+
tenantId: exports_external.string().optional()
|
|
24789
|
+
});
|
|
24790
|
+
ParserInputSchema2 = exports_external.object({
|
|
24791
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
24792
|
+
filename: exports_external.string(),
|
|
24793
|
+
mimeType: exports_external.string(),
|
|
24794
|
+
options: ParseOptionsSchema2.optional()
|
|
24795
|
+
});
|
|
24796
|
+
EXTENSION_TO_MIME = {
|
|
24797
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
24798
|
+
doc: "application/msword",
|
|
24799
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
24800
|
+
rtf: "application/rtf",
|
|
24801
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
24802
|
+
xls: "application/vnd.ms-excel",
|
|
24803
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
24804
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
24805
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
24806
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
24807
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
24808
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
24809
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
24810
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
24811
|
+
eml: "message/rfc822",
|
|
24812
|
+
msg: "application/vnd.ms-outlook",
|
|
24813
|
+
epub: "application/epub+zip",
|
|
24814
|
+
pdf: "application/pdf",
|
|
24815
|
+
png: "image/png",
|
|
24816
|
+
jpg: "image/jpeg",
|
|
24817
|
+
jpeg: "image/jpeg",
|
|
24818
|
+
webp: "image/webp",
|
|
24819
|
+
tiff: "image/tiff",
|
|
24820
|
+
tif: "image/tiff",
|
|
24821
|
+
gif: "image/gif",
|
|
24822
|
+
bmp: "image/bmp",
|
|
24823
|
+
svg: "image/svg+xml",
|
|
24824
|
+
txt: "text/plain",
|
|
24825
|
+
md: "text/markdown",
|
|
24826
|
+
markdown: "text/markdown",
|
|
24827
|
+
csv: "text/csv",
|
|
24828
|
+
tsv: "text/tab-separated-values",
|
|
24829
|
+
html: "text/html",
|
|
24830
|
+
htm: "text/html",
|
|
24831
|
+
xml: "text/xml",
|
|
24832
|
+
json: "application/json",
|
|
24833
|
+
yaml: "application/x-yaml",
|
|
24834
|
+
yml: "application/x-yaml",
|
|
24835
|
+
toml: "application/toml",
|
|
24836
|
+
rst: "text/x-rst",
|
|
24837
|
+
org: "text/x-org",
|
|
24838
|
+
tex: "application/x-latex",
|
|
24839
|
+
latex: "application/x-latex",
|
|
24840
|
+
ipynb: "application/x-ipynb+json",
|
|
24841
|
+
bib: "application/x-bibtex",
|
|
24842
|
+
dbk: "application/docbook+xml",
|
|
24843
|
+
docbook: "application/docbook+xml",
|
|
24844
|
+
fb2: "application/x-fictionbook+xml"
|
|
24845
|
+
};
|
|
24846
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
24847
|
+
if (!(mime in acc))
|
|
24848
|
+
acc[mime] = ext;
|
|
24849
|
+
return acc;
|
|
24850
|
+
}, {});
|
|
24851
|
+
});
|
|
24852
|
+
|
|
27252
24853
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
27253
24854
|
var require_lib = __commonJS((exports) => {
|
|
27254
24855
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -27662,12 +25263,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
27662
25263
|
}
|
|
27663
25264
|
const ParseErrorConstructors = {};
|
|
27664
25265
|
for (const reasonCode of Object.keys(argument)) {
|
|
27665
|
-
const
|
|
27666
|
-
const _ref = typeof
|
|
27667
|
-
message: () =>
|
|
27668
|
-
} : typeof
|
|
27669
|
-
message:
|
|
27670
|
-
} :
|
|
25266
|
+
const template = argument[reasonCode];
|
|
25267
|
+
const _ref = typeof template === "string" ? {
|
|
25268
|
+
message: () => template
|
|
25269
|
+
} : typeof template === "function" ? {
|
|
25270
|
+
message: template
|
|
25271
|
+
} : template, {
|
|
27671
25272
|
message
|
|
27672
25273
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
27673
25274
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -42140,7 +39741,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
42140
39741
|
});
|
|
42141
39742
|
|
|
42142
39743
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
42143
|
-
var
|
|
39744
|
+
var require_types2 = __commonJS((exports) => {
|
|
42144
39745
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42145
39746
|
var TokenType;
|
|
42146
39747
|
(function(TokenType2) {
|
|
@@ -42204,8 +39805,8 @@ var require_types3 = __commonJS((exports) => {
|
|
|
42204
39805
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
42205
39806
|
const arrow = 22528;
|
|
42206
39807
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
42207
|
-
const
|
|
42208
|
-
TokenType2[TokenType2["template"] =
|
|
39808
|
+
const template = 23552;
|
|
39809
|
+
TokenType2[TokenType2["template"] = template] = "template";
|
|
42209
39810
|
const ellipsis = 24576;
|
|
42210
39811
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
42211
39812
|
const backQuote = 25600;
|
|
@@ -42624,7 +40225,7 @@ var require_types3 = __commonJS((exports) => {
|
|
|
42624
40225
|
var require_state = __commonJS((exports) => {
|
|
42625
40226
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42626
40227
|
var _keywords = require_keywords();
|
|
42627
|
-
var _types =
|
|
40228
|
+
var _types = require_types2();
|
|
42628
40229
|
|
|
42629
40230
|
class Scope {
|
|
42630
40231
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -43010,7 +40611,7 @@ var require_base = __commonJS((exports) => {
|
|
|
43010
40611
|
var require_util2 = __commonJS((exports) => {
|
|
43011
40612
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43012
40613
|
var _index = require_tokenizer();
|
|
43013
|
-
var _types =
|
|
40614
|
+
var _types = require_types2();
|
|
43014
40615
|
var _charcodes = require_charcodes();
|
|
43015
40616
|
var _base = require_base();
|
|
43016
40617
|
function isContextual(contextualKeyword) {
|
|
@@ -43172,7 +40773,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
43172
40773
|
var require_readWordTree = __commonJS((exports) => {
|
|
43173
40774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43174
40775
|
var _keywords = require_keywords();
|
|
43175
|
-
var _types =
|
|
40776
|
+
var _types = require_types2();
|
|
43176
40777
|
var READ_WORD_TREE = new Int32Array([
|
|
43177
40778
|
-1,
|
|
43178
40779
|
27,
|
|
@@ -52150,7 +49751,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
52150
49751
|
var _identifier = require_identifier();
|
|
52151
49752
|
var _index = require_tokenizer();
|
|
52152
49753
|
var _readWordTree = require_readWordTree();
|
|
52153
|
-
var _types =
|
|
49754
|
+
var _types = require_types2();
|
|
52154
49755
|
function readWord() {
|
|
52155
49756
|
let treePos = 0;
|
|
52156
49757
|
let code = 0;
|
|
@@ -52216,7 +49817,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
52216
49817
|
var _keywords = require_keywords();
|
|
52217
49818
|
var _readWord = require_readWord();
|
|
52218
49819
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
52219
|
-
var _types =
|
|
49820
|
+
var _types = require_types2();
|
|
52220
49821
|
var IdentifierRole;
|
|
52221
49822
|
(function(IdentifierRole2) {
|
|
52222
49823
|
const Access = 0;
|
|
@@ -52933,7 +50534,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
52933
50534
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
52934
50535
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
52935
50536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52936
|
-
var _types =
|
|
50537
|
+
var _types = require_types2();
|
|
52937
50538
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
52938
50539
|
let endIndex = index + 1;
|
|
52939
50540
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -53286,7 +50887,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
53286
50887
|
var _xhtml = require_xhtml();
|
|
53287
50888
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
53288
50889
|
var _tokenizer = require_tokenizer();
|
|
53289
|
-
var _types =
|
|
50890
|
+
var _types = require_types2();
|
|
53290
50891
|
var _charcodes = require_charcodes();
|
|
53291
50892
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53292
50893
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53790,7 +51391,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
53790
51391
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
53791
51392
|
}
|
|
53792
51393
|
var _tokenizer = require_tokenizer();
|
|
53793
|
-
var _types =
|
|
51394
|
+
var _types = require_types2();
|
|
53794
51395
|
var _JSXTransformer = require_JSXTransformer();
|
|
53795
51396
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53796
51397
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53829,7 +51430,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
53829
51430
|
}
|
|
53830
51431
|
var _tokenizer = require_tokenizer();
|
|
53831
51432
|
var _keywords = require_keywords();
|
|
53832
|
-
var _types =
|
|
51433
|
+
var _types = require_types2();
|
|
53833
51434
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
53834
51435
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
53835
51436
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -54600,18 +52201,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
54600
52201
|
continue;
|
|
54601
52202
|
let genColumn = 0;
|
|
54602
52203
|
for (let j = 0;j < line.length; j++) {
|
|
54603
|
-
const
|
|
52204
|
+
const segment = line[j];
|
|
54604
52205
|
if (j > 0)
|
|
54605
52206
|
writer.write(comma);
|
|
54606
|
-
genColumn = encodeInteger(writer,
|
|
54607
|
-
if (
|
|
52207
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
52208
|
+
if (segment.length === 1)
|
|
54608
52209
|
continue;
|
|
54609
|
-
sourcesIndex = encodeInteger(writer,
|
|
54610
|
-
sourceLine = encodeInteger(writer,
|
|
54611
|
-
sourceColumn = encodeInteger(writer,
|
|
54612
|
-
if (
|
|
52210
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
52211
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
52212
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
52213
|
+
if (segment.length === 4)
|
|
54613
52214
|
continue;
|
|
54614
|
-
namesIndex = encodeInteger(writer,
|
|
52215
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
54615
52216
|
}
|
|
54616
52217
|
}
|
|
54617
52218
|
return writer.flush();
|
|
@@ -55166,11 +52767,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55166
52767
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
55167
52768
|
if (index === -1)
|
|
55168
52769
|
return OMapping(null, null, null, null);
|
|
55169
|
-
const
|
|
55170
|
-
if (
|
|
52770
|
+
const segment = segments[index];
|
|
52771
|
+
if (segment.length === 1)
|
|
55171
52772
|
return OMapping(null, null, null, null);
|
|
55172
52773
|
const { names, resolvedSources } = map2;
|
|
55173
|
-
return OMapping(resolvedSources[
|
|
52774
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
|
|
55174
52775
|
}
|
|
55175
52776
|
function generatedPositionFor(map2, needle) {
|
|
55176
52777
|
const { source, line, column, bias } = needle;
|
|
@@ -55283,8 +52884,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55283
52884
|
const max = upperBound(segments, matchedColumn, min);
|
|
55284
52885
|
const result = [];
|
|
55285
52886
|
for (;min <= max; min++) {
|
|
55286
|
-
const
|
|
55287
|
-
result.push(GMapping(
|
|
52887
|
+
const segment = segments[min];
|
|
52888
|
+
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
55288
52889
|
}
|
|
55289
52890
|
return result;
|
|
55290
52891
|
}
|
|
@@ -55312,8 +52913,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55312
52913
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
55313
52914
|
if (index === -1)
|
|
55314
52915
|
return GMapping(null, null);
|
|
55315
|
-
const
|
|
55316
|
-
return GMapping(
|
|
52916
|
+
const segment = segments[index];
|
|
52917
|
+
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
55317
52918
|
}
|
|
55318
52919
|
});
|
|
55319
52920
|
});
|
|
@@ -55864,7 +53465,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
55864
53465
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
55865
53466
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55866
53467
|
var _tokenizer = require_tokenizer();
|
|
55867
|
-
var _types =
|
|
53468
|
+
var _types = require_types2();
|
|
55868
53469
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
55869
53470
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
55870
53471
|
return;
|
|
@@ -55929,7 +53530,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
55929
53530
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
55930
53531
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
55931
53532
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55932
|
-
var _types =
|
|
53533
|
+
var _types = require_types2();
|
|
55933
53534
|
function getIdentifierNames(code, tokens) {
|
|
55934
53535
|
const names = [];
|
|
55935
53536
|
for (const token of tokens) {
|
|
@@ -56105,7 +53706,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
56105
53706
|
});
|
|
56106
53707
|
|
|
56107
53708
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
56108
|
-
var
|
|
53709
|
+
var require_types3 = __commonJS((exports) => {
|
|
56109
53710
|
var __extends = exports && exports.__extends || function() {
|
|
56110
53711
|
var extendStatics = function(d, b) {
|
|
56111
53712
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -56705,9 +54306,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
56705
54306
|
};
|
|
56706
54307
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56707
54308
|
exports.Checker = exports.createCheckers = undefined;
|
|
56708
|
-
var types_1 =
|
|
54309
|
+
var types_1 = require_types3();
|
|
56709
54310
|
var util_1 = require_util3();
|
|
56710
|
-
var types_2 =
|
|
54311
|
+
var types_2 = require_types3();
|
|
56711
54312
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
56712
54313
|
return types_2.TArray;
|
|
56713
54314
|
} });
|
|
@@ -56989,7 +54590,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
56989
54590
|
var _typescript = require_typescript();
|
|
56990
54591
|
var _index = require_tokenizer();
|
|
56991
54592
|
var _keywords = require_keywords();
|
|
56992
|
-
var _types =
|
|
54593
|
+
var _types = require_types2();
|
|
56993
54594
|
var _base = require_base();
|
|
56994
54595
|
var _expression = require_expression();
|
|
56995
54596
|
var _util = require_util2();
|
|
@@ -57121,7 +54722,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
57121
54722
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57122
54723
|
var _index = require_tokenizer();
|
|
57123
54724
|
var _keywords = require_keywords();
|
|
57124
|
-
var _types =
|
|
54725
|
+
var _types = require_types2();
|
|
57125
54726
|
var _base = require_base();
|
|
57126
54727
|
var _expression = require_expression();
|
|
57127
54728
|
var _lval = require_lval();
|
|
@@ -58383,7 +55984,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
58383
55984
|
var require_jsx = __commonJS((exports) => {
|
|
58384
55985
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58385
55986
|
var _index = require_tokenizer();
|
|
58386
|
-
var _types =
|
|
55987
|
+
var _types = require_types2();
|
|
58387
55988
|
var _base = require_base();
|
|
58388
55989
|
var _expression = require_expression();
|
|
58389
55990
|
var _util = require_util2();
|
|
@@ -58646,10 +56247,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
58646
56247
|
});
|
|
58647
56248
|
|
|
58648
56249
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
58649
|
-
var
|
|
56250
|
+
var require_types4 = __commonJS((exports) => {
|
|
58650
56251
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58651
56252
|
var _index = require_tokenizer();
|
|
58652
|
-
var _types =
|
|
56253
|
+
var _types = require_types2();
|
|
58653
56254
|
var _base = require_base();
|
|
58654
56255
|
var _expression = require_expression();
|
|
58655
56256
|
var _flow = require_flow();
|
|
@@ -58682,12 +56283,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
58682
56283
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58683
56284
|
var _flow = require_flow();
|
|
58684
56285
|
var _index = require_jsx();
|
|
58685
|
-
var _types =
|
|
56286
|
+
var _types = require_types4();
|
|
58686
56287
|
var _typescript = require_typescript();
|
|
58687
56288
|
var _index3 = require_tokenizer();
|
|
58688
56289
|
var _keywords = require_keywords();
|
|
58689
56290
|
var _state = require_state();
|
|
58690
|
-
var _types3 =
|
|
56291
|
+
var _types3 = require_types2();
|
|
58691
56292
|
var _charcodes = require_charcodes();
|
|
58692
56293
|
var _identifier = require_identifier();
|
|
58693
56294
|
var _base = require_base();
|
|
@@ -59403,7 +57004,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
59403
57004
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59404
57005
|
var _index = require_tokenizer();
|
|
59405
57006
|
var _keywords = require_keywords();
|
|
59406
|
-
var _types =
|
|
57007
|
+
var _types = require_types2();
|
|
59407
57008
|
var _base = require_base();
|
|
59408
57009
|
var _expression = require_expression();
|
|
59409
57010
|
var _statement = require_statement();
|
|
@@ -60278,7 +57879,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
60278
57879
|
var _tokenizer = require_tokenizer();
|
|
60279
57880
|
var _keywords = require_keywords();
|
|
60280
57881
|
var _state = require_state();
|
|
60281
|
-
var _types =
|
|
57882
|
+
var _types = require_types2();
|
|
60282
57883
|
var _charcodes = require_charcodes();
|
|
60283
57884
|
var _base = require_base();
|
|
60284
57885
|
var _expression = require_expression();
|
|
@@ -61313,7 +58914,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61313
58914
|
function _interopRequireDefault(obj) {
|
|
61314
58915
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61315
58916
|
}
|
|
61316
|
-
var _types =
|
|
58917
|
+
var _types = require_types2();
|
|
61317
58918
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
61318
58919
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
61319
58920
|
|
|
@@ -61571,7 +59172,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61571
59172
|
var require_getClassInfo = __commonJS((exports) => {
|
|
61572
59173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61573
59174
|
var _keywords = require_keywords();
|
|
61574
|
-
var _types =
|
|
59175
|
+
var _types = require_types2();
|
|
61575
59176
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
61576
59177
|
const snapshot = tokens.snapshot();
|
|
61577
59178
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -61809,7 +59410,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
61809
59410
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
61810
59411
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
61811
59412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61812
|
-
var _types =
|
|
59413
|
+
var _types = require_types2();
|
|
61813
59414
|
function elideImportEquals(tokens) {
|
|
61814
59415
|
tokens.removeInitialToken();
|
|
61815
59416
|
tokens.removeToken();
|
|
@@ -61833,7 +59434,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
61833
59434
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
61834
59435
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61835
59436
|
var _tokenizer = require_tokenizer();
|
|
61836
|
-
var _types =
|
|
59437
|
+
var _types = require_types2();
|
|
61837
59438
|
var EMPTY_DECLARATION_INFO = {
|
|
61838
59439
|
typeDeclarations: new Set,
|
|
61839
59440
|
valueDeclarations: new Set
|
|
@@ -61861,7 +59462,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
61861
59462
|
var require_isExportFrom = __commonJS((exports) => {
|
|
61862
59463
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61863
59464
|
var _keywords = require_keywords();
|
|
61864
|
-
var _types =
|
|
59465
|
+
var _types = require_types2();
|
|
61865
59466
|
function isExportFrom(tokens) {
|
|
61866
59467
|
let closeBraceIndex = tokens.currentIndex();
|
|
61867
59468
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -61876,7 +59477,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
61876
59477
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
61877
59478
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61878
59479
|
var _keywords = require_keywords();
|
|
61879
|
-
var _types =
|
|
59480
|
+
var _types = require_types2();
|
|
61880
59481
|
function removeMaybeImportAttributes(tokens) {
|
|
61881
59482
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
61882
59483
|
tokens.removeToken();
|
|
@@ -61891,7 +59492,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
61891
59492
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
61892
59493
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
61893
59494
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61894
|
-
var _types =
|
|
59495
|
+
var _types = require_types2();
|
|
61895
59496
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
61896
59497
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
61897
59498
|
return false;
|
|
@@ -61922,7 +59523,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
61922
59523
|
}
|
|
61923
59524
|
var _tokenizer = require_tokenizer();
|
|
61924
59525
|
var _keywords = require_keywords();
|
|
61925
|
-
var _types =
|
|
59526
|
+
var _types = require_types2();
|
|
61926
59527
|
var _elideImportEquals = require_elideImportEquals();
|
|
61927
59528
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
61928
59529
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62564,7 +60165,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
62564
60165
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62565
60166
|
}
|
|
62566
60167
|
var _keywords = require_keywords();
|
|
62567
|
-
var _types =
|
|
60168
|
+
var _types = require_types2();
|
|
62568
60169
|
var _elideImportEquals = require_elideImportEquals();
|
|
62569
60170
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
62570
60171
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62834,7 +60435,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
62834
60435
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62835
60436
|
}
|
|
62836
60437
|
var _keywords = require_keywords();
|
|
62837
|
-
var _types =
|
|
60438
|
+
var _types = require_types2();
|
|
62838
60439
|
var _Transformer = require_Transformer();
|
|
62839
60440
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62840
60441
|
|
|
@@ -62954,7 +60555,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
62954
60555
|
}
|
|
62955
60556
|
return value;
|
|
62956
60557
|
}
|
|
62957
|
-
var _types =
|
|
60558
|
+
var _types = require_types2();
|
|
62958
60559
|
var _Transformer = require_Transformer();
|
|
62959
60560
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62960
60561
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -63028,7 +60629,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
63028
60629
|
function _interopRequireDefault(obj) {
|
|
63029
60630
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63030
60631
|
}
|
|
63031
|
-
var _types =
|
|
60632
|
+
var _types = require_types2();
|
|
63032
60633
|
var _Transformer = require_Transformer();
|
|
63033
60634
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
63034
60635
|
|
|
@@ -63057,7 +60658,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
63057
60658
|
function _interopRequireDefault(obj) {
|
|
63058
60659
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63059
60660
|
}
|
|
63060
|
-
var _types =
|
|
60661
|
+
var _types = require_types2();
|
|
63061
60662
|
var _Transformer = require_Transformer();
|
|
63062
60663
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
63063
60664
|
|
|
@@ -63085,7 +60686,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
63085
60686
|
function _interopRequireDefault(obj) {
|
|
63086
60687
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63087
60688
|
}
|
|
63088
|
-
var _types =
|
|
60689
|
+
var _types = require_types2();
|
|
63089
60690
|
var _Transformer = require_Transformer();
|
|
63090
60691
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
63091
60692
|
|
|
@@ -63201,7 +60802,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
63201
60802
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63202
60803
|
}
|
|
63203
60804
|
var _tokenizer = require_tokenizer();
|
|
63204
|
-
var _types =
|
|
60805
|
+
var _types = require_types2();
|
|
63205
60806
|
var _Transformer = require_Transformer();
|
|
63206
60807
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
63207
60808
|
|
|
@@ -63452,7 +61053,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
63452
61053
|
function _interopRequireDefault(obj) {
|
|
63453
61054
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63454
61055
|
}
|
|
63455
|
-
var _types =
|
|
61056
|
+
var _types = require_types2();
|
|
63456
61057
|
var _isIdentifier = require_isIdentifier();
|
|
63457
61058
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
63458
61059
|
var _Transformer = require_Transformer();
|
|
@@ -63598,7 +61199,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
63598
61199
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63599
61200
|
}
|
|
63600
61201
|
var _keywords = require_keywords();
|
|
63601
|
-
var _types =
|
|
61202
|
+
var _types = require_types2();
|
|
63602
61203
|
var _getClassInfo = require_getClassInfo();
|
|
63603
61204
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
63604
61205
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -63997,7 +61598,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
63997
61598
|
}
|
|
63998
61599
|
var _linesandcolumns = require_build();
|
|
63999
61600
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
64000
|
-
var _types =
|
|
61601
|
+
var _types = require_types2();
|
|
64001
61602
|
function formatTokens(code, tokens) {
|
|
64002
61603
|
if (tokens.length === 0) {
|
|
64003
61604
|
return "";
|
|
@@ -64062,7 +61663,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
64062
61663
|
function _interopRequireDefault(obj) {
|
|
64063
61664
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
64064
61665
|
}
|
|
64065
|
-
var _types =
|
|
61666
|
+
var _types = require_types2();
|
|
64066
61667
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
64067
61668
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
64068
61669
|
function getTSImportedNames(tokens) {
|
|
@@ -64447,7 +62048,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
64447
62048
|
function compileTypedScript(opts) {
|
|
64448
62049
|
let ast;
|
|
64449
62050
|
try {
|
|
64450
|
-
ast =
|
|
62051
|
+
ast = import_parser2.parse(opts.source, {
|
|
64451
62052
|
sourceType: "script",
|
|
64452
62053
|
plugins: ["typescript"],
|
|
64453
62054
|
ranges: true
|
|
@@ -64699,9 +62300,9 @@ function stripCommentsAndStrings(s) {
|
|
|
64699
62300
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
64700
62301
|
return out;
|
|
64701
62302
|
}
|
|
64702
|
-
var
|
|
62303
|
+
var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
64703
62304
|
var init_compile = __esm(() => {
|
|
64704
|
-
|
|
62305
|
+
import_parser2 = __toESM(require_lib(), 1);
|
|
64705
62306
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
64706
62307
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
64707
62308
|
});
|
|
@@ -65063,8 +62664,8 @@ function getAllStepJsonSchemas() {
|
|
|
65063
62664
|
category: def.category,
|
|
65064
62665
|
name: def.name,
|
|
65065
62666
|
description: def.description,
|
|
65066
|
-
configSchema:
|
|
65067
|
-
outputSchema:
|
|
62667
|
+
configSchema: toJsonSchema2(def.configSchema),
|
|
62668
|
+
outputSchema: toJsonSchema2(def.outputSchema),
|
|
65068
62669
|
configInWith: def.configInWith
|
|
65069
62670
|
}));
|
|
65070
62671
|
}
|
|
@@ -65118,12 +62719,15 @@ var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOu
|
|
|
65118
62719
|
var init_step_configs = __esm(() => {
|
|
65119
62720
|
init_zod();
|
|
65120
62721
|
init_common();
|
|
62722
|
+
init_parser2();
|
|
65121
62723
|
init_typed_script();
|
|
65122
62724
|
init_steps();
|
|
65123
62725
|
AiParseConfigSchema = exports_external.object({
|
|
65124
62726
|
input: exports_external.string().describe("Storage reference or template expression for the document"),
|
|
62727
|
+
parseMode: exports_external.enum(["ocr", "vision"]).optional().describe("Base parser for PDF/image inputs. OCR is the default; vision uses the selected LLM. Text and Office files always use native parsing."),
|
|
65125
62728
|
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
65126
62729
|
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
62730
|
+
figureModel: exports_external.string().optional().describe("Vision model used only for the optional figure-description pass"),
|
|
65127
62731
|
maxConcurrency: exports_external.number().min(1).max(10).default(3).optional().describe("Max concurrent VLM batch requests"),
|
|
65128
62732
|
pagesPerBatch: exports_external.number().min(1).max(20).default(5).optional().describe("Number of page images per VLM request"),
|
|
65129
62733
|
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor for rendering PDF pages before VLM parsing. Higher values produce sharper images at larger payload sizes."),
|
|
@@ -65135,16 +62739,7 @@ var init_step_configs = __esm(() => {
|
|
|
65135
62739
|
describeFigures: exports_external.boolean().optional().describe("Opt-in (default off). After text extraction, detect which pages contain figures with an in-worker layout model, then caption those pages with a vision model and append `<figure>description</figure>` to their text — so image-only pages (property photos, signatures, charts) become findable by text-based steps like ai.split. Note: the layout scan runs over all pages, and the caption step and its vision calls are billed. Skipped for plaintext."),
|
|
65136
62740
|
figureInstructions: exports_external.string().optional().describe('Custom instruction for the figure-description pass, e.g. "Describe each figure; label a handwritten signature as `<figure>signature</figure>` and a stamp as `<figure>stamp</figure>`; for property photos note the room or exterior shown." Applied only when describeFigures runs.')
|
|
65137
62741
|
});
|
|
65138
|
-
AiParseOutputSchema =
|
|
65139
|
-
text: exports_external.string().describe("Extracted text content (combined from all pages)"),
|
|
65140
|
-
pages: exports_external.array(exports_external.object({
|
|
65141
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
65142
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
65143
|
-
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
65144
|
-
confidence: exports_external.number().optional().describe("Overall page confidence")
|
|
65145
|
-
})).optional().describe("Per-page content"),
|
|
65146
|
-
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Document metadata")
|
|
65147
|
-
});
|
|
62742
|
+
AiParseOutputSchema = ParseResultSchema2.omit({ rawResponse: true });
|
|
65148
62743
|
AiExtractConfigSchema = exports_external.object({
|
|
65149
62744
|
input: exports_external.string().describe("Text content or template expression"),
|
|
65150
62745
|
schema: exports_external.object({
|
|
@@ -65978,6 +63573,81 @@ var init_actions = __esm(() => {
|
|
|
65978
63573
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
65979
63574
|
});
|
|
65980
63575
|
|
|
63576
|
+
// ../types/src/processor/execution.ts
|
|
63577
|
+
function asTuple(values) {
|
|
63578
|
+
return values;
|
|
63579
|
+
}
|
|
63580
|
+
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63581
|
+
var init_execution = __esm(() => {
|
|
63582
|
+
init_zod();
|
|
63583
|
+
WorkflowExecutionStatusValue2 = {
|
|
63584
|
+
CREATED: "created",
|
|
63585
|
+
PENDING: "pending",
|
|
63586
|
+
RUNNING: "running",
|
|
63587
|
+
WAITING: "waiting",
|
|
63588
|
+
COMPLETED: "completed",
|
|
63589
|
+
FAILED: "failed",
|
|
63590
|
+
CANCELLED: "cancelled"
|
|
63591
|
+
};
|
|
63592
|
+
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63593
|
+
WorkflowExecutionStatusValue2.CREATED,
|
|
63594
|
+
WorkflowExecutionStatusValue2.PENDING,
|
|
63595
|
+
WorkflowExecutionStatusValue2.RUNNING,
|
|
63596
|
+
WorkflowExecutionStatusValue2.WAITING,
|
|
63597
|
+
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63598
|
+
WorkflowExecutionStatusValue2.FAILED,
|
|
63599
|
+
WorkflowExecutionStatusValue2.CANCELLED
|
|
63600
|
+
]);
|
|
63601
|
+
StepExecutionStatusValue2 = {
|
|
63602
|
+
PENDING: "pending",
|
|
63603
|
+
RUNNING: "running",
|
|
63604
|
+
SUCCESS: "success",
|
|
63605
|
+
FAILURE: "failure",
|
|
63606
|
+
WAITING: "waiting",
|
|
63607
|
+
SKIPPED: "skipped"
|
|
63608
|
+
};
|
|
63609
|
+
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63610
|
+
StepExecutionStatusValue2.PENDING,
|
|
63611
|
+
StepExecutionStatusValue2.RUNNING,
|
|
63612
|
+
StepExecutionStatusValue2.SUCCESS,
|
|
63613
|
+
StepExecutionStatusValue2.FAILURE,
|
|
63614
|
+
StepExecutionStatusValue2.WAITING,
|
|
63615
|
+
StepExecutionStatusValue2.SKIPPED
|
|
63616
|
+
]);
|
|
63617
|
+
TriggerTypeValue2 = {
|
|
63618
|
+
MANUAL: "manual",
|
|
63619
|
+
API: "api",
|
|
63620
|
+
WEBHOOK: "webhook",
|
|
63621
|
+
SCHEDULE: "schedule",
|
|
63622
|
+
EMAIL: "email",
|
|
63623
|
+
EVAL: "eval",
|
|
63624
|
+
CLI: "cli"
|
|
63625
|
+
};
|
|
63626
|
+
TriggerTypeSchema2 = exports_external.enum([
|
|
63627
|
+
TriggerTypeValue2.MANUAL,
|
|
63628
|
+
TriggerTypeValue2.API,
|
|
63629
|
+
TriggerTypeValue2.WEBHOOK,
|
|
63630
|
+
TriggerTypeValue2.SCHEDULE,
|
|
63631
|
+
TriggerTypeValue2.EMAIL,
|
|
63632
|
+
TriggerTypeValue2.EVAL,
|
|
63633
|
+
TriggerTypeValue2.CLI
|
|
63634
|
+
]);
|
|
63635
|
+
ExecutionTypeValue2 = {
|
|
63636
|
+
PROD: "prod",
|
|
63637
|
+
EVAL: "eval",
|
|
63638
|
+
PLAYGROUND: "playground"
|
|
63639
|
+
};
|
|
63640
|
+
ExecutionTypeSchema2 = exports_external.enum([
|
|
63641
|
+
ExecutionTypeValue2.PROD,
|
|
63642
|
+
ExecutionTypeValue2.EVAL,
|
|
63643
|
+
ExecutionTypeValue2.PLAYGROUND
|
|
63644
|
+
]);
|
|
63645
|
+
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63646
|
+
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63647
|
+
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63648
|
+
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63649
|
+
});
|
|
63650
|
+
|
|
65981
63651
|
// ../types/src/workflow/workflow.ts
|
|
65982
63652
|
function suggestWorkflowName(raw) {
|
|
65983
63653
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -66059,11 +63729,11 @@ var init_workflow = __esm(() => {
|
|
|
66059
63729
|
ManualTriggerMethodSchema = exports_external.object({
|
|
66060
63730
|
type: exports_external.literal("manual"),
|
|
66061
63731
|
enabled: exports_external.boolean().optional(),
|
|
66062
|
-
inputSchema:
|
|
63732
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
66063
63733
|
});
|
|
66064
63734
|
ApiTriggerMethodSchema = exports_external.object({
|
|
66065
63735
|
type: exports_external.literal("api"),
|
|
66066
|
-
inputSchema:
|
|
63736
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
66067
63737
|
});
|
|
66068
63738
|
EmailTriggerMethodSchema = exports_external.object({
|
|
66069
63739
|
type: exports_external.literal("email"),
|
|
@@ -66103,8 +63773,8 @@ var init_workflow = __esm(() => {
|
|
|
66103
63773
|
yamlContent: exports_external.string(),
|
|
66104
63774
|
definition: WorkflowDefinitionSchema,
|
|
66105
63775
|
isCurrent: exports_external.boolean().default(true),
|
|
66106
|
-
createdAt:
|
|
66107
|
-
updatedAt:
|
|
63776
|
+
createdAt: TimestampSchema2,
|
|
63777
|
+
updatedAt: TimestampSchema2.optional(),
|
|
66108
63778
|
createdBy: exports_external.string()
|
|
66109
63779
|
});
|
|
66110
63780
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -66286,15 +63956,15 @@ function isFileOutput(value) {
|
|
|
66286
63956
|
function isWorkflowResult(value) {
|
|
66287
63957
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
66288
63958
|
}
|
|
66289
|
-
var
|
|
63959
|
+
var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
66290
63960
|
var init_execution2 = __esm(() => {
|
|
66291
63961
|
init_zod();
|
|
66292
63962
|
init_common();
|
|
66293
63963
|
init_execution();
|
|
66294
63964
|
init_retry();
|
|
66295
63965
|
init_workflow();
|
|
66296
|
-
|
|
66297
|
-
|
|
63966
|
+
WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
|
|
63967
|
+
StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
|
|
66298
63968
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
66299
63969
|
"root",
|
|
66300
63970
|
"if-then",
|
|
@@ -66317,7 +63987,7 @@ var init_execution2 = __esm(() => {
|
|
|
66317
63987
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
66318
63988
|
StepResultSchema = exports_external.object({
|
|
66319
63989
|
output: exports_external.unknown(),
|
|
66320
|
-
status:
|
|
63990
|
+
status: StepExecutionStatusSchema3
|
|
66321
63991
|
});
|
|
66322
63992
|
ExecutionContextSchema = exports_external.object({
|
|
66323
63993
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -66345,24 +64015,24 @@ var init_execution2 = __esm(() => {
|
|
|
66345
64015
|
triggerType: exports_external.string(),
|
|
66346
64016
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
66347
64017
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
66348
|
-
status:
|
|
64018
|
+
status: WorkflowExecutionStatusSchema3,
|
|
66349
64019
|
scopeStack: ScopeStackSchema,
|
|
66350
64020
|
currentStepIndex: exports_external.number(),
|
|
66351
64021
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
66352
64022
|
result: exports_external.unknown().nullable(),
|
|
66353
64023
|
error: exports_external.string().nullable(),
|
|
66354
64024
|
priority: exports_external.number().default(50),
|
|
66355
|
-
availableAt:
|
|
64025
|
+
availableAt: TimestampSchema2,
|
|
66356
64026
|
leaseId: exports_external.string().nullable(),
|
|
66357
|
-
leaseExpiresAt:
|
|
64027
|
+
leaseExpiresAt: TimestampSchema2.nullable(),
|
|
66358
64028
|
workerId: exports_external.string().nullable(),
|
|
66359
64029
|
maxRetries: exports_external.number().default(0),
|
|
66360
64030
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
66361
64031
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
66362
64032
|
retryNumber: exports_external.number().default(0),
|
|
66363
|
-
createdAt:
|
|
66364
|
-
startedAt:
|
|
66365
|
-
completedAt:
|
|
64033
|
+
createdAt: TimestampSchema2,
|
|
64034
|
+
startedAt: TimestampSchema2.nullable(),
|
|
64035
|
+
completedAt: TimestampSchema2.nullable(),
|
|
66366
64036
|
createdBy: exports_external.string().nullable()
|
|
66367
64037
|
});
|
|
66368
64038
|
StepExecutionSchema = exports_external.object({
|
|
@@ -66381,15 +64051,15 @@ var init_execution2 = __esm(() => {
|
|
|
66381
64051
|
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
66382
64052
|
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
66383
64053
|
latestAttempt: exports_external.number().default(0),
|
|
66384
|
-
nextAttemptAt:
|
|
64054
|
+
nextAttemptAt: TimestampSchema2.nullable().optional(),
|
|
66385
64055
|
inputData: exports_external.unknown().nullable(),
|
|
66386
64056
|
outputData: exports_external.unknown().nullable(),
|
|
66387
|
-
status:
|
|
64057
|
+
status: StepExecutionStatusSchema3,
|
|
66388
64058
|
error: exports_external.string().nullable(),
|
|
66389
64059
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
66390
64060
|
durationMs: exports_external.number().nullable(),
|
|
66391
|
-
startedAt:
|
|
66392
|
-
completedAt:
|
|
64061
|
+
startedAt: TimestampSchema2.nullable(),
|
|
64062
|
+
completedAt: TimestampSchema2.nullable()
|
|
66393
64063
|
});
|
|
66394
64064
|
StepExecutionAttemptSchema = exports_external.object({
|
|
66395
64065
|
id: exports_external.string(),
|
|
@@ -66402,8 +64072,8 @@ var init_execution2 = __esm(() => {
|
|
|
66402
64072
|
failure: ExecutionFailureSchema.nullable(),
|
|
66403
64073
|
retryDecision: RetryDecisionSchema.nullable(),
|
|
66404
64074
|
replaySafe: exports_external.boolean().nullable(),
|
|
66405
|
-
startedAt:
|
|
66406
|
-
completedAt:
|
|
64075
|
+
startedAt: TimestampSchema2,
|
|
64076
|
+
completedAt: TimestampSchema2.nullable(),
|
|
66407
64077
|
durationMs: exports_external.number().nullable()
|
|
66408
64078
|
});
|
|
66409
64079
|
ConnectorSchema = exports_external.object({
|
|
@@ -66415,8 +64085,8 @@ var init_execution2 = __esm(() => {
|
|
|
66415
64085
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
66416
64086
|
inputSchema: exports_external.unknown().optional(),
|
|
66417
64087
|
outputSchema: exports_external.unknown().optional(),
|
|
66418
|
-
createdAt:
|
|
66419
|
-
updatedAt:
|
|
64088
|
+
createdAt: TimestampSchema2,
|
|
64089
|
+
updatedAt: TimestampSchema2.optional(),
|
|
66420
64090
|
createdBy: exports_external.string()
|
|
66421
64091
|
});
|
|
66422
64092
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -67382,8 +65052,8 @@ function parseRunTarget(target) {
|
|
|
67382
65052
|
if (root !== "agents") {
|
|
67383
65053
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
67384
65054
|
}
|
|
67385
|
-
for (const
|
|
67386
|
-
RunTargetSegmentSchema.parse(
|
|
65055
|
+
for (const segment of segments) {
|
|
65056
|
+
RunTargetSegmentSchema.parse(segment);
|
|
67387
65057
|
}
|
|
67388
65058
|
const packagePath = packageName.split(".").join("/");
|
|
67389
65059
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -67496,9 +65166,9 @@ var init_grammar = __esm(() => {
|
|
|
67496
65166
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
67497
65167
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
67498
65168
|
}
|
|
67499
|
-
for (const
|
|
67500
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
67501
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
65169
|
+
for (const segment of parts.slice(1)) {
|
|
65170
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
65171
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
67502
65172
|
}
|
|
67503
65173
|
}
|
|
67504
65174
|
});
|
|
@@ -67514,9 +65184,9 @@ var init_grammar = __esm(() => {
|
|
|
67514
65184
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
67515
65185
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
67516
65186
|
}
|
|
67517
|
-
for (const
|
|
67518
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
67519
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
65187
|
+
for (const segment of parts.slice(1)) {
|
|
65188
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
65189
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
67520
65190
|
}
|
|
67521
65191
|
}
|
|
67522
65192
|
});
|
|
@@ -67610,9 +65280,9 @@ var init_grammar = __esm(() => {
|
|
|
67610
65280
|
});
|
|
67611
65281
|
return;
|
|
67612
65282
|
}
|
|
67613
|
-
for (const
|
|
67614
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
67615
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
65283
|
+
for (const segment of parts.slice(1)) {
|
|
65284
|
+
if (!RunTargetSegmentSchema.safeParse(segment).success) {
|
|
65285
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
|
|
67616
65286
|
}
|
|
67617
65287
|
}
|
|
67618
65288
|
if (ref) {
|
|
@@ -68362,7 +66032,7 @@ function fromBig(n, le = false) {
|
|
|
68362
66032
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
68363
66033
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
68364
66034
|
}
|
|
68365
|
-
function
|
|
66035
|
+
function split(lst, le = false) {
|
|
68366
66036
|
const len = lst.length;
|
|
68367
66037
|
let Ah = new Uint32Array(len);
|
|
68368
66038
|
let Al = new Uint32Array(len);
|
|
@@ -68542,7 +66212,7 @@ var init_sha2 = __esm(() => {
|
|
|
68542
66212
|
super(28);
|
|
68543
66213
|
}
|
|
68544
66214
|
};
|
|
68545
|
-
K512 = /* @__PURE__ */ (() =>
|
|
66215
|
+
K512 = /* @__PURE__ */ (() => split([
|
|
68546
66216
|
"0x428a2f98d728ae22",
|
|
68547
66217
|
"0x7137449123ef65cd",
|
|
68548
66218
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -69145,11 +66815,11 @@ function walkGrammar(node, parts) {
|
|
|
69145
66815
|
}
|
|
69146
66816
|
return current;
|
|
69147
66817
|
}
|
|
69148
|
-
function normalizeTemplate(
|
|
69149
|
-
return
|
|
66818
|
+
function normalizeTemplate(template) {
|
|
66819
|
+
return template.endsWith("/") ? template.slice(0, -1) : template;
|
|
69150
66820
|
}
|
|
69151
|
-
function renderTemplate(
|
|
69152
|
-
return normalizeTemplate(
|
|
66821
|
+
function renderTemplate(template, params) {
|
|
66822
|
+
return normalizeTemplate(template).split("/").flatMap((part) => {
|
|
69153
66823
|
if (!part.startsWith(":")) {
|
|
69154
66824
|
return [part];
|
|
69155
66825
|
}
|
|
@@ -69159,36 +66829,36 @@ function renderTemplate(template2, params) {
|
|
|
69159
66829
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
69160
66830
|
}
|
|
69161
66831
|
if (name === "path") {
|
|
69162
|
-
return value.split("/").map((
|
|
66832
|
+
return value.split("/").map((segment) => assertSegment("path", segment));
|
|
69163
66833
|
}
|
|
69164
66834
|
return [assertSegment(String(name), value)];
|
|
69165
66835
|
});
|
|
69166
66836
|
}
|
|
69167
|
-
function buildS3Path(tenantId,
|
|
66837
|
+
function buildS3Path(tenantId, template, params) {
|
|
69168
66838
|
const tenant = assertSegment("tenantId", tenantId);
|
|
69169
|
-
const parts = renderTemplate(
|
|
66839
|
+
const parts = renderTemplate(template, params);
|
|
69170
66840
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
69171
|
-
if (
|
|
69172
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66841
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66842
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
69173
66843
|
}
|
|
69174
66844
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
69175
|
-
return
|
|
66845
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
69176
66846
|
}
|
|
69177
|
-
function buildS3PathSuffix(
|
|
69178
|
-
const parts = renderTemplate(
|
|
66847
|
+
function buildS3PathSuffix(template, params) {
|
|
66848
|
+
const parts = renderTemplate(template, params);
|
|
69179
66849
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
69180
|
-
if (
|
|
69181
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66850
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66851
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
69182
66852
|
}
|
|
69183
66853
|
const path = parts.join("/");
|
|
69184
|
-
return
|
|
66854
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
69185
66855
|
}
|
|
69186
66856
|
function stripTenantPrefix(key) {
|
|
69187
66857
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
69188
66858
|
}
|
|
69189
|
-
function matchS3Path(
|
|
66859
|
+
function matchS3Path(template, key) {
|
|
69190
66860
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
69191
|
-
const templateParts = normalizeTemplate(
|
|
66861
|
+
const templateParts = normalizeTemplate(template).split("/");
|
|
69192
66862
|
const params = {};
|
|
69193
66863
|
let keyIndex = 0;
|
|
69194
66864
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -69207,7 +66877,7 @@ function matchS3Path(template2, key) {
|
|
|
69207
66877
|
if (rest.length === 0)
|
|
69208
66878
|
return null;
|
|
69209
66879
|
try {
|
|
69210
|
-
params.path = rest.map((
|
|
66880
|
+
params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
|
|
69211
66881
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
69212
66882
|
} catch {
|
|
69213
66883
|
return null;
|
|
@@ -69241,23 +66911,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
69241
66911
|
}
|
|
69242
66912
|
return assertSegment("tenantId", tenantId);
|
|
69243
66913
|
};
|
|
69244
|
-
const build = (
|
|
66914
|
+
const build = (template, params) => {
|
|
69245
66915
|
const tenant = resolveTenantId(params);
|
|
69246
|
-
const parts = renderTemplate(
|
|
66916
|
+
const parts = renderTemplate(template, params ?? {});
|
|
69247
66917
|
const node = walkGrammar(grammarNode, parts);
|
|
69248
|
-
if (
|
|
69249
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66918
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66919
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
69250
66920
|
}
|
|
69251
66921
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
69252
|
-
return
|
|
66922
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
69253
66923
|
};
|
|
69254
66924
|
const builder = build;
|
|
69255
|
-
builder.at = (
|
|
66925
|
+
builder.at = (template, params) => {
|
|
69256
66926
|
const tenant = resolveTenantId(params);
|
|
69257
|
-
const parts = renderTemplate(
|
|
66927
|
+
const parts = renderTemplate(template, params ?? {});
|
|
69258
66928
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
69259
|
-
if (
|
|
69260
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66929
|
+
if (template.endsWith("/") && nextNode === PATH_LEAF) {
|
|
66930
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
69261
66931
|
}
|
|
69262
66932
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
69263
66933
|
};
|
|
@@ -69681,7 +67351,7 @@ __export(exports_src, {
|
|
|
69681
67351
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
69682
67352
|
SpanTypes: () => SpanTypes,
|
|
69683
67353
|
SpanKindMap: () => SpanKindMap,
|
|
69684
|
-
SpanKind: () =>
|
|
67354
|
+
SpanKind: () => SpanKind,
|
|
69685
67355
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
69686
67356
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
69687
67357
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -69799,7 +67469,7 @@ __export(exports_src, {
|
|
|
69799
67469
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
69800
67470
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
69801
67471
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
69802
|
-
FilePathDescriptorSchema: () =>
|
|
67472
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
|
|
69803
67473
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
69804
67474
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
69805
67475
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -69927,8 +67597,8 @@ var init_src = __esm(() => {
|
|
|
69927
67597
|
init_legacy_boundary();
|
|
69928
67598
|
init_runtime_file_ref();
|
|
69929
67599
|
init_scoped_file_ref();
|
|
69930
|
-
|
|
69931
|
-
|
|
67600
|
+
init_processor();
|
|
67601
|
+
init_parser();
|
|
69932
67602
|
init_otel();
|
|
69933
67603
|
init_execution_row();
|
|
69934
67604
|
init_run_expand();
|
|
@@ -70842,7 +68512,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70842
68512
|
else
|
|
70843
68513
|
end = lineWidth - indentAtStart;
|
|
70844
68514
|
}
|
|
70845
|
-
let
|
|
68515
|
+
let split2 = undefined;
|
|
70846
68516
|
let prev = undefined;
|
|
70847
68517
|
let overflow = false;
|
|
70848
68518
|
let i = -1;
|
|
@@ -70876,20 +68546,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70876
68546
|
if (mode === FOLD_BLOCK)
|
|
70877
68547
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
70878
68548
|
end = i + indent.length + endStep;
|
|
70879
|
-
|
|
68549
|
+
split2 = undefined;
|
|
70880
68550
|
} else {
|
|
70881
68551
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
70882
68552
|
` && prev !== "\t") {
|
|
70883
68553
|
const next = text[i + 1];
|
|
70884
68554
|
if (next && next !== " " && next !== `
|
|
70885
68555
|
` && next !== "\t")
|
|
70886
|
-
|
|
68556
|
+
split2 = i;
|
|
70887
68557
|
}
|
|
70888
68558
|
if (i >= end) {
|
|
70889
|
-
if (
|
|
70890
|
-
folds.push(
|
|
70891
|
-
end =
|
|
70892
|
-
|
|
68559
|
+
if (split2) {
|
|
68560
|
+
folds.push(split2);
|
|
68561
|
+
end = split2 + endStep;
|
|
68562
|
+
split2 = undefined;
|
|
70893
68563
|
} else if (mode === FOLD_QUOTED) {
|
|
70894
68564
|
while (prev === " " || prev === "\t") {
|
|
70895
68565
|
prev = ch;
|
|
@@ -70902,7 +68572,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70902
68572
|
folds.push(j);
|
|
70903
68573
|
escapedFolds[j] = true;
|
|
70904
68574
|
end = j + endStep;
|
|
70905
|
-
|
|
68575
|
+
split2 = undefined;
|
|
70906
68576
|
} else {
|
|
70907
68577
|
overflow = true;
|
|
70908
68578
|
}
|
|
@@ -71536,7 +69206,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
71536
69206
|
var identity = require_identity();
|
|
71537
69207
|
var Scalar = require_Scalar();
|
|
71538
69208
|
var MERGE_KEY = "<<";
|
|
71539
|
-
var
|
|
69209
|
+
var merge2 = {
|
|
71540
69210
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
71541
69211
|
default: "key",
|
|
71542
69212
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -71546,7 +69216,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
71546
69216
|
}),
|
|
71547
69217
|
stringify: () => MERGE_KEY
|
|
71548
69218
|
};
|
|
71549
|
-
var isMergeKey = (ctx, key) => (
|
|
69219
|
+
var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
71550
69220
|
function addMergeToJSMap(ctx, map2, value) {
|
|
71551
69221
|
const source = resolveAliasValue(ctx, value);
|
|
71552
69222
|
if (identity.isSeq(source))
|
|
@@ -71585,21 +69255,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
71585
69255
|
}
|
|
71586
69256
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
71587
69257
|
exports.isMergeKey = isMergeKey;
|
|
71588
|
-
exports.merge =
|
|
69258
|
+
exports.merge = merge2;
|
|
71589
69259
|
});
|
|
71590
69260
|
|
|
71591
69261
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
71592
69262
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
71593
69263
|
var log = require_log();
|
|
71594
|
-
var
|
|
69264
|
+
var merge2 = require_merge();
|
|
71595
69265
|
var stringify = require_stringify();
|
|
71596
69266
|
var identity = require_identity();
|
|
71597
69267
|
var toJS = require_toJS();
|
|
71598
69268
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
71599
69269
|
if (identity.isNode(key) && key.addToJSMap)
|
|
71600
69270
|
key.addToJSMap(ctx, map2, value);
|
|
71601
|
-
else if (
|
|
71602
|
-
|
|
69271
|
+
else if (merge2.isMergeKey(ctx, key))
|
|
69272
|
+
merge2.addMergeToJSMap(ctx, map2, value);
|
|
71603
69273
|
else {
|
|
71604
69274
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
71605
69275
|
if (map2 instanceof Map) {
|
|
@@ -72875,7 +70545,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72875
70545
|
var bool = require_bool2();
|
|
72876
70546
|
var float = require_float2();
|
|
72877
70547
|
var int2 = require_int2();
|
|
72878
|
-
var
|
|
70548
|
+
var merge2 = require_merge();
|
|
72879
70549
|
var omap = require_omap();
|
|
72880
70550
|
var pairs = require_pairs();
|
|
72881
70551
|
var set2 = require_set();
|
|
@@ -72895,7 +70565,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72895
70565
|
float.floatExp,
|
|
72896
70566
|
float.float,
|
|
72897
70567
|
binary.binary,
|
|
72898
|
-
|
|
70568
|
+
merge2.merge,
|
|
72899
70569
|
omap.omap,
|
|
72900
70570
|
pairs.pairs,
|
|
72901
70571
|
set2.set,
|
|
@@ -72918,7 +70588,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72918
70588
|
var schema = require_schema();
|
|
72919
70589
|
var schema$1 = require_schema2();
|
|
72920
70590
|
var binary = require_binary();
|
|
72921
|
-
var
|
|
70591
|
+
var merge2 = require_merge();
|
|
72922
70592
|
var omap = require_omap();
|
|
72923
70593
|
var pairs = require_pairs();
|
|
72924
70594
|
var schema$2 = require_schema3();
|
|
@@ -72943,7 +70613,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72943
70613
|
intOct: int2.intOct,
|
|
72944
70614
|
intTime: timestamp.intTime,
|
|
72945
70615
|
map: map2.map,
|
|
72946
|
-
merge:
|
|
70616
|
+
merge: merge2.merge,
|
|
72947
70617
|
null: _null4.nullTag,
|
|
72948
70618
|
omap: omap.omap,
|
|
72949
70619
|
pairs: pairs.pairs,
|
|
@@ -72953,7 +70623,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72953
70623
|
};
|
|
72954
70624
|
var coreKnownTags = {
|
|
72955
70625
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
72956
|
-
"tag:yaml.org,2002:merge":
|
|
70626
|
+
"tag:yaml.org,2002:merge": merge2.merge,
|
|
72957
70627
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
72958
70628
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
72959
70629
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -72962,7 +70632,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72962
70632
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
72963
70633
|
const schemaTags = schemas3.get(schemaName);
|
|
72964
70634
|
if (schemaTags && !customTags) {
|
|
72965
|
-
return addMergeTag && !schemaTags.includes(
|
|
70635
|
+
return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
|
|
72966
70636
|
}
|
|
72967
70637
|
let tags = schemaTags;
|
|
72968
70638
|
if (!tags) {
|
|
@@ -72980,7 +70650,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72980
70650
|
tags = customTags(tags.slice());
|
|
72981
70651
|
}
|
|
72982
70652
|
if (addMergeTag)
|
|
72983
|
-
tags = tags.concat(
|
|
70653
|
+
tags = tags.concat(merge2.merge);
|
|
72984
70654
|
return tags.reduce((tags2, tag) => {
|
|
72985
70655
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72986
70656
|
if (!tagObj) {
|
|
@@ -73007,11 +70677,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
73007
70677
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
73008
70678
|
|
|
73009
70679
|
class Schema {
|
|
73010
|
-
constructor({ compat: compat2, customTags, merge:
|
|
70680
|
+
constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
73011
70681
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
73012
70682
|
this.name = typeof schema === "string" && schema || "core";
|
|
73013
70683
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
73014
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
70684
|
+
this.tags = tags.getTags(customTags, this.name, merge2);
|
|
73015
70685
|
this.toStringOptions = toStringDefaults ?? null;
|
|
73016
70686
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
73017
70687
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -74234,13 +71904,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
74234
71904
|
return { mode, indent, chomp, comment, length };
|
|
74235
71905
|
}
|
|
74236
71906
|
function splitLines(source) {
|
|
74237
|
-
const
|
|
74238
|
-
const first =
|
|
71907
|
+
const split2 = source.split(/\n( *)/);
|
|
71908
|
+
const first = split2[0];
|
|
74239
71909
|
const m = first.match(/^( *)/);
|
|
74240
71910
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
74241
71911
|
const lines = [line0];
|
|
74242
|
-
for (let i = 1;i <
|
|
74243
|
-
lines.push([
|
|
71912
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
71913
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
74244
71914
|
return lines;
|
|
74245
71915
|
}
|
|
74246
71916
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -77254,7 +74924,7 @@ var init_main = __esm(() => {
|
|
|
77254
74924
|
});
|
|
77255
74925
|
|
|
77256
74926
|
// ../../node_modules/sisteransi/src/index.js
|
|
77257
|
-
var
|
|
74927
|
+
var require_src = __commonJS((exports, module) => {
|
|
77258
74928
|
var ESC2 = "\x1B";
|
|
77259
74929
|
var CSI2 = `${ESC2}[`;
|
|
77260
74930
|
var beep = "\x07";
|
|
@@ -77597,7 +75267,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
77597
75267
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
77598
75268
|
var init_dist3 = __esm(() => {
|
|
77599
75269
|
init_main();
|
|
77600
|
-
import_sisteransi = __toESM(
|
|
75270
|
+
import_sisteransi = __toESM(require_src(), 1);
|
|
77601
75271
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
77602
75272
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
77603
75273
|
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)}` } } };
|
|
@@ -78940,7 +76610,7 @@ var init_dist4 = __esm(() => {
|
|
|
78940
76610
|
init_dist3();
|
|
78941
76611
|
init_main();
|
|
78942
76612
|
init_dist2();
|
|
78943
|
-
import_sisteransi2 = __toESM(
|
|
76613
|
+
import_sisteransi2 = __toESM(require_src(), 1);
|
|
78944
76614
|
tt2 = te();
|
|
78945
76615
|
_t = w2("◆", "*");
|
|
78946
76616
|
ot2 = w2("■", "x");
|
|
@@ -172432,7 +170102,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
172432
170102
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
172433
170103
|
}
|
|
172434
170104
|
return to5;
|
|
172435
|
-
}, __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,
|
|
170105
|
+
}, __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_utils2, 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_utils3, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils4, 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_semver, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src2, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
172436
170106
|
diff(oldStr, newStr, options8 = {}) {
|
|
172437
170107
|
let callback;
|
|
172438
170108
|
if (typeof options8 === "function") {
|
|
@@ -173454,7 +171124,7 @@ var init_prettier = __esm(() => {
|
|
|
173454
171124
|
};
|
|
173455
171125
|
}
|
|
173456
171126
|
});
|
|
173457
|
-
|
|
171127
|
+
require_utils2 = __commonJS2({
|
|
173458
171128
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
173459
171129
|
exports.isInteger = (num) => {
|
|
173460
171130
|
if (typeof num === "number") {
|
|
@@ -173543,7 +171213,7 @@ var init_prettier = __esm(() => {
|
|
|
173543
171213
|
});
|
|
173544
171214
|
require_stringify2 = __commonJS2({
|
|
173545
171215
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
173546
|
-
var utils2 =
|
|
171216
|
+
var utils2 = require_utils2();
|
|
173547
171217
|
module.exports = (ast, options8 = {}) => {
|
|
173548
171218
|
const stringify2 = (node, parent = {}) => {
|
|
173549
171219
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173997,7 +171667,7 @@ var init_prettier = __esm(() => {
|
|
|
173997
171667
|
require_compile2 = __commonJS2({
|
|
173998
171668
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173999
171669
|
var fill2 = require_fill_range();
|
|
174000
|
-
var utils2 =
|
|
171670
|
+
var utils2 = require_utils2();
|
|
174001
171671
|
var compile = (ast, options8 = {}) => {
|
|
174002
171672
|
const walk = (node, parent = {}) => {
|
|
174003
171673
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -174047,7 +171717,7 @@ var init_prettier = __esm(() => {
|
|
|
174047
171717
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
174048
171718
|
var fill2 = require_fill_range();
|
|
174049
171719
|
var stringify2 = require_stringify2();
|
|
174050
|
-
var utils2 =
|
|
171720
|
+
var utils2 = require_utils2();
|
|
174051
171721
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
174052
171722
|
const result = [];
|
|
174053
171723
|
queue = [].concat(queue);
|
|
@@ -176246,8 +173916,8 @@ var init_prettier = __esm(() => {
|
|
|
176246
173916
|
var Stream = __require2("stream");
|
|
176247
173917
|
var PassThrough = Stream.PassThrough;
|
|
176248
173918
|
var slice = Array.prototype.slice;
|
|
176249
|
-
module.exports =
|
|
176250
|
-
function
|
|
173919
|
+
module.exports = merge2;
|
|
173920
|
+
function merge2() {
|
|
176251
173921
|
const streamsQueue = [];
|
|
176252
173922
|
const args = slice.call(arguments);
|
|
176253
173923
|
let merging = false;
|
|
@@ -176361,9 +174031,9 @@ var init_prettier = __esm(() => {
|
|
|
176361
174031
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
176362
174032
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176363
174033
|
exports.merge = undefined;
|
|
176364
|
-
var
|
|
174034
|
+
var merge2 = require_merge2();
|
|
176365
174035
|
function merge3(streams) {
|
|
176366
|
-
const mergedStream =
|
|
174036
|
+
const mergedStream = merge2(streams);
|
|
176367
174037
|
streams.forEach((stream) => {
|
|
176368
174038
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
176369
174039
|
});
|
|
@@ -176391,7 +174061,7 @@ var init_prettier = __esm(() => {
|
|
|
176391
174061
|
exports.isEmpty = isEmpty;
|
|
176392
174062
|
}
|
|
176393
174063
|
});
|
|
176394
|
-
|
|
174064
|
+
require_utils3 = __commonJS2({
|
|
176395
174065
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
176396
174066
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176397
174067
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -176415,7 +174085,7 @@ var init_prettier = __esm(() => {
|
|
|
176415
174085
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
176416
174086
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176417
174087
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
176418
|
-
var utils2 =
|
|
174088
|
+
var utils2 = require_utils3();
|
|
176419
174089
|
function generate(input, settings) {
|
|
176420
174090
|
const patterns = processPatterns(input, settings);
|
|
176421
174091
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -176724,7 +174394,7 @@ var init_prettier = __esm(() => {
|
|
|
176724
174394
|
exports.createDirentFromStats = createDirentFromStats;
|
|
176725
174395
|
}
|
|
176726
174396
|
});
|
|
176727
|
-
|
|
174397
|
+
require_utils4 = __commonJS2({
|
|
176728
174398
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
176729
174399
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176730
174400
|
exports.fs = undefined;
|
|
@@ -176752,7 +174422,7 @@ var init_prettier = __esm(() => {
|
|
|
176752
174422
|
var fsStat = require_out();
|
|
176753
174423
|
var rpl = require_run_parallel();
|
|
176754
174424
|
var constants_1 = require_constants3();
|
|
176755
|
-
var utils2 =
|
|
174425
|
+
var utils2 = require_utils4();
|
|
176756
174426
|
var common = require_common();
|
|
176757
174427
|
function read3(directory, settings, callback) {
|
|
176758
174428
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176858,7 +174528,7 @@ var init_prettier = __esm(() => {
|
|
|
176858
174528
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
176859
174529
|
var fsStat = require_out();
|
|
176860
174530
|
var constants_1 = require_constants3();
|
|
176861
|
-
var utils2 =
|
|
174531
|
+
var utils2 = require_utils4();
|
|
176862
174532
|
var common = require_common();
|
|
176863
174533
|
function read3(directory, settings) {
|
|
176864
174534
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -177638,7 +175308,7 @@ var init_prettier = __esm(() => {
|
|
|
177638
175308
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177639
175309
|
var path15 = __require2("path");
|
|
177640
175310
|
var fsStat = require_out();
|
|
177641
|
-
var utils2 =
|
|
175311
|
+
var utils2 = require_utils3();
|
|
177642
175312
|
var Reader = class {
|
|
177643
175313
|
constructor(_settings) {
|
|
177644
175314
|
this._settings = _settings;
|
|
@@ -177762,7 +175432,7 @@ var init_prettier = __esm(() => {
|
|
|
177762
175432
|
require_matcher = __commonJS2({
|
|
177763
175433
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
177764
175434
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177765
|
-
var utils2 =
|
|
175435
|
+
var utils2 = require_utils3();
|
|
177766
175436
|
var Matcher = class {
|
|
177767
175437
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
177768
175438
|
this._patterns = _patterns;
|
|
@@ -177801,7 +175471,7 @@ var init_prettier = __esm(() => {
|
|
|
177801
175471
|
});
|
|
177802
175472
|
}
|
|
177803
175473
|
_splitSegmentsIntoSections(segments) {
|
|
177804
|
-
return utils2.array.splitWhen(segments, (
|
|
175474
|
+
return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
|
|
177805
175475
|
}
|
|
177806
175476
|
};
|
|
177807
175477
|
exports.default = Matcher;
|
|
@@ -177822,11 +175492,11 @@ var init_prettier = __esm(() => {
|
|
|
177822
175492
|
return true;
|
|
177823
175493
|
}
|
|
177824
175494
|
const match = parts.every((part, index) => {
|
|
177825
|
-
const
|
|
177826
|
-
if (
|
|
175495
|
+
const segment = pattern.segments[index];
|
|
175496
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
177827
175497
|
return true;
|
|
177828
175498
|
}
|
|
177829
|
-
if (!
|
|
175499
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
177830
175500
|
return true;
|
|
177831
175501
|
}
|
|
177832
175502
|
return false;
|
|
@@ -177844,7 +175514,7 @@ var init_prettier = __esm(() => {
|
|
|
177844
175514
|
require_deep = __commonJS2({
|
|
177845
175515
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
177846
175516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177847
|
-
var utils2 =
|
|
175517
|
+
var utils2 = require_utils3();
|
|
177848
175518
|
var partial_1 = require_partial();
|
|
177849
175519
|
var DeepFilter = class {
|
|
177850
175520
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -177906,7 +175576,7 @@ var init_prettier = __esm(() => {
|
|
|
177906
175576
|
require_entry = __commonJS2({
|
|
177907
175577
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
177908
175578
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177909
|
-
var utils2 =
|
|
175579
|
+
var utils2 = require_utils3();
|
|
177910
175580
|
var EntryFilter = class {
|
|
177911
175581
|
constructor(_settings, _micromatchOptions) {
|
|
177912
175582
|
this._settings = _settings;
|
|
@@ -177991,7 +175661,7 @@ var init_prettier = __esm(() => {
|
|
|
177991
175661
|
require_error2 = __commonJS2({
|
|
177992
175662
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177993
175663
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177994
|
-
var utils2 =
|
|
175664
|
+
var utils2 = require_utils3();
|
|
177995
175665
|
var ErrorFilter = class {
|
|
177996
175666
|
constructor(_settings) {
|
|
177997
175667
|
this._settings = _settings;
|
|
@@ -178009,7 +175679,7 @@ var init_prettier = __esm(() => {
|
|
|
178009
175679
|
require_entry2 = __commonJS2({
|
|
178010
175680
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
178011
175681
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
178012
|
-
var utils2 =
|
|
175682
|
+
var utils2 = require_utils3();
|
|
178013
175683
|
var EntryTransformer = class {
|
|
178014
175684
|
constructor(_settings) {
|
|
178015
175685
|
this._settings = _settings;
|
|
@@ -178277,7 +175947,7 @@ var init_prettier = __esm(() => {
|
|
|
178277
175947
|
var stream_1 = require_stream4();
|
|
178278
175948
|
var sync_1 = require_sync6();
|
|
178279
175949
|
var settings_1 = require_settings4();
|
|
178280
|
-
var utils2 =
|
|
175950
|
+
var utils2 = require_utils3();
|
|
178281
175951
|
async function FastGlob(source2, options8) {
|
|
178282
175952
|
assertPatternsInput(source2);
|
|
178283
175953
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -178595,7 +176265,7 @@ var init_prettier = __esm(() => {
|
|
|
178595
176265
|
};
|
|
178596
176266
|
}
|
|
178597
176267
|
});
|
|
178598
|
-
|
|
176268
|
+
require_semver = __commonJS2({
|
|
178599
176269
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
178600
176270
|
var debug = require_debug();
|
|
178601
176271
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -178865,7 +176535,7 @@ var init_prettier = __esm(() => {
|
|
|
178865
176535
|
});
|
|
178866
176536
|
require_compare = __commonJS2({
|
|
178867
176537
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
178868
|
-
var SemVer =
|
|
176538
|
+
var SemVer = require_semver();
|
|
178869
176539
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
178870
176540
|
module.exports = compare;
|
|
178871
176541
|
}
|
|
@@ -180598,7 +178268,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
180598
178268
|
};
|
|
180599
178269
|
}
|
|
180600
178270
|
});
|
|
180601
|
-
|
|
178271
|
+
require_src2 = __commonJS2({
|
|
180602
178272
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
180603
178273
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
180604
178274
|
return new (P9 || (P9 = Promise))(function(resolve3, reject) {
|
|
@@ -182061,7 +179731,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
182061
179731
|
mockable_default = mockable.mocked;
|
|
182062
179732
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
182063
179733
|
partition_default = partition2;
|
|
182064
|
-
import_editorconfig = __toESM2(
|
|
179734
|
+
import_editorconfig = __toESM2(require_src2(), 1);
|
|
182065
179735
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
182066
179736
|
FileSearcher = class extends Searcher {
|
|
182067
179737
|
findInDirectory = findFile;
|
|
@@ -184657,7 +182327,7 @@ import { fileURLToPath as fileURLToPath9 } from "url";
|
|
|
184657
182327
|
// package.json
|
|
184658
182328
|
var package_default = {
|
|
184659
182329
|
name: "@eigenpal/cli",
|
|
184660
|
-
version: "0.10.
|
|
182330
|
+
version: "0.10.46",
|
|
184661
182331
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
184662
182332
|
keywords: [
|
|
184663
182333
|
"eigenpal",
|
|
@@ -186172,7 +183842,7 @@ async function pushCurrentBranch(input) {
|
|
|
186172
183842
|
function slugifyPackageSegment(value) {
|
|
186173
183843
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
186174
183844
|
}
|
|
186175
|
-
function packagePathForTemplate(
|
|
183845
|
+
function packagePathForTemplate(template, name) {
|
|
186176
183846
|
const slug = slugifyPackageSegment(name);
|
|
186177
183847
|
if (!slug)
|
|
186178
183848
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -186184,7 +183854,7 @@ function packagePathForTemplate(template2, name) {
|
|
|
186184
183854
|
knowledge: "resources/knowledge",
|
|
186185
183855
|
evaluator: "evaluators"
|
|
186186
183856
|
};
|
|
186187
|
-
const root = rootByTemplate[
|
|
183857
|
+
const root = rootByTemplate[template];
|
|
186188
183858
|
if (!root)
|
|
186189
183859
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
186190
183860
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -186615,12 +184285,12 @@ function archivePackage(input) {
|
|
|
186615
184285
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
186616
184286
|
cwd: input.gitRoot
|
|
186617
184287
|
});
|
|
186618
|
-
const
|
|
184288
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
186619
184289
|
cwd: input.outDir,
|
|
186620
184290
|
encoding: "utf8"
|
|
186621
184291
|
});
|
|
186622
|
-
if (
|
|
186623
|
-
throw new Error(
|
|
184292
|
+
if (extract.status !== 0)
|
|
184293
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
186624
184294
|
} finally {
|
|
186625
184295
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
186626
184296
|
}
|
|
@@ -186649,12 +184319,12 @@ async function tryHostedArchive(input) {
|
|
|
186649
184319
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
186650
184320
|
try {
|
|
186651
184321
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
186652
|
-
const
|
|
184322
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
186653
184323
|
cwd: input.outDir,
|
|
186654
184324
|
encoding: "utf8"
|
|
186655
184325
|
});
|
|
186656
|
-
if (
|
|
186657
|
-
throw new Error(
|
|
184326
|
+
if (extract.status !== 0)
|
|
184327
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
186658
184328
|
return true;
|
|
186659
184329
|
} finally {
|
|
186660
184330
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -191635,18 +189305,18 @@ async function init(name, opts) {
|
|
|
191635
189305
|
if (existsSync13(target) && readdirSync4(target).length > 0) {
|
|
191636
189306
|
throw new Error(`Target directory ${relative2(process.cwd(), target)} exists and is not empty.`);
|
|
191637
189307
|
}
|
|
191638
|
-
let
|
|
189308
|
+
let template;
|
|
191639
189309
|
if (opts.template) {
|
|
191640
189310
|
if (!isTemplateName(opts.template)) {
|
|
191641
189311
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
191642
189312
|
}
|
|
191643
|
-
|
|
189313
|
+
template = opts.template;
|
|
191644
189314
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
191645
|
-
|
|
189315
|
+
template = "blank";
|
|
191646
189316
|
} else {
|
|
191647
|
-
|
|
189317
|
+
template = await promptForTemplate();
|
|
191648
189318
|
}
|
|
191649
|
-
const sourceRoot = join7(resolveTemplatesRoot(),
|
|
189319
|
+
const sourceRoot = join7(resolveTemplatesRoot(), template);
|
|
191650
189320
|
if (!existsSync13(sourceRoot)) {
|
|
191651
189321
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
191652
189322
|
}
|