@eigenpal/cli 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -17080,2480 +17080,14 @@ var require_picocolors = __commonJS((exports, module) => {
17080
17080
  module.exports.createColors = createColors;
17081
17081
  });
17082
17082
 
17083
- // ../../node_modules/nanoid/url-alphabet/index.js
17084
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
17085
-
17086
- // ../../node_modules/nanoid/index.js
17087
- import { webcrypto as crypto } from "node:crypto";
17088
- function fillPool(bytes) {
17089
- if (!pool || pool.length < bytes) {
17090
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
17091
- crypto.getRandomValues(pool);
17092
- poolOffset = 0;
17093
- } else if (poolOffset + bytes > pool.length) {
17094
- crypto.getRandomValues(pool);
17095
- poolOffset = 0;
17096
- }
17097
- poolOffset += bytes;
17098
- }
17099
- function nanoid3(size = 21) {
17100
- fillPool(size |= 0);
17101
- let id = "";
17102
- for (let i = poolOffset - size;i < poolOffset; i++) {
17103
- id += urlAlphabet[pool[i] & 63];
17104
- }
17105
- return id;
17106
- }
17107
- var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
17108
- var init_nanoid = () => {};
17109
-
17110
- // ../types/src/core/common.ts
17111
- function generateId(prefix) {
17112
- const id = nanoid3();
17113
- return prefix ? `${prefix}_${id}` : id;
17114
- }
17115
- function toJsonSchema(schema) {
17116
- return exports_external.toJSONSchema(schema, { target: "draft-7" });
17117
- }
17118
- var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
17119
- var init_common = __esm(() => {
17120
- init_nanoid();
17121
- init_zod();
17122
- ID_PREFIXES = {
17123
- WORKFLOW: "wf",
17124
- WORKFLOW_VERSION: "wfv",
17125
- WORKFLOW_HISTORY: "wfh",
17126
- JOB: "job",
17127
- EXECUTION: "exec",
17128
- STEP_EXECUTION: "step",
17129
- FILE: "file",
17130
- TEMPLATE: "tmpl",
17131
- USER: "user",
17132
- TENANT: "org",
17133
- TENANT_INVITE: "inv",
17134
- API_KEY: "eig",
17135
- PROCESSOR: "proc",
17136
- AI_PROVIDER: "aip",
17137
- ACCOUNT: "acct",
17138
- SESSION: "sess",
17139
- VERIFICATION: "vrf",
17140
- DATASET: "ds",
17141
- DATASET_EXAMPLE: "dex",
17142
- EXPERIMENT: "exp",
17143
- EXPERIMENT_RUN: "exr",
17144
- EXPERIMENT_EVALUATION: "evl",
17145
- EVAL_EXAMPLE: "evx",
17146
- EVAL_RESULT: "evr",
17147
- EVAL_BATCH: "evb",
17148
- RUN_REVIEW: "rev",
17149
- RUN_REVIEW_CORRECTION: "rvc",
17150
- TABLE_ROW: "row",
17151
- FOLDER: "fldr",
17152
- AGENT_WORKFLOW: "awf",
17153
- AGENT_EXECUTION: "aex",
17154
- AGENT_EXAMPLE: "aeg",
17155
- AGENT_VERSION: "avr",
17156
- AGENT_TRAINING_SESSION: "ats",
17157
- AGENT_EXPERIMENT: "aexp",
17158
- AGENT_EMAIL_ALIAS: "aea",
17159
- AGENT_EMAIL_INVOCATION: "aei",
17160
- AUTOMATION_TRIGGER: "atr",
17161
- SANDBOX_WS_TOKEN: "sws"
17162
- };
17163
- TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
17164
- return typeof val === "string" ? new Date(val) : val;
17165
- });
17166
- JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
17167
- BaseEntitySchema = exports_external.object({
17168
- id: exports_external.string(),
17169
- createdAt: TimestampSchema.optional(),
17170
- updatedAt: TimestampSchema.optional()
17171
- });
17172
- });
17173
-
17174
- // ../types/src/core/ids.ts
17175
- var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
17176
- var init_ids = __esm(() => {
17177
- PROCESSOR_IDS = {
17178
- MERGE: "builtin/merge",
17179
- DOCUMENT_PARSER: "builtin/parser",
17180
- EXTRACT: "builtin/extract",
17181
- SPLIT: "builtin/split",
17182
- CLASSIFY: "builtin/classify",
17183
- TEMPLATE: "builtin/template",
17184
- PDF_EMBEDDER: "builtin/pdf-embedder",
17185
- XLSX_TO_JSON: "builtin/xlsx-to-json"
17186
- };
17187
- PARSER_IDS = {
17188
- KREUZBERG: "builtin/kreuzberg",
17189
- OCR: "builtin/ocr",
17190
- LLM_VISION: "builtin/llm-vision"
17191
- };
17192
- INPUT_KINDS = {
17193
- DOCUMENT: "document",
17194
- PAYLOAD: "payload"
17195
- };
17196
- });
17197
-
17198
- // ../types/src/core/pagination.ts
17199
- var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
17200
- var init_pagination = __esm(() => {
17201
- init_zod();
17202
- PaginationParamsSchema = exports_external.object({
17203
- limit: exports_external.coerce.number().int().min(1).max(100).default(50),
17204
- offset: exports_external.coerce.number().int().min(0).default(0)
17205
- });
17206
- });
17207
-
17208
17083
  // ../types/src/core/index.ts
17209
- var init_core3 = __esm(() => {
17210
- init_common();
17211
- init_ids();
17212
- init_pagination();
17213
- });
17214
-
17215
- // ../../node_modules/@opentelemetry/api/build/src/version.js
17216
- var require_version = __commonJS((exports) => {
17217
- Object.defineProperty(exports, "__esModule", { value: true });
17218
- exports.VERSION = undefined;
17219
- exports.VERSION = "1.9.1";
17220
- });
17221
-
17222
- // ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
17223
- var require_semver = __commonJS((exports) => {
17224
- Object.defineProperty(exports, "__esModule", { value: true });
17225
- exports.isCompatible = exports._makeCompatibilityCheck = undefined;
17226
- var version_1 = require_version();
17227
- var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
17228
- function _makeCompatibilityCheck(ownVersion) {
17229
- const acceptedVersions = new Set([ownVersion]);
17230
- const rejectedVersions = new Set;
17231
- const myVersionMatch = ownVersion.match(re);
17232
- if (!myVersionMatch) {
17233
- return () => false;
17234
- }
17235
- const ownVersionParsed = {
17236
- major: +myVersionMatch[1],
17237
- minor: +myVersionMatch[2],
17238
- patch: +myVersionMatch[3],
17239
- prerelease: myVersionMatch[4]
17240
- };
17241
- if (ownVersionParsed.prerelease != null) {
17242
- return function isExactmatch(globalVersion) {
17243
- return globalVersion === ownVersion;
17244
- };
17245
- }
17246
- function _reject(v) {
17247
- rejectedVersions.add(v);
17248
- return false;
17249
- }
17250
- function _accept(v) {
17251
- acceptedVersions.add(v);
17252
- return true;
17253
- }
17254
- return function isCompatible(globalVersion) {
17255
- if (acceptedVersions.has(globalVersion)) {
17256
- return true;
17257
- }
17258
- if (rejectedVersions.has(globalVersion)) {
17259
- return false;
17260
- }
17261
- const globalVersionMatch = globalVersion.match(re);
17262
- if (!globalVersionMatch) {
17263
- return _reject(globalVersion);
17264
- }
17265
- const globalVersionParsed = {
17266
- major: +globalVersionMatch[1],
17267
- minor: +globalVersionMatch[2],
17268
- patch: +globalVersionMatch[3],
17269
- prerelease: globalVersionMatch[4]
17270
- };
17271
- if (globalVersionParsed.prerelease != null) {
17272
- return _reject(globalVersion);
17273
- }
17274
- if (ownVersionParsed.major !== globalVersionParsed.major) {
17275
- return _reject(globalVersion);
17276
- }
17277
- if (ownVersionParsed.major === 0) {
17278
- if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
17279
- return _accept(globalVersion);
17280
- }
17281
- return _reject(globalVersion);
17282
- }
17283
- if (ownVersionParsed.minor <= globalVersionParsed.minor) {
17284
- return _accept(globalVersion);
17285
- }
17286
- return _reject(globalVersion);
17287
- };
17288
- }
17289
- exports._makeCompatibilityCheck = _makeCompatibilityCheck;
17290
- exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
17291
- });
17292
-
17293
- // ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
17294
- var require_global_utils = __commonJS((exports) => {
17295
- Object.defineProperty(exports, "__esModule", { value: true });
17296
- exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
17297
- var version_1 = require_version();
17298
- var semver_1 = require_semver();
17299
- var major = version_1.VERSION.split(".")[0];
17300
- var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
17301
- var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
17302
- function registerGlobal(type, instance, diag, allowOverride = false) {
17303
- var _a3;
17304
- const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
17305
- version: version_1.VERSION
17306
- };
17307
- if (!allowOverride && api2[type]) {
17308
- const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
17309
- diag.error(err.stack || err.message);
17310
- return false;
17311
- }
17312
- if (api2.version !== version_1.VERSION) {
17313
- const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
17314
- diag.error(err.stack || err.message);
17315
- return false;
17316
- }
17317
- api2[type] = instance;
17318
- diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
17319
- return true;
17320
- }
17321
- exports.registerGlobal = registerGlobal;
17322
- function getGlobal(type) {
17323
- var _a3, _b;
17324
- const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
17325
- if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
17326
- return;
17327
- }
17328
- return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
17329
- }
17330
- exports.getGlobal = getGlobal;
17331
- function unregisterGlobal(type, diag) {
17332
- diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
17333
- const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
17334
- if (api2) {
17335
- delete api2[type];
17336
- }
17337
- }
17338
- exports.unregisterGlobal = unregisterGlobal;
17339
- });
17340
-
17341
- // ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
17342
- var require_ComponentLogger = __commonJS((exports) => {
17343
- Object.defineProperty(exports, "__esModule", { value: true });
17344
- exports.DiagComponentLogger = undefined;
17345
- var global_utils_1 = require_global_utils();
17346
-
17347
- class DiagComponentLogger {
17348
- constructor(props) {
17349
- this._namespace = props.namespace || "DiagComponentLogger";
17350
- }
17351
- debug(...args) {
17352
- return logProxy("debug", this._namespace, args);
17353
- }
17354
- error(...args) {
17355
- return logProxy("error", this._namespace, args);
17356
- }
17357
- info(...args) {
17358
- return logProxy("info", this._namespace, args);
17359
- }
17360
- warn(...args) {
17361
- return logProxy("warn", this._namespace, args);
17362
- }
17363
- verbose(...args) {
17364
- return logProxy("verbose", this._namespace, args);
17365
- }
17366
- }
17367
- exports.DiagComponentLogger = DiagComponentLogger;
17368
- function logProxy(funcName, namespace, args) {
17369
- const logger = (0, global_utils_1.getGlobal)("diag");
17370
- if (!logger) {
17371
- return;
17372
- }
17373
- return logger[funcName](namespace, ...args);
17374
- }
17375
- });
17376
-
17377
- // ../../node_modules/@opentelemetry/api/build/src/diag/types.js
17378
- var require_types = __commonJS((exports) => {
17379
- Object.defineProperty(exports, "__esModule", { value: true });
17380
- exports.DiagLogLevel = undefined;
17381
- var DiagLogLevel;
17382
- (function(DiagLogLevel2) {
17383
- DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
17384
- DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
17385
- DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
17386
- DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
17387
- DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
17388
- DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
17389
- DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
17390
- })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
17391
- });
17392
-
17393
- // ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
17394
- var require_logLevelLogger = __commonJS((exports) => {
17395
- Object.defineProperty(exports, "__esModule", { value: true });
17396
- exports.createLogLevelDiagLogger = undefined;
17397
- var types_1 = require_types();
17398
- function createLogLevelDiagLogger(maxLevel, logger) {
17399
- if (maxLevel < types_1.DiagLogLevel.NONE) {
17400
- maxLevel = types_1.DiagLogLevel.NONE;
17401
- } else if (maxLevel > types_1.DiagLogLevel.ALL) {
17402
- maxLevel = types_1.DiagLogLevel.ALL;
17403
- }
17404
- logger = logger || {};
17405
- function _filterFunc(funcName, theLevel) {
17406
- const theFunc = logger[funcName];
17407
- if (typeof theFunc === "function" && maxLevel >= theLevel) {
17408
- return theFunc.bind(logger);
17409
- }
17410
- return function() {};
17411
- }
17412
- return {
17413
- error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
17414
- warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
17415
- info: _filterFunc("info", types_1.DiagLogLevel.INFO),
17416
- debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
17417
- verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
17418
- };
17419
- }
17420
- exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
17421
- });
17422
-
17423
- // ../../node_modules/@opentelemetry/api/build/src/api/diag.js
17424
- var require_diag = __commonJS((exports) => {
17425
- Object.defineProperty(exports, "__esModule", { value: true });
17426
- exports.DiagAPI = undefined;
17427
- var ComponentLogger_1 = require_ComponentLogger();
17428
- var logLevelLogger_1 = require_logLevelLogger();
17429
- var types_1 = require_types();
17430
- var global_utils_1 = require_global_utils();
17431
- var API_NAME = "diag";
17432
-
17433
- class DiagAPI {
17434
- static instance() {
17435
- if (!this._instance) {
17436
- this._instance = new DiagAPI;
17437
- }
17438
- return this._instance;
17439
- }
17440
- constructor() {
17441
- function _logProxy(funcName) {
17442
- return function(...args) {
17443
- const logger = (0, global_utils_1.getGlobal)("diag");
17444
- if (!logger)
17445
- return;
17446
- return logger[funcName](...args);
17447
- };
17448
- }
17449
- const self2 = this;
17450
- const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
17451
- var _a3, _b, _c;
17452
- if (logger === self2) {
17453
- const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
17454
- self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
17455
- return false;
17456
- }
17457
- if (typeof optionsOrLogLevel === "number") {
17458
- optionsOrLogLevel = {
17459
- logLevel: optionsOrLogLevel
17460
- };
17461
- }
17462
- const oldLogger = (0, global_utils_1.getGlobal)("diag");
17463
- const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
17464
- if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
17465
- const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
17466
- oldLogger.warn(`Current logger will be overwritten from ${stack}`);
17467
- newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
17468
- }
17469
- return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
17470
- };
17471
- self2.setLogger = setLogger;
17472
- self2.disable = () => {
17473
- (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
17474
- };
17475
- self2.createComponentLogger = (options) => {
17476
- return new ComponentLogger_1.DiagComponentLogger(options);
17477
- };
17478
- self2.verbose = _logProxy("verbose");
17479
- self2.debug = _logProxy("debug");
17480
- self2.info = _logProxy("info");
17481
- self2.warn = _logProxy("warn");
17482
- self2.error = _logProxy("error");
17483
- }
17484
- }
17485
- exports.DiagAPI = DiagAPI;
17486
- });
17487
-
17488
- // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
17489
- var require_baggage_impl = __commonJS((exports) => {
17490
- Object.defineProperty(exports, "__esModule", { value: true });
17491
- exports.BaggageImpl = undefined;
17492
-
17493
- class BaggageImpl {
17494
- constructor(entries) {
17495
- this._entries = entries ? new Map(entries) : new Map;
17496
- }
17497
- getEntry(key) {
17498
- const entry = this._entries.get(key);
17499
- if (!entry) {
17500
- return;
17501
- }
17502
- return Object.assign({}, entry);
17503
- }
17504
- getAllEntries() {
17505
- return Array.from(this._entries.entries());
17506
- }
17507
- setEntry(key, entry) {
17508
- const newBaggage = new BaggageImpl(this._entries);
17509
- newBaggage._entries.set(key, entry);
17510
- return newBaggage;
17511
- }
17512
- removeEntry(key) {
17513
- const newBaggage = new BaggageImpl(this._entries);
17514
- newBaggage._entries.delete(key);
17515
- return newBaggage;
17516
- }
17517
- removeEntries(...keys) {
17518
- const newBaggage = new BaggageImpl(this._entries);
17519
- for (const key of keys) {
17520
- newBaggage._entries.delete(key);
17521
- }
17522
- return newBaggage;
17523
- }
17524
- clear() {
17525
- return new BaggageImpl;
17526
- }
17527
- }
17528
- exports.BaggageImpl = BaggageImpl;
17529
- });
17530
-
17531
- // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
17532
- var require_symbol = __commonJS((exports) => {
17533
- Object.defineProperty(exports, "__esModule", { value: true });
17534
- exports.baggageEntryMetadataSymbol = undefined;
17535
- exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
17536
- });
17537
-
17538
- // ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
17539
- var require_utils = __commonJS((exports) => {
17540
- Object.defineProperty(exports, "__esModule", { value: true });
17541
- exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
17542
- var diag_1 = require_diag();
17543
- var baggage_impl_1 = require_baggage_impl();
17544
- var symbol_1 = require_symbol();
17545
- var diag = diag_1.DiagAPI.instance();
17546
- function createBaggage(entries = {}) {
17547
- return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
17548
- }
17549
- exports.createBaggage = createBaggage;
17550
- function baggageEntryMetadataFromString(str) {
17551
- if (typeof str !== "string") {
17552
- diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
17553
- str = "";
17554
- }
17555
- return {
17556
- __TYPE__: symbol_1.baggageEntryMetadataSymbol,
17557
- toString() {
17558
- return str;
17559
- }
17560
- };
17561
- }
17562
- exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
17563
- });
17564
-
17565
- // ../../node_modules/@opentelemetry/api/build/src/context/context.js
17566
- var require_context = __commonJS((exports) => {
17567
- Object.defineProperty(exports, "__esModule", { value: true });
17568
- exports.ROOT_CONTEXT = exports.createContextKey = undefined;
17569
- function createContextKey(description) {
17570
- return Symbol.for(description);
17571
- }
17572
- exports.createContextKey = createContextKey;
17573
-
17574
- class BaseContext {
17575
- constructor(parentContext) {
17576
- const self2 = this;
17577
- self2._currentContext = parentContext ? new Map(parentContext) : new Map;
17578
- self2.getValue = (key) => self2._currentContext.get(key);
17579
- self2.setValue = (key, value) => {
17580
- const context = new BaseContext(self2._currentContext);
17581
- context._currentContext.set(key, value);
17582
- return context;
17583
- };
17584
- self2.deleteValue = (key) => {
17585
- const context = new BaseContext(self2._currentContext);
17586
- context._currentContext.delete(key);
17587
- return context;
17588
- };
17589
- }
17590
- }
17591
- exports.ROOT_CONTEXT = new BaseContext;
17592
- });
17593
-
17594
- // ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
17595
- var require_consoleLogger = __commonJS((exports) => {
17596
- Object.defineProperty(exports, "__esModule", { value: true });
17597
- exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
17598
- var consoleMap = [
17599
- { n: "error", c: "error" },
17600
- { n: "warn", c: "warn" },
17601
- { n: "info", c: "info" },
17602
- { n: "debug", c: "debug" },
17603
- { n: "verbose", c: "trace" }
17604
- ];
17605
- exports._originalConsoleMethods = {};
17606
- if (typeof console !== "undefined") {
17607
- const keys = [
17608
- "error",
17609
- "warn",
17610
- "info",
17611
- "debug",
17612
- "trace",
17613
- "log"
17614
- ];
17615
- for (const key of keys) {
17616
- if (typeof console[key] === "function") {
17617
- exports._originalConsoleMethods[key] = console[key];
17618
- }
17619
- }
17620
- }
17621
-
17622
- class DiagConsoleLogger {
17623
- constructor() {
17624
- function _consoleFunc(funcName) {
17625
- return function(...args) {
17626
- let theFunc = exports._originalConsoleMethods[funcName];
17627
- if (typeof theFunc !== "function") {
17628
- theFunc = exports._originalConsoleMethods["log"];
17629
- }
17630
- if (typeof theFunc !== "function" && console) {
17631
- theFunc = console[funcName];
17632
- if (typeof theFunc !== "function") {
17633
- theFunc = console.log;
17634
- }
17635
- }
17636
- if (typeof theFunc === "function") {
17637
- return theFunc.apply(console, args);
17638
- }
17639
- };
17640
- }
17641
- for (let i = 0;i < consoleMap.length; i++) {
17642
- this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
17643
- }
17644
- }
17645
- }
17646
- exports.DiagConsoleLogger = DiagConsoleLogger;
17647
- });
17648
-
17649
- // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
17650
- var require_NoopMeter = __commonJS((exports) => {
17651
- Object.defineProperty(exports, "__esModule", { value: true });
17652
- 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;
17653
-
17654
- class NoopMeter {
17655
- constructor() {}
17656
- createGauge(_name, _options) {
17657
- return exports.NOOP_GAUGE_METRIC;
17658
- }
17659
- createHistogram(_name, _options) {
17660
- return exports.NOOP_HISTOGRAM_METRIC;
17661
- }
17662
- createCounter(_name, _options) {
17663
- return exports.NOOP_COUNTER_METRIC;
17664
- }
17665
- createUpDownCounter(_name, _options) {
17666
- return exports.NOOP_UP_DOWN_COUNTER_METRIC;
17667
- }
17668
- createObservableGauge(_name, _options) {
17669
- return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
17670
- }
17671
- createObservableCounter(_name, _options) {
17672
- return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
17673
- }
17674
- createObservableUpDownCounter(_name, _options) {
17675
- return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
17676
- }
17677
- addBatchObservableCallback(_callback, _observables) {}
17678
- removeBatchObservableCallback(_callback) {}
17679
- }
17680
- exports.NoopMeter = NoopMeter;
17681
-
17682
- class NoopMetric {
17683
- }
17684
- exports.NoopMetric = NoopMetric;
17685
-
17686
- class NoopCounterMetric extends NoopMetric {
17687
- add(_value, _attributes) {}
17688
- }
17689
- exports.NoopCounterMetric = NoopCounterMetric;
17690
-
17691
- class NoopUpDownCounterMetric extends NoopMetric {
17692
- add(_value, _attributes) {}
17693
- }
17694
- exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
17695
-
17696
- class NoopGaugeMetric extends NoopMetric {
17697
- record(_value, _attributes) {}
17698
- }
17699
- exports.NoopGaugeMetric = NoopGaugeMetric;
17700
-
17701
- class NoopHistogramMetric extends NoopMetric {
17702
- record(_value, _attributes) {}
17703
- }
17704
- exports.NoopHistogramMetric = NoopHistogramMetric;
17705
-
17706
- class NoopObservableMetric {
17707
- addCallback(_callback) {}
17708
- removeCallback(_callback) {}
17709
- }
17710
- exports.NoopObservableMetric = NoopObservableMetric;
17711
-
17712
- class NoopObservableCounterMetric extends NoopObservableMetric {
17713
- }
17714
- exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
17715
-
17716
- class NoopObservableGaugeMetric extends NoopObservableMetric {
17717
- }
17718
- exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
17719
-
17720
- class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
17721
- }
17722
- exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
17723
- exports.NOOP_METER = new NoopMeter;
17724
- exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
17725
- exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
17726
- exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
17727
- exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
17728
- exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
17729
- exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
17730
- exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
17731
- function createNoopMeter() {
17732
- return exports.NOOP_METER;
17733
- }
17734
- exports.createNoopMeter = createNoopMeter;
17735
- });
17736
-
17737
- // ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
17738
- var require_Metric = __commonJS((exports) => {
17739
- Object.defineProperty(exports, "__esModule", { value: true });
17740
- exports.ValueType = undefined;
17741
- var ValueType;
17742
- (function(ValueType2) {
17743
- ValueType2[ValueType2["INT"] = 0] = "INT";
17744
- ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
17745
- })(ValueType = exports.ValueType || (exports.ValueType = {}));
17746
- });
17747
-
17748
- // ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
17749
- var require_TextMapPropagator = __commonJS((exports) => {
17750
- Object.defineProperty(exports, "__esModule", { value: true });
17751
- exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
17752
- exports.defaultTextMapGetter = {
17753
- get(carrier, key) {
17754
- if (carrier == null) {
17755
- return;
17756
- }
17757
- return carrier[key];
17758
- },
17759
- keys(carrier) {
17760
- if (carrier == null) {
17761
- return [];
17762
- }
17763
- return Object.keys(carrier);
17764
- }
17765
- };
17766
- exports.defaultTextMapSetter = {
17767
- set(carrier, key, value) {
17768
- if (carrier == null) {
17769
- return;
17770
- }
17771
- carrier[key] = value;
17772
- }
17773
- };
17774
- });
17775
-
17776
- // ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
17777
- var require_NoopContextManager = __commonJS((exports) => {
17778
- Object.defineProperty(exports, "__esModule", { value: true });
17779
- exports.NoopContextManager = undefined;
17780
- var context_1 = require_context();
17781
-
17782
- class NoopContextManager {
17783
- active() {
17784
- return context_1.ROOT_CONTEXT;
17785
- }
17786
- with(_context, fn, thisArg, ...args) {
17787
- return fn.call(thisArg, ...args);
17788
- }
17789
- bind(_context, target) {
17790
- return target;
17791
- }
17792
- enable() {
17793
- return this;
17794
- }
17795
- disable() {
17796
- return this;
17797
- }
17798
- }
17799
- exports.NoopContextManager = NoopContextManager;
17800
- });
17801
-
17802
- // ../../node_modules/@opentelemetry/api/build/src/api/context.js
17803
- var require_context2 = __commonJS((exports) => {
17804
- Object.defineProperty(exports, "__esModule", { value: true });
17805
- exports.ContextAPI = undefined;
17806
- var NoopContextManager_1 = require_NoopContextManager();
17807
- var global_utils_1 = require_global_utils();
17808
- var diag_1 = require_diag();
17809
- var API_NAME = "context";
17810
- var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
17811
-
17812
- class ContextAPI {
17813
- constructor() {}
17814
- static getInstance() {
17815
- if (!this._instance) {
17816
- this._instance = new ContextAPI;
17817
- }
17818
- return this._instance;
17819
- }
17820
- setGlobalContextManager(contextManager) {
17821
- return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
17822
- }
17823
- active() {
17824
- return this._getContextManager().active();
17825
- }
17826
- with(context, fn, thisArg, ...args) {
17827
- return this._getContextManager().with(context, fn, thisArg, ...args);
17828
- }
17829
- bind(context, target) {
17830
- return this._getContextManager().bind(context, target);
17831
- }
17832
- _getContextManager() {
17833
- return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
17834
- }
17835
- disable() {
17836
- this._getContextManager().disable();
17837
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
17838
- }
17839
- }
17840
- exports.ContextAPI = ContextAPI;
17841
- });
17842
-
17843
- // ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
17844
- var require_trace_flags = __commonJS((exports) => {
17845
- Object.defineProperty(exports, "__esModule", { value: true });
17846
- exports.TraceFlags = undefined;
17847
- var TraceFlags;
17848
- (function(TraceFlags2) {
17849
- TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
17850
- TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
17851
- })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
17852
- });
17853
-
17854
- // ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
17855
- var require_invalid_span_constants = __commonJS((exports) => {
17856
- Object.defineProperty(exports, "__esModule", { value: true });
17857
- exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
17858
- var trace_flags_1 = require_trace_flags();
17859
- exports.INVALID_SPANID = "0000000000000000";
17860
- exports.INVALID_TRACEID = "00000000000000000000000000000000";
17861
- exports.INVALID_SPAN_CONTEXT = {
17862
- traceId: exports.INVALID_TRACEID,
17863
- spanId: exports.INVALID_SPANID,
17864
- traceFlags: trace_flags_1.TraceFlags.NONE
17865
- };
17866
- });
17867
-
17868
- // ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
17869
- var require_NonRecordingSpan = __commonJS((exports) => {
17870
- Object.defineProperty(exports, "__esModule", { value: true });
17871
- exports.NonRecordingSpan = undefined;
17872
- var invalid_span_constants_1 = require_invalid_span_constants();
17873
-
17874
- class NonRecordingSpan {
17875
- constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
17876
- this._spanContext = spanContext;
17877
- }
17878
- spanContext() {
17879
- return this._spanContext;
17880
- }
17881
- setAttribute(_key, _value) {
17882
- return this;
17883
- }
17884
- setAttributes(_attributes) {
17885
- return this;
17886
- }
17887
- addEvent(_name, _attributes) {
17888
- return this;
17889
- }
17890
- addLink(_link) {
17891
- return this;
17892
- }
17893
- addLinks(_links) {
17894
- return this;
17895
- }
17896
- setStatus(_status) {
17897
- return this;
17898
- }
17899
- updateName(_name) {
17900
- return this;
17901
- }
17902
- end(_endTime) {}
17903
- isRecording() {
17904
- return false;
17905
- }
17906
- recordException(_exception, _time) {}
17907
- }
17908
- exports.NonRecordingSpan = NonRecordingSpan;
17909
- });
17910
-
17911
- // ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
17912
- var require_context_utils = __commonJS((exports) => {
17913
- Object.defineProperty(exports, "__esModule", { value: true });
17914
- exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
17915
- var context_1 = require_context();
17916
- var NonRecordingSpan_1 = require_NonRecordingSpan();
17917
- var context_2 = require_context2();
17918
- var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
17919
- function getSpan(context) {
17920
- return context.getValue(SPAN_KEY) || undefined;
17921
- }
17922
- exports.getSpan = getSpan;
17923
- function getActiveSpan() {
17924
- return getSpan(context_2.ContextAPI.getInstance().active());
17925
- }
17926
- exports.getActiveSpan = getActiveSpan;
17927
- function setSpan(context, span) {
17928
- return context.setValue(SPAN_KEY, span);
17929
- }
17930
- exports.setSpan = setSpan;
17931
- function deleteSpan(context) {
17932
- return context.deleteValue(SPAN_KEY);
17933
- }
17934
- exports.deleteSpan = deleteSpan;
17935
- function setSpanContext(context, spanContext) {
17936
- return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
17937
- }
17938
- exports.setSpanContext = setSpanContext;
17939
- function getSpanContext(context) {
17940
- var _a3;
17941
- return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
17942
- }
17943
- exports.getSpanContext = getSpanContext;
17944
- });
17945
-
17946
- // ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
17947
- var require_spancontext_utils = __commonJS((exports) => {
17948
- Object.defineProperty(exports, "__esModule", { value: true });
17949
- exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
17950
- var invalid_span_constants_1 = require_invalid_span_constants();
17951
- var NonRecordingSpan_1 = require_NonRecordingSpan();
17952
- var isHex = new Uint8Array([
17953
- 0,
17954
- 0,
17955
- 0,
17956
- 0,
17957
- 0,
17958
- 0,
17959
- 0,
17960
- 0,
17961
- 0,
17962
- 0,
17963
- 0,
17964
- 0,
17965
- 0,
17966
- 0,
17967
- 0,
17968
- 0,
17969
- 0,
17970
- 0,
17971
- 0,
17972
- 0,
17973
- 0,
17974
- 0,
17975
- 0,
17976
- 0,
17977
- 0,
17978
- 0,
17979
- 0,
17980
- 0,
17981
- 0,
17982
- 0,
17983
- 0,
17984
- 0,
17985
- 0,
17986
- 0,
17987
- 0,
17988
- 0,
17989
- 0,
17990
- 0,
17991
- 0,
17992
- 0,
17993
- 0,
17994
- 0,
17995
- 0,
17996
- 0,
17997
- 0,
17998
- 0,
17999
- 0,
18000
- 0,
18001
- 1,
18002
- 1,
18003
- 1,
18004
- 1,
18005
- 1,
18006
- 1,
18007
- 1,
18008
- 1,
18009
- 1,
18010
- 1,
18011
- 0,
18012
- 0,
18013
- 0,
18014
- 0,
18015
- 0,
18016
- 0,
18017
- 0,
18018
- 1,
18019
- 1,
18020
- 1,
18021
- 1,
18022
- 1,
18023
- 1,
18024
- 0,
18025
- 0,
18026
- 0,
18027
- 0,
18028
- 0,
18029
- 0,
18030
- 0,
18031
- 0,
18032
- 0,
18033
- 0,
18034
- 0,
18035
- 0,
18036
- 0,
18037
- 0,
18038
- 0,
18039
- 0,
18040
- 0,
18041
- 0,
18042
- 0,
18043
- 0,
18044
- 0,
18045
- 0,
18046
- 0,
18047
- 0,
18048
- 0,
18049
- 0,
18050
- 1,
18051
- 1,
18052
- 1,
18053
- 1,
18054
- 1,
18055
- 1
18056
- ]);
18057
- function isValidHex(id, length) {
18058
- if (typeof id !== "string" || id.length !== length)
18059
- return false;
18060
- let r = 0;
18061
- for (let i = 0;i < id.length; i += 4) {
18062
- r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
18063
- }
18064
- return r === length;
18065
- }
18066
- function isValidTraceId(traceId) {
18067
- return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
18068
- }
18069
- exports.isValidTraceId = isValidTraceId;
18070
- function isValidSpanId(spanId) {
18071
- return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
18072
- }
18073
- exports.isValidSpanId = isValidSpanId;
18074
- function isSpanContextValid(spanContext) {
18075
- return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
18076
- }
18077
- exports.isSpanContextValid = isSpanContextValid;
18078
- function wrapSpanContext(spanContext) {
18079
- return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
18080
- }
18081
- exports.wrapSpanContext = wrapSpanContext;
18082
- });
18083
-
18084
- // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
18085
- var require_NoopTracer = __commonJS((exports) => {
18086
- Object.defineProperty(exports, "__esModule", { value: true });
18087
- exports.NoopTracer = undefined;
18088
- var context_1 = require_context2();
18089
- var context_utils_1 = require_context_utils();
18090
- var NonRecordingSpan_1 = require_NonRecordingSpan();
18091
- var spancontext_utils_1 = require_spancontext_utils();
18092
- var contextApi = context_1.ContextAPI.getInstance();
18093
-
18094
- class NoopTracer {
18095
- startSpan(name, options, context = contextApi.active()) {
18096
- const root = Boolean(options === null || options === undefined ? undefined : options.root);
18097
- if (root) {
18098
- return new NonRecordingSpan_1.NonRecordingSpan;
18099
- }
18100
- const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
18101
- if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
18102
- return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
18103
- } else {
18104
- return new NonRecordingSpan_1.NonRecordingSpan;
18105
- }
18106
- }
18107
- startActiveSpan(name, arg2, arg3, arg4) {
18108
- let opts;
18109
- let ctx;
18110
- let fn;
18111
- if (arguments.length < 2) {
18112
- return;
18113
- } else if (arguments.length === 2) {
18114
- fn = arg2;
18115
- } else if (arguments.length === 3) {
18116
- opts = arg2;
18117
- fn = arg3;
18118
- } else {
18119
- opts = arg2;
18120
- ctx = arg3;
18121
- fn = arg4;
18122
- }
18123
- const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
18124
- const span = this.startSpan(name, opts, parentContext);
18125
- const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
18126
- return contextApi.with(contextWithSpanSet, fn, undefined, span);
18127
- }
18128
- }
18129
- exports.NoopTracer = NoopTracer;
18130
- function isSpanContext(spanContext) {
18131
- 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";
18132
- }
18133
- });
18134
-
18135
- // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
18136
- var require_ProxyTracer = __commonJS((exports) => {
18137
- Object.defineProperty(exports, "__esModule", { value: true });
18138
- exports.ProxyTracer = undefined;
18139
- var NoopTracer_1 = require_NoopTracer();
18140
- var NOOP_TRACER = new NoopTracer_1.NoopTracer;
18141
-
18142
- class ProxyTracer {
18143
- constructor(provider, name, version2, options) {
18144
- this._provider = provider;
18145
- this.name = name;
18146
- this.version = version2;
18147
- this.options = options;
18148
- }
18149
- startSpan(name, options, context) {
18150
- return this._getTracer().startSpan(name, options, context);
18151
- }
18152
- startActiveSpan(_name, _options, _context, _fn) {
18153
- const tracer = this._getTracer();
18154
- return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
18155
- }
18156
- _getTracer() {
18157
- if (this._delegate) {
18158
- return this._delegate;
18159
- }
18160
- const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
18161
- if (!tracer) {
18162
- return NOOP_TRACER;
18163
- }
18164
- this._delegate = tracer;
18165
- return this._delegate;
18166
- }
18167
- }
18168
- exports.ProxyTracer = ProxyTracer;
18169
- });
18170
-
18171
- // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
18172
- var require_NoopTracerProvider = __commonJS((exports) => {
18173
- Object.defineProperty(exports, "__esModule", { value: true });
18174
- exports.NoopTracerProvider = undefined;
18175
- var NoopTracer_1 = require_NoopTracer();
18176
-
18177
- class NoopTracerProvider {
18178
- getTracer(_name, _version, _options) {
18179
- return new NoopTracer_1.NoopTracer;
18180
- }
18181
- }
18182
- exports.NoopTracerProvider = NoopTracerProvider;
18183
- });
18184
-
18185
- // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
18186
- var require_ProxyTracerProvider = __commonJS((exports) => {
18187
- Object.defineProperty(exports, "__esModule", { value: true });
18188
- exports.ProxyTracerProvider = undefined;
18189
- var ProxyTracer_1 = require_ProxyTracer();
18190
- var NoopTracerProvider_1 = require_NoopTracerProvider();
18191
- var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
18192
-
18193
- class ProxyTracerProvider {
18194
- getTracer(name, version2, options) {
18195
- var _a3;
18196
- return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
18197
- }
18198
- getDelegate() {
18199
- var _a3;
18200
- return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
18201
- }
18202
- setDelegate(delegate) {
18203
- this._delegate = delegate;
18204
- }
18205
- getDelegateTracer(name, version2, options) {
18206
- var _a3;
18207
- return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
18208
- }
18209
- }
18210
- exports.ProxyTracerProvider = ProxyTracerProvider;
18211
- });
18212
-
18213
- // ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
18214
- var require_SamplingResult = __commonJS((exports) => {
18215
- Object.defineProperty(exports, "__esModule", { value: true });
18216
- exports.SamplingDecision = undefined;
18217
- var SamplingDecision;
18218
- (function(SamplingDecision2) {
18219
- SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
18220
- SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
18221
- SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
18222
- })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
18223
- });
18224
-
18225
- // ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
18226
- var require_span_kind = __commonJS((exports) => {
18227
- Object.defineProperty(exports, "__esModule", { value: true });
18228
- exports.SpanKind = undefined;
18229
- var SpanKind;
18230
- (function(SpanKind2) {
18231
- SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
18232
- SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
18233
- SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
18234
- SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
18235
- SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
18236
- })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
18237
- });
18238
-
18239
- // ../../node_modules/@opentelemetry/api/build/src/trace/status.js
18240
- var require_status = __commonJS((exports) => {
18241
- Object.defineProperty(exports, "__esModule", { value: true });
18242
- exports.SpanStatusCode = undefined;
18243
- var SpanStatusCode;
18244
- (function(SpanStatusCode2) {
18245
- SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
18246
- SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
18247
- SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
18248
- })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
18249
- });
18250
-
18251
- // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
18252
- var require_tracestate_validators = __commonJS((exports) => {
18253
- Object.defineProperty(exports, "__esModule", { value: true });
18254
- exports.validateValue = exports.validateKey = undefined;
18255
- var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
18256
- var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
18257
- var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
18258
- var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
18259
- var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
18260
- var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
18261
- function validateKey(key) {
18262
- return VALID_KEY_REGEX.test(key);
18263
- }
18264
- exports.validateKey = validateKey;
18265
- function validateValue(value) {
18266
- return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
18267
- }
18268
- exports.validateValue = validateValue;
18269
- });
18270
-
18271
- // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
18272
- var require_tracestate_impl = __commonJS((exports) => {
18273
- Object.defineProperty(exports, "__esModule", { value: true });
18274
- exports.TraceStateImpl = undefined;
18275
- var tracestate_validators_1 = require_tracestate_validators();
18276
- var MAX_TRACE_STATE_ITEMS = 32;
18277
- var MAX_TRACE_STATE_LEN = 512;
18278
- var LIST_MEMBERS_SEPARATOR = ",";
18279
- var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
18280
-
18281
- class TraceStateImpl {
18282
- constructor(rawTraceState) {
18283
- this._internalState = new Map;
18284
- if (rawTraceState)
18285
- this._parse(rawTraceState);
18286
- }
18287
- set(key, value) {
18288
- const traceState = this._clone();
18289
- if (traceState._internalState.has(key)) {
18290
- traceState._internalState.delete(key);
18291
- }
18292
- traceState._internalState.set(key, value);
18293
- return traceState;
18294
- }
18295
- unset(key) {
18296
- const traceState = this._clone();
18297
- traceState._internalState.delete(key);
18298
- return traceState;
18299
- }
18300
- get(key) {
18301
- return this._internalState.get(key);
18302
- }
18303
- serialize() {
18304
- return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
18305
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
18306
- return agg;
18307
- }, []).join(LIST_MEMBERS_SEPARATOR);
18308
- }
18309
- _parse(rawTraceState) {
18310
- if (rawTraceState.length > MAX_TRACE_STATE_LEN)
18311
- return;
18312
- this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
18313
- const listMember = part.trim();
18314
- const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
18315
- if (i !== -1) {
18316
- const key = listMember.slice(0, i);
18317
- const value = listMember.slice(i + 1, part.length);
18318
- if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
18319
- agg.set(key, value);
18320
- }
18321
- }
18322
- return agg;
18323
- }, new Map);
18324
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
18325
- this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
18326
- }
18327
- }
18328
- _keys() {
18329
- return Array.from(this._internalState.keys()).reverse();
18330
- }
18331
- _clone() {
18332
- const traceState = new TraceStateImpl;
18333
- traceState._internalState = new Map(this._internalState);
18334
- return traceState;
18335
- }
18336
- }
18337
- exports.TraceStateImpl = TraceStateImpl;
18338
- });
18339
-
18340
- // ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
18341
- var require_utils2 = __commonJS((exports) => {
18342
- Object.defineProperty(exports, "__esModule", { value: true });
18343
- exports.createTraceState = undefined;
18344
- var tracestate_impl_1 = require_tracestate_impl();
18345
- function createTraceState(rawTraceState) {
18346
- return new tracestate_impl_1.TraceStateImpl(rawTraceState);
18347
- }
18348
- exports.createTraceState = createTraceState;
18349
- });
18350
-
18351
- // ../../node_modules/@opentelemetry/api/build/src/context-api.js
18352
- var require_context_api = __commonJS((exports) => {
18353
- Object.defineProperty(exports, "__esModule", { value: true });
18354
- exports.context = undefined;
18355
- var context_1 = require_context2();
18356
- exports.context = context_1.ContextAPI.getInstance();
18357
- });
18358
-
18359
- // ../../node_modules/@opentelemetry/api/build/src/diag-api.js
18360
- var require_diag_api = __commonJS((exports) => {
18361
- Object.defineProperty(exports, "__esModule", { value: true });
18362
- exports.diag = undefined;
18363
- var diag_1 = require_diag();
18364
- exports.diag = diag_1.DiagAPI.instance();
18365
- });
18366
-
18367
- // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
18368
- var require_NoopMeterProvider = __commonJS((exports) => {
18369
- Object.defineProperty(exports, "__esModule", { value: true });
18370
- exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
18371
- var NoopMeter_1 = require_NoopMeter();
18372
-
18373
- class NoopMeterProvider {
18374
- getMeter(_name, _version, _options) {
18375
- return NoopMeter_1.NOOP_METER;
18376
- }
18377
- }
18378
- exports.NoopMeterProvider = NoopMeterProvider;
18379
- exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
18380
- });
18381
-
18382
- // ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
18383
- var require_metrics = __commonJS((exports) => {
18384
- Object.defineProperty(exports, "__esModule", { value: true });
18385
- exports.MetricsAPI = undefined;
18386
- var NoopMeterProvider_1 = require_NoopMeterProvider();
18387
- var global_utils_1 = require_global_utils();
18388
- var diag_1 = require_diag();
18389
- var API_NAME = "metrics";
18390
-
18391
- class MetricsAPI {
18392
- constructor() {}
18393
- static getInstance() {
18394
- if (!this._instance) {
18395
- this._instance = new MetricsAPI;
18396
- }
18397
- return this._instance;
18398
- }
18399
- setGlobalMeterProvider(provider) {
18400
- return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
18401
- }
18402
- getMeterProvider() {
18403
- return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
18404
- }
18405
- getMeter(name, version2, options) {
18406
- return this.getMeterProvider().getMeter(name, version2, options);
18407
- }
18408
- disable() {
18409
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18410
- }
18411
- }
18412
- exports.MetricsAPI = MetricsAPI;
18413
- });
18414
-
18415
- // ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
18416
- var require_metrics_api = __commonJS((exports) => {
18417
- Object.defineProperty(exports, "__esModule", { value: true });
18418
- exports.metrics = undefined;
18419
- var metrics_1 = require_metrics();
18420
- exports.metrics = metrics_1.MetricsAPI.getInstance();
18421
- });
18422
-
18423
- // ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
18424
- var require_NoopTextMapPropagator = __commonJS((exports) => {
18425
- Object.defineProperty(exports, "__esModule", { value: true });
18426
- exports.NoopTextMapPropagator = undefined;
18427
-
18428
- class NoopTextMapPropagator {
18429
- inject(_context, _carrier) {}
18430
- extract(context, _carrier) {
18431
- return context;
18432
- }
18433
- fields() {
18434
- return [];
18435
- }
18436
- }
18437
- exports.NoopTextMapPropagator = NoopTextMapPropagator;
18438
- });
18439
-
18440
- // ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
18441
- var require_context_helpers = __commonJS((exports) => {
18442
- Object.defineProperty(exports, "__esModule", { value: true });
18443
- exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
18444
- var context_1 = require_context2();
18445
- var context_2 = require_context();
18446
- var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
18447
- function getBaggage(context) {
18448
- return context.getValue(BAGGAGE_KEY) || undefined;
18449
- }
18450
- exports.getBaggage = getBaggage;
18451
- function getActiveBaggage() {
18452
- return getBaggage(context_1.ContextAPI.getInstance().active());
18453
- }
18454
- exports.getActiveBaggage = getActiveBaggage;
18455
- function setBaggage(context, baggage) {
18456
- return context.setValue(BAGGAGE_KEY, baggage);
18457
- }
18458
- exports.setBaggage = setBaggage;
18459
- function deleteBaggage(context) {
18460
- return context.deleteValue(BAGGAGE_KEY);
18461
- }
18462
- exports.deleteBaggage = deleteBaggage;
18463
- });
18464
-
18465
- // ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
18466
- var require_propagation = __commonJS((exports) => {
18467
- Object.defineProperty(exports, "__esModule", { value: true });
18468
- exports.PropagationAPI = undefined;
18469
- var global_utils_1 = require_global_utils();
18470
- var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
18471
- var TextMapPropagator_1 = require_TextMapPropagator();
18472
- var context_helpers_1 = require_context_helpers();
18473
- var utils_1 = require_utils();
18474
- var diag_1 = require_diag();
18475
- var API_NAME = "propagation";
18476
- var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
18477
-
18478
- class PropagationAPI {
18479
- constructor() {
18480
- this.createBaggage = utils_1.createBaggage;
18481
- this.getBaggage = context_helpers_1.getBaggage;
18482
- this.getActiveBaggage = context_helpers_1.getActiveBaggage;
18483
- this.setBaggage = context_helpers_1.setBaggage;
18484
- this.deleteBaggage = context_helpers_1.deleteBaggage;
18485
- }
18486
- static getInstance() {
18487
- if (!this._instance) {
18488
- this._instance = new PropagationAPI;
18489
- }
18490
- return this._instance;
18491
- }
18492
- setGlobalPropagator(propagator) {
18493
- return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
18494
- }
18495
- inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
18496
- return this._getGlobalPropagator().inject(context, carrier, setter);
18497
- }
18498
- extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
18499
- return this._getGlobalPropagator().extract(context, carrier, getter);
18500
- }
18501
- fields() {
18502
- return this._getGlobalPropagator().fields();
18503
- }
18504
- disable() {
18505
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18506
- }
18507
- _getGlobalPropagator() {
18508
- return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
18509
- }
18510
- }
18511
- exports.PropagationAPI = PropagationAPI;
18512
- });
18513
-
18514
- // ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
18515
- var require_propagation_api = __commonJS((exports) => {
18516
- Object.defineProperty(exports, "__esModule", { value: true });
18517
- exports.propagation = undefined;
18518
- var propagation_1 = require_propagation();
18519
- exports.propagation = propagation_1.PropagationAPI.getInstance();
18520
- });
18521
-
18522
- // ../../node_modules/@opentelemetry/api/build/src/api/trace.js
18523
- var require_trace = __commonJS((exports) => {
18524
- Object.defineProperty(exports, "__esModule", { value: true });
18525
- exports.TraceAPI = undefined;
18526
- var global_utils_1 = require_global_utils();
18527
- var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18528
- var spancontext_utils_1 = require_spancontext_utils();
18529
- var context_utils_1 = require_context_utils();
18530
- var diag_1 = require_diag();
18531
- var API_NAME = "trace";
18532
-
18533
- class TraceAPI {
18534
- constructor() {
18535
- this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18536
- this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
18537
- this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
18538
- this.deleteSpan = context_utils_1.deleteSpan;
18539
- this.getSpan = context_utils_1.getSpan;
18540
- this.getActiveSpan = context_utils_1.getActiveSpan;
18541
- this.getSpanContext = context_utils_1.getSpanContext;
18542
- this.setSpan = context_utils_1.setSpan;
18543
- this.setSpanContext = context_utils_1.setSpanContext;
18544
- }
18545
- static getInstance() {
18546
- if (!this._instance) {
18547
- this._instance = new TraceAPI;
18548
- }
18549
- return this._instance;
18550
- }
18551
- setGlobalTracerProvider(provider) {
18552
- const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
18553
- if (success3) {
18554
- this._proxyTracerProvider.setDelegate(provider);
18555
- }
18556
- return success3;
18557
- }
18558
- getTracerProvider() {
18559
- return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
18560
- }
18561
- getTracer(name, version2) {
18562
- return this.getTracerProvider().getTracer(name, version2);
18563
- }
18564
- disable() {
18565
- (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18566
- this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18567
- }
18568
- }
18569
- exports.TraceAPI = TraceAPI;
18570
- });
18571
-
18572
- // ../../node_modules/@opentelemetry/api/build/src/trace-api.js
18573
- var require_trace_api = __commonJS((exports) => {
18574
- Object.defineProperty(exports, "__esModule", { value: true });
18575
- exports.trace = undefined;
18576
- var trace_1 = require_trace();
18577
- exports.trace = trace_1.TraceAPI.getInstance();
18578
- });
18579
-
18580
- // ../../node_modules/@opentelemetry/api/build/src/index.js
18581
- var require_src = __commonJS((exports) => {
18582
- Object.defineProperty(exports, "__esModule", { value: true });
18583
- 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;
18584
- var utils_1 = require_utils();
18585
- Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
18586
- return utils_1.baggageEntryMetadataFromString;
18587
- } });
18588
- var context_1 = require_context();
18589
- Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
18590
- return context_1.createContextKey;
18591
- } });
18592
- Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
18593
- return context_1.ROOT_CONTEXT;
18594
- } });
18595
- var consoleLogger_1 = require_consoleLogger();
18596
- Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
18597
- return consoleLogger_1.DiagConsoleLogger;
18598
- } });
18599
- var types_1 = require_types();
18600
- Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
18601
- return types_1.DiagLogLevel;
18602
- } });
18603
- var NoopMeter_1 = require_NoopMeter();
18604
- Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
18605
- return NoopMeter_1.createNoopMeter;
18606
- } });
18607
- var Metric_1 = require_Metric();
18608
- Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
18609
- return Metric_1.ValueType;
18610
- } });
18611
- var TextMapPropagator_1 = require_TextMapPropagator();
18612
- Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
18613
- return TextMapPropagator_1.defaultTextMapGetter;
18614
- } });
18615
- Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
18616
- return TextMapPropagator_1.defaultTextMapSetter;
18617
- } });
18618
- var ProxyTracer_1 = require_ProxyTracer();
18619
- Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
18620
- return ProxyTracer_1.ProxyTracer;
18621
- } });
18622
- var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18623
- Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
18624
- return ProxyTracerProvider_1.ProxyTracerProvider;
18625
- } });
18626
- var SamplingResult_1 = require_SamplingResult();
18627
- Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
18628
- return SamplingResult_1.SamplingDecision;
18629
- } });
18630
- var span_kind_1 = require_span_kind();
18631
- Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
18632
- return span_kind_1.SpanKind;
18633
- } });
18634
- var status_1 = require_status();
18635
- Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
18636
- return status_1.SpanStatusCode;
18637
- } });
18638
- var trace_flags_1 = require_trace_flags();
18639
- Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
18640
- return trace_flags_1.TraceFlags;
18641
- } });
18642
- var utils_2 = require_utils2();
18643
- Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
18644
- return utils_2.createTraceState;
18645
- } });
18646
- var spancontext_utils_1 = require_spancontext_utils();
18647
- Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
18648
- return spancontext_utils_1.isSpanContextValid;
18649
- } });
18650
- Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
18651
- return spancontext_utils_1.isValidTraceId;
18652
- } });
18653
- Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
18654
- return spancontext_utils_1.isValidSpanId;
18655
- } });
18656
- var invalid_span_constants_1 = require_invalid_span_constants();
18657
- Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
18658
- return invalid_span_constants_1.INVALID_SPANID;
18659
- } });
18660
- Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
18661
- return invalid_span_constants_1.INVALID_TRACEID;
18662
- } });
18663
- Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
18664
- return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
18665
- } });
18666
- var context_api_1 = require_context_api();
18667
- Object.defineProperty(exports, "context", { enumerable: true, get: function() {
18668
- return context_api_1.context;
18669
- } });
18670
- var diag_api_1 = require_diag_api();
18671
- Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
18672
- return diag_api_1.diag;
18673
- } });
18674
- var metrics_api_1 = require_metrics_api();
18675
- Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
18676
- return metrics_api_1.metrics;
18677
- } });
18678
- var propagation_api_1 = require_propagation_api();
18679
- Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
18680
- return propagation_api_1.propagation;
18681
- } });
18682
- var trace_api_1 = require_trace_api();
18683
- Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
18684
- return trace_api_1.trace;
18685
- } });
18686
- exports.default = {
18687
- context: context_api_1.context,
18688
- diag: diag_api_1.diag,
18689
- metrics: metrics_api_1.metrics,
18690
- propagation: propagation_api_1.propagation,
18691
- trace: trace_api_1.trace
18692
- };
18693
- });
18694
-
18695
- // ../types/src/processor/processor.ts
18696
- var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
18697
- var init_processor = __esm(() => {
18698
- init_zod();
18699
- init_common();
18700
- import_api = __toESM(require_src(), 1);
18701
- noopTracingContext = {
18702
- traceId: "",
18703
- getActiveSpan() {
18704
- return;
18705
- },
18706
- async withSpan(_name, _options, fn) {
18707
- const noopSpan = {
18708
- spanContext: () => ({
18709
- traceId: "",
18710
- spanId: "",
18711
- traceFlags: 0
18712
- }),
18713
- setAttribute: () => noopSpan,
18714
- setAttributes: () => noopSpan,
18715
- addEvent: () => noopSpan,
18716
- addLink: () => noopSpan,
18717
- addLinks: () => noopSpan,
18718
- setStatus: () => noopSpan,
18719
- updateName: () => noopSpan,
18720
- end: () => {},
18721
- isRecording: () => false,
18722
- recordException: () => {}
18723
- };
18724
- return fn(noopSpan);
18725
- }
18726
- };
18727
- ProcessorPortSchema = exports_external.object({
18728
- name: exports_external.string(),
18729
- schema: JsonSchemaSchema,
18730
- required: exports_external.boolean().default(true)
18731
- });
18732
- ProcessorDefinitionSchema = exports_external.object({
18733
- id: exports_external.string(),
18734
- name: exports_external.string(),
18735
- description: exports_external.string().optional(),
18736
- inputSchema: JsonSchemaSchema,
18737
- outputSchema: JsonSchemaSchema,
18738
- configSchema: JsonSchemaSchema.optional(),
18739
- inputPorts: exports_external.array(ProcessorPortSchema).optional(),
18740
- outputPorts: exports_external.array(ProcessorPortSchema).optional(),
18741
- isBuiltin: exports_external.boolean().default(true),
18742
- pluginName: exports_external.string().optional()
18743
- });
18744
- ProcessorExecutionContextSchema = exports_external.object({
18745
- jobId: exports_external.string(),
18746
- stepId: exports_external.string(),
18747
- tenantId: exports_external.string(),
18748
- workflowId: exports_external.string(),
18749
- workerId: exports_external.string().optional()
18750
- });
18751
- ((TraceStatus2) => {
18752
- TraceStatus2["PENDING"] = "pending";
18753
- TraceStatus2["RUNNING"] = "running";
18754
- TraceStatus2["COMPLETED"] = "completed";
18755
- TraceStatus2["FAILED"] = "failed";
18756
- })(TraceStatus ||= {});
18757
- });
18758
-
18759
- // ../types/src/processor/execution.ts
18760
- function asTuple(values) {
18761
- return values;
18762
- }
18763
- var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
18764
- var init_execution = __esm(() => {
18765
- init_zod();
18766
- WorkflowExecutionStatusValue = {
18767
- CREATED: "created",
18768
- PENDING: "pending",
18769
- RUNNING: "running",
18770
- WAITING: "waiting",
18771
- COMPLETED: "completed",
18772
- FAILED: "failed",
18773
- CANCELLED: "cancelled"
18774
- };
18775
- WorkflowExecutionStatusSchema = exports_external.enum([
18776
- WorkflowExecutionStatusValue.CREATED,
18777
- WorkflowExecutionStatusValue.PENDING,
18778
- WorkflowExecutionStatusValue.RUNNING,
18779
- WorkflowExecutionStatusValue.WAITING,
18780
- WorkflowExecutionStatusValue.COMPLETED,
18781
- WorkflowExecutionStatusValue.FAILED,
18782
- WorkflowExecutionStatusValue.CANCELLED
18783
- ]);
18784
- StepExecutionStatusValue = {
18785
- PENDING: "pending",
18786
- RUNNING: "running",
18787
- SUCCESS: "success",
18788
- FAILURE: "failure",
18789
- WAITING: "waiting",
18790
- SKIPPED: "skipped"
18791
- };
18792
- StepExecutionStatusSchema = exports_external.enum([
18793
- StepExecutionStatusValue.PENDING,
18794
- StepExecutionStatusValue.RUNNING,
18795
- StepExecutionStatusValue.SUCCESS,
18796
- StepExecutionStatusValue.FAILURE,
18797
- StepExecutionStatusValue.WAITING,
18798
- StepExecutionStatusValue.SKIPPED
18799
- ]);
18800
- TriggerTypeValue = {
18801
- MANUAL: "manual",
18802
- API: "api",
18803
- WEBHOOK: "webhook",
18804
- SCHEDULE: "schedule",
18805
- EMAIL: "email",
18806
- EVAL: "eval",
18807
- CLI: "cli"
18808
- };
18809
- TriggerTypeSchema = exports_external.enum([
18810
- TriggerTypeValue.MANUAL,
18811
- TriggerTypeValue.API,
18812
- TriggerTypeValue.WEBHOOK,
18813
- TriggerTypeValue.SCHEDULE,
18814
- TriggerTypeValue.EMAIL,
18815
- TriggerTypeValue.EVAL,
18816
- TriggerTypeValue.CLI
18817
- ]);
18818
- ExecutionTypeValue = {
18819
- PROD: "prod",
18820
- EVAL: "eval",
18821
- PLAYGROUND: "playground"
18822
- };
18823
- ExecutionTypeSchema = exports_external.enum([
18824
- ExecutionTypeValue.PROD,
18825
- ExecutionTypeValue.EVAL,
18826
- ExecutionTypeValue.PLAYGROUND
18827
- ]);
18828
- WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
18829
- STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
18830
- TRIGGER_TYPES = TriggerTypeSchema.options;
18831
- EXECUTION_TYPES = ExecutionTypeSchema.options;
18832
- });
18833
-
18834
- // ../types/src/processor/configs/classify.ts
18835
- var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
18836
- var init_classify = __esm(() => {
18837
- init_zod();
18838
- ClassifyInputSchema = exports_external.object({
18839
- content: exports_external.string().optional().describe("Text content to classify"),
18840
- text: exports_external.string().optional().describe("Text content (alternative to content)")
18841
- }).refine((data) => !!(data.content || data.text), {
18842
- message: "Either content or text must be provided"
18843
- });
18844
- ClassifyLabelSchema = exports_external.object({
18845
- name: exports_external.string().min(1).describe("Label value returned in output.label"),
18846
- description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
18847
- });
18848
- ClassifyConfigSchema = exports_external.object({
18849
- labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
18850
- 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."),
18851
- provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
18852
- model: exports_external.string().optional().describe("Model override"),
18853
- maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
18854
- });
18855
- ClassifyOutputSchema = exports_external.object({
18856
- label: exports_external.string().describe("The selected label name"),
18857
- confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
18858
- reason: exports_external.string().describe("Short justification for the chosen label")
18859
- });
18860
- });
18861
-
18862
- // ../types/src/parser/parser.ts
18863
- function resolveEffectiveMimeType(filename, declaredMimeType) {
18864
- const ext = filename.split(".").pop()?.toLowerCase();
18865
- if (!ext)
18866
- return declaredMimeType;
18867
- const extensionMime = EXTENSION_TO_MIME[ext];
18868
- return extensionMime ?? declaredMimeType;
18869
- }
18870
- function getParserCategory(mimeType) {
18871
- const normalized = mimeType.toLowerCase().trim();
18872
- if (ParserCategory.PLAINTEXT.includes(normalized)) {
18873
- return "plaintext";
18874
- }
18875
- if (ParserCategory.OFFICE.includes(normalized)) {
18876
- return "office";
18877
- }
18878
- if (ParserCategory.DOCUMENT.includes(normalized)) {
18879
- return "document";
18880
- }
18881
- return null;
18882
- }
18883
- function requiresSpecializedParser(mimeType) {
18884
- return getParserCategory(mimeType) === "document";
18885
- }
18886
- function getAllSupportedMimeTypes() {
18887
- return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
18888
- }
18889
- function getSupportedFormatsLabel() {
18890
- const allMimes = getAllSupportedMimeTypes();
18891
- const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
18892
- return labels.join(", ");
18893
- }
18894
- 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_LABEL;
18895
- var init_parser = __esm(() => {
18896
- init_zod();
18897
- OFFICE_MIME_TYPES = [
18898
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
18899
- "application/msword",
18900
- "application/vnd.oasis.opendocument.text",
18901
- "application/rtf",
18902
- "text/rtf",
18903
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
18904
- "application/vnd.ms-excel",
18905
- "application/vnd.ms-excel.sheet.macroenabled.12",
18906
- "application/vnd.ms-excel.sheet.binary.macroenabled.12",
18907
- "application/vnd.oasis.opendocument.spreadsheet",
18908
- "application/vnd.openxmlformats-officedocument.presentationml.presentation",
18909
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
18910
- "application/vnd.ms-powerpoint.presentation.macroenabled.12",
18911
- "application/vnd.ms-powerpoint",
18912
- "application/vnd.oasis.opendocument.presentation",
18913
- "message/rfc822",
18914
- "application/vnd.ms-outlook",
18915
- "application/epub+zip"
18916
- ];
18917
- ParserCategory = {
18918
- PLAINTEXT: [
18919
- "text/plain",
18920
- "text/markdown",
18921
- "text/csv",
18922
- "text/tab-separated-values",
18923
- "text/html",
18924
- "text/xml",
18925
- "application/json",
18926
- "application/x-yaml",
18927
- "application/toml",
18928
- "image/svg+xml",
18929
- "text/x-rst",
18930
- "text/x-org",
18931
- "application/x-latex",
18932
- "application/x-ipynb+json",
18933
- "application/x-bibtex",
18934
- "application/docbook+xml",
18935
- "application/x-fictionbook+xml"
18936
- ],
18937
- OFFICE: [...OFFICE_MIME_TYPES],
18938
- DOCUMENT: [
18939
- "application/pdf",
18940
- "image/png",
18941
- "image/jpeg",
18942
- "image/webp",
18943
- "image/tiff",
18944
- "image/gif",
18945
- "image/bmp"
18946
- ]
18947
- };
18948
- ParserTypeSchema = exports_external.enum([
18949
- "plaintext",
18950
- "office",
18951
- "llm-vision",
18952
- "ocr"
18953
- ]);
18954
- DocumentMetadataSchema = exports_external.object({
18955
- filename: exports_external.string(),
18956
- mimeType: exports_external.string(),
18957
- size: exports_external.number().describe("File size in bytes"),
18958
- storageRef: exports_external.string().optional().describe("Storage reference for the original file")
18959
- });
18960
- ParseUsageSchema = exports_external.object({
18961
- pageCount: exports_external.number(),
18962
- processingTimeMs: exports_external.number().optional()
18963
- });
18964
- CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
18965
- PointSchema = exports_external.object({
18966
- x: exports_external.number(),
18967
- y: exports_external.number()
18968
- });
18969
- BoundingRegionSchema = exports_external.object({
18970
- polygon: exports_external.array(PointSchema).min(3),
18971
- unit: CoordinateUnitSchema,
18972
- pageIndex: exports_external.number()
18973
- });
18974
- PositionedTextSchema = exports_external.object({
18975
- text: exports_external.string(),
18976
- confidence: exports_external.number().min(0).max(1).optional(),
18977
- boundingRegion: BoundingRegionSchema.optional()
18978
- });
18979
- TableCellSchema = exports_external.object({
18980
- content: exports_external.string(),
18981
- rowIndex: exports_external.number(),
18982
- columnIndex: exports_external.number(),
18983
- rowSpan: exports_external.number().default(1),
18984
- columnSpan: exports_external.number().default(1),
18985
- boundingRegion: BoundingRegionSchema.optional()
18986
- });
18987
- ExtractedTableSchema = exports_external.object({
18988
- cells: exports_external.array(TableCellSchema),
18989
- rowCount: exports_external.number(),
18990
- columnCount: exports_external.number(),
18991
- boundingRegion: BoundingRegionSchema.optional()
18992
- });
18993
- LayoutElementTypeSchema = exports_external.enum([
18994
- "paragraph",
18995
- "title",
18996
- "sectionHeading",
18997
- "pageHeader",
18998
- "pageFooter",
18999
- "pageNumber",
19000
- "footnote",
19001
- "table",
19002
- "figure",
19003
- "formulaBlock"
19004
- ]);
19005
- LayoutElementSchema = exports_external.object({
19006
- type: LayoutElementTypeSchema,
19007
- content: exports_external.string(),
19008
- table: ExtractedTableSchema.optional(),
19009
- caption: exports_external.string().optional(),
19010
- figureId: exports_external.string().optional(),
19011
- boundingRegion: BoundingRegionSchema.optional()
19012
- });
19013
- PageResultSchema = exports_external.object({
19014
- pageIndex: exports_external.number().describe("0-based page index"),
19015
- text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
19016
- pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
19017
- layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
19018
- words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
19019
- lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
19020
- tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
19021
- width: exports_external.number().optional().describe("Page width"),
19022
- height: exports_external.number().optional().describe("Page height"),
19023
- unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
19024
- confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
19025
- });
19026
- ParseResultSchema = exports_external.object({
19027
- document: DocumentMetadataSchema,
19028
- usage: ParseUsageSchema,
19029
- pages: exports_external.array(PageResultSchema),
19030
- text: exports_external.string().describe("Combined text from all pages"),
19031
- parserType: ParserTypeSchema,
19032
- parserVersion: exports_external.string().optional(),
19033
- model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
19034
- rawResponse: exports_external.unknown().optional()
19035
- });
19036
- ParseOptionsSchema = exports_external.object({
19037
- outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
19038
- ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
19039
- includeWordPositions: exports_external.boolean().default(false),
19040
- includeLinePositions: exports_external.boolean().default(false),
19041
- extractTables: exports_external.boolean().default(true),
19042
- provider: exports_external.string().optional().describe("LLM provider ID to use"),
19043
- model: exports_external.string().optional(),
19044
- maxConcurrency: exports_external.number().min(1).max(30).default(3),
19045
- pagesPerBatch: exports_external.number().min(1).max(20).default(5),
19046
- prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
19047
- languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
19048
- tenantId: exports_external.string().optional()
19049
- });
19050
- ParserInputSchema = exports_external.object({
19051
- data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
19052
- filename: exports_external.string(),
19053
- mimeType: exports_external.string(),
19054
- options: ParseOptionsSchema.optional()
19055
- });
19056
- EXTENSION_TO_MIME = {
19057
- docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19058
- doc: "application/msword",
19059
- odt: "application/vnd.oasis.opendocument.text",
19060
- rtf: "application/rtf",
19061
- xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19062
- xls: "application/vnd.ms-excel",
19063
- xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
19064
- xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19065
- ods: "application/vnd.oasis.opendocument.spreadsheet",
19066
- pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19067
- ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19068
- pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19069
- ppt: "application/vnd.ms-powerpoint",
19070
- odp: "application/vnd.oasis.opendocument.presentation",
19071
- eml: "message/rfc822",
19072
- msg: "application/vnd.ms-outlook",
19073
- epub: "application/epub+zip",
19074
- pdf: "application/pdf",
19075
- png: "image/png",
19076
- jpg: "image/jpeg",
19077
- jpeg: "image/jpeg",
19078
- webp: "image/webp",
19079
- tiff: "image/tiff",
19080
- tif: "image/tiff",
19081
- gif: "image/gif",
19082
- bmp: "image/bmp",
19083
- svg: "image/svg+xml",
19084
- txt: "text/plain",
19085
- md: "text/markdown",
19086
- markdown: "text/markdown",
19087
- csv: "text/csv",
19088
- tsv: "text/tab-separated-values",
19089
- html: "text/html",
19090
- htm: "text/html",
19091
- xml: "text/xml",
19092
- json: "application/json",
19093
- yaml: "application/x-yaml",
19094
- yml: "application/x-yaml",
19095
- toml: "application/toml",
19096
- rst: "text/x-rst",
19097
- org: "text/x-org",
19098
- tex: "application/x-latex",
19099
- latex: "application/x-latex",
19100
- ipynb: "application/x-ipynb+json",
19101
- bib: "application/x-bibtex",
19102
- dbk: "application/docbook+xml",
19103
- docbook: "application/docbook+xml",
19104
- fb2: "application/x-fictionbook+xml"
19105
- };
19106
- MIME_TO_LABEL = {
19107
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
19108
- "application/msword": "DOC",
19109
- "application/vnd.oasis.opendocument.text": "ODT",
19110
- "application/rtf": "RTF",
19111
- "text/rtf": "RTF",
19112
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
19113
- "application/vnd.ms-excel": "XLS",
19114
- "application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
19115
- "application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
19116
- "application/vnd.oasis.opendocument.spreadsheet": "ODS",
19117
- "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
19118
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
19119
- "application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
19120
- "application/vnd.ms-powerpoint": "PPT",
19121
- "application/vnd.oasis.opendocument.presentation": "ODP",
19122
- "message/rfc822": "EML",
19123
- "application/vnd.ms-outlook": "MSG",
19124
- "application/epub+zip": "EPUB",
19125
- "application/pdf": "PDF",
19126
- "image/png": "PNG",
19127
- "image/jpeg": "JPEG",
19128
- "image/webp": "WebP",
19129
- "image/tiff": "TIFF",
19130
- "image/gif": "GIF",
19131
- "image/bmp": "BMP",
19132
- "image/svg+xml": "SVG",
19133
- "text/plain": "TXT",
19134
- "text/markdown": "Markdown",
19135
- "text/csv": "CSV",
19136
- "text/tab-separated-values": "TSV",
19137
- "text/html": "HTML",
19138
- "text/xml": "XML",
19139
- "application/json": "JSON",
19140
- "application/x-yaml": "YAML",
19141
- "application/toml": "TOML",
19142
- "text/x-rst": "RST",
19143
- "text/x-org": "Org",
19144
- "application/x-latex": "LaTeX",
19145
- "application/x-ipynb+json": "Jupyter",
19146
- "application/x-bibtex": "BibTeX",
19147
- "application/docbook+xml": "DocBook",
19148
- "application/x-fictionbook+xml": "FB2"
19149
- };
19150
- });
19151
-
19152
- // ../types/src/processor/configs/document-parser.ts
19153
- function isFilePathDescriptor(input) {
19154
- return FilePathDescriptorSchema.safeParse(input).success;
19155
- }
19156
- var FileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, FilePathDescriptorSchema, DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
19157
- var init_document_parser = __esm(() => {
19158
- init_zod();
19159
- init_parser();
19160
- FileIdInputSchema = exports_external.object({
19161
- fileId: exports_external.string().describe("File ID from files table"),
19162
- filename: exports_external.string().optional().describe("Original filename (for inline files)"),
19163
- mimeType: exports_external.string().optional().describe("MIME type (for inline files)")
19164
- });
19165
- LocalFileRefSchema = exports_external.object({
19166
- kind: exports_external.literal("local"),
19167
- path: exports_external.string().describe("Absolute path to a file on disk"),
19168
- filename: exports_external.string().describe("Original filename"),
19169
- mimeType: exports_external.string().describe("MIME type of the file")
19170
- });
19171
- S3FileRefSchema = exports_external.object({
19172
- kind: exports_external.literal("s3"),
19173
- ref: exports_external.string().describe("Storage key (suffix-only, prefix added by adapter)"),
19174
- filename: exports_external.string().describe("Original filename"),
19175
- mimeType: exports_external.string().describe("MIME type of the file")
19176
- });
19177
- InlineFileRefSchema = exports_external.object({
19178
- kind: exports_external.literal("inline"),
19179
- base64: exports_external.string().describe("Base64-encoded file bytes"),
19180
- filename: exports_external.string().describe("Original filename"),
19181
- mimeType: exports_external.string().describe("MIME type of the file")
19182
- });
19183
- FilePathDescriptorSchema = exports_external.discriminatedUnion("kind", [
19184
- LocalFileRefSchema,
19185
- S3FileRefSchema,
19186
- InlineFileRefSchema
19187
- ]);
19188
- DocumentParserInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
19189
- DocumentParserOutputSchema = ParseResultSchema;
19190
- DocumentParserConfigSchema = exports_external.object({
19191
- ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
19192
- llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
19193
- maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
19194
- pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
19195
- prompt: exports_external.string().optional().describe("Custom extraction prompt"),
19196
- nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
19197
- languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
19198
- 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.")
19199
- }).prefault({});
19200
- });
19201
-
19202
- // ../types/src/processor/configs/extract.ts
19203
- var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
19204
- var init_extract = __esm(() => {
19205
- init_zod();
19206
- ExtractInputSchema = exports_external.object({
19207
- content: exports_external.string().optional().describe("Text content to extract from"),
19208
- text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
19209
- contentType: exports_external.enum(["text", "image"]).default("text"),
19210
- imageData: exports_external.string().optional(),
19211
- imageMimeType: exports_external.string().optional()
19212
- }).refine((data) => data.content || data.text, {
19213
- message: "Either content or text must be provided"
19214
- });
19215
- ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
19216
- ExtractConfigSchema = exports_external.object({
19217
- schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
19218
- prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
19219
- provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
19220
- model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
19221
- maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
19222
- });
19223
- });
19224
-
19225
- // ../types/src/processor/configs/merge.ts
19226
- var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
19227
- var init_merge = __esm(() => {
19228
- init_zod();
19229
- MergeConfigSchema = exports_external.object({
19230
- preservePortNames: exports_external.boolean().default(true),
19231
- outputKey: exports_external.string().optional()
19232
- });
19233
- MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19234
- MergeOutputSchema = exports_external.object({
19235
- items: exports_external.array(exports_external.unknown()),
19236
- count: exports_external.number(),
19237
- merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
19238
- });
19239
- });
19240
-
19241
- // ../types/src/processor/configs/pdf-embedder.ts
19242
- var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
19243
- var init_pdf_embedder = __esm(() => {
19244
- init_zod();
19245
- init_parser();
19246
- PdfEmbedderInputSchema = exports_external.object({
19247
- fileId: exports_external.string().describe("File ID from files table"),
19248
- parseResult: exports_external.object({
19249
- pages: exports_external.array(PageResultSchema),
19250
- text: exports_external.string().optional()
19251
- }).describe("Parse result from ai.parse step (must include word positions)")
19252
- });
19253
- PdfEmbedderOutputSchema = exports_external.object({
19254
- fileId: exports_external.string().describe("File ID from files table"),
19255
- pageCount: exports_external.number().describe("Number of pages in the output PDF"),
19256
- wordCount: exports_external.number().describe("Number of words embedded"),
19257
- text: exports_external.string().describe("Extracted text (from parse step)")
19258
- });
19259
- PdfEmbedderConfigSchema = exports_external.object({
19260
- outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
19261
- 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")
19262
- }).prefault({});
19263
- });
19264
-
19265
- // ../types/src/processor/configs/split.ts
19266
- var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema, SplitOutputSchema;
19267
- var init_split = __esm(() => {
19268
- init_zod();
19269
- SplitInputSchema = exports_external.object({
19270
- pages: exports_external.array(exports_external.object({
19271
- pageIndex: exports_external.number().describe("0-based page index"),
19272
- text: exports_external.string().describe("Extracted text for this page"),
19273
- pageName: exports_external.string().optional()
19274
- })).min(1).describe("Per-page parsed content from a document parser")
19275
- }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19276
- SplitConfigSchema = exports_external.object({
19277
- sections: exports_external.array(exports_external.object({
19278
- name: exports_external.string().min(1).describe("Stable id for the section"),
19279
- 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."),
19280
- 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").'),
19281
- 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.')
19282
- })).min(1),
19283
- rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19284
- 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.'),
19285
- 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.")
19286
- });
19287
- 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.");
19288
- SplitOutputSchema = exports_external.object({
19289
- splits: exports_external.array(exports_external.object({
19290
- name: exports_external.string(),
19291
- page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19292
- confidence: ConfidenceLevelSchema.describe("LLM confidence at the start anchor: low | medium | high."),
19293
- notes: exports_external.string(),
19294
- evidence: exports_external.object({
19295
- start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
19296
- start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
19297
- }).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
19298
- end_evidence: exports_external.object({
19299
- end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
19300
- confidence: ConfidenceLevelSchema,
19301
- 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.")
19302
- }).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)."),
19303
- text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
19304
- pages: exports_external.array(exports_external.object({
19305
- pageIndex: exports_external.number().int(),
19306
- text: exports_external.string(),
19307
- pageName: exports_external.string().optional(),
19308
- source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
19309
- })).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."),
19310
- pages_anchored: exports_external.array(exports_external.number().int()),
19311
- pages_inferred: exports_external.array(exports_external.number().int())
19312
- }))
19313
- });
19314
- });
19315
-
19316
- // ../types/src/processor/configs/template.ts
19317
- var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
19318
- var init_template = __esm(() => {
19319
- init_zod();
19320
- TemplateInputSchema = exports_external.object({
19321
- data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
19322
- });
19323
- TemplateOutputSchema = exports_external.object({
19324
- fileId: exports_external.string().describe("File ID from files table")
19325
- });
19326
- TemplateConfigSchema = exports_external.object({
19327
- templateId: exports_external.string().describe("ID of the template from templates table"),
19328
- outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
19329
- highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
19330
- notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
19331
- });
19332
- });
19333
-
19334
- // ../types/src/processor/configs/xlsx-to-json.ts
19335
- var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
19336
- var init_xlsx_to_json = __esm(() => {
19337
- init_zod();
19338
- init_document_parser();
19339
- XlsxToJsonInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
19340
- XlsxToJsonOutputSchema = exports_external.object({
19341
- rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
19342
- fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
19343
- });
19344
- XlsxToJsonConfigSchema = exports_external.object({
19345
- sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
19346
- outputCsv: exports_external.boolean().default(false).optional(),
19347
- outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
19348
- });
19349
- });
19350
-
19351
- // ../types/src/processor/configs/react-hook-form.ts
19352
- function extractFieldMetadata(schema) {
19353
- const fields = [];
19354
- let inner = schema;
19355
- while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
19356
- inner = inner.unwrap();
19357
- }
19358
- if (inner instanceof exports_external.ZodObject) {
19359
- for (const [name, fieldSchema] of Object.entries(inner.shape)) {
19360
- fields.push(extractSingleFieldMetadata(name, fieldSchema));
19361
- }
19362
- }
19363
- return fields;
19364
- }
19365
- function extractSingleFieldMetadata(name, schema) {
19366
- let current = schema;
19367
- let required2 = true;
19368
- let defaultValue = undefined;
19369
- let description = current.description;
19370
- while (true) {
19371
- if (current instanceof exports_external.ZodOptional) {
19372
- required2 = false;
19373
- current = current.unwrap();
19374
- } else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
19375
- defaultValue = current._def.defaultValue;
19376
- current = current.unwrap();
19377
- } else {
19378
- break;
19379
- }
19380
- description ??= current.description;
19381
- }
19382
- const base = { name, type: "unknown", required: required2, description, defaultValue };
19383
- if (current instanceof exports_external.ZodString)
19384
- return { ...base, type: "string" };
19385
- if (current instanceof exports_external.ZodNumber) {
19386
- let min;
19387
- let max;
19388
- for (const c of current._def.checks ?? []) {
19389
- const def = c._zod.def;
19390
- if (def.check === "greater_than")
19391
- min = def.value;
19392
- if (def.check === "less_than")
19393
- max = def.value;
19394
- }
19395
- return { ...base, type: "number", min, max };
19396
- }
19397
- if (current instanceof exports_external.ZodBoolean)
19398
- return { ...base, type: "boolean" };
19399
- if (current instanceof exports_external.ZodEnum) {
19400
- return { ...base, type: "enum", enumValues: current.options };
19401
- }
19402
- if (current instanceof exports_external.ZodArray)
19403
- return { ...base, type: "array" };
19404
- if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
19405
- return { ...base, type: "object" };
19406
- }
19407
- return base;
19408
- }
19409
- function getConfigFieldMetadata(processorId) {
19410
- const schema = getConfigSchema(processorId);
19411
- if (!schema)
19412
- return;
19413
- return extractFieldMetadata(schema);
19414
- }
19415
- function getConfigDefaults(processorId) {
19416
- const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
19417
- if (!schema)
19418
- return {};
19419
- try {
19420
- const result = schema.safeParse({});
19421
- if (result.success) {
19422
- return result.data;
19423
- }
19424
- } catch {}
19425
- const fields = extractFieldMetadata(schema);
19426
- const defaults = {};
19427
- for (const field of fields) {
19428
- if (field.defaultValue !== undefined) {
19429
- defaults[field.name] = field.defaultValue;
19430
- }
19431
- }
19432
- return defaults;
19433
- }
19434
- function validateConfig(processorId, config2) {
19435
- const schema = getConfigSchema(processorId);
19436
- if (!schema) {
19437
- return { valid: true, errors: {} };
19438
- }
19439
- const result = schema.safeParse(config2);
19440
- if (result.success) {
19441
- return { valid: true, errors: {} };
19442
- }
19443
- const errors3 = {};
19444
- for (const issue2 of result.error.issues) {
19445
- const path = issue2.path.join(".");
19446
- errors3[path] = issue2.message;
19447
- }
19448
- return { valid: false, errors: errors3 };
19449
- }
19450
- var init_react_hook_form = __esm(() => {
19451
- init_zod();
19452
- init_configs();
19453
- });
19454
-
19455
- // ../types/src/processor/configs/index.ts
19456
- function getProcessorSchemas(processorId) {
19457
- return PROCESSOR_SCHEMAS[processorId];
19458
- }
19459
- function getConfigSchema(processorId) {
19460
- return PROCESSOR_SCHEMAS[processorId]?.configSchema;
19461
- }
19462
- function getAllProcessorJsonSchemas() {
19463
- return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
19464
- id: p.id,
19465
- inputSchema: toJsonSchema(p.inputSchema),
19466
- outputSchema: toJsonSchema(p.outputSchema),
19467
- configSchema: toJsonSchema(p.configSchema)
19468
- }));
19469
- }
19470
- function listProcessorIds() {
19471
- return Object.keys(PROCESSOR_SCHEMAS);
19472
- }
19473
- var PROCESSOR_SCHEMAS;
19474
- var init_configs = __esm(() => {
19475
- init_common();
19476
- init_ids();
19477
- init_classify();
19478
- init_document_parser();
19479
- init_extract();
19480
- init_merge();
19481
- init_pdf_embedder();
19482
- init_split();
19483
- init_template();
19484
- init_xlsx_to_json();
19485
- init_react_hook_form();
19486
- init_classify();
19487
- init_document_parser();
19488
- init_extract();
19489
- init_merge();
19490
- init_pdf_embedder();
19491
- init_split();
19492
- init_template();
19493
- init_xlsx_to_json();
19494
- PROCESSOR_SCHEMAS = {
19495
- [PROCESSOR_IDS.EXTRACT]: {
19496
- id: PROCESSOR_IDS.EXTRACT,
19497
- inputSchema: ExtractInputSchema,
19498
- outputSchema: ExtractOutputSchema,
19499
- configSchema: ExtractConfigSchema
19500
- },
19501
- [PROCESSOR_IDS.DOCUMENT_PARSER]: {
19502
- id: PROCESSOR_IDS.DOCUMENT_PARSER,
19503
- inputSchema: DocumentParserInputSchema,
19504
- outputSchema: DocumentParserOutputSchema,
19505
- configSchema: DocumentParserConfigSchema
19506
- },
19507
- [PROCESSOR_IDS.MERGE]: {
19508
- id: PROCESSOR_IDS.MERGE,
19509
- inputSchema: MergeInputSchema,
19510
- outputSchema: MergeOutputSchema,
19511
- configSchema: MergeConfigSchema
19512
- },
19513
- [PROCESSOR_IDS.TEMPLATE]: {
19514
- id: PROCESSOR_IDS.TEMPLATE,
19515
- inputSchema: TemplateInputSchema,
19516
- outputSchema: TemplateOutputSchema,
19517
- configSchema: TemplateConfigSchema
19518
- },
19519
- [PROCESSOR_IDS.PDF_EMBEDDER]: {
19520
- id: PROCESSOR_IDS.PDF_EMBEDDER,
19521
- inputSchema: PdfEmbedderInputSchema,
19522
- outputSchema: PdfEmbedderOutputSchema,
19523
- configSchema: PdfEmbedderConfigSchema
19524
- },
19525
- [PROCESSOR_IDS.SPLIT]: {
19526
- id: PROCESSOR_IDS.SPLIT,
19527
- inputSchema: SplitInputSchema,
19528
- outputSchema: SplitOutputSchema,
19529
- configSchema: SplitConfigSchema
19530
- },
19531
- [PROCESSOR_IDS.CLASSIFY]: {
19532
- id: PROCESSOR_IDS.CLASSIFY,
19533
- inputSchema: ClassifyInputSchema,
19534
- outputSchema: ClassifyOutputSchema,
19535
- configSchema: ClassifyConfigSchema
19536
- },
19537
- [PROCESSOR_IDS.XLSX_TO_JSON]: {
19538
- id: PROCESSOR_IDS.XLSX_TO_JSON,
19539
- inputSchema: XlsxToJsonInputSchema,
19540
- outputSchema: XlsxToJsonOutputSchema,
19541
- configSchema: XlsxToJsonConfigSchema
19542
- }
19543
- };
19544
- });
17084
+ var init_core3 = () => {};
19545
17085
 
19546
17086
  // ../types/src/processor/index.ts
19547
- var init_processor2 = __esm(() => {
19548
- init_processor();
19549
- init_execution();
19550
- init_configs();
19551
- });
17087
+ var init_processor = () => {};
19552
17088
 
19553
17089
  // ../types/src/parser/index.ts
19554
- var init_parser2 = __esm(() => {
19555
- init_parser();
19556
- });
17090
+ var init_parser = () => {};
19557
17091
 
19558
17092
  // ../types/src/otel/semantic-conventions.ts
19559
17093
  function mapLLMAttributes(attrs) {
@@ -22873,7 +20407,7 @@ var require_data = __commonJS((exports, module) => {
22873
20407
  });
22874
20408
 
22875
20409
  // ../../node_modules/fast-uri/lib/utils.js
22876
- var require_utils3 = __commonJS((exports, module) => {
20410
+ var require_utils = __commonJS((exports, module) => {
22877
20411
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
22878
20412
  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);
22879
20413
  function stringArrayToHexStripped(input) {
@@ -23129,7 +20663,7 @@ var require_utils3 = __commonJS((exports, module) => {
23129
20663
 
23130
20664
  // ../../node_modules/fast-uri/lib/schemes.js
23131
20665
  var require_schemes = __commonJS((exports, module) => {
23132
- var { isUUID } = require_utils3();
20666
+ var { isUUID } = require_utils();
23133
20667
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
23134
20668
  var supportedSchemeNames = [
23135
20669
  "http",
@@ -23303,7 +20837,7 @@ var require_schemes = __commonJS((exports, module) => {
23303
20837
 
23304
20838
  // ../../node_modules/fast-uri/index.js
23305
20839
  var require_fast_uri = __commonJS((exports, module) => {
23306
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
20840
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
23307
20841
  var { SCHEMES, getSchemeHandler } = require_schemes();
23308
20842
  function normalize(uri, options) {
23309
20843
  if (typeof uri === "string") {
@@ -25713,7 +23247,7 @@ var require_draft7 = __commonJS((exports) => {
25713
23247
  });
25714
23248
 
25715
23249
  // ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
25716
- var require_types2 = __commonJS((exports) => {
23250
+ var require_types = __commonJS((exports) => {
25717
23251
  Object.defineProperty(exports, "__esModule", { value: true });
25718
23252
  exports.DiscrError = undefined;
25719
23253
  var DiscrError;
@@ -25727,7 +23261,7 @@ var require_types2 = __commonJS((exports) => {
25727
23261
  var require_discriminator = __commonJS((exports) => {
25728
23262
  Object.defineProperty(exports, "__esModule", { value: true });
25729
23263
  var codegen_1 = require_codegen();
25730
- var types_1 = require_types2();
23264
+ var types_1 = require_types();
25731
23265
  var compile_1 = require_compile();
25732
23266
  var ref_error_1 = require_ref_error();
25733
23267
  var util_1 = require_util();
@@ -26346,6 +23880,9 @@ var init_ajv = __esm(() => {
26346
23880
  });
26347
23881
 
26348
23882
  // ../types/src/validation/input.ts
23883
+ function inputsWithSource(inputs) {
23884
+ return (inputs ?? []).filter((i) => Boolean(i.source));
23885
+ }
26349
23886
  function workflowInputsToJsonSchema(inputs) {
26350
23887
  const properties = {};
26351
23888
  const required2 = [];
@@ -26363,6 +23900,9 @@ function workflowInputsToJsonSchema(inputs) {
26363
23900
  return schema;
26364
23901
  }
26365
23902
  function workflowInputTypeToJsonSchema(def) {
23903
+ if (def.source && def.type === "file") {
23904
+ return { type: "string", minLength: 1 };
23905
+ }
26366
23906
  switch (def.type) {
26367
23907
  case "string":
26368
23908
  return { type: "string" };
@@ -26660,6 +24200,24 @@ var init_validation = __esm(() => {
26660
24200
  init_workspace_schema();
26661
24201
  });
26662
24202
 
24203
+ // ../types/src/core/common.ts
24204
+ function toJsonSchema2(schema) {
24205
+ return exports_external.toJSONSchema(schema, { target: "draft-7" });
24206
+ }
24207
+ var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
24208
+ var init_common = __esm(() => {
24209
+ init_zod();
24210
+ TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
24211
+ return typeof val === "string" ? new Date(val) : val;
24212
+ });
24213
+ JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
24214
+ BaseEntitySchema2 = exports_external.object({
24215
+ id: exports_external.string(),
24216
+ createdAt: TimestampSchema2.optional(),
24217
+ updatedAt: TimestampSchema2.optional()
24218
+ });
24219
+ });
24220
+
26663
24221
  // ../../node_modules/@babel/parser/lib/index.js
26664
24222
  var require_lib = __commonJS((exports) => {
26665
24223
  Object.defineProperty(exports, "__esModule", {
@@ -27073,12 +24631,12 @@ var require_lib = __commonJS((exports) => {
27073
24631
  }
27074
24632
  const ParseErrorConstructors = {};
27075
24633
  for (const reasonCode of Object.keys(argument)) {
27076
- const template2 = argument[reasonCode];
27077
- const _ref = typeof template2 === "string" ? {
27078
- message: () => template2
27079
- } : typeof template2 === "function" ? {
27080
- message: template2
27081
- } : template2, {
24634
+ const template = argument[reasonCode];
24635
+ const _ref = typeof template === "string" ? {
24636
+ message: () => template
24637
+ } : typeof template === "function" ? {
24638
+ message: template
24639
+ } : template, {
27082
24640
  message
27083
24641
  } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
27084
24642
  const toMessage = typeof message === "string" ? () => message : message;
@@ -41551,7 +39109,7 @@ var require_keywords = __commonJS((exports) => {
41551
39109
  });
41552
39110
 
41553
39111
  // ../../node_modules/sucrase/dist/parser/tokenizer/types.js
41554
- var require_types3 = __commonJS((exports) => {
39112
+ var require_types2 = __commonJS((exports) => {
41555
39113
  Object.defineProperty(exports, "__esModule", { value: true });
41556
39114
  var TokenType;
41557
39115
  (function(TokenType2) {
@@ -41615,8 +39173,8 @@ var require_types3 = __commonJS((exports) => {
41615
39173
  TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
41616
39174
  const arrow = 22528;
41617
39175
  TokenType2[TokenType2["arrow"] = arrow] = "arrow";
41618
- const template2 = 23552;
41619
- TokenType2[TokenType2["template"] = template2] = "template";
39176
+ const template = 23552;
39177
+ TokenType2[TokenType2["template"] = template] = "template";
41620
39178
  const ellipsis = 24576;
41621
39179
  TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
41622
39180
  const backQuote = 25600;
@@ -42035,7 +39593,7 @@ var require_types3 = __commonJS((exports) => {
42035
39593
  var require_state = __commonJS((exports) => {
42036
39594
  Object.defineProperty(exports, "__esModule", { value: true });
42037
39595
  var _keywords = require_keywords();
42038
- var _types = require_types3();
39596
+ var _types = require_types2();
42039
39597
 
42040
39598
  class Scope {
42041
39599
  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
@@ -42421,7 +39979,7 @@ var require_base = __commonJS((exports) => {
42421
39979
  var require_util2 = __commonJS((exports) => {
42422
39980
  Object.defineProperty(exports, "__esModule", { value: true });
42423
39981
  var _index = require_tokenizer();
42424
- var _types = require_types3();
39982
+ var _types = require_types2();
42425
39983
  var _charcodes = require_charcodes();
42426
39984
  var _base = require_base();
42427
39985
  function isContextual(contextualKeyword) {
@@ -42583,7 +40141,7 @@ var require_identifier = __commonJS((exports) => {
42583
40141
  var require_readWordTree = __commonJS((exports) => {
42584
40142
  Object.defineProperty(exports, "__esModule", { value: true });
42585
40143
  var _keywords = require_keywords();
42586
- var _types = require_types3();
40144
+ var _types = require_types2();
42587
40145
  var READ_WORD_TREE = new Int32Array([
42588
40146
  -1,
42589
40147
  27,
@@ -51561,7 +49119,7 @@ var require_readWord = __commonJS((exports) => {
51561
49119
  var _identifier = require_identifier();
51562
49120
  var _index = require_tokenizer();
51563
49121
  var _readWordTree = require_readWordTree();
51564
- var _types = require_types3();
49122
+ var _types = require_types2();
51565
49123
  function readWord() {
51566
49124
  let treePos = 0;
51567
49125
  let code = 0;
@@ -51627,7 +49185,7 @@ var require_tokenizer = __commonJS((exports) => {
51627
49185
  var _keywords = require_keywords();
51628
49186
  var _readWord = require_readWord();
51629
49187
  var _readWord2 = _interopRequireDefault(_readWord);
51630
- var _types = require_types3();
49188
+ var _types = require_types2();
51631
49189
  var IdentifierRole;
51632
49190
  (function(IdentifierRole2) {
51633
49191
  const Access = 0;
@@ -52344,7 +49902,7 @@ var require_tokenizer = __commonJS((exports) => {
52344
49902
  // ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
52345
49903
  var require_getImportExportSpecifierInfo = __commonJS((exports) => {
52346
49904
  Object.defineProperty(exports, "__esModule", { value: true });
52347
- var _types = require_types3();
49905
+ var _types = require_types2();
52348
49906
  function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
52349
49907
  let endIndex = index + 1;
52350
49908
  if (isSpecifierEnd(tokens, endIndex)) {
@@ -52697,7 +50255,7 @@ var require_JSXTransformer = __commonJS((exports) => {
52697
50255
  var _xhtml = require_xhtml();
52698
50256
  var _xhtml2 = _interopRequireDefault(_xhtml);
52699
50257
  var _tokenizer = require_tokenizer();
52700
- var _types = require_types3();
50258
+ var _types = require_types2();
52701
50259
  var _charcodes = require_charcodes();
52702
50260
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
52703
50261
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -53201,7 +50759,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
53201
50759
  return obj && obj.__esModule ? obj : { default: obj };
53202
50760
  }
53203
50761
  var _tokenizer = require_tokenizer();
53204
- var _types = require_types3();
50762
+ var _types = require_types2();
53205
50763
  var _JSXTransformer = require_JSXTransformer();
53206
50764
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
53207
50765
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -53240,7 +50798,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
53240
50798
  }
53241
50799
  var _tokenizer = require_tokenizer();
53242
50800
  var _keywords = require_keywords();
53243
- var _types = require_types3();
50801
+ var _types = require_types2();
53244
50802
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
53245
50803
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
53246
50804
  var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
@@ -55275,7 +52833,7 @@ var require_HelperManager = __commonJS((exports) => {
55275
52833
  var require_identifyShadowedGlobals = __commonJS((exports) => {
55276
52834
  Object.defineProperty(exports, "__esModule", { value: true });
55277
52835
  var _tokenizer = require_tokenizer();
55278
- var _types = require_types3();
52836
+ var _types = require_types2();
55279
52837
  function identifyShadowedGlobals(tokens, scopes, globalNames) {
55280
52838
  if (!hasShadowedGlobals(tokens, globalNames)) {
55281
52839
  return;
@@ -55340,7 +52898,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
55340
52898
  // ../../node_modules/sucrase/dist/util/getIdentifierNames.js
55341
52899
  var require_getIdentifierNames = __commonJS((exports) => {
55342
52900
  Object.defineProperty(exports, "__esModule", { value: true });
55343
- var _types = require_types3();
52901
+ var _types = require_types2();
55344
52902
  function getIdentifierNames(code, tokens) {
55345
52903
  const names = [];
55346
52904
  for (const token of tokens) {
@@ -55516,7 +53074,7 @@ var require_util3 = __commonJS((exports) => {
55516
53074
  });
55517
53075
 
55518
53076
  // ../../node_modules/ts-interface-checker/dist/types.js
55519
- var require_types4 = __commonJS((exports) => {
53077
+ var require_types3 = __commonJS((exports) => {
55520
53078
  var __extends = exports && exports.__extends || function() {
55521
53079
  var extendStatics = function(d, b) {
55522
53080
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -56116,9 +53674,9 @@ var require_dist2 = __commonJS((exports) => {
56116
53674
  };
56117
53675
  Object.defineProperty(exports, "__esModule", { value: true });
56118
53676
  exports.Checker = exports.createCheckers = undefined;
56119
- var types_1 = require_types4();
53677
+ var types_1 = require_types3();
56120
53678
  var util_1 = require_util3();
56121
- var types_2 = require_types4();
53679
+ var types_2 = require_types3();
56122
53680
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
56123
53681
  return types_2.TArray;
56124
53682
  } });
@@ -56400,7 +53958,7 @@ var require_lval = __commonJS((exports) => {
56400
53958
  var _typescript = require_typescript();
56401
53959
  var _index = require_tokenizer();
56402
53960
  var _keywords = require_keywords();
56403
- var _types = require_types3();
53961
+ var _types = require_types2();
56404
53962
  var _base = require_base();
56405
53963
  var _expression = require_expression();
56406
53964
  var _util = require_util2();
@@ -56532,7 +54090,7 @@ var require_typescript = __commonJS((exports) => {
56532
54090
  Object.defineProperty(exports, "__esModule", { value: true });
56533
54091
  var _index = require_tokenizer();
56534
54092
  var _keywords = require_keywords();
56535
- var _types = require_types3();
54093
+ var _types = require_types2();
56536
54094
  var _base = require_base();
56537
54095
  var _expression = require_expression();
56538
54096
  var _lval = require_lval();
@@ -57794,7 +55352,7 @@ var require_typescript = __commonJS((exports) => {
57794
55352
  var require_jsx = __commonJS((exports) => {
57795
55353
  Object.defineProperty(exports, "__esModule", { value: true });
57796
55354
  var _index = require_tokenizer();
57797
- var _types = require_types3();
55355
+ var _types = require_types2();
57798
55356
  var _base = require_base();
57799
55357
  var _expression = require_expression();
57800
55358
  var _util = require_util2();
@@ -58057,10 +55615,10 @@ var require_jsx = __commonJS((exports) => {
58057
55615
  });
58058
55616
 
58059
55617
  // ../../node_modules/sucrase/dist/parser/plugins/types.js
58060
- var require_types5 = __commonJS((exports) => {
55618
+ var require_types4 = __commonJS((exports) => {
58061
55619
  Object.defineProperty(exports, "__esModule", { value: true });
58062
55620
  var _index = require_tokenizer();
58063
- var _types = require_types3();
55621
+ var _types = require_types2();
58064
55622
  var _base = require_base();
58065
55623
  var _expression = require_expression();
58066
55624
  var _flow = require_flow();
@@ -58093,12 +55651,12 @@ var require_expression = __commonJS((exports) => {
58093
55651
  Object.defineProperty(exports, "__esModule", { value: true });
58094
55652
  var _flow = require_flow();
58095
55653
  var _index = require_jsx();
58096
- var _types = require_types5();
55654
+ var _types = require_types4();
58097
55655
  var _typescript = require_typescript();
58098
55656
  var _index3 = require_tokenizer();
58099
55657
  var _keywords = require_keywords();
58100
55658
  var _state = require_state();
58101
- var _types3 = require_types3();
55659
+ var _types3 = require_types2();
58102
55660
  var _charcodes = require_charcodes();
58103
55661
  var _identifier = require_identifier();
58104
55662
  var _base = require_base();
@@ -58814,7 +56372,7 @@ var require_flow = __commonJS((exports) => {
58814
56372
  Object.defineProperty(exports, "__esModule", { value: true });
58815
56373
  var _index = require_tokenizer();
58816
56374
  var _keywords = require_keywords();
58817
- var _types = require_types3();
56375
+ var _types = require_types2();
58818
56376
  var _base = require_base();
58819
56377
  var _expression = require_expression();
58820
56378
  var _statement = require_statement();
@@ -59689,7 +57247,7 @@ var require_statement = __commonJS((exports) => {
59689
57247
  var _tokenizer = require_tokenizer();
59690
57248
  var _keywords = require_keywords();
59691
57249
  var _state = require_state();
59692
- var _types = require_types3();
57250
+ var _types = require_types2();
59693
57251
  var _charcodes = require_charcodes();
59694
57252
  var _base = require_base();
59695
57253
  var _expression = require_expression();
@@ -60724,7 +58282,7 @@ var require_TokenProcessor = __commonJS((exports) => {
60724
58282
  function _interopRequireDefault(obj) {
60725
58283
  return obj && obj.__esModule ? obj : { default: obj };
60726
58284
  }
60727
- var _types = require_types3();
58285
+ var _types = require_types2();
60728
58286
  var _isAsyncOperation = require_isAsyncOperation();
60729
58287
  var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
60730
58288
 
@@ -60982,7 +58540,7 @@ var require_TokenProcessor = __commonJS((exports) => {
60982
58540
  var require_getClassInfo = __commonJS((exports) => {
60983
58541
  Object.defineProperty(exports, "__esModule", { value: true });
60984
58542
  var _keywords = require_keywords();
60985
- var _types = require_types3();
58543
+ var _types = require_types2();
60986
58544
  function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
60987
58545
  const snapshot = tokens.snapshot();
60988
58546
  const headerInfo = processClassHeader(tokens);
@@ -61220,7 +58778,7 @@ var require_getClassInfo = __commonJS((exports) => {
61220
58778
  // ../../node_modules/sucrase/dist/util/elideImportEquals.js
61221
58779
  var require_elideImportEquals = __commonJS((exports) => {
61222
58780
  Object.defineProperty(exports, "__esModule", { value: true });
61223
- var _types = require_types3();
58781
+ var _types = require_types2();
61224
58782
  function elideImportEquals(tokens) {
61225
58783
  tokens.removeInitialToken();
61226
58784
  tokens.removeToken();
@@ -61244,7 +58802,7 @@ var require_elideImportEquals = __commonJS((exports) => {
61244
58802
  var require_getDeclarationInfo = __commonJS((exports) => {
61245
58803
  Object.defineProperty(exports, "__esModule", { value: true });
61246
58804
  var _tokenizer = require_tokenizer();
61247
- var _types = require_types3();
58805
+ var _types = require_types2();
61248
58806
  var EMPTY_DECLARATION_INFO = {
61249
58807
  typeDeclarations: new Set,
61250
58808
  valueDeclarations: new Set
@@ -61272,7 +58830,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
61272
58830
  var require_isExportFrom = __commonJS((exports) => {
61273
58831
  Object.defineProperty(exports, "__esModule", { value: true });
61274
58832
  var _keywords = require_keywords();
61275
- var _types = require_types3();
58833
+ var _types = require_types2();
61276
58834
  function isExportFrom(tokens) {
61277
58835
  let closeBraceIndex = tokens.currentIndex();
61278
58836
  while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
@@ -61287,7 +58845,7 @@ var require_isExportFrom = __commonJS((exports) => {
61287
58845
  var require_removeMaybeImportAttributes = __commonJS((exports) => {
61288
58846
  Object.defineProperty(exports, "__esModule", { value: true });
61289
58847
  var _keywords = require_keywords();
61290
- var _types = require_types3();
58848
+ var _types = require_types2();
61291
58849
  function removeMaybeImportAttributes(tokens) {
61292
58850
  if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
61293
58851
  tokens.removeToken();
@@ -61302,7 +58860,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
61302
58860
  // ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
61303
58861
  var require_shouldElideDefaultExport = __commonJS((exports) => {
61304
58862
  Object.defineProperty(exports, "__esModule", { value: true });
61305
- var _types = require_types3();
58863
+ var _types = require_types2();
61306
58864
  function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
61307
58865
  if (!isTypeScriptTransformEnabled || keepUnusedImports) {
61308
58866
  return false;
@@ -61333,7 +58891,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
61333
58891
  }
61334
58892
  var _tokenizer = require_tokenizer();
61335
58893
  var _keywords = require_keywords();
61336
- var _types = require_types3();
58894
+ var _types = require_types2();
61337
58895
  var _elideImportEquals = require_elideImportEquals();
61338
58896
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
61339
58897
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -61975,7 +59533,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
61975
59533
  return obj && obj.__esModule ? obj : { default: obj };
61976
59534
  }
61977
59535
  var _keywords = require_keywords();
61978
- var _types = require_types3();
59536
+ var _types = require_types2();
61979
59537
  var _elideImportEquals = require_elideImportEquals();
61980
59538
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
61981
59539
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -62245,7 +59803,7 @@ var require_FlowTransformer = __commonJS((exports) => {
62245
59803
  return obj && obj.__esModule ? obj : { default: obj };
62246
59804
  }
62247
59805
  var _keywords = require_keywords();
62248
- var _types = require_types3();
59806
+ var _types = require_types2();
62249
59807
  var _Transformer = require_Transformer();
62250
59808
  var _Transformer2 = _interopRequireDefault(_Transformer);
62251
59809
 
@@ -62365,7 +59923,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
62365
59923
  }
62366
59924
  return value;
62367
59925
  }
62368
- var _types = require_types3();
59926
+ var _types = require_types2();
62369
59927
  var _Transformer = require_Transformer();
62370
59928
  var _Transformer2 = _interopRequireDefault(_Transformer);
62371
59929
  var JEST_GLOBAL_NAME = "jest";
@@ -62439,7 +59997,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
62439
59997
  function _interopRequireDefault(obj) {
62440
59998
  return obj && obj.__esModule ? obj : { default: obj };
62441
59999
  }
62442
- var _types = require_types3();
60000
+ var _types = require_types2();
62443
60001
  var _Transformer = require_Transformer();
62444
60002
  var _Transformer2 = _interopRequireDefault(_Transformer);
62445
60003
 
@@ -62468,7 +60026,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
62468
60026
  function _interopRequireDefault(obj) {
62469
60027
  return obj && obj.__esModule ? obj : { default: obj };
62470
60028
  }
62471
- var _types = require_types3();
60029
+ var _types = require_types2();
62472
60030
  var _Transformer = require_Transformer();
62473
60031
  var _Transformer2 = _interopRequireDefault(_Transformer);
62474
60032
 
@@ -62496,7 +60054,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
62496
60054
  function _interopRequireDefault(obj) {
62497
60055
  return obj && obj.__esModule ? obj : { default: obj };
62498
60056
  }
62499
- var _types = require_types3();
60057
+ var _types = require_types2();
62500
60058
  var _Transformer = require_Transformer();
62501
60059
  var _Transformer2 = _interopRequireDefault(_Transformer);
62502
60060
 
@@ -62612,7 +60170,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
62612
60170
  return obj && obj.__esModule ? obj : { default: obj };
62613
60171
  }
62614
60172
  var _tokenizer = require_tokenizer();
62615
- var _types = require_types3();
60173
+ var _types = require_types2();
62616
60174
  var _Transformer = require_Transformer();
62617
60175
  var _Transformer2 = _interopRequireDefault(_Transformer);
62618
60176
 
@@ -62863,7 +60421,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
62863
60421
  function _interopRequireDefault(obj) {
62864
60422
  return obj && obj.__esModule ? obj : { default: obj };
62865
60423
  }
62866
- var _types = require_types3();
60424
+ var _types = require_types2();
62867
60425
  var _isIdentifier = require_isIdentifier();
62868
60426
  var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
62869
60427
  var _Transformer = require_Transformer();
@@ -63009,7 +60567,7 @@ var require_RootTransformer = __commonJS((exports) => {
63009
60567
  return obj && obj.__esModule ? obj : { default: obj };
63010
60568
  }
63011
60569
  var _keywords = require_keywords();
63012
- var _types = require_types3();
60570
+ var _types = require_types2();
63013
60571
  var _getClassInfo = require_getClassInfo();
63014
60572
  var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
63015
60573
  var _CJSImportTransformer = require_CJSImportTransformer();
@@ -63408,7 +60966,7 @@ var require_formatTokens = __commonJS((exports) => {
63408
60966
  }
63409
60967
  var _linesandcolumns = require_build();
63410
60968
  var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
63411
- var _types = require_types3();
60969
+ var _types = require_types2();
63412
60970
  function formatTokens(code, tokens) {
63413
60971
  if (tokens.length === 0) {
63414
60972
  return "";
@@ -63473,7 +61031,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
63473
61031
  function _interopRequireDefault(obj) {
63474
61032
  return obj && obj.__esModule ? obj : { default: obj };
63475
61033
  }
63476
- var _types = require_types3();
61034
+ var _types = require_types2();
63477
61035
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
63478
61036
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
63479
61037
  function getTSImportedNames(tokens) {
@@ -63858,7 +61416,7 @@ function describeUnsupportedType(nodeType) {
63858
61416
  function compileTypedScript(opts) {
63859
61417
  let ast;
63860
61418
  try {
63861
- ast = import_parser4.parse(opts.source, {
61419
+ ast = import_parser2.parse(opts.source, {
63862
61420
  sourceType: "script",
63863
61421
  plugins: ["typescript"],
63864
61422
  ranges: true
@@ -64110,9 +61668,9 @@ function stripCommentsAndStrings(s) {
64110
61668
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
64111
61669
  return out;
64112
61670
  }
64113
- var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
61671
+ var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
64114
61672
  var init_compile = __esm(() => {
64115
- import_parser4 = __toESM(require_lib(), 1);
61673
+ import_parser2 = __toESM(require_lib(), 1);
64116
61674
  import_sucrase = __toESM(require_dist3(), 1);
64117
61675
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
64118
61676
  });
@@ -64326,8 +61884,8 @@ function getAllStepJsonSchemas() {
64326
61884
  category: def.category,
64327
61885
  name: def.name,
64328
61886
  description: def.description,
64329
- configSchema: toJsonSchema(def.configSchema),
64330
- outputSchema: toJsonSchema(def.outputSchema),
61887
+ configSchema: toJsonSchema2(def.configSchema),
61888
+ outputSchema: toJsonSchema2(def.outputSchema),
64331
61889
  configInWith: def.configInWith
64332
61890
  }));
64333
61891
  }
@@ -64973,6 +62531,81 @@ var init_actions = __esm(() => {
64973
62531
  ACTION_TYPES = ActionTypeSchema.options;
64974
62532
  });
64975
62533
 
62534
+ // ../types/src/processor/execution.ts
62535
+ function asTuple(values) {
62536
+ return values;
62537
+ }
62538
+ var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
62539
+ var init_execution = __esm(() => {
62540
+ init_zod();
62541
+ WorkflowExecutionStatusValue2 = {
62542
+ CREATED: "created",
62543
+ PENDING: "pending",
62544
+ RUNNING: "running",
62545
+ WAITING: "waiting",
62546
+ COMPLETED: "completed",
62547
+ FAILED: "failed",
62548
+ CANCELLED: "cancelled"
62549
+ };
62550
+ WorkflowExecutionStatusSchema2 = exports_external.enum([
62551
+ WorkflowExecutionStatusValue2.CREATED,
62552
+ WorkflowExecutionStatusValue2.PENDING,
62553
+ WorkflowExecutionStatusValue2.RUNNING,
62554
+ WorkflowExecutionStatusValue2.WAITING,
62555
+ WorkflowExecutionStatusValue2.COMPLETED,
62556
+ WorkflowExecutionStatusValue2.FAILED,
62557
+ WorkflowExecutionStatusValue2.CANCELLED
62558
+ ]);
62559
+ StepExecutionStatusValue2 = {
62560
+ PENDING: "pending",
62561
+ RUNNING: "running",
62562
+ SUCCESS: "success",
62563
+ FAILURE: "failure",
62564
+ WAITING: "waiting",
62565
+ SKIPPED: "skipped"
62566
+ };
62567
+ StepExecutionStatusSchema2 = exports_external.enum([
62568
+ StepExecutionStatusValue2.PENDING,
62569
+ StepExecutionStatusValue2.RUNNING,
62570
+ StepExecutionStatusValue2.SUCCESS,
62571
+ StepExecutionStatusValue2.FAILURE,
62572
+ StepExecutionStatusValue2.WAITING,
62573
+ StepExecutionStatusValue2.SKIPPED
62574
+ ]);
62575
+ TriggerTypeValue2 = {
62576
+ MANUAL: "manual",
62577
+ API: "api",
62578
+ WEBHOOK: "webhook",
62579
+ SCHEDULE: "schedule",
62580
+ EMAIL: "email",
62581
+ EVAL: "eval",
62582
+ CLI: "cli"
62583
+ };
62584
+ TriggerTypeSchema2 = exports_external.enum([
62585
+ TriggerTypeValue2.MANUAL,
62586
+ TriggerTypeValue2.API,
62587
+ TriggerTypeValue2.WEBHOOK,
62588
+ TriggerTypeValue2.SCHEDULE,
62589
+ TriggerTypeValue2.EMAIL,
62590
+ TriggerTypeValue2.EVAL,
62591
+ TriggerTypeValue2.CLI
62592
+ ]);
62593
+ ExecutionTypeValue2 = {
62594
+ PROD: "prod",
62595
+ EVAL: "eval",
62596
+ PLAYGROUND: "playground"
62597
+ };
62598
+ ExecutionTypeSchema2 = exports_external.enum([
62599
+ ExecutionTypeValue2.PROD,
62600
+ ExecutionTypeValue2.EVAL,
62601
+ ExecutionTypeValue2.PLAYGROUND
62602
+ ]);
62603
+ WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
62604
+ STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
62605
+ TRIGGER_TYPES2 = TriggerTypeSchema2.options;
62606
+ EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
62607
+ });
62608
+
64976
62609
  // ../types/src/workflow/workflow.ts
64977
62610
  function suggestWorkflowName(raw) {
64978
62611
  return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
@@ -65008,16 +62641,56 @@ var init_workflow = __esm(() => {
65008
62641
  items: exports_external.object({
65009
62642
  type: exports_external.string(),
65010
62643
  values: exports_external.array(exports_external.string()).optional()
65011
- }).optional()
62644
+ }).optional(),
62645
+ source: exports_external.string().min(1).optional(),
62646
+ mimeType: exports_external.string().min(1).optional(),
62647
+ extension: exports_external.string().min(1).optional()
62648
+ }).superRefine((def, ctx) => {
62649
+ if (def.source && def.type !== "file") {
62650
+ ctx.addIssue({
62651
+ code: exports_external.ZodIssueCode.custom,
62652
+ path: ["source"],
62653
+ message: `"source" is only valid on a file input; input "${def.name}" has type "${def.type}"`
62654
+ });
62655
+ }
62656
+ const hasHint = def.mimeType !== undefined || def.extension !== undefined;
62657
+ if (hasHint && !(def.type === "file" && def.source)) {
62658
+ ctx.addIssue({
62659
+ code: exports_external.ZodIssueCode.custom,
62660
+ path: [def.mimeType !== undefined ? "mimeType" : "extension"],
62661
+ message: `"mimeType"/"extension" hints are only valid on a file input with a "source"; input "${def.name}" is not.`
62662
+ });
62663
+ }
62664
+ if (def.mimeType !== undefined && def.extension !== undefined) {
62665
+ ctx.addIssue({
62666
+ code: exports_external.ZodIssueCode.custom,
62667
+ path: ["extension"],
62668
+ message: `Set at most one of "mimeType" or "extension" on input "${def.name}".`
62669
+ });
62670
+ }
62671
+ if (def.mimeType !== undefined && !/^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(def.mimeType.trim())) {
62672
+ ctx.addIssue({
62673
+ code: exports_external.ZodIssueCode.custom,
62674
+ path: ["mimeType"],
62675
+ message: `"mimeType" on input "${def.name}" must look like "application/pdf".`
62676
+ });
62677
+ }
62678
+ if (def.extension !== undefined && !/^\.?[a-z0-9]+$/i.test(def.extension.trim())) {
62679
+ ctx.addIssue({
62680
+ code: exports_external.ZodIssueCode.custom,
62681
+ path: ["extension"],
62682
+ message: `"extension" on input "${def.name}" must be a bare extension like "pdf".`
62683
+ });
62684
+ }
65012
62685
  });
65013
62686
  ManualTriggerMethodSchema = exports_external.object({
65014
62687
  type: exports_external.literal("manual"),
65015
62688
  enabled: exports_external.boolean().optional(),
65016
- inputSchema: JsonSchemaSchema.optional()
62689
+ inputSchema: JsonSchemaSchema2.optional()
65017
62690
  });
65018
62691
  ApiTriggerMethodSchema = exports_external.object({
65019
62692
  type: exports_external.literal("api"),
65020
- inputSchema: JsonSchemaSchema.optional()
62693
+ inputSchema: JsonSchemaSchema2.optional()
65021
62694
  });
65022
62695
  EmailTriggerMethodSchema = exports_external.object({
65023
62696
  type: exports_external.literal("email"),
@@ -65056,8 +62729,8 @@ var init_workflow = __esm(() => {
65056
62729
  yamlContent: exports_external.string(),
65057
62730
  definition: WorkflowDefinitionSchema,
65058
62731
  isCurrent: exports_external.boolean().default(true),
65059
- createdAt: TimestampSchema,
65060
- updatedAt: TimestampSchema.optional(),
62732
+ createdAt: TimestampSchema2,
62733
+ updatedAt: TimestampSchema2.optional(),
65061
62734
  createdBy: exports_external.string()
65062
62735
  });
65063
62736
  CreateWorkflowDefinitionSchema = exports_external.object({
@@ -65239,14 +62912,14 @@ function isFileOutput(value) {
65239
62912
  function isWorkflowResult(value) {
65240
62913
  return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
65241
62914
  }
65242
- var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
62915
+ var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
65243
62916
  var init_execution2 = __esm(() => {
65244
62917
  init_zod();
65245
62918
  init_common();
65246
62919
  init_execution();
65247
62920
  init_workflow();
65248
- WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
65249
- StepExecutionStatusSchema2 = StepExecutionStatusSchema;
62921
+ WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
62922
+ StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
65250
62923
  ScopeEntryTypeSchema = exports_external.enum([
65251
62924
  "root",
65252
62925
  "if-then",
@@ -65268,7 +62941,7 @@ var init_execution2 = __esm(() => {
65268
62941
  ScopeStackSchema = exports_external.array(ScopeEntrySchema);
65269
62942
  StepResultSchema = exports_external.object({
65270
62943
  output: exports_external.unknown(),
65271
- status: StepExecutionStatusSchema2
62944
+ status: StepExecutionStatusSchema3
65272
62945
  });
65273
62946
  ExecutionContextSchema = exports_external.object({
65274
62947
  input: exports_external.record(exports_external.string(), exports_external.unknown()),
@@ -65296,7 +62969,7 @@ var init_execution2 = __esm(() => {
65296
62969
  triggerType: exports_external.string(),
65297
62970
  triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
65298
62971
  overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
65299
- status: WorkflowExecutionStatusSchema2,
62972
+ status: WorkflowExecutionStatusSchema3,
65300
62973
  scopeStack: ScopeStackSchema,
65301
62974
  currentStepIndex: exports_external.number(),
65302
62975
  stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
@@ -65304,15 +62977,15 @@ var init_execution2 = __esm(() => {
65304
62977
  error: exports_external.string().nullable(),
65305
62978
  priority: exports_external.number().default(50),
65306
62979
  leaseId: exports_external.string().nullable(),
65307
- leaseExpiresAt: TimestampSchema.nullable(),
62980
+ leaseExpiresAt: TimestampSchema2.nullable(),
65308
62981
  workerId: exports_external.string().nullable(),
65309
62982
  maxRetries: exports_external.number().default(0),
65310
62983
  originalExecutionId: exports_external.string().nullable().optional(),
65311
62984
  previousExecutionId: exports_external.string().nullable().optional(),
65312
62985
  retryNumber: exports_external.number().default(0),
65313
- createdAt: TimestampSchema,
65314
- startedAt: TimestampSchema.nullable(),
65315
- completedAt: TimestampSchema.nullable(),
62986
+ createdAt: TimestampSchema2,
62987
+ startedAt: TimestampSchema2.nullable(),
62988
+ completedAt: TimestampSchema2.nullable(),
65316
62989
  createdBy: exports_external.string().nullable()
65317
62990
  });
65318
62991
  StepExecutionSchema = exports_external.object({
@@ -65329,12 +63002,12 @@ var init_execution2 = __esm(() => {
65329
63002
  stepAttempt: exports_external.number().default(0),
65330
63003
  inputData: exports_external.unknown().nullable(),
65331
63004
  outputData: exports_external.unknown().nullable(),
65332
- status: StepExecutionStatusSchema2,
63005
+ status: StepExecutionStatusSchema3,
65333
63006
  error: exports_external.string().nullable(),
65334
63007
  overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
65335
63008
  durationMs: exports_external.number().nullable(),
65336
- startedAt: TimestampSchema.nullable(),
65337
- completedAt: TimestampSchema.nullable()
63009
+ startedAt: TimestampSchema2.nullable(),
63010
+ completedAt: TimestampSchema2.nullable()
65338
63011
  });
65339
63012
  ConnectorSchema = exports_external.object({
65340
63013
  id: exports_external.string(),
@@ -65345,8 +63018,8 @@ var init_execution2 = __esm(() => {
65345
63018
  config: exports_external.record(exports_external.string(), exports_external.unknown()),
65346
63019
  inputSchema: exports_external.unknown().optional(),
65347
63020
  outputSchema: exports_external.unknown().optional(),
65348
- createdAt: TimestampSchema,
65349
- updatedAt: TimestampSchema.optional(),
63021
+ createdAt: TimestampSchema2,
63022
+ updatedAt: TimestampSchema2.optional(),
65350
63023
  createdBy: exports_external.string()
65351
63024
  });
65352
63025
  WorkflowFileOutputSchema = exports_external.object({
@@ -65371,6 +63044,121 @@ var init_workflow2 = __esm(() => {
65371
63044
  init_execution2();
65372
63045
  });
65373
63046
 
63047
+ // ../types/src/file-source/descriptor.ts
63048
+ function getBuiltinFileSourceDescriptor(name) {
63049
+ return BUILTIN_FILE_SOURCE_DESCRIPTORS.find((d) => d.name === name);
63050
+ }
63051
+ function validateFileSourceConfig(descriptor, raw) {
63052
+ const value = {};
63053
+ const errors3 = [];
63054
+ for (const field of descriptor.configFields) {
63055
+ const provided = raw[field.key];
63056
+ const isEmpty = provided === undefined || provided === null || provided === "";
63057
+ if (isEmpty) {
63058
+ if (field.default !== undefined) {
63059
+ value[field.key] = field.default;
63060
+ } else if (field.required) {
63061
+ errors3.push({ key: field.key, message: `${field.label} is required` });
63062
+ }
63063
+ continue;
63064
+ }
63065
+ switch (field.type) {
63066
+ case "number": {
63067
+ const n = typeof provided === "number" ? provided : Number(provided);
63068
+ if (!Number.isFinite(n)) {
63069
+ errors3.push({ key: field.key, message: `${field.label} must be a number` });
63070
+ } else {
63071
+ value[field.key] = n;
63072
+ }
63073
+ break;
63074
+ }
63075
+ case "boolean": {
63076
+ value[field.key] = typeof provided === "boolean" ? provided : provided === "true" || provided === "1";
63077
+ break;
63078
+ }
63079
+ case "string":
63080
+ case "secret": {
63081
+ value[field.key] = String(provided);
63082
+ break;
63083
+ }
63084
+ }
63085
+ }
63086
+ return { ok: errors3.length === 0, value, errors: errors3 };
63087
+ }
63088
+ function redactFileSourceSecrets(descriptor, config2) {
63089
+ const secretKeys = new Set(descriptor.configFields.filter((f) => f.type === "secret").map((f) => f.key));
63090
+ const out = {};
63091
+ for (const [key, val] of Object.entries(config2)) {
63092
+ if (!secretKeys.has(key))
63093
+ out[key] = val;
63094
+ }
63095
+ for (const key of secretKeys) {
63096
+ const val = config2[key];
63097
+ out[key] = val !== undefined && val !== null && val !== "";
63098
+ }
63099
+ return out;
63100
+ }
63101
+ var GPFS_FILE_SOURCE_NAME = "gpfs", GPFS_FILE_SOURCE_DESCRIPTOR, BUILTIN_FILE_SOURCE_DESCRIPTORS;
63102
+ var init_descriptor = __esm(() => {
63103
+ GPFS_FILE_SOURCE_DESCRIPTOR = {
63104
+ name: GPFS_FILE_SOURCE_NAME,
63105
+ label: "GPFS file registry",
63106
+ description: "Fetch documents by id from a GPFS/GFR HTTP file registry.",
63107
+ configFields: [
63108
+ {
63109
+ key: "baseUrl",
63110
+ label: "Base URL",
63111
+ type: "string",
63112
+ required: true,
63113
+ description: "Base URL of the registry. The file id is appended to fetch each file.",
63114
+ placeholder: "https://files.example.com/registry"
63115
+ },
63116
+ {
63117
+ key: "authToken",
63118
+ label: "Bearer token",
63119
+ type: "secret",
63120
+ required: false,
63121
+ description: "Bearer token for the registry, if it requires one."
63122
+ },
63123
+ {
63124
+ key: "insecureSkipTlsVerify",
63125
+ label: "Skip TLS verification",
63126
+ type: "boolean",
63127
+ required: false,
63128
+ description: "Only for registries with self-signed or legacy certificates.",
63129
+ default: false,
63130
+ advanced: true
63131
+ },
63132
+ {
63133
+ key: "timeoutMs",
63134
+ label: "Timeout (ms)",
63135
+ type: "number",
63136
+ required: false,
63137
+ description: "How long to wait for the registry before giving up.",
63138
+ default: 30000,
63139
+ advanced: true
63140
+ },
63141
+ {
63142
+ key: "maxFileBytes",
63143
+ label: "Max file size (bytes)",
63144
+ type: "number",
63145
+ required: false,
63146
+ description: "Reject files larger than this.",
63147
+ default: 50 * 1024 * 1024,
63148
+ advanced: true
63149
+ }
63150
+ ]
63151
+ };
63152
+ BUILTIN_FILE_SOURCE_DESCRIPTORS = [
63153
+ GPFS_FILE_SOURCE_DESCRIPTOR
63154
+ ];
63155
+ });
63156
+
63157
+ // ../types/src/file-source/index.ts
63158
+ var init_file_source = __esm(() => {
63159
+ init_descriptor();
63160
+ });
63161
+
65374
63162
  // ../types/src/eval/compare-output.ts
65375
63163
  function isPlainObject2(value) {
65376
63164
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -67003,7 +64791,7 @@ function fromBig(n, le = false) {
67003
64791
  return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
67004
64792
  return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
67005
64793
  }
67006
- function split2(lst, le = false) {
64794
+ function split(lst, le = false) {
67007
64795
  const len = lst.length;
67008
64796
  let Ah = new Uint32Array(len);
67009
64797
  let Al = new Uint32Array(len);
@@ -67183,7 +64971,7 @@ var init_sha2 = __esm(() => {
67183
64971
  super(28);
67184
64972
  }
67185
64973
  };
67186
- K512 = /* @__PURE__ */ (() => split2([
64974
+ K512 = /* @__PURE__ */ (() => split([
67187
64975
  "0x428a2f98d728ae22",
67188
64976
  "0x7137449123ef65cd",
67189
64977
  "0xb5c0fbcfec4d3b2f",
@@ -67572,11 +65360,11 @@ function walkGrammar(node, parts) {
67572
65360
  }
67573
65361
  return current;
67574
65362
  }
67575
- function normalizeTemplate(template2) {
67576
- return template2.endsWith("/") ? template2.slice(0, -1) : template2;
65363
+ function normalizeTemplate(template) {
65364
+ return template.endsWith("/") ? template.slice(0, -1) : template;
67577
65365
  }
67578
- function renderTemplate(template2, params) {
67579
- return normalizeTemplate(template2).split("/").flatMap((part) => {
65366
+ function renderTemplate(template, params) {
65367
+ return normalizeTemplate(template).split("/").flatMap((part) => {
67580
65368
  if (!part.startsWith(":")) {
67581
65369
  return [part];
67582
65370
  }
@@ -67591,31 +65379,31 @@ function renderTemplate(template2, params) {
67591
65379
  return [assertSegment(String(name), value)];
67592
65380
  });
67593
65381
  }
67594
- function buildS3Path(tenantId, template2, params) {
65382
+ function buildS3Path(tenantId, template, params) {
67595
65383
  const tenant = assertSegment("tenantId", tenantId);
67596
- const parts = renderTemplate(template2, params);
65384
+ const parts = renderTemplate(template, params);
67597
65385
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
67598
- if (template2.endsWith("/") && node === PATH_LEAF) {
67599
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65386
+ if (template.endsWith("/") && node === PATH_LEAF) {
65387
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
67600
65388
  }
67601
65389
  const path = ["tenants", tenant, ...parts].join("/");
67602
- return template2.endsWith("/") ? `${path}/` : path;
65390
+ return template.endsWith("/") ? `${path}/` : path;
67603
65391
  }
67604
- function buildS3PathSuffix(template2, params) {
67605
- const parts = renderTemplate(template2, params);
65392
+ function buildS3PathSuffix(template, params) {
65393
+ const parts = renderTemplate(template, params);
67606
65394
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
67607
- if (template2.endsWith("/") && node === PATH_LEAF) {
67608
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65395
+ if (template.endsWith("/") && node === PATH_LEAF) {
65396
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
67609
65397
  }
67610
65398
  const path = parts.join("/");
67611
- return template2.endsWith("/") ? `${path}/` : path;
65399
+ return template.endsWith("/") ? `${path}/` : path;
67612
65400
  }
67613
65401
  function stripTenantPrefix(key) {
67614
65402
  return key.replace(TENANT_PREFIX_RX, "");
67615
65403
  }
67616
- function matchS3Path(template2, key) {
65404
+ function matchS3Path(template, key) {
67617
65405
  const keyParts = stripTenantPrefix(key).split("/");
67618
- const templateParts = normalizeTemplate(template2).split("/");
65406
+ const templateParts = normalizeTemplate(template).split("/");
67619
65407
  const params = {};
67620
65408
  let keyIndex = 0;
67621
65409
  for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
@@ -67668,23 +65456,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
67668
65456
  }
67669
65457
  return assertSegment("tenantId", tenantId);
67670
65458
  };
67671
- const build = (template2, params) => {
65459
+ const build = (template, params) => {
67672
65460
  const tenant = resolveTenantId(params);
67673
- const parts = renderTemplate(template2, params ?? {});
65461
+ const parts = renderTemplate(template, params ?? {});
67674
65462
  const node = walkGrammar(grammarNode, parts);
67675
- if (template2.endsWith("/") && node === PATH_LEAF) {
67676
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65463
+ if (template.endsWith("/") && node === PATH_LEAF) {
65464
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
67677
65465
  }
67678
65466
  const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
67679
- return template2.endsWith("/") ? `${path}/` : path;
65467
+ return template.endsWith("/") ? `${path}/` : path;
67680
65468
  };
67681
65469
  const builder = build;
67682
- builder.at = (template2, params) => {
65470
+ builder.at = (template, params) => {
67683
65471
  const tenant = resolveTenantId(params);
67684
- const parts = renderTemplate(template2, params ?? {});
65472
+ const parts = renderTemplate(template, params ?? {});
67685
65473
  const nextNode = walkGrammar(grammarNode, parts);
67686
- if (template2.endsWith("/") && nextNode === PATH_LEAF) {
67687
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65474
+ if (template.endsWith("/") && nextNode === PATH_LEAF) {
65475
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
67688
65476
  }
67689
65477
  return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
67690
65478
  };
@@ -67862,6 +65650,7 @@ __export(exports_src, {
67862
65650
  validateSourcePackageRequiredFiles: () => validateSourcePackageRequiredFiles,
67863
65651
  validateOutput: () => validateOutput,
67864
65652
  validateInput: () => validateInput,
65653
+ validateFileSourceConfig: () => validateFileSourceConfig,
67865
65654
  validateConfig: () => validateConfig,
67866
65655
  triggersFromWorkflowDefinition: () => triggersFromWorkflowDefinition,
67867
65656
  triggersFromGitManifest: () => triggersFromGitManifest,
@@ -67887,6 +65676,7 @@ __export(exports_src, {
67887
65676
  resolveEffectiveMimeType: () => resolveEffectiveMimeType,
67888
65677
  resolveAgentOriginalSourceRef: () => resolveAgentOriginalSourceRef,
67889
65678
  requiresSpecializedParser: () => requiresSpecializedParser,
65679
+ redactFileSourceSecrets: () => redactFileSourceSecrets,
67890
65680
  publicExecutionFailure: () => publicExecutionFailure,
67891
65681
  projectAgentInputFiles: () => projectAgentInputFiles,
67892
65682
  pathToDottedPackageName: () => pathToDottedPackageName,
@@ -67901,6 +65691,7 @@ __export(exports_src, {
67901
65691
  parseAutomationTarget: () => parseAutomationTarget,
67902
65692
  parseAgentRerunVersion: () => parseAgentRerunVersion,
67903
65693
  noopTracingContext: () => noopTracingContext,
65694
+ mimeTypeForExtension: () => mimeTypeForExtension,
67904
65695
  matchS3Path: () => matchS3Path,
67905
65696
  mapOCRAttributes: () => mapOCRAttributes,
67906
65697
  mapLLMAttributes: () => mapLLMAttributes,
@@ -67923,6 +65714,7 @@ __export(exports_src, {
67923
65714
  isFileOutput: () => isFileOutput,
67924
65715
  isAutomationTriggerEnabled: () => isAutomationTriggerEnabled,
67925
65716
  isAgentEmailExplicitlyDisabled: () => isAgentEmailExplicitlyDisabled,
65717
+ inputsWithSource: () => inputsWithSource,
67926
65718
  hasTriggerMethod: () => hasTriggerMethod,
67927
65719
  goldenFileSatisfiedInResult: () => goldenFileSatisfiedInResult,
67928
65720
  getTriggerMethods: () => getTriggerMethods,
@@ -67936,6 +65728,7 @@ __export(exports_src, {
67936
65728
  getConfigSchema: () => getConfigSchema,
67937
65729
  getConfigFieldMetadata: () => getConfigFieldMetadata,
67938
65730
  getConfigDefaults: () => getConfigDefaults,
65731
+ getBuiltinFileSourceDescriptor: () => getBuiltinFileSourceDescriptor,
67939
65732
  getAllSupportedMimeTypes: () => getAllSupportedMimeTypes,
67940
65733
  getAllStepJsonSchemas: () => getAllStepJsonSchemas,
67941
65734
  getAllProcessorJsonSchemas: () => getAllProcessorJsonSchemas,
@@ -67949,6 +65742,7 @@ __export(exports_src, {
67949
65742
  fileFieldNamesFromJsonSchema: () => fileFieldNamesFromJsonSchema,
67950
65743
  fieldStemFromGoldenName: () => fieldStemFromGoldenName,
67951
65744
  extractFieldMetadata: () => extractFieldMetadata,
65745
+ extensionForMimeType: () => extensionForMimeType,
67952
65746
  executionWallClockMs: () => executionWallClockMs,
67953
65747
  executionPhaseLabel: () => executionPhaseLabel,
67954
65748
  executionPhaseDurationMs: () => executionPhaseDurationMs,
@@ -68042,7 +65836,7 @@ __export(exports_src, {
68042
65836
  SplitConfigSchema: () => SplitConfigSchema,
68043
65837
  SpanTypes: () => SpanTypes,
68044
65838
  SpanKindMap: () => SpanKindMap,
68045
- SpanKind: () => import_api.SpanKind,
65839
+ SpanKind: () => SpanKind,
68046
65840
  SourceVersionRefSchema: () => SourceVersionRefSchema,
68047
65841
  SourceSecretsFileSchema: () => SourceSecretsFileSchema,
68048
65842
  SourcePackageTypeSchema: () => SourcePackageTypeSchema,
@@ -68129,6 +65923,8 @@ __export(exports_src, {
68129
65923
  ID_PREFIXES: () => ID_PREFIXES,
68130
65924
  HttpMethodSchema: () => HttpMethodSchema,
68131
65925
  GenAI: () => GenAI,
65926
+ GPFS_FILE_SOURCE_NAME: () => GPFS_FILE_SOURCE_NAME,
65927
+ GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
68132
65928
  ForeachStepSchema: () => ForeachStepSchema,
68133
65929
  FilePathDescriptorSchema: () => FilePathDescriptorSchema,
68134
65930
  FailStepSchema: () => FailStepSchema,
@@ -68224,6 +66020,7 @@ __export(exports_src, {
68224
66020
  BoundingRegionSchema: () => BoundingRegionSchema,
68225
66021
  BlockStepSchema: () => BlockStepSchema,
68226
66022
  BaseEntitySchema: () => BaseEntitySchema,
66023
+ BUILTIN_FILE_SOURCE_DESCRIPTORS: () => BUILTIN_FILE_SOURCE_DESCRIPTORS,
68227
66024
  AutomationTargetSchema: () => AutomationTargetSchema,
68228
66025
  ApiTriggerMethodSchema: () => ApiTriggerMethodSchema,
68229
66026
  AiParseOutputSchema: () => AiParseOutputSchema,
@@ -68244,8 +66041,8 @@ __export(exports_src, {
68244
66041
  });
68245
66042
  var init_src = __esm(() => {
68246
66043
  init_core3();
68247
- init_processor2();
68248
- init_parser2();
66044
+ init_processor();
66045
+ init_parser();
68249
66046
  init_otel();
68250
66047
  init_execution_row();
68251
66048
  init_run_expand();
@@ -68253,6 +66050,7 @@ var init_src = __esm(() => {
68253
66050
  init_s3_paths();
68254
66051
  init_validation();
68255
66052
  init_workflow2();
66053
+ init_file_source();
68256
66054
  init_eval();
68257
66055
  init_git_source();
68258
66056
  init_triggers();
@@ -69157,7 +66955,7 @@ var require_foldFlowLines = __commonJS((exports) => {
69157
66955
  else
69158
66956
  end = lineWidth - indentAtStart;
69159
66957
  }
69160
- let split3 = undefined;
66958
+ let split2 = undefined;
69161
66959
  let prev = undefined;
69162
66960
  let overflow = false;
69163
66961
  let i = -1;
@@ -69191,20 +66989,20 @@ var require_foldFlowLines = __commonJS((exports) => {
69191
66989
  if (mode === FOLD_BLOCK)
69192
66990
  i = consumeMoreIndentedLines(text, i, indent.length);
69193
66991
  end = i + indent.length + endStep;
69194
- split3 = undefined;
66992
+ split2 = undefined;
69195
66993
  } else {
69196
66994
  if (ch === " " && prev && prev !== " " && prev !== `
69197
66995
  ` && prev !== "\t") {
69198
66996
  const next = text[i + 1];
69199
66997
  if (next && next !== " " && next !== `
69200
66998
  ` && next !== "\t")
69201
- split3 = i;
66999
+ split2 = i;
69202
67000
  }
69203
67001
  if (i >= end) {
69204
- if (split3) {
69205
- folds.push(split3);
69206
- end = split3 + endStep;
69207
- split3 = undefined;
67002
+ if (split2) {
67003
+ folds.push(split2);
67004
+ end = split2 + endStep;
67005
+ split2 = undefined;
69208
67006
  } else if (mode === FOLD_QUOTED) {
69209
67007
  while (prev === " " || prev === "\t") {
69210
67008
  prev = ch;
@@ -69217,7 +67015,7 @@ var require_foldFlowLines = __commonJS((exports) => {
69217
67015
  folds.push(j);
69218
67016
  escapedFolds[j] = true;
69219
67017
  end = j + endStep;
69220
- split3 = undefined;
67018
+ split2 = undefined;
69221
67019
  } else {
69222
67020
  overflow = true;
69223
67021
  }
@@ -69851,7 +67649,7 @@ var require_merge = __commonJS((exports) => {
69851
67649
  var identity = require_identity();
69852
67650
  var Scalar = require_Scalar();
69853
67651
  var MERGE_KEY = "<<";
69854
- var merge3 = {
67652
+ var merge2 = {
69855
67653
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
69856
67654
  default: "key",
69857
67655
  tag: "tag:yaml.org,2002:merge",
@@ -69861,7 +67659,7 @@ var require_merge = __commonJS((exports) => {
69861
67659
  }),
69862
67660
  stringify: () => MERGE_KEY
69863
67661
  };
69864
- var isMergeKey = (ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
67662
+ 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);
69865
67663
  function addMergeToJSMap(ctx, map2, value) {
69866
67664
  const source = resolveAliasValue(ctx, value);
69867
67665
  if (identity.isSeq(source))
@@ -69900,21 +67698,21 @@ var require_merge = __commonJS((exports) => {
69900
67698
  }
69901
67699
  exports.addMergeToJSMap = addMergeToJSMap;
69902
67700
  exports.isMergeKey = isMergeKey;
69903
- exports.merge = merge3;
67701
+ exports.merge = merge2;
69904
67702
  });
69905
67703
 
69906
67704
  // node_modules/yaml/dist/nodes/addPairToJSMap.js
69907
67705
  var require_addPairToJSMap = __commonJS((exports) => {
69908
67706
  var log = require_log();
69909
- var merge3 = require_merge();
67707
+ var merge2 = require_merge();
69910
67708
  var stringify = require_stringify();
69911
67709
  var identity = require_identity();
69912
67710
  var toJS = require_toJS();
69913
67711
  function addPairToJSMap(ctx, map2, { key, value }) {
69914
67712
  if (identity.isNode(key) && key.addToJSMap)
69915
67713
  key.addToJSMap(ctx, map2, value);
69916
- else if (merge3.isMergeKey(ctx, key))
69917
- merge3.addMergeToJSMap(ctx, map2, value);
67714
+ else if (merge2.isMergeKey(ctx, key))
67715
+ merge2.addMergeToJSMap(ctx, map2, value);
69918
67716
  else {
69919
67717
  const jsKey = toJS.toJS(key, "", ctx);
69920
67718
  if (map2 instanceof Map) {
@@ -71190,7 +68988,7 @@ var require_schema3 = __commonJS((exports) => {
71190
68988
  var bool = require_bool2();
71191
68989
  var float = require_float2();
71192
68990
  var int2 = require_int2();
71193
- var merge3 = require_merge();
68991
+ var merge2 = require_merge();
71194
68992
  var omap = require_omap();
71195
68993
  var pairs = require_pairs();
71196
68994
  var set2 = require_set();
@@ -71210,7 +69008,7 @@ var require_schema3 = __commonJS((exports) => {
71210
69008
  float.floatExp,
71211
69009
  float.float,
71212
69010
  binary.binary,
71213
- merge3.merge,
69011
+ merge2.merge,
71214
69012
  omap.omap,
71215
69013
  pairs.pairs,
71216
69014
  set2.set,
@@ -71233,7 +69031,7 @@ var require_tags = __commonJS((exports) => {
71233
69031
  var schema = require_schema();
71234
69032
  var schema$1 = require_schema2();
71235
69033
  var binary = require_binary();
71236
- var merge3 = require_merge();
69034
+ var merge2 = require_merge();
71237
69035
  var omap = require_omap();
71238
69036
  var pairs = require_pairs();
71239
69037
  var schema$2 = require_schema3();
@@ -71258,7 +69056,7 @@ var require_tags = __commonJS((exports) => {
71258
69056
  intOct: int2.intOct,
71259
69057
  intTime: timestamp.intTime,
71260
69058
  map: map2.map,
71261
- merge: merge3.merge,
69059
+ merge: merge2.merge,
71262
69060
  null: _null4.nullTag,
71263
69061
  omap: omap.omap,
71264
69062
  pairs: pairs.pairs,
@@ -71268,7 +69066,7 @@ var require_tags = __commonJS((exports) => {
71268
69066
  };
71269
69067
  var coreKnownTags = {
71270
69068
  "tag:yaml.org,2002:binary": binary.binary,
71271
- "tag:yaml.org,2002:merge": merge3.merge,
69069
+ "tag:yaml.org,2002:merge": merge2.merge,
71272
69070
  "tag:yaml.org,2002:omap": omap.omap,
71273
69071
  "tag:yaml.org,2002:pairs": pairs.pairs,
71274
69072
  "tag:yaml.org,2002:set": set2.set,
@@ -71277,7 +69075,7 @@ var require_tags = __commonJS((exports) => {
71277
69075
  function getTags(customTags, schemaName, addMergeTag) {
71278
69076
  const schemaTags = schemas3.get(schemaName);
71279
69077
  if (schemaTags && !customTags) {
71280
- return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
69078
+ return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
71281
69079
  }
71282
69080
  let tags = schemaTags;
71283
69081
  if (!tags) {
@@ -71295,7 +69093,7 @@ var require_tags = __commonJS((exports) => {
71295
69093
  tags = customTags(tags.slice());
71296
69094
  }
71297
69095
  if (addMergeTag)
71298
- tags = tags.concat(merge3.merge);
69096
+ tags = tags.concat(merge2.merge);
71299
69097
  return tags.reduce((tags2, tag) => {
71300
69098
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
71301
69099
  if (!tagObj) {
@@ -71322,11 +69120,11 @@ var require_Schema = __commonJS((exports) => {
71322
69120
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
71323
69121
 
71324
69122
  class Schema {
71325
- constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
69123
+ constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
71326
69124
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
71327
69125
  this.name = typeof schema === "string" && schema || "core";
71328
69126
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
71329
- this.tags = tags.getTags(customTags, this.name, merge3);
69127
+ this.tags = tags.getTags(customTags, this.name, merge2);
71330
69128
  this.toStringOptions = toStringDefaults ?? null;
71331
69129
  Object.defineProperty(this, identity.MAP, { value: map2.map });
71332
69130
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -72549,13 +70347,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
72549
70347
  return { mode, indent, chomp, comment, length };
72550
70348
  }
72551
70349
  function splitLines(source) {
72552
- const split3 = source.split(/\n( *)/);
72553
- const first = split3[0];
70350
+ const split2 = source.split(/\n( *)/);
70351
+ const first = split2[0];
72554
70352
  const m = first.match(/^( *)/);
72555
70353
  const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
72556
70354
  const lines = [line0];
72557
- for (let i = 1;i < split3.length; i += 2)
72558
- lines.push([split3[i], split3[i + 1]]);
70355
+ for (let i = 1;i < split2.length; i += 2)
70356
+ lines.push([split2[i], split2[i + 1]]);
72559
70357
  return lines;
72560
70358
  }
72561
70359
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -75569,7 +73367,7 @@ var init_main = __esm(() => {
75569
73367
  });
75570
73368
 
75571
73369
  // ../../node_modules/sisteransi/src/index.js
75572
- var require_src2 = __commonJS((exports, module) => {
73370
+ var require_src = __commonJS((exports, module) => {
75573
73371
  var ESC2 = "\x1B";
75574
73372
  var CSI2 = `${ESC2}[`;
75575
73373
  var beep = "\x07";
@@ -75912,7 +73710,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
75912
73710
  }, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
75913
73711
  var init_dist3 = __esm(() => {
75914
73712
  init_main();
75915
- import_sisteransi = __toESM(require_src2(), 1);
73713
+ import_sisteransi = __toESM(require_src(), 1);
75916
73714
  G = ["up", "down", "left", "right", "space", "enter", "cancel"];
75917
73715
  K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
75918
73716
  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)}` } } };
@@ -77255,7 +75053,7 @@ var init_dist4 = __esm(() => {
77255
75053
  init_dist3();
77256
75054
  init_main();
77257
75055
  init_dist2();
77258
- import_sisteransi2 = __toESM(require_src2(), 1);
75056
+ import_sisteransi2 = __toESM(require_src(), 1);
77259
75057
  tt2 = te();
77260
75058
  _t = w2("◆", "*");
77261
75059
  ot2 = w2("■", "x");
@@ -166080,11 +163878,11 @@ function closestMatch(target, candidates, options8) {
166080
163878
  }
166081
163879
  return best;
166082
163880
  }
166083
- function getDescription(key2, value, expected, descriptor) {
163881
+ function getDescription(key2, value, expected, descriptor2) {
166084
163882
  return [
166085
- `Invalid ${import_picocolors22.default.red(descriptor.key(key2))} value.`,
163883
+ `Invalid ${import_picocolors22.default.red(descriptor2.key(key2))} value.`,
166086
163884
  `Expected ${import_picocolors22.default.blue(expected)},`,
166087
- `but received ${value === VALUE_NOT_EXIST ? import_picocolors22.default.gray("nothing") : import_picocolors22.default.red(descriptor.value(value))}.`
163885
+ `but received ${value === VALUE_NOT_EXIST ? import_picocolors22.default.gray("nothing") : import_picocolors22.default.red(descriptor2.value(value))}.`
166088
163886
  ].join(" ");
166089
163887
  }
166090
163888
  function getListDescription({ text, list }, printWidth) {
@@ -169333,17 +167131,17 @@ function normalizeOptions(options8, optionInfos, {
169333
167131
  isCLI = false,
169334
167132
  passThrough = false,
169335
167133
  FlagSchema,
169336
- descriptor
167134
+ descriptor: descriptor2
169337
167135
  } = {}) {
169338
167136
  if (isCLI) {
169339
167137
  if (!FlagSchema) {
169340
167138
  throw new Error("'FlagSchema' option is required.");
169341
167139
  }
169342
- if (!descriptor) {
167140
+ if (!descriptor2) {
169343
167141
  throw new Error("'descriptor' option is required.");
169344
167142
  }
169345
167143
  } else {
169346
- descriptor = apiDescriptor;
167144
+ descriptor2 = apiDescriptor;
169347
167145
  }
169348
167146
  const unknown2 = !passThrough ? (key2, value, options9) => {
169349
167147
  const {
@@ -169366,7 +167164,7 @@ function normalizeOptions(options8, optionInfos, {
169366
167164
  const normalizer = new Normalizer(schemas3, {
169367
167165
  logger,
169368
167166
  unknown: unknown2,
169369
- descriptor
167167
+ descriptor: descriptor2
169370
167168
  });
169371
167169
  const shouldSuppressDuplicateDeprecationWarnings = logger !== false;
169372
167170
  if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) {
@@ -170747,7 +168545,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
170747
168545
  __defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
170748
168546
  }
170749
168547
  return to5;
170750
- }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils4, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils32, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils42, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver2, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src3, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
168548
+ }, __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 {
170751
168549
  diff(oldStr, newStr, options8 = {}) {
170752
168550
  let callback;
170753
168551
  if (typeof options8 === "function") {
@@ -170944,12 +168742,12 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
170944
168742
  }
170945
168743
  return components;
170946
168744
  }
170947
- }, LineDiff, lineDiff, ArrayDiff, arrayDiff, import_fast_glob, array2, characterCodeCache, import_picocolors5, apiDescriptor, import_picocolors2, commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => {
168745
+ }, LineDiff, lineDiff, ArrayDiff, arrayDiff, import_fast_glob, array2, characterCodeCache, import_picocolors5, apiDescriptor, import_picocolors2, commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor: descriptor2 }) => {
170948
168746
  const messages2 = [
170949
- `${import_picocolors2.default.yellow(typeof keyOrPair === "string" ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated`
168747
+ `${import_picocolors2.default.yellow(typeof keyOrPair === "string" ? descriptor2.key(keyOrPair) : descriptor2.pair(keyOrPair))} is deprecated`
170950
168748
  ];
170951
168749
  if (redirectTo) {
170952
- messages2.push(`we now treat it as ${import_picocolors2.default.blue(typeof redirectTo === "string" ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`);
168750
+ messages2.push(`we now treat it as ${import_picocolors2.default.blue(typeof redirectTo === "string" ? descriptor2.key(redirectTo) : descriptor2.pair(redirectTo))}`);
170953
168751
  }
170954
168752
  return messages2.join("; ") + ".";
170955
168753
  }, import_picocolors22, VALUE_NOT_EXIST, VALUE_UNCHANGED, INDENTATION, commonInvalidHandler = (key2, value, utils2) => {
@@ -170963,13 +168761,13 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
170963
168761
  `));
170964
168762
  }
170965
168763
  return chooseDescription(descriptions, utils2.loggerPrintWidth);
170966
- }, import_picocolors3, levenUnknownHandler = (key2, value, { descriptor, logger, schemas: schemas3 }) => {
168764
+ }, import_picocolors3, levenUnknownHandler = (key2, value, { descriptor: descriptor2, logger, schemas: schemas3 }) => {
170967
168765
  const messages2 = [
170968
- `Ignored unknown option ${import_picocolors3.default.yellow(descriptor.pair({ key: key2, value }))}.`
168766
+ `Ignored unknown option ${import_picocolors3.default.yellow(descriptor2.pair({ key: key2, value }))}.`
170969
168767
  ];
170970
168768
  const suggestion = closestMatch(key2, Object.keys(schemas3), { maxDistance: 3 });
170971
168769
  if (suggestion) {
170972
- messages2.push(`Did you mean ${import_picocolors3.default.blue(descriptor.key(suggestion))}?`);
168770
+ messages2.push(`Did you mean ${import_picocolors3.default.blue(descriptor2.key(suggestion))}?`);
170973
168771
  }
170974
168772
  logger.warn(messages2.join(" "));
170975
168773
  }, HANDLER_KEYS, Schema = class {
@@ -171008,9 +168806,9 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
171008
168806
  }
171009
168807
  }, AliasSchema, AnySchema, ArraySchema, BooleanSchema, ChoiceSchema, NumberSchema, IntegerSchema, StringSchema, defaultDescriptor, defaultUnknownHandler, defaultInvalidHandler, defaultDeprecatedHandler, Normalizer = class {
171010
168808
  constructor(schemas3, opts) {
171011
- const { logger = console, loggerPrintWidth = 80, descriptor = defaultDescriptor, unknown: unknown2 = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required: required2 = () => false, preprocess: preprocess2 = (x10) => x10, postprocess = () => VALUE_UNCHANGED } = opts || {};
168809
+ const { logger = console, loggerPrintWidth = 80, descriptor: descriptor2 = defaultDescriptor, unknown: unknown2 = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required: required2 = () => false, preprocess: preprocess2 = (x10) => x10, postprocess = () => VALUE_UNCHANGED } = opts || {};
171012
168810
  this._utils = {
171013
- descriptor,
168811
+ descriptor: descriptor2,
171014
168812
  logger: logger || { warn: () => {} },
171015
168813
  loggerPrintWidth,
171016
168814
  schemas: recordFromArray(schemas3, "name"),
@@ -171769,7 +169567,7 @@ var init_prettier = __esm(() => {
171769
169567
  };
171770
169568
  }
171771
169569
  });
171772
- require_utils4 = __commonJS2({
169570
+ require_utils2 = __commonJS2({
171773
169571
  "node_modules/braces/lib/utils.js"(exports) {
171774
169572
  exports.isInteger = (num) => {
171775
169573
  if (typeof num === "number") {
@@ -171858,7 +169656,7 @@ var init_prettier = __esm(() => {
171858
169656
  });
171859
169657
  require_stringify2 = __commonJS2({
171860
169658
  "node_modules/braces/lib/stringify.js"(exports, module) {
171861
- var utils2 = require_utils4();
169659
+ var utils2 = require_utils2();
171862
169660
  module.exports = (ast, options8 = {}) => {
171863
169661
  const stringify2 = (node, parent = {}) => {
171864
169662
  const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
@@ -172312,7 +170110,7 @@ var init_prettier = __esm(() => {
172312
170110
  require_compile2 = __commonJS2({
172313
170111
  "node_modules/braces/lib/compile.js"(exports, module) {
172314
170112
  var fill2 = require_fill_range();
172315
- var utils2 = require_utils4();
170113
+ var utils2 = require_utils2();
172316
170114
  var compile = (ast, options8 = {}) => {
172317
170115
  const walk2 = (node, parent = {}) => {
172318
170116
  const invalidBlock = utils2.isInvalidBrace(parent);
@@ -172362,7 +170160,7 @@ var init_prettier = __esm(() => {
172362
170160
  "node_modules/braces/lib/expand.js"(exports, module) {
172363
170161
  var fill2 = require_fill_range();
172364
170162
  var stringify2 = require_stringify2();
172365
- var utils2 = require_utils4();
170163
+ var utils2 = require_utils2();
172366
170164
  var append = (queue = "", stash = "", enclose = false) => {
172367
170165
  const result = [];
172368
170166
  queue = [].concat(queue);
@@ -174561,8 +172359,8 @@ var init_prettier = __esm(() => {
174561
172359
  var Stream = __require2("stream");
174562
172360
  var PassThrough = Stream.PassThrough;
174563
172361
  var slice = Array.prototype.slice;
174564
- module.exports = merge22;
174565
- function merge22() {
172362
+ module.exports = merge2;
172363
+ function merge2() {
174566
172364
  const streamsQueue = [];
174567
172365
  const args = slice.call(arguments);
174568
172366
  let merging = false;
@@ -174676,9 +172474,9 @@ var init_prettier = __esm(() => {
174676
172474
  "node_modules/fast-glob/out/utils/stream.js"(exports) {
174677
172475
  Object.defineProperty(exports, "__esModule", { value: true });
174678
172476
  exports.merge = undefined;
174679
- var merge22 = require_merge2();
172477
+ var merge2 = require_merge2();
174680
172478
  function merge3(streams) {
174681
- const mergedStream = merge22(streams);
172479
+ const mergedStream = merge2(streams);
174682
172480
  streams.forEach((stream) => {
174683
172481
  stream.once("error", (error52) => mergedStream.emit("error", error52));
174684
172482
  });
@@ -174706,7 +172504,7 @@ var init_prettier = __esm(() => {
174706
172504
  exports.isEmpty = isEmpty;
174707
172505
  }
174708
172506
  });
174709
- require_utils32 = __commonJS2({
172507
+ require_utils3 = __commonJS2({
174710
172508
  "node_modules/fast-glob/out/utils/index.js"(exports) {
174711
172509
  Object.defineProperty(exports, "__esModule", { value: true });
174712
172510
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
@@ -174730,7 +172528,7 @@ var init_prettier = __esm(() => {
174730
172528
  "node_modules/fast-glob/out/managers/tasks.js"(exports) {
174731
172529
  Object.defineProperty(exports, "__esModule", { value: true });
174732
172530
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
174733
- var utils2 = require_utils32();
172531
+ var utils2 = require_utils3();
174734
172532
  function generate(input, settings) {
174735
172533
  const patterns = processPatterns(input, settings);
174736
172534
  const ignore = processPatterns(settings.ignore, settings);
@@ -175039,7 +172837,7 @@ var init_prettier = __esm(() => {
175039
172837
  exports.createDirentFromStats = createDirentFromStats;
175040
172838
  }
175041
172839
  });
175042
- require_utils42 = __commonJS2({
172840
+ require_utils4 = __commonJS2({
175043
172841
  "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
175044
172842
  Object.defineProperty(exports, "__esModule", { value: true });
175045
172843
  exports.fs = undefined;
@@ -175067,7 +172865,7 @@ var init_prettier = __esm(() => {
175067
172865
  var fsStat = require_out();
175068
172866
  var rpl = require_run_parallel();
175069
172867
  var constants_1 = require_constants3();
175070
- var utils2 = require_utils42();
172868
+ var utils2 = require_utils4();
175071
172869
  var common = require_common();
175072
172870
  function read3(directory, settings, callback) {
175073
172871
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -175173,7 +172971,7 @@ var init_prettier = __esm(() => {
175173
172971
  exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
175174
172972
  var fsStat = require_out();
175175
172973
  var constants_1 = require_constants3();
175176
- var utils2 = require_utils42();
172974
+ var utils2 = require_utils4();
175177
172975
  var common = require_common();
175178
172976
  function read3(directory, settings) {
175179
172977
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -175953,7 +173751,7 @@ var init_prettier = __esm(() => {
175953
173751
  Object.defineProperty(exports, "__esModule", { value: true });
175954
173752
  var path15 = __require2("path");
175955
173753
  var fsStat = require_out();
175956
- var utils2 = require_utils32();
173754
+ var utils2 = require_utils3();
175957
173755
  var Reader = class {
175958
173756
  constructor(_settings) {
175959
173757
  this._settings = _settings;
@@ -176077,7 +173875,7 @@ var init_prettier = __esm(() => {
176077
173875
  require_matcher = __commonJS2({
176078
173876
  "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
176079
173877
  Object.defineProperty(exports, "__esModule", { value: true });
176080
- var utils2 = require_utils32();
173878
+ var utils2 = require_utils3();
176081
173879
  var Matcher = class {
176082
173880
  constructor(_patterns, _settings, _micromatchOptions) {
176083
173881
  this._patterns = _patterns;
@@ -176159,7 +173957,7 @@ var init_prettier = __esm(() => {
176159
173957
  require_deep = __commonJS2({
176160
173958
  "node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
176161
173959
  Object.defineProperty(exports, "__esModule", { value: true });
176162
- var utils2 = require_utils32();
173960
+ var utils2 = require_utils3();
176163
173961
  var partial_1 = require_partial();
176164
173962
  var DeepFilter = class {
176165
173963
  constructor(_settings, _micromatchOptions) {
@@ -176221,7 +174019,7 @@ var init_prettier = __esm(() => {
176221
174019
  require_entry = __commonJS2({
176222
174020
  "node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
176223
174021
  Object.defineProperty(exports, "__esModule", { value: true });
176224
- var utils2 = require_utils32();
174022
+ var utils2 = require_utils3();
176225
174023
  var EntryFilter = class {
176226
174024
  constructor(_settings, _micromatchOptions) {
176227
174025
  this._settings = _settings;
@@ -176306,7 +174104,7 @@ var init_prettier = __esm(() => {
176306
174104
  require_error2 = __commonJS2({
176307
174105
  "node_modules/fast-glob/out/providers/filters/error.js"(exports) {
176308
174106
  Object.defineProperty(exports, "__esModule", { value: true });
176309
- var utils2 = require_utils32();
174107
+ var utils2 = require_utils3();
176310
174108
  var ErrorFilter = class {
176311
174109
  constructor(_settings) {
176312
174110
  this._settings = _settings;
@@ -176324,7 +174122,7 @@ var init_prettier = __esm(() => {
176324
174122
  require_entry2 = __commonJS2({
176325
174123
  "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
176326
174124
  Object.defineProperty(exports, "__esModule", { value: true });
176327
- var utils2 = require_utils32();
174125
+ var utils2 = require_utils3();
176328
174126
  var EntryTransformer = class {
176329
174127
  constructor(_settings) {
176330
174128
  this._settings = _settings;
@@ -176592,7 +174390,7 @@ var init_prettier = __esm(() => {
176592
174390
  var stream_1 = require_stream4();
176593
174391
  var sync_1 = require_sync6();
176594
174392
  var settings_1 = require_settings4();
176595
- var utils2 = require_utils32();
174393
+ var utils2 = require_utils3();
176596
174394
  async function FastGlob(source2, options8) {
176597
174395
  assertPatternsInput(source2);
176598
174396
  const works = getWorks(source2, async_1.default, options8);
@@ -176910,7 +174708,7 @@ var init_prettier = __esm(() => {
176910
174708
  };
176911
174709
  }
176912
174710
  });
176913
- require_semver2 = __commonJS2({
174711
+ require_semver = __commonJS2({
176914
174712
  "node_modules/semver/classes/semver.js"(exports, module) {
176915
174713
  var debug = require_debug();
176916
174714
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
@@ -177180,7 +174978,7 @@ var init_prettier = __esm(() => {
177180
174978
  });
177181
174979
  require_compare = __commonJS2({
177182
174980
  "node_modules/semver/functions/compare.js"(exports, module) {
177183
- var SemVer = require_semver2();
174981
+ var SemVer = require_semver();
177184
174982
  var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
177185
174983
  module.exports = compare;
177186
174984
  }
@@ -178913,7 +176711,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
178913
176711
  };
178914
176712
  }
178915
176713
  });
178916
- require_src3 = __commonJS2({
176714
+ require_src2 = __commonJS2({
178917
176715
  "node_modules/editorconfig/src/index.js"(exports) {
178918
176716
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
178919
176717
  return new (P9 || (P9 = Promise))(function(resolve32, reject) {
@@ -180295,8 +178093,8 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
180295
178093
  super(parameters);
180296
178094
  this._choices = mapFromArray(parameters.choices.map((choice) => choice && typeof choice === "object" ? choice : { value: choice }), "value");
180297
178095
  }
180298
- expected({ descriptor }) {
180299
- const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor.value);
178096
+ expected({ descriptor: descriptor2 }) {
178097
+ const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor2.value);
180300
178098
  const head = choiceDescriptions.slice(0, -2);
180301
178099
  const tail = choiceDescriptions.slice(-2);
180302
178100
  const message = head.concat(tail.join(" or ")).join(", ");
@@ -180376,7 +178174,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
180376
178174
  mockable_default = mockable.mocked;
180377
178175
  import_micromatch = __toESM2(require_micromatch(), 1);
180378
178176
  partition_default = partition2;
180379
- import_editorconfig = __toESM2(require_src3(), 1);
178177
+ import_editorconfig = __toESM2(require_src2(), 1);
180380
178178
  iterate_directory_up_default = iterateDirectoryUp;
180381
178179
  FileSearcher = class extends Searcher {
180382
178180
  findInDirectory = findFile;
@@ -183847,7 +181645,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183847
181645
  else
183848
181646
  end = lineWidth - indentAtStart;
183849
181647
  }
183850
- let split3 = undefined;
181648
+ let split2 = undefined;
183851
181649
  let prev = undefined;
183852
181650
  let overflow = false;
183853
181651
  let i5 = -1;
@@ -183881,20 +181679,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183881
181679
  if (mode === FOLD_BLOCK)
183882
181680
  i5 = consumeMoreIndentedLines(text, i5, indent3.length);
183883
181681
  end = i5 + indent3.length + endStep;
183884
- split3 = undefined;
181682
+ split2 = undefined;
183885
181683
  } else {
183886
181684
  if (ch2 === " " && prev && prev !== " " && prev !== `
183887
181685
  ` && prev !== "\t") {
183888
181686
  const next = text[i5 + 1];
183889
181687
  if (next && next !== " " && next !== `
183890
181688
  ` && next !== "\t")
183891
- split3 = i5;
181689
+ split2 = i5;
183892
181690
  }
183893
181691
  if (i5 >= end) {
183894
- if (split3) {
183895
- folds.push(split3);
183896
- end = split3 + endStep;
183897
- split3 = undefined;
181692
+ if (split2) {
181693
+ folds.push(split2);
181694
+ end = split2 + endStep;
181695
+ split2 = undefined;
183898
181696
  } else if (mode === FOLD_QUOTED) {
183899
181697
  while (prev === " " || prev === "\t") {
183900
181698
  prev = ch2;
@@ -183907,7 +181705,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183907
181705
  folds.push(j11);
183908
181706
  escapedFolds[j11] = true;
183909
181707
  end = j11 + endStep;
183910
- split3 = undefined;
181708
+ split2 = undefined;
183911
181709
  } else {
183912
181710
  overflow = true;
183913
181711
  }
@@ -184541,7 +182339,7 @@ var require_merge3 = __commonJS((exports) => {
184541
182339
  var identity = require_identity2();
184542
182340
  var Scalar = require_Scalar2();
184543
182341
  var MERGE_KEY = "<<";
184544
- var merge3 = {
182342
+ var merge2 = {
184545
182343
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
184546
182344
  default: "key",
184547
182345
  tag: "tag:yaml.org,2002:merge",
@@ -184551,7 +182349,7 @@ var require_merge3 = __commonJS((exports) => {
184551
182349
  }),
184552
182350
  stringify: () => MERGE_KEY
184553
182351
  };
184554
- var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
182352
+ var isMergeKey = (ctx, key2) => (merge2.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge2.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
184555
182353
  function addMergeToJSMap(ctx, map2, value) {
184556
182354
  const source2 = resolveAliasValue(ctx, value);
184557
182355
  if (identity.isSeq(source2))
@@ -184590,21 +182388,21 @@ var require_merge3 = __commonJS((exports) => {
184590
182388
  }
184591
182389
  exports.addMergeToJSMap = addMergeToJSMap;
184592
182390
  exports.isMergeKey = isMergeKey;
184593
- exports.merge = merge3;
182391
+ exports.merge = merge2;
184594
182392
  });
184595
182393
 
184596
182394
  // ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
184597
182395
  var require_addPairToJSMap2 = __commonJS((exports) => {
184598
182396
  var log = require_log2();
184599
- var merge3 = require_merge3();
182397
+ var merge2 = require_merge3();
184600
182398
  var stringify = require_stringify3();
184601
182399
  var identity = require_identity2();
184602
182400
  var toJS = require_toJS2();
184603
182401
  function addPairToJSMap(ctx, map2, { key: key2, value }) {
184604
182402
  if (identity.isNode(key2) && key2.addToJSMap)
184605
182403
  key2.addToJSMap(ctx, map2, value);
184606
- else if (merge3.isMergeKey(ctx, key2))
184607
- merge3.addMergeToJSMap(ctx, map2, value);
182404
+ else if (merge2.isMergeKey(ctx, key2))
182405
+ merge2.addMergeToJSMap(ctx, map2, value);
184608
182406
  else {
184609
182407
  const jsKey = toJS.toJS(key2, "", ctx);
184610
182408
  if (map2 instanceof Map) {
@@ -185880,7 +183678,7 @@ var require_schema6 = __commonJS((exports) => {
185880
183678
  var bool = require_bool4();
185881
183679
  var float = require_float4();
185882
183680
  var int2 = require_int4();
185883
- var merge3 = require_merge3();
183681
+ var merge2 = require_merge3();
185884
183682
  var omap = require_omap2();
185885
183683
  var pairs = require_pairs2();
185886
183684
  var set2 = require_set2();
@@ -185900,7 +183698,7 @@ var require_schema6 = __commonJS((exports) => {
185900
183698
  float.floatExp,
185901
183699
  float.float,
185902
183700
  binary.binary,
185903
- merge3.merge,
183701
+ merge2.merge,
185904
183702
  omap.omap,
185905
183703
  pairs.pairs,
185906
183704
  set2.set,
@@ -185923,7 +183721,7 @@ var require_tags2 = __commonJS((exports) => {
185923
183721
  var schema = require_schema4();
185924
183722
  var schema$1 = require_schema5();
185925
183723
  var binary = require_binary2();
185926
- var merge3 = require_merge3();
183724
+ var merge2 = require_merge3();
185927
183725
  var omap = require_omap2();
185928
183726
  var pairs = require_pairs2();
185929
183727
  var schema$2 = require_schema6();
@@ -185948,7 +183746,7 @@ var require_tags2 = __commonJS((exports) => {
185948
183746
  intOct: int2.intOct,
185949
183747
  intTime: timestamp.intTime,
185950
183748
  map: map2.map,
185951
- merge: merge3.merge,
183749
+ merge: merge2.merge,
185952
183750
  null: _null4.nullTag,
185953
183751
  omap: omap.omap,
185954
183752
  pairs: pairs.pairs,
@@ -185958,7 +183756,7 @@ var require_tags2 = __commonJS((exports) => {
185958
183756
  };
185959
183757
  var coreKnownTags = {
185960
183758
  "tag:yaml.org,2002:binary": binary.binary,
185961
- "tag:yaml.org,2002:merge": merge3.merge,
183759
+ "tag:yaml.org,2002:merge": merge2.merge,
185962
183760
  "tag:yaml.org,2002:omap": omap.omap,
185963
183761
  "tag:yaml.org,2002:pairs": pairs.pairs,
185964
183762
  "tag:yaml.org,2002:set": set2.set,
@@ -185967,7 +183765,7 @@ var require_tags2 = __commonJS((exports) => {
185967
183765
  function getTags(customTags, schemaName, addMergeTag) {
185968
183766
  const schemaTags = schemas3.get(schemaName);
185969
183767
  if (schemaTags && !customTags) {
185970
- return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
183768
+ return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
185971
183769
  }
185972
183770
  let tags = schemaTags;
185973
183771
  if (!tags) {
@@ -185985,7 +183783,7 @@ var require_tags2 = __commonJS((exports) => {
185985
183783
  tags = customTags(tags.slice());
185986
183784
  }
185987
183785
  if (addMergeTag)
185988
- tags = tags.concat(merge3.merge);
183786
+ tags = tags.concat(merge2.merge);
185989
183787
  return tags.reduce((tags2, tag) => {
185990
183788
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
185991
183789
  if (!tagObj) {
@@ -186012,11 +183810,11 @@ var require_Schema2 = __commonJS((exports) => {
186012
183810
  var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
186013
183811
 
186014
183812
  class Schema2 {
186015
- constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
183813
+ constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
186016
183814
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
186017
183815
  this.name = typeof schema === "string" && schema || "core";
186018
183816
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
186019
- this.tags = tags.getTags(customTags, this.name, merge3);
183817
+ this.tags = tags.getTags(customTags, this.name, merge2);
186020
183818
  this.toStringOptions = toStringDefaults ?? null;
186021
183819
  Object.defineProperty(this, identity.MAP, { value: map2.map });
186022
183820
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -187239,13 +185037,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
187239
185037
  return { mode, indent: indent3, chomp, comment, length };
187240
185038
  }
187241
185039
  function splitLines2(source2) {
187242
- const split3 = source2.split(/\n( *)/);
187243
- const first = split3[0];
185040
+ const split2 = source2.split(/\n( *)/);
185041
+ const first = split2[0];
187244
185042
  const m7 = first.match(/^( *)/);
187245
185043
  const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
187246
185044
  const lines = [line0];
187247
- for (let i5 = 1;i5 < split3.length; i5 += 2)
187248
- lines.push([split3[i5], split3[i5 + 1]]);
185045
+ for (let i5 = 1;i5 < split2.length; i5 += 2)
185046
+ lines.push([split2[i5], split2[i5 + 1]]);
187249
185047
  return lines;
187250
185048
  }
187251
185049
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -189893,7 +187691,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
189893
187691
  // package.json
189894
187692
  var package_default = {
189895
187693
  name: "@eigenpal/cli",
189896
- version: "0.10.1",
187694
+ version: "0.10.3",
189897
187695
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
189898
187696
  keywords: [
189899
187697
  "eigenpal",
@@ -191410,7 +189208,7 @@ async function pushCurrentBranch(input) {
191410
189208
  function slugifyPackageSegment(value) {
191411
189209
  return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
191412
189210
  }
191413
- function packagePathForTemplate(template2, name) {
189211
+ function packagePathForTemplate(template, name) {
191414
189212
  const slug = slugifyPackageSegment(name);
191415
189213
  if (!slug)
191416
189214
  throw new Error("Package name must include at least one letter or number.");
@@ -191422,7 +189220,7 @@ function packagePathForTemplate(template2, name) {
191422
189220
  knowledge: "resources/knowledge",
191423
189221
  evaluator: "evaluators"
191424
189222
  };
191425
- const root = rootByTemplate[template2];
189223
+ const root = rootByTemplate[template];
191426
189224
  if (!root)
191427
189225
  throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
191428
189226
  return SourcePackagePathSchema.parse(`${root}/${slug}`);
@@ -191831,12 +189629,12 @@ function archivePackage(input) {
191831
189629
  runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
191832
189630
  cwd: input.gitRoot
191833
189631
  });
191834
- const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
189632
+ const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191835
189633
  cwd: input.outDir,
191836
189634
  encoding: "utf8"
191837
189635
  });
191838
- if (extract2.status !== 0)
191839
- throw new Error(extract2.stderr.trim() || "tar extraction failed");
189636
+ if (extract.status !== 0)
189637
+ throw new Error(extract.stderr.trim() || "tar extraction failed");
191840
189638
  } finally {
191841
189639
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
191842
189640
  }
@@ -191865,12 +189663,12 @@ async function tryHostedArchive(input) {
191865
189663
  const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
191866
189664
  try {
191867
189665
  writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
191868
- const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
189666
+ const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191869
189667
  cwd: input.outDir,
191870
189668
  encoding: "utf8"
191871
189669
  });
191872
- if (extract2.status !== 0)
191873
- throw new Error(extract2.stderr.trim() || "tar extraction failed");
189670
+ if (extract.status !== 0)
189671
+ throw new Error(extract.stderr.trim() || "tar extraction failed");
191874
189672
  return true;
191875
189673
  } finally {
191876
189674
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
@@ -196225,18 +194023,18 @@ async function init(name, opts) {
196225
194023
  if (existsSync11(target) && readdirSync2(target).length > 0) {
196226
194024
  throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
196227
194025
  }
196228
- let template2;
194026
+ let template;
196229
194027
  if (opts.template) {
196230
194028
  if (!isTemplateName(opts.template)) {
196231
194029
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
196232
194030
  }
196233
- template2 = opts.template;
194031
+ template = opts.template;
196234
194032
  } else if (opts.yes || !process.stdin.isTTY) {
196235
- template2 = "blank";
194033
+ template = "blank";
196236
194034
  } else {
196237
- template2 = await promptForTemplate();
194035
+ template = await promptForTemplate();
196238
194036
  }
196239
- const sourceRoot = join2(resolveTemplatesRoot(), template2);
194037
+ const sourceRoot = join2(resolveTemplatesRoot(), template);
196240
194038
  if (!existsSync11(sourceRoot)) {
196241
194039
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
196242
194040
  }